/* Reuse the application's colours, typography, controls and fixed navigation. */
.exam-screen{--exam-success-soft:#cfe5d4;--exam-error:#b54747;--exam-error-soft:#f5dddd}
@media(prefers-color-scheme:dark){.exam-screen{--exam-success-soft:#315a41;--exam-error:#f1a3a3;--exam-error-soft:#532f31}}
.training-mode-switch{position:relative;min-width:0;z-index:12}
.training-mode-title{display:inline-flex;align-items:center;gap:8px;max-width:100%;min-height:36px;padding:0;background:transparent;text-align:left;font:inherit;letter-spacing:inherit;border-radius:6px}
.training-mode-title svg{width:18px;height:18px;color:var(--muted)}
.training-mode-title[aria-expanded="true"] svg{transform:rotate(180deg)}
.training-mode-menu{position:absolute;top:calc(100% + 8px);left:0;width:min(310px,calc(100vw - 48px));padding:6px;border:1px solid var(--line);border-radius:20px;background:var(--surface);box-shadow:0 16px 40px #0002;animation:panel-in .15s ease-out}
.training-mode-menu button{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;min-height:66px;padding:10px 12px;background:transparent;text-align:left;border-radius:14px}
.training-mode-menu button[aria-checked="true"],.training-mode-menu button:hover,.training-mode-menu button:focus-visible{background:var(--soft)}
.training-mode-menu strong{display:block;font-size:.9375rem;font-weight:600;letter-spacing:-.02em}
.training-mode-menu small{display:block;color:var(--muted);font-size:.75rem;margin-top:3px}
.menu-check{font-size:1.2rem;color:var(--accent);min-width:20px;text-align:center}
.exam-body{display:flex;flex:1;flex-direction:column;min-height:0;gap:12px}
.exam-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;overflow-anchor:none;padding:8px 2px 10px;scrollbar-width:thin}
.exam-instruction{font-size:1rem;line-height:1.5;max-width:390px;margin:0 0 8px}
.exam-words{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:6px}
.exam-row{border:1px solid var(--line);border-radius:18px;padding:4px 12px;background:transparent;cursor:pointer;--exam-choice-colour:var(--accent)}
.exam-row.selected{background:var(--soft);border-color:var(--accent)}
.exam-row.selected.row-correct{background:var(--exam-success-soft);border-color:var(--success);--exam-choice-colour:var(--success)}
.exam-row.row-wrong{border-color:var(--exam-error);background:var(--exam-error-soft);--exam-choice-colour:var(--exam-error)}
.exam-line{position:relative;display:flex;align-items:center;min-height:46px;padding:0 34px 0 32px}
.exam-select{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between;width:100%;padding:0;background:transparent;border-radius:8px}
.exam-number{color:var(--muted);font-size:.8125rem;font-variant-numeric:tabular-nums}
.exam-choice{display:grid;place-items:center;width:22px;height:22px;border:1px solid var(--line);border-radius:7px;color:var(--bg);background:var(--surface)}
.exam-choice svg{width:17px;height:17px;opacity:0}
.selected .exam-choice{border-color:var(--exam-choice-colour);background:var(--exam-choice-colour)}
.selected .exam-choice svg{opacity:1}
.exam-word{position:relative;width:100%;height:46px;display:flex;align-items:center;font-family:Georgia,"Times New Roman",serif;font-size:clamp(1.45rem,6vw,2rem);font-weight:400;line-height:1.3;white-space:nowrap;pointer-events:none;overflow-wrap:normal}
.exam-word-text{position:relative;z-index:2;pointer-events:none;white-space:nowrap}
.exam-vowel{position:absolute;z-index:3;top:0;height:46px;min-width:0;padding:0;background:transparent;border-radius:4px;pointer-events:auto}
.exam-vowel::before{content:"";position:absolute;inset:7px 1px;border-radius:4px;background:var(--accent);opacity:.055}
.exam-vowel.annotated::before{opacity:.13}
.exam-vowel.annotated::after{content:"";position:absolute;top:8px;left:50%;width:9px;height:2px;background:var(--accent);border-radius:2px;transform:translateX(-30%) rotate(-55deg)}
.exam-vowel:not(:disabled):active::before{opacity:.2}
.exam-context{font-size:.75rem;color:var(--muted);line-height:1.4;margin:0 0 8px 32px}
.exam-word-result{display:flex;align-items:baseline;justify-content:space-between;gap:12px;height:24px;padding:0 0 6px 32px;font-size:.75rem;line-height:1.5}
.exam-verdict{color:var(--success);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row-wrong .exam-verdict{color:var(--exam-error)}
.exam-norm{color:var(--muted);flex-shrink:0;white-space:nowrap}
.exam-norm strong{color:var(--ink);font-weight:600}
.exam-row:has(.exam-select:disabled){cursor:default}
.exam-row:has(.exam-select:disabled) .exam-vowel::before{background:transparent}
.exam-footer{flex:none;padding-top:4px;border-top:1px solid var(--line)}
.exam-summary{min-height:48px;margin-bottom:10px}
.exam-selection{font-size:.8125rem;color:var(--muted);margin:0}
.exam-footer .primary{width:100%;min-height:52px;padding:14px 20px}
.exam-feedback{color:var(--success);margin:0;line-height:1.5;animation:answer-in .18s ease-out}
.exam-feedback strong{display:block;font-size:1rem;font-weight:600}
.exam-feedback span{display:block;font-size:.8125rem;color:var(--muted);margin-top:2px}
.exam-feedback.incorrect{color:var(--exam-error)}
@media(max-width:360px){.exam-row{padding-inline:9px}.exam-line{padding-left:25px;padding-right:28px}.exam-context,.exam-word-result{margin-left:0;padding-left:25px}.exam-word-result{height:44px;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:2px}.training-mode-menu{width:min(300px,calc(100vw - 36px))}}
@media(max-height:720px){.exam-scroll{padding-top:2px}.exam-words{gap:7px}.exam-instruction{font-size:.9375rem}.exam-body{gap:8px}.exam-footer .primary{min-height:48px;padding:12px 16px}.exam-vowel.annotated::after{top:4px}}
@media(max-height:480px) and (orientation:landscape){.exam-scroll{padding-top:4px}.exam-instruction{max-width:none}.exam-word{font-size:1.5rem}.exam-footer{display:flex;align-items:center;justify-content:space-between;gap:16px}.exam-footer .primary{width:240px;min-width:240px;flex:none}.exam-summary{margin:0;flex:1;min-width:0}}
