/* Increment review page. Tokens, type and controls match identity.css (the deck). */
:root{color-scheme:dark light;--bg:#0f0f11;--card:#1a1a1e;--elev:#26262c;--border:#34343c;--text:#f2f2f4;--sec:#a0a0a8;--tint:#73a5ff;--good:#54d781;--bad:#ff756d;--warn:#e5bd60;--alt:#c79bff}
@media(prefers-color-scheme:light){:root{--bg:#f3f3f6;--card:#fff;--elev:#ededf1;--border:#dcdce2;--text:#18181c;--sec:#686873;--tint:#2866d3;--good:#187b44;--bad:#c43d36;--warn:#946b14;--alt:#7a3fc4}}
*{box-sizing:border-box}[hidden]{display:none!important}
body{margin:0;background:var(--bg);color:var(--text);font:14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button{cursor:pointer;border:0;background:none;color:inherit}button:disabled{opacity:.4;cursor:default}
button:focus-visible,a:focus-visible{outline:3px solid var(--tint);outline-offset:3px}input:focus,select:focus{outline:2px solid var(--tint);outline-offset:1px}
a{color:var(--tint);text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3,p{margin:0}
input,select{min-width:0;color:var(--text);background:var(--elev);border:1px solid var(--border);border-radius:8px;padding:9px 11px}input{width:100%}
label{font-size:12px;color:var(--sec);font-weight:600}
kbd{font:11px ui-monospace,monospace;border:1px solid var(--border);border-radius:4px;padding:1px 4px}
.muted{color:var(--sec);font-size:12px}.spacer{flex:1}
.ghost,.primary{padding:9px 13px;border-radius:9px;background:var(--elev);font-size:12px;font-weight:600}.primary{background:#367be5;color:#fff}
.textact{padding:6px 8px;border-radius:7px;color:var(--sec);font-size:12px;font-weight:600}.textact:hover{background:var(--elev)}
.empty{display:flex;min-height:180px;align-items:center;justify-content:center;text-align:center;padding:30px;color:var(--sec)}
.identity-login{max-width:360px;margin:12vh auto;padding:24px;border:1px solid var(--border);border-radius:14px;background:var(--card)}.identity-login h1{font-size:18px}.identity-login p{font-size:13px;color:var(--sec);margin:8px 0 20px}.identity-login button{margin-top:12px}#reviewLoginError{color:var(--bad);font-size:12px;margin-top:8px}
dialog{background:var(--card);color:var(--text);border:1px solid var(--border);border-radius:16px;padding:20px;width:min(1000px,calc(100vw - 24px));max-height:90dvh;box-shadow:0 24px 90px #0005;text-align:right}dialog::backdrop{background:#0007;backdrop-filter:blur(4px)}
.zoom-dialog img,.zoom-dialog canvas{max-width:100%;height:72dvh;object-fit:contain;display:block;margin:12px auto}.zoom-dialog p{text-align:center;overflow-wrap:anywhere}

/* Page frame: a scrolling list with a sticky header (the deck is one card per screen). */
.rv-wrap{max-width:1380px;margin:auto;padding:0 28px 12px;min-height:100dvh;display:flex;flex-direction:column}
.rv-top{position:sticky;top:0;z-index:5;background:var(--bg);padding:20px 0 10px;display:flex;flex-direction:column;gap:10px;border-bottom:1px solid var(--border)}
.topbar,.topbar>div{display:flex;align-items:center;gap:12px}.topbar{justify-content:space-between;flex-wrap:wrap}
.brand{font-size:18px;font-weight:750;color:var(--text)}.divider{color:var(--border);font-size:22px}.topbar h1{font-size:15px;font-weight:500}
.run-label{display:flex;align-items:center;gap:6px;min-width:0}.run-label select{padding:5px 8px;font-size:12px;max-width:260px}
.rv-filter{display:flex;gap:4px}.rv-filter button{padding:6px 12px;border-radius:8px;color:var(--sec);font-size:12px;font-weight:650}.rv-filter button[aria-pressed="true"]{background:var(--elev);color:var(--text);box-shadow:inset 0 -2px var(--tint)}.rv-filter span{font-variant-numeric:tabular-nums;color:var(--sec);margin-left:2px}
.rv-sections{display:flex;align-items:center;gap:6px 14px;flex-wrap:wrap;font-size:12px;color:var(--sec)}
.rv-sections a.rv-jump{color:var(--text);font-weight:600;padding:4px 8px;border-radius:7px;background:var(--card);border:1px solid var(--border)}.rv-sections a.rv-jump:hover{text-decoration:none;border-color:var(--tint)}
.rv-sections .count{font-variant-numeric:tabular-nums;color:var(--warn);margin-left:4px}.rv-sections .count.done{color:var(--good)}
.rv-sections .deck-link{color:var(--tint);font-weight:600}
.rv-banner{font-size:12px;padding:8px 12px;border-radius:9px;border:1px solid var(--warn);color:var(--warn);background:var(--card)}.rv-banner.error{border-color:var(--bad);color:var(--bad)}.rv-banner button{margin-left:8px}
.rv-main{flex:1;display:flex;flex-direction:column;gap:26px;padding:18px 0 30px}
.statusbar{position:sticky;bottom:0;min-height:30px;display:flex;align-items:center;gap:8px;font-size:12px;color:var(--sec);background:var(--bg);border-top:1px solid var(--border);padding:4px 0}.statusbar .error{color:var(--bad)}.shortcut-help{font-size:10px;white-space:nowrap}

/* Sections */
.rv-section{display:flex;flex-direction:column;gap:12px;scroll-margin-top:150px}
.rv-section-head{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}.rv-section-head h2{font-size:19px}.rv-section-head p{color:var(--sec);font-size:12px;flex:1;min-width:240px}
.rv-section-head .tally{font-size:12px;color:var(--sec);font-variant-numeric:tabular-nums}
.rv-list{display:flex;flex-direction:column;gap:12px}.rv-list.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}
.rv-none{color:var(--sec);font-size:13px;padding:16px;border:1px dashed var(--border);border-radius:12px;text-align:center}

/* Cards */
.rv-card{border:1px solid var(--border);border-radius:16px;background:var(--card);display:flex;flex-direction:column;min-width:0;scroll-margin:160px 0 60px}
.rv-card.focused{border-color:var(--tint);box-shadow:0 0 0 1px var(--tint)}
.rv-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 18px;border-bottom:1px solid var(--border)}
.rv-card-head .eyebrow{font-size:11px;letter-spacing:.06em;text-transform:uppercase;font-weight:650;color:var(--sec);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rv-card-head .links{display:flex;gap:10px;flex:none;font-size:12px}
.rv-state{font-size:12px;font-weight:650;color:var(--warn);white-space:nowrap}.rv-card.decided .rv-state{color:var(--good)}.rv-card.decided.negative .rv-state{color:var(--bad)}
.rv-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:18px;padding:16px 18px}
.rv-media{display:flex;gap:12px;min-width:0}
.rv-figure{margin:0;flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
.rv-figure .photo-label{font-size:12px;color:var(--sec);font-weight:600;display:flex;justify-content:space-between;gap:6px;min-height:18px}.rv-figure .photo-label span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rv-stage{height:300px;display:flex;align-items:center;justify-content:center;background:var(--bg);border-radius:12px;overflow:hidden;padding:8px}
.rv-stage>button{width:100%;height:100%;padding:0;display:flex;align-items:center;justify-content:center}
.rv-stage canvas,.rv-stage img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;display:block}
.rv-stage canvas{width:100%;height:100%}
.rv-stage .muted{text-align:center;padding:12px;max-width:240px}
.rv-figure figcaption{font-size:11px;color:var(--sec);text-align:center;min-height:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rv-info{min-width:0;display:flex;flex-direction:column;gap:10px}
.rv-title{font-size:20px;line-height:1.25;letter-spacing:-.02em;overflow-wrap:anywhere}
.rv-key{font:12px/1.5 ui-monospace,SFMono-Regular,monospace;color:var(--tint);overflow-wrap:anywhere;background:var(--bg);padding:8px 10px;border-radius:8px}
.rv-facts{display:flex;flex-wrap:wrap;gap:4px 16px;font-size:12px;color:var(--sec)}.rv-facts strong{color:var(--text);font-weight:650;font-variant-numeric:tabular-nums}
.rv-reasons{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:4px}.rv-reasons li{font-size:13px;color:var(--text);padding-left:14px;position:relative}.rv-reasons li::before{content:'';position:absolute;left:2px;top:.55em;width:6px;height:6px;border-radius:50%;background:var(--bad)}
.rv-chart{width:100%;height:auto;display:block;background:var(--bg);border-radius:10px}
.rv-chart text{fill:var(--sec);font:10px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.rv-chart .grid{stroke:var(--border);stroke-width:1}.rv-chart .since{stroke:var(--warn);stroke-dasharray:3 4;stroke-width:1}.rv-chart .median{stroke:var(--sec);stroke-dasharray:5 4;stroke-width:1}
.rv-chart path.line{fill:none;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}.rv-chart .dot{stroke:none}.rv-chart .range{stroke-width:2;stroke-linecap:round;opacity:.5}
.rv-chart .s-old{stroke:var(--sec);fill:var(--sec)}.rv-chart .s-new{stroke:var(--warn);fill:var(--warn)}.rv-chart .s-a{stroke:var(--tint);fill:var(--tint)}.rv-chart .s-b{stroke:var(--alt);fill:var(--alt)}
.rv-chart .bad{fill:var(--bad);stroke:var(--card);stroke-width:1.5}
.rv-legend{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:11px;color:var(--sec)}.rv-legend i{display:inline-block;width:10px;height:3px;border-radius:2px;margin-right:5px;vertical-align:middle;background:currentColor}
.rv-legend .k-old{color:var(--sec)}.rv-legend .k-new{color:var(--warn)}.rv-legend .k-a{color:var(--tint)}.rv-legend .k-b{color:var(--alt)}.rv-legend .k-bad{color:var(--bad)}.rv-legend .k-bad i{width:7px;height:7px;border-radius:50%}
.rv-legend span{color:var(--sec)}
.rv-strip{display:flex;gap:6px;overflow-x:auto;padding-bottom:4px;scrollbar-width:thin}
.rv-strip button,.rv-strip .chip{flex:0 0 58px;height:80px;border-radius:7px;background:var(--bg);padding:3px;display:flex;align-items:center;justify-content:center;position:relative}
.rv-strip canvas,.rv-strip img{max-width:100%;max-height:100%;width:auto;height:auto;display:block;object-fit:contain}
.rv-strip canvas{width:100%;height:100%}
.rv-strip .chip{font:9px/1.2 ui-monospace,monospace;color:var(--sec);overflow-wrap:anywhere;text-align:center;padding:4px;flex-basis:76px}
.rv-strip .more{flex:0 0 auto;height:80px;display:flex;align-items:center;font-size:11px;color:var(--sec);padding:0 6px}
.rv-strip .new{box-shadow:inset 0 -3px var(--warn)}
.rv-foot{display:flex;align-items:center;gap:14px;padding:12px 18px;border-top:1px solid var(--border)}
.rv-foot .rv-note{flex:1;min-width:0;font-size:12px;padding:8px 10px}
.rv-foot .help{font-size:11px;color:var(--sec);max-width:330px}
.decision-actions{display:flex;gap:8px;flex:none}
.decision{border:1px solid var(--border);background:var(--elev);border-radius:11px;padding:11px 18px;min-width:108px;font-weight:650;font-size:13px;white-space:nowrap}
.decision kbd{border:0;opacity:.55;margin-left:8px}
.decision.accept{color:var(--good)}.decision.reject{color:var(--bad)}
.decision[aria-pressed="true"].accept{background:var(--good);color:var(--card);border-color:transparent}
.decision[aria-pressed="true"].reject{background:var(--bad);color:var(--card);border-color:transparent}
.rv-card.saving .decision{opacity:.55;pointer-events:none}
.rv-clear{flex:none}

/* Merge cards: two live clusters side by side, the new cells under them. */
.rv-merge-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;padding:16px 18px}
.rv-side{min-width:0;display:flex;flex-direction:column;gap:8px;border:1px solid var(--border);border-radius:12px;padding:12px}
.rv-side.a{border-top:3px solid var(--tint)}.rv-side.b{border-top:3px solid var(--alt)}
.rv-side .rv-stage{height:260px}
.rv-side>p{overflow-wrap:anywhere}.rv-side h3{font-size:14px;margin:0;display:flex;justify-content:space-between;gap:8px;align-items:baseline}.rv-side h3 a{font-size:12px;font-weight:600;white-space:nowrap}
.rv-new{grid-column:1/-1;display:flex;flex-direction:column;gap:8px;border:1px solid var(--border);border-top:3px solid var(--warn);border-radius:12px;padding:12px}
.rv-new h3{font-size:14px;margin:0}
.rv-merge-chart{grid-column:1/-1;display:flex;flex-direction:column;gap:6px}

/* No-grid posters: compact cards in a grid. */
.rv-card.poster>.rv-stage{height:320px;padding:0;margin:10px 12px 0}.rv-card.poster .help{display:none}
.rv-card.poster .rv-stage img{width:100%;height:100%;object-fit:contain}
.rv-poster-body{padding:12px;display:flex;flex-direction:column;gap:8px}
.rv-poster-meta{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--sec)}.rv-poster-meta strong{color:var(--text)}
.rv-card.poster .rv-foot{flex-direction:column;align-items:stretch;gap:8px;padding:10px 12px}
.rv-card.poster .decision-actions{width:100%}.rv-card.poster .decision{flex:1;min-width:0;padding:10px 6px}
.rv-card.poster .rv-card-head{padding:10px 12px}

@media(max-width:1000px){.rv-body{grid-template-columns:minmax(0,1fr)}.rv-stage{height:260px}}
@media(max-width:900px){
  .rv-wrap{padding:0 12px 8px}.rv-top{padding-top:12px;gap:8px}.brand{font-size:16px}.topbar h1{font-size:13px}.topbar,.topbar>div{gap:8px}
  .rv-card-head{padding:10px 12px}.rv-body,.rv-merge-body{padding:12px;gap:12px}.rv-merge-body{grid-template-columns:minmax(0,1fr)}
  .rv-foot{flex-wrap:wrap;padding:10px 12px}.rv-foot .help{display:none}.decision-actions{width:100%}.decision{flex:1;min-width:0;padding:11px 6px}.decision kbd{display:none}
  .rv-title{font-size:17px}.shortcut-help{display:none}.rv-section{scroll-margin-top:190px}
}
@media(max-width:600px){
  /* Phones scroll the whole page: the header is not sticky, an empty status bar is hidden. */
  .rv-top{position:static}.rv-card,.rv-section{scroll-margin:12px 0}.statusbar:has(#actionStatus:empty){display:none}
  .rv-media{gap:8px}.rv-figure .photo-label span{white-space:normal}.rv-stage{height:200px;padding:4px}.rv-side .rv-stage{height:200px}.rv-card.poster .rv-stage{height:300px}
  .run-label{flex-basis:100%}.run-label select{flex:1;max-width:none}.rv-filter{flex-basis:100%}.rv-filter button{flex:1;padding:6px 4px}
  .rv-list.grid{grid-template-columns:1fr}.rv-card-head .links{gap:6px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
