/* ============================================================================
   News article detail — the reading surface.  (brief §11, visual system
   2026-09-18)
   ============================================================================

   One owner, one vocabulary.  Before this pass the page was drawn from three
   at once: `.na-*` from news-stream.css, `.ns-*` from the same sheet, and
   `.art-*` from here — and then news-focus.css, which is inside
   bundle-shell and therefore loads *after* this file, restyled the first set
   again at a higher specificity.  So the sheet named after the reading
   surface described values that never reached the page, and two thirds of
   what was here existed to argue with a sheet it could not outrank.

   The body is the shared component layer now — `.am-page-head`, `.am-panel`,
   `.am-panel__title`, `.am-chip`, `.am-metrics`, `.am-evidence`,
   `.c-disclosure` — all of which live in bundle-shell and therefore win
   against the blanket rules in brand.css and page-unification.css without
   this file spending an `!important` on any of them.

   What is left here is what is genuinely local to an article page:

     * the column width, which brand.css sets to the dashboard's 1220px;
     * the boundary band that says where the publisher's reporting stops and
       this platform's reading of it starts;
     * the reading measure and the long-form type size;
     * the shape of the four things that have no component — the asset chip
       row, the reading row, the related list and the identifier table.

   The `.na-*` names that remain in the template are the ones news-focus.css
   owns unscoped and this page borrows as-is: `.na-back`, `.na-share`,
   `.na-detail-grid`, `.na-reading-column`, `.na-evidence-column`,
   `.na-follow-on`.  Nothing here writes a rule for any of them.

   No rule in this file names a class canvas-2026.css owns — that is what
   test_canvas_design's collision guard checks.  Where a shared component
   needs page-local spacing it carries a companion class of this page's own
   on the same element (`.c-disclosure nd-disclosure`, `.am-metrics
   nd-outcome`), and the companion is what is styled.

   Cascade: linked from {% block extra_css %}, which is *before*
   bundle-shell.css.  Anything answering a rule in there needs !important as
   well as specificity, and says so where it does.
   ============================================================================ */

/* --- The column ---------------------------------------------------------- */

/* brand.css sets `.page-news_detail .article-detail-container { max-width:
   1220px !important }`, which is the dashboard width.  1000px is measured,
   not chosen: at 1000 the reading column inside the detail grid is 608px and
   the measure below fills it at ~71 characters a line, inside the 65–75 the
   brief asks for.  The 1220px version ran the "why it matters" paragraph to
   roughly 150 characters. */
body.page-news_detail .article-detail-container {
  max-width: min(100%, 1000px) !important;
  margin-inline: auto;
  padding-inline: var(--c-space-5);
  padding-block: 0 var(--c-space-6);
}

/* --- Head ---------------------------------------------------------------- */

body.page-news_detail .nd-head {
  margin-block: var(--c-space-3) var(--c-space-5);
}

/* Category, publisher, timestamp: the three facts that place a story before
   it is read.  They were a filled badge, a bullet row and a timestamp in
   three registers; the kicker sets them in one. */
body.page-news_detail .nd-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem var(--c-space-2);
  font-variant-numeric: tabular-nums;
}

body.page-news_detail .nd-kicker__source {
  color: var(--c-text-secondary);
  font-weight: var(--c-w-semi);
}

/* `text-wrap: balance` because a two-line headline with one word on the
   second line is the most common way a title stops looking set and starts
   looking broken.  Browsers without it fall back to normal wrapping. */
body.page-news_detail .nd-title {
  max-width: 34ch;
  text-wrap: balance;
}

/* The publisher's headline under a translated one (brief §10.18): present
   and readable, plainly secondary.  The line follows the page direction; only
   the English headline inside it is an isolated LTR run. */
body.page-news_detail .nd-original-title {
  margin: 0.35rem 0 0;
  max-width: 60ch;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--c-text-secondary);
}
body.page-news_detail .nd-original-title__label {
  font-weight: 600;
}

/* A link inside a fact line has nothing but colour to separate it from the
   words beside it, so it is underlined at rest (§7).  The ink is darkened for
   the light theme only: `--c-evidence` clears AA on white (5.36) but the
   light shell paints `<body>` with a blue wash, and against the real
   composited stack the same ink measures 4.48:1.  #0c667f is the same hue two
   steps down and comfortably clear of 4.5; dark is untouched, where
   `--c-evidence` is 10.78:1. */
body.page-news_detail .nd-origin-link,
body.page-news_detail .nd-source-link,
body.page-news_detail .nd-conf-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 24px;
  color: var(--c-evidence);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

html[data-theme="light"] body.page-news_detail :is(.nd-origin-link, .nd-source-link, .nd-conf-link),
html:not([data-theme="dark"]) body.page-news_detail :is(.nd-origin-link, .nd-source-link, .nd-conf-link) {
  color: #0c667f;
}

body.page-news_detail :is(.nd-origin-link, .nd-source-link, .nd-conf-link):hover {
  text-decoration-thickness: 2px;
}

body.page-news_detail :is(.nd-origin-link, .nd-source-link, .nd-conf-link):focus-visible {
  outline: 2px solid var(--c-evidence);
  outline-offset: 3px;
}

body.page-news_detail :is(.nd-origin-link, .nd-source-link) i,
body.page-news_detail :is(.nd-origin-link, .nd-source-link) svg {
  width: 14px;
  height: 14px;
}

/* Share and save.  A caption-weight row under the fact line, not a toolbar. */
body.page-news_detail .nd-actions {
  margin-block-start: var(--c-space-4);
  gap: var(--c-space-2) var(--c-space-4);
}

/* --- The publisher's photograph ------------------------------------------ */

/* Drawn only when the row holds a picture the publisher actually published;
   the template gates it, so nothing here has to cope with an empty box.

   Named `.am-*` rather than this page's `.nd-*` because the figure is the
   shared article-hero shape -- an intrinsic-ratio image with a credit line --
   and the only page that renders one today is this one.  It lives here, with
   the sheet that page loads, and moves to the component layer the day a
   second route needs it.

   The ratio is stated twice on purpose: `width`/`height` in the markup
   reserve the box before any stylesheet parses, `aspect-ratio` keeps it once
   the column is narrower than 1200px.  `max-block-size` stops a 16/9 crop
   from taking the whole first screen on a wide desktop -- past roughly 640px
   of column the photograph is taller than the headline that earned it.
   `--c-inset` is what the reserved box is filled with while the bytes are in
   flight, the same fill the feed tile uses, so it is never a white hole in a
   dark page. */
body.page-news_detail .am-article-hero {
  margin: 0 0 var(--c-space-5);
}

body.page-news_detail .am-article-hero__img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 16 / 9;
  max-block-size: 360px;
  object-fit: cover;
  border-radius: var(--c-r-panel);
  background: var(--c-inset);
  box-shadow: inset 0 0 0 1px var(--c-line);
}

/* The credit is a fact in the meta register, not a caption: same colour and
   size as the kicker above the headline, aligned to the start of the column
   so it follows the page direction without a rule of its own. */
body.page-news_detail .am-article-hero__credit {
  margin-block-start: var(--c-space-2);
  color: var(--c-text-muted);
  font-size: var(--c-t-label);
  text-align: start;
}

/* --- Affected assets ----------------------------------------------------- */

/* Not a panel: a label and a row of chips is the whole of it, and a border
   around two lines of content is the box-in-a-box §11 forbids. */
body.page-news_detail .nd-assets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem var(--c-space-3);
  margin-block-end: var(--c-space-4);
}

body.page-news_detail .nd-assets__head {
  margin: 0;
  color: var(--c-text-muted);
  font-size: var(--c-t-label);
  font-weight: var(--c-w-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

[dir="rtl"] body.page-news_detail .nd-assets__head {
  letter-spacing: 0;
  text-transform: none;
}

body.page-news_detail .nd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--c-space-2);
  min-width: 0;
}

/* --- The boundary band --------------------------------------------------- */

/* One line that says where the publisher's article stops and this platform's
   reading of it starts.  §11's first requirement is that those two be
   clearly separated, and until it existed nothing on the page said which was
   which.

   Deliberately not a heading: the sections it introduces are h2s, and an h2
   above them would make them look like children of it in a headings outline.
   It is a rule with a word on it, and the word is `.75rem` rather than
   smaller because it is the only thing telling a reader which half of the
   page they are in. */
body.page-news_detail .nd-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem var(--c-space-3);
  margin: var(--c-space-5) 0 var(--c-space-3);
  color: var(--c-text-muted);
  font-size: var(--c-t-label);
  font-weight: var(--c-w-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

[dir="rtl"] body.page-news_detail .nd-band {
  letter-spacing: 0;
  text-transform: none;
}

body.page-news_detail .nd-band::after {
  content: "";
  order: 3;
  flex: 1 1 auto;
  height: 1px;
  background: var(--c-line);
}

body.page-news_detail .nd-band__label { order: 1; }

/* A name and a timestamp, not a label: the tracking and the caps come off. */
body.page-news_detail .nd-band__meta {
  order: 2;
  color: var(--c-text-muted);
  font-size: var(--c-t-meta);
  font-weight: var(--c-w-medium);
  letter-spacing: 0;
  text-transform: none;
}

body.page-news_detail .nd-band--model .nd-band__label { color: var(--c-evidence); }

/* --- Blocks -------------------------------------------------------------- */

/* The panel component draws the surface; this is the rhythm between them and
   the space under a head, which is a property of a page with eleven of them
   rather than of the component. */
body.page-news_detail .nd-block {
  margin-block-end: var(--c-space-4);
}

body.page-news_detail .nd-block__head {
  margin-block-end: var(--c-space-3);
}

/* Which half of the page a block belongs to, carried on the block itself so
   it survives scrolling past the band that named it.  The analysis blocks
   take the evidence accent; the publisher's own text takes a neutral edge, so
   the two are told apart by more than their order. */
body.page-news_detail #article-why,
body.page-news_detail #article-tone,
body.page-news_detail #article-impact {
  border-inline-start: 3px solid color-mix(in srgb, var(--c-evidence) 45%, var(--c-line));
}

body.page-news_detail .nd-block--source {
  border-inline-start: 3px solid var(--c-line-strong);
}

/* An audit section is a disclosure in a panel, and a disclosure draws its own
   hairlines.  The panel gives up its padding to the summary so the closed
   state is one row and not a row inside a box. */
body.page-news_detail .nd-block--audit {
  padding: 0;
  overflow: hidden;
}

body.page-news_detail .nd-block--audit .nd-disclosure {
  border: 0;
}

body.page-news_detail .nd-block--audit > .nd-disclosure > .nd-disclosure__summary {
  min-height: 52px;
  padding-inline: clamp(18px, 1.5vw, 22px);
}

body.page-news_detail .nd-block--audit > .nd-disclosure > .nd-disclosure__body {
  padding-inline: clamp(18px, 1.5vw, 22px);
}

/* The nested identifier disclosure: a quieter row, and its own hairline back,
   because inside the open body it needs to read as a second step down. */
body.page-news_detail .nd-ids-toggle {
  margin-block-start: var(--c-space-3);
  border-block-start: 1px solid var(--c-line) !important;
}

body.page-news_detail .nd-ids-toggle > .nd-disclosure__summary {
  min-height: 40px;
  color: var(--c-text-faint);
  font-size: var(--c-t-meta);
  font-weight: var(--c-w-medium);
}

/* --- Reading rhythm ------------------------------------------------------ */

/* The long-form size.  §NEWS asks for strong reading typography and the page
   was set at 14.4px with 1.8 leading -- a feed size carried onto a surface
   people read for several screens.  1.0625rem sits between --c-t-body and
   --c-t-lead and is deliberately neither: --c-t-body is the size the rest of
   the site reads at and is too small here, and at --c-t-lead the same column
   falls to 64.6 characters a line.

   The measure is calibrated rather than copied from the brief's "72ch": `ch`
   is the advance of "0", which is wider than the mean glyph, so 54ch renders
   at ~70 characters at this size.  Re-measure rather than recompute if the
   face changes. */
body.page-news_detail .nd-prose {
  max-width: 54ch;
  color: var(--c-text-secondary);
  font-size: 1.0625rem;
  line-height: 1.7;
}

body.page-news_detail .nd-prose p {
  margin: 0 0 var(--c-space-3);
}

body.page-news_detail .nd-prose p:last-child,
body.page-news_detail .nd-prose ul:last-child {
  margin-block-end: 0;
}

/* tailwind.css resets `ul { list-style: none }` site-wide, so a list of
   drivers or risks printed as unmarked lines. */
body.page-news_detail .nd-prose ul {
  margin: 0 0 var(--c-space-3);
  padding-inline-start: 1.15rem;
  list-style: disc;
}

body.page-news_detail .nd-prose li + li {
  margin-block-start: 0.35rem;
}

body.page-news_detail .nd-prose li::marker {
  color: var(--c-text-faint);
}

/* "Risks", inside the expected-reaction block: a second head in a block. */
body.page-news_detail .nd-subhead {
  margin: var(--c-space-5) 0 var(--c-space-2);
  color: var(--c-text);
  font-size: var(--c-t-body);
  font-weight: var(--c-w-semi);
}

/* Footnote weight: the attribution sentence, the translation provenance, the
   lifecycle's scoring note and the tone explanation share one size instead of
   four inline `font-size` values. */
body.page-news_detail .nd-note {
  margin: var(--c-space-3) 0 0;
  max-width: 60ch;
  color: var(--c-text-muted);
  font-size: var(--c-t-meta);
  line-height: 1.55;
}

/* The language note is a statement about the text under it, so it sits above
   it rather than after it. */
body.page-news_detail .nd-lang-note {
  margin: 0 0 var(--c-space-3);
  color: var(--c-text-muted);
  font-size: var(--c-t-meta);
  line-height: 1.5;
}

/* --- The reading (tone, direction, confidence) --------------------------- */

/* §11: provider and confidence metadata, "never louder than the headline".
   The call keeps its weight because it is the finding; everything beside it
   drops to metadata, so the row reads value-first instead of as four equal
   facts.  Baseline, not centre: an 18px value beside 13px labels aligned by
   box leaves their text baselines spread across 6px. */
body.page-news_detail .nd-reading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem var(--c-space-4);
  margin-block-end: var(--c-space-3);
  min-width: 0;
}

body.page-news_detail .nd-reading__value {
  color: var(--c-text);
  font-size: var(--c-t-h3);
  font-weight: var(--c-w-semi);
}

/* The chip is an inline-flex box, so it exposes a synthesised baseline rather
   than its text's and floats in a baseline-aligned row. */
body.page-news_detail .nd-reading__call {
  align-items: baseline;
}

body.page-news_detail .nd-reading__note {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  color: var(--c-text-muted);
  font-size: var(--c-t-meta);
}

/* --- Provenance facts and identifiers ------------------------------------ */

body.page-news_detail .nd-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem var(--c-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--c-text-muted);
  font-size: var(--c-t-meta);
}

body.page-news_detail .nd-facts__item {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.page-news_detail .nd-facts__item + .nd-facts__item::before {
  content: "\00B7";
  margin-inline-end: var(--c-space-2);
  color: var(--c-text-faint);
}

/* A model id, a provider tag or a hash can be longer than a phone screen, so
   the value wraps anywhere and the label column is sized to its content and
   kept from being squeezed to nothing behind it. */
body.page-news_detail .nd-ids {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.3rem var(--c-space-4);
  margin: 0;
  font-size: var(--c-t-meta);
}

body.page-news_detail .nd-ids dt {
  color: var(--c-text-faint);
}

body.page-news_detail .nd-ids dd {
  margin: 0;
  min-width: 0;
  color: var(--c-text-secondary);
  font-family: var(--c-mono);
  overflow-wrap: anywhere;
}

/* --- Outcome ------------------------------------------------------------- */

/* The metric row's default is a four-up grid; in a 320px rail that is four
   30px columns.  Two, and one on a phone. */
body.page-news_detail .nd-outcome {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--c-space-4);
  margin: 0;
}

body.page-news_detail .nd-outcome__cell {
  min-width: 0;
}

/* A price and a percentage read left to right in every locale, and neither is
   allowed to break mid-figure. */
body.page-news_detail .nd-outcome__value {
  direction: ltr;
  unicode-bidi: isolate;
  font-size: var(--c-t-h3);
  overflow-wrap: normal;
}

[dir="rtl"] body.page-news_detail .nd-outcome__value {
  text-align: start;
}

/* --- Original source ----------------------------------------------------- */

body.page-news_detail .nd-source-action {
  margin: var(--c-space-4) 0 0;
}

/* --- Related ------------------------------------------------------------- */

body.page-news_detail .nd-related {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.page-news_detail .nd-related__item {
  display: grid;
  gap: 0.15rem;
  padding-block: var(--c-space-3);
  border-block-end: 1px solid var(--c-line);
  min-width: 0;
}

body.page-news_detail .nd-related__item:first-child { padding-block-start: 0; }
body.page-news_detail .nd-related__item:last-child { padding-block-end: 0; border-block-end: 0; }

/* The headline stays at full contrast on hover and the underline carries the
   state; recolouring to the link ink measured 4.48:1 in light against 13.76
   at rest -- dimming the thing the reader is pointing at. */
body.page-news_detail .nd-related__title {
  display: inline-block;
  min-height: 24px;
  max-width: 56ch;
  color: var(--c-text);
  font-size: var(--c-t-body);
  font-weight: var(--c-w-medium);
  line-height: 1.45;
  text-decoration: none;
}

body.page-news_detail .nd-related__title:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

body.page-news_detail .nd-related__title:focus-visible {
  outline: 2px solid var(--c-evidence);
  outline-offset: 2px;
}

body.page-news_detail .nd-related__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem var(--c-space-2);
  color: var(--c-text-faint);
  font-size: var(--c-t-meta);
  font-variant-numeric: tabular-nums;
}

/* --- Track record -------------------------------------------------------- */

body.page-news_detail .nd-track__head {
  margin: 0 0 var(--c-space-3);
  color: var(--c-text);
  font-size: var(--c-t-h3);
  font-weight: var(--c-w-semi);
}

/* --- Narrow -------------------------------------------------------------- */

@media (max-width: 48rem) {
  body.page-news_detail .article-detail-container {
    padding-inline: var(--c-space-4);
  }

  /* §11: on mobile the metadata must wrap without horizontal overflow.  What
     overflows a 390px screen is a single unbroken token -- a long publisher
     name, a model id, a URL. */
  body.page-news_detail .nd-kicker,
  body.page-news_detail .nd-related__item {
    overflow-wrap: anywhere;
  }

  body.page-news_detail .nd-title {
    max-width: none;
  }

  body.page-news_detail .nd-outcome {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--c-space-3);
  }
}

/* ============================================================================
   Print
   ============================================================================

   Rendered under `media: print` the dark theme carried straight through, and
   browsers do not print background colours unless the reader ticks
   "Background graphics".  Body prose left the printer at rgb(182,198,218) on
   white, 1.74:1, and the title at 1.14:1 -- a sheet that reads as blank.

   Ink is forced dark.  Headings are reached by element rather than by class,
   because this sheet may not write a `.c-*` selector and on paper every
   heading wants the same ink regardless of which layer named it.  The fixed
   chrome goes: `nav.am-quick-dock` printed *over* the body text near the foot
   of the page.
   ============================================================================ */

@media print {
  /* `[class^="page-"]` is carried onto the ink selectors for weight, not for
     matching: theme-foundation.css sets the headings at (0,2,2) !important
     and a `html body.page-news_detail :is(h1, …)` rule is only (0,1,3),
     because `:is()` takes the weight of its most specific argument and every
     argument here is an element. */
  html body.page-news_detail[class^="page-"] {
    background: #fff !important;
  }

  header.dashboard-header,
  footer.dashboard-footer,
  nav.am-quick-dock,
  .pg-modal,
  .pg-launcher,
  .share-toast,
  .cookie-consent,
  .social-banner {
    display: none !important;
  }

  html body.page-news_detail[class^="page-"] :is(h1, h2, h3, h4, h5, h6) {
    color: #000 !important;
  }

  html body.page-news_detail[class^="page-"] :is(p, li, span, strong, em, dt, dd, time, a, td, th) {
    color: var(--c-text) !important;
  }

  body.page-news_detail .article-detail-container {
    max-width: none !important;
  }

  /* Share and save are affordances, not content.  On paper the row printed as
     five icon buttons and a filled pill whose label is white -- and since the
     fill is a background it does not print, so the pill arrived as an empty
     rectangle with invisible text. */
  body.page-news_detail :is(.share-bar, .idn-save-toggle) {
    display: none !important;
  }

  /* The two bands are the thing a printed article has to keep distinct, so
     they hold their place at a break. */
  body.page-news_detail :is(.nd-band, .nd-subhead) {
    break-after: avoid;
  }

  body.page-news_detail :is(.nd-note, .nd-related, .nd-block) {
    break-inside: avoid;
  }
}

/* ---------------------------------------------------------------------------
   The evidence rail is support, not a second article
   ---------------------------------------------------------------------------

   Evidence trail and AI provenance were drawn on the same raised surface as
   the article's own blocks and headed at the same 18.4px, so at a glance the
   column beside the piece carried equal weight to the piece. They keep their
   position, width and contents; only the register drops -- the quiet inset
   ground the system already uses for secondary panels, and the section-meta
   heading size. Nothing here is !important: it is one class more specific
   than the panel rule it steps down from. Hooked on this page's own
   `.nd-block`, never on the shared `.am-panel` -- a page sheet that names a
   canvas class is what `test_canvas_classes_do_not_collide_with_any_other_stylesheet`
   exists to stop. */
body.page-news_detail .na-evidence-column > .nd-block {
  background: var(--c-inset);
  box-shadow: none;
}
body.page-news_detail .na-evidence-column > .nd-block > :is(h2, h3, .nd-block__head) {
  /* --c-t-body (16px), not --c-t-h3 (18.4px): the panel title and the
     article's own block headings are both h3 in the system, so matching it
     here is what made the rail read as a second article. */
  font-size: var(--c-t-body);
  color: var(--c-text-secondary);
}
