:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#18363c;background:#f3f7f4;font-synthesis:none;--deep:#154a50;--teal:#17676b;--line:#dce7df;--muted:#506761;--paper:#fff;--mint:#e1f2e8;--sky:#23485d}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html{overscroll-behavior-y:none;scroll-padding-block:12px}html:has(dialog[open]){overflow:hidden}body{margin:0;min-width:0;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}button,input,select,textarea{font:inherit}button{cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.55}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #277d80;outline-offset:3px}h1,h2,h3,p{margin:0}p{line-height:1.6}h1,h2,h3{line-height:1.12;overflow-wrap:anywhere}h1{font-size:clamp(2rem,5.5vw,4.25rem);letter-spacing:-.065em}h2{font-size:clamp(1.4rem,3vw,2.05rem);letter-spacing:-.04em}h3{font-size:1rem}img{display:block;max-width:100%}button{min-height:44px}select,textarea{color:inherit;border:1px solid #acc3b6;border-radius:12px;padding:.7rem;background:white;width:100%}textarea{resize:vertical;min-height:130px;min-width:0}.top{border-bottom:1px solid #e1ebe3;background:#fafcf9}.bar,main{width:min(1120px,calc(100% - 44px));margin:auto}.bar{min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{border:0;background:none;display:flex;align-items:center;gap:10px;padding:0;font-weight:800;font-size:1.32rem;letter-spacing:-.05em}.brand img{width:35px;height:35px;object-fit:contain}main{padding:24px 0 0;overflow-wrap:anywhere}.button{border:1px solid transparent;border-radius:14px;padding:.62rem 1rem;font-weight:700;background:var(--deep);color:white;transition:background .18s,transform .18s;text-align:center}.button:hover{background:#23636a}.button:active{transform:translateY(1px)}.quiet{color:var(--deep);background:white;border-color:var(--line)}.quiet:hover{background:#ecf5ee}.ghost{color:var(--deep);background:transparent;padding-inline:.45rem}.ghost:hover{background:#e5efe7}.hero{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;background:radial-gradient(ellipse at 87% 15%,#dcf3ce,transparent 55%),linear-gradient(125deg,#e6f3ea,#dbeee9);border:1px solid #d9e9db;border-radius:24px;padding:clamp(10px,1.5vw,15px)}.hero img{width:clamp(36px,5vw,44px);height:auto;object-fit:contain;justify-self:center;filter:drop-shadow(0 14px 18px #254f552a)}.hero h1{font-size:clamp(1.45rem,3.2vw,2.5rem);letter-spacing:-.045em}.library-sets{margin-top:14px}.library-sets .card{position:relative;gap:7px;padding:13px 48px 13px 53px;border-radius:17px}.library-sets h2{font-size:1rem;line-height:1.35}.section{margin-top:30px}.section>h2,.section>h3{margin-bottom:14px}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:16px}.card,.panel{background:var(--paper);border:1px solid var(--line);border-radius:23px;padding:clamp(17px,3vw,28px);min-width:0;box-shadow:0 8px 28px #27483508}.card{display:grid;gap:12px;align-content:start}.card .button{justify-self:start}.meta,.row,.actions{display:flex;align-items:center;flex-wrap:wrap;gap:9px}.actions{margin-top:18px}.muted{color:var(--muted)}.pill{display:inline-flex;align-items:center;border-radius:999px;background:#edf3ef;padding:4px 9px;font-size:.76rem;font-weight:750;color:#38574e}.pill.high{background:#def1d3;color:#2c542b}.pill.extra{background:#eceef2;color:#485366}.pane{display:grid;grid-template-columns:minmax(225px,31%) minmax(0,1fr);gap:20px;align-items:start;margin-top:21px}.stack{display:grid;gap:12px}.chapter{display:flex;justify-content:space-between;gap:10px;align-items:center;width:100%;text-align:left;border:1px solid var(--line);border-radius:12px;background:#f8faf8;padding:.6rem .7rem}.chapter[aria-current=true]{border-color:#81ab92;background:var(--mint)}.chapter small{flex-shrink:0}.chapter:has(input){cursor:pointer}.chapter input{accent-color:var(--teal);width:19px;height:19px;flex:none}.question,.lesson{display:grid;gap:17px;animation:appear .22s ease-out}.lesson p{white-space:pre-line}.lesson h2,.question h2{max-width:32ch}.option{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);border-radius:14px;padding:.75rem;background:#fbfcfb;cursor:pointer}.option:has(input:checked){background:#e7f3ed;border-color:#70a698}.option input{accent-color:var(--teal);margin-top:.25rem;flex:none}.match{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);align-items:center;gap:10px}.feedback{padding:16px;border-radius:15px;background:#edf6ed;border:1px solid #d9e9de}.feedback.review{background:#fff6e7;border-color:#f2e0be}.feedback ul{padding-left:1.25rem;margin-bottom:0}.feedback li+li{margin-top:6px}.progress{height:8px;border-radius:999px;background:#e7eee8;overflow:hidden}.progress span{display:block;height:100%;background:#447f67;border-radius:inherit;transition:width .2s}.breadcrumb{margin-bottom:13px}.heading{display:grid;gap:12px}.heading h1,.title-editor textarea{font-size:clamp(1.95rem,5vw,3.35rem)}.split{justify-content:space-between}.settings label:not(.chapter){display:grid;gap:6px;font-weight:650}.settings input[type=range]{width:100%;accent-color:var(--teal);min-width:0}.mobile{display:none}dialog{overscroll-behavior-y:none;border:1px solid var(--line);border-radius:24px;padding:24px;width:min(470px,calc(100% - 24px));max-height:85dvh;color:inherit;box-shadow:0 20px 80px #15332e40}dialog::backdrop{background:#17393466;backdrop-filter:blur(3px)}.notice{margin-top:12px;color:#844025}:is(textarea,input:not([type]),input:is([type="text"],[type="search"],[type="email"],[type="url"],[type="tel"],[type="password"],[type="number"])){user-select:text;-webkit-user-select:text;-webkit-touch-callout:default}pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;background:#edf3ef;padding:12px;border-radius:12px}@keyframes appear{from{opacity:.6;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:720px){main,.bar{width:calc(100% - 28px)}main{padding-top:12px}.bar{min-height:61px}.hero{gap:10px;border-radius:20px}.pane{grid-template-columns:minmax(0,1fr);gap:12px}.pane .desktop{display:none}.mobile{display:inline-flex}.match{grid-template-columns:minmax(0,1fr)}dialog{margin:auto auto 0;border-radius:22px 22px 0 0;width:100%;max-width:100%;padding-bottom:calc(21px + env(safe-area-inset-bottom))}}
@media(max-width:370px){.actions .button{flex:1 1 auto}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
main h1[tabindex="-1"]:focus{outline:none}
.header-actions:not([hidden]){display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}
.login-shell{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);max-width:850px;margin:clamp(8px,6vh,70px) auto 0;border:1px solid var(--line);border-radius:30px;overflow:hidden;background:#fff;box-shadow:0 20px 65px #27483512}
.login-art{display:grid;place-items:center;min-width:0;padding:25px;background:radial-gradient(ellipse at 70% 15%,#dcf3ce,transparent 65%),linear-gradient(145deg,#e8f4eb,#cfe7e1)}
.login-art img{object-fit:contain;filter:drop-shadow(0 14px 18px #254f552a)}
.login-panel{padding:clamp(20px,5vw,52px);min-width:0}
.login-panel h1{font-size:clamp(2.2rem,6vw,3.7rem)}
.account-form{margin-top:8px}
.account-form label{display:grid;gap:5px;font-weight:650}
.account-form input{width:100%;min-width:0;min-height:44px;padding:.65rem .75rem;border:1px solid #acc3b6;border-radius:12px;color:inherit;background:white}
.form-message{color:#963c30}
.form-message:empty{display:none}
.account-list{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.account-list li{display:flex;align-items:center;justify-content:space-between;min-height:52px;gap:10px;padding:4px 8px 4px 12px;background:#f7faf7;border:1px solid var(--line);border-radius:12px;overflow-wrap:anywhere}
.danger{color:#963c30}
.danger-primary{background:#943d31}
.danger-primary:hover{background:#773126}
@media(max-width:600px){.login-shell{grid-template-columns:minmax(0,1fr);border-radius:24px}.login-art img{height:88px;width:88px}.login-art{padding:14px}.bar{padding-block:6px}.header-actions .button{padding-inline:.65rem;font-size:.85rem}}

.dialog-heading{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:12px}
.dialog-heading h2{font-size:clamp(1.2rem,4vw,1.65rem)}
.close-dialog{width:44px;height:44px;padding:0;display:grid;place-items:center;border-radius:50%;background:#edf3ef;font-size:1.6rem;line-height:1;font-weight:500}
.dialog-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
.dialog-actions.pair{grid-template-columns:repeat(2,minmax(0,1fr))}
#dialog .button{overflow-wrap:anywhere}
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.settings-grid .picker-label{font-weight:650}
.picker:not(.match){display:grid;gap:6px;min-width:0}
.picker-trigger,.picker-option{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;min-height:44px;text-align:left;overflow-wrap:anywhere;border:1px solid #acc3b6;border-radius:12px;padding:.62rem .75rem;background:white;color:inherit;-webkit-tap-highlight-color:transparent}
.picker-trigger:focus:not(:focus-visible),.picker-option:focus:not(:focus-visible){outline:none}
.picker-chevron{display:grid;place-items:center;width:18px;height:18px;color:var(--teal)}
.picker-chevron::before{content:"";width:9px;height:9px;border:solid currentColor;border-width:0 2.5px 2.5px 0;border-radius:1px;transform:translateY(-2px) rotate(45deg)}
.picker-options{display:grid;gap:7px;padding:3px}
.picker-option{border-color:var(--line);background:#f8faf8}
.picker-option[aria-current=true]{background:var(--mint);border-color:#81ab92;font-weight:650}
.picker-tick{visibility:hidden;color:var(--deep)}
.picker-option[aria-current=true] .picker-tick{visibility:visible}
@media(hover:hover){.picker-trigger:hover,.picker-option:hover{background:#eef5ef}}
.round-length{padding-top:10px}
.quiz-layout{max-width:840px;margin:auto}
main:has(.quiz-layout){padding-top:clamp(8px,2vw,20px)}
.quiz-header{display:grid;gap:4px;margin-bottom:12px}
.quiz-header .progress{height:5px}
.quiz-count{color:var(--muted);font-size:.88rem;font-weight:700}
.quiz-layout .question{gap:12px;padding:clamp(14px,2.6vw,25px)}
.question-meta{display:grid;gap:5px}
.question-chapter{color:var(--muted);font-size:.85rem;font-weight:650;line-height:1.35}
.question-chapter span{margin-inline-end:5px;font-size:.69rem;letter-spacing:.06em;text-transform:uppercase}
.quiz-layout h1{font-size:clamp(1.28rem,2.55vw,1.95rem);letter-spacing:-.035em;line-height:1.2}
.question-prompt,.question-context{display:grid;gap:9px}
.question-context p{font-size:.94rem;line-height:1.55;white-space:pre-line}
.quiz-layout .option{min-height:44px;padding:.62rem .7rem}
.quiz-layout form{gap:8px}
.quiz-layout .actions{margin-top:6px}
.feedback .answer-review-list{display:grid;gap:8px;list-style:none;padding:0;margin:12px 0 0}
.feedback .answer-review-list li{margin:0}
.choice-totals{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.choice-totals .pill{gap:4px;font-variant-numeric:tabular-nums}
.choice-totals .choice-total-right{color:#21523a;background:#e5f5e8}
.choice-totals .choice-total-wrong{color:#773934;background:#fff0ee}
.choice-totals{align-items:center;gap:4px}
.choice-totals .pill{padding-inline:5px;font-size:.73rem}
.choice-verdict{margin-inline-start:auto;font-size:.73rem;font-weight:750}
@media(max-width:385px){.feedback:has(.choice-totals){padding-inline:11px}}
.quiz-layout .quiz-actions{flex-wrap:nowrap;align-items:stretch;gap:6px}
.quiz-actions .button{padding-inline:clamp(.45rem,2vw,1rem);overflow-wrap:anywhere}
.quiz-actions .previous-question{display:grid;place-items:center;width:44px;padding:0;flex:none}
#answer-error:empty{display:none}
.term-notes{display:grid;gap:5px;margin:8px 0;font-size:.87rem}
.term-notes dt{font-weight:750}
.term-notes dd{margin:0;line-height:1.45}
.model-answer{white-space:pre-line}
.download-link{display:block;text-decoration:none}
.round-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
.round-actions .button{padding-inline:.5rem}
.answer-review{display:grid;gap:4px;border:1px solid;border-radius:12px;padding:10px 12px}
.answer-correct{color:#21523a;background:#e5f5e8;border-color:#9fc9a9}
.answer-incorrect{color:#773934;background:#fff0ee;border-color:#e0aba4}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.answer-selected{border-width:3px;border-color:currentColor;padding:8px 10px}
.answer-review p,.answer-review summary{font-size:.9rem}
.answer-review summary{cursor:pointer;font-weight:650}
.answer-review details p{margin-top:4px}
@media(max-width:720px){.settings-grid{grid-template-columns:minmax(0,1fr)}}


.back-button{display:inline-flex;align-items:center;gap:9px}
.arrow{display:inline-block;position:relative;flex:0 0 19px;width:19px;height:20px}
.arrow::before,.arrow::after{content:"";position:absolute;top:50%}
.arrow::before{left:2px;width:15px;height:2.5px;background:currentColor;border-radius:2px;transform:translateY(-50%)}
.arrow::after{left:3px;width:8px;height:8px;border:solid currentColor;border-width:0 0 2.5px 2.5px;border-radius:1px;transform:translateY(-50%) rotate(45deg)}
.lesson-text{display:grid;gap:.9em;max-width:65ch}
.lesson-text p{line-height:1.7}
.centered-dialog{overflow:hidden;padding:18px}
.centered-dialog>.stack{display:flex;flex-direction:column;max-height:calc(80dvh - 38px);min-height:0}
.centered-dialog>.stack>:not(.chapter-list,.picker-options){flex-shrink:0}
.chapter-list{display:grid;gap:8px;padding:3px}
.centered-dialog :is(.chapter-list,.picker-options){min-height:0;overflow:auto;overscroll-behavior:none}
@media(max-width:720px){dialog.centered-dialog{position:fixed;inset:0;margin:auto;width:min(470px,calc(100% - 28px));max-height:80dvh;border-radius:22px}}
.start-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
.start-actions .button{padding-inline:.55rem;overflow-wrap:anywhere}

@media(max-width:720px){
  .breadcrumb{margin-bottom:6px}
  .heading h1,.title-editor textarea{font-size:clamp(1.45rem,5vw,1.95rem)}
  .pane{margin-top:12px}
  .start-actions{margin-top:4px}
}

.arrow-right{transform:rotate(180deg)}
.order-label .arrow{width:14px;vertical-align:middle;transform:rotate(180deg) scale(.68)}
.order-label .arrow::before{left:0}
.order-label .arrow::after{left:1px}
.order-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.order-grid[hidden]{display:none}
fieldset.order-grid{border:0;padding:0;margin:0;min-width:0}
.order-grid legend{padding:0;margin-bottom:6px;color:var(--muted);font-size:.85rem}
.order-choice{position:relative;display:grid;place-items:center;min-height:44px;padding:5px;border:1px solid var(--line);border-radius:10px;background:#f8faf8;text-align:center;cursor:pointer}
.order-choice input{position:absolute;z-index:1;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.order-choice:has(input:checked){background:var(--mint);border-color:#81ab92;font-weight:650}
.order-choice:has(input:focus-visible){outline:3px solid #277d80;outline-offset:2px}
.order-grid[data-order-mode="priority"] .order-choice:first-of-type{grid-column:1/-1}
.match-term{font-size:1rem}
.match-review{display:grid;gap:6px;margin:3px 0 0}
.match-review-value{display:grid;grid-template-columns:19px minmax(0,1fr);align-items:center;gap:8px;padding:5px 8px}
.match-review-value.answer-correct{border:1px solid #9fc9a9;border-radius:9px}
.match-review dt{font-size:.78rem;font-weight:700}
.match-review dd{margin:1px 0 0;line-height:1.4}
summary{list-style:none}
summary::-webkit-details-marker{display:none}
summary::before{content:"";display:inline-block;width:7px;height:7px;margin:0 9px 2px 3px;border:solid currentColor;border-width:0 2.5px 2.5px 0;border-radius:1px;transform:rotate(-45deg)}
details[open]>summary::before{transform:rotate(45deg)}

.card-open{position:absolute;inset:0;z-index:1;width:100%;border:0;border-radius:inherit;background:transparent}
.card-open:focus-visible{outline-offset:2px}
.set-selection{position:absolute;inset:3px auto auto 4px;z-index:2;display:grid;place-items:center;width:44px;height:44px;cursor:pointer}
.set-selection input{width:20px;height:20px;margin:0;accent-color:var(--teal);cursor:inherit}
.library-sets .card:has(input:checked){border-color:#71a78d;background:#e8f4ed}
.card-arrow{position:absolute;right:15px;top:50%;transform:translateY(-50%);color:var(--teal);display:grid;place-items:center}
.library-empty{padding-inline:4px}
.icon-button,.header-actions .icon-button{display:inline-grid;place-items:center;min-width:44px;min-height:44px;padding:0}
.transfer-icon{position:relative;display:grid;place-items:center;width:24px;height:24px}
.transfer-icon::after{content:"";position:absolute;inset:auto 3px 1px;height:5px;border:2px solid currentColor;border-top:0;border-radius:0 0 3px 3px}
.transfer-icon .arrow{margin-top:-5px;transform:rotate(90deg)}
.transfer-icon.import .arrow{transform:rotate(-90deg)}
@media(hover:hover){.library-sets .card:has(.card-open:hover,.set-selection:hover){border-color:#71a78d}}

.set-title-button{display:block;width:100%;min-height:0;padding:0;border:0;border-radius:9px;background:transparent;text-align:left;font:inherit;letter-spacing:inherit;overflow-wrap:anywhere}
.set-title-button:hover{background:#e8f2ec}
.set-title-button.title-saved:focus{background:transparent}
.set-title-button.title-saved:focus-visible{outline-color:transparent;animation:title-focus-fade .24s ease-out}
@keyframes title-focus-fade{from{outline-color:#277d80}to{outline-color:transparent}}
.title-editor{display:grid;gap:8px}
.title-editor textarea{display:block;min-height:0;padding:0;border:0;border-radius:9px;background:#e8f2ec;resize:none;overflow:hidden;font-weight:700;line-height:1.12;letter-spacing:-.065em;overflow-wrap:anywhere}
.library-tools:not([hidden]){display:flex;gap:8px}
.library-status{margin-top:10px}
.library-status:empty{margin:0}
.folder-mark{position:absolute;top:13px;left:16px;color:var(--teal)}
.library-sets .folder-card{min-height:60px;align-content:center;background:#edf5ef}
.library-sets .cut-card{opacity:.6}
.delete-selection{max-height:30dvh;overflow:auto;margin:0;padding-inline-start:1.4em}
@media(max-width:520px){
  .bar:has(.header-actions:not([hidden]) .library-tools:not([hidden])){display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:6px}
  .bar:has(.library-tools:not([hidden])) .header-actions:not([hidden]){display:contents}
  .library-tools:not([hidden]){grid-row:2;grid-column:1/-1;justify-content:flex-end;gap:6px}
}
