:root{--tys-paper:#f4f2ea;--tys-card:#fffefa;--tys-ink:#34465b;--tys-muted:#64758a;--tys-line:#e2dfd2;--tys-navy:#3d536e;--tys-blue:#e8eff7;--tys-gold:#f6edce;--tys-green:#18664b;--tys-red:#a43e35;--tys-radius:20px}
html{scroll-behavior:smooth;scroll-padding-top:92px;background:var(--tys-paper)}
body{margin:0;color:var(--tys-ink);background:var(--tys-paper);font:16px/1.6 "Segoe UI",Arial,sans-serif}
.tys-main,.tys-main button:not(:where(.tys-inline-editor *)),.tys-main input{font-family:"Segoe UI",Arial,sans-serif}
.tys-main *{box-sizing:border-box}
.tys-main{width:min(1050px,100% - 36px);margin:30px auto 72px;outline:none}
.tys-main h1,.tys-main h2,.tys-main h3,.tys-main p{margin-top:0}
.tys-main h1{font-size:clamp(1.8rem,4vw,2.65rem);line-height:1.18;letter-spacing:-.035em;margin-bottom:14px;color:#2d4058}
.tys-main h2{font-size:1.5rem;line-height:1.3;letter-spacing:-.015em}
.tys-main h3{font-size:1.14rem;line-height:1.4;margin-bottom:10px}
.tys-main button:not(:where(.tys-inline-editor *)),.tys-main a{touch-action:manipulation}
.tys-main button:not(:where(.tys-inline-editor *)){cursor:pointer;font-size:.94rem;line-height:1.35;border:1px solid var(--tys-line);color:var(--tys-ink);background:#fff;border-radius:12px;padding:11px 18px;font-weight:650}
.tys-main button:not(:where(.tys-inline-editor *)):hover:not(:disabled){background:var(--tys-blue);border-color:#a6b7cb}
.tys-main button:not(:where(.tys-inline-editor *)):disabled{opacity:.5;cursor:not-allowed}
.tys-main :focus-visible,.tys-dialog-close:focus-visible{outline:3px solid #4a8bbb;outline-offset:4px}
.tys-hero{padding:32px 36px 30px;background:var(--tys-card);border:1px solid #eae7dc;border-radius:var(--tys-radius);box-shadow:0 7px 26px #20334c09;margin-bottom:22px}
.tys-eyebrow{font-size:.78rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:#8b7334;margin-bottom:12px!important}
.tys-lead{font-size:1.04rem;max-width:770px;margin-bottom:18px;color:var(--tys-muted)}
.tys-level-links{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}
.tys-level-links a{display:inline-flex;align-items:center;text-decoration:none;color:var(--tys-ink);border:1px solid var(--tys-line);background:#fff;border-radius:99px;padding:7px 18px;font-weight:700;font-size:.9rem}
.tys-level-links a[aria-current=page]{background:var(--tys-navy);border-color:var(--tys-navy);color:white}
.tys-overview{display:flex;gap:9px;flex-wrap:wrap;margin:0}
.tys-overview span{background:#f0f3f6;color:#52657c;border-radius:7px;font-size:.8rem;padding:5px 11px}
.tys-year-tabs,.tys-paper-tabs{display:flex;gap:8px;overflow-x:auto;padding:5px 3px 10px;scrollbar-width:thin}
.tys-year-tabs{margin-bottom:15px}
.tys-year-tabs button,.tys-paper-tabs button{white-space:nowrap;flex:0 0 auto;border-radius:99px;box-shadow:0 2px 4px #21314906}
.tys-year-tabs button{padding:10px 21px}
.tys-year-tabs [aria-selected=true],.tys-paper-tabs [aria-selected=true]{color:white;background:var(--tys-navy);border-color:var(--tys-navy)}
.tys-year-tabs [aria-selected=true]:hover,.tys-paper-tabs [aria-selected=true]:hover{background:#32465e!important;color:white}
.tys-paper-tabs{margin:0 0 10px}
.tys-paper-head{background:var(--tys-card);border:1px solid var(--tys-line);border-radius:var(--tys-radius);padding:26px 30px;margin-bottom:20px}
.tys-paper-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}
.tys-paper-heading h2{margin-bottom:6px}
.tys-paper-description{color:var(--tys-muted);font-size:.92rem;margin-bottom:12px}
.tys-score{background:var(--tys-blue);padding:12px 18px;border-radius:12px;white-space:nowrap;text-align:right;color:#3f5875;font-size:.85rem;min-width:145px}
.tys-score strong{display:block;font-size:1.5rem;line-height:1.3;color:#304a67}
.tys-progress{margin-top:12px;font-size:.85rem;color:var(--tys-muted)}
.tys-progress-bar{height:5px;background:#e8edf3;border-radius:10px;margin:8px 0 0;overflow:hidden}
.tys-progress-bar i{display:block;height:100%;background:#6b8aa8;border-radius:10px;transition:width .2s}
.tys-paper-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:16px}
.tys-paper-tools span{font-size:.8rem;color:var(--tys-muted)}
.tys-paper-status{min-height:1.6em;margin:7px 0 0;font-size:.83rem;color:var(--tys-muted)}
.tys-writing-progress{font-size:.85rem;color:var(--tys-muted);margin:12px 0;min-height:1.6em}
.tys-answer-pads{display:grid;gap:14px;margin:14px 0 24px}
.tys-answer-card{border:1px solid #cfd9e4;border-radius:12px;padding:15px;background:#f7f9fc}
.tys-answer-card header{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.tys-answer-card h4{margin:0 0 3px;font-size:1rem;color:#344e6b}.tys-answer-state{font-size:.8rem;color:var(--tys-muted);margin:0}
.tys-answer-preview{height:190px;background:white;border:1px dashed #c6d0dd;border-radius:8px;display:flex;align-items:center;justify-content:center;text-align:center;color:var(--tys-muted);font-size:.85rem;overflow:hidden;padding:10px}
.tys-answer-preview img{width:100%;height:100%;object-fit:contain}
/* Inline answer editor: tools appear only while this pad is being edited. */
.tys-answer-preview[hidden],.tys-inline-slot[hidden]{display:none!important}
.tys-inline-editor{margin-top:10px;min-width:0;max-width:100%;overflow-anchor:none}
.tys-inline-editor .hw-scroll{max-height:min(65vh,650px);overflow:auto;overscroll-behavior:contain}
.tys-inline-editor .hw-bar{z-index:25}
.tys-inline-editor .hw-head{margin:4px 0 8px}.tys-inline-editor .hw-title,.tys-inline-editor .hw-head>[data-act="submit"]{display:none}
.tys-inline-editor .hw-root{margin:0}
@media(max-width:650px){.tys-answer-card{padding:12px}.tys-inline-editor .hw-scroll{max-height:60vh}}
.tys-main .tys-reset-paper{color:#99433c;border-color:#d9b8b0}
.tys-main .tys-export-report{background:var(--tys-navy);color:#fff;border-color:var(--tys-navy)}
.tys-main .tys-export-report:hover:not(:disabled){background:#2c415e;color:#fff}
.tys-paper-tools [hidden]{display:none}
.tys-reset-dialog{width:min(480px,calc(100vw - 32px));max-height:85vh;overflow:auto;border:1px solid var(--tys-line);border-radius:18px;padding:26px;color:var(--tys-ink);background:var(--tys-card);box-shadow:0 20px 70px #0004}
.tys-reset-dialog::backdrop{background:#172334aa}
.tys-reset-dialog h2{font-size:1.3rem}.tys-reset-dialog p{font-size:.95rem}
.tys-reset-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:22px}
.tys-main .tys-reset-confirm{background:#99433c;color:white;border-color:#99433c}
.tys-main .tys-reset-confirm:hover{background:#7e332d;color:white}
@media print{.tys-paper-tools,.tys-paper-status,.tys-reset-dialog{display:none!important}}
.tys-jump{display:flex;gap:6px;flex-wrap:wrap;margin-top:18px}
.tys-jump a{display:flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;padding:3px;border:1px solid #dfe3e8;border-radius:8px;text-decoration:none;background:white;color:#56697f;font-size:.8rem;font-weight:700}
.tys-jump a.is-correct{background:#eaf5ef;color:var(--tys-green);border-color:#bad8c9}
.tys-jump a.is-incorrect{background:#fbefec;color:var(--tys-red);border-color:#e8c8c3}
.tys-jump a.is-practice{background:var(--tys-gold);border-color:#e6d8b0}
.tys-jump a[aria-busy=true]{background:var(--tys-blue);border-color:#607d9e}
.tys-jump a[aria-current=location]{box-shadow:inset 0 0 0 1px var(--tys-navy)}
.tys-jump-status{min-height:1.6em;margin:8px 0 0;font-size:.8rem;color:var(--tys-muted)}
.tys-question{background:var(--tys-card);border:1px solid var(--tys-line);border-radius:var(--tys-radius);padding:24px 28px;margin-bottom:23px;box-shadow:0 3px 13px #20334c05;scroll-margin-top:90px}
.tys-question-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.tys-question-head h3{margin:0}
.tys-question-number{font-size:.78rem;background:#eef2f7;color:#526880;border-radius:7px;padding:4px 9px;white-space:nowrap}
.tys-question .typed-question{border-radius:9px;margin:14px 0;background:white;overflow-x:auto}
.tys-question .typed-loading{min-height:100px}
.tys-question .exam-paper-tools{background:#fafaf7}
.tys-question .exam-paper{min-width:600px}
.tys-question .exam-page{min-height:0}
.tys-shared-label{font-size:.8rem;color:var(--tys-muted);font-weight:650;margin:14px 0 6px}
.tys-scope-note{font-size:.8rem;border-left:3px solid #d5c381;padding:7px 12px;color:#7b682f;background:#fcf8e9;margin:13px 0}
.tys-options{border:0;padding:0;margin:20px 0 14px;min-width:0}
.tys-options legend{font-size:.85rem;font-weight:700;margin-bottom:8px;color:#5b6e83;padding:0}
.tys-option-row{display:flex;gap:9px;flex-wrap:wrap}
.tys-option{display:flex;gap:9px;align-items:center;min-width:84px;padding:10px 18px;border:1px solid #d4dce5;border-radius:11px;background:#fff;cursor:pointer;line-height:1.4;font-weight:700}
.tys-option:has(input:checked){border-color:#607d9e;background:#e9eff7;color:#304c6d;box-shadow:inset 0 0 0 1px #607d9e}
.tys-option:has(input:disabled){cursor:default}
.tys-option input{accent-color:#3d597c;width:17px;height:17px;margin:0}
.tys-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.tys-main .tys-submit,.tys-main .tys-submit-all{background:var(--tys-navy);color:white;border-color:var(--tys-navy)}
.tys-main .tys-submit:hover:not(:disabled),.tys-main .tys-submit-all:hover:not(:disabled){background:#2c415e;border-color:#2c415e;color:white}
.tys-hint{font-size:.82rem;color:var(--tys-muted);margin:0}
.tys-feedback{margin-top:21px;padding-top:20px;border-top:1px solid #e0e5ec}
.tys-feedback[hidden]{display:none}
.tys-result{display:flex;gap:10px;align-items:center;padding:12px 15px;border-radius:11px;background:#edf5f0;color:var(--tys-green);font-weight:700;margin-bottom:14px}
.tys-result.is-incorrect{background:#faeeeb;color:var(--tys-red)}
.tys-result.is-practice{background:#faf3dd;color:#796526}
.tys-answer-line{font-weight:750;color:#354d67;margin-bottom:9px}
.tys-explanation{font-size:.94rem;white-space:pre-line;margin-bottom:12px;overflow-wrap:anywhere}
.tys-source-note{font-size:.83rem;color:#6d6b59;border-left:3px solid #cdbf91;background:#f7f4e9;padding:10px 14px;margin:12px 0 16px;white-space:pre-line}
.tys-first-attempt{font-size:.8rem;color:var(--tys-muted);margin-bottom:13px}
.tys-video-box{margin-top:22px;border:1px solid #dce4ed;border-radius:14px;padding:18px;background:#f6f8fb;overflow:hidden}
.tys-video-box>h4{font-size:.96rem;margin:0 0 12px;color:#344e6b}
.tys-video-planned{margin-top:18px;background:#f1f3f5;padding:12px 15px;border-radius:10px;font-size:.85rem;color:#607083}
.tys-end{padding:27px 30px;background:var(--tys-card);border:1px solid var(--tys-line);border-radius:var(--tys-radius);margin:28px 0}
.tys-end h3{margin-bottom:7px}.tys-end p{color:var(--tys-muted);font-size:.9rem;margin-bottom:15px}
.tys-submit-all-status{margin:14px 0 0!important;min-height:1.5em}
.tys-source-details{font-size:.83rem;color:var(--tys-muted);padding:0 5px;margin-top:28px}
.tys-source-details summary{cursor:pointer;color:#53687e;font-weight:650;padding:8px 0}
.tys-source-details p{margin:10px 0}
.tys-footer{text-align:center;color:#8591a0;font-size:.8rem;margin-top:28px}
.tys-loading{padding:36px;color:var(--tys-muted);background:var(--tys-card);border:1px solid var(--tys-line);border-radius:var(--tys-radius)}
.tys-skip{position:fixed;left:15px;top:-100px;z-index:99999;padding:12px 20px;background:white;color:#243c58;border:2px solid #3d536e;border-radius:8px}
.tys-skip:focus{top:10px}
#image-dialog{max-width:94vw;max-height:92vh;width:max-content;border:1px solid #c5cfda;border-radius:14px;padding:32px 22px 18px;color:#475c73;background:white;box-shadow:0 24px 90px #0005}
#image-dialog::backdrop{background:#172334aa}
#image-dialog img{display:block;max-width:86vw;max-height:76vh;object-fit:contain;margin:auto}
#image-dialog p{font:12px/1.4 "Segoe UI",Arial,sans-serif;max-width:600px;color:#738195;margin:12px 0 0}
.tys-dialog-close{position:absolute;right:7px;top:4px;border:0;background:white;color:#354e6c;border-radius:50%;width:30px;height:30px;cursor:pointer;font-size:25px}
@media(max-width:650px){.tys-main{width:calc(100% - 20px);margin-top:18px}.tys-hero{padding:24px 20px}.tys-paper-head{padding:21px 18px}.tys-question{padding:19px 14px;border-radius:15px}.tys-question-head{gap:6px}.tys-paper-heading{display:block}.tys-score{display:flex;align-items:center;justify-content:space-between;text-align:left;margin-top:14px;min-width:0;padding:10px 14px;gap:12px}.tys-score strong{font-size:1.25rem}.tys-question .exam-paper{min-width:600px}.tys-option{min-width:64px;padding:10px 12px}.tys-year-tabs button{padding:10px 18px}.tys-video-box{padding:12px}.tys-end{padding:23px 20px}.tys-question-number{font-size:.7rem}.tys-hint{width:100%}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.tys-progress-bar i{transition:none}}
@media print{.ach,.tys-actions,.tys-end,.tys-options,.tys-level-links,.tys-jump,.tys-video-box,.tys-year-tabs,.tys-paper-tabs,.tys-skip{display:none!important}.tys-main{width:100%;margin:0}.tys-question,.tys-hero,.tys-paper-head{border:0;box-shadow:none;padding:12px 0;break-inside:avoid}.tys-question .exam-paper{min-width:0}.tys-question .typed-question{overflow:visible;border:0}.tys-paper{background:white}}

/* The same yellow scope labels appear in the header and question jump links. */
.tys-oos-tag{display:inline-flex;align-items:center;vertical-align:middle;white-space:nowrap;background:#fff0b8;color:#73510a;border:1px solid #dfbe5d;border-radius:999px;padding:3px 9px;font:700 .7rem/1.35 'Segoe UI',Arial,sans-serif;letter-spacing:.02em}
.tys-question-head h3{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.tys-jump a{gap:4px;flex-wrap:wrap}.tys-oos-mini{border-radius:4px;font-size:.53rem;padding:1px 3px}.tys-scope-legend{font-size:.8rem;color:#6c725e;margin:14px 0 0}.tys-scope-note p{margin:4px 0}.tys-scope-reasons{margin-top:8px}.tys-scope-reasons summary{cursor:pointer;font-weight:650}.tys-scope-reasons li{margin:7px 0}
@media print{.tys-oos-tag{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
.tys-answers-btn{display:inline-flex;align-items:center;gap:6px;align-self:flex-start;margin:0 0 0 14px;padding:8px 16px;border-radius:999px;border:1.6px solid #e3ddcc;background:#fdfcf8;color:#33506d;font-weight:800;font-size:.9rem;text-decoration:none;box-shadow:0 1px 3px rgba(43,57,71,.07);white-space:nowrap}
.tys-answers-btn::before{content:"\1F4D6"}
.tys-answers-btn:hover{border-color:#4a9fe3}
@media print{.tys-answers-btn{display:none}}
