/* The admin review page. The look is the shared design system (shared/design.css and components.css); this file is only
   what the review adds: tabs, findings, the differences surface. No inline style, no external font: the CSP allows
   'self' only. */
.container.wide { max-width: 80rem; }
.tabs { display: flex; flex-wrap: wrap; gap: var(--s1); margin: 0 0 var(--s5); padding: var(--s1); background: var(--surface-3); border-radius: var(--radius); width: fit-content; max-width: 100%; }
.tab { font: inherit; font-weight: 600; font-size: var(--fs-sm); padding: 0.5rem 1rem; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-2); cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.table td[data-label="Name"] { font-weight: 600; min-width: 9rem; }
.finding { padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.finding > * + * { margin-top: var(--s2); }
.quote { font-family: var(--mono); font-size: var(--fs-xs); white-space: pre-wrap; color: var(--text-2); }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: var(--s3); }
.filters .field, .row .field { margin: 0; }

/* the differences surface */
.cell { padding: var(--s4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.cell.differs { border-left: 5px solid var(--warn-line); }
.cell > * + * { margin-top: var(--s3); }
.printed { white-space: pre-wrap; font-weight: 600; font-size: var(--fs-lg); }
.part { padding: var(--s3); border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.part > * + * { margin-top: var(--s2); }
.segs { line-height: 1.9; }
.span-block > * + * { margin-top: var(--s1); }
.lines { font-family: var(--mono); font-size: 0.78rem; line-height: 1.5; white-space: pre-wrap; overflow-x: auto; margin: 0; border-radius: 4px; }
.lines .n { color: var(--text-2); display: inline-block; width: 3rem; user-select: none; }
.lines .cited { background: var(--mark); color: var(--text); }
.lines .near { color: var(--text-2); }
.seg-same { background: var(--ok-bg); color: var(--ok-fg); border-radius: 3px; padding: 0 2px; }
.seg-left-out { background: var(--bad-bg); color: var(--bad-fg); text-decoration: line-through; border-radius: 3px; padding: 0 2px; font-weight: 600; }
.seg-context { color: var(--text-2); }
.legend { margin: 0; }
.hash { display: block; margin-top: var(--s1); padding: var(--s2) var(--s3); background: var(--surface-3); border-radius: var(--radius-sm); word-break: break-all; font-size: var(--fs-xs); }
@media (max-width: 720px) { .tabs { width: 100%; } .tab { flex: 1 1 auto; } }

.row.bottom { align-items: flex-end; }
.row.end { justify-content: flex-end; }
@media (max-width: 560px) { .brand .chip { display: none; } }

/* the page viewer beside a cited span: the picture is a canvas, the cited lines an SVG over it (no inline style anywhere) */
.pv { display: grid; gap: var(--s2); justify-items: start; }
.pv-panel { display: grid; gap: var(--s2); width: 100%; padding: var(--s3); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.pv-tools { display: flex; flex-wrap: wrap; gap: var(--s2); }
.pv-scroll { overflow: auto; max-height: 75vh; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-3); }
.pv-stage { position: relative; }
.pv-z1 { width: 100%; }
.pv-z2 { width: 150%; }
.pv-z3 { width: 225%; }
.pv-z4 { width: 340%; }
.pv-canvas { display: block; width: 100%; height: auto; background: #fff; }
.pv-overlay { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.pv-box { fill: var(--warn-line); fill-opacity: 0.25; stroke: var(--warn-fg); stroke-width: 2; vector-effect: non-scaling-stroke; }
