:root {
  color-scheme: dark;
  --bg: #08090a;
  --l1: #0f1011;
  --l2: #141516;
  --l3: #191a1b;
  --fill: #1c1c1f;
  --text: #f7f8f8;
  --text-2: #d0d6e0;
  --muted: #8a8f98;
  --faint: #62666d;
  --line: rgba(255, 255, 255, 0.08);
  --rule: #202122;
  --border: #23252a;
  --border-2: #34343a;
  --accent: #7170ff;
  --focus: #5e6ad2;
  /* One fixed hue per language, the validated dark categorical palette */
  --py: #338ced;
  --rs: #e76624;
  --go: #00a888;
  --js: #d28e05;
  --java: #e24d8b;
  --swift: #0aac23;
  --rb: #9887ef;
  --c: #eb6263;
  --good: #0aac23;
  --warn: #fbb315;
  --bad: #dc3c3d;
  --font: "Inter", "SF Pro Display", -apple-system, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font: 400 15px/1.6 var(--font);
  font-feature-settings: "cv01", "ss03";
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: color-mix(in lch, #5e6ad2, black 10%); color: #fff; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--focus); color: #fff; padding: 6px 12px; border-radius: 6px; z-index: 50; }
.skip:focus { left: 8px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 11, 11, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.top-in { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 560; text-decoration: none; font-size: 15px; }
.brand .mark { width: 22px; height: 22px; color: var(--text); }
.brand.small { font-size: 13px; }
.brand.small .mark { width: 18px; height: 18px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 13px; padding: 6px 10px; border-radius: 999px; transition: color .15s, background-color .15s; }
.nav a:hover { color: var(--text); background: var(--l2); transition: none; }
.nav .gh svg { width: 18px; height: 18px; display: block; }
@media (max-width: 640px) { .nav a:not(.gh) { display: none; } }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; padding-top: 88px; padding-bottom: 72px; }
.hero h1 {
  color: var(--text); font-weight: 510; font-size: 56px; line-height: 1.05; letter-spacing: -0.022em;
  margin: 0 0 20px; text-wrap: balance; margin-left: -2px;
}
.lead { font-size: 18px; line-height: 1.55; color: var(--muted); margin: 0 0 32px; max-width: 30em; text-wrap: pretty; }
.ctas { display: flex; gap: 8px; flex-wrap: wrap; }
.ctas.center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px;
  font-size: 13px; font-weight: 510; text-decoration: none; color: var(--text);
  background: var(--l2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), inset 0 1px 0 rgba(255,255,255,.04), 0 0 0 1px rgba(0,0,0,.6), 0 4px 4px rgba(0,0,0,.1);
  transition: background-color .15s, transform .1s;
}
.btn:hover { background: var(--l3); transition: none; }
.btn:active { transform: scale(0.97); }
.btn.primary { background: #e6e6e6; color: #08090a; box-shadow: 0 1px 1px #00000012, 0 0 1px #00000014; }
.btn.primary:hover { background: #fff; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 16px; }

.stage {
  position: relative; margin: 0; padding: 20px 20px 16px;
  background: linear-gradient(180deg, var(--l1), #0b0c0d);
  border-radius: 16px;
  box-shadow: 0 2px 32px #08090a, inset 0 0 0 1px var(--border);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.06) 1px, transparent 0),
    linear-gradient(180deg, var(--l1), #0b0c0d);
  background-size: 16px 16px, auto;
}
.corner { position: absolute; width: 10px; height: 10px; border-color: var(--border-2); border-style: solid; border-width: 0; }
.corner.tl { top: -5px; left: -5px; border-top-width: 1px; border-left-width: 1px; }
.corner.tr { top: -5px; right: -5px; border-top-width: 1px; border-right-width: 1px; }
.corner.bl { bottom: -5px; left: -5px; border-bottom-width: 1px; border-left-width: 1px; }
.corner.br { bottom: -5px; right: -5px; border-bottom-width: 1px; border-right-width: 1px; }
.stage-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; font-size: 13px; color: var(--text); font-weight: 510; margin-bottom: 14px; }
.stage-head .muted { font-weight: 400; }
.race { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.race li { display: grid; grid-template-columns: 118px 1fr 64px; gap: 10px; align-items: center; font-size: 12px; height: 18px; }
.race .nm { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.race .track { position: relative; height: 10px; }
.race .bar { position: absolute; inset: 0 auto 0 0; border-radius: 0 4px 4px 0; transform-origin: left center; }
.race .val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 11px; }
@media (prefers-reduced-motion: no-preference) {
  .race .bar { animation: grow .7s cubic-bezier(.23, 1, .32, 1) both; animation-delay: calc(var(--i) * 25ms); }
}
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.legend span, .lang { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }

/* Bands */
.band { border-top: 1px solid var(--line); padding: 72px 0; }
#results { padding: 0; border-top: 0; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; color: var(--text); font-size: 32px; font-weight: 510; letter-spacing: -0.022em; line-height: 1.125; }
.sec-head p { margin: 0; font-size: 15px; }
h3 { color: var(--text); font-size: 15px; font-weight: 590; margin: 32px 0 10px; }
h3:first-child { margin-top: 0; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.stat { padding: 28px 24px 32px 0; }
.stat + .stat { border-left: 1px solid var(--rule); padding-left: 24px; }
.stat b { display: block; color: var(--text); font-size: 32px; font-weight: 510; letter-spacing: -0.022em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 13px; }
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--rule); }
}

/* Takeaways */
.takeaways { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); }
.takeaways li { padding: 20px 24px 24px; border-bottom: 1px solid var(--rule); }
.takeaways li:not(:nth-child(3n+1)) { border-left: 1px solid var(--rule); }
.takeaways b { display: block; color: var(--text); font-weight: 510; font-size: 15px; margin-bottom: 4px; }
.takeaways span { color: var(--muted); font-size: 14px; }
@media (max-width: 900px) {
  .takeaways { grid-template-columns: 1fr; }
  .takeaways li:not(:nth-child(3n+1)) { border-left: 0; }
  .takeaways li { padding: 18px 12px 20px; }
}

/* Filters, tabs, chips */
.filters, .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chip {
  font: inherit; font-size: 13px; height: 28px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  color: var(--muted); background: transparent; border: 1px solid var(--border);
  display: inline-flex; align-items: center; gap: 6px; transition: color .15s, background-color .15s;
}
.chip:hover { color: var(--text); transition: none; }
.chip[aria-pressed="true"] { color: var(--text); background: var(--l3); border-color: var(--border-2); box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.chip:active { transform: scale(0.97); }
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tab {
  font: inherit; font-size: 14px; background: none; border: 0; color: var(--muted); cursor: pointer;
  padding: 10px 0; position: relative; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--text); border-radius: 2px; }
.tab .count { color: var(--faint); margin-left: 6px; font-variant-numeric: tabular-nums; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table-wrap > table > thead > tr > th { border-top: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 12px; }
th:last-child, td:last-child { padding-right: 12px; }
th { color: var(--muted); font-weight: 400; font-size: 13px; }
th button { all: unset; cursor: pointer; }
th button:hover, th button[aria-sort] { color: var(--text); }
th button[aria-sort="descending"]::after { content: " ↓"; }
th button[aria-sort="ascending"]::after { content: " ↑"; }
th button:focus-visible { outline: 2px solid var(--focus); border-radius: 4px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num { font-family: var(--mono); font-size: 13px; }
.lb td:first-child a { color: var(--text); text-decoration: none; font-weight: 510; }
.lb td:first-child a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lb .ver { color: var(--faint); font-size: 12px; margin-left: 6px; font-family: var(--mono); }
.lb tr:hover td { background: var(--l1); }
.dash { color: var(--faint); }
.cellbar { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.cellbar i { display: inline-block; height: 6px; border-radius: 0 3px 3px 0; background: var(--text-2); opacity: .5; }
.robust-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.robust-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--fill); box-shadow: inset 0 0 0 1px var(--border-2); }
.robust-dots i.on { background: var(--good); box-shadow: none; }
.robust-dots i.half { background: var(--warn); box-shadow: none; }
.sm-dot { display: none; }
@media (max-width: 760px) {
  .hide-sm { display: none; }
  .lb .ver { display: none; }
  .sm-dot { display: inline-flex; margin-right: 8px; vertical-align: middle; }
  .lb th, .lb td { padding-left: 6px; padding-right: 6px; }
  .lb th:first-child, .lb td:first-child { padding-left: 10px; }
  .lb th:last-child, .lb td:last-child { padding-right: 10px; }
  .lb .cellbar i { display: none; }
}
.foot-note { font-size: 13px; margin: 16px 0 0; max-width: 60em; }

/* Speed bars */
.bars { display: grid; gap: 6px; }
.brow { display: grid; grid-template-columns: 180px 1fr 96px; gap: 12px; align-items: center; font-size: 13px; min-height: 22px; border-radius: 6px; padding: 0 10px; }
.brow:hover { background: var(--l1); }
.brow .nm { display: flex; align-items: center; gap: 8px; color: var(--text-2); overflow: hidden; }
.brow .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow .track { height: 12px; position: relative; }
.brow .bar { position: absolute; inset: 0 auto 0 0; border-radius: 0 4px 4px 0; transition: width .3s cubic-bezier(.23, 1, .32, 1); }
.brow .val { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fails { margin-top: 20px; font-size: 13px; color: var(--muted); }
.fails b { color: var(--text-2); font-weight: 510; }
.fails ul { margin: 6px 0 0; padding-left: 18px; }
.fails li { margin: 2px 0; }
@media (max-width: 640px) {
  .brow { grid-template-columns: 112px 1fr 72px; gap: 8px; }
  .race li { grid-template-columns: 92px 1fr 52px; }
}

/* Heatmap */
.heat td.cell { text-align: center; font-family: var(--mono); font-size: 12px; min-width: 64px; color: var(--text); }
.heat th.col { text-align: center; white-space: normal; min-width: 72px; line-height: 1.3; }
.heat td.fail { color: var(--faint); }
.heat .lang { color: var(--text-2); }

/* Robustness */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.st svg { width: 14px; height: 14px; flex: none; }
.st.pass { color: var(--text-2); } .st.pass svg { color: var(--good); }
.st.partial { color: var(--text-2); } .st.partial svg { color: var(--warn); }
.st.fail { color: var(--muted); } .st.fail svg { color: var(--bad); }
.st.na { color: var(--faint); }

/* Runtimes */
.rt { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 0; border-top: 1px solid var(--border); }
.rt-card { padding: 20px 12px 24px; border-bottom: 1px solid var(--rule); }
.rt-card h3 { margin: 0 0 4px; font-size: 15px; }
.rt-card p { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.rt-row { display: grid; grid-template-columns: 48px 1fr 80px; gap: 10px; align-items: center; font-size: 13px; height: 22px; }
.rt-row .track { height: 10px; position: relative; }
.rt-row .bar { position: absolute; inset: 0 auto 0 0; border-radius: 0 4px 4px 0; background: var(--js); }
.rt-row .bar.best { background: var(--text); }
.rt-row .val { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Method */
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.steps { margin: 0; padding-left: 20px; }
.steps li { margin: 6px 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }
.docs td, .docs th { font-size: 13px; white-space: normal; padding: 8px 10px; }
.docs td.num { white-space: nowrap; }
.cta-close { text-align: center; padding: 96px 0 24px; }
.cta-close h2 { color: var(--text); font-size: 40px; font-weight: 510; letter-spacing: -0.022em; margin: 0 0 24px; }

.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13px; }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot a { color: var(--text-2); }

.tip {
  position: fixed; z-index: 40; pointer-events: none; max-width: 280px;
  background: var(--l2); color: var(--text-2); font-size: 12px; line-height: 1.45;
  border-radius: 8px; padding: 8px 10px;
  box-shadow: inset 0 0 0 1px var(--border-2), 0 7px 32px #00000059;
}
.tip b { color: var(--text); font-weight: 590; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; gap: 40px; }
  .hero h1 { font-size: 40px; }
  .method-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero h1 { font-size: 34px; }
  .lead { font-size: 16px; }
  .band { padding: 56px 0; }
  .sec-head h2 { font-size: 26px; }
  .cta-close h2 { font-size: 28px; }
  .stage { padding: 16px 14px 14px; }
}
