:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:#1d2a3c;background:#f5f7fb;font-size:14px;line-height:1.6;--blue:#275bc4;--border:#dce3ee;--muted:#68788c;--danger:#b12e39}
.delete-warning{color:#a51e2c;background:#fff1f2;border:2px solid #c42c3c;border-radius:9px;padding:16px;margin-bottom:18px;font-size:16px;font-weight:650}.delete-warning strong{display:block;font-size:21px;margin-bottom:10px}.delete-warning p:last-child{margin-bottom:0}button.delete-button{color:white;background:#b42332;border-color:#b42332;font-weight:650}button.delete-button:hover{background:#8f1b27}
.picker-actions{margin-bottom:18px}.directory-list{margin-top:16px}.directory-list button{max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:left}
.scan-progress{margin:18px 0}.scan-progress progress{display:block;width:100%;height:22px;accent-color:var(--blue);margin-bottom:12px}
.password-field{display:flex;flex-direction:column;gap:6px;margin-bottom:14px;font-weight:500;min-width:0}
.password-field>label{margin:0}
.password-control{display:block;position:relative;width:100%;min-width:0}
.password-control>input{padding-right:48px}
.password-control>input::-ms-reveal{display:none}
.password-control>.password-toggle{position:absolute;right:4px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:8px;border:0;border-radius:6px;background:transparent;color:var(--muted)}
.password-control>.password-toggle:hover{background:#edf2fc;color:var(--blue)}
.password-toggle svg{display:block;width:20px;height:20px;pointer-events:none}
.viewer-toolbar{flex-wrap:wrap;align-items:center}
.viewer-toolbar .actions{gap:6px;min-width:0}
.viewer-toolbar select{width:auto;max-width:100%;min-width:104px;padding:4px 8px}
.viewer-toolbar button{padding:4px 9px}
.viewer-toolbar .viewer-height{display:flex;flex-direction:row;align-items:center;gap:4px;margin:0;font-weight:400;white-space:nowrap}
.viewer-toolbar .viewer-height input{width:62px;padding:4px 6px}
.viewer .image-pair.single{grid-template-columns:minmax(0,1fr)}
.viewer .image-pane canvas{height:70vh;user-select:none;-webkit-user-select:none}
.viewer .image-pane canvas.dragging{cursor:grabbing}
.viewer .image-pane canvas:focus-visible{outline:2px solid #82a8f3;outline-offset:-2px}
.viewer .viewer-status{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:34px}
.viewer .viewer-status button{padding:3px 10px;flex-shrink:0}
*{box-sizing:border-box}body{margin:0}a{color:var(--blue);text-decoration:none}button,input,select,textarea{font:inherit}button{border:1px solid var(--border);border-radius:8px;background:white;color:#263a54;padding:8px 14px;cursor:pointer;white-space:nowrap;transition:background .12s}button:hover{background:#edf2fc}button:disabled{cursor:not-allowed;opacity:.48}button.primary{background:var(--blue);border-color:var(--blue);color:white}button.primary:hover{background:#1947a6}button.quiet{border-color:transparent;background:transparent}.danger{color:var(--danger)!important}.full{width:100%}input,select,textarea{width:100%;padding:9px 11px;border:1px solid #cbd5e2;border-radius:7px;background:white;color:#172942}textarea{resize:vertical;min-height:78px}input[type=checkbox],input[type=radio]{width:auto;accent-color:var(--blue)}label{display:flex;flex-direction:column;gap:6px;font-weight:500;margin-bottom:14px}label.inline{display:inline-flex;flex-direction:row;align-items:center;gap:8px;margin:0 16px 8px 0}input:focus,textarea:focus,select:focus,button:focus-visible{outline:2px solid #82a8f3;outline-offset:2px}h1,h2,h3,p{margin-top:0}h1{font-size:25px;line-height:1.35;margin-bottom:7px;font-weight:650}h2{font-size:20px;margin-bottom:12px}h3{font-size:16px;margin-bottom:10px}p{margin-bottom:12px}.muted{color:var(--muted)}.eyebrow{display:block;color:var(--muted);font-size:12px;font-weight:600;letter-spacing:.08em;margin-bottom:7px}.topbar{height:68px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;background:white;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:10}.brand{font-size:20px;font-weight:700;color:#1c3455}.brand span{font-size:13px;font-weight:400;color:var(--muted);padding-left:12px}.account{display:flex;align-items:center;gap:16px}.account button{padding:5px 8px}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.card{border:1px solid var(--border);border-radius:12px;background:white;padding:22px;margin-bottom:18px;box-shadow:0 3px 10px #23334d04}.badge{display:inline-block;border-radius:6px;padding:3px 8px;background:#edf2fc;color:#355b96;font-size:12px;white-space:nowrap}.badge.good{background:#e7f5ed;color:#247448}.badge.bad{background:#fdeef0;color:#a33342}.notice{background:#eef4ff;border:1px solid #cddcf6;border-radius:9px;padding:12px 16px;margin-bottom:16px;white-space:pre-wrap}.error{color:var(--danger);white-space:pre-wrap}.notice.error{background:#fff2f3;border-color:#f3cdd1}.empty{text-align:center;padding:64px 24px;color:var(--muted)}#toast{position:fixed;right:24px;top:80px;max-width:480px;z-index:100;background:#193655;color:white;padding:13px 20px;border-radius:9px;box-shadow:0 6px 24px #17345333;white-space:pre-wrap}.login-page{min-height:calc(100vh - 68px);max-width:1060px;margin:auto;display:grid;grid-template-columns:1.3fr 1fr;gap:100px;align-items:center;padding:70px 32px}.login-intro h1{font-size:42px;line-height:1.35;letter-spacing:-.03em;margin:20px 0}.login-intro p{line-height:2;color:var(--muted)}.intro-pills{display:flex;gap:10px;margin-top:32px}.intro-pills span{padding:7px 12px;background:#e9eff9;border-radius:30px;color:#45617e}.login-card{padding:32px}.login-card .muted{margin-bottom:25px}.annotation-page{padding:22px 28px;max-width:1800px;margin:auto}.viewer{border:1px solid var(--border);border-radius:12px;overflow:hidden;background:#101923;margin-bottom:17px}.viewer-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;background:white;padding:10px 16px}.viewer-toolbar .muted{font-size:12px}.image-pair{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:#35414e}.image-pane{min-width:0;position:relative;background:#101923}.image-title{display:block;padding:7px 14px;color:#e2e8f3;background:#1b2633;font-size:12px}.image-pane canvas{display:block;width:100%;height:50vh;cursor:grab;touch-action:none}.image-pane canvas:active{cursor:grabbing}.viewer-status{font-size:12px;color:#c8d3e4;padding:7px 14px;min-height:30px}.annotation-form{padding:20px 24px}.conclusion-options{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:17px}.conclusion-options label{border:1px solid var(--border);border-radius:9px;padding:11px 18px;margin:0;display:flex;flex-direction:row;align-items:center;gap:8px}.conclusion-options label:has(input:checked){border-color:var(--blue);background:#edf3ff;color:var(--blue)}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.form-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid var(--border);padding-top:15px;margin-top:14px}.bottom-actions{display:flex;align-items:center;gap:12px;margin-top:12px}.bottom-actions span{font-size:12px}.readonly-banner{padding:10px 14px;background:#fff6e5;color:#88601b;border-radius:7px;margin-bottom:15px}.admin-layout{display:grid;grid-template-columns:208px 1fr;min-height:calc(100vh - 68px)}.sidebar{background:white;border-right:1px solid var(--border);padding:26px 18px;position:sticky;top:68px;height:calc(100vh - 68px)}.sidebar nav{display:flex;flex-direction:column;gap:6px}.sidebar nav button{text-align:left;border:0;padding:11px 14px;background:transparent}.sidebar nav button.active{background:#eaf1ff;color:var(--blue);font-weight:600}.sidebar-note{color:#91a0b3;font-size:12px;line-height:2;margin:38px 12px}.admin-main{padding:26px 32px;min-width:0}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:16px;margin-bottom:22px}.metric{background:white;border:1px solid var(--border);border-radius:10px;padding:20px}.metric strong{display:block;font-size:31px;margin-top:6px;line-height:1.2}.metric small{color:var(--muted)}.table-wrap{overflow:auto;border:1px solid var(--border);border-radius:10px;background:white;margin:14px 0}table{border-collapse:collapse;width:100%;font-size:13px}th{text-align:left;background:#f8faff;color:#62738b;font-weight:600;white-space:nowrap}td,th{padding:12px 15px;border-bottom:1px solid #e8edf5;vertical-align:top}tbody tr:last-child td{border-bottom:0}td{max-width:420px;word-break:break-word}td button{padding:4px 9px;font-size:12px;margin:0 4px 4px 0}.filters{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end}.filters label{min-width:150px;max-width:250px;flex:1}.filters button{margin-bottom:14px}.split{display:grid;grid-template-columns:1fr 1fr;gap:20px}.field-help{display:block;color:var(--muted);font-weight:400;font-size:12px}.pagination{display:flex;justify-content:center;margin:18px 0}.compact{font-size:12px}.break{word-break:break-all}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;background:#f4f7fb;border:1px solid var(--border);border-radius:7px;padding:14px;max-height:360px;overflow:auto}details{margin:12px 0}summary{cursor:pointer;color:#476587}dialog{border:1px solid var(--border);border-radius:13px;padding:0;width:min(640px,94vw);max-height:92vh;color:inherit;box-shadow:0 18px 90px #0f213b40}dialog.wide{width:min(1450px,96vw)}dialog::backdrop{background:#12223c66}dialog .dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:17px 22px;border-bottom:1px solid var(--border);position:sticky;top:0;background:white;z-index:3}dialog .dialog-heading h2{margin:0}dialog .dialog-body{padding:22px}.history-item{display:flex;justify-content:space-between;align-items:center;padding:13px 0;border-bottom:1px solid var(--border);gap:12px}.history-item small{display:block;color:var(--muted)}.history-item button{text-align:left;white-space:normal}.grade-counts{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.grade-counts label{background:#f7f9fd;border:1px solid var(--border);padding:13px;border-radius:8px}.check-list{max-height:240px;overflow:auto;margin-bottom:16px;padding:10px;border:1px solid var(--border);border-radius:8px}.check-list label{display:flex;flex-direction:row;gap:9px;align-items:center;margin:7px 0}.timeline{border-left:2px solid #dce6f5;padding-left:18px;margin:14px 0}.timeline article{padding:0 0 17px}.timeline p{margin-bottom:3px}.status-line{display:flex;gap:12px;align-items:center;padding:9px 0}.spinner-text{color:var(--muted);padding:24px}fieldset{border:0;padding:0;margin:0;min-width:0}[hidden]{display:none!important}@media(max-width:1050px){.metric-grid{grid-template-columns:repeat(2,1fr)}.account{gap:8px}.admin-main{padding:22px 18px}.login-page{gap:36px}.annotation-page{padding:18px}.page-heading{align-items:flex-start}.bottom-actions{flex-wrap:wrap}.admin-layout{grid-template-columns:180px 1fr}.split{grid-template-columns:1fr}}@media(max-width:760px){.login-page{grid-template-columns:1fr}.login-intro{display:none}.admin-layout{display:block}.sidebar{position:static;height:auto}.sidebar nav{flex-direction:row;flex-wrap:wrap}.sidebar-note{display:none}.topbar{padding:0 12px}.brand span{display:none}.form-grid{grid-template-columns:1fr}.page-heading{flex-direction:column}.grade-counts{grid-template-columns:1fr}.account{font-size:12px}}

/* Keep a small, clearly labelled last frame while the committed next pair decodes. */
.image-pair{position:relative}
.viewer-transition{position:absolute;inset:0;z-index:2;background:#101923;pointer-events:none;overflow:hidden}
.viewer-transition-frames{display:flex;width:100%;height:100%;gap:8px}
.viewer-transition-frames canvas{flex:1;width:0;min-width:0;height:100%;object-fit:contain}
.viewer-transition-caption{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);padding:8px 14px;border-radius:8px;background:#172332e8;color:#edf4ff;text-align:center;max-width:90%;width:max-content}

.annotation-choice-row{display:flex;align-items:flex-start;flex-wrap:wrap;gap:12px;margin-bottom:17px}
.annotation-choice-row>.primary{flex:0 0 auto;min-width:104px;padding:6.4px 18px}
.annotation-choice-row .conclusion-options label{padding:6.4px 18px}
.annotation-choice-row>.conclusion-fields{flex:1 1 520px;min-width:0}
.annotation-choice-row .conclusion-options{margin-bottom:0}
.annotation-form>.error:empty{display:none}
.annotation-combinations{display:flex;flex-direction:column;gap:8px;max-width:800px}
.annotation-combo-row{display:grid;grid-template-columns:96px repeat(3,minmax(0,1fr));align-items:center;gap:8px}
.annotation-combo-row>strong{font-size:13px;font-weight:600}
.annotation-choice-row .annotation-choice{padding:6.4px 12px;white-space:normal}
.annotation-choice[aria-pressed="true"]{border-color:var(--blue);background:#edf3ff;color:var(--blue);box-shadow:inset 0 0 0 1px var(--blue)}
.annotation-choice kbd{display:inline-block;margin-right:7px;font:600 12px ui-monospace,monospace;opacity:.8}
.annotation-extra-choices{display:flex;flex-wrap:wrap;gap:8px;margin-left:104px}
.annotation-reasons>div{margin-top:12px}
@media(max-width:560px){.annotation-combo-row{grid-template-columns:repeat(3,minmax(0,1fr))}.annotation-combo-row>strong{grid-column:1/-1}.annotation-extra-choices{margin-left:0}.annotation-choice-row .annotation-choice{padding:6.4px 7px}}

.prefetch-status{margin:14px 0 0;padding:10px 14px;border:1px solid var(--border);border-radius:10px;background:#fff}
.prefetch-heading,.prefetch-sides{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 18px}
.prefetch-status progress{display:block;width:100%;height:8px;margin:8px 0;accent-color:var(--blue)}
.prefetch-status progress[hidden],.prefetch-sides[hidden]{display:none}
.prefetch-sides{font-size:12px;justify-content:flex-start}
.prefetch-status.is-complete{border-color:#b9ddcb;background:#f6fcf8}
.prefetch-status.is-complete progress{accent-color:#278254}

dialog.history-dialog{width:min(1000px,96vw)}
.history-item.with-thumbnails{display:grid;grid-template-columns:144px minmax(0,1fr);align-items:center;gap:18px}
.history-thumbnails{display:flex;gap:8px}
.history-thumbnail{display:block;padding:0;border:1px solid var(--border);border-radius:8px;overflow:hidden;width:144px;flex:none}
.history-thumbnail .thumbnail-frame{position:relative;display:flex;align-items:center;justify-content:center;width:142px;height:108px;background:#eef2f7;overflow:hidden}
.history-thumbnail img{width:142px;height:108px;object-fit:contain;display:block}
.history-thumbnail .thumbnail-placeholder{font-size:12px;color:var(--muted)}
.history-thumbnail small{padding:4px 6px;font-size:11px;text-align:center}
.history-description{min-width:0}
.history-description>button{max-width:100%;overflow-wrap:anywhere}
.history-description>small{margin:6px 0}
.history-description .actions{flex-wrap:wrap}
.sidebar{overflow-y:auto}
@media(max-width:640px){.history-item.with-thumbnails{grid-template-columns:minmax(0,1fr);gap:8px}}


/* Shared canvas heights use static rules, including under the site's strict CSP. */
.viewer[data-viewer-height="20"] .image-pane canvas{height:20vh}
.viewer[data-viewer-height="21"] .image-pane canvas{height:21vh}
.viewer[data-viewer-height="22"] .image-pane canvas{height:22vh}
.viewer[data-viewer-height="23"] .image-pane canvas{height:23vh}
.viewer[data-viewer-height="24"] .image-pane canvas{height:24vh}
.viewer[data-viewer-height="25"] .image-pane canvas{height:25vh}
.viewer[data-viewer-height="26"] .image-pane canvas{height:26vh}
.viewer[data-viewer-height="27"] .image-pane canvas{height:27vh}
.viewer[data-viewer-height="28"] .image-pane canvas{height:28vh}
.viewer[data-viewer-height="29"] .image-pane canvas{height:29vh}
.viewer[data-viewer-height="30"] .image-pane canvas{height:30vh}
.viewer[data-viewer-height="31"] .image-pane canvas{height:31vh}
.viewer[data-viewer-height="32"] .image-pane canvas{height:32vh}
.viewer[data-viewer-height="33"] .image-pane canvas{height:33vh}
.viewer[data-viewer-height="34"] .image-pane canvas{height:34vh}
.viewer[data-viewer-height="35"] .image-pane canvas{height:35vh}
.viewer[data-viewer-height="36"] .image-pane canvas{height:36vh}
.viewer[data-viewer-height="37"] .image-pane canvas{height:37vh}
.viewer[data-viewer-height="38"] .image-pane canvas{height:38vh}
.viewer[data-viewer-height="39"] .image-pane canvas{height:39vh}
.viewer[data-viewer-height="40"] .image-pane canvas{height:40vh}
.viewer[data-viewer-height="41"] .image-pane canvas{height:41vh}
.viewer[data-viewer-height="42"] .image-pane canvas{height:42vh}
.viewer[data-viewer-height="43"] .image-pane canvas{height:43vh}
.viewer[data-viewer-height="44"] .image-pane canvas{height:44vh}
.viewer[data-viewer-height="45"] .image-pane canvas{height:45vh}
.viewer[data-viewer-height="46"] .image-pane canvas{height:46vh}
.viewer[data-viewer-height="47"] .image-pane canvas{height:47vh}
.viewer[data-viewer-height="48"] .image-pane canvas{height:48vh}
.viewer[data-viewer-height="49"] .image-pane canvas{height:49vh}
.viewer[data-viewer-height="50"] .image-pane canvas{height:50vh}
.viewer[data-viewer-height="51"] .image-pane canvas{height:51vh}
.viewer[data-viewer-height="52"] .image-pane canvas{height:52vh}
.viewer[data-viewer-height="53"] .image-pane canvas{height:53vh}
.viewer[data-viewer-height="54"] .image-pane canvas{height:54vh}
.viewer[data-viewer-height="55"] .image-pane canvas{height:55vh}
.viewer[data-viewer-height="56"] .image-pane canvas{height:56vh}
.viewer[data-viewer-height="57"] .image-pane canvas{height:57vh}
.viewer[data-viewer-height="58"] .image-pane canvas{height:58vh}
.viewer[data-viewer-height="59"] .image-pane canvas{height:59vh}
.viewer[data-viewer-height="60"] .image-pane canvas{height:60vh}
.viewer[data-viewer-height="61"] .image-pane canvas{height:61vh}
.viewer[data-viewer-height="62"] .image-pane canvas{height:62vh}
.viewer[data-viewer-height="63"] .image-pane canvas{height:63vh}
.viewer[data-viewer-height="64"] .image-pane canvas{height:64vh}
.viewer[data-viewer-height="65"] .image-pane canvas{height:65vh}
.viewer[data-viewer-height="66"] .image-pane canvas{height:66vh}
.viewer[data-viewer-height="67"] .image-pane canvas{height:67vh}
.viewer[data-viewer-height="68"] .image-pane canvas{height:68vh}
.viewer[data-viewer-height="69"] .image-pane canvas{height:69vh}
.viewer[data-viewer-height="70"] .image-pane canvas{height:70vh}
.viewer[data-viewer-height="71"] .image-pane canvas{height:71vh}
.viewer[data-viewer-height="72"] .image-pane canvas{height:72vh}
.viewer[data-viewer-height="73"] .image-pane canvas{height:73vh}
.viewer[data-viewer-height="74"] .image-pane canvas{height:74vh}
.viewer[data-viewer-height="75"] .image-pane canvas{height:75vh}
.viewer[data-viewer-height="76"] .image-pane canvas{height:76vh}
.viewer[data-viewer-height="77"] .image-pane canvas{height:77vh}
.viewer[data-viewer-height="78"] .image-pane canvas{height:78vh}
.viewer[data-viewer-height="79"] .image-pane canvas{height:79vh}
.viewer[data-viewer-height="80"] .image-pane canvas{height:80vh}
.viewer[data-viewer-height="81"] .image-pane canvas{height:81vh}
.viewer[data-viewer-height="82"] .image-pane canvas{height:82vh}
.viewer[data-viewer-height="83"] .image-pane canvas{height:83vh}
.viewer[data-viewer-height="84"] .image-pane canvas{height:84vh}
.viewer[data-viewer-height="85"] .image-pane canvas{height:85vh}
.viewer[data-viewer-height="86"] .image-pane canvas{height:86vh}
.viewer[data-viewer-height="87"] .image-pane canvas{height:87vh}
.viewer[data-viewer-height="88"] .image-pane canvas{height:88vh}
.viewer[data-viewer-height="89"] .image-pane canvas{height:89vh}
.viewer[data-viewer-height="90"] .image-pane canvas{height:90vh}

.history-controls,.history-page-form,.history-pagination{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.history-controls{margin:12px 0}
.history-page-form{margin:0}
.history-page-form label{display:flex;flex-direction:row;align-items:center;gap:6px;margin:0}
.history-page-form input{width:88px;padding:5px 7px}
.history-page-form button,.history-controls>button,.history-pagination button{padding:5px 10px}
.history-pagination{margin:12px 0}

.annotation-heading{display:grid;grid-template-columns:minmax(150px,220px) minmax(0,1fr) auto;align-items:center;gap:12px;margin-bottom:12px}
.annotation-title,.annotation-viewer-controls{min-width:0}
.annotation-title .eyebrow{margin-bottom:2px}
.annotation-title h1{margin-bottom:3px;overflow-wrap:anywhere}
.annotation-title #work-caption{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.annotation-viewer-controls:empty{display:none}
.annotation-viewer-controls .viewer-toolbar{padding:0;background:transparent;justify-content:center}
.annotation-viewer-controls .actions{justify-content:center}
.annotation-navigation{justify-content:flex-end;max-width:500px}
.annotation-heading:has(.annotation-viewer-controls:empty){grid-template-columns:minmax(0,1fr) auto}
@media(max-width:1320px){
  .annotation-heading{grid-template-columns:minmax(0,1fr) auto}
  .annotation-title{grid-column:1;grid-row:1}
  .annotation-navigation{grid-column:2;grid-row:1}
  .annotation-viewer-controls{grid-column:1 / -1;grid-row:2}
  .annotation-viewer-controls .viewer-toolbar,.annotation-viewer-controls .actions{justify-content:flex-start}
}
@media(max-width:760px){
  .annotation-heading,.annotation-heading:has(.annotation-viewer-controls:empty){grid-template-columns:minmax(0,1fr)}
  .annotation-title{grid-column:1;grid-row:1}
  .annotation-viewer-controls{grid-column:1;grid-row:2}
  .annotation-navigation{grid-column:1;grid-row:3;justify-content:flex-start;max-width:none}
}
