/* FEBRY.OPS V337 — compact, keyboard-accessible account pages.
   Only topbar account controls and moved account components are affected. */
body.cl-ms #topUser .ms-account-trigger{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-width:76px;
  min-height:35px;
  padding:7px 13px!important;
  border-radius:999px;
  border:1px solid rgba(182,255,64,.25);
  background:#101a13;
  color:#F5F9F3;
  font-size:11px;
  font-weight:800;
  letter-spacing:.03em;
  white-space:nowrap;
  -webkit-text-fill-color:currentColor;
  cursor:pointer;
}
body.cl-ms #topUser #profileTrigger{background:#101812;color:#F5F9F3;border-color:#2a432f}
body.cl-ms #topUser #planBadge{background:#17240c;color:#B6FF40;border-color:rgba(182,255,64,.4);font-size:11px}
body.cl-ms #topUser .ms-account-trigger:hover,
body.cl-ms #topUser .ms-account-trigger[aria-expanded=true]{border-color:#B6FF40;color:#B6FF40;background:#182515}
body.cl-ms #topUser .ms-account-trigger:focus-visible{outline:2px solid #B6FF40;outline-offset:3px}
.ms-account-overlay[hidden],.ms-account-pane[hidden]{display:none!important}
.ms-account-overlay{
  position:fixed;
  inset:0;
  z-index:10090;
  display:flex;
  justify-content:flex-end;
  background:rgba(1,5,3,.69);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}
.ms-account-dialog{
  display:flex;
  flex-direction:column;
  width:min(640px,100vw);
  height:100%;
  min-height:0;
  color:#F5F9F3;
  background:#090D0B;
  border-left:1px solid #31472f;
  box-shadow:-20px 0 65px rgba(0,0,0,.4);
  outline:none;
}
.ms-account-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  padding:23px clamp(16px,3vw,30px) 15px;
  border-bottom:1px solid #283b2b;
  flex:none;
}
.ms-account-eyebrow{font-size:10px;letter-spacing:.14em;color:#F5F9F3;font-weight:850}
.ms-account-head h2{margin:6px 0 3px;font-size:clamp(24px,3vw,30px);letter-spacing:-.04em;line-height:1.1}
.ms-account-head p{font-size:11px;color:#F5F9F3;margin:5px 0 0}
.ms-account-close{
  flex:none;display:flex;align-items:center;gap:11px;
  padding:8px 10px;border-radius:10px;
  border:1px solid #364a38;color:#F5F9F3;background:#112017;cursor:pointer;
  font-size:12px;font-weight:700;
}
.ms-account-close span{font-size:18px;line-height:1}
.ms-account-close:hover,.ms-account-close:focus-visible{border-color:#B6FF40;outline-color:#B6FF40}
.ms-account-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:12px clamp(16px,3vw,30px);border-bottom:1px solid #213226;flex:none}
.ms-account-tabs button{border:1px solid #253a29;border-radius:10px;background:#101912;padding:11px 12px;color:#F5F9F3;font-size:12px;font-weight:800;cursor:pointer}
.ms-account-tabs button.active{background:#1b2d15;color:#B6FF40;border-color:rgba(182,255,64,.46)}
.ms-account-tabs button:focus-visible{outline:2px solid #B6FF40;outline-offset:2px}
.ms-account-content{flex:1;min-height:0;overflow:auto;padding:5px clamp(16px,3vw,30px) 30px;scrollbar-width:thin;scrollbar-color:#314d36 transparent}
.ms-account-pane{min-width:0}
.ms-account-section-heading{margin:23px 0 10px}
.ms-account-section-heading h3{margin:0;color:#F5F9F3;font-size:15px;letter-spacing:-.012em}
.ms-account-section-heading p{margin:4px 0 0;font-size:11px;line-height:1.5;color:#F5F9F3}
.ms-account-section{min-width:0}
.ms-account-section > :first-child{margin-top:0!important}
.ms-account-section .account-usage,.ms-account-section .threads-oauth-card,.ms-account-section .writing-style-card,
.ms-account-section .referral-dashboard{width:100%!important;max-width:none!important;margin:0!important}
.ms-account-section .account-usage{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px;border:1px solid #2b4730;border-radius:15px;background:#132119}
.ms-account-section .account-usage .usage-metric{min-width:0;padding:11px}
.ms-account-section .account-usage .usage-wide,.ms-account-section .account-usage .usage-alert{grid-column:1 / -1!important}
.ms-account-section .account-usage .usage-metric strong{font-size:17px;overflow-wrap:anywhere}
.ms-account-section .threads-oauth-card{padding:15px;border:1px solid #2b4730;border-radius:15px;background:#132119}
.ms-account-section .threads-oauth-head{display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap}
.ms-account-section .threads-account-row{flex-wrap:wrap;gap:8px}
.ms-account-section .referral-dashboard{min-width:0}
.ms-account-section .quick{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;max-width:none;padding:0;margin:0;overflow:visible}
.ms-account-section .quick .chip{width:100%;min-height:40px;white-space:normal;text-align:left;padding:9px 11px}
.ms-account-section .writing-style-card{padding:14px;border-radius:15px}
.ms-account-section details{width:100%!important;max-width:none!important;margin:0!important;border-color:#2e4833!important}
.ms-account-section details+details{margin-top:10px!important}
.ms-account-section select,.ms-account-section input,.ms-account-section textarea{max-width:100%;box-sizing:border-box}
.ms-account-extras{padding:14px 0 8px}
.ms-account-extras .app-review-entry-desktop{display:flex;position:static;width:100%;max-width:none;text-decoration:none}
body.ms-account-open{overflow:hidden!important;overscroll-behavior:contain}
@media (max-width:900px){
  body.cl-ms #topUser{flex-wrap:nowrap;gap:5px!important}
  body.cl-ms #topUser .ms-account-trigger{min-width:0;min-height:35px;padding:7px 10px!important;font-size:10px}
  .ms-account-dialog{width:100vw}
}
@media (max-width:480px){
  body.cl-ms #topUser .ms-account-trigger{padding:7px 8px!important;font-size:9px}
  body.cl-ms #topUser #logoutBtn{padding:7px 9px!important;font-size:10px}
}
@media(prefers-reduced-motion:reduce){.ms-account-overlay{backdrop-filter:none;-webkit-backdrop-filter:none}}

.ms-account-overlay .referral-dashboard-desktop{display:block!important}


/* FEBRY.OPS V340 — profile compaction + better desktop scroll comfort */
.ms-account-dialog{width:min(600px,100vw)}
.ms-account-head{padding:18px clamp(14px,2.6vw,24px) 12px;gap:14px}
.ms-account-eyebrow{font-size:9px;letter-spacing:.12em}
.ms-account-head h2{margin:4px 0 2px;font-size:clamp(20px,2.5vw,26px)}
.ms-account-head p{font-size:10px;margin-top:3px}
.ms-account-close{padding:7px 9px;font-size:11px;gap:9px}
.ms-account-tabs{gap:8px;padding:10px clamp(14px,2.6vw,24px);border-bottom:1px solid #1b2a20}
.ms-account-tabs button{padding:9px 10px;font-size:11px;border-radius:12px}
.ms-account-content{padding:4px clamp(14px,2.6vw,24px) 22px}
.ms-account-section-heading{margin:16px 0 8px}
.ms-account-section-heading h3{font-size:14px}
.ms-account-section-heading p{font-size:10px;margin-top:3px}

.ms-account-section .account-usage{gap:8px;padding:10px;border-radius:14px}
.ms-account-section .account-usage .usage-metric{padding:10px;border-radius:12px}
.ms-account-section .account-usage .usage-metric span{font-size:10px}
.ms-account-section .account-usage .usage-metric strong{font-size:15px;line-height:1.15}
.ms-account-section .account-usage .usage-metric small{font-size:10px;line-height:1.45}
.ms-account-section .account-usage .usage-line strong{font-size:15px}
.ms-account-section .account-usage .usage-progress{margin-top:6px}
.ms-account-section .account-usage #publishRemaining{font-size:10px;line-height:1.45}
.ms-account-section .account-usage .free-credit-unlimited{margin-top:8px;padding:12px 13px;border-radius:12px;gap:10px}
.ms-account-section .account-usage .free-credit-unlimited .free-unlimited-icon{font-size:25px;line-height:1}
.ms-account-section .account-usage .free-credit-unlimited strong{font-size:13px;line-height:1.35}
.ms-account-section .account-usage .free-credit-unlimited small{font-size:10px;line-height:1.5;margin-top:5px;display:block}

.ms-account-section .threads-oauth-card{padding:13px;border-radius:14px}
.ms-account-section .threads-oauth-head{gap:10px}
.ms-account-section .threads-oauth-head > div span{font-size:10px}
.ms-account-section .threads-oauth-head > div strong{font-size:14px}
.ms-account-section .threads-oauth-head > div small{font-size:10px}
.ms-account-section .threads-quota-tools{margin:8px 0 6px}
.ms-account-section .threads-quota-tools>span{font-size:10px}
.ms-account-section .threads-quota-tools .btn{min-height:28px;font-size:10px;padding:5px 9px}
.ms-account-section .threads-quota-global-foot{font-size:9.5px;margin-top:8px}

@media (max-width:900px){
  .ms-account-dialog{width:100vw}
}


/* FEBRY.OPS V341 — logo header + outer accordion for Threads list */
body.cl-ms .topbar .mschat-brand{display:flex;align-items:center;gap:10px;min-width:0}
body.cl-ms .topbar .mschat-brand .febry-brand-logo{flex:0 0 auto}
body.cl-ms .topbar .mschat-brand .febry-site-logo{height:36px!important;max-width:min(42vw,170px)!important}
body.cl-ms .topbar .mschat-brand-copy{display:flex;flex-direction:column;justify-content:center;min-width:0}
body.cl-ms .topbar .mschat-brand-copy strong{font-size:11px;line-height:1;color:#F5F9F3;letter-spacing:.2em}
@media(max-width:700px){body.cl-ms .topbar .mschat-brand .febry-site-logo{height:32px!important;max-width:150px!important}body.cl-ms .topbar .mschat-brand-copy strong{font-size:10px;letter-spacing:.16em}}

.threads-account-collection{margin-top:10px;border:1px solid rgba(182,255,64,.14);border-radius:16px;background:rgba(8,14,10,.54);overflow:hidden}
.threads-account-collection>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;cursor:pointer}
.threads-account-collection>summary::-webkit-details-marker{display:none}
.threads-account-collection>summary:focus-visible{outline:2px solid #B6FF40;outline-offset:-2px}
.threads-account-collection-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.threads-account-collection-copy strong{font-size:11px;color:#F5F9F3;letter-spacing:.03em}
.threads-account-collection-copy small{font-size:10px;line-height:1.5;color:#F5F9F3}
.threads-account-collection-arrow{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:999px;border:1px solid #28492f;background:#0a140f;color:#F5F9F3;font-size:12px;transition:transform .18s ease}
.threads-account-collection[open] .threads-account-collection-arrow{transform:rotate(180deg)}
.threads-account-collection-body{padding:0 14px 14px;border-top:1px solid rgba(182,255,64,.08)}
.threads-account-collection-body .threads-account-list{margin-top:10px}
.threads-account-collection-body .threads-quota-global-foot{margin-top:10px}
@media(max-width:900px){.threads-account-collection>summary{padding:11px 12px}.threads-account-collection-body{padding:0 12px 12px}}
