/* Mono, dark. Colour is spent on data: the four performance areas, three language families on
   the field chart, good/bad markers. The relay being compared is white with a ring. */
:root {
  color-scheme: dark;
  --bg: #0c0d0f; --surface: #131417; --raised: #1a1c20; --line: #24262b; --line-2: #34373e;
  --fg: #e7e5e0; --fg-2: #a19f98; --fg-3: #6d6b66; --sel: #ffffff; --dot: #5d5b57;
  --good: #3fb950; --warn: #d29922; --bad: #f85149; --base: #8d8a83;
  --a-write: #d55181; --a-read: #3987e5; --a-live: #d95926; --a-connections: #199e70;
  --l-go: #3987e5; --l-rust: #d95926; --l-cpp: #199e70; --l-zig: #c98500; --l-ts: #d55181;
  --l-py: #008300; --l-jvm: #9085e9; --l-php: #e66767; --l-other: #7a7872;
  --h0: #1b1c20; --h1: #2c2a4a; --h2: #554c9e; --h3: #9085e9;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.55 var(--mono); font-variant-numeric: tabular-nums; }
main { max-width: 1200px; margin: 0 auto; padding: 24px 16px 64px; display: grid; gap: 24px; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
h1 { font-size: 1.5rem; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; }
h3 { font-size: 0.9rem; }
p { margin: 0; }
a { color: var(--fg); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--fg-2); }
code { font: inherit; font-size: 0.92em; color: var(--fg); background: var(--raised); padding: 1px 4px; border-radius: 3px; }
.muted { color: var(--fg-3); }
.dim { color: var(--fg-2); }
:focus-visible { outline: 2px solid var(--sel); outline-offset: 2px; border-radius: 3px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.card > header { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; }
.card .sub, .sub { font-size: 0.78rem; color: var(--fg-3); }
.scroll { overflow-x: auto; }
.label { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 6; background: color-mix(in oklab, var(--bg) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar .in { max-width: 1200px; margin: 0 auto; padding: 8px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.brand { font-weight: 700; text-decoration: none; }
.brand b { color: var(--a-read); }
.picker { display: flex; gap: 8px; align-items: center; font-size: 0.8rem; color: var(--fg-2); }
select, .btn { font: inherit; font-size: 0.82rem; color: var(--fg); background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; padding: 5px 8px; }
.picker select { max-width: 52vw; }
.picker select.on { border-color: var(--sel); }
.btn { cursor: pointer; color: var(--fg-2); }
.btn:hover { color: var(--fg); }

/* Header */
.head { display: grid; gap: 6px; }
.head p { color: var(--fg-2); max-width: 90ch; }
.statline { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.8rem; color: var(--fg-3); }
.statline b { color: var(--fg); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.step { background: var(--surface); padding: 10px 14px; display: grid; gap: 2px; align-content: start; }
.step .n { font-size: 0.7rem; color: var(--fg-3); }
.step b { font-size: 0.86rem; }
.step span { font-size: 0.76rem; color: var(--fg-2); line-height: 1.4; }
@media (max-width: 760px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Field chart + headlines */
.hero { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.axes { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 0.78rem; color: var(--fg-3); }
.axes label { display: flex; gap: 6px; align-items: center; }
.field svg { width: 100%; height: auto; display: block; overflow: visible; }
.field .grid line { stroke: var(--line); stroke-width: 1; }
.field .grid text, .field .axis-t { fill: var(--fg-3); font: 10.5px var(--mono); }
.field .ref { stroke: var(--base); stroke-dasharray: 4 4; stroke-width: 1; }
.field .ref-t { fill: var(--base); font: 10px var(--mono); }
.field .zone { fill: var(--fg-3); font: 10.5px var(--mono); letter-spacing: 0.08em; }
.field .pt { stroke: var(--surface); stroke-width: 2; cursor: pointer; }
.field .pt.me { stroke: var(--sel); stroke-width: 2.5; }
.field .hit { fill: transparent; cursor: pointer; }
.field .nm { fill: var(--fg-2); font: 10.5px var(--mono); pointer-events: none; }
.field .nm.me { fill: var(--sel); font-weight: 700; font-size: 12px; }
.field .trail { fill: none; stroke-width: 1.5; opacity: 0.5; }
.field .ghost { fill: none; stroke-width: 1.2; opacity: 0.6; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 0.76rem; color: var(--fg-2); }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin-right: 6px; }
.legend .sq { border-radius: 2px; }
.legend .dash { display: inline-block; width: 14px; border-top: 1px dashed var(--base); vertical-align: 3px; margin-right: 6px; }

.news ol { list-style: none; margin: 0; padding: 0; display: grid; max-height: 560px; overflow-y: auto; scrollbar-width: thin; }
.news li { display: grid; grid-template-columns: 1.2em minmax(0, 1fr); gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 0.82rem; line-height: 1.45; }
.news li[data-id] { cursor: pointer; }
.news li[data-id]:hover { color: var(--sel); }
.news li.me { color: var(--sel); font-weight: 700; }
.news .mk { font-size: 0.75rem; padding-top: 1px; }
.news .mk.up { color: var(--good); }
.news .mk.down { color: var(--bad); }
.news .mk.flat { color: var(--fg-3); }
.news .more { font-size: 0.76rem; color: var(--fg-3); padding-top: 6px; border-top: 1px solid var(--line); cursor: pointer; background: none; border-left: 0; border-right: 0; border-bottom: 0; font-family: inherit; text-align: left; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.tabs button { font: inherit; font-size: 0.84rem; color: var(--fg-3); background: none; border: 0; border-bottom: 2px solid transparent; padding: 9px 14px; cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--sel); }
.tabs button .n { color: var(--fg-3); margin-left: 6px; font-size: 0.75rem; }
.panel-tab { display: grid; gap: 16px; }
.panel-tab[hidden] { display: none; }
.lede { color: var(--fg-2); font-size: 0.84rem; max-width: 96ch; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.seg button { font: inherit; font-size: 0.78rem; color: var(--fg-2); background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 4px 10px; cursor: pointer; }
.seg button[aria-pressed="true"] { color: var(--fg); border-color: var(--fg-2); background: var(--raised); }
.seg button .n { color: var(--fg-3); margin-left: 5px; }

/* Tables */
table { border-collapse: collapse; width: 100%; font-size: 0.82rem; }
th { font-weight: 400; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--fg-2); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; color: var(--fg); }
table.board { min-width: 860px; }
table.board th[data-k] { cursor: pointer; user-select: none; }
table.board th[data-k]:hover, table.board th[aria-sort] { color: var(--fg); }
table.board th[aria-sort="descending"]::after { content: " ↓"; }
table.board th[aria-sort="ascending"]::after { content: " ↑"; }
table.board tbody tr { cursor: pointer; }
table.board tbody tr:hover td { background: var(--raised); }
tr.me td { background: color-mix(in oklab, var(--sel) 7%, transparent); }
tr.me td:first-child { box-shadow: inset 2px 0 0 var(--sel); }
tr.me .rname { color: var(--sel); }
.rname { font-weight: 700; color: var(--fg); }
.rver { font-size: 0.72rem; color: var(--fg-3); display: block; }
.lang { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.cell-bar { display: grid; grid-template-columns: 3.6em 1fr; gap: 10px; align-items: center; min-width: 150px; }
.cell-bar .v { text-align: right; color: var(--fg); }
.track { position: relative; height: 10px; }
.fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c, var(--dot)); border-radius: 0 3px 3px 0; }
tr.me .fill { background: var(--sel); }
.mark { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 1px dashed var(--base); }
.na { font-size: 0.72rem; color: var(--fg-3); }

.badge { display: inline-block; font-size: 0.68rem; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.badge.good { color: var(--good); background: color-mix(in oklab, var(--good) 14%, transparent); }
.badge.warn { color: var(--warn); background: color-mix(in oklab, var(--warn) 15%, transparent); }
.badge.bad { color: var(--bad); background: color-mix(in oklab, var(--bad) 14%, transparent); }
.badge.dim { color: var(--fg-3); border: 1px solid var(--line); }

/* Performance multiples */
.multiples { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.panel h3 { display: flex; align-items: center; gap: 8px; }
.panel h3 i { width: 9px; height: 9px; border-radius: 2px; background: var(--c, var(--dot)); }
.bars { display: grid; gap: 3px; }
.hrow { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr) 4em; gap: 10px; align-items: center; font-size: 0.78rem; cursor: pointer; }
.hrow .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-2); }
.hrow .v { text-align: right; color: var(--fg); }
.hrow .why { font-size: 0.7rem; color: var(--fg-3); grid-column: 2 / -1; }
.hrow:hover .l { color: var(--fg); }
.bars.picked .hrow:not(.me) .fill { opacity: 0.4; }
.hrow.me .l, .hrow.me .v { color: var(--sel); font-weight: 700; }
.hrow.me .fill { box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px var(--sel); }

/* Tests */
.tests { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .tests { grid-template-columns: minmax(0, 1fr); } }
.tlist { display: grid; gap: 14px; }
.tlist .grp { display: grid; gap: 2px; }
.tlist .grp > .label { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tlist .grp > .label i { width: 9px; height: 9px; border-radius: 2px; background: var(--c, var(--dot)); }
.tlist button { font: inherit; text-align: left; background: none; border: 0; border-left: 2px solid transparent; padding: 5px 10px; cursor: pointer; display: grid; gap: 1px; color: var(--fg-2); }
.tlist button b { font-size: 0.82rem; color: var(--fg); font-weight: 400; }
.tlist button span { font-size: 0.74rem; color: var(--fg-3); line-height: 1.4; }
.tlist button:hover b { color: var(--sel); }
.tlist button[aria-pressed="true"] { border-left-color: var(--c, var(--sel)); background: var(--surface); }
.tlist button[aria-pressed="true"] b { font-weight: 700; }
.tcard { position: sticky; top: 56px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 0.8rem; }
.kv dt { color: var(--fg-3); }
.kv dd { margin: 0; color: var(--fg-2); overflow-wrap: anywhere; }

/* Your relay */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stat { background: var(--surface); padding: 12px 14px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.stat .n { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.stat .n small { font-size: 0.55em; color: var(--fg-3); font-weight: 400; margin-left: 6px; }
.stat .l { font-size: 0.76rem; color: var(--fg-2); line-height: 1.35; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .two, .three { grid-template-columns: minmax(0, 1fr); } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font: inherit; font-size: 0.8rem; color: var(--fg-2); background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 5px 10px; cursor: pointer; }
.chips button:hover { color: var(--sel); border-color: var(--fg-2); }
.strips { display: grid; gap: 2px; }
.strip { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) 4.2rem; gap: 12px; align-items: center; min-height: 26px; }
.strip .l { font-size: 0.8rem; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip .l i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 7px; }
.strip .v { font-weight: 700; font-size: 0.82rem; text-align: right; white-space: nowrap; color: var(--sel); }
.strip .v.na { font-weight: 400; color: var(--fg-3); font-size: 0.68rem; line-height: 1.15; white-space: normal; }
.lane { position: relative; height: 20px; }
.lane::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.lane .base { position: absolute; top: 2px; bottom: 2px; width: 0; border-left: 1px dashed var(--base); }
.lane .d { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; display: grid; place-items: center; }
.lane .d::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dot); }
.lane .d.me { z-index: 2; }
.lane .d.me::after { width: 12px; height: 12px; background: var(--c, var(--sel)); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--sel); }
.scale { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) 4.2rem; gap: 12px; }
.scale .ticks { position: relative; height: 14px; font-size: 0.66rem; color: var(--fg-3); }
.scale .ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
@media (max-width: 560px) {
  .strip, .scale { grid-template-columns: 6rem minmax(0, 1fr) 3.6rem; gap: 8px; }
  .scale .ticks .minor { display: none; }
  .picker > span { display: none; }
}
.fix h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fix h3 .k { font-size: 0.7rem; color: var(--fg-3); font-weight: 400; }
.fix ol { list-style: none; margin: 0; padding: 0; display: grid; }
.fix li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.fix li .t { font-size: 0.82rem; color: var(--fg); }
.fix li .g { font-size: 0.8rem; font-weight: 700; white-space: nowrap; color: var(--good); }
.fix li .g.bad { color: var(--bad); }
.fix li .g.warn { color: var(--warn); }
.fix li .why { grid-column: 1 / -1; font-size: 0.74rem; color: var(--fg-3); line-height: 1.4; }
.fix .none { font-size: 0.8rem; color: var(--fg-3); padding: 8px 0; border-top: 1px solid var(--line); }

/* Capability matrix */
table.heat { width: auto; border-collapse: separate; border-spacing: 2px; font-size: 0.74rem; }
table.heat thead th { height: 116px; vertical-align: bottom; padding: 0 0 6px; text-transform: none; letter-spacing: 0; font-size: 0.72rem; color: var(--fg-2); border: 0; cursor: pointer; }
table.heat thead th > span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); }
table.heat thead th.me > span { color: var(--sel); font-weight: 700; }
table.heat tbody th { text-transform: none; letter-spacing: 0; font-size: 0.76rem; color: var(--fg-2); border: 0; padding: 0 12px 0 2px; white-space: nowrap; }
table.heat tbody th .w { color: var(--fg-3); margin-left: 6px; }
table.heat tbody tr.grp th { font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); padding: 10px 2px 3px; }
table.heat td { width: 28px; min-width: 28px; height: 24px; padding: 0; text-align: center; border: 0; border-radius: 3px; font-weight: 700; color: var(--fg); }
table.heat td.s0 { background: var(--h0); color: var(--fg-3); }
table.heat td.s1 { background: var(--h1); }
table.heat td.s2 { background: var(--h2); }
table.heat td.s3 { background: var(--h3); color: #0c0d0f; }
table.heat td.me { box-shadow: inset 0 0 0 2px var(--sel); }
table.heat tfoot th { text-transform: none; letter-spacing: 0; font-size: 0.76rem; color: var(--fg); border: 0; padding: 8px 12px 0 2px; }
table.heat tfoot td { background: transparent; color: var(--fg); padding-top: 8px; }
table.heat tfoot td.me { color: var(--sel); box-shadow: none; }

/* Trend */
.trends { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.trend { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; display: grid; gap: 4px; cursor: pointer; }
.trend.me { border-color: var(--sel); }
.trend .t { display: flex; justify-content: space-between; gap: 8px; font-size: 0.8rem; }
.trend svg { width: 100%; height: 32px; display: block; overflow: visible; }

table.cat { min-width: 920px; }
table.cat td { font-size: 0.78rem; }
table.cat td:first-child { white-space: nowrap; }
table.cat td:first-child a { color: var(--fg); font-weight: 700; text-decoration: none; }
table.cat td:first-child a:hover { text-decoration: underline; }
.prose { max-width: 92ch; color: var(--fg-2); font-size: 0.84rem; display: grid; gap: 8px; }
.prose h3 { color: var(--fg); margin-top: 10px; }
.foot { font-size: 0.78rem; color: var(--fg-3); border-top: 1px solid var(--line); padding-top: 16px; }

dialog { width: min(800px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--fg); padding: 20px; font-family: var(--mono); }
dialog::backdrop { background: rgb(0 0 0 / 0.6); }
dialog .close { float: right; font-size: 1.3rem; line-height: 1; background: none; border: 0; color: var(--fg-2); cursor: pointer; }
dialog h3 { margin-top: 16px; }
dialog p { color: var(--fg-2); font-size: 0.84rem; }
dialog .kv { margin: 10px 0; }
dialog table { margin-top: 6px; }

#tip { position: fixed; z-index: 20; pointer-events: none; background: var(--raised); color: var(--fg); border: 1px solid var(--line-2); border-radius: 6px; padding: 7px 9px; font-size: 0.76rem; max-width: 320px; box-shadow: 0 8px 24px rgb(0 0 0 / 0.4); }
#tip .muted { color: var(--fg-3); }
@media (prefers-reduced-motion: no-preference) { .fill { transition: width 400ms cubic-bezier(.2,.7,.2,1), opacity 150ms; } }
#you-body { display: grid; gap: 16px; }
main > *, .panel-tab > *, .hero > * { min-width: 0; }
