/* Record page — Crust News standing records.
   Loaded only by custom-record.hbs. Everything namespaced under .record;
   nothing here may leak into Meridian. No radius, no shadows, no gradients. */

.record{
  --bone:#EDE7DC;
  --ink:#15120F;
  --mute:#5C554C;
  --red:#D9231B;
  --rule:#15120F1f;
  --font-display:'Anton', 'Arial Narrow', sans-serif;
  --font-body:'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:'Spline Sans Mono', 'SFMono-Regular', Menlo, monospace;

  background:var(--bone);
  color:var(--ink);
  font-family:var(--font-body);
  padding:0 clamp(16px, 4vw, 48px) clamp(48px, 8vw, 96px);
}
.record *,
.record *::before,
.record *::after{ box-sizing:border-box; border-radius:0 !important; box-shadow:none !important; }

.record a{ color:inherit; text-decoration-color:var(--red); text-underline-offset:2px; }
.record a:hover{ color:var(--red); }
.record :focus-visible{ outline:2px solid var(--red); outline-offset:2px; }

.record-mono{
  font-family:var(--font-mono);
  font-size:11px; font-weight:600;
  letter-spacing:.12em; text-transform:uppercase;
  color:var(--mute);
}

/* ---------- hero ---------- */
.record-hero{
  max-width:880px; margin:0 auto;
  padding:clamp(40px, 7vw, 88px) 0 clamp(24px, 4vw, 40px);
  border-bottom:3px solid var(--ink);
}
.record-eyebrow{
  display:flex; justify-content:space-between; align-items:baseline; gap:16px;
  padding-bottom:18px;
}
.record-eyebrow .record-mono:first-child{ color:var(--red); }
.record-title{
  font-family:var(--font-display);
  font-weight:400;
  font-size:clamp(44px, 9vw, 92px);
  line-height:.95;
  letter-spacing:.01em;
  text-transform:uppercase;
  margin:0 0 18px;
}
.record-standfirst{
  font-size:clamp(17px, 2.2vw, 21px);
  line-height:1.45;
  font-weight:400;
  max-width:640px;
  margin:0 0 6px;
  color:var(--ink);
}

/* ---------- shared section chrome ---------- */
.record-block{
  max-width:880px; margin:0 auto;
  padding:clamp(28px, 5vw, 52px) 0;
  border-bottom:1px solid var(--rule);
}
.record-sec{
  font-family:var(--font-display);
  font-weight:400;
  font-size:clamp(20px, 3vw, 27px);
  letter-spacing:.03em;
  text-transform:uppercase;
  margin:0 0 6px;
}
.record-sec::before{
  content:"";
  display:inline-block;
  width:12px; height:12px;
  background:var(--red);
  margin-right:12px;
  transform:translateY(-1px);
}
.record-secnote{
  font-family:var(--font-mono);
  font-size:12px; line-height:1.55;
  color:var(--mute);
  margin:0 0 26px;
  max-width:560px;
}

/* ---------- ledger ---------- */
.record-ledger{ display:block; }
.record-row{
  display:flex; align-items:baseline; gap:10px;
  padding:13px 0;
  border-bottom:1px dotted var(--rule);
}
.record-row:last-child{ border-bottom:0; }
.record-row-label{
  font-weight:600; font-size:15px; line-height:1.3;
  flex:none; max-width:55%;
}
.record-row-sub{ display:block; font-family:var(--font-mono); font-weight:400; font-size:11px; color:var(--mute); letter-spacing:.04em; margin-top:2px; }
.record-leader{
  flex:1; min-width:24px;
  border-bottom:1px dotted var(--mute);
  transform:translateY(-4px);
  opacity:.5;
}
.record-row-value{
  font-family:var(--font-mono);
  font-weight:600; font-size:clamp(17px, 2.6vw, 22px);
  letter-spacing:.01em;
  text-align:right; flex:none;
  font-variant-numeric:tabular-nums;
}
.record-row--floor .record-row-value{ color:var(--red); }
.record-row-floor-mark{
  font-family:var(--font-mono); font-size:10px; font-weight:600;
  letter-spacing:.1em; text-transform:uppercase; color:var(--red);
  border:1px solid var(--red);
  padding:2px 5px; margin-left:8px;
  vertical-align:2px;
  white-space:nowrap;
}
.record-row-src{
  display:block; width:100%;
  font-family:var(--font-mono); font-size:11px; color:var(--mute);
  letter-spacing:.03em; margin-top:4px;
}
.record-fallback{ font-family:var(--font-mono); font-size:13px; color:var(--mute); }

/* ---------- fronts ---------- */
.record-fronts{ display:flex; flex-wrap:wrap; gap:0; border:1px solid var(--ink); }
.record-front{
  appearance:none;
  font-family:var(--font-mono); font-size:12px; font-weight:600;
  letter-spacing:.06em; text-transform:uppercase;
  background:transparent; color:var(--ink);
  border:0; border-right:1px solid var(--ink);
  padding:14px 18px;
  cursor:pointer;
  display:flex; flex-direction:column; align-items:flex-start; gap:5px;
  flex:1 1 auto; min-width:150px;
  text-align:left;
  transition:background 120ms ease, color 120ms ease;
}
.record-front:last-child{ border-right:0; }
.record-front[aria-pressed="true"]{ background:var(--ink); color:var(--bone); }
.record-front[aria-pressed="true"] .record-front-status{ color:var(--bone); opacity:.75; }
.record-front-name{ font-family:var(--font-display); font-size:17px; font-weight:400; letter-spacing:.04em; }
.record-front-status{ font-weight:400; font-size:10px; letter-spacing:.08em; color:var(--mute); line-height:1.4; }
.record-front-count{ font-size:11px; color:var(--red); }
.record-front[aria-pressed="true"] .record-front-count{ color:var(--bone); }

/* ---------- standing brief ---------- */
.record-brief-body{
  font-size:16px; line-height:1.65;
  max-width:640px;
}
.record-brief-body h2{
  font-family:var(--font-display); font-weight:400;
  font-size:20px; letter-spacing:.03em; text-transform:uppercase;
  margin:1.6em 0 .5em;
}
.record-brief-body h3{ font-weight:700; font-size:16px; margin:1.4em 0 .4em; }
.record-brief-body p{ margin:0 0 1em; }
.record-brief-body a{ color:var(--red); }
.record-brief-body blockquote{
  border-left:3px solid var(--red);
  margin:1.2em 0; padding:.2em 0 .2em 1em;
  color:var(--mute);
}
.record-brief-body details{ border:1px solid var(--rule); border-left:3px solid var(--ink); margin:0 0 10px; }
.record-brief-body details summary{
  cursor:pointer; padding:12px 14px;
  font-family:var(--font-display); font-size:17px; font-weight:400;
  letter-spacing:.03em; text-transform:uppercase;
  list-style:none;
}
.record-brief-body details summary::-webkit-details-marker{ display:none; }
.record-brief-body details summary::before{ content:"+"; font-family:var(--font-mono); color:var(--red); margin-right:10px; }
.record-brief-body details[open] summary::before{ content:"\2212"; }
.record-brief-body details > div{ padding:2px 14px 12px; }

/* ---------- the feed ---------- */
.record-feed{ position:relative; padding-left:22px; }
.record-feed::before{
  content:"";
  position:absolute; left:4px; top:8px; bottom:8px;
  width:1px; background:var(--ink); opacity:.35;
}
.record-entry{
  position:relative;
  padding:16px 0 18px;
  border-bottom:1px dotted var(--rule);
}
.record-entry::before{
  content:"";
  position:absolute; left:-22px; top:23px;
  width:9px; height:9px;
  background:var(--ink);
}
.record-entry[hidden]{ display:none; }
.record-when time{
  font-family:var(--font-mono); font-size:11px; font-weight:600;
  letter-spacing:.08em; text-transform:uppercase; color:var(--red);
}
.record-entry-title{
  font-size:clamp(17px, 2.4vw, 20px); font-weight:700; line-height:1.3;
  margin:4px 0 6px;
}
.record-entry-title a{ text-decoration:none; }
.record-entry-title a:hover{ text-decoration:underline; text-decoration-color:var(--red); }
.record-changed{ font-size:14px; line-height:1.55; color:var(--mute); margin:0 0 8px; max-width:600px; }
.record-tags{ display:flex; flex-wrap:wrap; gap:6px; }
.record-tag{
  font-family:var(--font-mono); font-size:10px; font-weight:600;
  letter-spacing:.08em; text-transform:uppercase;
  border:1px solid var(--rule); color:var(--mute);
  padding:3px 7px;
}
.record-empty{ font-family:var(--font-mono); font-size:13px; color:var(--mute); }

/* ---------- sources ---------- */
.record-sources{ font-family:var(--font-mono); font-size:12px; line-height:1.6; color:var(--mute); }
.record-source{ display:flex; gap:10px; align-items:baseline; padding:8px 0; border-bottom:1px dotted var(--rule); }
.record-source:last-child{ border-bottom:0; }
.record-source-name{ color:var(--ink); font-weight:600; }
.record-source .record-leader{ transform:translateY(-3px); }

/* ---------- responsive ---------- */
@media (max-width:560px){
  .record-eyebrow{ flex-direction:column; gap:6px; }
  .record-row{ flex-wrap:wrap; }
  .record-row-label{ max-width:100%; flex:1 1 100%; }
  .record-leader{ display:none; }
  .record-row-value{ text-align:left; }
  .record-front{ min-width:100%; border-right:0; border-bottom:1px solid var(--ink); }
  .record-front:last-child{ border-bottom:0; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce){
  .record *, .record *::before, .record *::after{ transition:none !important; animation:none !important; }
}

/* ==================== context pages (custom-context.hbs) ====================
   Same tokens, same flat language. Everything below is namespaced .ctx- and
   only appears on pages using the Context template. */

.ctx-ticker{
  display:flex; align-items:stretch;
  max-width:880px; margin:0 auto;
  border-bottom:3px solid var(--red);
  background:var(--ink); color:var(--bone);
  overflow:hidden;
}
.ctx-ticker-label{
  flex:none; display:flex; align-items:center; gap:9px;
  position:relative; z-index:2; /* occlude the sliding track */
  padding:12px 16px; background:var(--red); color:var(--bone);
  font-family:var(--font-display); font-size:12px; letter-spacing:.12em; text-transform:uppercase;
}
.ctx-ticker-dot{ width:7px; height:7px; background:var(--bone); animation:ctxpulse 1.4s ease-in-out infinite; }
@keyframes ctxpulse{ 50%{ opacity:.25; } }
.ctx-ticker-track{
  flex:none; display:inline-flex; align-items:center; white-space:nowrap;
  padding:0 24px 0 16px;
}
.is-rolling .ctx-ticker-track{ animation:ctxroll 55s linear infinite; will-change:transform; }
.is-rolling:hover .ctx-ticker-track{ animation-play-state:paused; }
@keyframes ctxroll{ to{ transform:translateX(-100%); } }
.ctx-tick{ display:inline-flex; align-items:baseline; gap:9px; padding-right:38px; }
.ctx-tick time{
  font-family:var(--font-mono); font-size:10px; font-weight:600;
  letter-spacing:.08em; text-transform:uppercase; color:var(--red);
}
.ctx-tick a{ color:var(--bone); text-decoration:none; font-size:13px; font-weight:500; }
.ctx-tick a:hover{ color:var(--red); }
.ctx-tick em{
  font-style:normal; font-family:var(--font-mono); font-size:9px; font-weight:600;
  letter-spacing:.1em; text-transform:uppercase;
  border:1px solid var(--red); color:var(--red); padding:1px 5px;
}

.ctx-figures{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:0;
  border:1px solid var(--ink);
}
.ctx-figure{
  display:flex; flex-direction:column; gap:4px;
  padding:18px 18px 14px; border-right:1px solid var(--ink); border-bottom:1px solid var(--ink);
}
.ctx-figure-value{
  font-family:var(--font-mono); font-weight:600;
  font-size:clamp(24px, 4vw, 34px); letter-spacing:.01em;
  font-variant-numeric:tabular-nums;
}
.ctx-figure--floor .ctx-figure-value{ color:var(--red); }
.ctx-figure-label{ font-weight:600; font-size:13px; line-height:1.3; }
.ctx-figure-src{ font-family:var(--font-mono); font-size:10px; color:var(--mute); letter-spacing:.03em; }

.ctx-media{ display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:14px; }
.ctx-shot{ margin:0; border:1px solid var(--rule); background:#fff2; }
.ctx-shot img, .ctx-shot video{ display:block; width:100%; height:auto; }
.ctx-shot-cap{
  font-family:var(--font-mono); font-size:11px; line-height:1.5; color:var(--mute);
  padding:8px 10px; border-top:1px solid var(--rule);
}
.ctx-shot-credit{ color:var(--red); }

.ctx-related{ display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:14px; }
.ctx-record-card{
  display:flex; flex-direction:column; gap:6px;
  border:1px solid var(--ink); border-left:4px solid var(--red);
  padding:16px 18px; text-decoration:none; color:var(--ink);
  transition:background 120ms ease;
}
.ctx-record-card:hover{ background:var(--ink); color:var(--bone); }
.ctx-record-card-eyebrow{
  font-family:var(--font-mono); font-size:9px; font-weight:600;
  letter-spacing:.14em; text-transform:uppercase; color:var(--red);
}
.ctx-record-card-name{ font-family:var(--font-display); font-size:21px; letter-spacing:.02em; text-transform:uppercase; }
.ctx-record-card-note{ font-size:13px; line-height:1.45; color:var(--mute); }
.ctx-record-card:hover .ctx-record-card-note{ color:var(--bone); opacity:.8; }
.ctx-record-card-cta{ font-family:var(--font-mono); font-size:11px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; margin-top:4px; }

@media (max-width:560px){
  .ctx-ticker-label{ padding:10px 12px; }
}
@media (prefers-reduced-motion: reduce){
  .is-rolling .ctx-ticker-track{ animation:none; }
  .ctx-ticker-clone{ display:none; }
  .ctx-ticker{ overflow-x:auto; }
}

/* ==================== context v2: site-native palette + history ============
   Context pages sit on the site's own background (light and dark), not the
   record bone. Token remap scoped to .context only; components inherit. */

.record.context{
  --bone:#FFFFFF;
  --ink:#15120F;
  --mute:#5C554C;
  --rule:#15120F1f;
  background:transparent;
  color:var(--ink);
}
html.dark .record.context{
  --bone:#101216;
  --ink:#EDE7DC;
  --mute:#A79F93;
  --rule:#EDE7DC26;
}
/* NOTE: mode is keyed ONLY off Meridian's html.dark class (its single source
   of truth). A prefers-color-scheme media query here painted light text onto
   the light site when the OS was dark but the site was not. Never re-add it. */

/* latest: a plain list */
.ctx-latest{ display:flex; flex-direction:column; }
.ctx-latest .ctx-tick{
  display:flex; align-items:baseline; gap:12px;
  padding:10px 0; border-bottom:1px dotted var(--rule);
}
.ctx-latest .ctx-tick:last-child{ border-bottom:0; }
.ctx-latest .ctx-tick time{
  font-family:var(--font-mono); font-size:10px; font-weight:600;
  letter-spacing:.08em; text-transform:uppercase; color:var(--red); flex:none; min-width:52px;
}
.ctx-latest .ctx-tick a{ color:var(--ink); text-decoration:none; font-size:15px; font-weight:600; line-height:1.35; }
.ctx-latest .ctx-tick a:hover{ color:var(--red); }
.ctx-latest .ctx-tick em{
  font-style:normal; font-family:var(--font-mono); font-size:9px; font-weight:600;
  letter-spacing:.1em; text-transform:uppercase;
  border:1px solid var(--red); color:var(--red); padding:1px 5px; flex:none;
}

/* the history: era timeline */
.ctx-timeline{ position:relative; padding-left:26px; }
.ctx-timeline::before{
  content:""; position:absolute; left:5px; top:10px; bottom:10px;
  width:1px; background:var(--ink); opacity:.35;
}
.ctx-era{ position:relative; padding:0 0 34px; }
.ctx-era::before{
  content:""; position:absolute; left:-26px; top:8px;
  width:11px; height:11px; background:var(--red);
}
.ctx-era-head{ display:flex; align-items:baseline; gap:14px; flex-wrap:wrap; margin-bottom:6px; }
.ctx-era-year{
  font-family:var(--font-mono); font-weight:600; font-size:clamp(15px, 2vw, 17px);
  letter-spacing:.06em; color:var(--red);
}
.ctx-era-title{
  font-family:var(--font-display); font-weight:400;
  font-size:clamp(19px, 2.6vw, 24px); letter-spacing:.03em; text-transform:uppercase;
}
.ctx-era-text{ font-size:14px; line-height:1.6; color:var(--mute); max-width:600px; margin:0 0 8px; }
.ctx-era-link{
  display:inline-block; margin-top:8px;
  font-family:var(--font-mono); font-size:11px; font-weight:600;
  letter-spacing:.06em; text-transform:uppercase;
  color:var(--red); text-decoration:none; border-bottom:1px solid var(--red);
}

/* fact check */
.ctx-facts{ display:flex; flex-direction:column; gap:14px; }
.ctx-fact{ border:1px solid var(--rule); border-left:4px solid var(--red); padding:14px 16px; }
.ctx-fact-claimrow{ display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin-bottom:8px; }
.ctx-fact-verdict{
  flex:none; font-family:var(--font-mono); font-size:10px; font-weight:600;
  letter-spacing:.1em; text-transform:uppercase;
  background:var(--red); color:#EDE7DC; padding:3px 7px;
}
.ctx-fact-claim{ font-size:15px; font-weight:600; font-style:italic; color:var(--mute); }
.ctx-fact-fact{ font-size:14px; line-height:1.6; margin:0 0 6px; max-width:640px; }
.ctx-fact-src{ font-family:var(--font-mono); font-size:10px; color:var(--mute); letter-spacing:.04em; }

/* ==================== context v3: the card deck ==================== */

.ctx-deck{ padding-left:0; padding-right:0; }
.ctx-card{
  min-height:92svh;
  display:flex; flex-direction:column; justify-content:center;
  padding:clamp(28px, 5vw, 64px) clamp(16px, 4vw, 48px);
  border-bottom:1px solid var(--rule);
}
.ctx-card-inner{ width:100%; max-width:880px; margin:0 auto; }
.ctx-deck .record-block{ max-width:none; }
.ctx-deck .record-block .record-sec,
.ctx-deck .record-block .record-secnote{ max-width:880px; margin-left:auto; margin-right:auto; }
.ctx-deck > .record-block:last-child{ max-width:880px; margin:0 auto; min-height:0; }

/* card 1: the split screen */
.ctx-card--hero{ min-height:100svh; }
.ctx-split{
  width:100%; max-width:1120px; margin:0 auto;
  display:grid; grid-template-columns:1.15fr 0.85fr;
  gap:clamp(28px, 5vw, 72px);
  align-items:start;
}
.ctx-split-sec{
  font-family:var(--font-display); font-weight:400;
  font-size:clamp(17px, 2.2vw, 21px); letter-spacing:.04em; text-transform:uppercase;
  margin:26px 0 10px;
  padding-top:14px; border-top:3px solid var(--ink);
}
.ctx-split-right .ctx-split-sec{ margin-top:0; }
@media (max-width:899px){
  .ctx-split{ grid-template-columns:1fr; }
  .ctx-card--hero{ min-height:0; }
}

/* the chapter menu */
.ctx-menu{ list-style:none; margin:0; padding:0; counter-reset:ctxch; }
.ctx-menu-item{ counter-increment:ctxch; border-bottom:1px dotted var(--rule); }
.ctx-menu-link{
  display:flex; align-items:baseline; gap:12px;
  padding:11px 2px; text-decoration:none; color:var(--ink);
}
.ctx-menu-link::before{
  content:counter(ctxch, decimal-leading-zero);
  font-family:var(--font-mono); font-size:10px; font-weight:600;
  color:var(--red); flex:none; min-width:20px;
}
.ctx-menu-link:hover{ background:var(--ink); color:var(--bone); }
.ctx-menu-link:hover::before{ color:var(--red); }
.ctx-menu-era{
  font-family:var(--font-mono); font-size:10px; font-weight:600;
  letter-spacing:.06em; color:var(--mute); flex:none; min-width:74px;
}
.ctx-menu-link:hover .ctx-menu-era{ color:var(--bone); opacity:.7; }
.ctx-menu-title{ font-weight:600; font-size:14px; line-height:1.35; }

/* chapter cards */
.ctx-card--chapter .ctx-era-head{ margin-bottom:14px; }
.ctx-card--chapter .ctx-era-year{ font-size:clamp(17px, 2.4vw, 21px); }
.ctx-card--chapter .ctx-era-title{ font-size:clamp(26px, 4.5vw, 44px); }
.ctx-card--chapter .ctx-era-text{ font-size:clamp(14px, 1.8vw, 16px); max-width:640px; }
.ctx-card--chapter .record-row-label{ max-width:60%; }

/* ==================== context v4: visual pop ==================== */

/* card tones: token remap per band; red cards for the gravest chapters */
.ctx-tone-ink{
  background:#15120F;
  border-top:4px solid var(--red);
  --ink:#EDE7DC; --bone:#15120F; --mute:#A79F93; --rule:#EDE7DC26;
}
.ctx-tone-red{
  background:#D9231B;
  --ink:#EDE7DC; --bone:#15120F; --mute:#EDE7DCd9; --rule:#EDE7DC59; --red:#15120F;
}
.ctx-tone-red .ctx-era-year{ color:#15120F; }
.ctx-tone-red .record-row--floor .record-row-value{ color:#15120F; }

/* chapter cards: ghost year + counter + hero stat */
.ctx-card--chapter{ position:relative; overflow:hidden; }
.ctx-card--chapter .ctx-card-inner{ position:relative; z-index:1; }
.ctx-era-ghost{
  position:absolute; right:-2vw; top:50%; transform:translateY(-50%);
  font-family:var(--font-display); font-weight:400;
  font-size:clamp(140px, 30vw, 380px); line-height:1;
  letter-spacing:-.01em; color:var(--ink);
  opacity:.06; pointer-events:none; user-select:none; white-space:nowrap;
}
.ctx-tone-red .ctx-era-ghost{ color:#15120F; opacity:.12; }
.ctx-chapno{
  display:block;
  font-family:var(--font-mono); font-size:11px; font-weight:600;
  letter-spacing:.16em; text-transform:uppercase; color:var(--red);
  margin-bottom:14px;
}
.ctx-hero-stat{ margin:8px 0 18px; }
.ctx-hero-stat-value{
  display:block;
  font-family:var(--font-display); font-weight:400;
  font-size:clamp(56px, 11vw, 128px); line-height:.95; letter-spacing:.01em;
  color:var(--red);
}
.ctx-hero-stat-label{
  display:block; font-weight:700; font-size:clamp(15px, 2vw, 19px); margin-top:8px;
}
.ctx-hero-stat-sub{ display:block; font-family:var(--font-mono); font-size:11px; color:var(--mute); margin-top:3px; }
.ctx-hero-stat-src{ display:block; font-family:var(--font-mono); font-size:10px; letter-spacing:.04em; color:var(--mute); margin-top:6px; }

/* split hero pop */
.ctx-split-left .record-title{
  display:inline-block;
  border-bottom:8px solid var(--red);
  padding-bottom:6px;
}
.ctx-split-sec::before{
  content:""; display:inline-block; width:11px; height:11px;
  background:var(--red); margin-right:10px;
}
.ctx-menu-link::before{ color:var(--red); }

/* closer card: coverage | record snapshot */
.ctx-card--closer{ min-height:100svh; }
.ctx-split--closer{ align-items:stretch; }
.ctx-feedscroll{
  max-height:66svh; overflow-y:auto;
  padding-right:10px;
  scrollbar-width:thin; scrollbar-color:var(--red) transparent;
  overscroll-behavior:contain;
}
.ctx-feedscroll::-webkit-scrollbar{ width:4px; }
.ctx-feedscroll::-webkit-scrollbar-thumb{ background:var(--red); }
.ctx-snapgrid{
  display:grid; grid-template-columns:1fr 1fr; gap:0;
  border:1px solid var(--ink); margin-bottom:18px;
}
.ctx-snap-cell{
  display:flex; flex-direction:column; gap:3px;
  padding:16px 15px 12px;
  border-right:1px solid var(--ink); border-bottom:1px solid var(--ink);
}
.ctx-snap-value{
  font-family:var(--font-display); font-weight:400;
  font-size:clamp(26px, 3.6vw, 40px); line-height:1; color:var(--red);
}
.ctx-snap-label{ font-weight:600; font-size:12px; line-height:1.3; }
.ctx-snap-src{ font-family:var(--font-mono); font-size:9px; color:var(--mute); letter-spacing:.03em; }
.ctx-snap-cta{
  display:inline-flex; align-items:center; gap:9px;
  font-family:var(--font-mono); font-size:12px; font-weight:600;
  letter-spacing:.08em; text-transform:uppercase;
  background:var(--red); color:#EDE7DC;
  padding:14px 18px; text-decoration:none;
}
.ctx-snap-cta:hover{ background:var(--ink); color:var(--bone); }
@media (max-width:899px){
  .ctx-feedscroll{ max-height:none; overflow:visible; }
  .ctx-card--closer{ min-height:0; }
}

/* context v5: body-sourced chapters */
.ctx-bodyhost .ctx-body{ max-width:680px; }
.ctx-era-title--body{
  font-family:var(--font-display); font-weight:400;
  font-size:clamp(26px, 4.5vw, 44px); letter-spacing:.03em; text-transform:uppercase;
  line-height:1.05; margin:0 0 14px; scroll-margin-top:80px;
}
.ctx-card--open .record-brief-body{ font-size:clamp(16px, 2vw, 19px); line-height:1.6; }
.ctx-card--chapter .record-brief-body{ max-width:640px; }
.ctx-card--chapter .record-brief-body a{ color:var(--red); text-decoration-color:var(--red); }
.ctx-tone-red .record-brief-body a{ color:#15120F; text-decoration-color:#15120F; }
.ctx-reviewed{
  font-family:var(--font-mono) !important; font-size:11px !important;
  letter-spacing:.06em; text-transform:uppercase; color:var(--mute) !important;
  border-top:1px dotted var(--rule); padding-top:10px; margin-top:18px !important;
}

/* ==================== per-context skins ====================
   Every context page gets its own identity inside the family. The template
   stamps data-context="<slug>" on main; skins scope off it. Palestine keeps
   the default red editorial treatment. */

/* --- ICE: the cold case-file --- */
.record.context[data-context="ice"]{ --red:#3D7EA6; }
html.dark .record.context[data-context="ice"]{ --red:#6FAAD0; }
/* red is reserved: the tone-red card (the killings) keeps literal Crust red
   and becomes the only red on the page */
.record.context[data-context="ice"] .ctx-tone-red{ background:#D9231B; --red:#15120F; }
.record.context[data-context="ice"] .ctx-card{ border-bottom:1px dashed var(--rule); }
.record.context[data-context="ice"] .ctx-era-ghost{
  color:transparent;
  -webkit-text-stroke:2px var(--ink);
  opacity:.12;
}
.record.context[data-context="ice"] .ctx-tone-red .ctx-era-ghost{
  -webkit-text-stroke:2px #15120F; opacity:.18;
}
.record.context[data-context="ice"] .ctx-chapno{
  letter-spacing:.24em;
  border:1px solid var(--red);
  display:inline-block; padding:4px 8px;
}
.record.context[data-context="ice"] .ctx-split-left .record-title{
  border-bottom-style:double; border-bottom-width:9px;
}
.record.context[data-context="ice"] .ctx-menu-link::before{ content:counter(ctxch, decimal-leading-zero) "."; }

/* ==================== contrast fixes (audited) ====================
   Meridian's global heading color overrides card tokens: chapter titles on
   ink cards rendered black-on-black. Declare, never inherit, on our cards. */
.record .ctx-era-title, .record .ctx-era-title--body{ color:var(--ink); }
.record .ctx-era-year{ color:var(--red); }

/* dark-mode default accent lightened for text on near-black */
html.dark .record.context{ --red:#F0554A; }

/* chips get fixed, audited fg/bg pairs (never token-inherited) */
.record .ctx-fact-verdict{ background:#C11B14; color:#FFFFFF; }
.record .ctx-snap-cta{ background:#C11B14; color:#FFFFFF; }
.record .ctx-snap-cta:hover{ background:var(--ink); color:var(--bone); }

/* chapter chips on toned cards */
.ctx-tone-ink .ctx-chapno{ color:#FF8A7A; border-color:#FF8A7A; }
.ctx-tone-red .ctx-chapno{ color:#FFFFFF; border-color:#FFFFFF; }
.ctx-tone-red .ctx-reviewed{ color:#FFFFFF !important; }

/* ICE skin: darker steel in light mode for 4.5+ text; chips in steel */
.record.context[data-context="ice"]{ --red:#2B6489; }
html.dark .record.context[data-context="ice"]{ --red:#6FAAD0; }
.record.context[data-context="ice"] .ctx-fact-verdict,
.record.context[data-context="ice"] .ctx-snap-cta{ background:#2B6489; color:#FFFFFF; }
html.dark .record.context[data-context="ice"] .ctx-fact-verdict,
html.dark .record.context[data-context="ice"] .ctx-snap-cta{ background:#6FAAD0; color:#0E1114; }
.record.context[data-context="ice"] .ctx-tone-ink .ctx-chapno{ color:#7FB8DE; border-color:#7FB8DE; }

/* ==================== charts ==================== */
.ctx-chart{ margin:26px 0 6px; max-width:640px; }
.ctx-chart-title{
  font-family:var(--font-display); font-weight:400;
  font-size:16px; letter-spacing:.04em; text-transform:uppercase;
  margin-bottom:12px;
}
.ctx-chart svg{ width:100%; height:auto; display:block; overflow:visible; }
.ctx-chart-bar{ fill:var(--red); }
.ctx-chart-bar.is-accent{ fill:var(--ink); }
.ctx-chart-label{ font-family:var(--font-mono); font-size:11px; fill:var(--mute); letter-spacing:.04em; }
.ctx-chart-value{ font-family:var(--font-mono); font-size:13px; font-weight:600; fill:var(--ink); }
.ctx-chart-src{ display:block; font-family:var(--font-mono); font-size:10px; color:var(--mute); letter-spacing:.03em; margin-top:8px; }
.ctx-chart-legend{ display:block; font-family:var(--font-mono); font-size:11px; color:var(--ink); margin-top:8px; }
.ctx-waffle{ display:grid; grid-template-columns:repeat(20, 1fr); gap:3px; max-width:520px; }
.ctx-waffle-cell{ aspect-ratio:1; background:var(--rule); }
.ctx-waffle-cell.is-filled{ background:var(--red); }
.ctx-tone-red .ctx-chart-bar{ fill:#15120F; }
.ctx-tone-red .ctx-waffle-cell.is-filled{ background:#15120F; }

/* Meridian prose colors override card tokens inside toned cards (same class
   of bug as the invisible titles). Declare every prose element explicitly. */
.record .ctx-card .record-brief-body p,
.record .ctx-card .record-brief-body li,
.record .ctx-card .record-brief-body em,
.record .ctx-card .record-brief-body strong,
.record .ctx-card .record-brief-body blockquote{ color:var(--ink); }
.record .ctx-card .record-brief-body a{ color:var(--red); }
.ctx-tone-red .record-brief-body a{ color:#15120F; }

/* final audited pairs on toned cards (specificity must beat the forcing rules) */
.record .ctx-card.ctx-tone-red .record-brief-body p,
.record .ctx-card.ctx-tone-red .record-brief-body li,
.record .ctx-card.ctx-tone-red .ctx-era-text,
.record .ctx-card.ctx-tone-red .record-brief-body em,
.record .ctx-card.ctx-tone-red .record-brief-body strong{ color:#FFFFFF; }
.record .ctx-card.ctx-tone-red .record-brief-body a{ color:#FFFFFF; text-decoration:underline; text-decoration-color:#FFFFFF; }
.record .ctx-card.ctx-tone-ink .record-brief-body a{ color:#FF8A7A; text-decoration-color:#FF8A7A; }
.record.context[data-context="ice"] .ctx-card.ctx-tone-ink .record-brief-body a{ color:#7FB8DE; text-decoration-color:#7FB8DE; }

/* copy-link affordance + feed perf */
.ctx-anchorcopy{
  appearance:none; border:1px solid var(--rule); background:transparent;
  color:var(--mute); font-family:var(--font-mono); font-size:11px;
  padding:2px 7px; margin-left:12px; cursor:pointer; vertical-align:middle;
}
.ctx-anchorcopy:hover{ color:var(--red); border-color:var(--red); }
.record-entry{ content-visibility:auto; contain-intrinsic-size: 120px; }

/* ==================== topic channel pages (topic-*.hbs) ==================== */
.topic .topic-open{max-width:720px;margin:0 auto;padding:clamp(22px,4vw,40px) 0 clamp(16px,3vw,28px)}
.topic .topic-open p{font-size:clamp(17px,2.1vw,20px);line-height:1.6;margin:0 0 1em;color:var(--ink)}
.topic .topic-open p a{color:var(--red)}
.topic-rail{max-width:880px;margin:0 auto;padding:0 0 clamp(22px,4vw,34px);border-bottom:3px solid var(--ink)}
.topic-rail-label{display:block;font-family:var(--font-mono);font-size:11px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--red);margin-bottom:12px}
.topic-rail-list{list-style:none;margin:0;padding:0;columns:2;column-gap:30px;counter-reset:tr}
@media(max-width:560px){.topic-rail-list{columns:1}}
.topic-rail-list li{counter-increment:tr;break-inside:avoid}
.topic-rail-list a{display:flex;align-items:baseline;gap:10px;padding:9px 2px;text-decoration:none;color:var(--ink);font-size:14px;font-weight:600;line-height:1.3;border-bottom:1px dotted var(--rule)}
.topic-rail-list a::before{content:counter(tr,decimal-leading-zero);font-family:var(--font-mono);font-size:10px;font-weight:600;color:var(--red);flex:none;min-width:18px}
.topic-rail-list a:hover{color:var(--red)}
.topic-chapter{padding:clamp(22px,3vw,32px) 0;border-bottom:1px dotted var(--rule)}
.topic-chapter:last-child{border-bottom:0}
.topic-chapter-h{font-family:var(--font-display);font-weight:400;font-size:clamp(22px,3.4vw,32px);letter-spacing:.03em;text-transform:uppercase;line-height:1.05;margin:0 0 14px;scroll-margin-top:80px}
.topic-chapter p{font-size:16px;line-height:1.65;max-width:680px;margin:0 0 1em}
.topic-chapter p a{color:var(--red);text-decoration-color:var(--red)}
.topic-pager{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:26px;padding-top:18px;border-top:1px solid var(--rule);font-family:var(--font-mono);font-size:12px;letter-spacing:.06em;text-transform:uppercase}
.topic-pager .tp-pg{color:var(--red);text-decoration:none;font-weight:600;padding:8px 12px;border:1px solid var(--rule)}
.topic-pager .tp-pg:hover{border-color:var(--red)}
.topic-pager .tp-pg.is-off{color:var(--mute);opacity:.45;pointer-events:none}
.topic-pager .tp-pgnum{color:var(--mute)}

/* Ghost built-in pagination on topic pages */
.topic .pagination{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:26px;padding-top:18px;border-top:1px solid var(--rule);font-family:var(--font-mono);font-size:12px;letter-spacing:.06em;text-transform:uppercase}
.topic .pagination a{color:var(--red);text-decoration:none;font-weight:600;padding:8px 13px;border:1px solid var(--rule)}
.topic .pagination a:hover{border-color:var(--red)}
.topic .pagination .page-number{color:var(--mute)}

/* ---- toned chapter panels on the merged topic page (colour variants) ---- */
/* A chapter carrying a tone becomes a full colour panel, not a flat run of text.
   Every prose element gets a declared colour so nothing goes invisible. */
.topic-chapter.ctx-tone-ink,
.topic-chapter.ctx-tone-red{
  padding:clamp(24px,3.4vw,38px);
  margin:26px 0;
  border-radius:5px;
  border-bottom:0;
  max-width:none;
}
.topic-chapter.ctx-tone-ink{ background:#15120F; }
.topic-chapter.ctx-tone-red{ background:#D9231B; }
.topic-chapter.ctx-tone-ink .topic-chapter-h{ color:#FFFFFF; }
.topic-chapter.ctx-tone-ink p,
.topic-chapter.ctx-tone-ink li{ color:#E9E3D8; }
.topic-chapter.ctx-tone-ink p a{ color:#FF9E90; text-decoration-color:#FF9E90; }
.topic-chapter.ctx-tone-red .topic-chapter-h,
.topic-chapter.ctx-tone-red p,
.topic-chapter.ctx-tone-red li{ color:#FFFFFF; }
.topic-chapter.ctx-tone-red p a{ color:#15120F; text-decoration-color:#15120F; }
.topic-chapter.ctx-tone-ink .ctx-anchorcopy,
.topic-chapter.ctx-tone-red .ctx-anchorcopy{ color:inherit; border-color:currentColor; opacity:.6; }
.topic-chapter.ctx-tone-ink .ctx-reviewed,
.topic-chapter.ctx-tone-red .ctx-reviewed{ opacity:.7; }

/* charts sitting inside a toned panel need their own contrast */
.topic-chapter.ctx-tone-ink .ctx-chart-title{ color:#FFFFFF; }
.topic-chapter.ctx-tone-ink .ctx-chart-label{ fill:#B9B1A4; }
.topic-chapter.ctx-tone-ink .ctx-chart-value{ fill:#FFFFFF; }
.topic-chapter.ctx-tone-ink .ctx-chart-bar{ fill:#FF9E90; }
.topic-chapter.ctx-tone-ink .ctx-chart-bar.is-accent{ fill:#FFFFFF; }
.topic-chapter.ctx-tone-ink .ctx-chart-src,
.topic-chapter.ctx-tone-ink .ctx-chart-legend{ color:#C9C1B5; }
.topic-chapter.ctx-tone-ink .ctx-waffle-cell{ background:#3A352E; }
.topic-chapter.ctx-tone-ink .ctx-waffle-cell.is-filled{ background:#FF9E90; }
.topic-chapter.ctx-tone-red .ctx-chart-title,
.topic-chapter.ctx-tone-red .ctx-chart-legend,
.topic-chapter.ctx-tone-red .ctx-chart-src{ color:#FFFFFF; }
.topic-chapter.ctx-tone-red .ctx-chart-value{ fill:#FFFFFF; }
.topic-chapter.ctx-tone-red .ctx-chart-label{ fill:#FFFFFFcc; }
.topic-chapter.ctx-tone-red .ctx-waffle-cell{ background:#ffffff33; }
.topic-chapter.ctx-tone-red .ctx-waffle-cell.is-filled{ background:#FFFFFF; }
