/*
VOICE   Precise, confident, a little dramatic: a market instrument panel, not a brochure.
IDEA    The year-ahead fan: every forecast is a line leaving today's level and landing at end-2027.
PICTURE One large fan chart in the first screen; small multiples and a stance heatmap below.
COLOUR  Steel ground, white panels, true black ink, one alarm red for the house you follow.
TYPE    Inter Tight for headings and numbers, Inter for text. Four sizes.
LAYOUT  Title, then a full-width panel: readout column + fan chart. Stacks on phones.
*/
@font-face { font-family: "Inter Tight"; src: url("fonts/inter-tight.woff2") format("woff2-variations"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2-variations"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #d5dbe0;
  --panel: #ffffff;
  --ink: #000000;
  --sub: #4a535b;
  --faint: #8b959d;
  --rule: #c3cad0;
  --soft: #eef1f3;
  --red: #e8251a;
  --line-other: #9aa3ab;
  --head: "Inter Tight", "Inter", ui-sans-serif, system-ui, sans-serif;
  --text: "Inter", ui-sans-serif, system-ui, sans-serif;
  --pad: max(5vw, 16px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #16191c; --panel: #1f2428; --ink: #ffffff; --sub: #a3adb5; --faint: #6f7a83; --rule: #343b41; --soft: #272d32; --red: #ff3b2f; --line-other: #5d666e; }
}

* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--text); font-feature-settings: "tnum" 1, "cv11" 1; overflow-x: clip; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--head); margin: 0; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 650; letter-spacing: -0.01em; }
button { font: inherit; color: inherit; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; background: var(--red); color: #fff; padding: 0.5rem 1rem; }
.skip:focus { top: 1rem; }

.band { padding: clamp(28px, 4vw, 64px) var(--pad); max-width: 1440px; margin: 0 auto; }
.panel { background: var(--panel); border-radius: 4px; }
.sec-head { display: grid; gap: 0.6rem; max-width: 64ch; margin-bottom: 1.5rem; }
.help { color: var(--sub); margin: 0; }

/* Hero */
.hero { padding-top: clamp(28px, 5vw, 72px); padding-bottom: 0; }
.hero-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.5rem 3rem; align-items: end; margin-bottom: clamp(20px, 3vw, 36px); }
.hero h1 { font-size: clamp(2.9rem, 8.4vw, 7.4rem); font-weight: 700; letter-spacing: -0.045em; line-height: 0.88; }
.hero-side { display: grid; gap: 1rem; padding-bottom: 0.4rem; }
.intro { font-size: 1.06rem; line-height: 1.5; margin: 0; max-width: 46ch; }
.stats { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.stats li { font-size: 0.82rem; color: var(--sub); }
.stats b { display: block; font: 650 1.9rem/1 var(--head); color: var(--ink); letter-spacing: -0.03em; }
.countdown { margin: 0; font-size: 0.82rem; color: var(--sub); }
.countdown strong { color: var(--ink); }
@media (max-width: 860px) { .hero-top { grid-template-columns: 1fr; } }

/* Fan panel */
.fan-panel { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); }
.fan-side { padding: clamp(18px, 2.2vw, 30px); border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 1.1rem; }
.fan-main { padding: clamp(14px, 2vw, 26px) clamp(14px, 2vw, 26px) 12px; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 860px) {
  .fan-panel { grid-template-columns: 1fr; }
  .fan-side { border-right: 0; border-top: 1px solid var(--rule); order: 2; }
  .fan-main { order: 1; }
}
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; border: 1px solid var(--rule); background: transparent; border-radius: 999px; padding: 0 14px; height: 36px; font-size: 0.85rem; cursor: pointer; white-space: nowrap; color: var(--sub); }
.tab:hover { color: var(--ink); border-color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--panel); border-color: var(--ink); font-weight: 600; }
.fig { position: relative; width: 100%; }
.fig svg { display: block; width: 100%; height: auto; overflow: visible; }

.k-label { font-size: 0.82rem; color: var(--sub); margin: 0; }
.k-metric { font: 650 1.25rem/1.15 var(--head); margin: 0.15rem 0 0; }
.k-big { font: 700 clamp(3.4rem, 6vw, 5rem)/0.9 var(--head); letter-spacing: -0.05em; margin: 0.6rem 0 0.2rem; }
.k-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; border-top: 1px solid var(--rule); padding-top: 0.9rem; }
.k-row b { display: block; font: 650 1.2rem/1.1 var(--head); white-space: nowrap; }
.k-row span { font-size: 0.78rem; color: var(--sub); }
.takeaway { margin: 0; font-size: 0.95rem; line-height: 1.5; }
.pick { display: grid; gap: 0.5rem; margin-top: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { border: 1px solid var(--rule); background: transparent; border-radius: 3px; height: 32px; padding: 0 9px; font-size: 0.78rem; font-weight: 600; cursor: pointer; color: var(--sub); }
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.detail { font-size: 0.86rem; color: var(--sub); margin: 0; min-height: 2.6em; }
.detail b { color: var(--ink); }

/* SVG marks */
.g-grid { stroke: var(--rule); stroke-width: 1; }
.g-tick { fill: var(--sub); font: 500 11px var(--text); }
.g-axis-label { fill: var(--sub); font: 500 11px var(--text); }
.g-other { stroke: var(--line-other); stroke-width: 1.6; fill: none; }
.g-mid { stroke: var(--ink); stroke-width: 3.5; fill: none; }
.g-end { fill: var(--line-other); }
.g-end.hollow { fill: var(--panel); stroke: var(--line-other); stroke-width: 1.8; }
.g-range { stroke: var(--line-other); stroke-width: 5; stroke-linecap: round; }
.g-now { fill: var(--red); }
.g-lbl { fill: var(--sub); font: 600 11px var(--text); }
.g-lbl.mid { fill: var(--ink); font: 700 12px var(--head); }
.g-lbl.now { fill: var(--red); font: 700 11px var(--text); }
.g-actual { stroke: var(--red); stroke-width: 2; stroke-dasharray: 4 3; }
.g-actual-lbl { fill: var(--red); font: 700 11px var(--text); }
.g-hit { cursor: pointer; fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; }
.house { transition: opacity 200ms ease; }
.house:focus { outline: none; }
.house:focus-visible .g-end { stroke: var(--red); stroke-width: 3; }
.house.on .g-other, .house.on .g-range { stroke: var(--red); stroke-width: 3; }
.house.on .g-end { fill: var(--red); }
.house.on .g-end.hollow { fill: var(--panel); stroke: var(--red); }
.house.on .g-lbl { fill: var(--red); font-weight: 700; }
.fig.following .house:not(.on) { opacity: 0.3; }
.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1100ms cubic-bezier(0.3, 0.7, 0.2, 1) forwards; }
.pop { opacity: 0; animation: pop 450ms ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .draw, .pop { animation: none; stroke-dashoffset: 0; opacity: 1; } }

/* Small multiples */
.minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.mini { text-align: left; border: 1px solid transparent; padding: 14px 14px 8px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.mini:hover { border-color: var(--ink); }
.mini[aria-current="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.mini-top { display: flex; justify-content: space-between; gap: 0.75rem; align-items: baseline; }
.mini-top b { font: 650 0.98rem/1.2 var(--head); }
.mini-top span { font-size: 0.75rem; color: var(--sub); white-space: nowrap; }
.mini-mid { font: 700 1.55rem/1 var(--head); letter-spacing: -0.03em; }
.mini-mid small { font: 500 0.75rem var(--text); color: var(--sub); letter-spacing: 0; margin-left: 0.4rem; }

/* Heatmap */
.heat-wrap { padding: clamp(16px, 2.5vw, 32px); }
.legend { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; font-size: 0.82rem; color: var(--sub); }
.legend li { display: inline-flex; align-items: center; gap: 0.45rem; }
.legend .tile { width: 16px; height: 16px; cursor: default; }
.heat { display: grid; grid-template-columns: minmax(13rem, 1fr) repeat(var(--cols), 40px) 6.5rem; column-gap: 4px; row-gap: 4px; align-items: center; }
.h-head { font: 700 11px var(--text); color: var(--sub); text-align: center; padding-bottom: 6px; }
.h-head.left { text-align: left; }
.h-head.on { color: var(--red); }
.h-q { font: 500 0.98rem/1.3 var(--text); padding-right: 1rem; }
.h-sum { padding-left: 0.6rem; font-size: 0.78rem; color: var(--sub); white-space: nowrap; }
.h-sum b { font: 700 1.15rem var(--head); color: var(--ink); }
.tile { display: block; width: 100%; aspect-ratio: 1; border-radius: 2px; border: 0; padding: 0; cursor: pointer; transition: transform 120ms ease; }
.tile.agree { background: var(--ink); }
.tile.mixed { background: repeating-linear-gradient(135deg, var(--faint) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1.5px var(--faint); }
.tile.disagree { background: var(--red); }
.tile.silent { background: var(--soft); cursor: default; }
.tile:not(.silent):hover { transform: scale(1.08); }
.tile[aria-pressed="true"] { outline: 3px solid var(--red); outline-offset: 2px; }
.tile.col-on:not(.silent) { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--red); }
.tile.mixed.col-on { box-shadow: inset 0 0 0 1.5px var(--faint), 0 0 0 2px var(--panel), 0 0 0 4px var(--red); }
@media (max-width: 760px) {
  .heat { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: 3px; }
  .h-head.left, .h-head.sum { display: none; }
  .h-head { font-size: 9px; writing-mode: vertical-rl; transform: rotate(180deg); justify-self: center; text-align: left; }
  .h-q { grid-column: 1 / -1; padding: 0.9rem 0 0.15rem; }
  .h-sum { grid-column: 1 / -1; padding: 0.15rem 0 0; }
}
.readout { margin-top: 1.25rem; border-top: 3px solid var(--rc, var(--ink)); padding-top: 0.9rem; min-height: 4.8rem; }
.readout p { margin: 0; }
.readout .r-title { font: 600 1.2rem/1.3 var(--head); max-width: 60ch; }
.readout .r-meta { margin-top: 0.35rem; font-size: 0.85rem; color: var(--sub); display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; }
.readout .r-meta b { color: var(--ink); }
.readout .r-empty { color: var(--sub); }

/* Standouts */
.standout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.so { padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 14px; }
.so .who { font: 700 0.8rem var(--text); color: var(--red); }
.so p { font: 600 1.35rem/1.2 var(--head); letter-spacing: -0.02em; margin: 0; }
.so a { font-size: 0.82rem; color: var(--sub); margin-top: auto; }

/* Calls list */
.list-panel { padding: clamp(16px, 2.5vw, 32px); }
.filters { display: grid; gap: 0.75rem 1rem; margin: 0 0 1rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.filters .f-search { grid-column: span 2; }
@media (max-width: 520px) { .filters .f-search { grid-column: 1 / -1; } }
.filters label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.8rem; color: var(--sub); }
.filters input, .filters select { font: inherit; font-size: 16px; color: var(--ink); background: var(--soft); border: 1px solid transparent; border-radius: 3px; padding: 0.55rem 0.75rem; min-height: 44px; width: 100%; }
.filters input:focus, .filters select:focus { border-color: var(--ink); outline: none; }
.count { color: var(--sub); font-size: 0.82rem; margin: 0 0 0.5rem; }
.list { list-style: none; margin: 0; padding: 0; }
.pred { border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
.pred summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: 0.2rem 1rem; padding: 1rem 0; }
.pred summary::-webkit-details-marker { display: none; }
.pred summary:hover .claim { color: var(--red); }
.pred .claim { font: 600 1.08rem/1.35 var(--head); letter-spacing: -0.01em; max-width: 70ch; }
.pred .meta { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; color: var(--sub); font-size: 0.82rem; }
.pred .who { color: var(--ink); font-weight: 600; }
.pred .star { color: var(--red); font-weight: 600; }
.pred .body { padding: 0 0 1.4rem 5.2rem; max-width: calc(70ch + 5.2rem); }
@media (max-width: 600px) { .pred summary { grid-template-columns: 3.2rem minmax(0, 1fr); } .pred .body { padding-left: 0; } }
.pred dl { margin: 0; display: grid; gap: 0.8rem; }
.pred dt { font-size: 0.78rem; color: var(--sub); }
.pred dd { margin: 0.1rem 0 0; }
.pred .evidence { margin: 0.25rem 0 0; padding-left: 1.1rem; }
.badge { grid-row: span 2; display: flex; flex-direction: column; gap: 6px; color: var(--sc); }
.badge .big { font: 700 2rem/1 var(--head); letter-spacing: -0.04em; }
.badge .big small { font: 500 0.75rem var(--text); color: var(--sub); }
.badge.b-pending .big, .badge.b-void .big { color: var(--faint); font-weight: 500; }
.pips { display: flex; gap: 2px; }
.pips i { width: 8px; height: 4px; background: var(--rule); }
.pips i.on { background: var(--sc); }
.status { font-size: 0.85rem; font-weight: 600; }
.empty { padding: 2rem 0; color: var(--sub); }
.empty button { background: var(--ink); color: var(--panel); border: 0; border-radius: 3px; padding: 0 1rem; min-height: 44px; cursor: pointer; margin-top: 0.75rem; }

/* Scorecard */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 560px; }
th, td { text-align: left; padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; color: var(--sub); font-size: 0.78rem; }
td.num, th.num { text-align: right; white-space: nowrap; }
td.num { font: 650 1.15rem var(--head); }
td .pname { font: 650 1.02rem var(--head); display: block; }
td .pdesc { color: var(--sub); font-size: 0.8rem; display: block; max-width: 40ch; }
td.rank-out .pname::after { content: " (not enough judged yet)"; font: 400 0.8rem var(--text); color: var(--sub); }
td .muted { color: var(--faint); font-weight: 400; }
tr.top td:first-child { box-shadow: inset 4px 0 0 var(--red); }

/* Method + sources */
.method-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.method-grid > div { padding: 22px; }
.method-grid p { margin: 0.5rem 0 0; color: var(--sub); }
.rubric { list-style: none; padding: 0; margin: 0.6rem 0 0; display: grid; gap: 0.25rem; font-size: 0.92rem; }
.rubric li { display: flex; gap: 0.75rem; }
.rubric-num { font: 700 1rem var(--head); width: 1ch; }
.source-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 0 2rem; }
.source-list li { border-top: 1px solid var(--rule); padding: 0.8rem 0; }
.source-list b { display: block; font: 650 0.98rem var(--head); }
.source-list .t { font-size: 0.9rem; }
.source-list .m { color: var(--sub); font-size: 0.78rem; display: block; margin-top: 0.15rem; }
.foot { color: var(--sub); font-size: 0.8rem; border-top: 1px solid var(--rule); }
.foot p { margin: 0.2rem 0; }
.error { color: var(--red); }
.noscript { padding: var(--pad); }
