/* PolTrends Australia — design system */
@font-face { font-family: "Inter"; src: url("fonts/Inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/InstrumentSerif-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/InstrumentSerif-Italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }

:root {
  --bg: #090D15;
  --bg-2: #0D1320;
  --panel: rgba(255, 255, 255, 0.028);
  --panel-2: rgba(255, 255, 255, 0.05);
  --panel-solid: #111827;
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #EDF0F6;
  --text-2: #C7CEDA;
  --muted: #8892A5;
  --faint: #5A6478;
  --accent: #B69CFF;
  --accent-2: #8F7BFF;
  --good: #4ADE80;
  --bad: #FB7185;
  --alp: #F0524A; --lib: #3D8BFD; --lnp: #3D8BFD; --nat: #F2C230; --grn: #3FCB6E; --onp: #FF8A1F; --phon: #FF8A1F; --ind: #9AA4B2; --oth: #6B7280;
  --radius: 18px;
  --radius-sm: 12px;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw: 1180px;
  --shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 20px 60px -30px rgba(0,0,0,0.8);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-feature-settings: "cv11", "ss01", "tnum";
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(143, 123, 255, 0.16), transparent 60%),
    radial-gradient(800px 500px at 92% 2%, rgba(61, 139, 253, 0.10), transparent 60%),
    radial-gradient(700px 600px at 50% 110%, rgba(255, 138, 31, 0.06), transparent 60%),
    linear-gradient(180deg, #0A0F1A 0%, var(--bg) 40%);
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(9, 13, 21, 0.72);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; }
.brand-mark { display: flex; align-items: flex-end; gap: 3px; height: 20px; }
.brand-mark i { width: 4px; border-radius: 2px; display: block; }
.brand-mark i:nth-child(1) { height: 9px; background: var(--alp); }
.brand-mark i:nth-child(2) { height: 15px; background: var(--lib); }
.brand-mark i:nth-child(3) { height: 11px; background: var(--grn); }
.brand-mark i:nth-child(4) { height: 20px; background: var(--onp); }
.brand small { color: var(--muted); font-weight: 500; margin-left: 2px; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 7px 13px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 500;
  white-space: nowrap; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav a.active { color: var(--text); background: rgba(182, 156, 255, 0.14); box-shadow: inset 0 0 0 1px rgba(182,156,255,0.28); }
.nav a .badge { display: inline-block; margin-left: 6px; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: rgba(255,138,31,0.16); color: #FFB066; font-weight: 600; }
.updated-chip { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: pulse 2.4s infinite; }
.pulse.stale { background: #FBBF24; box-shadow: none; animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.55); } 70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .7; }
.display {
  font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; line-height: 1.02;
  font-size: clamp(42px, 6.4vw, 84px); margin: 18px 0 18px; max-width: 16ch; text-wrap: balance;
}
.display em { font-style: italic; color: var(--hl, var(--accent)); }
.lede { font-size: clamp(16px, 1.6vw, 19px); color: var(--text-2); max-width: 62ch; line-height: 1.6; }
.lede strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 550; border: 1px solid var(--line-2); background: var(--panel); color: var(--text);
  transition: transform .15s, background .15s, border-color .15s; cursor: pointer; font-family: inherit;
}
.btn:hover { background: var(--panel-2); border-color: rgba(255,255,255,0.22); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, #B69CFF, #7C6CFF); border-color: transparent; color: #0B0F17; }
.btn.primary:hover { filter: brightness(1.08); }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(2px); }

/* ---------- Sections & cards ---------- */
.section { padding: 30px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -0.01em; line-height: 1.1; }
.section-head p { color: var(--muted); max-width: 60ch; font-size: 14.5px; }
.kicker { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); position: relative; min-width: 0;
}
.card h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; margin-bottom: 4px; }
.card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.empty { color: var(--muted); font-size: 14px; padding: 18px 0; }
.note { color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.note a, .prose a, .link { color: var(--accent); border-bottom: 1px solid rgba(182,156,255,0.3); }
.note a:hover, .prose a:hover, .link:hover { border-bottom-color: var(--accent); }
.divider { height: 1px; background: var(--line); margin: 8px 0 0; }

/* ---------- Party race cards ---------- */
.race-card { padding: 20px 20px 16px; overflow: hidden; }
.race-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--c);
  box-shadow: 0 0 24px 2px var(--c); opacity: .9;
}
.race-card::after {
  content: ""; position: absolute; width: 180px; height: 180px; right: -60px; top: -90px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%); pointer-events: none;
}
.race-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.party { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 10px var(--c); }
.rank { font-size: 12px; color: var(--muted); font-weight: 600; }
.rank.first { color: #0B0F17; background: var(--c); padding: 2px 8px; border-radius: 999px; }
.big { font-size: 44px; font-weight: 650; letter-spacing: -0.03em; line-height: 1; margin: 16px 0 6px; }
.big small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 4px; }
.race-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.chg { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12.5px; padding: 2px 8px; border-radius: 999px; }
.chg.up { color: var(--good); background: rgba(74,222,128,0.10); }
.chg.down { color: var(--bad); background: rgba(251,113,133,0.10); }
.chg.flat { color: var(--muted); background: var(--panel-2); }
.spark { width: 100%; height: 44px; margin-top: 14px; }

/* ---------- Share bar ---------- */
.sharebar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--panel-2); gap: 2px; }
.sharebar span { background: var(--c); min-width: 3px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.share-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 13px; color: var(--text-2); }
.share-legend b { font-weight: 650; color: var(--text); margin-left: 4px; }

/* ---------- Spikes / timeline ---------- */
.timeline { display: grid; gap: 10px; }
.tl-item {
  display: grid; grid-template-columns: 76px 1fr; gap: 16px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02); border: 1px solid var(--line); transition: border-color .15s, background .15s;
}
.tl-item:hover { border-color: var(--line-2); background: rgba(255,255,255,0.035); }
.tl-date { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.tl-date b { display: block; font-size: 24px; color: var(--text); letter-spacing: -0.02em; text-transform: none; font-weight: 650; line-height: 1.1; }
.tl-body .tl-tags { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 16%, transparent); color: color-mix(in srgb, var(--c) 70%, white); }
.pill.ghost { background: var(--panel-2); color: var(--text-2); }
.tl-title { font-size: 15px; font-weight: 550; line-height: 1.45; }
.tl-title a:hover { color: var(--accent); }
.tl-src { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

/* ---------- Query chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12.5px; padding: 5px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text-2); }
.chip b { color: var(--good); font-weight: 600; margin-left: 4px; font-size: 11.5px; }
.chip.breakout b { color: #FFB066; }
.q-party { margin-bottom: 14px; }
.q-party:last-child { margin-bottom: 0; }
.q-party .party { margin-bottom: 8px; font-size: 13.5px; }

/* ---------- News ---------- */
.news-list { display: grid; gap: 2px; }
.news-item { display: block; padding: 11px 0; border-bottom: 1px solid var(--line); }
.news-item:last-child { border-bottom: 0; }
.news-item .t { font-size: 14.5px; font-weight: 520; line-height: 1.45; transition: color .15s; }
.news-item:hover .t { color: var(--accent); }
.news-item .m { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.news-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }

/* ---------- Stat tiles ---------- */
.stat { padding: 18px 20px; }
.stat .label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat .value { font-size: 32px; font-weight: 650; letter-spacing: -0.025em; margin: 10px 0 4px; line-height: 1.05; }
.stat .value .vs { color: var(--faint); font-weight: 500; margin: 0 4px; }
.stat .hint { font-size: 13px; color: var(--muted); }

/* ---------- Countdown ---------- */
.countdown { display: flex; gap: 10px; margin-top: 30px; flex-wrap: wrap; }
.cd-unit { min-width: 92px; padding: 14px 16px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); text-align: left; }
.cd-unit b { display: block; font-size: 38px; font-weight: 650; letter-spacing: -0.03em; line-height: 1; }
.cd-unit span { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.cd-unit.days { background: linear-gradient(160deg, rgba(182,156,255,0.18), rgba(124,108,255,0.06)); border-color: rgba(182,156,255,0.3); }

/* ---------- Poll bars ---------- */
.pbars { display: grid; gap: 14px; }
.pbar { display: grid; grid-template-columns: 110px 1fr 56px; align-items: center; gap: 14px; }
.pbar .nm { font-size: 14px; font-weight: 550; display: flex; align-items: center; gap: 8px; }
.pbar .track { position: relative; height: 26px; background: rgba(255,255,255,0.04); border-radius: 8px; overflow: visible; }
.pbar .fill { position: absolute; inset: 0 auto 0 0; border-radius: 8px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, transparent), var(--c)); }
.pbar .ghost { position: absolute; top: -4px; bottom: -4px; width: 2px; background: rgba(255,255,255,0.75); border-radius: 2px; }
.pbar .ghost::after { content: attr(data-l); position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.pbar .v { font-weight: 650; font-size: 18px; text-align: right; letter-spacing: -0.02em; }

/* ---------- Tally bar ---------- */
.tally { margin: 6px 0 4px; }
.tally-bar { position: relative; display: flex; height: 36px; border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.tally-bar span { background: var(--c); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: rgba(0,0,0,0.78); transition: flex-basis .45s cubic-bezier(.2,.8,.2,1); min-width: 0; overflow: hidden; white-space: nowrap; }
.tally-mid { position: absolute; top: -6px; bottom: -6px; left: 50%; width: 2px; background: #fff; transform: translateX(-1px); box-shadow: 0 0 0 3px rgba(9,13,21,0.6); }
.tally-labels { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 8px; gap: 10px; }
.tally-labels b { color: var(--text); }
.verdict { font-family: var(--serif); font-size: 30px; line-height: 1.1; margin: 4px 0 12px; }

/* ---------- Pendulum ---------- */
.pendulum-wrap { position: relative; }
.pendulum-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
#pendulum { width: 100%; height: auto; overflow: visible; touch-action: pan-x pan-y; display: block; }
.swipe-hint { display: none; margin-top: 6px; }
#pendulum .seat { cursor: pointer; transition: fill .35s ease, stroke .2s ease, r .15s; }
#pendulum .seat:hover, #pendulum .seat.focus { stroke: #fff; stroke-width: 2; }
#pendulum .axis-label { fill: var(--muted); font-size: 13px; font-family: var(--sans); }
#pendulum .axis-title { fill: var(--text-2); font-size: 14px; font-weight: 600; font-family: var(--sans); letter-spacing: .04em; }
.swing-control { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; margin: 18px 0 4px; }
.swing-control label { font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.swing-readout { font-size: 15px; font-weight: 650; white-space: nowrap; min-width: 150px; text-align: right; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--alp), #2A3142 50%, var(--lib)); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--accent-2); box-shadow: 0 2px 12px rgba(0,0,0,0.5); cursor: grab; }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--accent-2); cursor: grab; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.presets button { font: inherit; font-size: 12.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text-2); cursor: pointer; }
.presets button:hover, .presets button.on { color: var(--text); border-color: rgba(182,156,255,0.5); background: rgba(182,156,255,0.12); }
.tooltip {
  position: absolute; pointer-events: none; z-index: 20; min-width: 200px; max-width: 260px; padding: 12px 14px; border-radius: 12px;
  background: rgba(17, 24, 39, 0.96); border: 1px solid var(--line-2); box-shadow: 0 18px 40px -12px rgba(0,0,0,0.7);
  font-size: 13px; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
}
.tooltip.show { opacity: 1; transform: none; }
.tooltip h4 { font-size: 15px; margin-bottom: 2px; }
.tooltip .r { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); padding: 2px 0; }
.tooltip .r b { color: var(--text); font-weight: 600; }
.flip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; min-height: 30px; }
.flip-list .chip { background: color-mix(in srgb, var(--c) 14%, transparent); border-color: color-mix(in srgb, var(--c) 35%, transparent); color: var(--text); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; background: var(--c); }
.legend i.ring { background: transparent; box-shadow: inset 0 0 0 2px var(--c); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
table.data th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; padding: 10px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
table.data td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: rgba(255,255,255,0.02); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data .seat-name { font-weight: 600; font-size: 14.5px; }
table.data .muted { color: var(--muted); font-size: 12.5px; }
table.data a.hl { color: var(--text-2); font-size: 13px; line-height: 1.4; display: block; }
table.data a.hl:hover { color: var(--accent); }
.margin-chip { display: inline-block; font-weight: 650; padding: 2px 8px; border-radius: 6px; background: color-mix(in srgb, var(--c) 18%, transparent); color: color-mix(in srgb, var(--c) 70%, white); }

/* ---------- Model compare ---------- */
.model-card { padding: 22px; }
.model-card .tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border-radius: 6px; background: var(--panel-2); color: var(--text-2); margin-bottom: 12px; }
.seat-row { display: flex; align-items: center; gap: 10px; margin: 7px 0; font-size: 14px; }
.seat-row .bar { flex: 1; height: 10px; border-radius: 999px; background: rgba(255,255,255,0.05); overflow: hidden; }
.seat-row .bar span { display: block; height: 100%; background: var(--c); border-radius: 999px; }
.seat-row .n { width: 30px; text-align: right; font-weight: 650; }
.seat-row .nm { width: 96px; color: var(--text-2); }

/* ---------- Leaders ---------- */
.leader { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 16px; color: #0B0F17; background: var(--c); flex: none; box-shadow: 0 0 0 3px rgba(255,255,255,0.06), 0 0 24px -4px var(--c); }
.leader .who { font-weight: 600; }
.leader .role { font-size: 12.5px; color: var(--muted); }
.leader .val { margin-left: auto; text-align: right; }
.leader .val b { display: block; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.leader .val span { font-size: 11.5px; color: var(--muted); }
.stackbar { display: flex; height: 30px; border-radius: 9px; overflow: hidden; margin: 10px 0; }
.stackbar span { background: var(--c); display: flex; align-items: center; padding-left: 10px; font-size: 12.5px; font-weight: 700; color: rgba(0,0,0,0.75); white-space: nowrap; overflow: hidden; }

/* ---------- Prose (briefing) ---------- */
.prose { max-width: 70ch; }
.prose p { font-size: 17px; line-height: 1.75; color: var(--text-2); margin-bottom: 18px; }
.prose p:first-of-type { font-size: 20px; color: var(--text); line-height: 1.6; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 34px; margin: 34px 0 14px; color: var(--text); }
.briefing-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.aside { position: sticky; top: 88px; display: grid; gap: 14px; }

/* ---------- Footer ---------- */
footer { margin-top: 56px; border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 13px; }
footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
footer h4 { color: var(--text-2); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px; }
footer a:hover { color: var(--text); }
footer ul { list-style: none; display: grid; gap: 6px; }
.health { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.health span { font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: var(--panel-2); }
.health span.ok::before { content: "● "; color: var(--good); }
.health span.bad::before { content: "● "; color: #FBBF24; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.share-row a, .share-row button { font: inherit; font-size: 12.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); background: transparent; cursor: pointer; }
.share-row a:hover, .share-row button:hover { color: var(--text); border-color: rgba(255,255,255,0.3); }

/* ---------- Plotly overrides ---------- */
.js-plotly-plot, .plot-container { width: 100% !important; }
.js-plotly-plot .svg-container { width: 100% !important; max-width: 100% !important; }
.chart-card { padding: 20px 18px 12px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .pulse { animation: none; } html { scroll-behavior: auto; } }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .briefing-grid { grid-template-columns: 1fr; }
  .aside { position: static; }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .wrap { padding: 0 16px; }
  .topbar .wrap { gap: 14px; height: auto; padding-top: 10px; padding-bottom: 8px; flex-wrap: wrap; }
  .brand { order: 1; }
  .updated-chip { order: 2; margin-left: auto; font-size: 12px; }
  .nav { order: 3; flex-basis: 100%; margin: 0 -16px; padding: 0 12px; }
  .hero { padding: 40px 0 18px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span2 { grid-column: auto; }
  .card { padding: 18px; border-radius: 16px; }
  .big { font-size: 36px; }
  .pbar { grid-template-columns: 84px 1fr 46px; gap: 10px; }
  .swing-control { grid-template-columns: 1fr; gap: 8px; }
  #pendulum { min-width: 780px; }
  .swipe-hint { display: block; }
  .swing-readout { text-align: left; }
  .tl-item { grid-template-columns: 58px 1fr; gap: 12px; padding: 12px; }
  .tl-date b { font-size: 20px; }
  footer .cols { grid-template-columns: 1fr; }
  .cd-unit { min-width: 74px; padding: 12px; }
  .cd-unit b { font-size: 30px; }
  .verdict { font-size: 25px; }
  .prose p { font-size: 16px; }
  .prose p:first-of-type { font-size: 18px; }
}
@media (max-width: 420px) {
  .g4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .race-card { padding: 16px 14px 12px; }
  .big { font-size: 30px; }
}
