:root {
  --ink: #121313;
  --paper: #f2f0e8;
  --muted: #77766f;
  --line: #cbc8bc;
  --acid: #c8ff3d;
  --card: #e8e5da;
  --shadow: rgba(18, 19, 19, .16);
  --header: rgba(242, 240, 232, .82);
}

:root.dark {
  --ink: #eeede6;
  --paper: #111311;
  --muted: #969990;
  --line: #34382f;
  --acid: #baff39;
  --card: #1a1d19;
  --shadow: rgba(0, 0, 0, .38);
  --header: rgba(17, 19, 17, .84);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  transition: color .25s ease, background .25s ease;
}
button, a { color: inherit; }
button { font: inherit; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 76px;
  padding: 0 5vw;
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; background: var(--acid); color: #111; font-size: 13px; }
nav { display: flex; align-items: center; gap: 28px; }
nav a { padding: 28px 0 25px; color: var(--muted); font-size: 13px; text-decoration: none; }
nav a:hover, nav a.active { color: var(--ink); }
nav a.active { border-bottom: 2px solid var(--ink); }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }

main { overflow: hidden; }
.hero { min-height: 625px; padding: 110px 8vw 70px; position: relative; }
.hero::after {
  content: "05";
  position: absolute;
  right: 7vw;
  top: 85px;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  font-size: clamp(12rem, 30vw, 30rem);
  font-weight: 800;
  line-height: .8;
  z-index: -1;
}
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow span { width: 7px; height: 7px; background: var(--acid); border-radius: 50%; box-shadow: 0 0 0 4px color-mix(in srgb, var(--acid) 24%, transparent); }
h1, h2, p { margin-top: 0; }
h1 { max-width: 950px; margin: 28px 0 30px; font-size: clamp(4rem, 9vw, 9rem); line-height: .86; letter-spacing: -.075em; }
h1 em { font-family: Georgia, serif; font-weight: 400; }
.lede { max-width: 560px; color: var(--muted); font-size: 19px; line-height: 1.55; }
.hero-meta { display: flex; gap: 60px; margin-top: 64px; }
.hero-meta div { display: grid; gap: 5px; }
.hero-meta strong { font-size: 23px; }
.hero-meta span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }

.leaderboard { padding: 90px 8vw 110px; background: var(--ink); color: var(--paper); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.section-heading h2, .methodology h2 { margin: 18px 0 0; font-size: clamp(2.5rem, 5vw, 5rem); letter-spacing: -.055em; line-height: .95; }
.section-heading > p { color: var(--muted); font-size: 12px; }
.controls { display: flex; justify-content: space-between; margin: 70px 0 28px; }
.segmented { display: inline-flex; padding: 4px; border: 1px solid color-mix(in srgb, var(--paper) 23%, transparent); border-radius: 100px; }
.segmented button { padding: 8px 18px; border: 0; border-radius: 100px; color: var(--muted); background: transparent; font-size: 12px; cursor: pointer; }
.segmented button.selected { color: var(--ink); background: var(--paper); }
.sort-button { border: 0; border-bottom: 1px solid var(--muted); color: var(--paper); background: transparent; font-size: 12px; cursor: pointer; }
.chart-shell { position: relative; padding-top: 28px; }
.scale { position: absolute; inset: 0 0 0 280px; display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.scale::after { content: ""; position: absolute; inset: 22px 0 0; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--paper) 10%, transparent) 0 1px, transparent 1px 20%); pointer-events: none; }
.chart { position: relative; }
.chart-row { display: grid; grid-template-columns: 255px 1fr 78px; align-items: center; gap: 25px; min-height: 105px; border-top: 1px solid color-mix(in srgb, var(--paper) 15%, transparent); cursor: pointer; }
.chart-row:last-child { border-bottom: 1px solid color-mix(in srgb, var(--paper) 15%, transparent); }
/* A model whose basket cannot be completed is shown rather than fatal: the score
   is withheld and it sits below the ranked rows. See README, Suite change. */
.chart-row.is-unranked { opacity: 0.6; }
.chart-row.is-unranked:hover { opacity: 0.85; }
.chart-row.is-unranked .rank { font-style: normal; }
.receipt a.is-missing { opacity: 0.55; }
.receipt a.is-missing small { font-style: italic; }
.receipt-note { margin: 14px 0 0; color: var(--muted); font: italic 13px/1.5 Georgia, serif; }
.chart-row:hover .model-name { color: var(--model-color); transform: translateX(5px); }
.model-label { display: flex; align-items: center; gap: 14px; }
.rank { width: 22px; color: var(--muted); font: italic 14px Georgia, serif; }
.provider-mark { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border: 1px solid color-mix(in srgb, var(--model-color) 50%, transparent); border-radius: 11px; color: var(--model-color); background: color-mix(in srgb, var(--model-color) 11%, transparent); box-shadow: inset 0 0 20px color-mix(in srgb, var(--model-color) 6%, transparent); }
.provider-mark svg { width: 28px; height: 28px; }
.model-name { font-size: 15px; font-weight: 650; transition: .2s ease; }
.provider { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.bar-track { height: 14px; background: color-mix(in srgb, var(--paper) 8%, transparent); overflow: visible; }
.bar { position: relative; width: 0; height: 100%; background: linear-gradient(90deg, color-mix(in srgb, var(--model-color) 62%, white), var(--model-color)); box-shadow: 0 0 20px color-mix(in srgb, var(--model-color) 24%, transparent); transition: width .8s cubic-bezier(.22,.8,.25,1); }
.bar::after { content: ""; position: absolute; right: -1px; top: -5px; width: 2px; height: 24px; background: var(--model-color); }
.score { font-size: 24px; font-weight: 700; text-align: right; letter-spacing: -.04em; }
.score-wrap small { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.35; text-align: right; letter-spacing: .05em; text-transform: uppercase; }
.chart.dots .bar-track { height: 1px; background: color-mix(in srgb, var(--paper) 25%, transparent); overflow: visible; }
.chart.dots .bar { height: 1px; background: transparent; }
.chart.dots .bar::after { top: -8px; width: 17px; height: 17px; border-radius: 50%; background: var(--model-color); box-shadow: 0 0 0 6px color-mix(in srgb, var(--model-color) 17%, transparent); }
.chart-hint { margin: 18px 0 0; color: var(--muted); font-size: 11px; text-align: right; }

.insight-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.insight-strip article { min-height: 220px; padding: 45px 4vw; border-right: 1px solid var(--line); }
.insight-strip article:last-child { border: 0; }
.insight-number { color: var(--muted); font: italic 14px Georgia, serif; }
.insight-strip p { max-width: 290px; margin-top: 65px; color: var(--muted); line-height: 1.45; }
.insight-strip strong { color: var(--ink); }
.methodology { display: grid; grid-template-columns: 1fr 1fr; gap: 8vw; padding: 110px 8vw; }
.method-copy { color: var(--muted); font-size: 17px; line-height: 1.65; }
.method-copy code { padding: 2px 6px; border: 1px solid var(--line); color: var(--ink); font-size: 13px; }
.formula { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 42px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.formula b { color: var(--acid); font-size: 20px; }
footer { display: flex; justify-content: space-between; padding: 28px 5vw; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
footer p { margin: 0; }

dialog { width: min(680px, calc(100vw - 30px)); padding: 48px; border: 1px solid var(--line); color: var(--ink); background: var(--paper); box-shadow: 0 30px 90px var(--shadow); }
dialog::backdrop { background: rgba(0, 0, 0, .64); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: 17px; right: 20px; border: 0; background: transparent; font-size: 28px; cursor: pointer; }
.dialog-provider { display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.dialog-provider small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 500; }
.dialog-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--model-color); background: color-mix(in srgb, var(--model-color) 13%, transparent); }
.dialog-mark svg { width: 31px; height: 31px; }
dialog h2 { max-width: 430px; margin: 16px 0 34px; font-size: 42px; letter-spacing: -.05em; }
.dialog-score { display: flex; align-items: center; gap: 18px; padding: 24px 0; border-block: 1px solid var(--line); }
.dialog-score strong { color: var(--model-color); font-size: 70px; letter-spacing: -.07em; line-height: 1; }
.dialog-score span { color: var(--muted); font-size: 10px; line-height: 1.3; letter-spacing: .1em; text-transform: uppercase; }
.dialog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 28px 0; }
.dialog-grid div { display: grid; gap: 5px; }
.dialog-grid span { color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.dialog-grid strong { font-size: 13px; }
.dialog-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.dialog-note a { color: var(--ink); }
.receipt { margin-bottom: 24px; border-top: 1px solid var(--line); }
.receipt-head, .receipt a, .receipt-total { display: grid; grid-template-columns: 1fr 70px 90px; gap: 15px; align-items: center; }
.receipt-head { padding: 11px 0; color: var(--muted); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.receipt-head span:not(:first-child), .receipt a > span:not(:first-child) { text-align: right; }
.receipt a { padding: 11px 0; border-top: 1px solid var(--line); color: var(--ink); font-size: 11px; text-decoration: none; }
.receipt a:hover strong { text-decoration: underline; text-decoration-color: var(--acid); text-decoration-thickness: 2px; }
.receipt a strong, .receipt a small { display: block; }
.receipt a small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.receipt-total { padding: 15px 0; border-top: 2px solid var(--ink); font-size: 12px; font-weight: 700; }
.receipt-total span:last-child { grid-column: 3; text-align: right; font-size: 20px; }
.data-error { padding: 40px 0; color: #ff8b72; line-height: 1.5; }

@media (max-width: 720px) {
  .site-header { padding: 0 20px; }
  nav a { display: none; }
  .hero { min-height: 590px; padding: 80px 24px 55px; }
  h1 { font-size: 4.15rem; }
  .hero-meta { gap: 25px; }
  .leaderboard { padding: 70px 24px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 18px; }
  .scale { display: none; }
  .chart-shell { padding-top: 0; }
  .chart-row { grid-template-columns: 1fr 68px; gap: 15px; padding: 18px 0; }
  .bar-track { grid-column: 1 / 3; }
  .score { grid-column: 2; grid-row: 1; }
  .insight-strip { grid-template-columns: 1fr; }
  .insight-strip article { min-height: 160px; border-right: 0; border-bottom: 1px solid var(--line); }
  .insight-strip p { margin-top: 35px; }
  .methodology { grid-template-columns: 1fr; padding: 80px 24px; }
  .formula { align-items: flex-start; }
  footer { display: grid; gap: 10px; }
  dialog { padding: 40px 28px; }
  .receipt-head, .receipt a, .receipt-total { grid-template-columns: 1fr 55px 72px; gap: 8px; }
}

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