/* ==========================================================================
   DX — the five-area shell (2026-11)
   Loaded last. The side navigation is gone: five areas sit in the masthead (and
   in the tab bar on a phone), each with a row of views under the page head. The
   telemetry tiles fold to one conditions line. Also the new pages: Now, a band
   page, the Bench and Learn indexes.
   ========================================================================== */

/* ---------- 1. Layout without the side column ----------------------------- */
#layout { display: block; min-height: calc(100vh - 100px); }
#content { width: 100%; max-width: 1480px; margin-inline: auto; min-width: 0; }
#main { max-width: none; }

/* ---------- 2. Masthead: the areas ---------------------------------------- */
#topbar { gap: 18px; }
#brand .brand-text { display: none; }
#areanav { display: flex; align-items: stretch; gap: 2px; height: 100%; margin-left: 6px; }
#areanav a {
  position: relative; display: flex; align-items: center; padding: 0 13px;
  font: 500 14px/1 var(--sans); color: var(--dim); text-decoration: none; white-space: nowrap;
  transition: color var(--dur-1);
}
#areanav a:hover { color: var(--txt-bright); }
#areanav a::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: -1px; height: 2px; background: var(--cyan);
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur-2) var(--ease);
}
#areanav a.active { color: var(--txt-bright); font-weight: 600; }
#areanav a.active::after { transform: scaleX(1); }
#areanav a:focus-visible { outline: 2px solid var(--cyan); outline-offset: -4px; border-radius: 6px; }
.header-search-wrap { flex: 1 1 220px; max-width: 320px; min-width: 0; margin-left: auto; }
.top-actions { margin-left: 0; flex: 0 0 auto; }
@media (max-width: 1240px) { #qthChip #qthLL { display: none; } }
@media (max-width: 920px) {
  #areanav { display: none; }
  .header-search-wrap { max-width: none; }
}
@media (max-width: 640px) { .header-search-wrap kbd { display: none; } }
@media (max-width: 480px) {
  /* brand, search, grid chip and four buttons do not fit: alerts and shortcuts are desk tools */
  #alertsBtn, #helpBtn { display: none; }
}

/* ---------- 3. The conditions line ---------------------------------------- */
/* Closed, the telemetry strip is one quiet line of figures. "More" opens the tiles with sparklines. */
#kpiStrip:not(.more-open) {
  align-items: center; gap: 0 26px; min-height: 38px; padding: 0 28px; overflow-x: auto; scrollbar-width: none;
}
#kpiStrip:not(.more-open)::-webkit-scrollbar { display: none; }
#kpiStrip:not(.more-open) .kpi {
  display: flex; flex: 0 0 auto; align-items: baseline; gap: 8px; min-width: 0; padding: 0; border: 0; background: none;
}
#kpiStrip:not(.more-open) .kpi::before { content: none; }
#kpiStrip:not(.more-open) .kpi label { font-size: 10.5px; letter-spacing: .1em; }
#kpiStrip:not(.more-open) .kpi b { font-size: 13px; }
#kpiStrip:not(.more-open) .kpi .spark, #kpiStrip:not(.more-open) .kpi .trend { display: none; }
#kpiStrip:not(.more-open) .kpi[data-k="xray"] { display: flex; }
#kpiStrip:not(.more-open) .kpi.scales { align-items: center; }
#kpiStrip:not(.more-open) .kpi.scales label { display: none; }
#kpiStrip:not(.more-open) #kpiMore { margin-left: auto; padding: 0 0 0 12px; align-self: stretch; }
#kpiStrip::before { content: none; }
@media (max-width: 920px) {
  #kpiStrip:not(.more-open) { padding: 0 16px; gap: 0 20px; }
  #kpiStrip:not(.more-open) .kpi { min-width: 0; padding: 0; }
  #kpiStrip.more-open { flex-wrap: wrap; overflow: visible; }
  #kpiStrip.more-open .kpi { flex: 1 1 150px; }
}

/* ---------- 4. Views inside an area --------------------------------------- */
.subnav {
  display: flex; gap: 4px; padding: 0 28px; margin: -8px 0 22px; border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  position: relative; flex: 0 0 auto; padding: 10px 12px 12px; font: 500 13.5px/1 var(--sans); color: var(--dim);
  text-decoration: none; white-space: nowrap; transition: color var(--dur-1);
}
.subnav a:first-child { padding-left: 0; }
.subnav a:hover { color: var(--txt-bright); }
.subnav a.active { color: var(--txt-bright); font-weight: 600; }
.subnav a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--cyan); }
.subnav a:first-child.active::after { left: 0; }
.subnav a:focus-visible { outline: 2px solid var(--cyan); outline-offset: -3px; border-radius: 6px; }
body.view-home .subnav { margin-top: 0; padding-top: 6px; }
@media (max-width: 920px) { .subnav { padding: 0 16px; margin-bottom: 16px; } }
.view-part { display: contents; }

#sitefoot .sf-note a { color: var(--dim); text-decoration: underline; text-underline-offset: 3px; }
#sitefoot .sf-note a:hover { color: var(--txt-bright); }
.seo-static h3 { margin: 18px 0 6px; }

/* ---------- 5. Band state, shared by Now and the band pages ---------------- */
.st { display: inline-flex; align-items: center; justify-content: center; min-width: 62px; padding: 3px 8px;
  font: 600 10.5px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line-strong);
  border-radius: 4px; color: var(--dim); white-space: nowrap; }
.st[data-state="open"] { color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.st[data-state="marginal"] { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.strip { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 1px; }
.strip i { display: block; height: 14px; border-radius: 1px; background: color-mix(in srgb, var(--dim-subtle) 28%, transparent); }
.strip i[data-state="open"] { background: var(--green); }
.strip i[data-state="marginal"] { background: var(--amber); opacity: .85; }
.strip i:first-child { outline: 1.5px solid var(--txt-bright); outline-offset: 1px; }
html[data-theme="light"] .strip i[data-state="open"] { background: color-mix(in srgb, var(--green) 80%, #000); }
.strip-key { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 400 11.5px var(--mono); color: var(--dim-subtle); }
.strip-key span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px;
  background: color-mix(in srgb, var(--dim-subtle) 28%, transparent); }
.strip-key .k-open::before { background: var(--green); }
.strip-key .k-marginal::before { background: var(--amber); }

/* ---------- 6. Now ---------------------------------------------------------- */
.now-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 26px 0 34px; }
.now-kicker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font: 500 12px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.now-kicker .hero-dot { flex: none; }
.now-verdict { margin: 16px 0 0; font: 700 clamp(32px, 4.6vw, 56px)/1.04 var(--display); letter-spacing: -.035em; color: var(--txt-bright); text-wrap: balance; max-width: 18ch; }
.now-verdict em { font-style: normal; color: var(--green); }
.now-verdict em[data-state="marginal"] { color: var(--amber); }
.now-verdict em[data-state="closed"] { color: var(--dim); }
.now-next { margin: 14px 0 0; font: 500 clamp(18px, 2vw, 22px)/1.3 var(--sans); letter-spacing: -.01em; color: var(--txt); max-width: 34ch; text-wrap: balance; }
.now-why { margin: 14px 0 0; font-size: 15px; line-height: 1.55; color: var(--dim); max-width: 56ch; }
.now-why button { font: inherit; color: var(--cyan); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.now-hero .hero-globe { margin: 0; }
.now-ladder { margin-bottom: 24px; }
.ladder-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.ladder-head h2 { margin: 0; }
.ladder-grid { display: grid; }
.ladder-row, .ladder-axis {
  display: grid; grid-template-columns: 54px 82px minmax(0, 1fr) minmax(0, 250px); gap: 14px; align-items: center;
}
.ladder-axis { padding: 0 10px 6px; font: 400 10.5px var(--mono); color: var(--dim-subtle); }
.ladder-axis .ticks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ladder-row { padding: 8px 10px; border-top: 1px solid var(--line2); border-radius: 6px; color: inherit; text-decoration: none; transition: background var(--dur-1); }
.ladder-row:hover { background: var(--panel-elevated); }
.ladder-row:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.ladder-row .lb { font: 600 15px/1 var(--mono); color: var(--txt-bright); white-space: nowrap; }
.ladder-row .lt { font-size: 13px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ladder-row .lt b { color: var(--txt); font-weight: 500; }
.now-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.now-cards .panel { margin: 0; }
.now-cards .more { font: 500 12px var(--mono); color: var(--cyan); text-decoration: none; white-space: nowrap; }
.now-cards .more:hover { text-decoration: underline; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.fig-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.fig-row div { border-top: 1px solid var(--line-strong); padding-top: 8px; min-width: 0; }
.fig-row dt { font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim-subtle); }
.fig-row dd { margin: 3px 0 0; font: 500 22px/1.15 var(--mono); color: var(--txt-bright); font-variant-numeric: tabular-nums; }
.fig-row dd small { display: block; margin-top: 3px; font: 400 11.5px var(--mono); color: var(--dim-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-note { margin: 12px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--dim); }
.bcn-now { display: grid; gap: 4px; }
.bcn-now .call { font: 600 26px/1 var(--mono); color: var(--txt-bright); }
.bcn-now .where { font-size: 13.5px; color: var(--dim); }
.bcn-bar { height: 3px; margin-top: 10px; background: var(--line2); border-radius: 2px; overflow: hidden; }
.bcn-bar i { display: block; height: 100%; background: var(--cyan); transition: width .2s linear; }
.bcn-list { display: grid; gap: 0; margin-top: 12px; font: 400 12.5px var(--mono); }
.bcn-list div { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 10px; padding: 5px 0; border-top: 1px solid var(--line2); color: var(--dim); }
.bcn-list b { color: var(--txt); font-weight: 600; }
.alert-list { display: grid; gap: 10px; }
.alert-list .al { display: grid; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line2); font-size: 13px; color: var(--dim); }
.alert-list .al:first-child { border-top: 0; padding-top: 0; }
.alert-list .al p { margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.alert-list .al time { font: 400 11px var(--mono); color: var(--dim-subtle); }
@media (max-width: 1080px) {
  .now-hero { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 14px; }
  .now-hero .hero-globe { max-width: 460px; margin-inline: auto; width: 100%; }
  .now-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .ladder-row, .ladder-axis { grid-template-columns: 46px 74px minmax(0, 1fr); gap: 10px; }
  .ladder-row .lt, .ladder-axis .al { display: none; }
  .ladder-row { padding: 8px 4px; }
  .ladder-axis { padding: 0 4px 6px; }
}

/* ---------- 7. A band page -------------------------------------------------- */
.band-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.band-pills a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; font: 500 12.5px/1 var(--mono); color: var(--dim);
  border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; white-space: nowrap; transition: color var(--dur-1), border-color var(--dur-1), background var(--dur-1); }
.band-pills a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--dim-subtle) 50%, transparent); }
.band-pills a[data-state="open"]::before { background: var(--green); }
.band-pills a[data-state="marginal"]::before { background: var(--amber); }
.band-pills a:hover { color: var(--txt-bright); border-color: var(--dim); }
.band-pills a.active { color: var(--txt-bright); border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 12%, transparent); }
.band-head { display: flex; align-items: baseline; gap: 10px 18px; flex-wrap: wrap; margin-bottom: 8px; }
.band-head h1 { margin: 0; font: 700 clamp(40px, 6vw, 64px)/1 var(--display); letter-spacing: -.04em; color: var(--txt-bright); }
.band-head .range { font: 500 15px var(--mono); color: var(--dim); }
.band-profile { max-width: 68ch; margin: 0 0 22px; font-size: 16px; line-height: 1.55; color: var(--dim); }
.band-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.band-cols > div { display: grid; gap: 16px; min-width: 0; }
.band-cols .panel { margin: 0; }
@media (max-width: 1000px) { .band-cols { grid-template-columns: minmax(0, 1fr); } }
.plan-scroll { overflow-x: auto; }
.plan { min-width: 520px; display: grid; gap: 6px; }
.plan-bar { display: flex; height: 34px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line-strong); }
.plan-bar span { display: flex; align-items: center; min-width: 0; padding: 0 8px; font: 600 11px/1 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-right: 1px solid var(--bg); }
.plan-bar span:last-child { border-right: 0; }
.plan-ticks { display: flex; justify-content: space-between; font: 400 11px var(--mono); color: var(--dim-subtle); }
.plan-legend { display: grid; gap: 0; margin-top: 10px; font-size: 13px; }
.plan-legend div { display: grid; grid-template-columns: 12px 132px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line2); color: var(--dim); }
.plan-legend i { width: 10px; height: 10px; border-radius: 2px; align-self: center; }
.plan-legend .mono { color: var(--txt); font-size: 12.5px; white-space: nowrap; }
.plan-legend b { color: var(--txt); font-weight: 500; }
.freq-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.freq-list span { padding: 4px 9px; font: 400 12px var(--mono); color: var(--dim); border: 1px solid var(--line2); border-radius: 4px; white-space: nowrap; }
.freq-list b { color: var(--txt-bright); font-weight: 600; margin-right: 6px; }
.reach { display: grid; font-size: 14px; }
.reach div { display: grid; grid-template-columns: minmax(0, 1fr) 74px 84px auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line2); }
.reach div:first-child { border-top: 0; }
.reach .mono { font-size: 12.5px; color: var(--dim); white-space: nowrap; }
.reach small { display: block; font-size: 12px; color: var(--dim-subtle); }
@media (max-width: 520px) { .reach div { grid-template-columns: minmax(0, 1fr) 64px auto; } .reach .km { display: none; } }
.band-strip-axis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 6px; font: 400 10.5px var(--mono); color: var(--dim-subtle); }

/* ---------- 8. Bench and Learn indexes -------------------------------------- */
.idx-find { display: block; width: 100%; max-width: 540px; height: 46px; padding: 0 16px; margin-bottom: 26px; font: 400 16px var(--sans); color: var(--txt-bright);
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--rad-lg, 10px); }
.idx-find:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 18%, transparent); }
.idx-group { margin-bottom: 30px; }
.idx-group > h2 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 12px; font: 500 11.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim-subtle); }
.idx-group > h2 a { font: 500 12px var(--mono); letter-spacing: 0; text-transform: none; color: var(--cyan); text-decoration: none; }
.idx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.idx-card { display: grid; align-content: start; gap: 5px; padding: 15px 16px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--rad-lg, 10px);
  color: inherit; text-decoration: none; transition: border-color var(--dur-1), background var(--dur-1); min-width: 0; }
.idx-card:hover { border-color: var(--line-strong); background: var(--panel-elevated); }
.idx-card:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.idx-card .k { font: 500 11px var(--mono); letter-spacing: .06em; color: var(--cyan); }
.idx-card h3 { margin: 0; font: 600 16px/1.25 var(--sans); letter-spacing: -.01em; color: var(--txt-bright); }
.idx-card p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--dim); }
.idx-empty { color: var(--dim); }
.ready { height: 6px; margin-top: 8px; background: var(--line2); border-radius: 3px; overflow: hidden; }
.ready i { display: block; height: 100%; background: var(--cyan); border-radius: 3px; }
.idx-card .readline { font: 400 12px var(--mono); color: var(--dim-subtle); }
.idx-card .readline b { color: var(--txt); font-weight: 600; }
.learn-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .learn-grid { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  #areanav a::after, .bcn-bar i { transition: none; }
}
@media print { #areanav, .subnav, #tabbar { display: none; } }
.panel[hidden] { display: none; }
.idx-group > h2 span { color: var(--dim); }
.idx-group > h2 a { margin-left: auto; }
.band-cols .now-note a, .band-profile a { color: var(--cyan); }

/* Read by screen readers and search engines, not drawn: the plain-words topic at the head of
   each page's <h1> (#phTopic, filled by js/app.js and tools/seo-pages.mjs). */
.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
