/* ---------- topbar ---------- */
.topbar{border-bottom:1px solid var(--line);position:sticky;top:0;
  background:rgba(15,22,28,.93);backdrop-filter:blur(6px);z-index:50}
.topbar .wrap{display:flex;align-items:center;height:64px;gap:20px}
.logo{display:flex;align-items:baseline;font-weight:800;font-size:16px;
  font-stretch:115%;letter-spacing:.04em;line-height:1}
/* The mug symbol is 10 wide x 13 tall, of which the cup body is the lower 9.
   Sizing so those 9 units match cap height puts the mug exactly at cap height
   with the steam rising above and the base sitting on the baseline. */
/* Archivo's cap height is .703em, and the mug's body is 9 of the symbol's 13
   units — so height must be .703 * 13/9 = 1.015em for the cup to sit exactly
   at cap height on the baseline. Baseline alignment (not flex-end) does the
   vertical work; a translate hack pushed it 0.14em low before. */
.cup{height:1.015em;width:.781em;display:block;flex:0 0 auto;margin:0 .03em}

/* The mug is inlined rather than referenced via <use>: <use> renders into
   shadow DOM, where outer CSS cannot reach non-inheritable properties like
   opacity or animation, so the steam silently would not animate. */
.cup .steam{fill:var(--muted)}
.cup .shell{fill:currentColor}
.cup .crema{fill:var(--mark)}
.cup .body{fill:var(--panel-soft)}

/* Steam. The only ambient motion in the product, confined to the mark — the
   design system's "one signature moment" allowance. Opacity only: the wisps
   are 1px pixel-art squares and sub-pixel translation reads as blur, not
   steam. Staggered so the three wisps curl in sequence. */
.cup .wisp{opacity:.85;animation:steam 4.2s ease-in-out infinite}
.cup .w2{animation-delay:-1.4s}
.cup .w3{animation-delay:-2.8s}
@keyframes steam{
  0%,100%{opacity:.85}
  35%    {opacity:.22}
  70%    {opacity:.55}
}
@media (prefers-reduced-motion:reduce){
  .cup .wisp{animation:none;opacity:.85}
}
.tlp{border:1px solid var(--line-bright);color:var(--muted);font-family:var(--mono);
  font-size:9px;letter-spacing:.14em;padding:4px 8px;white-space:nowrap}
nav{display:flex;gap:20px;margin-left:auto}
nav button{color:var(--muted);font-size:12.5px;font-weight:500;transition:color .15s;
  padding:6px 0;border-bottom:2px solid transparent;white-space:nowrap}
nav button:hover,nav button:focus-visible{color:var(--paper)}
nav button.on{color:var(--paper);border-bottom-color:var(--mark)}
.live{display:flex;align-items:center;gap:9px;color:var(--muted);font-size:10px;
  font-weight:800;letter-spacing:.14em;text-transform:uppercase;white-space:nowrap}
/* status dot: green = healthy. Gold = partial degradation, red = all
   collectors down. Red-when-healthy read as "broken" — a SOC convention. */
.live b{width:8px;height:8px;border-radius:50%;background:var(--gold);position:relative;flex-shrink:0}
.live.ok b{background:var(--green)}
.live.down b{background:var(--red)}
.live b::after{content:'';position:absolute;inset:0;border-radius:50%;background:inherit;
  animation:ping 2.4s var(--ease) infinite}
@keyframes ping{75%,100%{transform:scale(2.6);opacity:0}}
#staleChips{display:flex;gap:8px}
.stale-chip{border:1px solid var(--gold);color:var(--gold);font-family:var(--mono);
  font-size:9px;letter-spacing:.14em;padding:4px 8px;white-space:nowrap}

/* ---------- masthead ---------- */
.masthead{--desk:clamp(46px,6.4vw,96px);padding:34px 0 0;position:relative}
/* Compact strip for returning visitors: the full plate prints once (first
   visit); after that the data owns the fold. Same elements, collapsed. */
.masthead.compact{padding:14px 0 0}
.masthead.compact::before{content:none}
.masthead.compact .mast-row{align-items:baseline;padding-bottom:12px}
.masthead.compact .mast-name{flex-direction:row;gap:0;line-height:1;--desk:22px}
.masthead.compact .mast-name .soc{font-size:var(--desk)}
.masthead.compact .mast-ed{line-height:1.7;padding-bottom:0;font-size:10px}
.masthead.compact .mast-sub{display:none}
.masthead::before{content:'';position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(52% 42% at 50% 0%,rgba(232,225,207,.05),transparent 70%)}
.mast-row{display:flex;align-items:flex-end;justify-content:space-between;gap:40px;
  border-bottom:1px solid var(--line-bright);padding-bottom:26px}
/* Justified two-line block: SOC set larger so both lines share one measure,
   making a solid rectangle of type. More presence than the single line at
   ~half the width — and it stops the wordmark running off a 320px screen,
   which the one-line version did. */
.mast-name{display:flex;flex-direction:column;align-items:flex-start;
  width:max-content;font-weight:800;font-stretch:125%;
  letter-spacing:-.02em;line-height:.80;text-transform:uppercase}
.mast-name .soc{font-size:calc(var(--desk)*1.2795)}
.mast-name .desk{font-size:var(--desk)}
.mast-ed{text-align:right;font-family:var(--mono);font-size:11px;color:var(--muted);
  line-height:2.1;padding-bottom:8px;white-space:nowrap;font-variant-numeric:tabular-nums}
.mast-ed b{color:var(--paper);font-weight:600}
.mast-sub{display:flex;justify-content:space-between;align-items:center;gap:24px;
  padding:16px 0;border-bottom:1px solid var(--line)}
.mast-sub .caps{color:var(--muted);letter-spacing:.2em}
#tagline{font-family:var(--mono);font-size:13px;color:var(--paper);min-height:20px}

/* ---------- hero search ---------- */
.hero{padding:26px 0 0;position:relative}
.search{display:flex;align-items:center;height:68px;background:var(--panel);
  border:1px solid var(--line-bright);padding:0 24px;gap:16px;transition:border-color .2s}
.search:focus-within{border-color:var(--accent)}
.search svg{width:20px;height:20px;stroke:var(--mark);flex-shrink:0;fill:none;stroke-width:2}
.search input{flex:1;font-family:var(--mono);font-size:15px;min-width:0}
.search input::placeholder{color:var(--muted);opacity:.7}
.search .detect{font-family:var(--mono);font-size:10px;font-weight:600;letter-spacing:.11em;
  color:var(--ink-on-accent);background:var(--accent);padding:5px 10px;white-space:nowrap;display:none}
.search kbd{font-family:var(--mono);font-size:10px;color:var(--muted);
  border:1px solid var(--line);padding:3px 8px}
.ex-row{display:flex;align-items:center;gap:10px;margin-top:14px;flex-wrap:wrap}
.ex-label{font-size:10px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:var(--muted)}
.ex-chip{border:1px solid var(--line);color:var(--muted);font-family:var(--mono);
  font-size:11px;padding:7px 12px;transition:all .15s}
.ex-chip:hover,.ex-chip:focus-visible{border-color:var(--accent);color:var(--accent)}

/* disclosure banner — compliance requirement, prominent not footnote */
.disclose{display:flex;align-items:flex-start;gap:12px;margin-top:16px;padding:12px 16px;
  border:1px solid var(--line);background:var(--panel);color:var(--muted);font-size:11.5px;line-height:1.5}
.disclose b{color:var(--gold);font-weight:600;flex-shrink:0;font-family:var(--mono);
  font-size:9px;letter-spacing:.14em;text-transform:uppercase;padding-top:2px}

/* ---------- ticker ---------- */
.ticker{border:1px solid var(--line);border-left:none;border-right:none;margin-top:22px;
  overflow:hidden;display:flex}
.ticker .lab{display:flex;align-items:center;gap:9px;padding:13px 20px;
  border-right:1px solid var(--line);background:var(--panel);color:var(--mark);font-size:9px;
  font-weight:800;letter-spacing:.14em;text-transform:uppercase;white-space:nowrap;flex-shrink:0}
.tick-view{overflow:hidden;flex:1;display:flex;align-items:center}
.tick-track{display:flex;gap:44px;padding-left:24px;white-space:nowrap;will-change:transform}
.tick-track.css-tick{animation:tick 46s linear infinite}
.ticker:hover .tick-track.css-tick{animation-play-state:paused}
@keyframes tick{to{transform:translateX(-50%)}}
.tick-item{font-family:var(--mono);font-size:11.5px;color:var(--muted)}
.tick-item b{font-weight:600}

/* ---------- stat band ---------- */
.band{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);border-top:none}
.band button{display:flex;justify-content:space-between;align-items:center;padding:24px 26px;
  border-right:1px solid var(--line);font-size:13px;color:var(--muted);
  transition:background .15s,color .15s;text-align:left}
.band button:last-child{border-right:none}
.band b{font-family:var(--mono);font-size:20px;font-weight:600;color:var(--paper);
  font-variant-numeric:tabular-nums}
.band button:hover{background:var(--panel-soft)}
.band button.on{background:var(--accent);color:var(--ink-on-accent)}
.band button.on b{color:var(--ink-on-accent)}

/* ---------- working surfaces (views) ---------- */
section.view{padding-top:44px;position:relative}
.sec-head{display:flex;align-items:flex-end;justify-content:space-between;gap:40px;
  padding-bottom:22px;position:relative}
.rule{position:absolute;left:0;right:0;bottom:0;height:1px;background:var(--line-bright);
  transform-origin:left}
.sec-title h2{font-size:clamp(24px,3vw,38px);font-weight:800;font-stretch:118%;
  letter-spacing:-.015em;line-height:1;text-transform:uppercase}
.sec-kicker{font-size:10px;font-weight:800;letter-spacing:.2em;text-transform:uppercase;
  color:var(--mark);margin-bottom:10px}
.sec-kicker.purple{color:var(--purple)}
.sec-desc{color:var(--muted);font-size:13px;max-width:400px;text-align:right;padding-bottom:6px}

/* ---------- footer ---------- */
.fband{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid var(--line-bright);
  margin-top:120px}
.fband div{padding:26px 30px;border-right:1px solid var(--line);font-size:10px;font-weight:800;
  letter-spacing:.14em;text-transform:uppercase;color:var(--muted)}
.fband div:last-child{border-right:none}
.foot{display:flex;justify-content:space-between;gap:24px;padding:22px 0 34px;
  color:var(--muted);font-size:11px;flex-wrap:wrap}
.foot .mono{font-size:10px}

/* ---------- mobile ---------- */
@media (max-width:640px){
  .wrap{padding:0 16px}
  .topbar .wrap{height:auto;flex-wrap:wrap;padding:10px 16px;gap:12px}
  .tlp{display:none}
  .live{margin-left:auto}
  #staleChips{order:6;flex-wrap:wrap}
  nav{order:5;width:100%;margin-left:0;gap:16px;overflow-x:auto;
    -webkit-overflow-scrolling:touch;scrollbar-width:none}
  nav::-webkit-scrollbar{display:none}
  .masthead{--desk:clamp(34px,10.5vw,52px);padding:20px 0 0}
  .mast-row{flex-direction:column;align-items:flex-start;gap:14px;padding-bottom:16px}
  .mast-ed{text-align:left;padding-bottom:0;white-space:normal}
  .mast-sub{flex-direction:column;align-items:flex-start;gap:8px;padding:12px 0}
  .search{height:56px;padding:0 14px;gap:10px}
  .search kbd{display:none}
  .search input{font-size:13px}
  .ticker .lab{padding:11px 12px}
  .band{grid-template-columns:1fr 1fr}
  .band button{padding:16px 18px;border-bottom:1px solid var(--line)}
  .band button:nth-child(2n){border-right:none}
  .band button:nth-child(n+3){border-bottom:none}
  .sec-head{flex-direction:column;align-items:flex-start;gap:10px}
  .sec-desc{text-align:left;max-width:none}
  .fband{grid-template-columns:1fr 1fr}
  .fband div{padding:16px;border-bottom:1px solid var(--line)}
}
