:root{font-family:system-ui,-apple-system,sans-serif;color:#233836;background:#f4f6f4;font-size:16px;line-height:1.5;--green:#145b49;--line:#c9d4cf}*{box-sizing:border-box}body{margin:0}header{background:#123f35;color:white;display:flex;gap:2rem;align-items:center;padding:1rem 2rem;flex-wrap:wrap}header a{color:white}.brand{font-size:1.5rem;font-weight:800;text-decoration:none;white-space:nowrap}.brand span{font-weight:400}nav{display:flex;gap:1rem;flex-wrap:wrap}main{max-width:1500px;margin:auto;padding:2rem}footer{padding:2rem;color:#52625d}h1{font-size:2rem;margin:.3rem 0 1rem}h2{font-size:1.35rem}a{color:#125746}button,.button{display:inline-block;font:inherit;cursor:pointer;color:#173f34;background:#fff;border:1px solid #789087;border-radius:.35rem;padding:.5rem .8rem;text-decoration:none}button:hover,.button:hover{background:#e3ece7}.primary{background:var(--green);color:white;border-color:var(--green)}.primary:hover{background:#0c4637}input,select,textarea{font:inherit;padding:.5rem;border:1px solid #789087;border-radius:.25rem;max-width:100%;background:white;color:#233836}input[type=checkbox]{width:1.2rem;height:1.2rem}label{display:block}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #bd6900;outline-offset:3px}.skip{position:absolute;top:-100px}.skip:focus{top:0;background:white;padding:1rem;z-index:10}.heading{display:flex;justify-content:space-between;align-items:center;gap:1rem}.eyebrow{letter-spacing:.1em;font-size:.75rem;color:#52625d;font-weight:700}.filters,.bulk{display:flex;flex-wrap:wrap;align-items:end;gap:1rem;padding:1rem;background:#fff;border:1px solid var(--line);border-radius:.4rem;margin-bottom:1.2rem}.filters label:first-child{flex:1;min-width:15rem}.filters input:not([type=checkbox]){width:100%}.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:1rem}.card{background:white;border:1px solid var(--line);border-radius:.5rem;overflow:hidden}.selection{padding:.5rem}.thumb-link{height:220px;display:flex;align-items:center;justify-content:center;background:#e8ede9;overflow:hidden}.thumb-link img{max-width:100%;max-height:100%;object-fit:contain}.card-body{padding:1rem}.card p{margin:.4rem 0}.badge{display:inline-block;font-size:.8rem;padding:.15rem .4rem;background:#e6eee9;border-radius:.25rem;margin-right:.25rem}.attention{background:#fff0d2;color:#714300;padding:.35rem}.small{font-size:.85rem;color:#52625d}.detail{display:grid;grid-template-columns:1fr 1.1fr;gap:2rem}.document-image{overflow:hidden}.document-image img{max-width:100%;max-height:750px;object-fit:contain}.rot-90{transform:rotate(90deg)}.rot-180{transform:rotate(180deg)}.rot-270{transform:rotate(270deg)}dl{display:grid;grid-template-columns:10rem 1fr;gap:.5rem}dt{font-weight:600}dd{margin:0}.actions{display:flex;gap:.5rem;flex-wrap:wrap}.editor{max-width:850px;background:#fff;padding:1.5rem;border:1px solid var(--line)}.editor input:not([type=checkbox]),.editor select,.editor textarea{width:100%}.editor fieldset{border:1px solid var(--line);margin:1rem 0}table{border-collapse:collapse;width:100%;background:#fff}th,td{text-align:left;vertical-align:top;padding:.65rem;border-bottom:1px solid var(--line)}thead{background:#e3ebe5}caption{text-align:left;font-weight:600;padding:.7rem 0}.table-scroll{overflow:auto}.table-scroll input{min-width:5rem;width:6rem}.pagination{justify-content:center;margin:1.5rem}section{margin-bottom:1.5rem}details{background:white;border:1px solid var(--line);padding:.8rem;margin:.5rem 0}summary{cursor:pointer}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.8rem}.errorlist,#status.error{color:#9b2424;background:#fff0ef;padding:1rem}#status:not(:empty){padding:1rem;margin-bottom:1rem}.login{max-width:650px;margin:4rem auto;background:white;padding:3rem}.helptext{font-size:.85rem;color:#52625d}@media(max-width:850px){header{padding:1rem;gap:1rem}main{padding:1rem}.detail{grid-template-columns:1fr}.heading{align-items:start}.cards{grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}table{font-size:.9rem}}
:root{--shadow:0 8px 32px #123f3520}
[hidden]{display:none!important}
header nav a{padding:.4rem .25rem;text-decoration:none;border-bottom:3px solid transparent}
header nav a[aria-current=page]{border-color:#c8e9a7;font-weight:700}
.nav-menu{position:relative;margin:0;padding:.35rem .6rem;background:transparent;border-color:#91b0a5;color:white}
.nav-menu>div{position:absolute;z-index:30;right:0;min-width:210px;display:grid;background:#123f35;padding:1rem;box-shadow:var(--shadow)}
.nav-menu summary:focus-visible{outline:3px solid #ffda91}
.more-filters{flex-basis:100%;margin:0}.filter-fields{display:flex;flex-wrap:wrap;gap:1rem;padding-top:1rem}.filter-fields label{flex:1;min-width:180px}.filter-fields p{flex-basis:100%}
.filters select{max-width:260px}.filters{align-items:end}.filter-chips,.queue-shortcuts{display:flex;flex-wrap:wrap;gap:.5rem;margin:.75rem 0}
.filter-chip{font-size:.85rem;border-radius:2rem;background:#e6eee9}.queue-shortcuts button[aria-pressed=true]{background:var(--green);color:white}
.result-count{color:#52625d}.bulk{position:sticky;top:0;z-index:5;box-shadow:var(--shadow)}
.card:focus-within{outline:2px solid var(--green)}.card-body .actions{align-items:center;margin-top:.75rem}.selection:has(input:checked){background:#d4e8dc}
[data-results][aria-busy=true]{opacity:.65}
dialog{color:inherit;border:1px solid var(--line);border-radius:.65rem;padding:1.5rem;box-shadow:var(--shadow);max-height:92dvh;width:min(650px,94vw);max-width:94vw;overflow:auto}
dialog::backdrop{background:#102a25a8}body:has(dialog[open]){overflow:hidden}
#review-panel{width:min(1450px,96vw);max-width:96vw;padding:0}
.panel-toolbar{position:sticky;top:0;z-index:8;display:flex;align-items:center;flex-wrap:wrap;gap:.6rem;background:#edf4ef;border-bottom:1px solid var(--line);padding:.8rem 1.25rem}
.panel-toolbar h2{margin:0 auto 0 0}.panel-toolbar a{font-size:.9rem}#panel-content{padding:1.5rem}#panel-status:not(:empty){padding:1rem 1.5rem}
#action-dialog{z-index:50}#action-content label{margin:1rem 0}#action-content textarea,#action-content input[type=search]{width:100%}
.duplicate-candidates{max-height:45dvh;overflow:auto}.duplicate-choice{display:flex;gap:.75rem;align-items:center;padding:.6rem;border:1px solid var(--line);border-radius:.3rem}.duplicate-choice img{width:85px;height:100px;object-fit:contain}.duplicate-choice p{font-size:.85rem;margin:0}
.sticky-image{position:sticky;top:85px;align-self:start}.sticky-image img{max-height:65dvh;width:100%;object-fit:contain}.detail .editor{min-width:0;width:100%}
.save-bar{position:sticky;bottom:0;z-index:4;background:#edf4ef;border:1px solid var(--line);padding:1rem;display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.save-bar [data-dirty-status]{margin-right:auto}.editor .save-bar button{max-width:100%}
.profile-tabs{display:flex;gap:.35rem;flex-wrap:wrap;border-bottom:2px solid var(--line);padding-bottom:.6rem;margin:1.25rem 0}.profile-tabs [aria-selected=true]{background:var(--green);color:white}
[role=tabpanel]{background:white;padding:1.5rem;border:1px solid var(--line);border-radius:.4rem}
.marks-scroll{max-height:65dvh}.marks-scroll thead{position:sticky;top:0;z-index:3}.marks-scroll th:first-child{position:sticky;left:0;background:#e3ebe5;z-index:2;min-width:190px}.marks-scroll tr[data-changed] th{border-left:4px solid #bd6900}
.change-table td{max-width:35vw;overflow-wrap:anywhere}.change-table th{min-width:110px}
@media(max-width:850px){.filters select{max-width:100%;width:100%}.filters label{flex:1 1 180px}#review-panel{width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;border-radius:0}.panel-toolbar{position:relative}.panel-toolbar h2{flex-basis:100%}#panel-content{padding:1rem}.sticky-image{position:relative;top:auto}.sticky-image img{max-height:45dvh}dialog{padding:1rem}.change-table td{max-width:unset}.nav-menu>div{left:0;right:auto}}
.edit-mode{display:flex;gap:.5rem;align-items:center;font-weight:600;white-space:nowrap}.list-edit-mode{margin:1rem 0}.list-edit-mode .small{font-weight:400;white-space:normal}
.compact-editor{padding:1rem}.certificate-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem .8rem}.compact-field label,.subject-field label{font-size:.8rem;font-weight:600;margin-bottom:.15rem}.compact-editor input:not([type=checkbox]),.compact-editor select,.compact-editor textarea{padding:.3rem .45rem;min-height:34px;font-size:.9rem}.compact-editor .errorlist{padding:.4rem 1rem;margin:.3rem 0;font-size:.85rem}.wide-field{grid-column:1/-1}.compact-editor h2{margin:.9rem 0 .35rem;font-size:1.05rem}
.compact-editor .subject-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr) 4.5rem 3.3rem;gap:.4rem;margin:.4rem 0;padding:.35rem .5rem .5rem;min-width:0;border-radius:.3rem}.subject-row legend{font-size:.75rem;color:#52625d;padding:0 .2rem}.subject-field{min-width:0}.subject-row .errorlist{grid-column:1/-1}.subject-DELETE{text-align:center}.compact-editor .save-bar{padding:.65rem;margin-top:.8rem}.compact-editor .save-bar button{padding:.4rem .7rem}.compact-editor .save-bar [data-dirty-status]{font-size:.8rem}
.thumbnail-viewer{border:1px solid var(--line);border-radius:.4rem;overflow:hidden;background:#e8ede9}.image-tools{display:flex;align-items:center;gap:.5rem;padding:.5rem;background:#fff}.image-tools output{min-width:3.5rem;text-align:center;font-size:.85rem}.image-tools button{padding:.3rem .7rem;min-height:34px}.document-image .image-viewport{position:relative;height:clamp(280px,60dvh,740px);overflow:hidden;touch-action:none;user-select:none}.document-image .image-viewport img{position:absolute;top:50%;left:50%;max-width:none;max-height:none;transform-origin:center;pointer-events:none}.image-viewport.zoomed{cursor:grab}.image-viewport.dragging{cursor:grabbing}.image-viewport:focus-visible{outline:3px solid #bd6900;outline-offset:-3px}.image-hint{margin:.35rem .6rem}.image-tools button:disabled{opacity:.45;cursor:default}
@media(max-width:600px){.certificate-fields{gap:.5rem}.compact-editor{padding:.65rem}.compact-editor .subject-row{grid-template-columns:minmax(0,1fr) 4.5rem 3.3rem}.subject-raw_name{grid-column:1/-1}.list-edit-mode{flex-wrap:wrap}.list-edit-mode .small{flex-basis:100%}.document-image .image-viewport{height:45dvh}}
.lookup-label{display:block;font-size:.85rem;font-weight:700}.student-selection{display:grid;gap:.15rem;background:#edf4ef;border:1px solid var(--line);border-radius:.3rem;padding:.5rem .65rem;font-size:.85rem}.student-selection a{justify-self:start}.lookup-actions{display:flex;flex-wrap:wrap;gap:.4rem;margin:.4rem 0}.lookup-actions button,[data-student-cancel]{font-size:.8rem;padding:.3rem .5rem}.student-matches{max-height:260px;overflow:auto;border:1px solid var(--line);border-radius:.3rem;background:white;margin:.35rem 0}.student-matches [role=option]{display:grid;gap:.1rem;padding:.55rem .65rem;border-bottom:1px solid var(--line);cursor:pointer;font-size:.85rem}.student-matches [role=option]:hover,.student-matches [aria-selected=true]{background:#d8eadd;outline:2px solid var(--green);outline-offset:-2px}.student-matches [role=option] span{color:#52625d}[data-student-status]{margin:.35rem 0}
/* Adjustable certificate workspace, with one-column layout on narrow screens. */
.certificate-editor-layout{grid-template-columns:minmax(0,var(--image-pane,45%)) minmax(0,1fr);gap:1.25rem}.editor-column{min-width:0}.pane-control{display:flex;align-items:center;gap:.6rem;font-size:.85rem}.pane-control input{min-width:0;flex:1}.image-tools{flex-wrap:wrap}.record-status{margin-bottom:.75rem}.record-status>p{font-size:.9rem}.field-help{font-size:.85rem;padding:.5rem .65rem}.field-help summary{font-weight:600;color:var(--green)}.record-history>summary,.reference-group>summary{font-size:1.1rem;font-weight:700}.reference-group ul{max-height:32rem;overflow:auto}
@media(max-width:850px){.certificate-editor-layout{grid-template-columns:minmax(0,1fr)}.pane-control{display:none}}
.archive-action{width:fit-content;max-width:100%;margin:2.5rem 0 0 auto;padding:0;border:0;background:transparent;color:#52625d}.archive-action>summary{font-size:.8rem;padding:.25rem .5rem;border:1px solid var(--line);border-radius:.3rem}.archive-action[open]{width:min(100%,620px);padding:.75rem;border:1px solid var(--line);background:#f7f8f7}.archive-action[open]>summary{display:inline-block;margin-bottom:.5rem}.archive-action p,.archive-action label{font-size:.9rem}.archive-action label{margin:.65rem 0}.archive-action textarea{display:block;width:100%}.archive-action button{font-size:.8rem;padding:.3rem .55rem}
.enrolment-card{border-top:1px solid var(--line);padding-top:1rem}.enrolment-card>.heading{align-items:start}.enrolment-card h3{margin:.2rem 0}.enrolment-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.enrolment-field select,.enrolment-field input{width:100%}.subject-selection{border:1px solid var(--line);margin:1.5rem 0;padding:1rem}.subject-selection legend{font-weight:700}.subject-selection>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.35rem 1rem}.subject-option{padding:.35rem;border-radius:.25rem}.subject-option:has(input:checked){background:#edf4ef}@media(max-width:700px){.enrolment-fields,.subject-selection>div{grid-template-columns:1fr}.enrolment-card>.heading{display:block}.enrolment-card>.heading .actions{margin-top:.75rem}}

/* Certificate search and review refresh. */
.certificate-filters{display:block;padding:1.1rem 1.2rem;border-radius:.75rem;box-shadow:0 8px 22px #1d443914;background:linear-gradient(180deg,#fff,#f9fbf9)}
.filter-primary{display:grid;grid-template-columns:minmax(260px,1.6fr) minmax(230px,1fr) minmax(170px,.65fr) auto;gap:1rem;align-items:end}
.filter-control>span,.filter-control>legend,.certificate-filters .filter-fields label>span{display:block;margin-bottom:.25rem;font-size:.85rem;font-weight:650;color:#344d47}
.filter-control{min-width:0}.filter-control select,.filter-control input{width:100%;max-width:none}.filter-actions{display:flex;align-items:center;gap:.65rem;min-height:42px;white-space:nowrap}
.multi-select-filter{border:0;padding:0;margin:0;min-width:0}.multi-select-filter legend{padding:0}.multi-select-filter details{position:relative;margin:0;padding:0;border:0;background:transparent}.multi-select-filter summary{list-style:none;min-height:42px;padding:.5rem 2rem .5rem .65rem;border:1px solid #789087;border-radius:.25rem;background:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.multi-select-filter summary::-webkit-details-marker{display:none}.multi-select-filter summary::after{content:'▾';position:absolute;right:.7rem}.multi-select-options{position:absolute;z-index:12;top:calc(100% + .25rem);left:0;width:max(100%,320px);max-width:min(440px,88vw);max-height:20rem;overflow:auto;padding:.35rem;background:#fff;border:1px solid var(--line);border-radius:.45rem;box-shadow:var(--shadow)}.multi-select-options label{display:flex;align-items:start;gap:.5rem;padding:.45rem;border-radius:.3rem;font-size:.88rem}.multi-select-options label:hover,.multi-select-options label:has(input:checked){background:#edf4ef}.multi-select-options input{flex:0 0 auto;width:1.2rem;margin-top:.1rem}.multi-select-options span{min-width:0}
.certificate-filters .queue-shortcuts{display:flex;align-items:center;margin:1rem 0 .4rem;padding:.8rem 0 0;border:0;border-top:1px solid #dbe4df}.queue-shortcuts legend{float:left;margin-right:.75rem;font-size:.85rem;font-weight:700}.queue-shortcuts legend .small{font-weight:400;margin-left:.25rem}.queue-shortcuts label{position:relative;display:inline-flex;flex:0 0 auto}.queue-shortcuts input{position:absolute;opacity:0;pointer-events:none}.queue-shortcuts label span{display:inline-block;padding:.38rem .65rem;border:1px solid #92a59d;border-radius:1rem;background:#fff;color:#24463d;font-size:.85rem;cursor:pointer}.queue-shortcuts label:hover span{background:#e8f0ec}.queue-shortcuts label:has(input:checked) span{background:var(--green);border-color:var(--green);color:#fff}.queue-shortcuts label:has(input:focus-visible) span{outline:3px solid #bd6900;outline-offset:2px}
.certificate-filters .more-filters{margin:.75rem 0 0;padding:.55rem .7rem;background:#f7faf8}.certificate-filters .more-filters>summary{font-size:.88rem;font-weight:650;color:var(--green)}.certificate-filters .filter-fields{padding:.75rem 0 .2rem}.certificate-filters .filter-fields label{min-width:145px}.certificate-filters .filter-fields select{width:100%;max-width:none}
.student-not-found{background:#f3e5ff;color:#70259c;border:1px solid #c78de6;font-weight:700}.student-not-found [aria-hidden]{font-size:1.1em}
.completeness-badge{font-weight:700;border:1px solid transparent}.tier-1{background:#dff3e6;color:#155b37;border-color:#9dceb0}.tier-2{background:#fff2cf;color:#76500a;border-color:#e5c56f}.tier-3{background:#fae1df;color:#882f2a;border-color:#dfa29e}.tier-0{background:#e8ecea;color:#4b5c56;border-color:#c6cfcb}
.icon-button{width:2.25rem;height:2.25rem;padding:0;border-radius:50%;font-weight:800;font-size:1rem}.dialog-heading,.section-heading{display:flex;align-items:start;justify-content:space-between;gap:1rem}.dialog-heading h2,.section-heading h2{margin-top:0}.help-dialog{width:min(720px,94vw)}.help-topics details{padding:.75rem}.help-topics summary{font-weight:700;color:var(--green)}.help-topics p:last-child{margin-bottom:0}
.status-overview{display:flex;align-items:stretch;gap:.7rem;flex-wrap:wrap}.completeness-tile{display:grid;align-content:center;min-width:190px;padding:.8rem 1rem;border:1px solid;border-radius:.55rem}.completeness-tile>span{font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em}.completeness-tile>strong{font-size:1.1rem}.completeness-tile>small{font-size:.76rem}.status-attention{flex:1;min-width:240px;border-radius:.55rem;padding:.7rem .9rem}.status-attention p{margin:.2rem 0}.status-note{padding:.55rem .7rem;border-left:3px solid var(--line);background:#fff;font-size:.88rem}
.field-incomplete{background:#fff1f0!important;border-radius:.3rem;box-shadow:inset 3px 0 #c96760}.compact-field.field-incomplete,.subject-section.field-incomplete{padding:.45rem}.display-field.field-incomplete{padding:.35rem .5rem}.document-facts dd.field-incomplete{padding:.3rem .5rem}.missing-label{display:inline-block;margin-left:.4rem;color:#913b35;font-size:.72rem;font-weight:700;white-space:nowrap}.table-incomplete{outline:1px solid #e5b8b4;border-radius:.3rem}.subject-table caption .missing-label{font-weight:700}.subject-table td .missing-label{display:block;margin:.2rem 0 0}.subject-section{margin-top:.8rem}
.review-checks{margin-top:1.5rem}.review-checks .section-heading p{margin:.2rem 0 1rem;color:#52625d;font-size:.88rem}.review-check-list{display:grid;gap:.6rem}.review-check{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem .9rem;border:1px solid var(--line);border-left-width:4px;border-radius:.45rem;background:#fff}.review-check h3{margin:.1rem 0;font-size:1rem}.review-check p{margin:0;color:#52625d;font-size:.82rem}.review-check button{flex:0 0 auto}.check-status{font-size:.74rem;font-weight:750;text-transform:uppercase;letter-spacing:.035em}.check-complete{border-left-color:#2f8a57}.check-complete .check-status{color:#217044}.check-pending{border-left-color:#bb8b2e}.check-pending .check-status{color:#806018}.workflow-check{background:#f9fbfa}
.more-actions-menu{width:fit-content;margin:1.1rem 0 0 auto;padding:0;border:0;background:transparent}.more-actions-menu>summary{font-size:.84rem;color:#52625d}.more-actions-menu[open]{width:min(100%,430px);padding:.7rem;border:1px solid var(--line);background:#fff}.more-actions-content{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.7rem}
.page-intro{max-width:780px;color:#52625d;font-size:1.05rem}.help-library{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem;margin:1.5rem 0}.help-library article{padding:1.25rem;background:#fff;border:1px solid var(--line);border-radius:.6rem}.help-library h2{margin:.25rem 0}.help-library p:last-child{margin-bottom:0}
.cleaning-cases{display:grid;grid-template-columns:minmax(13rem,1fr) minmax(0,2fr);gap:.7rem 1.25rem;margin:.8rem 0}.cleaning-cases dt{font-weight:700}.cleaning-cases dd{margin:0}.cleaning-guide details,.progression-guide details{max-width:960px}@media(max-width:700px){.cleaning-cases{grid-template-columns:1fr;gap:.15rem}.cleaning-cases dd{margin:0 0 .75rem}}
.guide-summary{max-width:960px;margin:1.25rem 0;padding:1rem 1.25rem;border-left:4px solid var(--green);border-radius:.35rem;background:#eaf3ee}.guide-summary h2{margin:.1rem 0 .4rem}.guide-summary p{margin:.35rem 0}.guide-summary ul{margin:.5rem 0}.final-summary{margin-top:1.5rem}.guide-note{padding:.75rem .9rem;border-radius:.35rem;background:#fff2cf;color:#65470d}.comparison-cards,.troubleshooting-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;margin:1rem 0}.comparison-cards article,.troubleshooting-grid article{padding:.8rem .9rem;border:1px solid var(--line);border-radius:.4rem;background:#f8faf9}.comparison-cards h3,.troubleshooting-grid h3{margin:.1rem 0 .35rem;font-size:1rem}.comparison-cards p,.troubleshooting-grid ul{margin:.25rem 0}.progress-status{display:inline-block;padding:.18rem .45rem;border-radius:.3rem;font-size:.82rem}.status-ready{background:#dff3e6;color:#155b37}.status-blocked{background:#fae1df;color:#882f2a}.status-near{background:#fff2cf;color:#76500a}.status-pending{background:#e8ecea;color:#4b5c56}.status-definitions dt{align-self:start}@media(max-width:700px){.comparison-cards,.troubleshooting-grid{grid-template-columns:1fr}}
@media(max-width:1050px){.filter-primary{grid-template-columns:minmax(240px,1fr) minmax(220px,1fr)}.filter-actions{align-self:end}}
@media(max-width:650px){.filter-primary{grid-template-columns:1fr}.multi-select-options{width:100%}.certificate-filters .queue-shortcuts{align-items:flex-start}.queue-shortcuts legend{float:none;width:100%;margin-bottom:.45rem}.review-check{align-items:flex-start;flex-direction:column}.review-check button{width:100%}.status-overview>*{width:100%}}

.ocr-review{margin:.7rem 0;padding:.8rem;border:1px solid var(--border,#cbd5d1);border-radius:.4rem}.ocr-review h2{font-size:1.1rem}.ocr-choice{display:flex;flex-wrap:wrap;gap:.6rem;margin:.6rem 0;padding:.6rem;background:var(--surface,#f4f7f5);border-radius:.3rem}.ocr-choice>input[type=checkbox]{width:auto;flex:0 0 auto;align-self:flex-start}.ocr-choice>span{min-width:0;flex:1}.ocr-choice span span,.ocr-choice span strong,.ocr-choice small{display:block;overflow-wrap:anywhere}.ocr-choice>label{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.ocr-choice>label input{width:auto}.ocr-choice>small{width:100%}.ocr-review [data-ocr-proposal]>button{margin-right:.5rem;margin-top:.5rem}
.ocr-missing{display:grid;gap:.15rem;padding:.45rem .6rem;margin:.4rem 0;border-left:3px solid var(--border,#cbd5d1)}
.ocr-review .ocr-match,[data-subject-row].ocr-match{background:#e7f4eb;border:1px solid #8fbd9c}
.ocr-match-label{display:block;color:#205d35;font-weight:600}.ocr-match input[type=checkbox]{accent-color:#267342}
.ocr-choice .ocr-editor{flex:1 1 10rem;min-width:0;display:flex;flex-direction:column;align-items:stretch}.ocr-choice .ocr-editor input,.ocr-choice>span input,.ocr-choice>span select{width:100%;min-width:0;box-sizing:border-box}.ocr-choice>span label{display:block;margin:.3rem 0}
.export-section{max-width:980px;padding:1.4rem;background:#fff;border:1px solid var(--line);border-radius:.4rem;margin:1.5rem 0}.export-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1.2rem 1.5rem;align-items:end}.export-form label{display:grid;gap:.4rem;font-weight:600}.export-form select{width:100%;min-width:0}.export-form .export-hint{grid-column:1/-1;margin:0}.export-form button{justify-self:start}.export-zip-form{margin:1.2rem 0 1.8rem}.export-jobs{padding-left:1.3rem}.export-jobs li{padding:.4rem 0;overflow-wrap:anywhere}@media(max-width:600px){.export-section{padding:1rem}.export-form{grid-template-columns:minmax(0,1fr)}}

.ocr-original-options{display:flex;align-items:end;flex-wrap:wrap;gap:.7rem}.ocr-original-options label{display:grid;gap:.2rem;flex:1 1 10rem;min-width:0}.ocr-original-options input,.ocr-original-options select{width:100%}.ocr-review [data-ocr-original-image]{margin:1rem 0}.ocr-review [data-ocr-original-image] img{display:block;max-width:100%;max-height:65vh;object-fit:contain;border:1px solid var(--line)}

.ocr-progress-dialog{width:min(390px,90vw);padding:1.3rem}.ocr-progress-dialog h2{margin:0 0 .6rem}.ocr-progress-dialog progress{display:block;width:100%;height:.65rem;accent-color:var(--green)}.ocr-progress-dialog .small{margin-bottom:0}

.ocr-review .ocr-mismatch{background:#fff3e0;border:1px solid #d49a4e}.ocr-mismatch-label,.ocr-uncertain{color:#804408}.ocr-choice .ocr-uncertain{display:block;flex-basis:100%;font-size:.85rem;font-weight:750;margin-top:.25rem}

.ocr-review .ocr-apply:enabled{background:#145b49;border-color:#145b49;color:#fff}.ocr-review .ocr-apply:enabled:hover{background:#0c4637;border-color:#0c4637}.ocr-review .ocr-dismiss:enabled{background:#fff0d2;border-color:#ad7427;color:#714300}.ocr-review .ocr-dismiss:enabled:hover{background:#ffe0a3;border-color:#8c5716}.ocr-review .ocr-apply:disabled,.ocr-review .ocr-dismiss:disabled{background:#edf0ee;border-color:#c9d4cf;color:#64746c;cursor:default}

.filename {overflow-wrap:anywhere;}
.quick-classify {display:grid;gap:.4rem;margin:1rem 0;}
.quick-classify select {max-width:100%;width:100%;}
.card-body > a {overflow-wrap:anywhere;}
.table-wrap {overflow-x:auto;}
.table-wrap td:first-child {min-width:18rem;max-width:34rem;overflow-wrap:anywhere;}

/* Compact document filters; retain wrapping on narrow screens. */
.certificate-filters{padding:.85rem 1rem}
.certificate-filters .filter-primary{gap:.7rem}
.filter-shortcuts-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.4rem 1rem;margin-top:.65rem}
.certificate-filters .filter-shortcuts-row .queue-shortcuts{margin:0;padding:0;border:0;gap:.4rem}
.filter-shortcuts-row .filter-actions{min-height:34px}
.certificate-filters .more-filters{margin-top:.55rem}
@media(max-width:650px){.filter-shortcuts-row{align-items:flex-start}.filter-shortcuts-row .filter-actions{margin-left:auto}}

.subject-drag-handle{cursor:grab;touch-action:none;user-select:none;min-width:2rem;min-height:2rem}.subject-drag-handle:active{cursor:grabbing}.subject-row.is-dragging{outline:2px solid #26715b;opacity:.7}.subject-order-status{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

.user-activity{display:inline-flex;align-items:center;gap:.4rem;white-space:nowrap;color:#52625d}.user-activity::before{content:"";width:.6rem;height:.6rem;border-radius:50%;background:#87918d}.user-activity.is-active{color:#17623f;font-weight:600}.user-activity.is-active::before{background:#23844f}[data-last-active]{min-width:10rem}
.nav-menu .report-submenu{position:static;border:0;margin:0;padding:.2rem .6rem;background:transparent;color:white}.nav-menu .report-submenu>summary{padding:.35rem 0}.nav-menu .report-submenu section{margin:.25rem 0 .3rem;padding-left:.6rem;border-left:2px solid #d1ded7}.nav-menu .report-submenu a{display:block;white-space:normal}

/* Focused participant forms reuse the application dialog and field styles. */
#simple-form-dialog {width:min(600px,calc(100vw - 32px));max-height:88vh;border:1px solid #9bb6ad;border-radius:14px;padding:24px;overflow:auto;box-shadow:0 20px 65px #173b3033;}
#simple-form-dialog::backdrop {background:#152f2b70;}
#simple-form-dialog label {display:block;font-weight:600;}
#simple-form-dialog input:not([type=hidden]),#simple-form-dialog select,#simple-form-dialog textarea {width:100%;box-sizing:border-box;}
#simple-form-dialog .errorlist {color:#962d20;}
.report-context-note {display:flex;flex-wrap:wrap;align-items:center;gap:8px;}
.report-context-note .badge {background:#e9f1f8;color:#23475f;}
.simple-form-builder {max-width:760px;}
