:root{color-scheme:light;--navy:#0B3D2E;--blue:#176B45;--pale:#EDF7F0;--ink:#1c2936;--muted:#667789;--line:#d9e2ec;--green:#18794e;--red:#b42318}
*{box-sizing:border-box}body{margin:0;background:#f3f6fa;color:var(--ink);font:16px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif}.shell{width:min(100% - 24px,700px);margin:0 auto;padding:20px 0 calc(26px + env(safe-area-inset-bottom))}.hero{background:var(--navy);color:white;border-radius:18px;padding:24px 22px;margin-bottom:16px}.eyebrow{text-transform:uppercase;letter-spacing:.08em;font-size:12px;font-weight:750;color:#A8D5B5}.hero h1{font-size:clamp(27px,7vw,36px);line-height:1.1;margin:7px 0}.hero p{margin:0;color:#d7e2ed}.panel{background:white;border:1px solid var(--line);border-radius:16px;padding:22px;box-shadow:0 8px 28px #0B3D2E0b}.panel h2{margin:0 0 8px;font-size:22px}.muted{color:var(--muted);margin:0 0 16px}.hidden{display:none!important}form label{display:block;font-weight:650;margin:15px 0}input{display:block;width:100%;margin-top:6px;padding:13px 14px;border:1px solid #cbd6e2;border-radius:10px;font:inherit;background:white;color:var(--ink);min-height:48px}input:focus{outline:3px solid #BFE4CB;border-color:var(--blue)}.button{border:0;border-radius:11px;min-height:48px;padding:12px 17px;font:inherit;font-weight:700;cursor:pointer}.primary{background:var(--blue);color:white}.secondary{background:#e8eef5;color:var(--navy)}.button:disabled{opacity:.45;cursor:default}.controls{display:flex;gap:10px;margin-top:20px}.controls .button{flex:1}.notice{margin-top:16px;padding:12px 14px;border-radius:10px;background:var(--pale);color:#344b62;font-size:14px}.error{color:var(--red);font-weight:600;min-height:1.4em;margin:8px 0}.progress-head{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:14px}.progress-track{height:8px;background:#e7edf4;border-radius:99px;overflow:hidden;margin:8px 0 20px}.progress-track span{display:block;width:0;height:100%;background:#32845A;border-radius:99px;transition:width .2s}.question-number{font-size:13px;color:var(--blue);font-weight:750;margin-bottom:5px}.question-text{font-size:clamp(19px,4.8vw,24px);line-height:1.35;margin:0 0 18px;white-space:pre-wrap}.options{display:grid;gap:10px}.option{display:flex;align-items:flex-start;gap:12px;width:100%;text-align:left;border:1px solid var(--line);border-radius:12px;padding:14px;background:white;color:var(--ink);font:inherit;min-height:54px;cursor:pointer}.option:active{transform:scale(.995)}.option.selected{border:2px solid var(--blue);background:#EDF7F0;padding:13px}.option-mark{flex:0 0 27px;width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:#eaf0f6;color:var(--navy);font-size:13px;font-weight:750}.footer{text-align:center;color:var(--muted);font-size:13px;padding:16px}.result-panel{text-align:center}.score{font-size:48px;font-weight:850;color:var(--navy);line-height:1.1;margin:14px 0 20px}.result-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.result-grid div{background:#f1f5f9;border-radius:12px;padding:15px}.result-grid strong{display:block;font-size:26px}.result-grid span{color:var(--muted);font-size:14px}.result-panel .muted{margin-top:18px}@media(max-width:480px){.shell{width:min(100% - 16px,700px);padding-top:10px}.hero{border-radius:14px;padding:19px 17px}.panel{padding:17px}.controls{gap:7px}.controls .button{padding:10px 8px;font-size:15px}}
select{display:block;width:100%;margin-top:6px;padding:13px 14px;border:1px solid #cbd6e2;border-radius:10px;font:inherit;background:white;color:var(--ink);min-height:48px}select:focus{outline:3px solid #BFE4CB;border-color:var(--blue)}select:disabled{background:#f3f6fa;color:var(--muted)}.small{font-size:14px;color:var(--muted);margin:4px 0 12px}.test-context{margin:0 0 10px;color:var(--muted);font-size:14px;font-weight:650}
.catalog-list{display:grid;gap:8px;margin:8px 0 18px}.catalog-item{padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#f7f9fb;color:var(--ink);font-size:14px}
.search-results{display:grid;gap:12px;margin-top:12px}.search-card{border:1px solid var(--line);border-radius:12px;padding:14px;background:#fff}.search-card h3{margin:6px 0 10px;font-size:17px}.search-answer-list{margin:0;padding-left:24px}.search-answer-list li{padding:4px 0}.answer-good{color:var(--green);font-weight:700}

.participant-instructions{white-space:pre-wrap;line-height:1.65;margin:12px 0 20px}textarea{display:block;width:100%;min-height:150px;margin-top:6px;padding:13px 14px;border:1px solid #cbd6e2;border-radius:10px;font:inherit;background:white;color:var(--ink);resize:vertical}textarea:focus{outline:3px solid #BFE4CB;border-color:var(--blue)}
.grade{font-size:20px;font-weight:800;margin:0 0 14px}.grade.satisfactory{color:var(--green)}.grade.unsatisfactory{color:var(--red)}
.skip-question{width:100%;margin-top:10px}

#answer-status{margin:12px 0 0;min-height:1.5em}.answer-review{text-align:left;margin-top:24px}.answer-review h3{font-size:20px}.answer-review-item{border:1px solid var(--line);border-left:5px solid var(--red);border-radius:11px;padding:13px 15px;margin:10px 0;background:#fff}.answer-review-item.correct{border-left-color:var(--green)}.answer-review-item h4{margin:0 0 8px}.answer-review-question{font-weight:700;white-space:pre-wrap}.answer-review-item p{margin:6px 0}.answer-review-item ul{padding-left:24px}.answer-review-correct{color:var(--green);font-weight:700}

.hero{position:relative;padding-top:62px}.admin-login{position:absolute;top:12px;right:16px;display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border:1px solid #ffffff55;border-radius:10px;color:#fff;text-decoration:none;background:#ffffff16;font-size:14px;font-weight:750;line-height:1.2}.admin-login svg{width:18px;height:18px;flex:0 0 18px}.admin-login:hover{background:#ffffff2b}.admin-login:focus-visible{outline:3px solid #BFE4CB;outline-offset:2px}

.question-search-link{display:flex;align-items:center;justify-content:center;gap:9px;margin-top:12px;text-decoration:none}.question-search-link svg{width:20px;height:20px;flex:none}.search-actions{align-items:stretch}.search-actions .button{flex:1}.search-hero .admin-login{position:absolute}
@media(max-width:480px){.search-actions{flex-direction:column}}
.home-hero{padding-top:24px}.home-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.home-title-row h1{flex:1;min-width:0;margin:0}.home-access-links{display:flex;flex-direction:column;gap:6px;flex:none}.home-access-links .admin-login{position:static;width:96px;justify-content:center;margin:0;padding:7px 8px;white-space:nowrap}.home-search-link svg{width:18px;height:18px;flex:0 0 18px}
@media(max-width:480px){.home-hero{padding:19px 17px}.home-title-row{gap:8px}.home-title-row h1{font-size:clamp(23px,6vw,28px)}.home-access-links .admin-login{width:78px;font-size:13px;padding:7px 5px}}

/* Mobile test layout: question and choices first, progress summary at the bottom. */
.test-progress-footer{margin-top:14px;padding-top:10px;border-top:1px solid var(--line)}
.test-progress-footer .progress-track{margin:5px 0 10px}
#test-screen .question-text{margin-bottom:10px}
#test-screen .options{gap:7px}
#test-screen .option{padding:10px 12px;min-height:46px}
#test-screen .option.selected{padding:9px 11px}
#test-screen .controls{margin-top:10px}
.testing .home-title-row h1{font-size:clamp(10px,2.8vw,14px);white-space:nowrap;letter-spacing:-.02em;line-height:1.2}
.testing .home-title-row .home-access-links{display:none}
.testing .home-title-row{align-items:center}
@media(max-width:480px){.testing .home-hero{padding:12px 14px;margin-bottom:9px}.testing .home-title-row h1{font-size:12px}.testing .panel{padding:13px}.testing #test-screen .question-text{font-size:19px;line-height:1.28;margin-bottom:8px}.testing #test-screen .option{font-size:15px;padding:9px 10px;min-height:42px}.testing #test-screen .option.selected{padding:8px 9px}.testing #test-screen .controls{gap:6px;margin-top:8px}.testing #test-screen .controls .button{min-height:44px;padding:8px 5px;font-size:14px}.testing #test-screen .skip-question{min-height:40px;padding:8px 12px}}

.question-editor label{display:block;margin:8px 0;font-weight:650}.question-editor textarea,.question-editor input:not([type=radio]){display:block;width:100%;padding:10px;border:1px solid var(--line);border-radius:9px;font:inherit}.answer-editor-row{display:flex;align-items:center;gap:10px;margin:8px 0}.answer-editor-row>input{flex:1;min-width:0}.correct-picker{display:flex!important;align-items:center;gap:4px;white-space:nowrap;font-size:13px}.correct-picker input{width:auto;min-height:0}

.testing #question-count-summary{display:none}

/* Keep test actions reachable while scrolling long questions on a phone. */
#test-screen .test-controls-sticky{position:sticky;bottom:0;z-index:4;background:rgba(255,255,255,.97);padding:9px 0 calc(9px + env(safe-area-inset-bottom));margin-bottom:0;box-shadow:0 -8px 18px rgba(255,255,255,.95);backdrop-filter:blur(8px)}
#test-screen .test-progress-footer{padding-bottom:calc(4px + env(safe-area-inset-bottom))}
#progress-save-status{min-height:0;margin:2px 0 6px;font-size:12px}

.bank-panel{margin-bottom:16px}.bank-editor{display:grid;gap:12px;margin:12px 0}.bank-question{border:1px solid var(--line);border-radius:12px;padding:14px;background:#fbfcfd}.bank-question-top{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}.bank-question textarea{display:block;width:100%;margin-top:6px;padding:11px;border:1px solid var(--line);border-radius:9px;font:inherit;resize:vertical}.bank-answers{display:grid;gap:7px;margin-top:8px}.bank-answer-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.bank-editor .answer-editor-row{margin:0}.bank-editor .answer-editor-row input:not([type=radio]){margin-top:0}.bank-panel .toolbar{align-items:end}.bank-panel .toolbar label{min-width:170px}
@media(max-width:480px){.bank-question{padding:10px}.bank-panel .toolbar{display:grid;grid-template-columns:1fr}.bank-panel .toolbar label{min-width:0}.bank-panel .toolbar .button{width:100%}}

/* Consistent authenticated administrator navigation across protected sections. */
.admin-page-header{padding-top:20px!important}
.admin-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;position:relative;z-index:12}
.admin-title-row h1{flex:1;min-width:0;margin:0;font-size:clamp(21px,5.4vw,32px);line-height:1.12;overflow-wrap:anywhere}
.admin-menu{position:relative;z-index:20;flex:0 0 auto}
.admin-menu-toggle{display:flex;align-items:center;justify-content:center;gap:7px;min-width:105px;min-height:44px;padding:8px 11px;border:1px solid #ffffff66;border-radius:11px;background:#ffffff18;color:#fff;font-size:15px;font-weight:750;cursor:pointer;list-style:none;user-select:none;white-space:nowrap;transition:background .15s ease}
.admin-menu-toggle::-webkit-details-marker{display:none}
.admin-menu-toggle:hover,.admin-menu[open] .admin-menu-toggle{background:#ffffff30}
.admin-menu-toggle:focus-visible{outline:3px solid #bfe4cb;outline-offset:2px}
.admin-menu-toggle>svg:first-child{width:19px;height:19px;flex:0 0 19px}
.admin-menu-chevron{width:15px;height:15px;transition:transform .15s ease}
.admin-menu[open] .admin-menu-chevron{transform:rotate(180deg)}
.admin-menu-list{position:absolute;top:calc(100% + 8px);right:0;display:grid;gap:6px;width:min(270px,calc(100vw - 28px));padding:8px;background:#fff;border:1px solid var(--line);border-radius:13px;box-shadow:0 14px 34px #10251d30;z-index:30}
.admin-menu-list .button{display:flex;align-items:center;justify-content:flex-start;width:100%;min-height:44px;padding:10px 12px;text-align:left;text-decoration:none;line-height:1.25;border-radius:9px;background:#e8eef5;color:var(--navy);font-size:15px}
.admin-menu-list .button:hover{background:#dce5ee}
.admin-menu-list .button:focus-visible{outline:3px solid #32845a;outline-offset:1px}
.admin-page-tools{margin-top:12px}
.test-item,.department-item{display:flex;justify-content:space-between;align-items:center;gap:12px}.test-item span{min-width:0}.compact-button{min-height:40px;padding:8px 12px;flex:0 0 auto}
@media(max-width:480px){.admin-page-header{padding:16px 14px!important}.admin-title-row{gap:8px}.admin-title-row h1{font-size:clamp(19px,5.3vw,25px)}.admin-menu-toggle{min-width:90px;min-height:42px;padding:7px 8px;font-size:14px}.admin-menu-list{width:min(260px,calc(100vw - 24px))}}.admin-user-entry{padding:12px 0;border-bottom:1px solid var(--line)}.admin-user-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.admin-user-actions{display:flex;gap:8px;flex-wrap:wrap}.admin-user-delete{background:#f0e6e6;color:#6c2929}.admin-reset-form{display:flex;align-items:end;gap:10px;margin-top:10px}.admin-reset-form label{flex:1;margin:8px 0}.admin-reset-form .button{flex:0 0 auto}@media(max-width:520px){.admin-user-row{align-items:flex-start;flex-direction:column}.admin-user-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.admin-user-actions .button{width:100%}.admin-reset-form{align-items:stretch;flex-direction:column}.admin-reset-form .button{width:100%}}.search-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.search-title-row h1{flex:1;min-width:0;margin:0}.search-title-row #admin-menu-host:empty{display:none}.admin-menu-list .button[hidden]{display:none!important}.search-hero.admin-authenticated .admin-login{display:none}