/* gauntlet's web page. A sidebar for the three places (runs, leaderboard, compare), a toolbar with search and filters
   wherever there is a list, and cards that each answer one question. The data is the only loud thing: one sans,
   hairline rules, status colours always beside their label, never alone. Light and dark are each chosen, not flipped;
   the series and status colours are the validated reference palette. */

:root {
  color-scheme: light;
  --page: #f4f4f1;
  --surface: #ffffff;
  --sunken: #f9f9f7;
  --raised: #ffffff;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --rule: #e4e3dd;
  --axis: #c3c2b7;
  --ring: rgba(11, 11, 11, 0.1);
  --wash: rgba(11, 11, 11, 0.045);
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 4px 16px rgba(11, 11, 11, 0.05);
  --accent: #2a78d6;
  --accent-ink: #ffffff;
  --accent-wash: rgba(42, 120, 214, 0.1);
  --accent-track: #cde2fb;
  --link: #1c5cab;
  --good: #0ca30c;
  --good-wash: rgba(12, 163, 12, 0.1);
  --warning: #fab219;
  --warning-wash: rgba(250, 178, 25, 0.14);
  --serious: #ec835a;
  --serious-wash: rgba(236, 131, 90, 0.12);
  --critical: #d03b3b;
  --critical-wash: rgba(208, 59, 59, 0.09);
  --queued: #dddcd5;
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #eda100;
  --s5: #e87ba4;
  --s6: #008300;
  --side: 224px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #111110;
    --surface: #1a1a19;
    --sunken: #161615;
    --raised: #222220;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --muted: #8f8d86;
    --rule: #2c2c2a;
    --axis: #3f3f3b;
    --ring: rgba(255, 255, 255, 0.1);
    --wash: rgba(255, 255, 255, 0.06);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
    --accent: #3987e5;
    --accent-wash: rgba(57, 135, 229, 0.18);
    --accent-track: rgba(57, 135, 229, 0.22);
    --link: #86b6ef;
    --good-wash: rgba(12, 163, 12, 0.18);
    --warning-wash: rgba(250, 178, 25, 0.16);
    --serious-wash: rgba(236, 131, 90, 0.16);
    --critical-wash: rgba(208, 59, 59, 0.16);
    --queued: #383835;
    --s1: #3987e5;
    --s2: #d95926;
    --s3: #199e70;
    --s4: #c98500;
    --s5: #d55181;
    --s6: #008300;
  }
}

* { box-sizing: border-box; }
html { background: var(--page); }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; line-height: 1.25; font-weight: 650; letter-spacing: -0.02em; }
h2 { font-size: 15px; font-weight: 650; }
h3 { font-size: 13px; font-weight: 650; }
.quiet { color: var(--muted); }
.soft { color: var(--ink-2); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--wash);
  border: 1px solid var(--ring);
  word-break: break-all;
}

/* The shell: a sidebar and the work area. */

.shell {
  display: flex;
  min-height: 100vh;
  background: linear-gradient(to right, var(--surface) 0 var(--side), var(--rule) var(--side) calc(var(--side) + 1px), var(--page) calc(var(--side) + 1px));
}
.side {
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  width: var(--side);
  flex: none;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; color: var(--ink); font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, var(--s1) 0 50%, var(--s3) 50% 100%); }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink-2);
  font-weight: 500;
}
.side nav a:hover { background: var(--wash); text-decoration: none; color: var(--ink); }
.side nav a.here { background: var(--accent-wash); color: var(--ink); font-weight: 600; }
.side nav a .count { font-size: 11.5px; font-weight: 600; padding: 0 7px; border-radius: 999px; background: var(--warning-wash); color: var(--ink); }
.side nav a .count:empty { display: none; }
.side .guide { margin-top: 22px; padding: 12px 10px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.side .guide b { display: block; color: var(--ink-2); font-weight: 600; margin-bottom: 4px; }
.side .guide code { display: inline-block; margin-top: 4px; }
.side .foot { margin-top: auto; padding: 10px; border-top: 1px solid var(--rule); display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.side .foot .who { font-weight: 600; color: var(--ink); }
.side .foot .role { color: var(--muted); font-weight: 400; }
#environment:not(:empty) {
  display: inline-block;
  width: max-content;
  padding: 1px 9px;
  border-radius: 999px;
  border: 1px solid var(--warning);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.work { flex: 1; min-width: 0; }
main { padding: 32px 36px 72px; max-width: 1240px; margin: 0 auto; transition: opacity 120ms; }
main.refreshing { opacity: 0.55; }
.topbar { display: none; }

/* Page heads. */

.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.head .lead { flex: 1; min-width: 0; display: grid; gap: 6px; }
.head .lead h1 { overflow-wrap: anywhere; }
.head .lead .subtitle { color: var(--ink-2); }
.head .lead div.subtitle { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.head .lead .meta { color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.head .actions { flex: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.crumb { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-bottom: 2px; }
.crumb a { color: var(--ink-2); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin: 4px 0 20px; }
.tabs a { padding: 9px 14px; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.here { color: var(--ink); border-bottom-color: var(--accent); font-weight: 650; }
.tabs a .count { color: var(--muted); margin-left: 6px; font-weight: 500; }

/* Cards and sections. */

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin: 0 0 18px;
  overflow: hidden;
}
.card > .title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
}
.card > .title .right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.card > .body { padding: 16px 18px; }
.card > .body + .body { border-top: 1px solid var(--rule); }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 28px 0 12px; }
.section-title h2 { font-size: 17px; }
.section-title .quiet { font-size: 13px; }
.empty { padding: 36px 18px; color: var(--muted); text-align: center; }
.empty b { display: block; color: var(--ink-2); font-weight: 600; margin-bottom: 4px; }
.more { padding: 10px 18px; border-top: 1px solid var(--rule); display: flex; justify-content: center; }

/* The toolbar: search first, then the filters. */

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.toolbar + .toolbar { margin-top: -4px; }
.toolbar.inner { margin: 0; }
.search { position: relative; flex: 1 1 300px; max-width: 480px; min-width: 0; }
.search input {
  width: 100%;
  font: inherit;
  font-size: 13.5px;
  padding: 8px 30px 8px 34px;
  border-radius: 9px;
  border: 1px solid var(--rule);
  background: var(--raised);
  color: var(--ink);
}
.search input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-wash); }
.search::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 13px;
  height: 13px;
  transform: translateY(-50%);
  border: 2px solid var(--muted);
  border-radius: 50%;
  box-sizing: border-box;
  background: linear-gradient(135deg, transparent 0 62%, var(--muted) 62% 100%) no-repeat 9px 9px / 6px 6px;
}
.search .kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--muted); border: 1px solid var(--rule); border-radius: 4px; padding: 0 5px; pointer-events: none; }
.chips { display: inline-flex; flex-wrap: wrap; padding: 3px; gap: 2px; border-radius: 9px; background: var(--wash); }
.chips button, .chips a.chip { border: 0; background: transparent; color: var(--ink-2); padding: 5px 11px; border-radius: 7px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.chips button:hover, .chips a.chip:hover { background: var(--surface); text-decoration: none; }
.chips button.on, .chips a.chip.on { background: var(--raised); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); font-weight: 600; }
.chips .count { color: var(--muted); margin-left: 5px; font-variant-numeric: tabular-nums; font-weight: 500; }
select.facet {
  font: inherit;
  font-size: 13px;
  padding: 6px 28px 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: var(--raised) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23898781' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--ink);
  appearance: none;
  cursor: pointer;
}
select.facet.set { border-color: var(--accent); background-color: var(--accent-wash); }
.toolbar .found { color: var(--muted); font-size: 12.5px; margin-left: auto; }

/* Buttons. */

button, a.button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: var(--raised);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.3;
}
button:hover, a.button:hover { border-color: var(--axis); text-decoration: none; }
button:disabled { opacity: 0.5; cursor: default; }
button.primary, a.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.primary:hover { filter: brightness(1.08); }
button.danger { color: var(--critical); }
button.ghost { border-color: transparent; background: transparent; color: var(--ink-2); padding: 5px 9px; }
button.ghost:hover { background: var(--wash); }
.acting { color: var(--muted); font-size: 12.5px; }

/* States: the dot carries the colour, the word carries the meaning. */

.state { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-weight: 550; }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.state.pill { font-size: 12.5px; padding: 3px 11px 3px 9px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); }
.state.good::before { background: var(--good); }
.state.bad::before { background: var(--critical); }
.state.wait::before { background: var(--warning); }
.state.held::before { background: var(--serious); }
.state.going::before { background: var(--accent); }
.state.idle::before { background: var(--axis); }
.state.going.pulse::before { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .state.going.pulse::before { animation: none; } }

.tag { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); border: 1px solid var(--rule); background: var(--surface); white-space: nowrap; }
.tag.warm { background: var(--warning-wash); border-color: transparent; color: var(--ink); }
.tag.cool { background: var(--accent-wash); border-color: transparent; color: var(--ink); }
.tag.hot { background: var(--critical-wash); border-color: transparent; color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* Marks: stacked bars with a 2px surface gap, meters, interval plots, legend. */

.bar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--queued); }
.bar span { display: block; height: 100%; min-width: 2px; }
.bar span:hover, .bar span:focus-visible { filter: brightness(1.15); outline: none; }
.bar .passed { background: var(--good); }
.bar .failed { background: var(--critical); }
.bar .review { background: var(--warning); }
.bar .running { background: var(--accent); }
.bar .queued { background: transparent; }
.bar.tall { height: 10px; }
.bar.slim { height: 6px; }
.meter { height: 8px; border-radius: 4px; background: var(--accent-track); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.meter.near span { background: var(--warning); }
.meter.near { background: var(--warning-wash); }
.meter.over span { background: var(--critical); }
.meter.over { background: var(--critical-wash); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); font-size: 12.5px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend .passed { background: var(--good); }
.legend .failed { background: var(--critical); }
.legend .review { background: var(--warning); }
.legend .running { background: var(--accent); }
.legend .queued { background: var(--queued); }
.legend .s1 { background: var(--s1); }
.legend .s2 { background: var(--s2); }
.legend .s3 { background: var(--s3); }
.legend .s4 { background: var(--s4); }
.legend .s5 { background: var(--s5); }
.legend .s6 { background: var(--s6); }

svg.interval, svg.axis { display: block; overflow: visible; }
svg .grid { stroke: var(--rule); stroke-width: 1; }
svg .range { stroke-width: 2; stroke-linecap: round; }
svg .dot { stroke: var(--surface); stroke-width: 2; }
svg .hit { fill: transparent; }
svg .hit:focus-visible { outline: none; stroke: var(--accent); stroke-width: 1; }
svg.axis text { fill: var(--muted); font-size: 11px; font-weight: 500; }
svg .range.s1 { stroke: var(--s1); } svg .dot.s1 { fill: var(--s1); }
svg .range.s2 { stroke: var(--s2); } svg .dot.s2 { fill: var(--s2); }
svg .range.s3 { stroke: var(--s3); } svg .dot.s3 { fill: var(--s3); }
svg .range.s4 { stroke: var(--s4); } svg .dot.s4 { fill: var(--s4); }
svg .range.s5 { stroke: var(--s5); } svg .dot.s5 { fill: var(--s5); }
svg .range.s6 { stroke: var(--s6); } svg .dot.s6 { fill: var(--s6); }

#tip {
  position: fixed;
  z-index: 5;
  pointer-events: none;
  padding: 6px 10px;
  border-radius: 7px;
  background: var(--raised);
  border: 1px solid var(--ring);
  box-shadow: var(--shadow);
  font-size: 12.5px;
  color: var(--ink-2);
  max-width: 320px;
}
#tip b { color: var(--ink); font-weight: 650; margin-right: 6px; }
#tip[hidden] { display: none; }

/* Stat tiles. */

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 0 0 18px; }
.tile { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px 12px; box-shadow: var(--shadow); display: grid; gap: 6px; align-content: start; }
.tile .label { color: var(--ink-2); font-size: 12.5px; font-weight: 500; }
.tile .value { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile .value small { font-size: 14px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.tile .note { color: var(--muted); font-size: 12.5px; }

/* Attention: what needs a person, each with the way to act. */

.attention { display: grid; gap: 10px; margin: 0 0 18px; }
.notice {
  display: grid;
  grid-template-columns: 4px 1fr;
  gap: 0 14px;
  padding: 12px 16px 12px 12px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.notice::before { content: ""; border-radius: 2px; background: var(--warning); }
.notice.serious::before { background: var(--serious); }
.notice.error::before { background: var(--critical); }
.notice.info::before { background: var(--accent); }
.notice.good::before { background: var(--good); }
.notice .what { font-weight: 650; }
.notice .text { color: var(--ink-2); margin-top: 2px; }
.notice ul { margin: 6px 0 0; padding-left: 18px; }
.notice li { margin: 3px 0; }
.notice .then { margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notice p.why { margin: 4px 0 6px; color: var(--ink-2); max-width: 820px; }
.notice .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

table.attention-list td:first-child { width: 1%; white-space: nowrap; }
table.attention-list td a { font-weight: 600; }
table.attention-list td.act { text-align: right; white-space: nowrap; }
table.attention-list td.act code { margin-right: 4px; }

/* The runs: one row a run, three columns: what it is, how far it is, what it has spent. */

.runs { display: grid; gap: 10px; }
.run {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr) 150px;
  gap: 14px 24px;
  align-items: center;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: inherit;
  cursor: pointer;
  transition: border-color 100ms;
}
.run:hover { text-decoration: none; border-color: var(--axis); }
.run .what { display: grid; gap: 6px; min-width: 0; }
.run .what .purpose { font-weight: 650; font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.run .what .facts { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 12.5px; }
.run .what .facts b { color: var(--ink-2); font-weight: 500; }
.run .how { display: grid; gap: 6px; }
.run .how .line { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--ink-2); }
.run .how .line .num { color: var(--muted); }
.run .how .by { display: grid; gap: 3px; margin-top: 2px; }
.run .how .by div { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.run .how .by i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; flex: none; }
.run .how .by b { color: var(--ink-2); font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run .spend { display: grid; gap: 5px; text-align: right; }
.run .spend .amount { font-weight: 650; font-size: 16px; font-variant-numeric: tabular-nums; }
.run .spend .of { color: var(--muted); font-size: 12px; }

/* Systems as cards, side by side. */

.systems { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.system-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.system-card .name { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.system-card .name b { font-size: 15px; font-weight: 650; }
.system-card .name .rate { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.system-card .name .rate small { font-size: 12px; color: var(--muted); font-weight: 500; }
.system-card .pinned { color: var(--muted); font-size: 12px; margin-top: -6px; overflow-wrap: anywhere; }
.system-card .counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; }
.system-card .counts div { display: grid; gap: 1px; }
.system-card .counts .n { font-weight: 650; font-size: 16px; font-variant-numeric: tabular-nums; }
.system-card .counts .l { color: var(--muted); font-size: 11.5px; display: flex; align-items: center; gap: 5px; }
.system-card .counts .l i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.system-card .counts .l i.passed { background: var(--good); }
.system-card .counts .l i.failed { background: var(--critical); }
.system-card .counts .l i.review { background: var(--warning); }
.system-card .counts .l i.running { background: var(--accent); }
.system-card .counts .l i.queued { background: var(--queued); }

/* Tables. */

.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
th { font-weight: 600; color: var(--muted); font-size: 12px; white-space: nowrap; background: var(--surface); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .sub { display: block; color: var(--muted); font-size: 12px; }
td.nowrap { white-space: nowrap; }
tr.open { cursor: pointer; }
tr.open:hover td { background: var(--wash); }
tr.open td:first-child::before { content: "▸"; display: inline-block; width: 14px; color: var(--muted); font-size: 11px; transition: transform 100ms; }
tr.open.shown td:first-child::before { transform: rotate(90deg); }
tr.detail td { background: var(--sunken); padding: 12px 18px 14px 32px; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 24px; }
.detail-grid .one { display: grid; gap: 4px; font-size: 13px; }
.detail-grid .one b { font-weight: 650; }
.detail-grid .one .facts { color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 2px 10px; }
.detail-grid .one .facts span.quiet { color: var(--muted); }
td.task { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
td.task .bench { color: var(--muted); }
td.cell { white-space: nowrap; }
td.system { min-width: 200px; }
td.system b { font-weight: 650; }
td.result { min-width: 160px; }

/* Results: the scoreboard, each system a column. */

.board { display: grid; grid-template-columns: 180px repeat(var(--columns, 2), minmax(150px, 1fr)); gap: 0; align-items: stretch; }
.board > div { padding: 10px 16px; border-bottom: 1px solid var(--rule); min-width: 0; }
.board > div.label { color: var(--muted); font-size: 12.5px; }
.board > div.top { border-bottom-color: var(--rule); padding-top: 14px; padding-bottom: 12px; }
.board > div.top b { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.board > div.top b i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.swatch.s1 { background: var(--s1); }
.swatch.s2 { background: var(--s2); }
.swatch.s3 { background: var(--s3); }
.swatch.s4 { background: var(--s4); }
.swatch.s5 { background: var(--s5); }
.swatch.s6 { background: var(--s6); }
.board > div.top .pinned { color: var(--muted); font-size: 12px; margin-top: 2px; overflow-wrap: anywhere; }
.board .hero { font-size: 34px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.board .hero small { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 6px; }
.board .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.board .v .sub { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.board > div:nth-last-child(-n + 3) { border-bottom: 0; }
.board.last-row > div { border-bottom: 0; }
.board .plot { padding-top: 6px; padding-bottom: 8px; }

.pairs { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 20px 32px; }
.pairing { display: grid; gap: 10px; align-content: start; }
.pairing .said { color: var(--ink-2); }
.pairing .said b { color: var(--ink); font-weight: 600; }
table.pair { max-width: 520px; border: 1px solid var(--rule); border-radius: 8px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
table.pair th { font-size: 12px; }
table.pair td.n { font-size: 18px; font-weight: 600; text-align: center; }
table.pair td.strong { background: var(--wash); }
table.pair td .sub { font-size: 12px; font-weight: 400; }
table.pair tbody th { color: var(--ink-2); font-size: 12.5px; white-space: normal; }

.how { max-width: 860px; margin-top: 8px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }

/* History, folded. */

details.fold { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow); margin: 0 0 18px; }
details.fold summary { cursor: pointer; padding: 14px 18px; display: flex; gap: 10px; align-items: center; list-style: none; font-weight: 650; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::before { content: "▸"; color: var(--muted); font-size: 11px; transition: transform 100ms; }
details.fold[open] summary::before { transform: rotate(90deg); }
details.fold summary .quiet { font-weight: 400; }
details.fold .scroll { border-top: 1px solid var(--rule); }

/* Evidence: files by folder. */

.files .folder td { background: var(--sunken); font-weight: 600; color: var(--ink-2); font-size: 12.5px; }
.files td.file { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; padding-left: 28px; }

/* Compare picker. */

.picker label { display: block; cursor: pointer; font-weight: 600; }
.picker input { margin: 0; width: 16px; height: 16px; accent-color: var(--accent); }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 18px; background: var(--surface); border-top: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* A page on its way; a page in place of the page. */

.coming { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 72px 16px; color: var(--ink-2); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent-track); border-top-color: var(--accent); animation: turn 800ms linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.halt { max-width: 440px; margin: 14vh auto 0; text-align: center; }
.halt p { color: var(--ink-2); margin: 10px 0 20px; }

/* Phones and narrow windows: the sidebar becomes a bar along the top. */

@media (max-width: 860px) {
  .shell { display: block; background: var(--page); }
  .side { position: static; height: auto; width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--rule); }
  .brand { padding: 4px 4px; }
  .side nav { flex-direction: row; order: 3; flex-basis: 100%; gap: 2px; }
  .side nav a { padding: 6px 10px; }
  .side .guide { display: none; }
  .side .foot { margin-top: 0; margin-left: auto; padding: 0; border: 0; display: flex; align-items: center; gap: 10px; }
  .side .foot .role { display: none; }
  main { padding: 20px 16px 56px; }
  .head { flex-direction: column; gap: 12px; }
  .head .actions { justify-content: flex-start; }
  .search { max-width: none; flex-basis: 100%; }
  .toolbar .found { margin-left: 0; }
  .run { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .run .spend { text-align: left; display: flex; align-items: baseline; gap: 8px; }
  .pairs { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(var(--columns, 2), minmax(0, 1fr)); }
  .board > div { padding: 8px 12px; }
  .board > div.label { grid-column: 1 / -1; padding-bottom: 0; border-bottom: 0; padding-top: 12px; }
  .board > div:not(.label) { padding-top: 2px; }
  .board > div.top { padding-top: 14px; }
  .board > div.top:empty { display: none; }
  .board .hero { font-size: 26px; }
  .board .hero small { display: block; margin: 2px 0 0; }
  .board > div:nth-last-child(-n + 3) { border-bottom: 1px solid var(--rule); }
  .board > div:nth-last-child(-n + 2) { border-bottom: 0; }
  table.attention-list tr { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
  table.attention-list td { padding: 0; border: 0; }
  table.attention-list td.act { grid-column: 1 / -1; text-align: left; white-space: normal; }
  th, td { padding: 9px 10px; }
  tr.detail td { padding-left: 14px; }
  /* The leaderboard and the compare picker as stacked cards: every cell on its own line, named by its column. */
  table.board-table thead, table.board-table .plot, table.picker thead { display: none; }
  table.board-table tr, table.picker tr { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
  table.board-table tbody tr:last-child, table.picker tbody tr:last-child { border-bottom: 0; }
  table.board-table td, table.picker td { padding: 0; border: 0; text-align: left; white-space: normal; min-width: 0; }
  table.board-table td.n { text-align: left; }
  table.board-table td:first-child { grid-row: 1; }
  table.board-table td.system { grid-column: 2; }
  table.board-table td[data-label] { grid-column: 2; }
  table.board-table td[data-label]::before { content: attr(data-label); display: inline-block; width: 110px; margin-right: 8px; color: var(--muted); font-size: 12px; }
  table.board-table td[data-label] .sub { margin-left: 118px; }
  table.picker td:first-child { grid-row: 1; }
  table.picker td:not(:first-child) { grid-column: 2; }
  table.picker td:nth-child(n + 3) { color: var(--ink-2); font-size: 12.5px; }
}
