/* One palette, and it is the app's. static/css/style.css has been dark since
 * the first commit, and these two pages -- which exist to show that app --
 * were light, so the demo looked like a different product from the thing it
 * demonstrates. The hues below are style.css's, re-expressed as the roles
 * this stylesheet uses. A visitor who genuinely wants light can set
 * data-theme="light"; nothing else switches it, because following the
 * operating system would mean the screenshots in the README match for some
 * readers and not others.
 */
.viz-root {
  color-scheme: dark;
  --surface-1: #131820;
  --plane: #0d1117;
  --ink: #e6edf3;
  --ink-2: #b6c2d1;
  --muted: #8b96a5;
  --grid: #1f2630;
  --border: rgba(230, 237, 243, 0.10);
  --series-1: #4da3ff;
  --good: #5ec98a;
  --warning: #e0c04a;
  --critical: #df6a5e;
}

:root[data-theme="light"] .viz-root {
  color-scheme: light;
  --surface-1: #fcfcfb;
  --plane: #f9f9f7;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --border: rgba(11, 11, 11, 0.10);
  --series-1: #2a78d6;
  --good: #0ca30c;
  --warning: #fab219;
  --critical: #d03b3b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 20px 34px;
  background: var(--plane);
  color: var(--ink);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}

code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.pageHead { max-width: 1180px; margin: 0 auto; padding: 20px 0 8px; }
.pageHead h1 { font-size: 26px; margin: 0; font-weight: 650; }
.pageHead em {
  display: block; font-style: normal; font-size: 15px;
  color: var(--ink-2); font-weight: 400; margin-top: 4px;
}

/* ---------------------------------------------------------------- banner */
.banner {
  max-width: 1180px; margin: 0 auto 16px; padding: 14px 18px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 4px solid var(--critical);
  border-radius: 8px;
}
/* Four bullets stacked made a wall of text as tall as the video beside
   it. Two by two on a wide screen says the same thing in half the height. */
.honesty {
  margin: 0 0 10px; padding-left: 20px;
  display: grid; gap: 2px 30px; font-size: 14px;
}
@media (min-width: 900px) { .honesty { grid-template-columns: 1fr 1fr; } }
.honesty li { margin: 0 0 7px; color: var(--ink-2); }
.honesty li:last-child { margin-bottom: 0; }
.honesty b { color: var(--ink); }
.bannerLinks { font-size: 14px; margin: 0; color: var(--ink-2); }
.bannerLinks a { color: var(--series-1); }
.bannerLinks .sep { color: var(--muted); margin: 0 8px; }

/* ----------------------------------------------------------------- panels */
main { max-width: 1180px; margin: 0 auto; }
.panel {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px 16px;
  margin: 0 0 14px;
}
.panel h2 { font-size: 19px; margin: 0 0 6px; font-weight: 620; }
.panel h3 {
  font-size: 13px; margin: 14px 0 6px; font-weight: 620;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted);
}
.panel h3 .src, .panel h2 .src {
  text-transform: none; letter-spacing: 0; font-weight: 400;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--muted); font-size: 11px; margin-left: 6px;
}
.lede { color: var(--ink-2); margin: 0 0 12px; max-width: 78ch; }
.panel p { color: var(--ink-2); max-width: 82ch; margin: 0 0 10px; }
.panel p:last-child { margin-bottom: 0; }

/* Prose set to 82ch inside a 1180px panel leaves a third of the panel
   empty. Two columns use it. */
.cols2 { display: grid; gap: 4px 34px; }
@media (min-width: 900px) { .cols2 { grid-template-columns: 1fr 1fr; } }
.cols2 > div > :first-child, .cols2 > p:first-child { margin-top: 0; }
.cols2 h3:first-child { margin-top: 0; }

/* --------------------------------------------------------------- controls */
.controls {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.btn {
  font: inherit; padding: 8px 16px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border); background: var(--plane); color: var(--ink);
}
.btn--go { background: var(--series-1); border-color: var(--series-1); color: #fff; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.status { font-size: 14px; color: var(--ink-2); flex: 1 1 260px; }
.status--good { color: var(--good); }
.status--bad { color: var(--critical); }
.status--busy { color: var(--warning); }
.fps {
  font-size: 12px; color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ------------------------------------------------------------------- live */
.live { display: grid; gap: 16px; align-items: start; }
@media (min-width: 880px) {
  .live { grid-template-columns: minmax(0, 1.55fr) minmax(290px, 1fr); }
}
.stageCol { min-width: 0; }
.stageNote {
  font-size: 12px; color: var(--muted); margin: 8px 0 0; max-width: 62ch;
}
.stageWrap {
  min-width: 0;
  background: #000; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border);
}
/* The video is a sink for the stream, never shown: everything on screen is
   the canvas, so what you see is exactly what was measured. */
#video { display: none; }
#stage { display: block; width: 100%; height: auto; }

.sidebar { min-width: 0; }

.verdict {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; background: var(--plane);
}
.sev {
  display: inline-block; font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; font-weight: 650; padding: 2px 8px;
  border-radius: 999px; color: #fff; background: var(--muted);
}
.sev--ok { background: var(--good); }
.sev--warn { background: var(--warning); color: #241a00; }
.sev--block { background: var(--critical); }
.msg { font-size: 21px; font-weight: 640; margin: 8px 0 0; }
.det { font-size: 13px; color: var(--ink-2); margin: 6px 0 0; }

/* -------------------------------------------------------------- checklist */
.checks { list-style: none; margin: 0; padding: 0; }
.chk {
  display: flex; gap: 8px; align-items: baseline;
  padding: 4px 0; border-bottom: 1px solid var(--grid); font-size: 13px;
}
.chk:last-child { border-bottom: none; }
.chk__mark { width: 14px; text-align: center; font-weight: 700; }
.chk--ok .chk__mark { color: var(--good); }
.chk--bad .chk__mark { color: var(--critical); }
.chk--none .chk__mark { color: var(--muted); }
.chk--none .chk__body b { color: var(--muted); }
.chk__body { flex: 1; }
.chk__note { color: var(--muted); font-style: italic; font-size: 12px; }
.chk__fix { display: block; color: var(--ink-2); font-size: 12px; }

/* ------------------------------------------------------------- rule chain */
.rules {
  list-style: decimal inside; margin: 0; padding: 0;
  columns: 2; column-gap: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}
.rule { padding: 2px 6px; border-radius: 4px; color: var(--muted); }
.rule code { color: inherit; }
.rule--queued { color: var(--ink-2); }
.rule--chosen {
  color: var(--ink); font-weight: 650;
  background: color-mix(in srgb, var(--series-1) 14%, transparent);
}
.rule__tag {
  float: right; font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted);
}
.rule--clear { color: var(--good); }

/* -------------------------------------------------------- provenance table */
.provTable { width: 100%; border-collapse: collapse; font-size: 13px; }
.provTable th, .provTable td {
  text-align: left; padding: 7px 10px 7px 0;
  border-bottom: 1px solid var(--grid); vertical-align: top;
}
.provTable thead th {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); font-weight: 600;
}
.provTable tbody th {
  font-weight: 500; white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.provTable .num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.provTable .note { color: var(--ink-2); font-size: 12px; min-width: 24ch; }
.tag {
  display: inline-block; font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.05em; font-weight: 650; padding: 2px 7px;
  border-radius: 999px; white-space: nowrap;
}
.tag--exact { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.tag--approximate { background: color-mix(in srgb, var(--warning) 22%, transparent); color: var(--warning); }
.tag--unavailable { background: color-mix(in srgb, var(--critical) 15%, transparent); color: var(--critical); }
/* Amber text on a light surface needs to be darkened to stay readable; on
   the dark one it does not, so this override belongs with the light theme. */
:root[data-theme="light"] .tag--approximate { color: #8a6100; }

@media (max-width: 720px) {
  .provTable .note { display: none; }
}

/* ---------------------------------------------------------- feature list */
/* Ten short blocks, so they tile rather than stack: a single column of these
   would be most of the page's height for something read a line at a time. */
.features {
  list-style: none; margin: 0 0 12px; padding: 0;
  display: grid; gap: 12px 26px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.features li {
  border-top: 1px solid var(--grid); padding-top: 9px;
}
.features b { display: block; font-size: 14px; font-weight: 640; }
.features p {
  margin: 4px 0 0; font-size: 13px; color: var(--ink-2); max-width: none;
}
.api {
  display: block; margin-top: 2px; font-size: 11px; color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.featNote {
  margin: 0; font-size: 13px; color: var(--ink-2);
  border-top: 1px solid var(--grid); padding-top: 10px;
}
.featNote a { color: var(--series-1); }
