/* Otis AI Lab · AI Harness Benchmark
   One stylesheet, no frameworks, no web fonts, no third-party requests.

   Two themes share one set of roles:
     dark  "deep water"  (default, matches the channel's navy)
     light "chart paper"
   Chart colors were checked for color-vision separation and contrast on both
   surfaces: marks #1fa893 / #9085e9 on #0b1a26, #0e8f7e / #6250d6 on #fbf9f3. */

/* ---------------------------------------------------------------- tokens */

:root {
  color-scheme: dark;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Mono", "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #07121b;
  --surface: #0b1a26;
  --surface-2: #0f2231;
  --surface-3: #152c3d;
  --inset: #050d14;
  --line: rgb(150 196 214 / 0.13);
  --line-strong: rgb(150 196 214 / 0.26);

  --ink: #edf4f6;
  --ink-2: #b6c8d1;
  --ink-3: #869dab;

  --accent: #5fdcc8;
  --accent-fill: #1fa893;
  --button-fill: #1fa893;
  --accent-ink: #031c18;
  --accent-wash: rgb(95 220 200 / 0.1);
  --violet: #b1a8f6;
  --violet-fill: #9085e9;
  --violet-wash: rgb(144 133 233 / 0.16);
  --amber: #f1c680;
  --amber-wash: rgb(241 198 128 / 0.12);
  --red: #f59f95;
  --red-wash: rgb(245 159 149 / 0.13);
  --good: #7fdcab;
  --good-wash: rgb(127 220 171 / 0.13);

  --mark: #1fa893;
  --mark-soft: #1c6159;
  --mark-dot: #edf4f6;
  --grid: rgb(150 196 214 / 0.1);
  --contour: rgb(95 220 200 / 0.2);
  --glow: rgb(31 168 147 / 0.2);

  --shadow-card: 0 1px 0 rgb(255 255 255 / 0.03) inset, 0 30px 60px -36px rgb(0 0 0 / 0.7);
  --shadow-pop: 0 18px 40px -12px rgb(0 0 0 / 0.65), 0 0 0 1px var(--line-strong);

  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 9px;
  --shell: 1200px;
  --gutter: clamp(1rem, 4vw, 2.25rem);
  --header-height: 4rem;
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f3f0e7;
  --surface: #fbf9f3;
  --surface-2: #ffffff;
  --surface-3: #ece8dc;
  --inset: #ebe7da;
  --line: rgb(16 42 58 / 0.12);
  --line-strong: rgb(16 42 58 / 0.24);

  --ink: #0c2130;
  --ink-2: #38505f;
  --ink-3: #566c79;

  --accent: #0a7567;
  --accent-fill: #0e8f7e;
  --button-fill: #0a7567;
  --accent-ink: #ffffff;
  --accent-wash: rgb(14 143 126 / 0.1);
  --violet: #4f41bd;
  --violet-fill: #6250d6;
  --violet-wash: rgb(98 80 214 / 0.11);
  --amber: #86560a;
  --amber-wash: rgb(196 134 20 / 0.15);
  --red: #a93328;
  --red-wash: rgb(190 60 48 / 0.15);
  --good: #17754a;
  --good-wash: rgb(23 117 74 / 0.17);

  --mark: #0e8f7e;
  --mark-soft: #74bcb1;
  --mark-dot: #0c2130;
  --grid: rgb(16 42 58 / 0.09);
  --contour: rgb(14 143 126 / 0.26);
  --glow: rgb(14 143 126 / 0.13);

  --shadow-card: 0 1px 2px rgb(16 42 58 / 0.05), 0 22px 44px -30px rgb(16 42 58 / 0.3);
  --shadow-pop: 0 18px 40px -14px rgb(16 42 58 / 0.32), 0 0 0 1px var(--line-strong);
}

/* Without JavaScript the theme follows the system setting. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #f3f0e7;
    --surface: #fbf9f3;
    --surface-2: #ffffff;
    --surface-3: #ece8dc;
    --inset: #ebe7da;
    --line: rgb(16 42 58 / 0.12);
    --line-strong: rgb(16 42 58 / 0.24);
    --ink: #0c2130;
    --ink-2: #38505f;
    --ink-3: #566c79;
    --accent: #0a7567;
    --accent-fill: #0e8f7e;
    --button-fill: #0a7567;
    --accent-ink: #ffffff;
    --accent-wash: rgb(14 143 126 / 0.1);
    --violet: #4f41bd;
    --violet-fill: #6250d6;
    --violet-wash: rgb(98 80 214 / 0.11);
    --amber: #86560a;
    --amber-wash: rgb(196 134 20 / 0.15);
    --red: #a93328;
    --red-wash: rgb(190 60 48 / 0.15);
    --good: #17754a;
    --good-wash: rgb(23 117 74 / 0.17);
    --mark: #0e8f7e;
    --mark-soft: #74bcb1;
    --mark-dot: #0c2130;
    --grid: rgb(16 42 58 / 0.09);
    --contour: rgb(14 143 126 / 0.26);
    --glow: rgb(14 143 126 / 0.13);
    --shadow-card: 0 1px 2px rgb(16 42 58 / 0.05), 0 22px 44px -30px rgb(16 42 58 / 0.3);
    --shadow-pop: 0 18px 40px -14px rgb(16 42 58 / 0.32), 0 0 0 1px var(--line-strong);
  }
}

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
  outline: none;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
pre {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img,
svg {
  display: block;
  max-width: 100%;
}

code,
kbd,
pre,
.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection {
  background: color-mix(in oklab, var(--accent-fill) 45%, transparent);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: min(100% - 2 * var(--gutter), var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--button-fill);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 44rem;
}

.muted {
  color: var(--ink-3);
}

.nowrap {
  white-space: nowrap;
}

/* --------------------------------------------------------------- buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
  background: var(--surface-2);
  border-color: var(--ink-3);
}

.button:active {
  transform: translateY(1px);
}

.button--primary {
  border-color: transparent;
  background: var(--button-fill);
  color: var(--accent-ink);
}

.button--primary:hover {
  background: color-mix(in oklab, var(--button-fill) 86%, var(--ink));
  border-color: transparent;
}

.button--small {
  min-height: 2.25rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.88rem;
}

.button[disabled],
.button[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.button .icon {
  flex: none;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.icon-button:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.icon--sun {
  display: none;
}

:root[data-theme="light"] .icon--sun {
  display: block;
}

:root[data-theme="light"] .icon--moon {
  display: none;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand__mark {
  flex: none;
  color: var(--accent);
}

.brand__float {
  fill: var(--violet-fill);
}

.brand__name {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand__product {
  padding-left: 0.7rem;
  border-left: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.site-header__brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.site-header__hosted {
  margin: 0;
  padding-left: 2.35rem;
  font-size: 0.72rem;
  color: var(--ink-3);
}

.site-nav {
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
  margin-left: auto;
  align-self: stretch;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 0.8rem;
  color: var(--ink-2);
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset: auto 0.8rem -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

@media (max-width: 860px) {
  .site-header__inner {
    flex-wrap: wrap;
    row-gap: 0;
  }

  .brand__product {
    display: none;
  }

  .site-header__actions {
    margin-left: auto;
  }

  .site-nav {
    order: 3;
    flex-basis: 100%;
    margin-left: -0.8rem;
    min-height: 2.6rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-header__inner {
    min-height: 3.4rem;
    padding-top: 0.35rem;
  }
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60rem 34rem at 88% -10%, var(--glow), transparent 62%),
    radial-gradient(40rem 26rem at -8% 110%, color-mix(in oklab, var(--violet-fill) 12%, transparent), transparent 60%);
  pointer-events: none;
}

.hero__art {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(62rem, 78%);
  background: var(--contour);
  -webkit-mask: url("../img/contours.svg") right center / cover no-repeat, linear-gradient(90deg, transparent 0%, #000 55%);
  mask: url("../img/contours.svg") right center / cover no-repeat, linear-gradient(90deg, transparent 0%, #000 55%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  padding-block: clamp(3rem, 8vw, 6rem) clamp(2.5rem, 5vw, 3.75rem);
}

.hero h1 {
  margin-top: 1rem;
  font-size: clamp(2.9rem, 8.4vw, 5.6rem);
  font-weight: 760;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero .lede {
  margin-top: 1.4rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero--compact .hero__inner {
  padding-block: clamp(2.5rem, 6vw, 4.25rem) clamp(2rem, 4vw, 3rem);
}

.hero--compact h1 {
  font-size: clamp(2.2rem, 5.6vw, 3.6rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
}

/* Setup readout: the controlled conditions, laid out like instrument labels. */
.spec-list {
  display: flex;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--surface) 78%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  overflow: hidden;
}

.spec {
  flex: 1 1 auto;
  padding: 0.95rem 1.3rem;
  box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line);
  white-space: nowrap;
}

.spec dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.spec dd {
  margin-top: 0.3rem;
  font-weight: 600;
  line-height: 1.3;
}

.spec dd small {
  display: block;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--ink-2);
}

@media (max-width: 480px) {
  .spec {
    flex-basis: 42%;
    padding-inline: 1rem;
    white-space: normal;
  }
}

.snapshot {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.snapshot__dot {
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--good);
}

.snapshot--live .snapshot__dot {
  background: var(--amber);
  box-shadow: 0 0 0 0 var(--amber);
}

.snapshot + .snapshot {
  margin-top: 0.45rem;
}

.snapshot--plain svg {
  flex: none;
  margin-top: 0.24rem;
  color: var(--ink-3);
}

/* ------------------------------------------------------ section scaffolding */

.section {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 1.5rem;
}

.section__head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
}

.section__head p {
  margin-top: 0.5rem;
  color: var(--ink-2);
  max-width: 40rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

/* Segmented control: lab vs community. */
.segmented {
  display: inline-flex;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.25rem;
  padding: 0.35rem 1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}

.segmented button:hover {
  color: var(--ink);
}

.segmented button[aria-pressed="true"] {
  background: var(--surface-3);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.count {
  min-width: 1.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--violet-wash);
  color: var(--violet);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-align: center;
}

/* -------------------------------------------------------------- view tabs */

.views {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.views[data-count="5"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
}

.views[data-count="5"] .view-tab {
  padding: 0.95rem 1rem 1.05rem;
}

.views[data-count="5"] .view-tab__leader {
  font-size: clamp(1.02rem, 1.45vw, 1.24rem);
}

.views[data-count="5"] .view-tab__stat {
  font-size: 0.82rem;
}

.view-tab {
  position: relative;
  display: grid;
  gap: 0.35rem;
  align-content: start;
  padding: 1.1rem 1.25rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.view-tab:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.view-tab[aria-selected="true"] {
  border-color: color-mix(in oklab, var(--accent) 60%, transparent);
  background: linear-gradient(180deg, var(--accent-wash), transparent 70%), var(--surface-2);
  box-shadow: var(--shadow-card);
}

.view-tab[aria-selected="true"]::before {
  content: "";
  position: absolute;
  inset: -1px 1.5rem auto;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--accent);
}

.view-tab__label {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-2);
}

.view-tab[aria-selected="true"] .view-tab__label {
  color: var(--ink);
}

.view-tab__index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

.view-tab__leader {
  margin-top: 0.35rem;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.view-tab__stat {
  font-size: 0.9rem;
  color: var(--ink-2);
}

.view-tab__caption {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

@media (max-width: 1080px) {
  .views[data-count="5"] {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

@media (max-width: 1080px) {
  .views[data-count="5"] .view-tab {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
  }

  .views[data-count="5"] .view-tab__label {
    grid-row: 1;
  }

  .views[data-count="5"] .view-tab__leader {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
    font-size: 1rem;
    text-align: right;
  }

  .views[data-count="5"] .view-tab__stat {
    grid-row: 2;
  }

  .views[data-count="5"] .view-tab[aria-selected="true"]::before {
    inset: 0.85rem auto 0.85rem -1px;
    width: 2px;
    height: auto;
    border-radius: 0 2px 2px 0;
  }
}

@media (max-width: 760px) {
  .views {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .view-tab {
    grid-template-columns: minmax(7.5rem, auto) minmax(0, 1fr);
    align-items: center;
    column-gap: 1rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
  }

  .view-tab__label {
    grid-row: 1;
  }

  .view-tab__leader {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
    font-size: 1rem;
    text-align: right;
    overflow-wrap: anywhere;
  }

  .view-tab__stat {
    grid-row: 2;
    font-size: 0.82rem;
  }

  .view-tab__caption {
    display: none;
  }

  .view-tab[aria-selected="true"]::before {
    inset: 0.9rem auto 0.9rem -1px;
    width: 2px;
    height: auto;
    border-radius: 0 2px 2px 0;
  }
}

/* ------------------------------------------------------------------ board */

.board {
  --cols: 3.25rem minmax(11.5rem, 1fr) 11.5rem minmax(9rem, 2.1fr) 7.75rem 7.5rem 1.5rem;
  --col-gap: 1.1rem;
  --pad: 1.4rem;
  margin-top: 0.9rem;
  overflow: hidden;
}

.board--community {
  --cols: 3.25rem minmax(9rem, 0.9fr) minmax(12rem, 1.35fr) minmax(7rem, 1.3fr) 7.5rem 7.5rem 1.5rem;
}

.board__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 2.5rem;
  padding: 1.4rem var(--pad) 1.2rem;
  border-bottom: 1px solid var(--line);
}

.board__title {
  flex: 1 1 22rem;
}

.board__title h3 {
  font-size: 1.25rem;
}

.board__title p {
  margin-top: 0.45rem;
  color: var(--ink-2);
  font-size: 0.95rem;
  max-width: 38rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
  max-width: 30rem;
  font-size: 0.8rem;
  color: var(--ink-2);
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.legend .pip {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 5px;
}

.legend .pip svg {
  width: 9px;
  height: 9px;
}

.legend .pip--retry {
  margin-left: 0;
  margin-right: 0.15rem;
}

.legend .pip--retry::before {
  display: none;
}

.legend__swatch {
  flex: none;
  width: 1.15rem;
  height: 0.5rem;
  border-radius: 0 3px 3px 0;
  background: var(--mark);
}

.legend__swatch--tick {
  width: 3px;
  height: 0.95rem;
  border-radius: 2px;
}

.legend__dot {
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--mark-dot);
}

.legend__dot--hollow {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--mark-dot);
}

.axis,
.row__main {
  display: grid;
  grid-template-columns: var(--cols);
  column-gap: var(--col-gap);
  align-items: center;
  width: 100%;
  padding-inline: var(--pad);
}

.axis {
  padding-block: 0.55rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.axis__scale {
  position: relative;
  grid-column: 4;
  height: 1rem;
}

.axis__tick {
  position: absolute;
  top: 0;
  left: calc(var(--at) * 100%);
  transform: translateX(-50%);
  letter-spacing: 0.04em;
  text-transform: none;
  white-space: nowrap;
}

.axis__tick:first-child {
  transform: none;
}

.axis__tick:last-child {
  transform: translateX(-100%);
}

.axis__value {
  grid-column: 5;
}

.axis__side {
  grid-column: 6;
}

.board__scale {
  display: none;
  padding: 0.6rem var(--pad);
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink-3);
}

.rows {
  margin: 0;
}

.row + .row {
  border-top: 1px solid var(--line);
}

.row__main {
  padding-block: 0.95rem;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  transition: background-color 0.12s ease;
}

.row__main:hover,
.row--open > .row__main {
  background: color-mix(in oklab, var(--surface-2) 70%, transparent);
}

.row__main:focus-visible {
  outline-offset: -2px;
  border-radius: 0;
}

.row__rank {
  display: grid;
  justify-items: start;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink-3);
}

.row--leader .row__rank {
  color: var(--accent);
}

.row__rank small {
  margin-top: 0.3rem;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.row__who {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.row__name {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

.row__sub {
  font-size: 0.8rem;
  color: var(--ink-3);
  overflow-wrap: break-word;
}

.row__meta {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  font-size: 0.82rem;
  color: var(--ink-2);
}

.row__meta strong {
  font-weight: 600;
  color: var(--ink);
}

.row__value,
.row__side {
  display: grid;
  gap: 0.2rem;
  justify-items: end;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.row__figure {
  font-size: 1.28rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
}

.row__side .row__figure {
  font-size: 1.02rem;
  font-weight: 550;
  color: var(--ink-2);
}

.row__unit {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.row__chev {
  justify-self: end;
  color: var(--ink-3);
  transition: transform 0.2s ease;
}

.row--open .row__chev {
  transform: rotate(180deg);
}

.row--pending .row__name,
.row--pending .row__figure {
  color: var(--ink-2);
}

.row__flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.3rem;
}

/* Attempt pips: shape and icon carry the state, color only reinforces it. */
.pips {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.pip {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--ink-2);
}

.pip svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.6;
}

.pip--completed {
  background: var(--good-wash);
  color: var(--good);
}

.pip--dnf {
  background: var(--red-wash);
  color: var(--red);
}

.pip--running,
.pip--saving {
  background: var(--amber-wash);
  color: var(--amber);
}

.pip--queued {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  color: var(--ink-3);
}

.pips .pip--retry {
  margin-left: 0.5rem;
}

.pip--retry::before {
  display: none;
}

.pips .pip--retry::before {
  display: block;
  content: "";
  position: absolute;
  left: -0.45rem;
  top: 15%;
  bottom: 15%;
  width: 1px;
  background: var(--line-strong);
}

.pip__badge {
  position: absolute;
  right: -0.3rem;
  top: -0.3rem;
  display: grid;
  place-items: center;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.pip__badge svg {
  width: 7px;
  height: 7px;
}

/* Tracks: every row shares one scale, printed in the axis row above. */
.track {
  position: relative;
  display: block;
  height: 1.75rem;
}

.track__line {
  position: absolute;
  top: -0.95rem;
  bottom: -0.95rem;
  left: calc(var(--at) * 100%);
  width: 1px;
  background: var(--grid);
}

.track__bar,
.track__seg {
  position: absolute;
  top: 50%;
  height: 10px;
  margin-top: -5px;
  background: var(--mark);
}

.track__bar {
  left: 0;
  width: calc(var(--to) * 100%);
  min-width: 2px;
  border-radius: 0 4px 4px 0;
}

.track__seg {
  left: calc(var(--from) * 100%);
  width: max(2px, calc((var(--to) - var(--from)) * 100% - 2px));
}

.track__seg--last {
  border-radius: 0 4px 4px 0;
}

.track__seg--soft,
.legend__swatch--soft {
  background-color: var(--mark-soft);
  background-image: repeating-linear-gradient(135deg, color-mix(in oklab, var(--mark) 75%, transparent) 0 2px, transparent 2px 5px);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--mark) 70%, transparent);
}

.track__dot {
  position: absolute;
  top: 50%;
  left: calc(var(--at) * 100%);
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--mark-dot);
  box-shadow: 0 0 0 2px var(--surface);
}

.track__dot--hollow {
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--mark-dot), 0 0 0 2px var(--surface);
}

.track__tick {
  position: absolute;
  top: 50%;
  left: calc(var(--at) * 100%);
  width: 3px;
  height: 26px;
  margin: -13px 0 0 -1.5px;
  border-radius: 2px;
  background: var(--mark);
}

/* A hit area larger than the mark itself. */
[data-tip] {
  cursor: default;
}

.track__dot::after,
.track__tick::after {
  content: "";
  position: absolute;
  inset: -8px;
}

.track__seg::after,
.track__bar::after {
  content: "";
  position: absolute;
  inset: -8px 0;
}

.row__main:hover .track__dot,
.row--open .track__dot {
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--surface-2) 70%, var(--surface));
}

.row__main:hover .track__dot--hollow,
.row--open .track__dot--hollow {
  background: color-mix(in oklab, var(--surface-2) 70%, var(--surface));
  box-shadow: inset 0 0 0 2px var(--mark-dot), 0 0 0 2px color-mix(in oklab, var(--surface-2) 70%, var(--surface));
}

.track__empty {
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: var(--grid);
}

/* Flags and tags */
.flag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.12rem 0.5rem;
  border-radius: 6px;
  background: var(--amber-wash);
  color: var(--amber);
  font-size: 0.74rem;
  font-weight: 550;
  line-height: 1.45;
}

.flag svg {
  flex: none;
  width: 11px;
  height: 11px;
}

.flag--quiet {
  background: var(--surface-3);
  color: var(--ink-2);
}

.flag--violet {
  background: var(--violet-wash);
  color: var(--violet);
}

.flag--good {
  background: var(--good-wash);
  color: var(--good);
}

.flag--red {
  background: var(--red-wash);
  color: var(--red);
}

/* Row detail */
.row__detail {
  padding: 0.25rem var(--pad) 1.4rem calc(var(--pad) + 3.25rem + var(--col-gap));
  background: color-mix(in oklab, var(--surface-2) 70%, transparent);
}

.detail__notes {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.9rem;
  font-size: 0.86rem;
  color: var(--ink-2);
}

.detail__notes li {
  position: relative;
  padding-left: 1rem;
}

.detail__notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--ink-3);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.data-table caption {
  padding: 0.8rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--ink-2);
}

.data-table th,
.data-table td {
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: top;
  white-space: nowrap;
}

.data-table th:first-child,
.data-table td:first-child {
  padding-left: 1rem;
}

.data-table th:last-child,
.data-table td:last-child {
  padding-right: 1rem;
}

.data-table tr:last-child > td,
.data-table tr:last-child > th {
  border-bottom: 0;
}

.data-table thead th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: color-mix(in oklab, var(--surface-2) 60%, transparent);
}

.data-table th:first-child,
.data-table td:first-child,
.data-table .is-text {
  text-align: left;
}

.data-table tbody th {
  font-weight: 600;
}

.data-table .has-note > th,
.data-table .has-note > td {
  border-bottom: 0;
  padding-bottom: 0.25rem;
}

.data-table .note-row td {
  padding-top: 0;
  padding-bottom: 0.75rem;
  white-space: normal;
  color: var(--ink-2);
  font-size: 0.82rem;
  max-width: 0; /* lets the text wrap inside the table's width instead of stretching it */
}

.data-table small {
  display: block;
  color: var(--ink-3);
  font-size: 0.76rem;
  white-space: normal;
}

/* Secondary lines wrap inside their column instead of stretching the table. */
.data-table td small {
  max-width: 10.5rem;
  margin-left: auto;
}

.data-table tbody th small {
  max-width: 6.5rem;
  font-weight: 400;
}

.data-table .group th small {
  max-width: none;
}

.data-table .group th {
  padding-top: 0.9rem;
  font-size: 0.95rem;
  text-align: left;
  white-space: normal;
  background: color-mix(in oklab, var(--surface-2) 60%, transparent);
}

.data-table .group small {
  font-weight: 400;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.status .pip {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 5px;
}

.status .pip svg {
  width: 9px;
  height: 9px;
}

/* Footnotes below the board */
.footnotes {
  display: grid;
  gap: 0.45rem;
  padding: 1rem var(--pad) 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--ink-2);
}

.footnotes li {
  display: grid;
  grid-template-columns: 1rem 1fr;
  gap: 0.5rem;
  align-items: start;
}

.footnotes svg {
  width: 13px;
  height: 13px;
  margin-top: 0.28rem;
  color: var(--ink-3);
}

.footnotes .is-caution svg {
  color: var(--amber);
}

/* Community */
.disclosure {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  margin-top: 0.9rem;
  padding: 1rem 1.2rem;
  border: 1px solid color-mix(in oklab, var(--violet-fill) 45%, transparent);
  border-radius: var(--radius);
  background: var(--violet-wash);
  font-size: 0.93rem;
  color: var(--ink);
}

.disclosure svg {
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
  color: var(--violet);
}

.disclosure strong {
  display: block;
  margin-bottom: 0.15rem;
}

.disclosure p {
  color: var(--ink-2);
}

.sample-banner {
  margin-top: 0.9rem;
  padding: 0.7rem 1.2rem;
  border: 1px dashed var(--amber);
  border-radius: var(--radius);
  background: var(--amber-wash);
  color: var(--amber);
  font-size: 0.9rem;
  font-weight: 600;
}

.filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.9rem var(--pad);
  border-bottom: 1px solid var(--line);
}

.filterbar input[type="search"] {
  flex: 1 1 16rem;
  min-height: 2.5rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--inset);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.check input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent-fill);
}

.empty {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: clamp(2.5rem, 7vw, 4.5rem) 1.5rem;
  text-align: center;
}

.empty svg {
  width: 72px;
  height: 72px;
  color: var(--accent);
}

.empty h3 {
  font-size: 1.35rem;
}

.empty p {
  max-width: 32rem;
  color: var(--ink-2);
}

.empty .hero__actions {
  justify-content: center;
  margin-top: 0.5rem;
}

/* Board: medium and small screens */
@media (max-width: 1020px) {
  .board,
  .board--community {
    --pad: 1.1rem;
  }

  .axis {
    display: none;
  }

  .board__scale {
    display: block;
  }

  .row__unit {
    white-space: normal;
    max-width: 8rem;
  }

  .row__main {
    grid-template-columns: 2.9rem minmax(6.5rem, 1fr) auto 1.25rem;
    grid-template-areas:
      "rank who value chev"
      "rank meta meta meta"
      "rank side side side"
      "track track track track";
    row-gap: 0.5rem;
    column-gap: 0.85rem;
    align-items: start;
  }

  .row__rank {
    grid-area: rank;
    padding-top: 0.15rem;
  }

  .row__who {
    grid-area: who;
  }

  .row__meta {
    grid-area: meta;
  }

  .row__track {
    grid-area: track;
    padding-left: 3.75rem;
  }

  .row__value {
    grid-area: value;
  }

  .row__side {
    grid-area: side;
    grid-auto-flow: column;
    justify-content: start;
    justify-items: start;
    align-items: baseline;
    gap: 0.45rem;
    text-align: left;
  }

  .row__side .row__figure {
    font-size: 0.92rem;
  }

  .row__meta {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    align-items: center;
    column-gap: 0.7rem;
    row-gap: 0.4rem;
  }

  .board--community .row__meta {
    grid-auto-flow: row;
    grid-auto-columns: auto;
  }

  .row__flags {
    margin-top: 0;
  }

  .row__chev {
    grid-area: chev;
    margin-top: 0.3rem;
  }

  .track__line {
    top: -0.35rem;
    bottom: -0.35rem;
  }

  .row__detail {
    padding-left: var(--pad);
  }
}

@media (max-width: 520px) {
  .row__track {
    padding-left: 0;
  }

  .row__meta {
    grid-auto-flow: row;
    grid-auto-columns: auto;
  }

  .site-nav a {
    padding: 0 0.55rem;
    font-size: 0.88rem;
  }

  .site-nav {
    margin-left: -0.55rem;
  }

  .site-nav a[aria-current="page"]::after {
    inset: auto 0.55rem -1px;
  }

  .row__figure {
    font-size: 1.1rem;
  }

  .board__header {
    padding-top: 1.1rem;
  }
}

/* Stack table cells on narrow screens so nothing scrolls sideways unseen. */
@media (max-width: 720px) {
  .data-table--stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .data-table--stack,
  .data-table--stack tbody,
  .data-table--stack tr,
  .data-table--stack td,
  .data-table--stack th {
    display: block;
    width: 100%;
  }

  .data-table--stack tr {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--line);
  }

  .data-table--stack tr:last-child {
    border-bottom: 0;
  }

  .data-table--stack td,
  .data-table--stack tbody th {
    display: grid;
    grid-template-columns: 9.5rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.2rem 0;
    border: 0;
    text-align: left;
    white-space: normal;
  }

  .data-table--stack td::before,
  .data-table--stack tbody th::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-3);
    padding-top: 0.2rem;
  }

  .data-table--stack td small,
  .data-table--stack tbody th small {
    max-width: none;
    margin-left: 0;
  }

  .data-table--stack .note-row {
    padding-top: 0;
    border-top: 0;
  }

  .data-table--stack .has-note {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .data-table--stack .note-row td {
    max-width: none;
    padding-bottom: 0;
  }

  .data-table--stack td:empty,
  .data-table--stack td.is-blank {
    display: none;
  }

  .data-table--stack th:first-child,
  .data-table--stack td:first-child {
    padding-left: 0;
  }

  /* A harness heading row in the full table is a heading, not a label and value pair. */
  .data-table--stack tbody tr.group th {
    display: block;
  }

  .data-table--stack tbody tr.group th::before {
    content: none;
  }

  .data-table--stack tr.group th small {
    display: block;
  }

  /* A note reads as a paragraph: its label above, the text at full width. */
  .data-table--stack .note-row td {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
  }
}

.data-table .cell-value {
  display: block;
}

/* ------------------------------------------------------- explain and CTA */

.explain {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.9rem;
}

.explain article {
  padding: 1.35rem 1.4rem 1.5rem;
}

.explain h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.05rem;
}

.explain h3 svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.explain p {
  margin-top: 0.6rem;
  font-size: 0.94rem;
  color: var(--ink-2);
}

.cta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 3rem;
  align-items: center;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  overflow: hidden;
  background:
    radial-gradient(34rem 18rem at 100% 0%, var(--glow), transparent 65%),
    var(--surface);
}

.cta h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
}

.cta p {
  margin-top: 0.6rem;
  color: var(--ink-2);
  max-width: 38rem;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 760px) {
  .cta {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------------ prose */

.prose {
  max-width: 46rem;
}

.prose > * + * {
  margin-top: 1rem;
}

.prose h2 {
  margin-top: 2.75rem;
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  letter-spacing: -0.025em;
}

.prose h3 {
  margin-top: 1.9rem;
  font-size: 1.12rem;
}

.prose p,
.prose li {
  color: var(--ink-2);
}

.prose strong {
  color: var(--ink);
  font-weight: 650;
}

.prose ul {
  display: grid;
  gap: 0.45rem;
  padding-left: 1.15rem;
  list-style: disc;
}

.prose ol {
  display: grid;
  gap: 0.45rem;
  padding-left: 1.3rem;
  list-style: decimal;
}

.prose li::marker {
  color: var(--ink-3);
}

.prose code {
  padding: 0.1em 0.38em;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--ink);
}

.layout-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: 3rem;
  align-items: start;
}

.toc {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  padding: 1.1rem 1.2rem;
  font-size: 0.9rem;
}

.toc h2 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.toc ul {
  display: grid;
  gap: 0.15rem;
  margin-top: 0.7rem;
}

.toc a {
  display: block;
  padding: 0.3rem 0.5rem;
  border-radius: 7px;
  color: var(--ink-2);
  text-decoration: none;
}

.toc a:hover {
  background: var(--surface-2);
  color: var(--ink);
}

@media (max-width: 940px) {
  .layout-split {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    order: -1;
  }
}

.defs {
  display: grid;
  gap: 0.75rem;
}

.defs > div {
  padding: 1.15rem 1.3rem;
}

.defs dt {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.75rem;
  font-weight: 700;
  font-size: 1.04rem;
}

.defs dt span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.defs dd {
  margin-top: 0.45rem;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.94rem;
  color: var(--ink-2);
}

.note svg {
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  color: var(--accent);
}

.note strong {
  color: var(--ink);
}

.note--caution {
  border-left-color: var(--amber);
}

.note--caution svg {
  color: var(--amber);
}

.note--violet {
  border-left-color: var(--violet-fill);
}

.note--violet svg {
  color: var(--violet);
}

/* ------------------------------------------------------------------- run */

.steps {
  display: grid;
  gap: 1rem;
  counter-reset: step;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 0 1.25rem;
  padding: clamp(1.25rem, 3vw, 1.9rem);
  counter-increment: step;
}

.step::before {
  content: counter(step, decimal-leading-zero);
  grid-row: 1 / span 9;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--accent);
}

.step > * {
  grid-column: 2;
}

.step h2,
.step h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  letter-spacing: -0.02em;
}

.step > p {
  margin-top: 0.6rem;
  color: var(--ink-2);
  max-width: 44rem;
}

.step > * + details,
.step > * + .prompt-box,
.step > * + .agent-box,
.step > * + .download-list,
.step > * + .checklist,
.step > * + .note,
.step > * + .hero__actions,
.step > * + .fields {
  margin-top: 1.1rem;
}

.step--solo {
  grid-template-columns: minmax(0, 1fr);
}

.step--solo::before {
  display: none;
}

.step--solo > * {
  grid-column: 1;
}

@media (max-width: 600px) {
  .step {
    grid-template-columns: 1fr;
  }

  .step::before {
    grid-row: auto;
    margin-bottom: 0.4rem;
    font-size: 1.1rem;
  }

  .step > * {
    grid-column: 1;
  }
}

.prompt-box,
.agent-box {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--inset);
  overflow: hidden;
}

.box-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.55rem 0.6rem 0.55rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.84rem;
  color: var(--ink-2);
}

.box-bar__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  min-width: 0;
}

.box-bar__title strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.box-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.box-bar--sub {
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  color: var(--ink-3);
}

.prompt-box pre {
  max-height: 26rem;
  padding: 1.1rem 1.15rem;
  overflow: auto;
  font-size: 0.82rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink-2);
  tab-size: 2;
}

.prompt-box pre:focus-visible {
  outline-offset: -2px;
}

.skill-box > summary {
  cursor: pointer;
  list-style: none;
  border-bottom: 0;
}

.skill-box > summary::-webkit-details-marker {
  display: none;
}

.skill-box > summary .box-bar__title::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.15rem;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.skill-box[open] > summary {
  border-bottom: 1px solid var(--line);
}

.skill-box[open] > summary .box-bar__title::before {
  transform: rotate(45deg);
}

.agent-box p {
  padding: 1rem 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.hash {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-3);
}

.hash svg {
  width: 12px;
  height: 12px;
}

.hash--ok {
  color: var(--good);
}

.hash--bad {
  color: var(--red);
}

.download-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.75rem;
}

.download {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.2rem 0.85rem;
  align-items: center;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.download:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.download svg {
  grid-row: 1 / span 2;
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.download strong {
  font-weight: 650;
}

.download span {
  grid-column: 2;
  font-size: 0.82rem;
  color: var(--ink-3);
  overflow-wrap: anywhere;
}

.checklist {
  display: grid;
  gap: 0.6rem;
}

.checklist li {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  gap: 0.65rem;
  color: var(--ink-2);
}

.checklist svg {
  width: 16px;
  height: 16px;
  margin-top: 0.28rem;
  color: var(--accent);
}

.checklist strong {
  color: var(--ink);
}

/* ---------------------------------------------------------------- submit */

.submit-layout {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(19rem, 24rem);
  gap: 2rem;
  align-items: start;
}

.submit-aside {
  position: sticky;
  top: calc(var(--header-height) + 1.25rem);
  display: grid;
  gap: 1rem;
}

@media (max-width: 980px) {
  .submit-layout {
    grid-template-columns: 1fr;
  }

  .submit-aside {
    position: static;
  }
}

.form-card {
  padding: clamp(1.25rem, 3vw, 1.9rem);
}

.form-card + .form-card {
  margin-top: 1rem;
}

.form-card > h2 {
  font-size: 1.25rem;
}

.form-card > h2 + p {
  margin-top: 0.4rem;
  color: var(--ink-2);
  font-size: 0.94rem;
}

.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.1rem;
  margin-top: 1.25rem;
}

.field {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  min-width: 0;
}

.field--wide {
  grid-column: 1 / -1;
}

@media (max-width: 600px) {
  .fields {
    grid-template-columns: 1fr;
  }
}

.field label,
.field legend {
  font-size: 0.9rem;
  font-weight: 600;
}

.field .optional {
  margin-left: 0.35rem;
  font-weight: 400;
  color: var(--ink-3);
}

.field input[type="text"],
.field input[type="number"],
.field select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--inset);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder {
  color: var(--ink-3);
  font-style: italic;
  opacity: 0.6;
}

.field input:hover {
  border-color: var(--ink-3);
}

.field input:focus-visible,
.field select:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

.field input[aria-invalid="true"] {
  border-color: var(--red);
}

.field__hint {
  font-size: 0.8rem;
  color: var(--ink-3);
}

.field__error {
  font-size: 0.8rem;
  color: var(--red);
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.inline-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.inline-inputs input {
  flex: 1 1 0;
  min-width: 0;
}

.inline-inputs span {
  font-size: 0.86rem;
  color: var(--ink-3);
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.6rem;
}

.choice {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.65rem;
  align-items: start;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--inset);
  cursor: pointer;
}

.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-wash);
}

.choice:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.choice input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0.2rem 0 0;
  accent-color: var(--accent-fill);
}

.choice strong {
  font-weight: 600;
  font-size: 0.93rem;
}

.choice small {
  grid-column: 2;
  font-size: 0.8rem;
  color: var(--ink-2);
}

.agree {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--inset);
  font-size: 0.92rem;
  color: var(--ink-2);
  cursor: pointer;
}

.agree input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  accent-color: var(--accent-fill);
}

.dropzone {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  margin-top: 1.1rem;
  padding: 1.25rem;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--inset);
  text-align: center;
  font-size: 0.92rem;
  color: var(--ink-2);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dropzone.is-over {
  border-color: var(--accent);
  background: var(--accent-wash);
}

.dropzone__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.aside-card {
  padding: 1.25rem 1.3rem 1.4rem;
}

.aside-card h2 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.entry-preview {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.entry-preview__who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.entry-preview__setup {
  display: grid;
  gap: 0.15rem;
  font-size: 0.88rem;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.entry-preview__setup strong {
  color: var(--ink);
  font-weight: 600;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.stat {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.stat__value {
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat__label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.problems {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.85rem;
  font-size: 0.86rem;
  color: var(--red);
}

.problems li {
  position: relative;
  padding-left: 1rem;
}

.problems li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.6em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: currentColor;
}

.submit-actions {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.submit-actions .button {
  width: 100%;
  white-space: normal;
  text-align: center;
}

.submit-actions__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.fineprint {
  font-size: 0.82rem;
  color: var(--ink-3);
}

.fineprint + .fineprint {
  margin-top: 0.5rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 60;
  transform: translate(-50%, 1rem);
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --------------------------------------------------------------- tooltip */

.tip {
  position: fixed;
  z-index: 70;
  top: 0;
  left: 0;
  max-width: 17rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  box-shadow: var(--shadow-pop);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-2);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s ease;
}

.tip.is-visible {
  opacity: 1;
}

.tip strong {
  display: block;
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.tip span {
  display: block;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  margin-top: clamp(2rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 55%, var(--bg));
  font-size: 0.92rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: 2rem 3rem;
  padding-block: 2.75rem 2rem;
}

.site-footer__brand p {
  margin-top: 0.7rem;
  color: var(--ink-2);
}

.site-footer__hosted {
  font-size: 0.85rem;
  color: var(--ink-3);
}

.site-footer h2 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.site-footer ul {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.site-footer nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-footer__fine {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 2rem;
  padding-block: 1.25rem 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--ink-3);
}

.site-footer__credit {
  flex-basis: 100%;
  margin-top: 0.6rem;
  text-align: center;
  font-style: italic;
}

@media (max-width: 700px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

/* --------------------------------------------------------------- loading */

.loading {
  display: grid;
  place-items: center;
  min-height: 12rem;
  color: var(--ink-3);
  font-size: 0.95rem;
}

.load-error {
  padding: 2rem var(--pad, 1.5rem);
  color: var(--ink-2);
}

.load-error strong {
  display: block;
  color: var(--ink);
}

.not-found {
  display: grid;
  justify-items: start;
  gap: 1rem;
  padding-block: clamp(4rem, 12vw, 8rem);
}

.not-found h1 {
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  letter-spacing: -0.04em;
}

/* ---------------------------------------------------------------- motion */

@media (prefers-reduced-motion: no-preference) {
  .snapshot--live .snapshot__dot {
    animation: pulse 2s ease-out infinite;
  }

  .pip--running svg,
  .pip--saving svg {
    animation: breathe 1.6s ease-in-out infinite;
  }

  .board--animate .track__bar,
  .board--animate .track__seg {
    animation: grow 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    transform-origin: left center;
  }

  .board--animate .track__dot,
  .board--animate .track__tick {
    animation: fade 0.45s ease 0.25s both;
  }

  .board--animate .row {
    animation: rise 0.4s ease both;
    animation-delay: calc(var(--i, 0) * 28ms);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in oklab, var(--amber) 60%, transparent);
  }
  100% {
    box-shadow: 0 0 0 0.6rem transparent;
  }
}

@keyframes breathe {
  50% {
    opacity: 0.35;
  }
}

@keyframes grow {
  from {
    transform: scaleX(0);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* High-contrast and forced-colors users keep every state: icons and text carry it. */
@media (forced-colors: active) {
  .track__bar,
  .track__seg,
  .track__tick {
    background: CanvasText;
  }

  .track__seg--soft {
    background: GrayText;
  }

  .track__dot {
    background: CanvasText;
    box-shadow: 0 0 0 2px Canvas;
  }

  .track__dot--hollow {
    background: Canvas;
    border: 2px solid CanvasText;
  }

  .pip,
  .flag {
    border: 1px solid CanvasText;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero__art,
  .cta,
  .tip {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}


/* ===================================================================== v2 */

/* Small segmented control used inside board headers. */
.segmented--small {
  margin-top: 0.85rem;
  padding: 0.2rem;
}

.segmented--small button {
  min-height: 2rem;
  padding: 0.25rem 0.85rem;
  font-size: 0.86rem;
}

.flag--warn {
  background: var(--amber-wash);
  color: var(--amber);
}

.button--ghost {
  border-color: transparent;
  color: var(--ink-2);
}

.button--ghost:hover {
  border-color: var(--line-strong);
}

.button--danger {
  border-color: transparent;
  background: var(--red-wash);
  color: var(--red);
}

.button--danger:hover {
  background: color-mix(in oklab, var(--red-wash) 70%, var(--red));
  color: var(--bg);
}

/* Replaced attempts stay visible but read as set aside. */
.pip--replaced {
  opacity: 0.45;
}

.data-table tr.is-replaced > th,
.data-table tr.is-replaced > td {
  color: var(--ink-3);
}

/* "Listed, not ranked" separator inside a board. */
.rows__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem var(--pad);
  border-top: 1px solid var(--line);
  background: color-mix(in oklab, var(--amber-wash) 55%, transparent);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--amber);
}

.rows__divider::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}

.row__rank small {
  max-width: 3.25rem;
  line-height: 1.2;
}

/* Per-harness settings chips in row details. */
.settings-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 1rem;
}

.settings-list li {
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.78rem;
  color: var(--ink-2);
}

/* ------------------------------------------------------------- overall */

.board--overall {
  --cols: 3.25rem minmax(9.5rem, 1fr) minmax(11rem, 1.5fr) repeat(5, minmax(5.4rem, 0.62fr)) 1.5rem;
}

.axis--columns {
  font-size: 0.68rem;
}

.axis--columns .axis__col--score {
  grid-column: 3;
}

.axis__cols {
  display: contents;
}

.axis--columns .axis__col {
  text-align: right;
  letter-spacing: 0.1em;
}

.axis--columns .axis__col--score {
  text-align: left;
}

.row__score {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.2rem;
  gap: 0.85rem;
  align-items: center;
}

.row__score .row__figure {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.row--leader .row__score .row__figure {
  color: var(--accent);
}

.row__stats {
  display: contents;
}

.row__stat {
  display: grid;
  justify-items: end;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.row__stat-value {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
}

.row__stat-label {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.row__stat--warn .row__stat-value {
  color: var(--amber);
}

.formula {
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--inset);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.formula strong {
  color: var(--ink);
  font-weight: 600;
}

.formula__result {
  color: var(--accent) !important;
}

.method {
  margin: 0 var(--pad);
  border-top: 1px solid var(--line);
}

.method > summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  list-style: none;
}

.method > summary::-webkit-details-marker {
  display: none;
}

.method > summary::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.method[open] > summary::before {
  transform: rotate(45deg);
}

.method__body {
  display: grid;
  gap: 0.6rem;
  padding-bottom: 1.1rem;
  font-size: 0.88rem;
  color: var(--ink-2);
  max-width: 52rem;
}

.method__body code {
  padding: 0.2em 0.5em;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--ink);
}

@media (max-width: 1020px) {
  .board--overall .axis--columns {
    display: none;
  }

  .board--overall .row__main {
    grid-template-columns: 2.9rem minmax(0, 1fr) minmax(8.5rem, 0.9fr) 1.25rem;
    grid-template-areas:
      "rank who score chev"
      "rank stats stats stats";
  }

  .board--overall .row__score {
    grid-area: score;
  }

  /* The generic small-screen rule puts every .row__track in a "track" area that this nested grid does not have. */
  .board--overall .row__score .row__track {
    grid-area: auto;
    padding-left: 0;
  }

  .board--overall .row__stats {
    grid-area: stats;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1.1rem;
  }

  .board--overall .row__stat {
    justify-items: start;
    text-align: left;
  }

  .board--overall .row__stat-label {
    display: block;
  }

  .board--overall .row__stat-value {
    font-size: 0.88rem;
  }
}

@media (max-width: 520px) {
  .board--overall .row__main {
    grid-template-columns: 2.4rem minmax(0, 1fr) 1.25rem;
    grid-template-areas:
      "rank who chev"
      "rank score score"
      "rank stats stats";
  }

  .row__score {
    grid-template-columns: minmax(0, 1fr) 3.6rem;
  }
}

/* Label and value pairs (a community run's details): both columns wrap, so nothing is cut off on phones. */
.data-table--pairs th,
.data-table--pairs td {
  white-space: normal;
  overflow-wrap: break-word;
}

.data-table--pairs th {
  width: 36%;
}

.data-table--pairs td {
  overflow-wrap: anywhere;
}

/* Harness totals in an opened row */
.totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.5rem;
  margin: 0.9rem 0 1rem;
}

.totals > div {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--inset);
}

.totals dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.totals dd {
  margin: 0.25rem 0 0;
  font-size: 0.98rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.totals dd small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.76rem;
  font-weight: 450;
  color: var(--ink-3);
}

/* Narrow phones: the value moves under the name so neither has to squeeze. */
@media (max-width: 400px) {
  .row__main {
    grid-template-columns: 2.4rem minmax(0, 1fr) 1.25rem;
    grid-template-areas:
      "rank who chev"
      "rank value value"
      "rank meta meta"
      "rank side side"
      "track track track";
  }

  .row__value {
    grid-auto-flow: column;
    justify-content: start;
    justify-items: start;
    align-items: baseline;
    gap: 0.45rem;
    text-align: left;
  }

  .row__unit {
    max-width: none;
  }
}

/* ----------------------------------------------------------- favorites */

.board__scale--always {
  display: block;
}

.extremes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  padding: 0.9rem var(--pad) 0;
}

.extremes > div {
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--inset);
}

.extremes dt {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.extremes dd {
  margin-top: 0.2rem;
  font-size: 0.92rem;
  color: var(--ink-2);
}

.extremes dd strong {
  color: var(--ink);
}

@media (max-width: 560px) {
  .extremes {
    grid-template-columns: 1fr;
  }
}

.empty--compact {
  padding-block: clamp(2rem, 6vw, 3.25rem);
}

.empty--compact svg {
  width: 56px;
  height: 56px;
  color: var(--amber);
}

.rated-list {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.rated-attempt {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) auto 5.5rem auto;
  gap: 0.5rem 1rem;
  align-items: center;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.rated-attempt__name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.rated-attempt__name small {
  font-weight: 400;
  color: var(--ink-3);
}

.rated-attempt__value {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stars-static {
  display: inline-flex;
  gap: 0.1rem;
  font-size: 0.9rem;
  letter-spacing: 0;
}

.star-static {
  color: color-mix(in oklab, var(--ink-3) 78%, var(--surface));
}

.star-static.is-on {
  color: var(--amber);
}

@media (max-width: 640px) {
  .rated-attempt {
    grid-template-columns: 1fr auto;
  }

  .rated-attempt .stars-static {
    grid-column: 1 / -1;
  }
}

.mine-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.85rem var(--pad);
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--violet-wash) 45%, transparent);
}

.mine-status {
  font-size: 0.88rem;
  color: var(--ink-2);
}

.mine-status--warn {
  color: var(--amber);
}

.mine-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.confirm {
  display: inline-flex;
  gap: 0.4rem;
}

.mine-empty {
  padding: 1.4rem var(--pad);
  color: var(--ink-3);
  font-size: 0.92rem;
}

.rate-grid {
  padding: 1.4rem var(--pad) 1.5rem;
  border-top: 1px solid var(--line);
}

.rate-grid > h3 {
  font-size: 1.15rem;
}

.rate-grid__hint {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.rate-grid__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 33rem), 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.rate-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
}

.rate-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}

.rate-card__head h4 {
  font-size: 1rem;
}

.rate-card__average {
  font-size: 0.82rem;
  color: var(--ink-2);
}

.rate-card__rows {
  display: grid;
}

.rate-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 1fr) auto 3.4rem auto auto;
  gap: 0.4rem 0.6rem;
  align-items: center;
  padding: 0.55rem 1rem;
}

.rate-row + .rate-row {
  border-top: 1px solid var(--line);
}

.rate-row__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.rate-row__label small {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--ink-3);
}

.rate-row__value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}

.stars {
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.star {
  position: relative;
  display: grid;
  justify-items: center;
  width: 1.55rem;
  padding: 0.1rem 0;
  border-radius: 6px;
  cursor: pointer;
}

.star__glyph {
  font-size: 1.15rem;
  line-height: 1;
  color: color-mix(in oklab, var(--ink-3) 78%, var(--surface-2));
  transition: color 0.1s ease, transform 0.1s ease;
}

.star__num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-3);
}

.star.is-on .star__glyph {
  color: var(--amber);
}

.star:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.star:hover .star__glyph {
  transform: scale(1.12);
}

/* Hover preview: light up every star up to the one under the pointer. */
.stars:has(.star:nth-of-type(1):hover) .star:nth-of-type(-n+1) .star__glyph,
.stars:has(.star:nth-of-type(2):hover) .star:nth-of-type(-n+2) .star__glyph,
.stars:has(.star:nth-of-type(3):hover) .star:nth-of-type(-n+3) .star__glyph,
.stars:has(.star:nth-of-type(4):hover) .star:nth-of-type(-n+4) .star__glyph,
.stars:has(.star:nth-of-type(5):hover) .star:nth-of-type(-n+5) .star__glyph,
.stars:has(.star:nth-of-type(6):hover) .star:nth-of-type(-n+6) .star__glyph,
.stars:has(.star:nth-of-type(7):hover) .star:nth-of-type(-n+7) .star__glyph,
.stars:has(.star:nth-of-type(8):hover) .star:nth-of-type(-n+8) .star__glyph,
.stars:has(.star:nth-of-type(9):hover) .star:nth-of-type(-n+9) .star__glyph,
.stars:has(.star:nth-of-type(10):hover) .star:nth-of-type(-n+10) .star__glyph {
  color: color-mix(in oklab, var(--amber) 75%, var(--ink));
}

@media (max-width: 640px) {
  .rate-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .rate-row .stars {
    grid-column: 1 / -1;
    order: 3;
  }

  .star {
    width: auto;
    flex: 1 1 0;
    min-height: 2.6rem;
    align-content: center;
  }

  .star__glyph {
    font-size: 1.35rem;
  }
}

@media (forced-colors: active) {
  .star.is-on .star__glyph,
  .star-static.is-on {
    color: Highlight;
  }
}

.stars--form {
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  margin-top: 0.35rem;
}

.stars--form .star {
  width: 2rem;
}

.stars--form .star__glyph {
  font-size: 1.45rem;
}

.stars--form .button {
  margin-left: 0.5rem;
}

.field--note {
  grid-column: 1 / -1;
  margin: 0;
}

/* Icons inside running text stay on the line. */
a .icon,
p .icon {
  display: inline-block;
  vertical-align: -0.12em;
}

/* ---------------------------------------------------------------- player */

.player {
  width: min(94vw, 1180px);
  max-width: none;
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-pop);
  overflow: auto;
}

.player::backdrop {
  background: rgb(2 8 12 / 0.74);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.player__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem 0.85rem;
}

.player__head h2 {
  font-size: 1.15rem;
}

.player__meta {
  margin-top: 0.2rem;
  font-size: 0.84rem;
  color: var(--ink-3);
}

.player__frame {
  width: min(100%, calc((100dvh - 15rem) * 16 / 9));
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  background: #000;
}

.player__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.player__foot {
  display: grid;
  gap: 0.5rem;
  padding: 0.85rem 1.15rem 1.05rem;
}

.player__back {
  justify-self: start;
}

.player__back[hidden] {
  display: none;
}

.player__rate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.player__rate-label {
  font-weight: 600;
  font-size: 0.92rem;
}

.player__note {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--amber-wash);
  color: var(--amber);
  font-size: 0.86rem;
}

.player__hint {
  font-size: 0.8rem;
  color: var(--ink-3);
}

.play-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1rem;
}

.play-strip__label {
  margin-right: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.rate-row--muted {
  grid-template-columns: minmax(7.5rem, 1fr) auto;
}

.rate-row--muted .pip,
.rate-row--muted .button {
  opacity: 0.7;
}

.rate-row__spacer {
  display: none;
}

@media (max-width: 640px) {
  .player {
    width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
  }

  .player__frame {
    width: 100%;
  }
}

/* Lab setup list on the methodology page */
.setup-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 0;
  margin: 1.25rem 0 0.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.setup-list > div {
  padding: 0.75rem 1rem;
  box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line);
}

.setup-list dt {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.setup-list dd {
  margin-top: 0.2rem;
  color: var(--ink);
  font-weight: 550;
}

.top-picks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.25rem;
  padding: 0.75rem var(--pad) 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.top-picks strong {
  color: var(--ink);
}

.top-picks__agree,
.top-picks__differ {
  padding: 0.12rem 0.55rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}

.top-picks__agree {
  background: var(--good-wash);
  color: var(--good);
}

.top-picks__differ {
  background: var(--violet-wash);
  color: var(--violet);
}

/* Opinions (ratings) and self-reported community data never wear the lab's measurement teal. */
.board--favorites,
.board--community {
  --mark: var(--violet-fill);
  --mark-soft: color-mix(in oklab, var(--violet-fill) 45%, var(--surface));
}

.board--favorites .row--leader .row__rank {
  color: var(--violet);
}
