/* Data-viz benchmark site. Brand (colours, type, logo) follows www.unicornds.org; chart series
   colours follow the validated reference palette (dataviz skill), as the chart SVGs do. */
:root {
  color-scheme: light;
  --page: #ffffff;
  --surface: #ffffff;
  --raised: #f6f6f6;
  --ink: #1d1d1f;
  --ink2: #343435;
  --muted: #777779;
  --border: #dddddd;
  --grid: #ededed;
  --brand: #144bb8;
  --brand-ink: #ffffff;
  --brand-wash: #eaf0fb;
  --pip-off: #dddddd;
  --star: #e0a200;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a;
  --flag: #8a5a00;
  --font: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Helvetica, Cantarell, Ubuntu, Roboto, Noto, Arial, sans-serif;
  font-family: var(--font);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #1d1d1f; --surface: #232325; --raised: #29292a; --ink: #ededed; --ink2: #bbbbbc; --muted: #8e8e8f;
    --border: #343435; --grid: #2c2c2e; --brand: #6b9cf2; --brand-ink: #0d1a33; --brand-wash: #1c2a44; --pip-off: #3a3a3c; --star: #f2b91c;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --flag: #f3c564;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #1d1d1f; --surface: #232325; --raised: #29292a; --ink: #ededed; --ink2: #bbbbbc; --muted: #8e8e8f;
  --border: #343435; --grid: #2c2c2e; --brand: #6b9cf2; --brand-ink: #0d1a33; --brand-wash: #1c2a44; --pip-off: #3a3a3c; --star: #f2b91c;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --flag: #f3c564;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); line-height: 1.55; font-size: 16px; overflow-x: hidden; }
a { color: var(--brand); text-underline-offset: 2px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Site header, as on unicornds.org: logo left, a few links and the subscribe button right */
header.site { border-bottom: 1px solid var(--border); background: var(--page); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand-logo img { display: block; height: 36px; width: auto; }
.brand-logo .dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo .light { display: none; } :root:not([data-theme="light"]) .brand-logo .dark { display: block; } }
:root[data-theme="dark"] .brand-logo .light { display: none; }
:root[data-theme="dark"] .brand-logo .dark { display: block; }
nav.site { display: flex; align-items: center; gap: 18px; font-size: 15px; font-weight: 500; }
nav.site a { color: var(--ink); text-decoration: none; }
nav.site a:hover { color: var(--brand); }
nav.site a.btn { background: var(--brand); color: var(--brand-ink); padding: 8px 16px; border-radius: 999px; font-weight: 600; }
nav.site a.btn:hover { color: var(--brand-ink); opacity: .9; }
@media (max-width: 560px) { nav.site a:not(.btn) { display: none; } .brand-logo img { height: 30px; } }

.hero { padding: 40px 0 8px; }
.eyebrow { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.12; margin: 10px 0 14px; letter-spacing: -0.015em; font-weight: 700; max-width: 900px; }
h2 { font-size: 24px; line-height: 1.25; margin: 0 0 6px; font-weight: 700; }
h3 { font-size: 16px; margin: 18px 0 6px; }
.lede { font-size: 18px; color: var(--ink2); max-width: 780px; margin: 0; }

/* Round switcher */
.rounds-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.rounds-nav li a, .rounds-nav li span { display: inline-block; font-size: 14px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; color: var(--ink2); }
.rounds-nav li a:hover { border-color: var(--brand); color: var(--brand); }
.rounds-nav li span.current { background: var(--ink); color: var(--page); border-color: var(--ink); font-weight: 600; }
.rounds-nav li span.label { border: 0; padding-left: 0; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.filters .label { font-size: 14px; color: var(--muted); margin-right: 4px; }
.filters .chip { font: inherit; font-size: 14px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--ink2); cursor: pointer; }
.filters .chip:hover { border-color: var(--brand); color: var(--brand); }
.filters .chip[aria-pressed="true"] { background: var(--ink); color: var(--page); border-color: var(--ink); font-weight: 600; }
table.board tbody tr[hidden] { display: none; }
.table-note { position: sticky; left: 0; max-width: min(100%, calc(100vw - 32px)); box-sizing: border-box; padding: 12px 16px 14px; border-top: 1px solid var(--grid); font-size: 13px; line-height: 1.5; color: var(--muted); }
.table-note p { margin: 0; max-width: 900px; }
.table-note p + p { margin-top: 4px; }
.table-note b { color: var(--ink2); font-weight: 600; }

.round-intro { margin: 18px 0 0; padding: 18px 20px; background: var(--raised); border-radius: 12px; max-width: 900px; }
.round-intro p { margin: 0; color: var(--ink2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.chips li { font-size: 13px; color: var(--ink2); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }

section.block { margin: 44px 0; }
.sub { color: var(--ink2); margin: 0 0 14px; max-width: 780px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
figure { margin: 0; }
figure img { display: block; width: 100%; height: auto; border-radius: 8px; background: #fcfcfb; }

/* Leaderboard */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
table.board { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 960px; }
table.board th, table.board td { padding: 10px 8px; border-bottom: 1px solid var(--grid); text-align: left; vertical-align: middle; }
table.board tbody tr:last-child td { border-bottom: 0; }
table.board th { font-size: 12px; font-weight: 600; color: var(--ink2); white-space: nowrap; background: var(--surface); }
table.board th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
table.board th button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
table.board th[aria-sort] button::after { content: "↕"; color: var(--muted); font-size: 11px; }
table.board th[aria-sort="descending"] button::after { content: "↓"; color: var(--ink); }
table.board th[aria-sort="ascending"] button::after { content: "↑"; color: var(--ink); }
table.board td.num, table.board th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.board tbody tr:hover, table.board tr.picked { background: var(--brand-wash); }
.model { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.model img { width: 22px; height: 22px; flex: none; }
.model b { display: block; font-weight: 600; }
.model small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; white-space: nowrap; }
.model small.flag { white-space: normal; max-width: 260px; }
.model small.flag { color: var(--flag); }
.stars { display: inline-flex; gap: 0; font-size: 13px; line-height: 1; white-space: nowrap; }
.stars i { font-style: normal; color: var(--pip-off); }
.stars i.on { color: var(--star); }
td.total { font-weight: 700; font-size: 16px; }
td.pct { color: var(--ink2); }
td.rank { color: var(--ink2); font-weight: 600; }
.pick { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.pick:disabled { cursor: not-allowed; }
.links a { white-space: nowrap; margin-right: 10px; font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Compare: previews first, full width, rendered at desktop size and scaled to fit */
#compare[hidden] { display: none; }
.compare-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.bleed { width: min(100vw - 32px, 1840px); position: relative; left: 50%; transform: translateX(-50%); }
.reports { display: grid; gap: 16px; grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr)); margin: 14px 0 22px; }
@media (max-width: 760px) { .reports { grid-template-columns: 1fr; } }
.reports .frame { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.reports .frame header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; font-size: 14px; border-bottom: 1px solid var(--border); }
.reports .viewport { position: relative; height: min(78vh, 900px); overflow: hidden; background: #fff; }
.reports iframe { position: absolute; top: 0; left: 0; width: 1280px; border: 0; transform-origin: 0 0; background: #fff; }
.compare-charts { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
@media (min-width: 900px) { .compare-charts { grid-template-columns: 440px 1fr; } }
.radar svg { width: 100%; height: auto; display: block; }
.radar .ring { fill: none; stroke: var(--grid); }
.radar .spoke { stroke: var(--grid); }
.radar .axis-label { fill: var(--ink2); font-size: 12px; }
.radar .tick { fill: var(--muted); font-size: 10px; }
.radar polygon.series { fill-opacity: 0.10; stroke-width: 2; stroke-linejoin: round; }
.radar circle.pt { stroke: var(--surface); stroke-width: 2; }
.radar .hit { fill: transparent; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; }
table.mini { border-collapse: collapse; font-size: 14px; width: 100%; }
table.mini th, table.mini td { padding: 8px; border-bottom: 1px solid var(--grid); text-align: right; font-variant-numeric: tabular-nums; }
table.mini th:first-child, table.mini td:first-child { text-align: left; }
table.mini thead th { font-size: 12px; color: var(--ink2); font-weight: 600; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.tooltip { position: fixed; pointer-events: none; background: var(--ink); color: var(--page); font-size: 12px; padding: 6px 8px; border-radius: 6px; white-space: nowrap; z-index: 10; }
.tooltip[hidden] { display: none; }
button.clear { font: inherit; font-size: 14px; color: var(--brand); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* Method */
ul.plain { margin: 6px 0 0; padding-left: 18px; }
ul.plain li { margin: 4px 0; }
details { background: var(--raised); border-radius: 10px; padding: 10px 14px; margin: 10px 0; }
details summary { cursor: pointer; font-weight: 600; }
pre.prompt { white-space: pre-wrap; font-size: 13px; line-height: 1.5; color: var(--ink2); margin: 10px 0 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.grid2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .grid2 { grid-template-columns: 1fr 1fr; } }

footer.site { margin-top: 56px; padding: 24px 0 36px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
footer.site a { color: var(--ink2); }
.methodology h3, .appendix h3 { margin-top: 26px; }
.methodology details { margin: 10px 0; padding: 12px 16px; }
.methodology details summary { font-size: 16px; }
.methodology details[open] summary { margin-bottom: 8px; }
.methodology details p, .methodology details ul { color: var(--ink2); }
.appendix .why { color: var(--muted); }
pre.prompt .placeholder { color: var(--brand); font-style: italic; }
table.tiers { border-collapse: collapse; font-size: 14px; margin: 12px 0 4px; }
table.tiers th, table.tiers td { padding: 6px 16px 6px 0; border-bottom: 1px solid var(--border); text-align: left; color: var(--ink2); }
table.tiers th { font-size: 12px; font-weight: 600; }
