/* Gold Ticker Live — dark editorial market theme.
   Deliberately dark-first: this is a market site, and a dark ground keeps the
   gold accent doing the work instead of a coloured background. */

:root {
  color-scheme: dark;

  --ink: #0b0c0f;
  --ink-2: #121419;
  --ink-3: #191c23;
  --line: #262b35;
  --line-soft: #1d222a;

  --text: #e8e9ec;
  --muted: #a0a6b2;
  /* 5.9:1 on --ink-2. The previous #6f7684 measured 4.42:1 and was used for
     labels, timestamps and publisher names — text a reader has to read. */
  --faint: #8a919e;

  --gold: #d8a13a;
  --gold-bright: #f0c064;
  --gold-soft: rgba(216, 161, 58, 0.12);

  --up: #4ec98a;
  --down: #f0656a;

  /* Status and chart colours, so the light palette can restate them. */
  --warn-ink: #f0a877;
  --warn-strong: #ffc79a;
  --stale: #e27826;
  --evening-ink: #9fb0e0;
  --weekly-ink: #c2a8ec;
  --chart-line: #f0c064;
  --chart-grid: #262b35;
  --chart-axis: #8a919e;

  --wrap: 1120px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* Light palette: an explicit choice wins; otherwise the system setting decides. */
:root[data-theme="light"] {
  color-scheme: light;
  --ink: #f6f4ef;
  --ink-2: #ffffff;
  --ink-3: #efebe2;
  --line: #d8d2c4;
  --line-soft: #e7e2d6;
  --text: #1c1f26;
  --muted: #4a505c;
  --faint: #5a616e;
  --gold: #a8721a;
  --gold-bright: #8a5b0c;
  --gold-soft: rgba(168, 114, 26, 0.12);
  --up: #17784a;
  --down: #b42328;
  --warn-ink: #8a4a10;
  --warn-strong: #7a3d0a;
  --stale: #b4580f;
  --evening-ink: #33447e;
  --weekly-ink: #5b3aa0;
  --chart-line: #8a5b0c;
  --chart-grid: #e0dacb;
  --chart-axis: #5a616e;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --ink: #f6f4ef;
    --ink-2: #ffffff;
    --ink-3: #efebe2;
    --line: #d8d2c4;
    --line-soft: #e7e2d6;
    --text: #1c1f26;
    --muted: #4a505c;
    --faint: #5a616e;
    --gold: #a8721a;
    --gold-bright: #8a5b0c;
    --gold-soft: rgba(168, 114, 26, 0.12);
    --up: #17784a;
    --down: #b42328;
    --warn-ink: #8a4a10;
    --warn-strong: #7a3d0a;
    --stale: #b4580f;
    --evening-ink: #33447e;
    --weekly-ink: #5b3aa0;
    --chart-line: #8a5b0c;
    --chart-grid: #e0dacb;
    --chart-axis: #5a616e;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-bright); text-decoration-color: rgba(240, 192, 100, 0.35); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.18; letter-spacing: -0.01em; margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--gold); color: #1a1204;
  padding: 10px 16px; z-index: 100; border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; border-radius: 2px; }

/* ------------------------------------------------------------------ header */

.site-head { border-bottom: 1px solid var(--line); background: var(--ink-2); }

.head-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap;
}
@media (max-width: 600px) {
  .head-inner { gap: 10px 16px; padding-top: 12px; padding-bottom: 12px; }
  main { padding-top: 24px; }
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 33% 30%, var(--gold-bright), #9a6a19 72%);
  box-shadow: 0 0 0 3px rgba(216, 161, 58, 0.14);
}
.brand-text { font-family: var(--serif); font-size: 1.32rem; font-weight: 600; letter-spacing: -0.015em; }
.brand-accent { color: var(--gold); }

.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 0.93rem;
  font-weight: 500; letter-spacing: 0.01em; padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--text); border-bottom-color: var(--gold); }
.nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--gold); }

.theme-toggle {
  font: inherit; font-size: 0.85rem; color: var(--muted); background: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; white-space: nowrap;
}
.theme-toggle:hover { color: var(--text); border-color: var(--gold); }
.theme-toggle[hidden] { display: none; }

/* -------------------------------------------------------------------- tape */

.tape { background: var(--ink); border-top: 1px solid var(--line-soft); overflow: hidden; }
.tape-inner {
  display: flex; gap: 30px; align-items: center;
  padding-top: 9px; padding-bottom: 9px;
  font-family: var(--mono); font-size: 0.83rem; white-space: nowrap;
  overflow-x: auto; scrollbar-width: none;
}
.tape-inner::-webkit-scrollbar { display: none; }
.tape-item { display: inline-flex; gap: 8px; align-items: baseline; }
.tape-k { color: var(--faint); letter-spacing: 0.06em; }
.tape-v { color: var(--text); font-variant-numeric: tabular-nums; }
.tape-c { font-variant-numeric: tabular-nums; }
.tape-meta { color: var(--faint); margin-left: auto; }

.dir-up, .tape-c.dir-up { color: var(--up); }
.dir-down, .tape-c.dir-down { color: var(--down); }
.dir-flat { color: var(--muted); }
.dir-glyph { font-size: 0.82em; line-height: 1; }

/* -------------------------------------------------------------------- lead */

main { padding: 44px 0 72px; }

.crumbs { font-size: 0.86rem; color: var(--faint); margin-bottom: 26px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--gold-bright); }

.edition-meta { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; font-size: 0.85rem; color: var(--faint); flex-wrap: wrap; }

.badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;
  border: 1px solid var(--line); color: var(--muted);
}
.badge--morning { border-color: rgba(216, 161, 58, 0.45); color: var(--gold-bright); background: var(--gold-soft); }
.badge--evening { border-color: rgba(120, 140, 200, 0.4); color: var(--evening-ink); background: rgba(120, 140, 200, 0.1); }

.lead-head { max-width: 46ch; margin-bottom: 36px; }
.lead-head h1 { font-size: clamp(2.1rem, 5.2vw, 3.35rem); }
.standfirst { font-size: 1.16rem; color: var(--muted); margin: 18px 0 0; line-height: 1.55; }

.page-head { max-width: 52ch; margin-bottom: 38px; }
.page-head h1 { font-size: clamp(1.9rem, 4.4vw, 2.8rem); }

.lead-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 52px; align-items: start; }
@media (max-width: 900px) { .lead-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; } }

.lead-main { max-width: 68ch; }
.lede {
  font-family: var(--serif); font-size: 1.28rem; line-height: 1.58;
  margin: 0 0 34px; padding-left: 20px; border-left: 3px solid var(--gold);
}

.digest-section { margin-bottom: 34px; }
.digest-section h2 { font-size: 1.45rem; margin-bottom: 12px; }
.digest-section p { margin: 0 0 14px; }

.src-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-soft); }
.src-list li { padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 0.9rem; }
.src-list a { text-decoration: none; }
.src-list a:hover { text-decoration: underline; }
.src-list--compact { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 24px; }
@media (min-width: 720px) { .src-list--compact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.src-list--compact li { font-size: 0.85rem; padding: 7px 0; }
.src-pub { color: var(--faint); font-size: 0.82rem; margin-left: 8px; white-space: nowrap; }

.watch { margin-top: 40px; padding: 24px 26px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; }
.watch h2 { font-size: 1.2rem; margin-bottom: 12px; }
.watch ul { margin: 0; padding-left: 20px; }
.watch li { margin-bottom: 8px; color: var(--muted); }

.notice {
  padding: 13px 16px; border-radius: 8px; margin: 0 0 26px;
  background: rgba(216, 161, 58, 0.09); border: 1px solid rgba(216, 161, 58, 0.28);
  color: var(--gold-bright); font-size: 0.9rem;
}

/* ------------------------------------------------------------------- price */

.price-card { background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.price-card--empty { padding: 20px; }
.price-main { padding: 22px 24px 20px; border-bottom: 1px solid var(--line); }
.price-label { margin: 0 0 8px; font-size: 0.74rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint); }
.price-big { margin: 0; font-family: var(--mono); font-size: 2.25rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.price-change { margin: 5px 0 0; font-family: var(--mono); font-size: 0.95rem; font-variant-numeric: tabular-nums; }

.price-rows { padding: 6px 24px 18px; }
.price-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 0.89rem; }
.price-row:last-child { border-bottom: 0; }
.price-row span:first-child { color: var(--faint); }
.price-row span:last-child { font-variant-numeric: tabular-nums; }

.price-wide { max-width: 520px; margin-bottom: 44px; }

.side-card { margin-top: 22px; padding: 20px 22px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; }
.side-card h3 { font-size: 1.06rem; margin-bottom: 9px; }

.btn {
  display: inline-block; margin-top: 14px; padding: 10px 18px; border-radius: 8px;
  background: var(--gold); color: #1a1204; font-weight: 600; font-size: 0.9rem; text-decoration: none;
}
.btn:hover { background: var(--gold-bright); }

/* ------------------------------------------------------------------ blocks */

.block { margin-top: 58px; }
.block-h {
  font-size: 1.28rem; padding-bottom: 12px; margin-bottom: 20px;
  border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 12px;
}
.count { font-family: var(--mono); font-size: 0.8rem; color: var(--faint); font-weight: 400; }

.hl-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 42px;
}
@media (max-width: 760px) { .hl-list { grid-template-columns: 1fr; } }
.hl { padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.hl-title { display: block; text-decoration: none; color: var(--text); font-size: 0.97rem; line-height: 1.45; }
.hl-title:hover { color: var(--gold-bright); }
.hl-meta { display: block; margin-top: 4px; font-size: 0.78rem; color: var(--faint); }

.ed-list { list-style: none; margin: 0; padding: 0; }
.ed-list li { border-bottom: 1px solid var(--line-soft); }
.ed-list a {
  display: grid; grid-template-columns: 210px minmax(0, 1fr) auto;
  gap: 20px; align-items: baseline; padding: 15px 0; text-decoration: none; color: var(--text);
}
@media (max-width: 720px) { .ed-list a { grid-template-columns: 1fr; gap: 5px; } }
.ed-list a:hover .ed-head { color: var(--gold-bright); }
.ed-when { color: var(--faint); font-size: 0.83rem; font-family: var(--mono); }
.ed-head { font-family: var(--serif); font-size: 1.1rem; }
.ed-price { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.more { font-size: 0.92rem; text-decoration: none; }
.more:hover { text-decoration: underline; }

.pager { display: flex; justify-content: space-between; gap: 20px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 0.92rem; }
.pager a { text-decoration: none; }
.pager a:hover { text-decoration: underline; }

.empty { padding: 64px 0; max-width: 52ch; }
.empty h1 { font-size: 2rem; margin-bottom: 14px; }

/* ------------------------------------------------------------------- prose */

.prose { max-width: 68ch; }
.prose h2 { font-size: 1.4rem; margin: 38px 0 12px; }
.prose p { margin: 0 0 16px; }
.prose ul { padding-left: 20px; margin: 0 0 16px; }
.prose li { margin-bottom: 9px; }

.defs { margin: 0; }
.defs dt { font-family: var(--serif); font-size: 1.08rem; color: var(--gold-bright); margin-top: 18px; }
.defs dd { margin: 5px 0 0; color: var(--muted); }

/* ------------------------------------------------------------------ footer */

.site-foot { border-top: 1px solid var(--line); background: var(--ink-2); padding: 46px 0 30px; margin-top: 40px; }
.foot-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 42px; }
@media (max-width: 760px) { .foot-inner { grid-template-columns: 1fr; gap: 30px; } }
.foot-brand { font-family: var(--serif); font-size: 1.16rem; margin: 0 0 8px; }
.foot-h { font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin: 0 0 12px; }
.foot-col a { display: block; color: var(--muted); text-decoration: none; font-size: 0.92rem; padding: 4px 0; }
.foot-col a:hover { color: var(--gold-bright); }
.foot-col p a { display: inline; color: var(--gold-bright); }
.foot-legal { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.foot-legal p { margin: 0; }

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


/* ------------------------------------------------- masthead & home layout */

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 52px; align-items: start; }
@media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; gap: 36px; } }

.ed-card {
  background: var(--ink-2); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 12px; padding: 26px 28px 24px;
}
.ed-card-meta { display: flex; gap: 14px; align-items: center; margin: 0 0 14px; font-size: 0.85rem; color: var(--faint); flex-wrap: wrap; }
.ed-card-h { font-size: clamp(1.5rem, 3.2vw, 2rem); margin-bottom: 12px; }
.ed-card-h a { color: var(--text); text-decoration: none; }
.ed-card-h a:hover { color: var(--gold-bright); }
.ed-card-stand { color: var(--muted); margin: 0 0 20px; font-size: 1.05rem; }
.ed-card-cta { display: flex; align-items: center; gap: 18px; margin: 0; flex-wrap: wrap; }
.ed-card-count { font-size: 0.83rem; color: var(--faint); font-family: var(--mono); }

.btn--primary { background: var(--gold); color: #1a1204; margin-top: 0; }
.btn--primary:hover { background: var(--gold-bright); }

/* Secondary, text-only affordance — used for outbound and utility links so the
   primary inward CTA is the only filled button on the page. */
.link-more { display: block; margin-top: 10px; font-size: 0.89rem; text-decoration: none; }
.link-more:hover { text-decoration: underline; }
.side-card--quiet { background: transparent; }

/* --------------------------------------------------------- state messaging */

/* Deliberately NOT in the brand gold family — a warning must not read as a
   promo band. Amber for a fault, neutral grey for an expected closure. */
.statebar {
  margin: 0 0 26px; padding: 12px 16px; border-radius: 8px; font-size: 0.9rem;
  background: var(--ink-3); border: 1px solid var(--line); color: var(--muted);
}
.statebar strong { color: var(--text); }
.statebar--warn {
  background: rgba(226, 120, 38, 0.1); border-color: rgba(226, 120, 38, 0.42); color: var(--warn-ink);
}
.statebar--warn strong { color: var(--warn-strong); }

.price-state { margin: 10px 0 0; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); }
.price-state.is-warn { color: var(--warn-ink); }

/* ------------------------------------------------------- metal-value calculator */

.calc { margin: 40px 0 0; padding: 22px 24px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; }
.calc .block-h { margin-top: 0; }
.calc-result { font-size: 1.05rem; margin: 0 0 14px; }
.calc-result strong { color: var(--gold-bright); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.calc-form { display: none; gap: 14px; margin: 0 0 14px; }
.calc--on .calc-form { display: grid; }
@media (min-width: 640px) { .calc-form { grid-template-columns: 1fr 1fr 1fr; } }
.calc-field { display: grid; gap: 6px; font-size: 0.85rem; color: var(--muted); min-width: 0; }
.calc-field input, .calc-field select {
  font: inherit; font-size: 1rem; color: var(--text); background: var(--ink); width: 100%; min-width: 0;
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px;
}
.calc-note { margin: 0; }

/* ------------------------------------------------------------- subscribe */

.subscribe { display: grid; gap: 8px; margin-top: 12px; }
.subscribe input[type="email"] {
  font: inherit; font-size: 1rem; color: var(--text); background: var(--ink); width: 100%; min-width: 0;
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px;
}
.subscribe .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------- conversions */

.convert {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; margin: 30px 0 8px; background: var(--line);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.convert-cell { background: var(--ink-2); padding: 15px 18px; display: flex; flex-direction: column; gap: 5px; }
.convert-k { font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.convert-v { font-family: var(--mono); font-size: 1.12rem; font-variant-numeric: tabular-nums; }

.byline { margin: 18px 0 0; font-size: 0.9rem; color: var(--faint); }
.byline a { color: var(--muted); }

/* --------------------------------------------------------- tape, idle state */

/* Outside trading hours the change figures keep their sign but lose their
   colour and glyph: a green ▲ on a two-day-old close reads as live movement. */
.tape-c.is-idle { color: var(--faint); }
.tape--idle .tape-v { color: var(--muted); }
.tape-meta time { color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* -------------------------------------------------------------- price as-of */

/* The one line that says what moment the figure describes. It replaced three
   rows of our own vocabulary — "Last tick", "Fetched", "Session". */
.price-asof {
  display: flex; gap: 9px; align-items: baseline;
  margin: 14px 0 0; font-size: 0.84rem; line-height: 1.5; color: var(--muted);
}
.asof-dot {
  flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--faint); transform: translateY(-1px);
}
.price-asof--live .asof-dot { background: var(--up); box-shadow: 0 0 0 3px rgba(78, 201, 138, 0.16); }
.price-asof--stale .asof-dot { background: var(--stale); box-shadow: 0 0 0 3px rgba(226, 120, 38, 0.18); }
.price-asof--stale { color: var(--warn-ink); }
.asof-why { color: var(--faint); }

.price-change-note { color: var(--faint); font-family: var(--sans); font-size: 0.82rem; }
.price-change.dir-idle { color: var(--muted); }
.price-note {
  margin: 12px 0 0; font-size: 0.78rem; color: var(--faint); line-height: 1.5;
}
.price-note time { color: inherit; }

.price-spark { margin: 16px -24px -20px; }
.price-spark .spark-svg { display: block; width: 100%; height: 62px; }

.spark-note {
  display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap;
  margin-top: 12px; font-size: 0.84rem; text-decoration: none; color: var(--muted);
}
.spark-range { color: var(--faint); font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.spark-note .spark-more { margin-left: auto; color: var(--gold-bright); }
.spark-note:hover .spark-more { text-decoration: underline; }

/* --------------------------------------------------------------- home hero */

/* Two columns: the promise on the left held to a couple of lines, the product
   — a live price with a month of shape — on the right. The edition card below
   then starts inside the first screen instead of under a full-width tagline. */
.masthead {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: 44px; align-items: center; max-width: none; margin-bottom: 40px;
}
/* `ch` on the wrapper would resolve against body text, not the display size —
   that is what squeezed the headline into five lines. The measure belongs on
   the h1, where a ch is an h1 character. */
.masthead-text { max-width: 34rem; }
.masthead h1 { font-size: clamp(2.1rem, 4.6vw, 3rem); max-width: 18ch; }
.masthead .standfirst { max-width: 48ch; font-size: 1.08rem; margin-top: 14px; }
@media (max-width: 900px) {
  .masthead { grid-template-columns: 1fr; gap: 28px; }
  .masthead .standfirst { max-width: none; }
}

.side-card--first { margin-top: 0; }

/* ------------------------------------------------------------------- chart */

.price-lead { display: grid; grid-template-columns: 370px minmax(0, 1fr); gap: 32px; align-items: start; margin-bottom: 44px; }
@media (max-width: 900px) { .price-lead { grid-template-columns: 1fr; } }
.price-lead .price-wide { max-width: none; margin-bottom: 0; }

.chartbox { background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px 18px; }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.chart-h { font-size: 1.15rem; }

.chart-tabs { display: flex; gap: 4px; }
.chart-tab {
  padding: 5px 12px; border-radius: 999px; cursor: pointer;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em;
  color: var(--muted); border: 1px solid transparent; user-select: none;
}
.chart-tab:hover { color: var(--text); border-color: var(--line); }

/* Panels are all in the page; a hidden radio decides which one shows, so
   switching range costs no request and no JavaScript. */
.chart-panel { display: none; margin: 0; position: relative; }
#cr-1W:checked ~ .chart-head .chart-tabs [for="cr-1W"],
#cr-1M:checked ~ .chart-head .chart-tabs [for="cr-1M"],
#cr-6M:checked ~ .chart-head .chart-tabs [for="cr-6M"],
#cr-1Y:checked ~ .chart-head .chart-tabs [for="cr-1Y"],
#cr-5Y:checked ~ .chart-head .chart-tabs [for="cr-5Y"] {
  background: var(--gold-soft); border-color: rgba(216, 161, 58, 0.45); color: var(--gold-bright);
}
#cr-1W:checked ~ .chart-panels [data-range="1W"],
#cr-1M:checked ~ .chart-panels [data-range="1M"],
#cr-6M:checked ~ .chart-panels [data-range="6M"],
#cr-1Y:checked ~ .chart-panels [data-range="1Y"],
#cr-5Y:checked ~ .chart-panels [data-range="5Y"] { display: block; }

.chart-radio:focus-visible ~ .chart-head .chart-tabs label { outline: 1px dashed var(--line); }
#cr-1W:focus-visible ~ .chart-head .chart-tabs [for="cr-1W"],
#cr-1M:focus-visible ~ .chart-head .chart-tabs [for="cr-1M"],
#cr-6M:focus-visible ~ .chart-head .chart-tabs [for="cr-6M"],
#cr-1Y:focus-visible ~ .chart-head .chart-tabs [for="cr-1Y"],
#cr-5Y:focus-visible ~ .chart-head .chart-tabs [for="cr-5Y"] {
  outline: 2px solid var(--gold-bright); outline-offset: 2px;
}

.chart-cap { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin: 10px 0 2px; font-size: 0.85rem; color: var(--faint); }
.chart-cap-move { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.chart-cap-desc { color: var(--faint); }
.chart-svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.chart-foot { margin: 10px 0 0; }

/* A single chart with no range tabs — a month's closes. The plot is the
   positioning box the hover tooltip in public/js/chart.js anchors to. */
.chartbox--solo { margin: 30px 0 0; }
.chart-plot { position: relative; }

.chart-cursor line { stroke: var(--faint); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-cursor circle { fill: var(--gold-bright); stroke: var(--ink-2); stroke-width: 2; }

/* `display:flex` would otherwise beat the hidden attribute and park an empty
   tooltip over the caption. */
.chart-tip[hidden] { display: none; }
.chart-tip {
  position: absolute; top: 0; pointer-events: none; z-index: 2;
  display: flex; flex-direction: column; gap: 1px; padding: 7px 11px;
  background: var(--ink-3); border: 1px solid var(--line); border-radius: 8px;
  font-size: 0.82rem; white-space: nowrap;
}
.chart-tip-v { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.chart-tip-d { color: var(--faint); font-size: 0.76rem; }

/* --------------------------------------------------- headline list, layered */

/* The titles used to be gold links, so forty of them read as one undivided
   wall of accent. Body ink for the title, accent on hover, and two fixed
   columns — publisher, then age — to scan down. */
.hl { padding: 0; border-bottom: 1px solid var(--line-soft); }
.hl-row {
  display: block; padding: 11px 12px 11px 10px; margin: 0 -12px 0 -10px;
  text-decoration: none; color: var(--text); border-radius: 7px;
}
.hl-row:hover { background: var(--ink-2); }
.hl-row:hover .hl-title { color: var(--gold-bright); }
.hl-title { display: block; font-size: 0.97rem; line-height: 1.45; }
.hl-meta {
  display: flex; align-items: baseline; gap: 10px;
  margin-top: 5px; font-size: 0.78rem; color: var(--faint);
}
.hl-pub {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
  max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hl-age { margin-left: auto; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hl-age time { color: inherit; }

/* Everything past the first rows stays in the document — crawlable, and
   findable with the browser's own find — just not in the way. */
.hl-more { margin-top: 14px; }
.hl-more > summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.88rem; color: var(--muted);
}
.hl-more > summary::-webkit-details-marker { display: none; }
.hl-more > summary::after { content: "▾"; font-size: 0.75em; color: var(--faint); }
.hl-more[open] > summary::after { content: "▴"; }
.hl-more > summary:hover { color: var(--text); border-color: var(--faint); }
.hl-more .hl-more-close, .hl-more[open] .hl-more-open { display: none; }
.hl-more[open] .hl-more-close { display: inline; }
.hl-more .hl-list { margin-top: 8px; }

/* ------------------------------------------------------- weekend edition */

.badge--weekly { border-color: rgba(160, 120, 220, 0.4); color: var(--weekly-ink); background: rgba(160, 120, 220, 0.1); }

/* ----------------------------------------------------------- edition hero */

/* The share card, on the page it was made for. */
.ed-hero { margin: 0 0 30px; }
.ed-hero img {
  display: block; width: 100%; max-width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: 12px;
}

.ed-context {
  margin: 0 0 30px; padding: 12px 16px;
  background: var(--ink-2); border: 1px solid var(--line-soft); border-radius: 8px;
  font-size: 0.9rem; color: var(--muted);
}

.ed-card-next { color: var(--faint); }
.ed-card-next time { color: inherit; }

/* ------------------------------------------------------------------ pager */

.pager a { display: flex; flex-direction: column; gap: 4px; max-width: 46%; }
.pager-when { color: var(--faint); font-size: 0.83rem; font-family: var(--mono); }
.pager-head { font-family: var(--serif); font-size: 1.02rem; color: var(--text); }
.pager a:hover .pager-head { color: var(--gold-bright); }
.pager-next { text-align: right; margin-left: auto; }

/* -------------------------------------------------------------------- FAQ */

.faq .faq-item { border-bottom: 1px solid var(--line-soft); }
.faq .faq-item > summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 15px 34px 15px 0; font-family: var(--serif); font-size: 1.08rem;
}
.faq .faq-item > summary::-webkit-details-marker { display: none; }
.faq .faq-item > summary::after {
  content: "▾"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 0.8em; color: var(--faint);
}
.faq .faq-item[open] > summary::after { content: "▴"; }
.faq .faq-item > summary:hover { color: var(--gold-bright); }
.faq .faq-item > p { margin: 0 0 16px; max-width: 68ch; color: var(--muted); }

/* ------------------------------------------------------------ data tables */

.tbl-scroll { overflow-x: auto; }
.data-tbl { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.data-tbl th, .data-tbl td { text-align: left; padding: 9px 22px 9px 0; border-bottom: 1px solid var(--line-soft); }
.data-tbl thead th {
  font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--faint); font-weight: 600;
}
.data-tbl tbody th { font-weight: 500; color: var(--muted); white-space: nowrap; }
.data-tbl td { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.data-tbl tbody tr:last-child th, .data-tbl tbody tr:last-child td { border-bottom: 0; }

/* ------------------------------------------------- cluster page components */

/* The one live figure a cluster page exists to answer. Sized like the price
   card's headline number so the two read as the same kind of statement. */
.big-stat {
  background: var(--ink-2); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 12px; padding: 22px 26px; margin: 0 0 20px;
}
.big-stat-k { margin: 0 0 8px; font-size: 0.74rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint); }
.big-stat-v {
  margin: 0; font-family: var(--mono); font-size: clamp(2rem, 6vw, 2.7rem);
  font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1.1;
}
.big-stat-note { margin: 10px 0 0; color: var(--muted); font-size: 0.95rem; }
.big-stat--open { border-left-color: var(--up); }
.big-stat--open .big-stat-v { color: var(--up); }
.big-stat--closed { border-left-color: var(--faint); }
.big-stat--closed .big-stat-v { color: var(--muted); }

/* The working, shown. A figure a reader can check is worth more than one
   they have to trust. */
.calc {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin: 0 0 26px; padding: 12px 16px;
  background: var(--ink-3); border: 1px solid var(--line-soft); border-radius: 8px;
  font-family: var(--mono); font-size: 0.95rem; font-variant-numeric: tabular-nums;
}
.calc-op { color: var(--faint); }
.calc-note {
  flex-basis: 100%; font-family: var(--sans); font-size: 0.8rem; color: var(--faint);
}

.data-tbl .cell-note { font-family: var(--sans); color: var(--muted); white-space: normal; min-width: 18ch; }

/* A row label here carries a localized time ("Evening edition, 19:05 CEST
   (17:05 UTC)"), which is too long to hold on one line on a phone. */
.day-prices .data-tbl tbody th { white-space: normal; }

/* Five columns of figures: on a phone the table scrolls sideways inside its
   box, one line per day, rather than wrapping every change into a tall row. */
.month-days .data-tbl td { white-space: nowrap; }

/* Hub → spoke links. Two columns of title + one line of what is there. */
.link-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 700px) { .link-grid { grid-template-columns: 1fr; } }
.link-grid a {
  display: block; height: 100%; padding: 16px 18px; text-decoration: none;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px;
}
.link-grid a:hover { border-color: rgba(216, 161, 58, 0.45); }
.link-grid strong { display: block; font-family: var(--serif); font-size: 1.06rem; font-weight: 600; color: var(--text); }
.link-grid a:hover strong { color: var(--gold-bright); }
.link-grid span { display: block; margin-top: 5px; font-size: 0.88rem; color: var(--muted); }

/* A conversion cell that leads somewhere says so on hover. */
.convert-cell--link { text-decoration: none; color: inherit; }
.convert-cell--link:hover { background: var(--ink-3); }
.convert-cell--link:hover .convert-v { color: var(--gold-bright); }

/* Four footer columns once the price cluster earned its own. */
.foot-inner { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
@media (max-width: 900px) { .foot-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-inner { grid-template-columns: 1fr; } }

/* ------------------------------------------------------- home hero chart */

/* With a chart the hero is three pieces: the promise and the chart share the
   wide column, the price card holds the narrow one. On a narrow screen the
   price comes before the chart, since the price is what was asked for. */
.masthead:has(.masthead-chart) {
  grid-template-areas: "text price" "chart price";
  align-items: start; row-gap: 26px;
}
.masthead:has(.masthead-chart) .masthead-text { grid-area: text; align-self: end; max-width: none; }
.masthead:has(.masthead-chart) .masthead-price { grid-area: price; }
.masthead-chart { grid-area: chart; min-width: 0; }
@media (max-width: 900px) {
  .masthead:has(.masthead-chart) { grid-template-areas: "text" "price" "chart"; }
}
.chartbox--hero { padding: 16px 18px 14px; }
.chart-narrow { display: none; }
@media (max-width: 560px) {
  .chart-wide { display: none; }
  .chart-narrow { display: block; }
}
.chartbox--hero .chart-cap { font-size: 0.8rem; }
.chartbox--hero .chart-foot { margin-top: 6px; }
.chartbox--hero .chart-foot a { text-decoration: none; }
.chartbox--hero .chart-foot a:hover { text-decoration: underline; }

/* The unit strip now follows the hero directly. */
.masthead-price .statebar { margin: 14px 0 0; }
.masthead + .convert, .statebar + .convert { margin-top: 0; margin-bottom: 36px; }
/* Two columns on a phone: an odd last cell takes the full row rather than
   leaving a hole beside it. */
@media (max-width: 420px) {
  .convert { grid-template-columns: 1fr 1fr; }
  .convert > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------- countdowns */

.countdown { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.ed-card-next .countdown { color: var(--muted); }

/* ------------------------------------------------------ edition list tag */

.ed-tag {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px;
  font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--gold-bright); border: 1px solid var(--line); vertical-align: 2px; white-space: nowrap;
}
