/* Publication chrome: masthead, section bar, category filters, colophon, and the
   reader-facing state rail. Part of the Cabinhub News newsroom stylesheet set.
   Class names are contractual: frontend/app.js emits them.

   Rule this file enforces (TEAM.md §8, HEAD 15:19Z): a reader sees the source,
   the time, the category and the story. No developer vocabulary, no monospace
   uppercase labels, no second navigation row. */

/* ======================================================== masthead =====
   The Apple way: one line, one typeface, plenty of air, a hairline under it.
   The wordmark is the only thing at display size; the desk line is a quiet
   caption, not a kicker in caps. */

.masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.masthead__inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(1.1rem, 2.6vw, 1.9rem) var(--pad-r) clamp(0.75rem, 1.6vw, 1.15rem) var(--pad-l);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  flex-wrap: wrap;
}

.masthead__mark { font-weight: 400; line-height: 1; min-width: 0; }

.masthead__link {
  display: inline-flex;
  align-items: center;
  gap: 0.36em;
  min-height: var(--tap);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-brand);
  font-size: var(--fs-mark);
  letter-spacing: -0.028em;
}
/* The lockup: the mark rides at the wordmark's cap height, not at its own box size, so
   the flame's tip lands just above the capitals instead of floating in a square. The
   wordmark keeps its baseline treatment beside it. */
.masthead__glyph {
  position: relative;
  display: block;
  flex: none;
  /* Height-only: the lockup SVG is cropped to the art's own bounds (72 x 99 units), so
     giving it a square box would letterbox it and open a wide gap after the flame. */
  height: 1.34em;
  width: auto;
  margin-top: -0.12em;   /* optical: the flame's tip carries weight above the x-height */
  isolation: isolate;
}
.masthead__logo {
  display: block;
  width: auto;
  height: 100%;
}
.masthead__wordmark { display: inline-flex; align-items: baseline; gap: 0.34em; }
.masthead__cabinhub { font-weight: 600; letter-spacing: -0.03em; }
.masthead__news { font-weight: 400; color: var(--ink-soft); }
/* The lockup is lettered in Latin in BOTH editions (the zh edition translates
   the desk line and the section names, not the masthead), so it keeps the
   Latin optical tracking; the old zh-only -0.01em existed only because the
   wordmark used to inherit Songti. */

/* ------------------------------ the mark's one gesture: an ember breathing =====
   The paper's motion budget (motion.css) animates transform and opacity only, and this
   stays inside it: a soft warm glow behind the mark, never a filter or a shadow on the
   glyph, so the flame keeps its exact gradient at 2x. It breathes once on load and then
   settles; hovering or focusing the lockup starts a slow, quiet pulse. It is all scoped
   under html[data-motion="on"] (motion.js sets that after boot, and never when the reader
   asked for reduced motion), and the media query below is the belt-and-braces cut for a
   reader who switches the preference mid-session. */
.masthead__glyph::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -34%;
  border-radius: 50%;
  background: radial-gradient(circle closest-side,
    color-mix(in srgb, var(--accent) 30%, transparent), transparent 74%);
  opacity: 0;
  pointer-events: none;
}
@keyframes ember-breathe {
  0% { opacity: 0; }
  40% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes ember-pulse {
  0%, 100% { opacity: 0.18; }
  50% { opacity: 0.85; }
}
html[data-motion="on"] .masthead__glyph::before {
  animation: ember-breathe 1.6s var(--m-ease-out) 1 both;
}
html[data-motion="on"] .masthead__link:hover .masthead__glyph::before,
html[data-motion="on"] .masthead__link:focus-visible .masthead__glyph::before {
  animation: ember-pulse 2.6s var(--m-ease-in-out) infinite;
}
@media (prefers-reduced-motion: reduce) {
  .masthead__glyph::before { animation: none !important; opacity: 0 !important; }
}

/* The right side carries the desk line, the theme switch and the language
   pair. On a phone only the controls survive; a reader knows where they are. */
.masthead__side {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}
.masthead__controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.masthead__kicker {
  font-size: var(--fs-label);
  font-weight: 400;
  color: var(--ink-faint);
  letter-spacing: 0;
  margin: 0;
}

/* One language is rendered at a time (app.js sets lang on <html>); the parallel
   spans need no script and cannot flash the wrong edition. */
.only-zh { display: none; }
html[lang="zh-Hans"] .only-en { display: none; }
html[lang="zh-Hans"] .only-zh { display: inline; }

/* ============================================================= rail =====
   One reader-facing line under the masthead, and only when it matters: the
   connection dot turns accent on an error and the word beside it is said aloud
   to a screen reader. Live and loading are silent, which is correct: nothing
   is wrong and the reader has nothing to do. Everything else about the site's
   state lives in the Operations page, where an operator wants it. */

.rail {
  border-top: 1px solid var(--rule-soft);
  background: var(--paper);
  padding-top: env(safe-area-inset-top, 0px);
}

.rail__inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--pad-r) 0 var(--pad-l);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 34px;
  font-size: var(--fs-label);
  color: var(--ink-faint);
}

.rail__status { display: flex; align-items: center; gap: 0.45rem; min-width: 0; margin: 0; }

/* The clock is a real fact and stays visible but quiet; the clock is also the
   proof the feed is live, so nothing else needs to say "live". */
.rail__clock {
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

/* app.js also writes a status word ("Live API", "loading", "offline") into
   this span. Two of those three are production vocabulary; only the failure
   case is worth a reader's attention, so the word is read aloud and never
   drawn, and chrome.css draws the error state on the dot instead. */
.rail__state {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* A quiet dot: filled signal-green when live, accent on a failure, a faint
   ring while loading. No glow, no pulse ring, no badge. */
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--rule-strong);
  flex: none;
  transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.dot[data-state="live"] { background: var(--signal); border-color: var(--signal); }
.dot[data-state="fixture"] { background: var(--ion); border-color: var(--ion); }
.dot[data-state="error"] { background: var(--danger); border-color: var(--danger); }
.dot[data-state="loading"] { background: transparent; border-color: var(--rule-strong); animation: fade 1.8s var(--ease) infinite; }


/* ---- theme switch: one icon button, three states (light/dark/system) ---- */
.theme-switch { display: inline-flex; }
.theme-switch__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.theme-switch__btn svg { display: block; }
@media (hover: hover) and (pointer: fine) {
  .theme-switch__btn:hover { background: var(--paper-2); color: var(--ink); }
}
.theme-switch__btn:active { transform: scale(0.94); }

/* ---- language switch: an Apple-style segmented pair ------------------- */
.locale-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: var(--paper-2);
  border-radius: var(--r-sm);
  /* app.js builds the two buttons after the sheet parses, so this host starts
     as a 4x4 padded box and jumps to 94x48 when the EN/中文 pair lands —
     measured live 2026-11-17 at 390: `.locale-switch` w 4->94, h 4->48, the
     masthead row grew 44->48 and pushed the feed down (CLS shift 0.1361 of
     0.3561). a11y.css sizes each button to the 44px tap token; two of them
     plus the 2px gap and 2px padding is the box reserved here. */
  min-width: calc(var(--tap) * 2 + 6px);
  min-height: calc(var(--tap) + 4px);
}
.locale-switch__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0;
  min-width: 36px;
  min-height: 26px;
  padding: 0 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--r-xs);
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.locale-switch__btn[aria-pressed="true"] {
  background: var(--canvas);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--rule);
}
@media (hover: hover) and (pointer: fine) {
  .locale-switch__btn:hover { color: var(--ink); }
}

/* ========================================================== toolbar =====
   One navigation row: three routes as a quiet segmented control, then the
   search field. Not tabs over a second row of numbered categories. */

/* The bar's fill (solid or glass) is decided in one place at the end of this
   file, after both bars exist — see "the sticky stack's material". Here it
   only lays itself out. */
.toolbar {
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 6;
}

.toolbar__inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0.5rem var(--pad-r) 0.5rem var(--pad-l);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  flex-wrap: wrap;
  min-height: 52px;
}

.toolbar__nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: var(--paper-2);
  border-radius: var(--r-md);
  flex-wrap: wrap;
}

.toolbar__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 0.85rem;
  font-size: var(--fs-meta);
  font-weight: 500;
  letter-spacing: -0.004em;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--r-sm);
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.toolbar__link[aria-current="page"] {
  background: var(--canvas);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--rule);
}
@media (hover: hover) and (pointer: fine) {
  .toolbar__link:hover { color: var(--ink); }
}

/* The operator door is not a reader surface. app.js sets .is-public-site on the
   origin root (and only there) because the public mirror at /v1/site has no
   /health, /items or /runs: measured 2026-11-10, /v1/site/health answers 404,
   so a reader who followed the live "Newsroom" link landed on a dark page
   reading "Health unavailable /v1/site/health". The comment in app.js promised
   this hid the operator view from the chrome; no rule consumed the class, so
   the link shipped in both the toolbar and the colophon. The authenticated demo
   at /demo never gets the class and keeps its door. */
html.is-public-site .toolbar__link[data-nav="ops"] { display: none; }
html.is-public-site .colophon__link[href="#/ops"],
html.is-public-site .colophon__link[href="#/ops"] + .colophon__sep { display: none; }

/* ---- search: one rounded field with a magnifier ----------------------- */
.searchbar {
  position: relative;
  display: flex;
  align-items: center;
  /* js/palette.js adds `.searchbar--palette` after the sheet is parsed, which
     used to widen this box 17rem -> 20rem (measured live 2026-11-17 at 1440:
     the toolbar's links slid 94px left and the form 48px, a CLS shift of 0.0464
     inside a 0.574 total). Reserve the palette width from the first parse so
     the class add moves nothing. */
  flex: 0 1 20rem;
  min-width: 0;
}
.searchbar::before {
  content: "";
  position: absolute;
  left: 0.7rem;
  top: 50%;
  width: 13px;
  height: 13px;
  transform: translateY(-50%);
  pointer-events: none;
  background-color: var(--ink-faint);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' d='M7 12.5A5.5 5.5 0 1 0 7 1.5a5.5 5.5 0 0 0 0 11Zm4.2-1.3 3.3 3.3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' d='M7 12.5A5.5 5.5 0 1 0 7 1.5a5.5 5.5 0 0 0 0 11Zm4.2-1.3 3.3 3.3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.searchbar__input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 36px;
  background: var(--paper-2);
  /* 1.4.11: a fill difference of 1.09:1 is not a boundary. The field needs a
     real edge that reads as an input on both themes. */
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--fs-meta);
  /* The right inset is the ⌘K keycap the palette module puts INSIDE this
     field (js/palette.js: .cbn-palette-trigger--inline). Reserved here so the
     placeholder and a typed query never run under it. */
  padding: 0.3rem 3.4rem 0.3rem 2rem;
  appearance: none;
  -webkit-appearance: none;
  transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
/* One search control, not two: the field and its chord hint are one box. The
   toolbar used to carry a ⌘K button beside this field (measured 1440: two
   border-boxes, 76px + 272px, both doors to the same palette). */
.searchbar--palette { flex: 0 1 20rem; }
.searchbar__input::placeholder { color: var(--ink-faint); opacity: 1; }
.searchbar__input::-webkit-search-cancel-button { cursor: pointer; }
.searchbar__input:focus {
  background: var(--canvas);
  border-color: var(--rule-strong);
  outline: none;
}
.searchbar__input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.searchbar__btn { display: none; }

/* Inline suggestions under the toolbar field (js/search_suggest.js). The field
   is a combobox; this is its listbox. It overlays, never pushes the toolbar. */
.search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  max-height: 60vh;
  overflow-y: auto;
}
.search-suggest[hidden] { display: none; }
.search-suggest__option {
  padding: 0.5rem 0.7rem;
  border-radius: var(--r-sm);
  font-size: var(--fs-meta);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-suggest__option[aria-selected="true"],
.search-suggest__option:hover { background: var(--paper-2); }

/* ========================================================= filters =====
   One quiet scrollable row of plain words. The active one is simply darker
   and heavier. No numbers, no pills, no counts-in-circles. */

.filters {
  position: sticky;
  top: 52px;
  z-index: 5;
  border-bottom: 1px solid var(--rule);
}

.filters__inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--pad-r) 0 var(--pad-l);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.filters__scroller {
  display: flex;
  gap: 0.15rem;
  /* The chips are injected by app.js after the sheet is parsed, so before they
     arrive the strip is a 1px line and the row grows ~44px when they land —
     measured live 2026-11-17 at 390: `.filters` 11px -> 55px, pushing `main`
     down 61px (CLS shift 0.7049 of 0.8507). Reserving the chip row's own box
     (tap + its 0.3rem vertical padding) means filling it moves nothing. */
  min-height: calc(var(--tap) + 0.6rem);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  margin-right: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  /* A scroll container clips at its padding box, so a chip flush with the
     edge lost the outer half of its focus ring (measured: the first chip at
     rest, 2px ring at 2px offset, left stroke cut). 6px of inline padding
     gives the 4px ring 2px of slack; the matching negative start margin
     keeps the strip on the page edge. scroll-margin (here, so it scales with
     the strip) keeps a chip revealed by the motion.js focus handler clear of
     the 20px fade at the right edge, where its ring would be washed out. */
  padding: 0.3rem 6px;
  margin-left: -6px;
  mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent 100%);
}
.filters__scroller::-webkit-scrollbar { display: none; }
/* Room for the 20px fade above, so a revealed chip's ring is never under it. */
.filters__scroller > .chip { scroll-margin-inline: 24px; }

.chip {
  appearance: none;
  background: none;
  border: 0;
  color: var(--ink-faint);
  font-family: var(--font-ui);
  font-size: var(--fs-meta);
  font-weight: 400;
  letter-spacing: -0.004em;
  min-height: 36px;
  padding: 0 0.7rem;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
  flex: none;
  border-radius: var(--r-sm);
  transition: color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}
.chip:first-child { padding-left: 0.35rem; }
/* A chip is an <a> now (it links to that subject's own page), so it must not inherit the
   browser's link colour or underline: the strip's own colour states still apply. */
a.chip { color: var(--ink-faint); text-decoration: none; }
.chip[aria-pressed="true"],
.chip[aria-current="page"] { color: var(--ink); font-weight: 600; background: var(--paper-2); }
@media (hover: hover) and (pointer: fine) {
  .chip:hover { color: var(--ink); background: var(--paper-2); }
}
html[lang="zh-Hans"] .chip { letter-spacing: 0; }

/* The result count is a reader's fact, not a system readout. */
.filters__count {
  font-size: var(--fs-label);
  color: var(--ink-faint);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Under 560 the strip stays one row and scrolls: wrapping it into two rows
   cost ~50px of the first screen and made the page look like a form, and the
   34px chips it carried broke the 44px Ember target. The fade at the right
   edge is the affordance that says there is more. */
@media (max-width: 560px) {
  .chip { min-height: var(--tap); padding: 0 0.8rem; }
}

@media (max-width: 640px) {
  /* The nav has more sections than a phone's width. Each link is `white-space: nowrap`
     and 44px tall, so a row that only wraps still leaves the last links outside the
     viewport (measured at 390: a link ended at x=414 and the search button collided).
     Scroll the nav as a whole instead of clipping the reader's way to a section. */
  .toolbar__nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    /* A flex item refuses to shrink below its content's width, so `overflow-x: auto`
       alone cannot create the scroll container: `min-width: 0` is what lets the row
       actually be as wide as the phone instead of as wide as the whole nav. */
    min-width: 0;
    max-width: 100%;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  .toolbar__nav::-webkit-scrollbar { display: none; }
  .toolbar__nav > .toolbar__link { flex: 0 0 auto; }
  /* Without a signal, a nav that ends mid-word reads as broken rather than scrollable.
     The mask fades the trailing edge so the cut is legible as "there is more". */
  .toolbar__nav {
    mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent 100%);
  }
  /* motion.js sets data-scrolled-end when the strip is scrolled to its end, so
     the fade stops promising content that is not there. Measured 2026-11-26:
     the mask was still painted at scrollLeft 14, the end of the strip. */
  .toolbar__nav[data-scrolled-end] {
    mask-image: none;
    -webkit-mask-image: none;
  }
  /* Same reason as .filters__scroller > .chip: a link revealed by the focus
     handler must clear the 22px fade, or its ring is washed out under it. */
  .toolbar__nav > .toolbar__link { scroll-margin-inline: 26px; }
}

/* ========================================================= colophon =====
   A footer that says who compiled this and how, once, in a reader's words. */

.colophon {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  border-top: 1px solid var(--rule);
  background: var(--paper);
}

.colophon__inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(1.4rem, 3vw, 2.2rem) var(--pad-r) calc(clamp(1.6rem, 3vw, 2.4rem) + var(--pad-b)) var(--pad-l);
  display: grid;
  gap: 0.7rem;
}

.colophon__note {
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.colophon__fine {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: var(--fs-label);
  color: var(--ink-faint);
}

.colophon__link {
  color: var(--ink-soft);
  /* 1.4.1: a 1.46:1 hairline cannot be the only thing saying "link". */
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--rule-strong);
}
@media (hover: hover) and (pointer: fine) {
  .colophon__link:hover { color: var(--ink); border-bottom-color: var(--ink-faint); }
}

/* The separator is punctuation a reader sees, so it answers to 1.4.3 like the
   two items either side of it: --rule is a hairline colour (#D6CBC2, 1.46:1 on
   --paper) and cannot carry a glyph. --ink-faint is the faintest text token and
   still clears AA at this size. */
.colophon__sep { color: var(--ink-faint); }
.colophon__meta { display: none; }

/* The old multi-column colophon is gone from the markup; these classes stay
   defined so a stale build cannot render as unstyled text. */
.colophon__cols { display: none; }

/* ====================================================== shell / boot ==== */

.shell {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(1rem, 2.2vw, 1.6rem) var(--pad-r) clamp(2rem, 5vw, 3.5rem) var(--pad-l);
}

.boot {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 2.5rem 0;
  font-size: var(--fs-meta);
  color: var(--ink-faint);
  /* The first paint, before app.js swaps this line for the skeleton. It is one
     line tall, so the colophon was visible at y=660 of an 844 screen and then
     jumped off-screen when the skeleton (now 100svh) mounted — measured live
     2026-11-17 at 390: `footer.colophon` y 660->0, 0.1495 of a residual 0.2225
     CLS. Reserving the same first screen here means the colophon is below the
     fold from the first frame and never moves inside the viewport. */
  min-height: 100svh;
}
.boot__line {
  width: 22px;
  height: 2px;
  background: var(--accent);
  animation: fade 1.4s var(--ease) infinite;
}

.noscript {
  max-width: var(--measure);
  margin: 1.5rem auto;
  padding: 0 var(--pad-r) 0 var(--pad-l);
  font-size: var(--fs-body);
  color: var(--ink-soft);
}

@keyframes fade { 0%, 100% { opacity: 1; } 50% { opacity: 0.28; } }

/* ==================================== the sticky stack's material ======
   ONE place decides how the two sticky bars are filled, and it is here rather
   than beside each bar because these are the same decision and source order
   between them silently wins: `.filters` is declared ~130 lines below
   `.toolbar`, and a per-bar rule plus an `@supports` override above it measured
   as BREADTH-FIRST — the toolbar came out at 86% and the filters row solid in
   the same render.

     default      --bar-solid. The bar is opaque paper.
     @supports    --bar, the same paper at 92% (tokens.css), over a 20px
                  saturating blur.
                  The blur has always been ASKED for here but was asked for
                  over an opaque fill, so it showed nothing; and a translucent
                  fill WITHOUT a working blur is worse than either, because the
                  scrolling feed then reads through the navigation as
                  competing text. Translucency is therefore opt-in on the
                  FEATURE, never assumed.
     reduced-     the reader asked the OS to stop frosting glass, so the solid
     transparency bar comes back. iOS does the same to its own bars.
     forced-      the system paints the palette and discards author colour; a
     colors       translucent fill would resolve to Canvas and the blur would
                  sample forced colours. Flat. */
.toolbar, .filters {
  background: var(--bar-solid);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .toolbar, .filters {
    background: var(--bar);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    /* A floating glass bar needs a lit near edge and a faint contact shadow or
       it reads as a hole cut in the page, not a pane over it. --shadow-1 is the
       tightest tier (tokens.css) and it lands only on this chrome — the
       newsprint page itself stays hairline-only (DESIGN.md §7). The solid and
       reduced-transparency arms below drop it: a flat paper bar does not float. */
    box-shadow: var(--shadow-1);
  }
}
@media (prefers-reduced-transparency: reduce) {
  .toolbar, .filters {
    background: var(--bar-solid);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
@media (forced-colors: active) {
  .toolbar, .filters {
    background: Canvas;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
