/* ==========================================================================
   Samia Newsroom — site components on top of samia.css v3 (journal.css carries
   the reading layout for pieces). Paper, ink lines, hard shadows; every spacing
   value comes from the shared scale. Motion is transform/opacity only and stops
   under prefers-reduced-motion.
   ========================================================================== */

/* Front page ------------------------------------------------------------- */
.front { padding-block: clamp(20px, 3vw, 36px) clamp(48px, 6vw, 80px); }
.front .edition { margin-bottom: var(--s4); }
.front-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--s4); align-items: stretch; }
@media (max-width: 980px) { .front-grid { grid-template-columns: minmax(0, 1fr); } }

.lead-slot { display: grid; align-content: start; overflow: hidden; background: var(--paper-2); border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); min-width: 0; }
.lead-art { border-bottom: var(--bw) solid var(--ink); background: var(--sky); aspect-ratio: 16 / 7; overflow: hidden; }
.lead-art svg { width: 100%; height: 100%; display: block; }
.lead-copy { padding: clamp(24px, 3.4vw, 48px); }
.lead-copy h1 { font-size: clamp(2.4rem, 1.4rem + 4vw, 4.8rem); max-width: 10.5em; }
.lead-copy .lead { margin-top: var(--s2); }
.lead-copy .actions { margin-top: var(--s4); }
.lead-facts { list-style: none; margin: var(--s4) 0 0; padding: var(--s3) 0 0; border-top: 1.5px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: var(--fs-small); font-weight: 600; color: var(--ink); }
.lead-facts li { display: inline-flex; align-items: center; gap: 8px; }
.lead-facts li::before { content: ""; width: 9px; height: 9px; background: var(--red); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); flex: none; }

/* Latest updates column */
.latest-col { background: var(--paper-2); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); padding: clamp(18px, 2.4vw, 26px); display: grid; grid-template-rows: auto 1fr auto; gap: var(--s2); min-width: 0; }
.latest-col .col-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; border-bottom: var(--bw) solid var(--ink); padding-bottom: 12px; }
.latest-col h2 { font-size: 1.35rem; margin: 0; }
.latest-col .col-head small { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.updates { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; }
.updates li { display: grid; gap: 5px; padding: 14px 0; border-bottom: 1.5px solid var(--line); }
.updates li:last-child { border-bottom: 0; padding-bottom: 4px; }
.updates .when { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.updates .when .pill { font-size: .64rem; padding: 3px 8px; letter-spacing: .06em; }
.updates a { color: var(--ink); font-weight: 700; line-height: 1.3; font-size: 1rem; }
.updates a:hover { color: var(--blue); }
.updates p { margin: 0; font-size: .9rem; color: var(--muted); }
.latest-col .link-arrow { font-size: var(--fs-small); margin-top: auto; padding-top: 12px; border-top: 1.5px solid var(--line); }

/* The five desks on the front page: three across, then Progress and Investigations wider ----
   (a six-column grid: 2+2+2 on the first row, 3+3 on the second; two across below 980, one below 600) */
.desk-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s3); }
.desk-grid > * { grid-column: span 2; }
.desk-grid > :nth-last-child(-n+2) { grid-column: span 3; }
.desk-tile { padding: clamp(20px, 2.2vw, 26px); }
.desk-tile .glyph { width: 56px; height: 56px; margin-bottom: 4px; }
.desk-tile .glyph svg { width: 100%; height: 100%; overflow: visible; }
.desk-tile h3 { font-size: 1.2rem; }
.desk-tile p { font-size: var(--fs-small); max-width: 34em; }
.desk-tile .status { margin-bottom: 0; }
@media (max-width: 980px) { .desk-grid > *, .desk-grid > :nth-last-child(-n+2) { grid-column: span 3; } .desk-grid > :last-child { grid-column: 1 / -1; } }
@media (max-width: 600px) { .desk-grid > *, .desk-grid > :nth-last-child(-n+2), .desk-grid > :last-child { grid-column: 1 / -1; } }

/* Standards box inside the night band ------------------------------------ */
.standards-box { background: var(--paper-2); color: var(--ink-2); --heading: var(--ink); --text: var(--ink-2); --muted: #6F6A7A; border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: 6px 6px 0 var(--sun), 6px 6px 0 2px var(--ink); padding: clamp(22px, 3vw, 36px); }
.standards-box h3 { color: var(--ink); font-size: 1.05rem; margin: 0 0 2px; }
.standards-box .list { gap: 18px; }
.standards-box .list p { margin: 0; font-size: var(--fs-small); color: var(--ink-2); }
.band.night .standards-box a:not(.btn) { color: var(--blue); }
.band.night .stats { background: var(--paper-2); }
.band.night .stats > div { background: var(--paper-2); }
.band.night .stats > div:nth-child(even) { background: var(--lemon); }
.band.night .stats .l { color: #6F6A7A; }
.band.night .lead { color: rgba(255,247,230,.86); }

/* The generated "Latest" blocks -------------------------------------------
   tools/content.js writes these between the latest markers on the front page, always as a
   .grid.three. Two short lists, so they read as one compact strip: the columns follow the item
   count, the second heading steps down, and a lone Progress tile lies down as a row card on
   desktop instead of sitting in an empty three-column grid. */
#latest-newsroom { padding-bottom: 0; }
#latest-progress { padding-top: var(--s4); }
#latest-newsroom .section-head, #latest-progress .section-head { margin-bottom: var(--s3); }
#latest-progress .section-head h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); }
#latest-progress .section-head .label { display: none; } /* the same "Latest" kicker sits 300px above; the h2 carries the meaning. Drop this rule once content.js labels the two blocks differently. */
#latest-newsroom .grid.three, #latest-progress .grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
#latest-newsroom .tile h3, #latest-progress .tile h3 { font-size: 1.25rem; }
#latest-newsroom .tile p, #latest-progress .tile p { font-size: var(--fs-small); }
@media (min-width: 981px) {
  #latest-progress .tile:only-child { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "pill title foot" "pill dek foot"; column-gap: var(--s3); row-gap: 6px; align-items: center; }
  #latest-progress .tile:only-child .pill { grid-area: pill; align-self: start; }
  #latest-progress .tile:only-child h3 { grid-area: title; margin: 0; }
  #latest-progress .tile:only-child p { grid-area: dek; max-width: 60em; }
  #latest-progress .tile:only-child .foot { grid-area: foot; margin: 0; padding: 0; align-self: start; white-space: nowrap; }
}

/* Honest empty state ----------------------------------------------------- */
.empty { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: var(--s3) var(--s4); align-items: center; background: var(--lemon); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); padding: clamp(22px, 3vw, 36px); }
.empty .glyph { width: 132px; height: 132px; }
.empty .glyph svg { width: 100%; height: 100%; overflow: visible; }
.empty h3 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); }
.empty p { margin: 0; }
.empty p + p { margin-top: .6em; }
.empty .actions { margin-top: var(--s2); }
@media (max-width: 600px) { .empty { grid-template-columns: minmax(0, 1fr); } .empty .glyph { width: 96px; height: 96px; } }

/* The section's standard (ink tile with a sun label) ---------------------- */
.standard { gap: 14px; }
.standard .label { margin: 0; color: var(--sun); }
.standard p { font-size: 1.02rem; }
.standard ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: var(--fs-small); }

/* Corrections log -------------------------------------------------------- */
#log .log table.data { min-width: 720px; }           /* /corrections: the full-width log */
#corrections .log table.data { min-width: 540px; }   /* /standards: the log in its 7/12 column */
.log .none td { padding: 22px 12px; color: var(--muted); border-bottom: 1.5px solid var(--line); }
.log .none b { color: var(--ink); }
.log-note { font-size: var(--fs-small); color: var(--muted); max-width: 44em; margin: var(--s2) 0 0; }
.log-count { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-family: var(--display); font-weight: 900; font-size: clamp(2.6rem, 1.8rem + 3vw, 4.6rem); line-height: 1; color: var(--ink); letter-spacing: -.03em; font-variation-settings: "wdth" 78; }
.log-count small { font-family: var(--sans); font-weight: 700; font-size: .95rem; letter-spacing: 0; color: var(--muted); }

/* The route a piece takes: a drawn line above the five steps -------------- */
.route { margin-bottom: var(--s3); }
.route svg { width: 100%; height: auto; display: block; overflow: visible; }
@media (max-width: 980px) { .route { display: none; } }

/* Then and now: two numbers hugging the arrow, each label aligned under its number ----------
   The block is its own container, so the numerals scale to the panel they sit in. */
.then-now { container-type: inline-size; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: var(--s2); align-items: center; }
.then-now > div:first-child { text-align: right; }
.then-now > div:last-child { text-align: left; }
.then-now .num { font-family: var(--display); font-weight: 900; font-size: clamp(2.2rem, 8.5cqi, 4.6rem); line-height: 1; letter-spacing: -.03em; color: var(--ink); font-variation-settings: "wdth" 78; font-variant-numeric: tabular-nums; }
.then-now .l { font-size: var(--fs-small); color: var(--muted); margin-top: 8px; max-width: 14em; }
.then-now > div:first-child .l { margin-left: auto; }
.then-now .to { font-family: var(--display); font-weight: 900; font-size: clamp(2.2rem, 8.5cqi, 4.6rem); color: var(--red); line-height: 1; padding-inline: var(--s1); align-self: start; } /* same size and line as the numerals, so the arrow sits on their line, not the labels' */
@media (max-width: 600px) {
  .then-now { grid-template-columns: minmax(0, 1fr); row-gap: var(--s2); }
  .then-now > div:first-child, .then-now > div:last-child { text-align: center; }
  .then-now .l { margin-inline: auto; }
  .then-now .to { justify-self: center; width: max-content; transform: rotate(90deg); padding: 0; } /* shrink to the glyph before rotating, or the stretched box turns on its centre and carries the arrow away */
}

/* Letter anatomy: the Friday letter's template, as a drawn-in-HTML mock ---- */
.letter { border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--paper-2); box-shadow: var(--shadow-lg); overflow: hidden; min-width: 0; }
.letter .lm-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 18px; border-bottom: var(--bw) solid var(--ink); background: var(--sand); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.letter .lm-body { padding: clamp(16px, 2.4vw, 26px); display: grid; gap: 12px; }
.letter .lm-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px; border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--paper); }
.letter .lm-item .n { width: 32px; height: 32px; border: var(--bw) solid var(--ink); border-radius: 2px; background: var(--sun); display: grid; place-items: center; font-family: var(--display); font-weight: 900; color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.letter .lm-item b { display: block; color: var(--ink); font-size: .95rem; line-height: 1.3; }
.letter .lines { display: grid; gap: 7px; margin-top: 10px; }
.letter .lines i { display: block; height: 8px; border-radius: 4px; background: var(--line); }
.letter .lines i:nth-child(1) { width: 94%; } .letter .lines i:nth-child(2) { width: 82%; } .letter .lines i:nth-child(3) { width: 58%; }
.letter .src { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.letter .src span { border: 1.5px solid var(--ink); border-radius: 2px; padding: 3px 8px; background: var(--mint); font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.letter .src span:first-child { background: var(--sky); } .letter .src span:nth-child(2) { background: var(--lemon); } .letter .src span:last-child { background: var(--rose); }
.letter .lm-more { font-size: .84rem; color: var(--muted); padding: 4px 2px 0; }

/* Timeline additions for /latest ------------------------------------------- */
.timeline .entry { display: grid; gap: 6px; }
.timeline .entry h3 { margin: 0; font-size: 1.15rem; }
.timeline .entry p { margin: 0; color: var(--ink-2); max-width: 44em; }
.timeline .entry .kind { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Hero refinements for this site ------------------------------------------ */
.hero .art.framed.pop.in { transform: rotate(1.5deg); }
.hero .caption .live-dot { width: 8px; height: 8px; }
.hero .lead { max-width: 32em; }

/* Story thumbs drawn inline on the explainers page -------------------------- */
.story .thumb svg { width: 100%; height: 100%; display: block; }

/* Pitch page: what we do not commission ------------------------------------- */
.nots { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: var(--fs-small); }
.nots li { display: flex; gap: 10px; align-items: flex-start; }
.nots li::before { content: "×"; flex: none; width: 20px; height: 20px; border: 1.5px solid var(--ink); border-radius: 2px; background: var(--rose); color: var(--ink); font-weight: 900; font-size: .85rem; line-height: 1; display: grid; place-items: center; margin-top: 2px; }

/* Keep every reveal and pop honest under reduced motion (the shared sheet does the shared classes) */
@media (prefers-reduced-motion: reduce) {
  .then-now .to { transition: none; }
}
