:root {
  color-scheme: dark;
  --bg: #121614;
  --panel: #1c2320;
  --ink: #e7efe9;
  --muted: #9aab9f;
  --line: #2c3832;
  --blue: #8ec5ff;
  --rust: #e0a080;
  --box: #d7e26a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 "Segoe UI", Helvetica, Arial, sans-serif;
}

header, main {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

header { padding: 28px 0 8px; }

.mark {
  margin: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--blue);
}

h1 {
  margin: 4px 0 8px;
  font-size: 28px;
  font-weight: 560;
}

.lede, .note, .status, .prob-label, .kicker {
  color: var(--muted);
}

.lede { max-width: 62ch; margin-top: 0; }

main {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
  gap: 22px;
  padding-bottom: 40px;
}

.screen {
  position: relative;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

video, canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

video { object-fit: contain; background: #000; }
canvas { pointer-events: none; }

.transport, .upload, .clips {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

#scrub { flex: 1; }

button, .file, select, input[type="password"] {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
}

button { cursor: pointer; }
button.active, #score { background: #24362c; border-color: #3d5c49; }

.file input { display: none; }
.file { cursor: pointer; }

.upload { align-items: end; }
.upload label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
#key, #model { min-width: 220px; }

aside {
  background: var(--panel);
  border-radius: 10px;
  padding: 16px 16px 12px;
}

.kicker { margin: 0; font-size: 13px; }
.prob { margin: 4px 0 0; font-size: 56px; letter-spacing: -0.03em; }
.prob-label { margin: 0 0 8px; }

#chart { width: 100%; height: auto; display: block; }

.boxes { list-style: none; padding: 0; margin: 12px 0; min-height: 1.2em; }
.boxes li { font-size: 14px; margin: 4px 0; }
.boxes .swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  background: var(--box);
}

.note, .status { font-size: 13px; }
.status { min-height: 1.2em; }

@media (max-width: 800px) {
  main { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
}
