:root {
  color-scheme: dark;
  --bg: #0b0d0c;
  --panel: #121513;
  --panel-2: #181c19;
  --ink: #f0f2ed;
  --muted: #9da59d;
  --line: #2a302b;
  --acid: #c7ff4a;
  --blue: #8cc9ff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, input, select { font: inherit; }
button, select, input { color: inherit; }
button { cursor: pointer; }

header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 2rem;
  min-height: 72px;
  padding: 0 4vw;
}
header p { color: var(--muted); margin-right: auto; }
header a { color: var(--ink); text-decoration: none; }
.brand { font-weight: 750; letter-spacing: -.03em; }
.brand span { background: var(--acid); border-radius: 7px; color: #10130d; display: inline-grid; margin-right: .55rem; padding: .35rem; place-items: center; }

main { margin: auto; max-width: 1600px; padding: 0 4vw 8rem; }
.hero { padding: clamp(5rem, 10vw, 9rem) 0 6rem; }
.hero h1 { font-size: clamp(3.6rem, 8vw, 8.8rem); letter-spacing: -.075em; line-height: .86; margin: .3rem 0 2rem; max-width: 1200px; }
.hero h1 em { color: var(--acid); font-family: Georgia, serif; font-weight: 400; }
.hero > p:not(.eyebrow) { color: var(--muted); font-size: 1.15rem; line-height: 1.6; max-width: 650px; }
.eyebrow { color: var(--acid); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

.stats { display: grid; gap: 1px; grid-template-columns: repeat(4, 1fr); margin-top: 4rem; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--panel); padding: 1.4rem; }
.stat strong { display: block; font-size: 2rem; letter-spacing: -.05em; }
.stat span { color: var(--muted); font-size: .8rem; }

.explorer { border-top: 1px solid var(--line); padding-top: 2rem; }
.section-title, .result-bar { align-items: end; display: flex; justify-content: space-between; }
.section-title h2 { font-size: clamp(2rem, 4vw, 4rem); letter-spacing: -.055em; margin: .2rem 0 1.5rem; }
.quiet { background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: .65rem 1rem; }
.quiet:hover { border-color: var(--muted); }

.controls { background: var(--panel); border: 1px solid var(--line); display: grid; grid-template-columns: 2fr repeat(5, 1fr); }
label { border-right: 1px solid var(--line); padding: .8rem 1rem; }
label:last-child { border: 0; }
label span { color: var(--muted); display: block; font-size: .67rem; font-weight: 750; letter-spacing: .08em; margin-bottom: .35rem; text-transform: uppercase; }
input, select { background: transparent; border: 0; outline: 0; padding: .2rem 0; width: 100%; }
input:focus, select:focus { color: var(--acid); }
.result-bar { color: var(--muted); font-size: .85rem; padding: 1.1rem .2rem; }
.result-bar strong { color: var(--ink); }
.view-toggle { background: var(--panel); border: 1px solid var(--line); display: flex; padding: .2rem; }
.view-toggle button { background: transparent; border: 0; color: var(--muted); padding: .45rem .8rem; }
.view-toggle button.active { background: var(--ink); color: var(--bg); }

.table-wrap { border: 1px solid var(--line); overflow-x: auto; }
table { border-collapse: collapse; min-width: 900px; width: 100%; }
th { color: var(--muted); font-size: .68rem; letter-spacing: .08em; padding: .8rem 1rem; text-align: left; text-transform: uppercase; }
td { border-top: 1px solid var(--line); padding: 1rem; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--panel-2); }
.model-cell { min-width: 280px; }
.model-cell small { color: var(--muted); display: block; margin-top: .3rem; }
.model-link { background: 0; border: 0; font-weight: 700; padding: 0; text-align: left; }
.model-link:hover { color: var(--acid); }
.compare-button { background: var(--panel-2); border: 1px solid var(--line); border-radius: 50%; height: 2rem; width: 2rem; }
.compare-button.selected { background: var(--acid); color: #10130d; }
.na { color: #606760; }
.more { background: var(--ink); border: 0; color: var(--bg); display: block; font-weight: 750; margin: 1.5rem auto; padding: .85rem 2rem; }
.more[hidden] { display: none; }

.chart-panel { background: var(--panel); border: 1px solid var(--line); padding: clamp(1rem, 3vw, 2rem); }
.chart-heading { align-items: end; display: flex; justify-content: space-between; }
.chart-heading h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); letter-spacing: -.045em; margin: .2rem 0; }
.chart-selects { display: flex; border: 1px solid var(--line); }
.chart-selects label { min-width: 180px; }
.scatter { min-height: 440px; margin-top: 1rem; overflow: hidden; }
.scatter svg { display: block; height: auto; width: 100%; }
.scatter .grid { stroke: var(--line); stroke-width: 1; }
.scatter .axis-label { fill: var(--muted); font-size: 12px; }
.scatter circle { cursor: pointer; fill: var(--blue); opacity: .68; stroke: var(--panel); stroke-width: 1.5; transition: opacity .15s, r .15s; }
.scatter circle.matched { fill: var(--acid); }
.scatter circle:hover { opacity: 1; r: 7; }
.chart-note { color: var(--muted); font-size: .78rem; margin: 0; }
.bar-charts { display: grid; gap: 1px; grid-template-columns: repeat(2, 1fr); margin-top: 1px; background: var(--line); }
.bar-card { background: var(--panel); padding: 1.5rem; }
.bar-card h3 { margin: 0 0 1.5rem; }
.bar { align-items: center; display: grid; font-size: .78rem; gap: .7rem; grid-template-columns: minmax(100px, 1.3fr) 2fr auto; margin: .7rem 0; }
.bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { background: var(--panel-2); height: 8px; }
.bar-fill { background: var(--acid); height: 100%; min-width: 2px; }
.bar-value { color: var(--muted); font-variant-numeric: tabular-nums; }

.compare { align-items: center; background: var(--acid); bottom: 1.5rem; box-shadow: 0 10px 50px #0009; color: #10130d; display: flex; gap: 1rem; left: 50%; max-width: 900px; padding: .8rem; position: fixed; transform: translateX(-50%); width: calc(100% - 2rem); z-index: 5; }
.compare[hidden] { display: none; }
.compare > div { display: flex; flex: 1; flex-direction: column; overflow: hidden; }
#compare-names { font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare button { border-color: #10130d55; }
#open-compare { background: #10130d; border: 0; color: var(--ink); padding: .7rem 1rem; }

dialog { background: var(--panel); border: 1px solid var(--line); color: var(--ink); max-height: 88vh; max-width: 1100px; padding: 2rem; width: calc(100% - 2rem); }
dialog::backdrop { backdrop-filter: blur(7px); background: #000a; }
.dialog-close { background: transparent; border: 0; color: var(--muted); font-size: 2rem; position: absolute; right: 1rem; top: .5rem; }
.detail-head h2 { font-size: clamp(2rem, 5vw, 4.5rem); letter-spacing: -.06em; margin: .2rem 0; }
.detail-head p { color: var(--muted); }
.metric-grid { display: grid; gap: 1px; grid-template-columns: repeat(3, 1fr); margin-top: 2rem; background: var(--line); border: 1px solid var(--line); }
.metric { background: var(--panel-2); min-height: 100px; padding: 1rem; }
.metric span { color: var(--muted); display: block; font-size: .72rem; margin-bottom: .6rem; }
.metric strong { font-size: 1.35rem; }
.comparison { overflow-x: auto; }
.comparison table td:first-child { color: var(--muted); font-size: .75rem; text-transform: uppercase; }
.source-pills { display: flex; gap: .5rem; margin-top: 1rem; }
.pill { border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .72rem; padding: .3rem .6rem; }
.pill.on { border-color: var(--acid); color: var(--acid); }

footer { border-top: 1px solid var(--line); color: var(--muted); display: flex; font-size: .8rem; justify-content: space-between; padding: 2rem 4vw; }
.sr-only { height: 1px; overflow: hidden; position: absolute; width: 1px; clip: rect(0, 0, 0, 0); }

@media (max-width: 1000px) {
  .controls { grid-template-columns: repeat(3, 1fr); }
  .controls label { border-bottom: 1px solid var(--line); }
  .bar-charts { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  header { gap: 1rem; padding: 0 1rem; }
  header p { display: none; }
  header > a:last-child { margin-left: auto; }
  main { padding-inline: 1rem; }
  .hero { padding-top: 4rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .controls { grid-template-columns: 1fr 1fr; }
  .controls .search { grid-column: 1 / -1; }
  .chart-heading { align-items: stretch; flex-direction: column; gap: 1rem; }
  .chart-selects label { min-width: 0; width: 50%; }
  .scatter { min-height: 300px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  footer { flex-direction: column; padding-inline: 1rem; }
}
