:root {
  --bg: #000;
  --fg: #fff;
  --muted: #9a9a9a;
  --line: #262626;
  --dot: #1f1f1f;
  --panel: #0b0b0b;
  --accent: #5b25d4;
  --accent-fg: #a98bff;
  --cyan: #40ffdd;
  /* chart series, validated for this surface (dataviz validator, dark) */
  --s1: #9887ef; --s2: #00a888; --s3: #e76624; --s4: #338ced; --s5: #e24d8b;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fff;
    --fg: #000;
    --muted: #5f5f5f;
    --line: #e4e4e4;
    --dot: #e6e6e6;
    --panel: #fafafa;
    --accent-fg: #5b25d4;
    --cyan: #00a88a;
    --s1: #6a4ce2; --s2: #00b894; --s3: #f47230; --s4: #257de0; --s5: #ee7fac;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--fg);
  font: 400 16px/1.55 var(--sans);
  max-width: 64rem;
  margin-inline: auto;
  padding: 0 1.25rem;
}

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-fg); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.mono, code, pre { font-family: var(--mono); }
.dim { color: var(--muted); font-weight: 300; }
.label .mono { text-transform: none; letter-spacing: 0; }
.sr, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip:focus { position: absolute; top: .5rem; left: .5rem; background: var(--bg); padding: .25rem .5rem; }

.label {
  font: 500 .75rem/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2.5rem 0 .75rem;
}

header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.wordmark { font-weight: 600; font-size: 1.25rem; letter-spacing: -.02em; text-decoration: none; }
.hosted { font: 400 .7rem var(--mono); color: var(--muted); text-decoration: none; margin-top: .2rem; }
.hosted .brand-name { color: var(--accent-fg); }
.hosted:hover { color: var(--fg); }
header nav a { margin-left: 1.25rem; font-size: .875rem; color: var(--muted); text-decoration: none; }
header nav a:hover { color: var(--fg); }

.hero { position: relative; padding: 4rem 0 1rem; overflow: hidden; }
.pitch {
  font-weight: 500; font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.08; letter-spacing: -.035em; margin: 0; max-width: 16ch;
}
.sub { color: var(--muted); max-width: 46ch; margin: 1rem 0 2rem; }

.cmd-row {
  display: flex; align-items: stretch;
  border: 1px solid var(--line); background: var(--panel);
}
.cmd pre { margin: 0; padding: .9rem 1rem; overflow-x: auto; flex: 1; min-width: 0; font-size: .9rem; }
.cmd pre::before { content: "$ "; color: var(--muted); }
.copy {
  font: 500 .75rem var(--mono); text-transform: uppercase; letter-spacing: .08em;
  background: var(--accent); color: #fff; border: 0; padding: 0 1.1rem; cursor: pointer;
}
.copy:hover { filter: brightness(1.15); }

.math math { font-size: 1.4rem; margin: .5rem 0; }
.caption { color: var(--muted); font-size: .875rem; max-width: 60ch; }

.skus { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.skus a {
  font: .8rem var(--mono); text-decoration: none;
  border: 1px solid var(--line); padding: .3rem .65rem; background: var(--bg);
}
.skus a[aria-current] { border-color: var(--accent); color: var(--accent-fg); }
.skus .n { color: var(--muted); margin-left: .25rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--bg); }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th, td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font: 500 .7rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--panel); }
.num { text-align: right; }
.unit { text-transform: none; }
tr.over td { color: var(--muted); }
.flag { color: #ff6b6b; font-size: .75rem; }

.empty, .api { color: var(--muted); font-size: .875rem; }

.result h1 { font-weight: 500; font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -.03em; margin: 0 0 1rem; }
.notice { border-left: 2px solid var(--accent); padding: .5rem .9rem; background: var(--panel); }
.compare { font-size: 1.05rem; }
.compare::before { content: ""; display: inline-block; width: .5rem; height: .5rem; background: var(--cyan); margin-right: .6rem; vertical-align: middle; }
.env { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.5rem; margin: 0; font-size: .875rem; }
.env dt { color: var(--muted); }
.env dd { margin: 0; overflow-wrap: anywhere; }

.error { padding: 4rem 0; }

footer.site {
  margin-top: 5rem; padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: .8rem;
}
footer.site p { margin: .25rem 0; }

@media (max-width: 40rem) {
  .hero { padding-top: 2.5rem; }
}
/* "see all" call to action under the public list */
.more {
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between;
  border: 1px solid var(--line); border-top: 0; background: var(--panel);
  padding: .9rem 1rem; color: var(--muted); font-size: .9rem;
}
.more p { margin: 0; }
.button {
  font: 500 .75rem var(--mono); text-transform: uppercase; letter-spacing: .08em;
  background: var(--accent); color: #fff; padding: .7rem 1.1rem; text-decoration: none; white-space: nowrap;
}
.button:hover { filter: brightness(1.15); }
.button.disabled { background: transparent; color: var(--muted); border: 1px dashed var(--line); filter: none; }

/* back link on result pages: right-aligned on the label's line */
.result-top { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.result-top .label { margin: 0; }
.back {
  display: inline-flex; align-items: center; gap: .5rem; margin-left: auto;
  padding: .55rem 1rem; border: 1px solid var(--line); background: var(--bg);
  color: var(--fg); text-decoration: none; font: 500 .95rem var(--sans);
}
.back:hover, .back:focus-visible { border-color: var(--accent-fg); }
.back-arrow { display: inline-block; color: var(--accent-fg); font-size: 1.1rem; line-height: 1; }

/* host facts: the hardware a result ran on */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 1.25rem 0; }
.facts div { background: var(--bg); padding: .8rem 1rem; }
.facts dt { font: 500 .7rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.facts dd { margin: .3rem 0 0; font-size: 1.05rem; }
.meta { display: block; color: var(--muted); font: 400 .78rem var(--mono); margin-top: .15rem; }
td .meta { font-size: .72rem; margin-top: 0; }
table.full { font-size: .875rem; }
table.full th, table.full td { padding-inline: .5rem; }
table.full td { white-space: nowrap; }
table.full td:first-child a { color: var(--fg); text-decoration-color: var(--accent-fg); text-underline-offset: 3px; }
.withheld { color: var(--muted); font-style: italic; }

/* charts */
.chart { margin: 2rem 0 0; }
.chart-wrap { position: relative; border: 1px solid var(--line); background: var(--bg); padding: .5rem .25rem 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--muted); stroke-width: 1; }
.chart .tick { fill: var(--muted); font: 400 11px var(--mono); }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { stroke: var(--bg); stroke-width: 2; }
.chart .end-label { fill: var(--fg); font: 500 11px var(--mono); }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .hit { fill: transparent; }
.line.s0 { stroke: var(--muted); } .dot.s0, .sw.s0 { fill: var(--muted); background: var(--muted); }
.line.s1 { stroke: var(--s1); } .dot.s1 { fill: var(--s1); } .sw.s1 { background: var(--s1); }
.line.s2 { stroke: var(--s2); } .dot.s2 { fill: var(--s2); } .sw.s2 { background: var(--s2); }
.line.s3 { stroke: var(--s3); } .dot.s3 { fill: var(--s3); } .sw.s3 { background: var(--s3); }
.line.s4 { stroke: var(--s4); } .dot.s4 { fill: var(--s4); } .sw.s4 { background: var(--s4); }
.line.s5 { stroke: var(--s5); } .dot.s5 { fill: var(--s5); } .sw.s5 { background: var(--s5); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; padding: 0; margin: .6rem 0 0; font: 400 .78rem var(--mono); color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: .4rem; }
.sw { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.tip {
  position: absolute; top: .5rem; pointer-events: none; min-width: 11rem;
  background: var(--panel); border: 1px solid var(--line); padding: .5rem .7rem;
  font: 400 .75rem/1.5 var(--mono); color: var(--fg); white-space: nowrap;
}
.tip strong { display: block; color: var(--muted); font-weight: 500; margin-bottom: .2rem; }
.data { margin-top: 1rem; }
.data summary { cursor: pointer; color: var(--muted); font: 500 .8rem var(--mono); }
.data table { margin-top: .75rem; }
.data caption { text-align: left; color: var(--muted); font-size: .8rem; padding: .5rem .75rem; caption-side: top; }

/* full results page */
.results-page h1 { font-weight: 500; letter-spacing: -.02em; margin: 1rem 0 .25rem; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem 1rem; margin: 1.5rem 0 1rem; padding: 1rem; border: 1px solid var(--line); background: var(--panel); }
.filters label { display: flex; flex-direction: column; gap: .3rem; font: 500 .7rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.filters select {
  font: 400 .9rem var(--sans); color: var(--fg); background: var(--bg); border: 1px solid var(--line);
  padding: .45rem .6rem; min-width: 9rem; text-transform: none; letter-spacing: 0;
}
.filters select:focus-visible { outline: 2px solid var(--accent-fg); outline-offset: 1px; }
.filters .button { border: 0; cursor: pointer; }
.filters .reset { color: var(--muted); font: 500 .75rem var(--mono); padding: .7rem .25rem; }
.count { color: var(--muted); font: 500 .8rem var(--mono); margin: .5rem 0; }
.all { margin: .75rem 0 0; }
.all a { color: var(--accent-fg); text-decoration: none; font-weight: 500; }
.all a:hover { text-decoration: underline; }

/* install command: one terminal line, a switch picks the mode flag */
.mode-input { position: absolute; opacity: 0; pointer-events: none; }
.modes { display: inline-flex; border: 1px solid var(--line); margin-bottom: .6rem; background: var(--panel); }
.modes label {
  font: 500 .72rem var(--mono); text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); padding: .5rem .9rem; cursor: pointer; user-select: none;
}
.modes label:hover { color: var(--fg); }
#mode-ui:checked ~ .modes label[for="mode-ui"],
#mode-submit:checked ~ .modes label[for="mode-submit"] { background: var(--accent); color: #fff; }
#mode-ui:focus-visible ~ .modes label[for="mode-ui"],
#mode-submit:focus-visible ~ .modes label[for="mode-submit"] { outline: 2px solid var(--accent-fg); outline-offset: 2px; }
#mode-ui:checked ~ [data-mode="submit"],
#mode-submit:checked ~ [data-mode="ui"] { display: none; }
.term .flag { color: var(--accent-fg); font-weight: 500; display: inline-block; vertical-align: bottom; overflow: hidden; white-space: nowrap; }
.term code::after { content: ""; display: inline-block; width: .55em; height: 1.1em; margin-left: .2em; vertical-align: text-bottom; background: var(--accent-fg); opacity: .8; }
.mode-note { color: var(--muted); font-size: .85rem; margin: .6rem 0 0; }

@media (prefers-reduced-motion: no-preference) {
  /* the flag types itself in whenever its mode is shown */
  .term .flag { animation: type-flag .45s steps(9, end) both; }
  .term code::after { animation: caret 1.1s steps(1) infinite; }
  @keyframes type-flag { from { max-width: 0; } to { max-width: 9ch; } }
  @keyframes caret { 50% { opacity: 0; } }
  .back { transition: border-color .2s ease; }
  .back-arrow { transition: transform .25s ease; }
  .back:hover .back-arrow, .back:focus-visible .back-arrow { transform: translateX(-3px); }
  a, .skus a { transition: color .15s, border-color .15s; }
}

/* torus hero: live canvas (torus.js) over a static SVG fallback */
.torus {
  position: absolute; z-index: -1; right: 0; top: .5rem;
  width: min(31rem, 80vw); aspect-ratio: 8 / 5;
  pointer-events: none;
}
.torus canvas, .torus svg { display: block; width: 100%; height: 100%; }
.torus canvas { display: none; }
.torus.live canvas { display: block; }
.torus.live svg { display: none; }
.torus svg { fill: none; stroke: var(--accent); stroke-width: 1; }
.torus svg .back { opacity: .3; }
.torus .gpus circle { fill: var(--fg); stroke: none; }
@media (max-width: 40rem) {
  .torus { opacity: .3; }
}
/* end torus hero */
