/* Shared look of the story pages. Colours follow zarvanda.com. */
:root {
  --bg: #0b1220; --surface: #121c30; --line: #2a3a58; --ink: #ffffff; --muted: #9fb3c8; --gold: #f2b63c; --gold-hover: #ffc95c; --on-gold: #0b1220; --warn-bg: #2a2412;
  --display: Poppins, "Segoe UI", Arial, sans-serif; --body: Inter, "Segoe UI", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--body); }
a { color: var(--gold); }
a:hover { color: var(--gold-hover); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
img { display: block; max-width: 100%; height: auto; }

.top, .foot, main { width: 100%; max-width: 1040px; margin-inline: auto; padding-inline: 24px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.top img { width: 122px; }
.top a:last-child { font-size: 15px; }
main { padding-block: 28px 56px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 24px 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

h1 { font: 600 clamp(34px, 6vw, 52px)/1.12 var(--display); margin: 0 0 16px; text-wrap: balance; }
h2 { font: 600 clamp(23px, 3.4vw, 29px)/1.2 var(--display); margin: 56px 0 12px; text-wrap: balance; }
h3 { font: 600 18px/1.3 var(--display); margin: 0 0 6px; }
p { margin: 0 0 16px; max-width: 72ch; }
.lead { color: #d4deea; font-size: clamp(18px, 2.3vw, 21px); line-height: 1.5; max-width: 66ch; margin-bottom: 24px; }
.muted, .note, figcaption { color: var(--muted); }
.note, figcaption { font-size: 14px; line-height: 1.5; }
.eyebrow { color: var(--gold); font-size: 14px; font-weight: 500; margin: 0 0 10px; }

.cta { display: inline-block; background: var(--gold); color: var(--on-gold); font-weight: 500; text-decoration: none; padding: 11px 20px; border-radius: 999px; }
.cta:hover { background: var(--gold-hover); color: var(--on-gold); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 30px; }

figure { margin: 22px 0; }
figure img { border-radius: 8px; border: 1px solid var(--line); width: 100%; }
figcaption { margin-top: 8px; max-width: 72ch; }

.banner { background: var(--warn-bg); border-left: 3px solid var(--gold); border-radius: 0 6px 6px 0; padding: 12px 16px; margin: 0 0 26px; max-width: 72ch; font-size: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; margin: 26px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; }
.stat b { display: block; font: 600 32px/1.1 var(--display); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14px; line-height: 1.4; display: block; }

ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
ol.steps li { counter-increment: step; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px 14px 58px; }
ol.steps li::before { content: counter(step); position: absolute; left: 18px; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: var(--on-gold); font: 600 15px/28px var(--display); text-align: center; }
ol.steps p { margin: 0; color: var(--muted); font-size: 15px; }
ol.steps .key { border-color: var(--gold); }
ul.plain { padding-left: 20px; margin: 0 0 16px; max-width: 72ch; }
ul.plain li { margin-bottom: 8px; }

.tablewrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 9px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 14px; background: var(--surface); }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; color: inherit; text-decoration: none; }
.card:hover, .card:focus-visible { border-color: var(--gold); color: inherit; }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card div { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card p { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0 0 12px; flex: 1; }
.card span { color: var(--gold); font-weight: 500; font-size: 15px; }
.card small { color: var(--muted); font-size: 13px; display: block; margin-bottom: 6px; }

/* Charts: inline SVG, labels in text colours, a tooltip on hover or focus. */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font: 13px var(--body); }
.chart .strong { fill: var(--ink); font-weight: 500; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ref { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 3; }
.chart .mark { fill: var(--gold); }
.chart .quiet { fill: #7f93ad; }
.chart .whisk { stroke: var(--gold); stroke-width: 2; stroke-linecap: round; }
.chart .whisk.quiet { stroke: #7f93ad; }
.chart .line { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .hit { fill: transparent; }
.chart .hover { opacity: 0; pointer-events: none; }
.chart g:hover > .hover, .chart g:focus > .hover { opacity: 1; }
.chart .cross { stroke: var(--muted); stroke-width: 1; }
.chart .dot { fill: var(--gold); stroke: var(--bg); stroke-width: 2; }
#tip { position: fixed; z-index: 10; pointer-events: none; background: #1b2740; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font-size: 13px; line-height: 1.35; max-width: 280px; box-shadow: 0 4px 16px rgb(0 0 0 / .4); }

@media (max-width: 560px) {
  .top, .foot, main { padding-inline: 16px; }
  body { font-size: 16px; }
  h2 { margin-top: 44px; }
}

/* Keep chart text readable on phones: the chart scrolls inside its own box. */
.chartbox { overflow-x: auto; }
.chartbox .chart { min-width: 600px; }
