:root{--bg:#f4f6f4;--paper:#fff;--ink:#182822;--muted:#52645b;--line:#d6e0da;--forest:#174634;--forest-2:#123528;--mint:#dcebe1;--accent:#c3e395;--amber:#fff0cc;--radius:22px;--shadow:0 12px 34px rgba(33,64,51,.07);font:16px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--bg)}
*,*::before,*::after{box-sizing:border-box}
body{margin:0;min-height:100vh;display:flex;flex-direction:column}
a{color:var(--forest);text-decoration-thickness:.08em;text-underline-offset:.17em}
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #669e62;outline-offset:3px}
p{margin:.3rem 0 0}h1,h2,h3{line-height:1.12;margin:0;letter-spacing:-.022em}h1{font-size:clamp(2.5rem,5vw,4rem);font-weight:760}h2{font-size:1.45rem}.muted,small{color:var(--muted)}small{font-size:.875rem}
svg{width:1.3rem;height:1.3rem;flex:none}
.top{background:var(--paper);border-bottom:1px solid var(--line)}
.top-inner,.footer-inner{display:flex;align-items:center;gap:1rem;max-width:1140px;margin:auto;padding:.9rem 1.5rem}
.brand{display:flex;align-items:center;gap:.65rem;color:var(--ink);font-weight:750;text-decoration:none;white-space:nowrap}
.brand-icon{background:var(--forest);color:var(--accent);border-radius:10px;height:2.5rem;width:2.5rem;display:grid;place-items:center}
.top nav{display:flex;align-items:center;gap:1.1rem;margin-left:auto}.top nav a{white-space:nowrap;color:var(--muted);font-weight:650;text-decoration:none}.top nav a:hover{text-decoration:underline}
.account{border-left:1px solid var(--line);padding-left:1rem;display:flex;gap:.5rem;align-items:center;max-width:280px;min-width:0}.account>div:nth-child(2){min-width:0}.account strong,.account small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:122px}.account small{font-size:.78rem}
.avatar{background:var(--mint);border-radius:50%;height:2.35rem;width:2.35rem;display:grid;place-items:center;color:var(--forest);flex:none}
button{font:inherit;cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}.inline{display:inline;margin:0}
.logout,.subtle{appearance:none;border:0;padding:.45rem .35rem;border-radius:6px;background:transparent;color:var(--forest);font-weight:700;text-decoration:underline;text-underline-offset:.18em;font-size:.88rem}
.container{width:min(100%,1140px);padding:2rem 1.5rem 4rem;margin:auto;flex:1}
.test-page .container{max-width:890px}
footer{margin-top:auto;border-top:1px solid var(--line);color:var(--muted);font-size:.88rem}.footer-inner{gap:.45rem;padding-top:1rem;padding-bottom:1rem}
.card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.kicker{font-size:.88rem;font-weight:760;color:#355d46;letter-spacing:.075em;text-transform:uppercase;display:flex;align-items:center;gap:.45rem;margin-bottom:.65rem}
.page-heading{margin:1.25rem 0 2rem}.page-heading p{color:var(--muted);max-width:64ch;margin-top:.7rem;white-space:pre-line;overflow-wrap:anywhere}
.page-heading.split,.actions,.section-heading{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap}.section-heading{margin:2rem 0 .75rem}
.eyeline{display:flex;align-items:center;gap:.65rem;margin:0 0 .55rem;color:var(--muted);font-size:.88rem}
.button{border:1px solid transparent;border-radius:11px;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-height:44px;padding:.58rem .96rem;text-align:center;font-weight:700;text-decoration:none;white-space:normal}
.button.primary{color:#fff;background:var(--forest)}.button.primary:hover{background:var(--forest-2)}.button.secondary{color:var(--forest);border-color:var(--line);background:#fff}.button.secondary:hover{background:var(--mint)}.full{width:100%}
.login-page .container{display:grid;align-content:center;padding-block:3.5rem}
.login-layout{display:grid;grid-template-columns:minmax(0,1.18fr) minmax(0,.82fr);gap:1.5rem;align-items:stretch;min-height:400px}
.hero{padding:clamp(1.5rem,4vw,3.1rem);color:#fff;border-radius:var(--radius);display:flex;flex-direction:column;justify-content:center;background:radial-gradient(ellipse at 85% 90%,#2b6549 0%,transparent 63%),var(--forest-2);overflow:hidden}
.hero h1{font-size:clamp(3rem,6vw,5rem);line-height:1.03;letter-spacing:-.046em}.hero .kicker,.hero-note{color:var(--accent)}.hero p{font-size:1.12rem;color:#e6efe7;max-width:30ch;margin-top:1.1rem}.hero-note{display:flex;gap:.5rem;align-items:center;font-size:.87rem;font-weight:680}.hero-rule{width:3rem;height:1px;background:var(--accent);margin:1.6rem 0 .85rem}
.login-card{padding:clamp(1.35rem,3vw,2.35rem);align-self:center}.login-card form{margin-top:1rem}.login-card .button,.form-card .full{margin-top:1.15rem}
label{display:block;font-weight:670;margin-top:.8rem;margin-bottom:.34rem}
input:not([type=radio]),textarea,select{width:100%;min-height:46px;border:1px solid #a9bdb0;border-radius:10px;color:var(--ink);font:inherit;padding:.55rem .7rem;background:#fff}
textarea{resize:vertical;min-height:74px}textarea::placeholder,input::placeholder{color:#5e7266}
select{appearance:none;padding-right:2.25rem;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8'%3E%3Cpath d='m1 1 5.5 5L12 1' fill='none' stroke='%23174634' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .84rem center}
.field-hint{display:block;margin-top:.2rem}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.notice{padding:.7rem .9rem;margin:.8rem 0;border-radius:10px;background:var(--mint)}.notice.error{color:#8c2226;background:#ffeded;border:1px solid #ebc5c7}.error-text{color:#8c2226;font-weight:600;margin-top:1rem}.error-page,.success,.empty{padding:clamp(1.25rem,4vw,2.25rem)}.error-page .button,.success .button{margin-top:1.2rem}.success h1{font-size:clamp(2rem,4vw,3rem)}
.test-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.15rem}.test-grid .empty{grid-column:1/-1}
.test-card{padding:1.25rem;display:flex;flex-direction:column;gap:.55rem;align-items:flex-start;overflow-wrap:anywhere}.test-card .button{margin-top:auto}.test-card h2{font-size:1.35rem}.test-card p{margin-bottom:.6rem;color:var(--muted);white-space:pre-line}
.card-icon{background:var(--mint);color:var(--forest);height:2.6rem;width:2.6rem;border-radius:12px;display:grid;place-items:center;margin-bottom:.55rem}
.badge{border-radius:99px;display:inline-block;padding:.13rem .6rem;font-size:.82rem;font-weight:700;background:#ebf0eb;color:#385043;white-space:nowrap}
.badge.published,.badge.complete{background:#dcefe0;color:#215138}.badge.closed{color:#5a5751;background:#efeae4}.badge.pending{color:#674810;background:var(--amber)}
.back{display:inline-block;margin:.25rem 0 .3rem;font-weight:680}
.questions{display:grid;gap:1rem}.question,.editor-question,.form-card{padding:clamp(1rem,3vw,1.55rem);min-width:0;margin:0}
.question legend,.editor-question legend{margin-left:.2rem;font-weight:690;padding:0 .35rem;background:var(--bg);border-radius:8px}
.question h2{font-size:clamp(1.1rem,2.8vw,1.35rem);margin-bottom:1rem;white-space:pre-wrap;overflow-wrap:anywhere}
.options{display:grid;gap:.55rem}.option{display:flex;align-items:center;gap:.7rem;border-radius:12px;padding:.65rem .85rem;margin:0;border:1px solid var(--line);font-weight:500;cursor:pointer;min-height:46px;overflow-wrap:anywhere}
.option:hover,.option:has(input:checked){background:#f0f7ed;border-color:#88ad86}.option input{width:1rem;height:1rem;flex:none;margin:0;accent-color:var(--forest)}
.letter{background:#eaf0ec;color:#355744;border-radius:6px;min-width:1.65rem;min-height:1.65rem;display:grid;place-items:center;font-weight:730}
.submit-bar{background:var(--paper);border:1px solid var(--line);border-radius:15px;padding:.9rem;display:flex;align-items:center;justify-content:space-between;gap:.7rem;flex-wrap:wrap}.submit-bar small,.stat span{display:block}
.metrics,.accounts-grid{display:grid;gap:1rem;margin-bottom:1.4rem}.metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.accounts-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.stat{padding:1rem;display:flex;gap:.85rem;align-items:center}.stat svg{color:var(--forest);height:1.5rem;width:1.5rem}.stat strong{font-size:1.65rem;line-height:1}.stat span{color:var(--muted);font-size:.87rem}
.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;min-width:490px;text-align:left}th,td{padding:.8rem .95rem;border-bottom:1px solid var(--line);vertical-align:middle}th{font-size:.875rem;color:var(--muted);background:#f5f8f5}tbody tr:last-child td{border-bottom:0}tbody td a{font-weight:700}td small,.details small{display:block}
.details{padding:1.05rem 1.35rem;margin-top:1.4rem}.details summary{cursor:pointer;font-weight:700}.details li{margin:.7rem 0}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}.editor-question{margin-bottom:.9rem}.editor-question .subtle{margin-top:.75rem;color:#8c2226}
.answer-text{background:#f4f7f4;border:1px solid var(--line);border-radius:10px;padding:.7rem;white-space:pre-wrap;overflow-wrap:anywhere;margin:.6rem 0}
@media(max-width:780px){.test-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.top-inner,.container,.footer-inner{padding-inline:1rem}.account .avatar{display:none}.login-layout{gap:1rem}.hero h1{font-size:clamp(2.85rem,7vw,4.3rem)}}
@media(max-width:620px){.top-inner{flex-wrap:wrap;gap:.55rem}.top nav{order:3;flex:1 0 100%;margin-left:0;border-top:1px solid var(--line);padding-top:.5rem}.account{margin-left:auto;border:0;padding:0}.account>div:nth-child(2){display:none}.brand{font-size:.98rem}.brand-icon{width:2.1rem;height:2.1rem}.login-page .container{padding-block:1.15rem}.login-layout,.test-grid,.accounts-grid,.form-grid{grid-template-columns:1fr}.hero{padding:1.25rem}.hero h1 br{display:none}.hero h1{font-size:2.5rem}.hero p{font-size:1rem}.hero-rule,.hero-note{display:none}.metrics{gap:.45rem}.stat{padding:.7rem .5rem;align-items:flex-start;display:block}.stat svg{display:none}.stat strong{font-size:1.35rem}.stat span{font-size:.78rem}.container{padding-top:1rem}.page-heading{margin:1rem 0 1.35rem}.submit-bar button{flex:1}}

/* Visual identity: quiet academic greens and a hand-built checklist mark. */
.brand-icon{display:block;object-fit:contain}
.login-layout{min-height:440px;gap:clamp(1rem,2.4vw,1.9rem)}
.hero{isolation:isolate;position:relative;background:radial-gradient(ellipse at 96% 82%,#286347 0%,transparent 64%),linear-gradient(128deg,#123429,#174737 82%);border:1px solid #1a4838}
.hero> :not(.hero-art){position:relative;z-index:1}
.hero h1{max-width:10ch;text-wrap:balance}
.hero p{max-width:29ch}
.hero-art{position:absolute;z-index:0;right:-64px;bottom:-46px;width:min(54%,334px);height:auto;pointer-events:none;opacity:.8}
.login-card{border-top:4px solid #85ad72}
.login-card .kicker{margin-bottom:.45rem}
.login-card .muted{max-width:32ch}
@media(max-width:810px){.hero-art{opacity:.41;right:-45px;bottom:-26px}.hero p{max-width:24ch}}
@media(max-width:620px){.login-layout{min-height:auto}.hero h1{max-width:none}.hero p{max-width:29ch}.hero-art{width:37%;right:-16px;bottom:-31px;opacity:.36}}
@media(min-width:621px) and (max-width:900px){.hero h1{font-size:clamp(2.3rem,4.85vw,3.4rem)}}
@media(max-width:620px){.hero h1{font-size:clamp(2.05rem,7.2vw,2.65rem)}}

.answer-toggle{display:flex;align-items:center;gap:.65rem;cursor:pointer}.answer-toggle input{width:auto;margin:0}.answer-review{max-width:860px;margin:1.25rem auto}.answer-review ol>li+li{margin-top:1rem}.answer-review p{margin:.25rem 0}.form-card input[type=file]{max-width:100%}
/* Option state is announced as text as well as color. */
.answer-options{list-style-position:inside;margin:.7rem 0;padding:0}
.answer-options li{margin:.35rem 0;padding:.55rem .85rem;border:1px solid #b8c2c9;border-radius:.55rem}
.answer-options small{display:block;font-weight:700;margin:.2rem 0 0 1.2rem}
.answer-options .answer-selected{background:#ecf3f8;border-color:#51738a;color:#163951}
.answer-options .answer-correct{background:#eaf7ee;border-color:#427e50;color:#17452a}
.answer-options .answer-incorrect{background:#fff1f0;border-color:#ad534e;color:#742925}
.question-metadata{margin:.9rem 0;padding:.6rem .9rem;background:#eef4f4;border-radius:.55rem}
.question-metadata dt{font-size:.85rem;font-weight:700;color:#29474e}
.question-metadata dd{margin:0 0 .45rem;overflow-wrap:anywhere}
.question-metadata dd:last-child{margin-bottom:0}
.locked-answer{white-space:pre-wrap;overflow-wrap:anywhere}
.question form>button{margin-top:.55rem}

/* One-question attempt navigation; controls remain available without JavaScript. */
.attempt-steps { display:flex; gap:.75rem; flex-wrap:wrap; margin:1rem 0; }
.attempt-navigation { margin:1rem 0; padding:1rem 1.25rem; }
.attempt-navigation p { margin:0 0 .65rem; }
.attempt-navigation p span { font-size:.85rem; padding-inline-start:.75rem; }
.attempt-navigation ol { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:.4rem; }
.attempt-navigation a { display:inline-flex; min-inline-size:2.75rem; min-block-size:2.75rem; align-items:center; justify-content:center; border:1px solid #c1ccdb; border-radius:.55rem; padding:.2rem .45rem; color:#18334d; text-decoration:none; }
.attempt-navigation a.is-locked { background:#e8f5eb; color:#265139; }
.attempt-navigation a[aria-current=page] { outline:2px solid #294e73; outline-offset:1px; font-weight:700; }
.attempt-navigation a:focus-visible, .attempt-steps a:focus-visible { outline:3px solid #294e73; outline-offset:2px; }
@media (max-width: 480px) { .attempt-steps .button { flex:1 1 100%; } }

/* Each settings mode owns its native form, including without JavaScript. */
.settings-mode { margin:.7rem 0; padding:.65rem 1rem; border:1px solid #cfdae4; border-radius:.6rem; }
.settings-mode > summary { cursor:pointer; font-weight:650; }
.settings-mode form { margin:.65rem 0 .3rem; }
.settings-mode [readonly] { background:#f1f5f8; color:#274057; }
.settings-current { overflow-wrap:anywhere; }

/* Organizer-only grading table. Keep the four headings associated with their cells. */
.grading-page .container{max-width:1140px}
.grading-section{margin-block:1.5rem}
.grading-section h2{margin-bottom:.75rem}
.grading-wrap{overflow:auto}
.grading-table{table-layout:fixed;min-width:700px}
.grading-table thead th{background:#e9f1e9;color:var(--forest)}
.grading-table thead th:nth-child(1){width:24%}
.grading-table thead th:nth-child(2),.grading-table thead th:nth-child(3){width:25%}
.grading-table thead th:nth-child(4){width:26%}
.grading-table tbody th,.grading-table td{vertical-align:top}
.grading-table tbody th{font-size:inherit;color:var(--ink);background:transparent}
.grading-table tbody tr:nth-child(even){background:#f9fbf9}
.grading-cell-text,.grading-table .grade-state,.grading-table .field-hint{white-space:pre-wrap;overflow-wrap:anywhere}
.grading-table .grade-options{display:flex;flex-wrap:wrap;gap:.25rem .75rem;margin:.3rem 0 .65rem;border:0;padding:0;min-width:0}
.grading-table .grade-options label{display:flex;align-items:center;gap:.35rem;margin:0;cursor:pointer}
.grading-table input[type=radio]{accent-color:var(--forest)}
.grading-table textarea{font-size:.87rem;min-height:4.1rem}
.grading-page .notice form{margin-top:.6rem}
@media(max-width:740px){
  .grading-wrap{overflow:visible}
  .grading-table{display:block;min-width:0}
  .grading-table thead{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
  .grading-table tbody,.grading-table tr,.grading-table td,.grading-table tbody th{display:block}
  .grading-table tbody tr{border-bottom:1px solid var(--line);padding:.35rem 0}
  .grading-table tbody td,.grading-table tbody th{border:0;padding:.55rem .8rem}
  .grading-table tbody td::before,.grading-table tbody th::before{content:attr(data-label);display:block;color:var(--forest);font-size:.8rem;font-weight:700;margin-bottom:.25rem}
}
.grading-table .grade-clear{display:flex;align-items:center;gap:.35rem;font-size:.8rem;margin-top:.35rem}
.grading-table .grade-clear input{width:1em;height:1em;min-height:0;margin:0;accent-color:var(--forest)}

.button.danger{color:#9b2525;background:#fff;border:1px solid #c96d6d}.button.danger:hover{background:#ffeded}

/* V11: graded answers and final counts. Status is also shown as text. */
.answer-review > ol > li.result-right,.question.result-right,.grading-cell-text.result-right,.grade-state.result-right,.result-summary .result-right{background:#eaf7ee;color:#17452a;border-color:#427e50}
.answer-review > ol > li.result-wrong,.question.result-wrong,.grading-cell-text.result-wrong,.grade-state.result-wrong,.result-summary .result-wrong{background:#fff1f0;color:#742925;border-color:#ad534e}
.answer-review > ol > li.result-partial,.grading-cell-text.result-partial,.grade-state.result-partial,.result-summary .result-partial{background:#fff7dc;color:#785311;border-color:#bd942f}
.answer-review > ol > li.result-right,.answer-review > ol > li.result-wrong,.answer-review > ol > li.result-partial,.grading-cell-text.result-right,.grading-cell-text.result-wrong,.grading-cell-text.result-partial{padding:.75rem;border-radius:8px;border:1px solid}
.result-key{background:#eaf7ee;color:#17452a;border:1px solid #427e50;border-radius:8px;padding:.65rem;white-space:pre-wrap;overflow-wrap:anywhere}
.result-summary{margin:1.5rem 0 0;padding:1rem;border:1px solid #cbd5e1;border-radius:12px;background:#fff;color:#1a293b}
.result-summary dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:.6rem;margin:0}
.result-summary dl>div{padding:.7rem;border:1px solid #d5dce5;border-radius:8px}
.result-summary dt{font-size:.9rem}.result-summary dd{font-size:1.4rem;font-weight:700;margin:0}

/* V11.1: instant feedback on a saved answer. */
.feedback-verdict,.feedback-answer{padding:.7rem .85rem;border:1px solid #bdc7d1;border-radius:.55rem;margin:.65rem 0;overflow-wrap:anywhere;white-space:pre-wrap}
.feedback-verdict.result-right,.feedback-answer.result-right{background:#eaf7ee;color:#17452a;border-color:#427e50}
.feedback-verdict.result-wrong,.feedback-answer.result-wrong{background:#fff1f0;color:#742925;border-color:#ad534e}
.feedback-verdict.result-partial,.feedback-answer.result-partial{background:#fff7dc;color:#785311;border-color:#bd942f}
.feedback-verdict.result-pending,.feedback-answer.result-pending{background:#eef3f8;color:#344a65}
