.answer-workspace{max-width:1140px;margin-inline:auto;--answer-accent:var(--ui-primary,#5857db)}
.answer-header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:22px}.answer-header h1{font-size:1.5rem;margin:6px 0}.answer-header p{color:var(--ui-muted,#69758a);margin:6px 0;line-height:1.9}.answer-eyebrow{font-size:.9rem;color:var(--answer-accent);font-weight:700}
.answer-layout{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:20px;align-items:start}.answer-sheet,.answer-sidebar,.answer-notice{border:1px solid var(--ui-border,#e3e7ef);border-radius:18px;background:var(--ui-surface,#fff);padding:20px;min-width:0}.answer-sidebar{position:sticky;top:100px}.answer-timer{font-size:1.85rem;font-weight:800;direction:ltr;text-align:center;font-variant-numeric:tabular-nums;padding:15px;border-radius:12px;background:var(--ui-bg,#f6f7fc)}.answer-timer.is-urgent{color:#b93646;background:#ffe8ec}.answer-sidebar h3{font-size:1rem;margin:18px 0 10px}.answer-stat{display:flex;justify-content:space-between;gap:10px;padding:8px 0}.answer-progress{height:7px;border-radius:8px;background:var(--ui-border,#e3e7ef);overflow:hidden}.answer-progress span{display:block;background:var(--answer-accent);height:100%;transition:width .2s}
.answer-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;margin-bottom:14px}.answer-toolbar select,.answer-admin input,.answer-admin select,.answer-dialog input{border:1px solid var(--ui-border,#d8deea);background:var(--ui-surface,#fff);color:inherit;font:inherit;border-radius:10px;padding:10px;max-width:100%}.answer-save-state{font-size:.9rem;display:flex;align-items:center;gap:7px;color:var(--ui-muted,#657389)}.answer-save-state[data-state=dirty],.answer-save-state[data-state=error]{color:#b93646}.answer-save-state[data-state=saved]{color:#278069}
.answer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.answer-question{display:flex;align-items:center;gap:8px;border:1px solid var(--ui-border,#e3e7ef);padding:12px;border-radius:12px;min-width:0}.answer-question>strong{min-width:30px;font-size:1rem}.answer-options{display:flex;gap:7px;flex:1}.answer-option{min-width:38px;min-height:40px;flex:1;max-width:55px;border:1px solid var(--ui-border,#e3e7ef);border-radius:9px;background:var(--ui-bg,#f7f8fc);color:inherit;font:inherit;cursor:pointer}.answer-option[aria-pressed=true]{background:var(--answer-accent);border-color:var(--answer-accent);color:#fff;box-shadow:0 3px 8px #5857db24}.answer-option:focus-visible{outline:3px solid #a7a6ff;outline-offset:2px}.answer-option:disabled{cursor:default;opacity:.65}.answer-sidebar .button{width:100%;justify-content:center;margin-top:10px;min-height:45px}.answer-notice{line-height:1.9;margin-bottom:16px}.answer-notice[data-kind=warning]{border-color:#dab46a}.answer-notice[data-kind=success]{border-color:#71b59f}.answer-history{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.answer-history span{border:1px solid var(--ui-border,#e3e7ef);padding:7px 12px;border-radius:9px;font-size:.85rem}
.answer-dialog{width:min(460px,calc(100vw - 28px));max-height:85dvh;overflow:auto;border:1px solid var(--ui-border,#e3e7ef);background:var(--ui-surface,#fff);color:var(--ui-text,#233047);border-radius:18px;padding:24px;font:inherit}.answer-dialog::backdrop{background:#0c173460;backdrop-filter:blur(5px)}.answer-dialog h2{font-size:1.25rem}.answer-dialog p{line-height:1.9}.answer-dialog label{display:block;margin:12px 0}.answer-dialog label input{display:block;width:100%;margin-top:7px}.answer-dialog-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:18px}.answer-admin table{width:100%;border-collapse:collapse}.answer-admin td,.answer-admin th{padding:12px;text-align:right;border-bottom:1px solid var(--ui-border,#e3e7ef)}.answer-admin .table-scroll{overflow:auto}.answer-admin-actions{display:flex;gap:10px;flex-wrap:wrap;margin-block:15px}.answer-admin pre{direction:ltr;white-space:pre-wrap;overflow-wrap:anywhere}.answer-version-list details{border:1px solid var(--ui-border,#e3e7ef);padding:12px;border-radius:10px;margin-block:8px}.answer-version-list summary{cursor:pointer;font-size:1rem}.answer-version-list p{line-height:2;overflow-wrap:anywhere}
@media(max-width:900px){.answer-layout{grid-template-columns:1fr}.answer-sidebar{position:static;order:-1}.answer-sidebar .answer-time-group{display:flex;align-items:center;justify-content:space-between;gap:12px}.answer-timer{padding:8px 16px;font-size:1.5rem}.answer-sidebar h3{margin:6px 0}.answer-sidebar .answer-counts{display:flex;gap:24px;flex-wrap:wrap}.answer-sidebar .button{width:auto;display:inline-flex;margin-inline-end:6px}.answer-sidebar .answer-stat{gap:15px}}
@media(max-width:580px){.answer-grid{grid-template-columns:1fr}.answer-sheet,.answer-sidebar{padding:14px}.answer-header h1{font-size:1.25rem}.answer-question{padding:10px}.answer-admin td,.answer-admin th{padding:9px;white-space:nowrap}}
.exam-operation-grid button:not(:disabled){cursor:pointer;color:var(--ui-primary);border-color:color-mix(in srgb,var(--ui-primary) 24%,var(--ui-border))}.exam-operation-grid button:not(:disabled):hover{background:color-mix(in srgb,var(--ui-primary) 8%,var(--ui-surface))}.answer-dialog{box-sizing:border-box}.answer-admin input{min-width:0}.answer-admin .button{padding:10px 15px;border:1px solid var(--ui-border);border-radius:10px;background:var(--ui-surface);color:var(--ui-text);font:inherit;cursor:pointer}.answer-dialog .button{padding:10px 15px;border-radius:10px;min-height:42px;font:inherit}.answer-workspace [hidden],.answer-admin[hidden]{display:none!important}

.answer-column{display:flex;flex-direction:column;gap:10px;min-width:0}.answer-grid{align-items:start;direction:rtl}.answer-empty{grid-column:1 / -1}

.answer-elapsed-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px;color:var(--ui-muted);font-size:.9rem}.answer-elapsed-row b{direction:ltr;font-variant-numeric:tabular-nums;color:var(--ui-text)}.answer-time-note,.answer-validity{font-size:.9rem;line-height:1.9;color:var(--ui-muted);margin-block:12px}

/* v36: accessible answer states; independent of the generic purple primary theme. */
.answer-option,.answer-option:not([aria-pressed=true]){background:#fff!important;color:#25324b!important;border:2px solid #d4ddeb!important;box-shadow:none!important;position:relative}
.answer-option:hover:not(:disabled){border-color:#9ab3d3!important;background:#f2f7ff!important}
.answer-option[aria-pressed=true]{background:#16803b!important;color:#fff!important;border:2px solid #136b34!important;box-shadow:0 0 0 2px #d7f5de!important}
.answer-option[aria-pressed=true]::after{content:'✓';display:inline-block;font-size:.8rem;margin-inline-start:3px;font-weight:900}
.answer-option:focus-visible{outline:3px solid #115ea8!important;outline-offset:3px}
.answer-sidebar .answer-download{display:flex!important;align-items:center;min-height:56px!important;background:#eef4ff!important;border:2px solid #315abf!important;color:#163a8b!important;font-weight:800!important;text-decoration:none!important}
.answer-sidebar .answer-start{background:#087c6e!important;border-color:#087c6e!important;color:white!important;font-weight:800!important;min-height:54px}
.answer-sidebar .answer-guide-button{background:#fff9ed!important;border:1px solid #d49b37!important;color:#805317!important;font-weight:750!important}
.answer-final-dialog{text-align:center;width:min(530px,calc(100vw - 28px))}.answer-final-icon{border-radius:50%;background:#e0f6e9;color:#10783f;font-size:2.5rem;font-weight:900;width:72px;height:72px;display:grid;place-items:center;margin:0 auto 14px}.answer-final-actions{display:grid;gap:10px;margin-block:18px}.answer-final-actions>.button{width:100%;display:flex;align-items:center;justify-content:center;min-height:52px;text-decoration:none}.answer-final-tip{color:#586983;font-size:.85rem}.answer-guide-dialog{width:min(650px,calc(100vw - 24px))}.answer-guide-dialog video{display:block;width:100%;max-height:65vh}.answer-guide-link{display:flex;justify-content:center}

/* V37: last-priority answer appearance for open AND locked answer sheets */
#studentAnswer .answer-sheet .answer-options button.answer-option,
#studentAnswer .answer-sheet .answer-options button.answer-option:disabled,
#studentAnswer .answer-sheet .answer-options button.answer-option[aria-pressed="false"]{background:#fff!important;background-color:#fff!important;color:#17253c!important;border:2px solid #cbd5e1!important;box-shadow:none!important;opacity:1!important;filter:none!important;-webkit-text-fill-color:#17253c!important}
#studentAnswer .answer-sheet .answer-options button.answer-option[aria-pressed="true"],
#studentAnswer .answer-sheet .answer-options button.answer-option[aria-pressed="true"]:disabled{background:#15803d!important;background-color:#15803d!important;color:#fff!important;border:2px solid #166534!important;box-shadow:0 0 0 2px #bbf7d0!important;opacity:1!important;filter:none!important;-webkit-text-fill-color:#fff!important}
#studentAnswer .answer-sheet .answer-options button.answer-option:disabled{cursor:not-allowed!important}
#studentAnswer .answer-sheet .answer-options button.answer-option[aria-pressed="true"]::after{content:'✓';color:#fff;font-weight:900;margin-inline-start:4px}
.answer-sidebar .answer-clear{color:#9a3412!important;background:#fff7ed!important;border:1px solid #fdba74!important}
