/* One stylesheet. Status is carried by colour and weight, and refusals are
   never styled as errors -- they are answers, and they get the same weight as a
   pass. A superseded value is struck through wherever it appears, always beside
   its replacement. */
:root{
  --bg:#0f1218; --panel:#161a22; --panel2:#1c2230; --line:#2a3140;
  --fg:#e8eaed; --muted:#98a2b3; --dim:#6b7686;
  --accent:#6aa9ff; --good:#5fd08a; --warn:#f5b544; --bad:#f2777a; --prov:#c98bdb;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--fg);
  font:15px/1.6 -apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  display:flex;min-height:100vh}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}

.side{width:210px;flex:0 0 210px;background:var(--panel);border-right:1px solid var(--line);
  padding:18px 12px;position:sticky;top:0;height:100vh;overflow:auto}
.brand{font-weight:700;font-size:17px;margin-bottom:14px;letter-spacing:.2px}
.side a{display:block;padding:7px 10px;border-radius:6px;color:var(--muted);font-size:13.5px}
.side a:hover{background:var(--panel2);text-decoration:none}
.side a.on{background:var(--accent);color:#0b1020;font-weight:600}

main{flex:1;padding:26px 30px 80px;max-width:1180px}
header{margin-bottom:20px}
h1{font-size:26px;margin:0 0 6px}
h2{font-size:19px;margin:34px 0 4px}
h3{font-size:15.5px;margin:22px 0 4px}
.lede,.sub{color:var(--muted);margin:0 0 10px;max-width:75ch}
.sub{font-size:13.5px}

.stats{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0 6px}
.stat{background:var(--panel);border:1px solid var(--line);border-radius:9px;
  padding:11px 14px;min-width:150px}
.stat-v{font-size:20px;font-weight:600}
.stat-k{color:var(--dim);font-size:12px;margin-top:2px}
.stat-note{color:var(--muted);font-size:11.5px;margin-top:4px;max-width:30ch}

/* a linked value: the unit of trust */
.v{cursor:pointer;border-bottom:1px dotted var(--dim);font-variant-numeric:tabular-nums}
.v:hover{border-bottom-color:var(--accent);color:var(--accent)}
.v.strike{text-decoration:line-through;text-decoration-thickness:1.5px;color:var(--muted)}
.v.missing{border:0;color:var(--dim);cursor:default}
.s-provisional{color:var(--prov)}
.s-unverified{color:var(--warn)}
.ci{color:var(--muted);font-size:.88em;margin-left:5px;font-variant-numeric:tabular-nums}
.pair{display:inline-flex;align-items:center;gap:7px;flex-wrap:wrap}
.arrow{color:var(--dim)}

.badge{display:inline-block;padding:1px 8px;border-radius:999px;font-size:11px;
  font-weight:600;letter-spacing:.2px;vertical-align:1px}
.b-live{background:rgba(95,208,138,.16);color:var(--good)}
.b-provisional{background:rgba(201,139,219,.18);color:var(--prov)}
.b-superseded{background:rgba(152,162,179,.18);color:var(--muted)}
.b-retracted{background:rgba(242,119,122,.18);color:var(--bad)}
.b-unverified{background:rgba(245,181,68,.16);color:var(--warn)}
.b-void{background:rgba(107,118,134,.18);color:var(--dim)}

/* refusals share one treatment, at PASS's weight -- never red, never muted */
.verdict{display:inline-block;padding:1px 7px;border-radius:4px;font-size:11px;
  font-weight:700;letter-spacing:.3px}
.vd-pass{background:rgba(95,208,138,.16);color:var(--good)}
.vd-fail{background:rgba(242,119,122,.16);color:var(--bad)}
.vd-refusal{background:rgba(106,169,255,.16);color:var(--accent)}

.tw{overflow-x:auto;margin:12px 0}
table{border-collapse:collapse;width:100%;font-size:13.5px}
th{text-align:left;color:var(--muted);font-weight:600;padding:8px 10px;
  border-bottom:1px solid var(--line);white-space:nowrap}
td{padding:8px 10px;border-bottom:1px solid rgba(42,49,64,.55);vertical-align:top}
tr:hover td{background:rgba(28,34,48,.5)}
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}

.note{background:var(--panel);border:1px solid var(--line);border-left:3px solid var(--dim);
  border-radius:7px;padding:10px 13px;color:var(--muted);margin:12px 0;max-width:88ch}
.n-warn{border-left-color:var(--warn)}
.n-gate{border-left-color:var(--prov);color:var(--fg)}
.n-key{border-left-color:var(--accent)}

figure.fw{margin:16px 0;background:var(--panel);border:1px solid var(--line);
  border-radius:10px;padding:14px}
figure.fw svg{max-width:100%;height:auto;display:block}
figcaption{color:var(--muted);font-size:12.5px;margin-top:8px;max-width:88ch}

.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px;margin:14px 0}
.tile{background:var(--panel);border:1px solid var(--line);border-radius:9px;
  padding:10px;position:relative}
.tile img{width:100%;height:auto;border-radius:5px;background:#fff}
.tile .t{font-size:12.5px;font-weight:600;margin:8px 0 2px}
.tile .m{color:var(--dim);font-size:11.5px}
.flagbadge{position:absolute;top:14px;right:14px;background:rgba(15,18,24,.85);
  border:1px solid var(--line);border-radius:5px;padding:1px 6px;font-size:11px;
  font-weight:600}
.fl-hi{color:var(--bad);border-color:rgba(242,119,122,.5)}
.fl-mid{color:var(--warn)}
.fl-lo{color:var(--muted)}

.locked{background:repeating-linear-gradient(45deg,var(--panel),var(--panel) 9px,
  var(--panel2) 9px,var(--panel2) 18px);
  border:1px dashed var(--line);border-radius:9px;padding:16px 12px;text-align:center}
.lock-t{font-weight:600;font-size:13px}
.lock-r{color:var(--prov);font-size:11.5px;margin-top:5px}
.tile.gated img{filter:blur(13px) saturate(.35);opacity:.55}
.tile.gated .veil{position:absolute;inset:10px 10px auto;height:calc(100% - 74px);
  display:flex;align-items:center;justify-content:center;text-align:center;
  color:var(--prov);font-size:11.5px;font-weight:600;padding:8px;
  background:rgba(15,18,24,.35);border-radius:5px}

.drawer{position:fixed;top:0;right:0;width:min(480px,94vw);height:100vh;overflow:auto;
  background:var(--panel);border-left:1px solid var(--line);padding:18px 20px 60px;
  box-shadow:-18px 0 44px rgba(0,0,0,.45);z-index:50}
.drawer h3{margin:0 0 4px;font-size:16px}
.drawer dl{display:grid;grid-template-columns:auto 1fr;gap:5px 12px;margin:14px 0 0;font-size:12.5px}
.drawer dt{color:var(--dim);text-align:right;white-space:nowrap}
.drawer dd{margin:0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  word-break:break-word;color:var(--muted)}
.drawer .close{position:absolute;top:14px;right:16px;color:var(--dim);cursor:pointer;
  font-size:20px;line-height:1}
.drawer .ev{margin-top:12px;font-size:12.5px;color:var(--muted)}
.drawer .ev li{margin-bottom:6px}
.filter{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}
input[type=search],select{background:var(--panel2);border:1px solid var(--line);
  color:var(--fg);border-radius:7px;padding:7px 10px;font-size:13.5px}
input[type=search]{flex:1;min-width:220px}
.hide{display:none!important}
.entry{background:var(--panel);border:1px solid var(--line);border-radius:9px;
  padding:12px 14px;margin:10px 0}
.entry .num{color:var(--accent);font-weight:700;margin-right:8px}
.entry .body{color:var(--muted);font-size:13px;margin-top:6px;white-space:pre-wrap;display:none}
.entry.open .body{display:block}
.entry h3{margin:0;font-size:14.5px;cursor:pointer}

/* --- the seven-page rebuild ------------------------------------------- */

/* Terms, defined once on page one. */
dl.terms{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;margin:10px 0;
  max-width:88ch;font-size:14px}
dl.terms dt{color:var(--fg);font-weight:600;text-align:right;white-space:nowrap}
dl.terms dd{margin:0;color:var(--muted)}

/* The order of the argument. */
ol.order{max-width:80ch;color:var(--muted);padding-left:22px;margin:12px 0}
ol.order li{margin:5px 0}
ol.order a{font-weight:600}

/* Clips embed, never link. The poster is the mean skeleton, so a tile is
   legible before the mp4 loads and stays legible if it 404s. */
.grid.clips{grid-template-columns:repeat(auto-fill,minmax(310px,1fr))}
video.clip{width:100%;height:auto;display:block;border-radius:5px;
  background:var(--bg);aspect-ratio:1056/372}
.tile.clipcard .m{line-height:1.5}

/* The full 39-row table is a disclosure, and deliberately plain: it is the
   appendix to the ten motifs above, not a second finding. */
details{margin:12px 0;max-width:88ch}
summary{cursor:pointer;color:var(--accent);font-size:13.5px;padding:4px 0}
table.plain td,table.plain th{border-bottom:1px solid rgba(42,49,64,.4)}
table.plain tr:hover td{background:none}

/* --- phone ------------------------------------------------------------ */
/* The sidebar is 210px of a 339px viewport, so below this it stops being a
   sidebar and becomes a strip of links above the content. */
@media (max-width:760px){
  body{display:block}
  .side{width:auto;flex:none;height:auto;position:static;display:flex;flex-wrap:wrap;
    gap:6px;align-items:center;padding:12px;border-right:0;
    border-bottom:1px solid var(--line)}
  .brand{width:100%;margin-bottom:6px;font-size:15px}
  .side a{padding:5px 9px;font-size:12.5px}
  main{padding:18px 14px 60px;max-width:none}
  h1{font-size:21px}
  h2{font-size:17px}
  .stat{min-width:0;flex:1 1 140px}
  .stat-note{max-width:none}
  .grid{grid-template-columns:1fr;gap:10px}
  .grid.clips{grid-template-columns:1fr}
  dl.terms{grid-template-columns:1fr;gap:2px}
  dl.terms dt{text-align:left;margin-top:8px}
  .drawer{width:100vw;border-left:0}
  .drawer dl{grid-template-columns:1fr;gap:2px 0}
  .drawer dt{text-align:left;margin-top:7px}
  /* Wide content scrolls inside its own box; the page body never does. */
  .tw{-webkit-overflow-scrolling:touch}
  figure.fw{padding:10px}
}
img.clip{width:100%;height:auto;display:block;border-radius:5px;background:var(--bg)}
.pending{color:var(--dim);font-size:11px;margin-top:5px}

/* --- verdict words -------------------------------------------------------
   One word per page in the nav, and the same words on the question table.
   Seven separately-titled questions read as seven pages; the same seven with a
   verdict each read as an arc. Muted by default and inheriting on the current
   item, so the nav still reads as navigation rather than as a scoreboard. */
.side a{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.nav-v{font-size:10.5px;letter-spacing:.04em;text-transform:uppercase;
  opacity:.72;font-weight:600;white-space:nowrap}
.side a.on .nav-v{opacity:.85}
.vw{display:inline-block;font-size:11px;letter-spacing:.04em;text-transform:uppercase;
  font-weight:600;padding:2px 7px;border-radius:999px;white-space:nowrap;
  border:1px solid currentColor}
.v-answered{color:#57c98a}
.v-weak,.v-partial{color:#d7a44a}
.v-open,.v-in-doubt{color:#d97757}
h2 .vw{vertical-align:middle;margin-left:6px}
table.five td:first-child{white-space:nowrap;color:var(--muted)}
table.five td:nth-child(3){white-space:nowrap}

/* --- the reading gate ----------------------------------------------------
   Content is hidden by a class set in <head> before first paint, so the page
   does not flash its contents and then cover them. See gate.js for what this
   is and is not: it keeps a link from being forwarded, it does not protect the
   files, and clips/ and renders/ are reachable by URL either way. */
html.locked main,
html.locked .side,
html.locked .drawer{display:none}
html.locked body{background:var(--bg)}
.lockscreen{position:fixed;inset:0;display:flex;align-items:center;
  justify-content:center;padding:24px;background:var(--bg);z-index:50}
.lockbox{width:100%;max-width:340px;background:var(--panel);border:1px solid var(--line);
  border-radius:10px;padding:22px}
.lock-brand{font-weight:700;letter-spacing:.02em;margin-bottom:10px}
.lockbox p{color:var(--muted);font-size:13.5px;margin:0 0 14px}
.lockbox input{width:100%;padding:9px 10px;border-radius:6px;border:1px solid var(--line);
  background:var(--panel2);color:var(--fg);font:inherit;font-size:14px}
.lockbox button{width:100%;margin-top:10px;padding:9px 10px;border:0;border-radius:6px;
  background:var(--accent);color:#0b1020;font:inherit;font-weight:600;cursor:pointer}
.lockbox button:hover{filter:brightness(1.06)}
.lock-err{margin-top:10px;font-size:13px;color:#d97757}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);
  white-space:nowrap}

/* --- the six-page rebuild ------------------------------------------------
   Every page opens with a figure or a grid, so the styles below are mostly
   about giving pictures room and keeping prose out of the way. */

/* The question strip, replacing the five-question table. */
.chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
.chip{display:flex;flex-direction:column;gap:3px;padding:8px 12px;border-radius:9px;
  background:var(--panel);border:1px solid var(--line);min-width:132px;flex:1 1 auto}
.chip:hover{border-color:var(--accent);text-decoration:none}
.chip-q{font-size:11.5px;color:var(--muted)}
.chip-v{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}

/* Figures side by side above the fold, stacking on a phone. */
.figrow{display:grid;grid-template-columns:repeat(auto-fit,minmax(330px,1fr));gap:12px}
.figrow figure.fw{margin:0}
figure.fw img{width:100%;height:auto;display:block;border-radius:5px;background:#fff}

/* Model arms: a strip of skeletons, then two sentences. */
.arms{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;
  margin:4px 0 18px}
.arm{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:14px}
.arm h3{margin:0 0 8px;font-size:14.5px}
.arm p{color:var(--muted);font-size:13px;margin:10px 0 0}
.strip{display:flex;gap:6px}
.strip img{width:100%;height:auto;flex:1;border-radius:5px;background:#fff;min-width:0}
.gap{color:var(--warn)}
table.compare td:first-child{color:var(--muted);white-space:nowrap}
table.matrix td:first-child{white-space:nowrap}

/* Cards: the audit page is these, so a reader can scan it. */
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:12px;
  margin:4px 0 20px}
.card{background:var(--panel);border:1px solid var(--line);border-left:3px solid var(--dim);
  border-radius:9px;padding:13px 15px}
.card.c-defect{border-left-color:var(--warn)}
.card.c-pending{border-left-color:var(--accent)}
/* A card whose question got a definite answer -- same accent as a refusal
   verdict (vd-refusal), because "the labeller declined to describe noise" is
   an answer, not a warning and not a clean pass. Never green: the caveat in
   the card's own text is what carries the qualification, and a good-colored
   border would outrun it. */
.card.c-settled{border-left-color:var(--accent)}
.card h3{margin:0 0 6px;font-size:14px}
.card p{color:var(--muted);font-size:13px;margin:0}
.card-f{margin-top:9px;font-size:11.5px;color:var(--dim);
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace}

/* Tabs on the clips page: one arm at a time, so the grid is never 183 tiles. */
.tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px}
.tabs.family{margin-bottom:16px}
.tabs.family .tab{font-size:13.5px;padding:8px 16px}
.tabs.kind{margin:2px 0 14px}
.tabs.kind .tab{font-size:12.5px;padding:5px 11px;background:none}
.tabs.kind .tab.on{background:var(--panel2);border-color:var(--accent);color:var(--fg)}
section.panel>h3{margin:20px 0 2px}
section.panel .sub{margin:0 0 10px}
.tile.motif.super{opacity:.72}
.tile.motif.super:hover{opacity:1}
.tab{background:var(--panel);border:1px solid var(--line);color:var(--muted);
  border-radius:8px;padding:7px 13px;font-size:13px;cursor:pointer;font:inherit;
  font-size:13px}
.tab:hover{color:var(--fg)}
.tab.on{background:var(--accent);border-color:var(--accent);color:#0b1020;font-weight:600}
.panel[hidden]{display:none}

/* The directory grid. Tiles span columns by EVENT mass -- see emit.tile_span.
   Sizing by frame mass would put stillness in the biggest tiles, which is the
   bias this whole page exists to make visible. */
.grid.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
  gap:10px;align-items:start}
.grid.tiles .tile{grid-column:span min(var(--span,1),3)}
button.tile{font:inherit;text-align:left;cursor:pointer;width:100%;display:block;
  background:var(--panel);border:1px solid var(--line);border-radius:9px;padding:10px;
  position:relative;color:inherit}
button.tile:hover{border-color:var(--accent)}
button.tile:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.tile .m{display:flex;flex-wrap:wrap;gap:4px 10px}
.tile .m-ev{color:var(--accent)}
.tile .m-fr{color:var(--warn)}
.tile .m2{color:var(--dim);font-size:11px;margin-top:4px}
.tile svg.tl{margin:7px 0 3px;display:block}

/* The artifact gallery: figures, click to enlarge. */
.grid.gallery{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
.grid.gallery .tile img{width:100%;height:auto;border-radius:5px;background:#fff}

/* The record table. 925 rows, so the head stays put while you scroll. */
table.record th{position:sticky;top:0;background:var(--bg);z-index:1}
table.record td.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:11.5px;color:var(--dim)}

/* --- the viewer ----------------------------------------------------------
   Full-screen, and built for a phone first: the stage takes the height that is
   left after the bar, strip and filmstrip, rather than the video setting the
   page height and pushing the controls off-screen. */
html.lb-open,html.lb-open body{overflow:hidden}
.lb{position:fixed;inset:0;z-index:60;background:rgba(9,11,16,.94);
  display:flex;flex-direction:column;padding:10px;gap:8px}
.lb[hidden]{display:none}
.lb-bar{display:flex;align-items:center;gap:12px;flex:0 0 auto}
.lb-id{display:flex;flex-wrap:wrap;align-items:baseline;gap:5px 12px;font-size:13.5px;
  min-width:0}
.lb-meta{color:var(--muted);font-size:12px;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.lb-pos{color:var(--accent);font-variant-numeric:tabular-nums;font-size:12.5px}
.lb-x{margin-left:auto;background:none;border:0;color:var(--muted);font-size:26px;
  line-height:1;cursor:pointer;padding:0 6px;flex:0 0 auto}
.lb-x:hover{color:var(--fg)}

.lb-stage{flex:1 1 auto;min-height:0;display:flex;align-items:center;gap:8px}
.lb-v{flex:1 1 auto;min-width:0;max-width:100%;height:100%;object-fit:contain;
  border-radius:6px;background:#fff}
.lb-nav{flex:0 0 auto;background:rgba(20,24,34,.8);border:1px solid var(--line);
  color:var(--muted);font-size:24px;line-height:1;border-radius:8px;cursor:pointer;
  padding:14px 10px}
.lb-nav:hover{color:var(--fg);border-color:var(--accent)}

/* The segment strip: which component label is playing, never how long it ran. */
.lb-tl{display:flex;gap:3px;flex:0 0 auto}
.lb-tl[hidden]{display:none}
.lb-seg{flex:1;text-align:center;font-size:11.5px;font-weight:600;padding:3px 0;
  border-radius:4px;border:1px solid currentColor}
.lb-s0{color:#6aa9ff}.lb-s1{color:#5fd08a}.lb-s2{color:#f5b544}
.lb-s3{color:#f2777a}.lb-s4{color:#98a2b3}

/* The filmstrip scrolls itself; the page behind it never does. */
.lb-film{flex:0 0 auto;display:flex;gap:6px;overflow-x:auto;overscroll-behavior-x:contain;
  padding-bottom:2px}
.lb-th{flex:0 0 auto;width:62px;background:var(--panel);border:1px solid var(--line);
  border-radius:6px;padding:3px;cursor:pointer;position:relative;font:inherit}
.lb-th.on{border-color:var(--accent)}
.lb-th img{width:100%;height:38px;object-fit:cover;border-radius:3px;background:#fff;
  display:block}
.lb-th span{position:absolute;right:3px;bottom:3px;font-size:9.5px;color:var(--muted);
  background:rgba(9,11,16,.75);border-radius:3px;padding:0 3px}

.lb-foot{flex:0 0 auto;display:flex;align-items:center;gap:12px;font-size:12px;
  color:var(--muted)}
.lb-where{flex:1;text-align:center}
.lb-step{background:var(--panel);border:1px solid var(--line);color:var(--muted);
  border-radius:7px;padding:6px 11px;cursor:pointer;font:inherit;font-size:12px}
.lb-step:hover{color:var(--fg);border-color:var(--accent)}

@media (max-width:760px){
  /* The side arrows eat a third of a 339px viewport, and swipe already does
     the job. Keep them reachable on desktop, drop them on a phone. */
  .lb-nav{display:none}
  .lb{padding:8px}
  .lb-th{width:52px}
  .grid.tiles{grid-template-columns:repeat(auto-fill,minmax(118px,1fr))}
  .grid.tiles .tile{grid-column:span min(var(--span,1),2)}
  .figrow{grid-template-columns:1fr}
}
.lb-full{color:var(--accent);font-size:12px;white-space:nowrap}
.lb-full[hidden]{display:none}
