/* Article page: headline block, prose, claim spans, entities, aside.
   Part of the Cabinhub News newsroom stylesheet set. Loaded in this order from index.html:
   tokens, base, chrome, feed, detail, states, cjk, responsive, ops, dark.
   Class names are contractual: frontend/app.js emits them. */

/* =========================================================== detail ===== */

.detail { animation: rise var(--dur) var(--ease) both; }

.detail__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: var(--tap);
  font-size: var(--fs-meta);
  color: var(--ink-faint);
  text-decoration: none;
  margin-bottom: 0.6rem;
}
@media (hover: hover) and (pointer: fine) {
  .detail__back:hover { color: var(--ink); }
}

/* A publisher we can name but not link — the row carries `source.name` with no
   source URL. It is the same quiet meta voice as the reference link, but it is
   NOT a link: no underline, no tap target, nothing to click. It is a block so it
   keeps the link's row rhythm above the retrieved/updated lines. */
.detail__source-name {
  display: block;
  margin-bottom: 0.4rem;
  font-size: var(--fs-meta);
  color: var(--ink-soft);
}

.detail__verification:not([hidden]) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem .75rem;
}
.detail__verification button { flex: none; }

.detail__notice, .detail__verification {
  margin: 0 0 clamp(1rem, 2.4vw, 1.5rem);
  padding: 0.55rem 0 0.55rem 0.7rem;
  border-left: 3px solid var(--accent);
  font-size: var(--fs-meta);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.detail__body {
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.6rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 960px) {
  .detail__body { grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 1fr); }
}

/* The article: headline, deck, byline, then the body measure. */
.sheet { min-width: 0; }

.detail__head {
  margin-bottom: clamp(1.1rem, 2.4vw, 1.7rem);
  max-width: 44rem;
  padding-bottom: clamp(0.8rem, 1.6vw, 1.2rem);
  border-bottom: 1px solid var(--rule-strong);
}
.detail__head::after { margin-top: 0.9rem; }
/* When the story's photograph follows the header (N2 BODYIMG hero), the
   photograph is the break; a 44rem rule above a full-width image reads as a
   line that stopped short. */
.detail__head:has(+ .thumb--hero) { border-bottom: 0; padding-bottom: 0; }

/* The identification line above the headline: sentence case, no tracking,
   one sans, no monospace. Category, source and time are all a reader sees. */
.detail__kicker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: var(--fs-label);
  letter-spacing: 0;
  color: var(--ink-faint);
  margin-bottom: 0.55rem;
}
.detail__kicker .article__cat {
  color: var(--accent);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}
html[lang="zh-Hans"] .detail__kicker .article__cat { letter-spacing: 0; }
.detail__kicker .article__dot { width: 2px; height: 2px; background: var(--rule); }
.detail__kicker time { font-family: var(--font-ui); font-variant-numeric: tabular-nums; }
/* The reading-time estimate (js/typography.js). Same quiet dateline voice as the
   timestamp beside it, tabular figures so the number does not jitter between a
   zh and an en edition, and the same zero tracking Chinese needs on its grid —
   cjk.css does not list this class, so the reset lives here with the rule that
   introduces it. */
.article__readtime {
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  white-space: nowrap;
}

/* app.js emits the kicker as eight nodes (frontend/app.js renderDetail,
   ~993-1005): category, dot, source, dot, time, dot, importance, badge.
   A reader sees the first five. The importance reading and the CLEAN
   compliance mark are production vocabulary, so they stay in the DOM and
   out of sight. The positional pair is gated on the badge still being
   present, so it cannot eat the time if app.js drops the badge. */
.detail__kicker .badge { display: none; }
.detail__kicker:has(> .badge) > :nth-last-child(2),
.detail__kicker:has(> .badge) > .article__dot:nth-last-child(3) { display: none; }
/* app.js closes the line with a separator after the time. Nothing follows it,
   so it is a dangling dot at the end of every dateline: drop the last one. */
.detail__kicker > .article__dot:last-child { display: none; }

/* A separator belongs to the value it introduces, and must never end a line.
   As a sibling flex item a dot CAN end a line with its value wrapped beneath
   it: measured live 2026-11-16 at 390, the dot before the time sat at the end
   of line 1 while "6 hours ago" began line 2, so the dateline read "… · " and
   then stopped — punctuation promising a field the row had dropped. The same
   row measured NO orphan at 431/600/768/1024/1440, so the break is a phone
   defect, but the mechanism is general. Drawing the dot as the ::before of the
   following item puts it inside that item's line box, so it cannot be
   separated from its value at any width. Same 2px mark, same 0.5rem gap. */
.detail__kicker > .article__dot { display: none; }
.detail__kicker > .article__dot + *::before {
  content: "";
  display: inline-block;
  width: 2px;
  height: 2px;
  margin-inline-end: 0.5rem;
  vertical-align: 0.15em;
  background: var(--rule);
}
/* On a phone the dateline wraps (measured 2026-11-16 at 390: three lines), and
   a mark that travels with its item then lands at the START of the next line —
   the orphaned dot again, moved. Where the row wraps, the separator is not
   drawn at all and the 0.5rem gap does the separating; the house already drops
   the dot the same way on compact and digest cards. */
@media (max-width: 559px) {
  .detail__kicker > .article__dot + *::before { content: none; }
}

/* The headline measure is 22ch at every width, the way a printed page of
   record sets it. responsive.css drops .detail__title to max-width:none under
   600px; the extra class here keeps that override from widening the measure. */
.detail .detail__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-detail);
  line-height: 1.1;
  letter-spacing: -0.022em;
  text-wrap: balance;
  margin-bottom: 0.6rem;
  max-width: 22ch;
  color: var(--ink);
}

.detail__deck {
  font-family: var(--font-ui);
  /* The standfirst is the story's own reading text: the reader's size reaches
     it too (css/tokens.css --reading-scale), or a 150% reader opens a story and
     the paragraph under the headline is still 100%. */
  font-size: calc(var(--fs-deck) * var(--reading-scale));
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: var(--measure-deck);
}

.sheet__section + .sheet__section {
  margin-top: 1.7rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

/* A section label is a quiet caption, not a stamped heading. */
.section-label {
  font-family: var(--font-ui);
  font-size: calc(var(--fs-label) * var(--reading-scale));
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--rule-soft); }

.prose {
  font-family: var(--font-display);
  /* The reader's own size, a multiplier on the designed body scale
     (css/tokens.css --reading-scale). Scaling the type, not the column: the
     measure stays 68ch and the lines simply wrap, so nothing overflows at 390. */
  font-size: calc(var(--fs-body) * var(--reading-scale));
  line-height: 1.72;
  color: var(--ink);
  max-width: var(--measure);
  text-wrap: pretty;
}
.prose p + p { margin-top: 1.15em; }
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}
.prose__empty { color: var(--ink-faint); }

html[lang="zh-Hans"] .prose { font-family: var(--font-ui); line-height: 1.9; font-size: calc((var(--fs-body) - 1px) * var(--reading-scale)); }

.bullets { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.bullets li {
  position: relative;
  padding-left: 1.1rem;
  font-size: calc(var(--fs-small) * var(--reading-scale));
  line-height: 1.6;
  color: var(--ink-soft);
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 1px;
  background: var(--accent);
}

/* claims — provenance noted in the margin, not set as a table */
.claims { display: grid; gap: 0; }
.claim {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: 0.55rem;
  padding: 0.55rem 0;
}
.claim:first-child { padding-top: 0; }
.claim__num {
  font-family: var(--font-ui);
  font-size: var(--fs-micro);
  font-variant-numeric: tabular-nums;
  color: var(--ink-faint);
  padding-top: 0.2em;
}
.claim__text { font-size: calc(var(--fs-small) * var(--reading-scale)); line-height: 1.6; color: var(--ink); }
.claim__span {
  margin-top: 0.3rem;
  font-size: calc(var(--fs-label) * var(--reading-scale));
  line-height: 1.6;
  color: var(--ink-faint);
  border-left: 1px solid var(--rule);
  padding-left: 0.6rem;
  quotes: "\201C" "\201D";
}
.claim__span::before { content: open-quote; color: var(--ink-faint); }
.claim__span::after { content: close-quote; color: var(--ink-faint); }
.claim__conf {
  font-family: var(--font-ui);
  font-size: var(--fs-micro);
  font-variant-numeric: tabular-nums;
  color: var(--ink-faint);
  margin-top: 0.25rem;
}
/* cjk.css loads after this file and widens the quote rule to 2px; one
   hairline weight is the point, so hold it at 1px in both scripts. The extra
   .detail class outranks cjk.css, which this file cannot reorder. */
html[lang="zh-Hans"] .detail .claim__span { border-left-width: 1px; }

/* aside panels: hairline-separated sections, no cards, no fills, no shadows */
.panel { border-top: 1px solid var(--rule); padding-top: 0.55rem; }
.panel + .panel { margin-top: 1.3rem; }

.panel__label {
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-faint);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
/* The compliance panel label carries the same CLEAN mark the kicker does
   (app.js appends badge(true) to it), so it goes too. */
.panel__label .badge { display: none; }
/* cjk.css loads after this file and tracks every label; keep the caption
   untracked for CJK as well. */
html[lang="zh-Hans"] .detail__aside .panel__label { letter-spacing: 0; }

.market__row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; }
.market__sym { font-family: var(--font-ui); font-size: var(--fs-meta); color: var(--ink-faint); }
.market__price {
  font-family: var(--font-ui);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.market__chg { font-family: var(--font-ui); font-size: var(--fs-meta); font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.market__chg--down { color: var(--accent); }
.market__asof { font-size: var(--fs-micro); color: var(--ink-faint); margin-top: 0.45rem; line-height: 1.6; }

/* entities read as a definition list: quiet key, plain values, no chips */
.entities { display: grid; gap: 0.6rem; font-size: var(--fs-small); }
.entities__group { display: grid; gap: 0.15rem; }
.entities__key { font-size: var(--fs-label); font-weight: 600; letter-spacing: 0; color: var(--ink-faint); }
.entities__vals { display: flex; flex-wrap: wrap; gap: 0.15rem 0.5rem; }
.entities__val { font-size: var(--fs-small); color: var(--ink); }

.compliance__top { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.compliance__risk { display: grid; gap: 0.35rem; }
.compliance__riskrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: var(--fs-micro);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.compliance__bar { height: 3px; background: var(--paper-3); position: relative; overflow: hidden; }
.compliance__fill { position: absolute; inset: 0 auto 0 0; background: var(--ink-faint); }
.compliance__fill--high { background: var(--accent); }

.plate { border: 0; padding: 0; margin: 0; }
.plate__img { aspect-ratio: 4 / 3; }
/* No generated image: the slot is a ruled band with the category on it. */
.plate .thumb__empty {
  aspect-ratio: auto;
  height: 2.25rem;
  padding: 0 0.5rem;
  align-items: center;
  border-left: 0;
  border-right: 0;
  background: transparent;
}
.plate__img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--rule); background: var(--paper-2); }
.plate__note { font-size: var(--fs-micro); letter-spacing: 0; color: var(--ink-faint); margin-top: 0.45rem; line-height: 1.5; }
.plate .thumb__empty { border: 0; }

.disclaimer {
  margin-top: 1rem;
  border-top: 1px solid var(--rule);
  padding-top: 0.7rem;
  font-size: var(--fs-label);
  line-height: 1.6;
  color: var(--ink-faint);
  max-width: var(--measure);
}
.disclaimer__label {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0;
  display: block;
  margin-bottom: 0.3rem;
  color: var(--ink-soft);
}

/* ====================================== the article is not the feed =======
   The story page reuses the shell the feed lives in, and one part of that shell
   describes a LIST the reader is not on: the watchlist's view switch ("All
   stories" / "Following"). Measured live 2026-11-16 at 390x844 on #/item/...:
   a 61px bar whose first control is a second "back to the feed" 60px above the
   real one, and pressing "Following" only bounces back to #/ anyway
   (watchlist.js setView()).

   Only the switch goes. The panel toggle beside it opens the instrument list
   and is not a feed control, so a reader keeps Watchlist and the story keeps
   its own Follow controls further down. The bar keeps its padding, hairline and
   margins: chrome_polish.test.mjs pins all three by value, and a row holding
   one control is the row those numbers were measured for.

   NOT restated here, because HEAD already does it (measured against ce656adb):
   the category strip is scoped off the detail route by ops.css:32, and the
   market band's slot is `display:none` on detail by markets.css:94. An earlier
   revision of this block re-hid both and restyled the band for phones — dead
   work, since markets.js relocates the tape into [data-mk-host] only below
   430px, and that host is created solely inside renderFeed (app.js:1345), which
   the detail route never calls. */
html[data-route="detail"] .wl-switch { display: none; }
