/* Loading, empty, error and offline — the four states a reader can land in.
   Part of the Cabinhub News newsroom stylesheet set (see frontend/css/README).
   Class names are contractual: frontend/app.js emits them. js/states.js (N3-owned)
   only ADDS a route class and its own text nodes; nothing here renames a class.

   What the references said, and what was taken from each (read 2026-11-08):
   - Apple HIG, Loading: "Show something as soon as possible... consider showing
     placeholder text, graphics, or animations as content loads, replacing these
     elements as content becomes available."
     https://developer.apple.com/design/human-interface-guidelines/loading
     -> the skeleton is the page's own shape, painted immediately, replaced in place.
   - NN/g, Skeleton Screens 101: the placeholder must mimic the layout of the page
     it stands for; a frame-only skeleton is not recommended because a mostly blank
     screen reads as "not working"; a moving shimmer can distract and cause
     accessibility problems.
     https://www.nngroup.com/articles/skeleton-screens/
     -> same grid, same line lengths as the real page; motion is a slow opacity
       breath, never a sweep, and it stops for reduced-motion readers.
   - GOV.UK, "There is a problem with the service" pages: no jargon ("500", "bad
     request", "we are experiencing technical difficulties"), say what to do next.
     https://design-system.service.gov.uk/patterns/problem-with-the-service-pages/
     -> the error state is a sentence in a reader's words and one retry.
   - FT Origami o-message: a notice informs; an alert is feedback and carries an
     icon; a message is not a card.
     https://registry.origami.ft.com/components/o-message
     -> no frames, no fills, no icons: a state is a few lines of text on the page.
   - Apple Newsroom, https://www.apple.com/newsroom/ (live document): the lead is a
     16:9 plate, a one-line kicker, a two-to-three-line headline at a fixed measure,
     then a deck. The feed skeleton copies that box order and those measures.
   - Reuters site search (archived):
     https://web.archive.org/web/2024/https://www.reuters.com/site-search/?query=tesla
     a zero-result search answers with a short sentence plus concrete suggestions
     ("Check spelling of all words / try different words..."), never a status code.
   - FT site search (archived):
     https://web.archive.org/web/2024/https://www.ft.com/search?q=tesla
     the result count is a plain sentence above a one-column list, not a badge.
   Both live pages answered a bot with a CAPTCHA (FT: "Security Verification",
   Bloomberg: "Are you a robot?"), so the archived documents are cited instead.
   zh-Hans references read live: caixinglobal.com and cls.cn both answer an empty
   search with a plain sentence and a way back, no codes. */

/* ============================================================ states === */

/* A state is a message, not a card: no rule, no fill, no shadow. One filled
   control per surface (the retry); everything else is a text link. */
.state {
  max-width: var(--measure);
  padding: var(--sp-6) 0 var(--sp-5);
}
/* The mark is the one glyph that tints on a state, and at 17px a lone em dash
   read as a stray rule rather than an accent (measured 2026-11-10 on the zh
   search-empty shot, 390 and 1440: a 17px box with the dash's ink floating
   inside it). Small caps of the brand colour at label size make it deliberate:
   it is the same accent bar the feed head draws, at type scale. */
.state__mark {
  font-size: var(--fs-label);
  line-height: 1;
  color: var(--accent);
  margin-bottom: var(--sp-3);
  /* The dash was fixed for looking like a stray rule; the "!" had the same
     problem from the other side. MEASURED 2026-11-14 at 390 and 1440 (hk2x,
     chromium-1254): the error card's mark is a single 17px "!" at weight 400 on
     its own text line, and on the shot it reads as a thin vertical bar between
     the watchlist strip and the headline — a reader cannot tell it from a
     borderline, a divider, or a broken icon. A dash reads as punctuation; an
     exclamation point at that size reads as a rendering fault.
     So the mark gets a BOX instead of a bigger glyph: a 24px square, ink
     centred, drawn with the same 1px --rule the page uses for every other
     edge. It stays a stamp, not a badge — no fill, no colour beyond the ink
     already here — and the box carries 24px of height over the 13px text line
     it replaces, less than the 12px gap below it, so the card cannot gain a
     full line: MEASURED 2026-11-14 at 390, the state card went 321.5 -> 335.0
     (+13.5px, 4.2%) and at 1440 282.7 -> 296.2 (+13.5px). The first cut used
     28px and cost 15.5px; 24px is the size that stops the mark reading as a bar
     without paying for a new row. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 24px;
  block-size: 24px;
  border: 1px solid var(--rule);
}
/* An error is not destructive, so the mark stays quiet: never red, never a
   badge. Only a genuinely destructive action may colour anything. */
.state--error .state__mark { color: var(--ink-soft); }
.state__title {
  font-family: var(--font-display);
  font-size: var(--fs-sub);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--sp-2);
}
.state__body {
  color: var(--ink-soft);
  font-size: var(--fs-body);
  line-height: 1.55;
}
/* The line js/states.js writes when the state needs a context the shared
   dictionary cannot carry (an empty desk and an empty category are not the same
   sentence; an outage and an offline reader are not the same situation). */
.states-lede,
.states-hint {
  color: var(--ink-soft);
  font-size: var(--fs-body);
  line-height: 1.55;
  max-width: var(--measure);
  text-wrap: pretty;
}
.states-hint {
  margin-top: var(--sp-3);
  font-size: var(--fs-small);
  color: var(--ink-faint);
}
/* "What still works": the calm half of the offline state. It is a list of two
   things a reader can still do, not a warning. */
.states-works {
  margin: var(--sp-4) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--sp-2);
  color: var(--ink-soft);
  font-size: var(--fs-small);
  line-height: 1.55;
  max-width: var(--measure);
}
.states-works li {
  position: relative;
  padding-left: var(--sp-4);
}
.states-works li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 1px;
  background: var(--accent);
}
.states-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2) var(--sp-5);
  margin-top: var(--sp-4);
}
/* describeError() can carry a status, a request URL or a console hint. It is
   opt-in (?debug=1 and the operator view) and stays the quiet third line: same
   face as the page, faint, no box, so a technical string can never read as an
   alarm to a reader. */
.state__detail {
  margin: var(--sp-3) 0 0;
  font-family: var(--font-ui);
  font-size: var(--fs-meta);
  line-height: 1.55;
  color: var(--ink-faint);
  background: none;
  border: 0;
  padding: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.state__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}

/* The single filled control on any surface. */
.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: var(--tap);
  padding: 0 var(--sp-5);
  border: 0;
  border-radius: var(--r-md);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease);
}
/* A secondary action is a plain text link, never a second button. */
.button--ghost {
  padding: 0;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--accent-hover); }
  .button--ghost:hover { background: transparent; color: var(--ink); }
}
.button:active { background: var(--accent-press); }
.button--ghost:active { background: transparent; color: var(--ink); }
/* A disabled control is visibly inactive. The one place a `.button` ships
   disabled is the search pager: app.js sets `more.disabled = state.search.more`
   and relabels it "Loading more…" while the next page is in flight. With no rule
   here that button stayed pixel-identical to the live one (same accent fill,
   same pointer cursor), so on a slow link the control a reader had just pressed
   read as dead rather than busy. */
.button:disabled {
  cursor: progress;
  opacity: 0.55;
}
/* base.css gives every focus ring the small radius. Keep the control's own
   shape while it is focused, so the button does not visibly shrink. */
.button:focus-visible { border-radius: var(--r-md); }

/* ========================================================== skeleton === */

/* Quiet bars on the page ground: no frames, no borders, no second colour. The
   pulse is opacity, not a gradient sweep: a sweep is a gradient, and the
   newsroom allows none.

   The skeleton is the page's own geometry, measured off the rendered page at
   390 and 1440 in both locales and both themes, and then reproduced here — the
   same grid, the same plate, the same line boxes:

     feed      .feed grid 1.9fr / 1.1fr / minmax(17rem,21rem), column gap
               clamp(1.4rem,2.2vw,2.2rem); a .feed-head line; a lead spanning
               columns 1-2 with a 16:9 plate, a 1.55fr/1fr text pair, a 20ch
               headline at --fs-lead/1.12 and a 58ch deck; a rail of three
               cards at 21rem.
     article   a 44px back link; a head capped at 44rem with a 13px kicker, a
               22ch headline at --fs-detail/1.1 and a --measure-deck deck; the
               hero at the full 16:9 measure; prose at the reading measure.
     search    a header line, then rows of meta, headline and snippet with a
               hairline between them.
     edition   a head capped at 60rem (day, 24ch headline, summary, counts
               rule), then entries in .feed__digest-grid's 1/2/3 columns.

   Two rules keep the promise honest:
   1. A bar is never wider than the measure of the text it stands for, so it
      cannot promise a line the page will never render.
   2. A bar rides inside the line box of the line it replaces: the bar is
      0.62em of that font size and the rest of the leading becomes its bottom
      margin, plus an explicit --gap where the real element has a margin. A
      stack of bars therefore has the height of the text it replaces. */
.skeleton {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  background: var(--paper);
  min-width: 0;
  /* The bars draw the first ~380px of the page, but the feed they stand in for
     is ~5000px at 390. The colophon therefore sat INSIDE the first screen while
     the skeleton showed and was flung far below it when the feed painted —
     measured live 2026-11-17 at 390: `footer.colophon` y 667->0, a shift of
     0.7559 of the 0.8507 total, and the single largest source left after the
     shell reservations. Reserving one screen keeps the colophon below the fold
     in both states, so it never moves inside the viewport. Content below the
     first screen may grow freely: that is not CLS. */
  min-height: 100svh;
}
.skeleton__block {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-content: start;
  background: var(--paper);
  border: 0;
  padding: 0;
  min-width: 0;
}
/* A column contains its own leading. Without this the last bar's bottom margin
   collapses through the end of the block, the next row starts one descender
   early, and the foot rule sits ~15px too high. The blocks are grid containers
   already, so their children's margins cannot collapse. */
.skeleton__col { display: flow-root; }

.skeleton__line {
  --lh: 1.5;
  height: 0.62em;
  margin-bottom: calc((var(--lh) - 0.62) * 1em + var(--gap, 0px));
  background: var(--paper-2);
  border-radius: var(--r-sm);
  /* Four motion steps: slow enough to read as breathing, not as a progress bar. */
  animation: skeleton-breathe calc(var(--dur-3) * 4) var(--ease) infinite;
}
/* No last-child exception: the bar keeps the leading of the line it replaces
   even when it ends the group, because the real text's line box takes that
   space too. Dropping it here is what pulled the foot rule 15px up. */

@keyframes skeleton-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.62; }
}

/* A bar's NAME is the thing it stands for (.skeleton__line--head is a
   headline). The name carries the metrics; the index (data-n) lets a stack be
   trimmed at a width where the same text wraps into fewer lines. */
.skeleton__line--label,
.skeleton__line--meta,
.skeleton__line--kicker,
.skeleton__line--day,
.skeleton__line--counts,
.skeleton__line--foot,
.skeleton__line--snippet {
  font-size: var(--fs-label);
}
.skeleton__line--head { font-size: var(--fs-title); --lh: 1.3; }
.skeleton__line--deck { font-size: var(--fs-small); --lh: 1.7; }
.skeleton__line--body { font-size: var(--fs-body); --lh: 1.72; }
.skeleton__line--bullet { font-size: var(--fs-label); --lh: 1.7; }

/* ------------------------------------------------ the feed skeleton ----
   Same grid and same gap as .feed (cards.css) and the same three-row hold as
   .feed__side: the rail cards stack under each other, and the lead spans the
   columns they sit beside. */
/* .feed's six named rows exist at every width; copying them (with the empty
   "secondary / river / compact" rows the page names but does not fill today)
   keeps every gap and therefore every vertical position identical. */
.skeleton--feed {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "head"
    "lead"
    "e2"
    "e3"
    "e4"
    "rail"
    "more";
  row-gap: clamp(1.1rem, 2.2vw, 1.8rem);
  column-gap: 0;
  align-items: start;
}
.skeleton--feed .skeleton__head { grid-area: head; }
.skeleton--feed .skeleton__block--lead { grid-area: lead; }
.skeleton--feed .skeleton__rail { grid-area: rail; }
.skeleton__more {
  grid-area: more;
  /* .feed__digest: clamp(0.4rem,1.2vw,0.8rem) above, a hairline, then --sp-2 */
  margin-top: clamp(0.4rem, 1.2vw, 0.8rem);
  border-top: 1px solid var(--rule);
  padding-top: var(--sp-2);
}
.skeleton__head {
  padding: 0 0 8px;
  /* The page's edition line (.feed-head) is a sibling BEFORE .feed, so the
     gap under it is clamp(0.9rem,2vw,1.4rem) and no grid row gap. In the
     skeleton it is a row, so that row gap is taken back out here: otherwise
     the whole page sits one 17.6-28.8px gap low while it loads. */
  margin-bottom: calc(clamp(0.9rem, 2vw, 1.4rem) - clamp(1.1rem, 2.2vw, 1.8rem));
  border-bottom: 1px solid var(--rule);
}
/* The header's line box is the page's own: .feed-head is one 13px note line on
   a 19.5px line, 8px of padding, a hairline, then clamp(0.9rem,2vw,1.4rem)
   under it. The bar keeps its leading as margin so the header measures the
   same 51px at 1440 and 46 at 390 before and after the stories arrive. */
.skeleton__head .skeleton__line {
  width: 22%;
  /* keep the leading this bar removes, so the header keeps its 28.5px height
     (the page's .feed-head is 13px on a 19.5px line, 8px of padding and a
     hairline) even though it is the only line in its block */
  margin-bottom: calc((1.5 - 0.62) * 1em);
}

/* .article--lead is 0 0 1.1rem with a rule under it; the block's own bottom
   padding is that 17.6px, and the foot's leading is the last thing inside it. */
/* The note above a list (.feed-note--block): one 22px sentence line, 12px
   under it. It is not the front page's ruled edition line, so it carries no
   rule and no label metrics. */
.skeleton__note { min-height: 22px; margin-bottom: 12px; }
.skeleton__note .skeleton__line { width: 46%; margin-bottom: 0; }

.skeleton--feed .skeleton__block--lead { padding-bottom: 17.6px; border-bottom: 1px solid var(--rule); }
/* the plate — figure.thumb--lead: 16:9, 16px under it */
.skeleton--feed .skeleton__block--lead::before {
  content: "";
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 1rem;
  background: var(--paper-2);
}
.skeleton--feed .skeleton__col--text .skeleton__line--meta { width: 60%; --gap: 8px; }
/* headline — .article__title: --fs-lead / 1.12 at a 20ch measure, 8px under.
   Scoped to the text column: the rail's cards carry the same bar NAMES at
   their own sizes, and a shared rule here was sizing their headlines at 40px. */
.skeleton--feed .skeleton__col--text .skeleton__line--head { font-size: var(--fs-lead); --lh: 1.12; width: 100%; }
.skeleton--feed .skeleton__col--text .skeleton__line--head[data-n="5"] { width: 62%; --gap: 8px; }
/* deck — .article__deck: --fs-small / 1.7 at 58ch, 9.6px under */
.skeleton--feed .skeleton__col--text .skeleton__line--deck { width: 100%; }
.skeleton--feed .skeleton__col--text .skeleton__line--deck[data-n="3"] { width: 58%; --gap: 9.6px; }
/* foot — .article__foot: 13px over a hairline, 9.6px above and below it */
.skeleton--feed .skeleton__line--foot {
  width: 30%;
  margin-top: calc(9.6px + 1px);
  padding-top: 9.6px;
  border-top: 1px solid var(--rule);
  border-radius: 0;
}
@media (max-width: 899px) {
  /* On a phone the headline wraps into three lines, so the extra head bars are
     not part of the shape; the key points are, below the deck and full width
     (feed.css only moves them into a second column at 900px). */
  .skeleton--feed .skeleton__col--text .skeleton__line--head[data-n="4"],
  .skeleton--feed .skeleton__col--text .skeleton__line--head[data-n="5"] { display: none; }
}

/* the key points — .article__bullets: a list of three, 0.42rem apart */
.skeleton__points { display: block; }
.skeleton__point + .skeleton__point { margin-top: 0.42rem; }
@media (max-width: 899px) {
  /* A phone sets the same three sentences in 2 + 2 + 3 lines; the bars that
     the narrower column would not use are dropped rather than left to promise
     a longer list than the story has. */
  .skeleton__point:nth-child(1) .skeleton__line--bullet:nth-child(n+3),
  .skeleton__point:nth-child(2) .skeleton__line--bullet:nth-child(n+3),
  .skeleton__point:nth-child(3) .skeleton__line--bullet:nth-child(n+4) { display: none; }
}

/* the rail — .feed__side: a .section-head line, then three cards, each with
   .card's padding and hairline */
.skeleton__rail { min-width: 0; }
/* .section-head is 28px: a 20px line box over 8px of padding. The bar keeps
   that box so the first card starts at the page's own 432. */
.skeleton__railhead { min-height: 28px; padding: 0 0 8px; }
.skeleton__railhead .skeleton__line { width: 34%; margin-bottom: 0; }
.skeleton__card { padding: 12.8px 0 13.6px; border-top: 1px solid var(--rule-soft); }
.skeleton__card:first-child { border-top: 0; padding-top: 12.8px; }
.skeleton__card .skeleton__line--label { width: 46%; --gap: 4px; }
.skeleton__card .skeleton__line--head { width: 100%; font-size: var(--fs-title); --lh: 1.3; }
.skeleton__card .skeleton__line--head[data-n="2"] { --gap: 4.8px; }
/* The rail card draws no standfirst bar: the loaded rail hides its deck
   (feed.css `.feed__side .card__deck { display: none }`), and a skeleton that
   promised one was ~2x the loaded card height. The deck rules that styled that
   bar are gone with it. js/states.js SHAPES.feed.cards carries the same fact. */

/* the "More stories" list — .feed__digest-head plus .feed__digest-grid: one
   line over entries that are meta + headline only (no deck, no plate on the
   phone; a 96px square at the right edge from 1080px, which does not change
   the text measure). Measured entries: 125px at 1440 and 154 at 390. */
.skeleton__more { grid-area: more; }
.skeleton__morehead { min-height: 20px; padding: 0; margin-bottom: var(--sp-2); }
.skeleton__morehead .skeleton__line { width: 12%; --gap: 8px; }
.skeleton__moregrid { display: grid; grid-template-columns: minmax(0, 1fr); }
.skeleton__item { padding: 9.6px 0 8px; border-top: 1px solid var(--rule-soft); }
.skeleton__item .skeleton__line--meta { width: 58%; --gap: 1.6px; }
.skeleton__item .skeleton__line--head { font-size: var(--fs-label); --lh: 1.35; width: 100%; }
.skeleton__item .skeleton__line--head[data-n="4"] { width: 64%; }
@media (min-width: 640px) {
  .skeleton__moregrid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1rem, 2.4vw, 2rem); }
}
@media (min-width: 1080px) {
  .skeleton__moregrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* On a phone the lead is one flow: plate, meta, headline, deck, key points,
   foot — exactly the order .article--lead renders. */
@media (max-width: 899px) {
  .skeleton--feed .skeleton__col--points { margin-top: 13.6px; }
  .skeleton--feed .skeleton__point:first-child .skeleton__line--bullet[data-n="1"] {
    margin-top: 1px;
    padding-top: 11.2px;
    border-top: 1px solid var(--rule-soft);
    border-radius: 0;
  }
}

@media (min-width: 900px) {
  /* The live .feed is cards.css's three-column grid — 1.9fr, 1.1fr, and the
     rail at minmax(17rem,21rem) — with grid areas "lead lead rail". At 1440
     those columns are 405.7 / 234.9 / 336 with 31.68 between, so the lead is
     672.3 wide and the rail's text starts at 931 (the rail's own 1.8vw
     padding). The skeleton stands on exactly that grid; nothing is rounded to
     two columns, which would move one edge by ~2px at every width. */
  .skeleton--feed {
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1.1fr) minmax(17rem, 21rem);
    /* .feed's own row rhythm: row-gap clamp(1.1rem,2.2vw,1.8rem), and the four
       rows its grid names below the lead (secondary, river, compact) exist as
       empty rows that still spend a gap each. Copying the areas keeps the
       "More stories" list on the page's row instead of a hand-computed offset. */
    grid-template-areas:
      "head head head"
      "lead lead rail"
      "e2 e2 e2"
      "e3 e3 e3"
      "e4 e4 e4"
      "more more more";
    row-gap: clamp(1.1rem, 2.2vw, 1.8rem);
    column-gap: clamp(1.4rem, 2.2vw, 2.2rem);
    align-items: start;
  }
  .skeleton--feed .skeleton__head { grid-area: head; }
  .skeleton--feed .skeleton__block--lead { grid-area: lead; }
  .skeleton--feed .skeleton__rail {
    grid-area: rail;
    align-self: start;
    /* the rail's own hairline and inner padding, at its own edge */
    border-left: 1px solid var(--rule-soft);
    padding-left: clamp(1rem, 1.8vw, 1.6rem);
  }
  /* the lead's text pair — .article--lead > div in feed.css: 1.55fr / 1fr, the
     story in column 1, its key points in column 2, the foot across both. */
  .skeleton--feed .skeleton__block--lead {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    column-gap: clamp(1.5rem, 3.4vw, 3rem);
    align-items: start;
  }
  .skeleton--feed .skeleton__block--lead::before { grid-column: 1 / -1; }
  .skeleton__col--text { grid-column: 1; min-width: 0; }
  .skeleton__col--points { grid-column: 2; min-width: 0; margin-top: 0.35rem; }
  .skeleton__col--foot { grid-column: 1 / -1; min-width: 0; }
  /* the key points — .article__bullets: a hairline over the list, 13px / 1.7 */
  .skeleton--feed .skeleton__line--bullet { width: 92%; }
  .skeleton--feed .skeleton__point:first-child .skeleton__line--bullet[data-n="1"] {
    margin-top: 1px;
    padding-top: 11.2px;
    border-top: 1px solid var(--rule-soft);
    border-radius: 0;
  }
  .skeleton--feed .skeleton__point:nth-child(3) .skeleton__line--bullet[data-n="5"] { width: 70%; }
}

/* ---------------------------------------------- the detail skeleton ----
   The article is one column until 960px and a 1.7fr / 1fr pair after it
   (detail.css .detail__body). The head is capped at 44rem and centred in no
   column; the hero is the full measure; the prose stays in the wide column. */
.skeleton__back { height: 44px; display: flex; align-items: center; margin-bottom: 9.6px; }
.skeleton__back .skeleton__line { width: 82px; margin: 0; }
.skeleton__back { width: 82px; }
.skeleton--detail .skeleton__block--lead {
  max-width: 44rem;
  padding-bottom: 0;
  border-bottom: 0;
  margin-bottom: 27.2px;
}
/* .detail__head draws its rule in ::after, 14.4px under the deck, and the
   header with a hero above it drops its own border (detail.css :has). The
   skeleton draws the same rule the same distance down, so the photograph
   arrives on the line the skeleton promised. */
.skeleton--detail .skeleton__block--lead::after {
  content: "";
  display: block;
  height: 20px;
  margin-top: 14.4px;
  border-top: 1px solid var(--rule);
  box-sizing: border-box;
}
.skeleton--detail .skeleton__line--kicker { width: 30%; --gap: 8.8px; }
/* .detail__title: --fs-detail / 1.1 at 22ch, 9.6px under */
.skeleton--detail .skeleton__line--head {
  font-size: var(--fs-detail);
  --lh: 1.1;
  width: 100%;
  /* .detail__title's 22ch measure is 484px at the 44px face and 308 at 28px;
     22ch in this bar's face would be 611px, so the measure is stated in em
     (11em = 22ch of the display face at its own size). */
  max-width: 11em;
}
.skeleton--detail .skeleton__line--head[data-n="4"] { width: 56%; --gap: 9.6px; }
/* .detail__deck: --fs-deck / 1.6 at --measure-deck */
.skeleton--detail .skeleton__line--deck { font-size: var(--fs-deck); --lh: 1.6; width: 100%; max-width: var(--measure-deck); }
.skeleton--detail .skeleton__line--deck[data-n="5"] { width: 62%; }
/* the hero — figure.thumb--hero: the full measure, 16:9, 24px under. The
   plate is the box; its caption line sits under it at 9.6px, which is the
   only chrome a photograph gets on this page. */
.skeleton__media {
  width: 100%;
  margin-bottom: 24px;
  background: transparent;
}
.skeleton__media::before {
  content: "";
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  background: var(--paper-2);
}
.skeleton__caption {
  width: 26%;
  height: 8px;
  margin-top: 9.6px;
  border-radius: var(--r-sm, 2px);
  background: var(--paper-2);
}
/* prose — .prose: --fs-body / 1.72 at the reading measure */
.skeleton--detail .skeleton__body { max-width: var(--measure); }
.skeleton--detail .skeleton__body .skeleton__line { width: 100%; }
.skeleton--detail .skeleton__body .skeleton__line[data-n="4"] { width: 56%; }
@media (min-width: 960px) {
  /* A 650px deck measure sets the summary in five lines; the phone's 358px
     takes seven. */
  .skeleton--detail .skeleton__line--deck[data-n="6"],
  .skeleton--detail .skeleton__line--deck[data-n="7"] { display: none; }
}
@media (min-width: 960px) {
  .skeleton--detail {
    grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 1fr);
    column-gap: clamp(1.4rem, 3vw, 2.6rem);
    align-items: start;
  }
  .skeleton--detail .skeleton__back,
  .skeleton--detail .skeleton__block--lead,
  .skeleton--detail .skeleton__media { grid-column: 1 / -1; }
  .skeleton--detail .skeleton__body { grid-column: 1; }
}

/* ---------------------------------------------- the search skeleton ---
   A result (.results > .card.result in app.js) is one column of text: meta
   (13px, 4px under), headline (--fs-title/1.3), deck (--fs-small, 4.8 above)
   and the matched snippet (13px/1.6, 7.2 above), inside .card's 12px of
   vertical padding. Measured rows: 174px at 1440 (meta 1 line, headline 1,
   deck 2, snippet 2) and 360px at 390 (meta 2, headline 2, deck 6, snippet 4).
   The skeleton carries the phone's count and trims to the desktop's, because a
   bar that is not there is a promise the page will not keep. No plate: a
   result never draws one. */
.skeleton--search .skeleton__block {
  padding: 12px 0;
  border-top: 1px solid var(--rule-soft);
}
.skeleton--search .skeleton__block--lead { border-top: 0; }
.skeleton--search .skeleton__line--meta { width: 22%; --gap: 4px; }
.skeleton--search .skeleton__line--head { font-size: var(--fs-title); --lh: 1.3; width: 100%; }
.skeleton--search .skeleton__line--deck { width: 100%; }
.skeleton--search .skeleton__line--snippet { font-size: var(--fs-label); --lh: 1.6; width: 100%; margin-top: 7.2px; }
@media (min-width: 720px) {
  .skeleton--search .skeleton__line--meta[data-n="2"],
  .skeleton--search .skeleton__line--head[data-n="2"],
  .skeleton--search .skeleton__line--deck[data-n="3"],
  .skeleton--search .skeleton__line--deck[data-n="4"],
  .skeleton--search .skeleton__line--deck[data-n="5"],
  .skeleton--search .skeleton__line--deck[data-n="6"],
  .skeleton--search .skeleton__line--snippet[data-n="2"],
  .skeleton--search .skeleton__line--snippet[data-n="3"],
  .skeleton--search .skeleton__line--snippet[data-n="4"] { display: none; }
}

/* ---------------------------------------------- the digest skeleton ---
   The edition is a 960px head (day line, a three-line lead headline at the
   newspaper's own lead size, a six-line summary at the deck size, then the
   counts rule) over .digest__sections: two section columns at 880px, each a
   .section-head over .digest-item rows (title, summary, then a meta line).
   Measured: head 418px at 1440 / 457 at 390; an entry 148 wide / 195 phone. */
.skeleton--digest .skeleton__block--lead {
  max-width: 60rem;
  padding-bottom: 0;
  border-bottom: 0;
  margin-bottom: 25.6px;
}
.skeleton--digest .skeleton__line--day { width: 16%; --gap: 4px; }
/* .digest__headline is the page's lead size at a 24ch measure (480px at 40px) */
.skeleton--digest .skeleton__block--lead .skeleton__line--head {
  font-size: var(--fs-lead);
  --lh: 1.12;
  width: 100%;
  /* .digest__headline's 24ch is 480px at the 40px face; 12em here. */
  max-width: 12em;
}
.skeleton--digest .skeleton__block--lead .skeleton__line--head[data-n="3"] { width: 56%; --gap: 8px; }
/* .digest__summary: --fs-deck / 1.65 at --measure-deck */
.skeleton--digest .skeleton__block--lead .skeleton__line--deck {
  font-size: var(--fs-deck);
  --lh: 1.65;
  width: 100%;
  max-width: var(--measure-deck);
}
.skeleton--digest .skeleton__block--lead .skeleton__line--deck[data-n="7"] { width: 62%; }
/* the counts rule — .digest__counts: 12.8px above, a hairline, 9.6px of room,
   then one 13px line */
.skeleton--digest .skeleton__line--counts {
  width: 24%;
  margin-top: 12.8px;
  padding-top: 9.6px;
  border-top: 1px solid var(--rule-soft);
  border-radius: 0;
}
/* the sections: .digest-sections' own column boxes, each opening on a head */
.skeleton--digest .skeleton__section {
  min-width: 0;
  margin-top: clamp(1rem, 2.6vw, 1.8rem);
}
.skeleton--digest .skeleton__sectionhead { min-height: 28px; padding: 0 0 8px; }
.skeleton--digest .skeleton__sectionhead .skeleton__line { width: 24%; margin-bottom: 0; }
.skeleton--digest .skeleton__entry {
  padding: 10.4px 0 11.2px;
  border-top: 1px solid var(--rule-soft);
}
/* .digest-item__title: --fs-title / 1.35; the summary --fs-small / 1.65 with
   0.25rem above it; the meta 13px with 0.3rem above. */
.skeleton--digest .skeleton__entry .skeleton__line--head { font-size: var(--fs-title); --lh: 1.35; }
.skeleton--digest .skeleton__entry .skeleton__line--head[data-n="2"] { width: 64%; --gap: 4px; }
.skeleton--digest .skeleton__entry .skeleton__line--deck { font-size: var(--fs-small); --lh: 1.65; }
.skeleton--digest .skeleton__entry .skeleton__line--deck[data-n="3"] { width: 58%; --gap: 4.8px; }
.skeleton--digest .skeleton__entry .skeleton__line--label { width: 34%; }
@media (min-width: 880px) {
  /* A 502px entry column sets the title in one line and the summary in three;
     the phone column wraps to two and four. */
  .skeleton--digest .skeleton__entry .skeleton__line--head[data-n="2"],
  .skeleton--digest .skeleton__entry .skeleton__line--deck[data-n="4"] { display: none; }
}
@media (min-width: 880px) {
  /* .digest__sections: two columns from 880px, one hairline per section */
  .skeleton--digest { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.2rem, 3vw, 2.2rem); }
  .skeleton--digest .skeleton__block--lead { grid-column: 1 / -1; }
  .skeleton--digest .skeleton__section {
    border-top: 1px solid var(--rule);
    padding-top: var(--sp-2);
  }
}


/* ============================================================ offline ==
   css/pwa.css owns the strip itself (it is inserted by js/pwa.js and loaded
   after this file). What is added here is only the second half of its
   sentence: js/states.js appends a sibling span that says what still works, so
   "You are offline" is followed by the useful fact rather than stopping at the
   problem. It is the faint half: the strip is a calm notice, not a warning. */
.cbn-offline__what {
  min-width: 0;
  color: var(--cbn-fg-3, var(--ink-faint));
}
/* A phone has one line to spend, and the two halves would wrap into a block
   that pushes the page down. The reader's strip keeps the first clause and the
   state that follows keeps the full list. */
@media (max-width: 599px) {
  .cbn-offline__what { display: none; }
}

/* =========================================================== search ==== */

html[data-route="search"] .filters__scroller,
html[data-route="digest"] .filters__scroller { display: none; }

/* The search note is a sentence, not a label: it neutralises the tracked
   micro-label it inherits from .feed-note and reads as ordinary meta text. */
.feed-note--block {
  display: block;
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-meta);
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink-faint);
  line-height: 1.55;
  max-width: var(--measure);
}
.feed-note--block .feed-note__mark { display: none; }

/* Results are a plain list of headlines, one column, hairline between rows —
   the same reading rhythm as the feed, not a tile grid.

   The column is held to the page's own reading measure. Measured at 1440
   (tools/n3_search.mjs, 2026-11-09): the list ran the full 1040px, so a summary
   set 130 characters on one line and a snippet 42 — against a 68ch measure
   (643px) everywhere else on the site. A result is a paragraph of context, so
   it reads at the paragraph measure, not at the width the page happens to
   have. */
.results {
  display: block;
  max-width: var(--measure);
}
.result {
  display: block;
  padding: var(--sp-3) 0;
  border-top: 1px solid var(--rule-soft);
}
.result:first-child { border-top: 0; }
/* A search hit is a headline, so no plate: feed.css floats a card's image when
   one exists, and this keeps the result list a plain column of text. */
.result .thumb,
.result .thumb--card:has(.thumb__img) { display: none; }
/* The foot of a result list: one more page, or the honest end-of-list line.
   Centred and separated by the same hairline the rows use, so it reads as part
   of the list rather than a stray control, and it keeps the 44px tap target
   from `.button`. */
/* The pager used to fill the column: `.results` is a block, so a block-level
   flex child spans it and `margin-inline: auto` had nothing to centre — the
   primary "Show more results" control rendered as a full-width accent slab,
   not the centred control its comment promises. `width: max-content` makes it
   the label's own width and lets the auto margins do their job. */
.results__more {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin: var(--sp-5) auto 0;
}
.results__end,
.results__more-error {
  text-align: center;
  margin: var(--sp-5) auto 0;
}
/* Same headline metrics as a feed card, so looking for a story reads the same
   in both places. */
.result .card__title {
  font-family: var(--font-display);
  font-size: var(--fs-title);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

/* Motion here is decoration only. This guard stands on its own so it holds
   even if responsive.css is not loaded: reduced motion gets the same quiet
   bars, static, and the same state, without a pulse. */
@media (prefers-reduced-motion: reduce) {
  .skeleton__line,
  .button {
    animation: none;
    transition: none;
  }
}

/* Forced colours: the bars must survive a system palette that drops background
   colours, or a skeleton becomes an empty page. */
@media (forced-colors: active) {
  .skeleton__line,
  .skeleton--feed .skeleton__block--lead::before,
  .skeleton__media::before,
  .skeleton__caption {
    background: Canvas;
    border: 1px solid CanvasText;
  }
}
