:root {
  color-scheme: light dark;
  --background: #f3f5fb;
  --surface: rgba(255, 255, 255, 0.62);
  --surface-strong: #fff;
  --text: #0c1222;
  --muted: #5b6477;
  --line: rgba(12, 18, 34, 0.09);
  --passed: #059669;
  --findings: #d97706;
  --errored: #e11d48;
  --pending: #6366f1;
  --aurora-1: rgba(52, 211, 153, 0.45);
  --aurora-2: rgba(96, 165, 250, 0.42);
  --aurora-3: rgba(232, 121, 249, 0.36);
  --accent: linear-gradient(120deg, #10b981, #06b6d4 45%, #8b5cf6 95%);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 1.5rem 3.5rem -1.75rem rgba(30, 41, 80, 0.28);
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --tone: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0e1320;
    --surface: rgba(30, 38, 58, 0.62);
    --surface-strong: #19202f;
    --text: #eef1fb;
    --muted: #949db2;
    --line: rgba(255, 255, 255, 0.09);
    --passed: #34d399;
    --findings: #fbbf24;
    --errored: #fb7185;
    --pending: #a5b4fc;
    --aurora-1: rgba(16, 185, 129, 0.2);
    --aurora-2: rgba(59, 130, 246, 0.2);
    --aurora-3: rgba(168, 85, 247, 0.18);
    --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1.5rem 3.5rem -1.75rem rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--background); color: var(--text); line-height: 1.45; }
a { color: inherit; }

.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; }
.aurora span:nth-child(1) { top: -30vmax; left: -20vmax; background: radial-gradient(circle, var(--aurora-1), transparent 62%); }
.aurora span:nth-child(2) { top: -20vmax; right: -30vmax; background: radial-gradient(circle, var(--aurora-2), transparent 62%); }
.aurora span:nth-child(3) { bottom: -40vmax; left: 15vmax; background: radial-gradient(circle, var(--aurora-3), transparent 62%); }

.page { width: min(1380px, 100%); margin: auto; padding: 1.5rem clamp(1rem, 4vw, 4rem) 5rem; }
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-bottom: 1.5rem; }
.nav a { color: var(--muted); font-size: 0.9rem; font-weight: 650; text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-family: var(--mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.brand::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); }
.nav .brand { color: var(--text); margin-right: auto; }
.nav form { display: contents; }
.nav .nav__sign-out { padding: 0; border: 0; background: none; color: var(--muted); font-size: 0.9rem; }
.nav .nav__sign-out:hover { color: var(--text); }

.sign-in { max-width: 28rem; margin: 12vh auto 0; padding: 2rem; text-align: center; }
.sign-in .lede { margin-inline: auto; }
.sign-in form { display: flex; justify-content: center; }

h1 { margin: 0 0 0.5rem; font-size: clamp(1.75rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.045em; }
h2 { margin: 2rem 0 0.75rem; font-size: 1.15rem; letter-spacing: -0.02em; }
h3 { margin: 0 0 0.35rem; font-size: 1rem; }
p { margin-top: 0; }
.lede { max-width: 42rem; color: var(--muted); }
.meta { color: var(--muted); font-family: var(--mono); font-size: 0.75rem; }
.header { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.header p { margin-bottom: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: start; gap: 0.5rem; }

.card { padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: 1.1rem; background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.card + .card { margin-top: 0.75rem; }
.card > :last-child { margin-bottom: 0; }

.list { display: grid; gap: 0; padding: 0; border: 1px solid var(--line); border-radius: 1.1rem; background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(20px); list-style: none; margin: 0; overflow: hidden; }
.list > li { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem 0.75rem; padding: 0.75rem 1rem; }
.list > li + li { border-top: 1px solid var(--line); }
.list > li > a { font-weight: 650; text-decoration: none; }
.list > li > a:hover { text-decoration: underline; }
.list .meta { margin-left: auto; }
.empty { color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.15rem 0.55rem; border-radius: 999px; background: color-mix(in oklab, var(--tone), transparent 86%); color: var(--tone); font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.tone--passed, .tone--fixed { --tone: var(--passed); }
.tone--findings, .tone--major, .tone--open, .tone--confirmed { --tone: var(--findings); }
.tone--errored, .tone--critical { --tone: var(--errored); }
.tone--queued, .tone--running, .tone--sent, .tone--verifying { --tone: var(--pending); }

.grid { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 1.1rem; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.grid th, .grid td { padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; font-size: 0.85rem; }
.grid thead th { color: var(--muted); font-weight: 650; }
.grid tbody tr > * { border-top: 1px solid var(--line); }
.grid td { min-width: 9rem; }
.grid__cell { display: grid; gap: 0.3rem; }
.grid__cell a { text-decoration: none; }
.grid__cell a:hover { text-decoration: underline; }
.grid__add { color: var(--muted); font-size: 0.8rem; opacity: 0.6; }
.scroll { overflow-x: auto; }

.button, button { display: inline-flex; align-items: center; padding: 0.5rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-strong); color: var(--text); font: inherit; font-size: 0.85rem; font-weight: 650; text-decoration: none; cursor: pointer; }
.button--primary { border-color: transparent; background: var(--accent); color: #fff; }
.button:hover, button:hover { filter: brightness(1.05); }
form.inline { display: inline-flex; flex-wrap: wrap; gap: 0.5rem; }

.form { display: grid; gap: 1rem; max-width: 46rem; }
.form label { display: grid; gap: 0.35rem; font-size: 0.85rem; font-weight: 650; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; }
input[type="text"], select, textarea { width: 100%; padding: 0.55rem 0.75rem; border: 1px solid var(--line); border-radius: 0.7rem; background: var(--surface-strong); color: var(--text); font: inherit; font-size: 0.9rem; }
textarea { min-height: 14rem; font-family: var(--mono); font-size: 0.8rem; }
.dismissal textarea { min-height: 4rem; font-family: inherit; }
.errors, .flash { padding: 0.75rem 1rem; border-radius: 0.8rem; background: color-mix(in oklab, var(--errored), transparent 88%); color: var(--errored); }
.flash--notice { background: color-mix(in oklab, var(--passed), transparent 88%); color: var(--passed); }

.markdown { overflow-wrap: anywhere; }
.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }
.markdown img { max-width: 100%; }
.markdown pre { overflow-x: auto; }

.round { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; margin-top: 1.25rem; }
.round__player { position: sticky; top: 1rem; }
.round__player video { display: block; max-width: 100%; max-height: calc(100vh - 2rem); margin-inline: auto; border-radius: 1rem; background: #000; }
.timeline { display: grid; gap: 0.5rem; max-height: calc(100vh - 6rem); overflow-y: auto; padding: 0; margin: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 0.25rem 0.75rem; padding: 0.5rem 0.75rem; border-radius: 0.8rem; }
.timeline li[data-offset] { cursor: pointer; }
.timeline li[data-offset]:hover { background: var(--surface); }
.timeline time { color: var(--muted); font-family: var(--mono); font-size: 0.75rem; }
.timeline__action { color: var(--muted); font-size: 0.8rem; }
.timeline__note { font-size: 0.9rem; }
.timeline__sighting { border: 1px solid color-mix(in oklab, var(--findings), transparent 60%); background: color-mix(in oklab, var(--findings), transparent 92%); }
.timeline img, .sighting img { max-width: 100%; border-radius: 0.6rem; border: 1px solid var(--line); }
.timeline img { grid-column: 2; max-height: 9rem; width: auto; justify-self: start; }

@media (max-width: 800px) {
  .round { grid-template-columns: 1fr; }
  .round__player { position: static; }
  .timeline { max-height: none; }
}
