:root{color-scheme:dark;--bg:#0d152b;--surface:#15213e;--panel:#1b2a4c;--line:#35466d;--ink:#f6f5ff;--muted:#c4cce3;--gold:#ffd27e;--mint:#80e5d3;--focus:#b0fff2;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink);line-height:1.55}
*,*::before,*::after{box-sizing:border-box}
body{margin:0}
a,button,input,textarea,select{-webkit-tap-highlight-color:transparent}
a{color:inherit;text-underline-offset:.24em}
button,textarea,select{font:inherit}
button{cursor:pointer}
button:disabled{cursor:default}
:focus-visible{outline:3px solid var(--focus);outline-offset:4px}
[hidden]{display:none!important}
h1,h2,h3,h4,p,dl{margin:0}
h1,h2,h3,h4{line-height:1.13;letter-spacing:-.025em}
p{color:var(--muted)}
.shell{width:min(1160px,calc(100% - 48px));margin-inline:auto}
.bar{border-bottom:1px solid #283755;background:#0e1930}
.bar-inner{min-height:66px;display:flex;align-items:center;justify-content:space-between;gap:1rem}
.identity{display:inline-flex;align-items:center;gap:.7rem;text-decoration:none;font-size:1rem;font-weight:780}
.brand-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#28376b;color:var(--gold);font-size:1.3rem}
.nav-link{color:var(--muted);font-size:.95rem}
.skip{position:absolute;left:1rem;top:-6rem;z-index:4;padding:.6rem;background:var(--gold);color:#171423}
.skip:focus{top:1rem}
#main{min-height:70vh}
.hero{position:relative;isolation:isolate;margin-top:34px;min-height:432px;overflow:hidden;border:1px solid #43517d;border-radius:30px;background-color:#19254b;background-image:linear-gradient(90deg,#141c3c 3%,#172244 35%,#172244a0 52%,transparent 78%),url('./hero.webp');background-repeat:no-repeat;background-position:center,right center;background-size:100% 100%,auto 107%;display:flex;flex-direction:column;justify-content:space-between}
.hero-copy{padding:clamp(1.9rem,5.7vw,4.2rem);max-width:590px}
.kicker{font-size:.88rem;font-weight:780;letter-spacing:.08em;text-transform:uppercase;color:var(--accent,var(--mint))}
.hero h1,.lesson-head h1{font-size:clamp(2.4rem,6vw,5.15rem);letter-spacing:-.065em;line-height:.99;text-wrap:balance;margin:.55rem 0 1rem}
.hero-copy p:not(.kicker){max-width:360px;color:#e9edff;font-size:1.04rem;margin-bottom:1.45rem}
.hero-stats{display:flex;align-items:center;gap:clamp(.75rem,3vw,2.5rem);padding:1rem clamp(1.9rem,5.7vw,4.2rem);background:#101a34d9;border-top:1px solid #53618a7d}
.hero-stats div{display:flex;gap:.45rem;align-items:baseline}
.hero dt{font-weight:800;font-size:1.25rem;color:var(--gold)}
.hero dd{margin:0;color:var(--muted);font-size:.89rem}
.button{border:1px solid #5466a0;background:#364b92;color:#fff;min-height:44px;padding:.55rem 1.03rem;border-radius:10px;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;font-weight:730;font-size:.95rem;line-height:1.2;white-space:normal}
.button:hover:not(:disabled){filter:brightness(1.15)}
.button.gold{background:var(--gold);color:#281c1e;border-color:#f6c16f}
.button.secondary{background:#253653}
button:disabled:not(.option){opacity:.45}
.collection,.practice{padding-top:3rem;padding-bottom:1rem;scroll-margin-top:18px}
.section-title{display:flex;align-items:end;justify-content:space-between;gap:1.2rem;margin-bottom:1.2rem}
.section-title h2{font-size:clamp(1.65rem,3.4vw,2.5rem);margin-top:.3rem}
.section-title>p{font-size:.96rem}
.book-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.book-card{min-width:0;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:19px;overflow:hidden;background:#15223f;text-decoration:none;transition:border-color .17s,transform .17s}
.book-card:hover{border-color:var(--accent);transform:translateY(-2px)}
.cover{aspect-ratio:2.02;position:relative;background:radial-gradient(ellipse at 72% 20%,color-mix(in srgb,var(--accent) 50%,#1a2e4b),transparent 63%),linear-gradient(140deg,#15243f,#223056);overflow:hidden}
.cover-number{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-55%);font-family:Georgia,serif;font-size:5.4rem;color:var(--accent);opacity:.9;letter-spacing:-.05em;line-height:1}
.cover img{display:block;position:absolute;width:100%;height:100%;inset:0;object-fit:cover;object-position:center 42%;background:#172541}
.card-content{padding:1rem;display:flex;flex-direction:column;flex:1}
.card-content h3{font-size:1.28rem;margin:.35rem 0 .5rem}
.card-content>p:not(.kicker){font-size:.96rem;margin-bottom:1rem}
.card-meta{margin-top:auto;display:flex;justify-content:space-between;gap:.6rem;border-top:1px solid #344264;padding-top:.68rem;color:var(--muted);font-size:.9rem}
.footer{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;color:var(--muted);font-size:.91rem;padding-block:1.15rem 1.8rem;margin-top:2.4rem;border-top:1px solid #334062}
.back{display:inline-block;color:var(--muted);margin-block:1.55rem .9rem}
.lesson-head{display:grid;grid-template-columns:1fr minmax(208px,27%);gap:1.5rem;background:linear-gradient(120deg,#1c2d55,#161f3e);border:1px solid #3a4a76;border-top:4px solid var(--accent);border-radius:19px;padding:clamp(1.1rem,3.6vw,2.5rem)}
.lesson-head h1{font-size:clamp(2rem,4.7vw,3.6rem);letter-spacing:-.055em}
.lesson-head p:not(.kicker){margin-bottom:1rem}
.lesson-status{align-self:start;border:1px solid #4a5f91;border-radius:13px;background:#111e3b;padding:1rem}
.lesson-status h2{font-size:1.15rem;margin-bottom:.68rem}
.stats{display:grid;gap:.25rem;color:var(--muted);font-size:.95rem}
.stats strong{color:var(--gold)}
.lesson-status #save-info{font-size:.86rem;margin:.7rem 0 0}
.mode-tabs{display:flex;gap:.55rem;flex-wrap:wrap;margin-bottom:.85rem}
.mode-tabs button{display:flex;align-items:center;gap:.55rem;min-height:45px;border:1px solid #50628f;border-radius:10px;color:var(--ink);background:#182746;padding:.5rem .9rem;font-weight:740}
.mode-tabs button[aria-pressed="true"]{background:#d4e8ff;color:#142347;border-color:#d4e8ff}
.mode-tabs button span{border-radius:6px;background:#ffffff26;padding:0 .28rem;font-size:.85rem}
.mode-tabs button[aria-pressed="true"] span{background:#233b6420}
.filters{display:flex;gap:1rem;flex-wrap:wrap;align-items:center;margin-bottom:1rem;color:var(--muted)}
.filters>label:first-child{display:flex;align-items:center;gap:.6rem}
select,textarea{min-height:44px;border:1px solid #5e709b;border-radius:9px;background:#0f1b35;color:var(--ink);padding:.5rem .66rem}
select{padding-right:1.8rem;appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);background-position:calc(100% - 14px) 53%,calc(100% - 9px) 53%;background-size:5px 5px;background-repeat:no-repeat}
.check{display:flex;gap:.6rem;align-items:baseline;color:var(--muted)}
.check input{width:1.09rem;height:1.09rem;accent-color:#9be4d4;flex:none;transform:translateY(.16rem)}
.question-panel{background:#172644;border:1px solid var(--line);border-radius:20px;padding:clamp(1rem,3.6vw,2rem)}
.question-top{display:flex;flex-wrap:wrap;align-items:center;gap:.65rem;margin-bottom:.7rem;font-size:.91rem;color:var(--muted)}
.level{color:var(--mint);background:#193a45;border:1px solid #42646c;border-radius:99px;padding:.22rem .57rem}
.question-panel h3{font-size:clamp(1.25rem,3vw,1.65rem);line-height:1.28;margin:0 0 1.25rem}
.options{display:grid;gap:.58rem}
.option{width:100%;text-align:left;display:flex;align-items:center;gap:.8rem;min-height:49px;border:1px solid #53688c;border-radius:10px;padding:.56rem .75rem;color:var(--ink);background:#203454}
.option:hover:not(:disabled){background:#2b456b}
.option>span:first-child{display:grid;place-items:center;flex:none;width:2rem;height:2rem;border-radius:8px;background:#101e39;font-weight:780}
.option.correct,.feedback.positive{border-color:#63bba2;background:#173e43}
.option.incorrect,.feedback.retry{border-color:#eaa184;background:#482c3b}
.feedback{margin-top:.9rem;border:1px solid;border-radius:10px;padding:.75rem;color:#fff}
.question-nav{display:flex;align-items:end;justify-content:space-between;gap:.5rem;margin-top:1.3rem}
.jump{display:grid;gap:.3rem;color:var(--muted);font-size:.88rem;text-align:center}
.jump select{max-width:100%;width:100%}
.text-button{padding:.35rem 0;margin-top:.75rem;border:0;background:none;color:var(--mint);text-decoration:underline;text-underline-offset:.19em}
.draft-label{display:block;margin-bottom:.35rem;font-weight:700}
textarea{width:100%;resize:vertical;display:block;margin-bottom:.8rem}
.scheme{margin-top:1rem;border:1px solid #526c87;background:#143042;border-radius:12px;padding:1rem}
.scheme h4{font-size:1.15rem;display:flex;flex-wrap:wrap;justify-content:space-between;gap:.5rem;margin-bottom:.4rem}
.scheme h4 span{color:var(--gold);font-size:.94rem}
.scheme p{margin-bottom:.68rem}
.rubric{margin-top:.45rem}
.rubric em{font-style:normal;color:var(--gold);font-size:.9rem}
.empty p{margin-bottom:1rem}
@media(max-width:850px){.book-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero{background-position:center,85% center;background-size:100% 100%,auto 107%}}
@media(max-width:590px){.shell{width:calc(100% - 26px)}.hero{margin-top:16px;min-height:380px;border-radius:19px;background-position:center,right top;background-size:100% 100%,auto 74%;background-image:linear-gradient(180deg,#14203a16 4%,#141c3c9c 33%,#141c3c 62%),url('./hero.webp')}.hero-copy{padding:8.75rem 1rem 1.3rem}.hero-stats{padding:.7rem 1rem;gap:.6rem;justify-content:space-between}.hero-stats div{gap:.3rem}.hero dd{font-size:.76rem}.hero dt{font-size:1.04rem}.book-grid{grid-template-columns:1fr}.section-title{display:block}.section-title>p{margin-top:.4rem}.lesson-head{grid-template-columns:1fr}.mode-tabs{gap:.35rem}.mode-tabs button{padding-inline:.6rem;font-size:.89rem}.question-nav .button{padding-inline:.48rem;font-size:.86rem}.jump{font-size:.76rem}.filters{gap:.6rem}.cover{aspect-ratio:2.17}.collection,.practice{padding-top:1.7rem}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}

.stimulus{max-width:680px;margin:0 0 1.15rem;padding:clamp(.6rem,2vw,1rem);background:#f7fbff;color:#17324f;border:1px solid #b9ccde;border-radius:14px;overflow-wrap:anywhere}
.stimulus svg{display:block;width:min(100%,38rem);height:auto;margin-inline:auto}
.stimulus svg text{font:600 15px system-ui,sans-serif;fill:#17324f}
.stimulus figcaption,.stimulus caption{color:#284761;font-size:.95rem;font-weight:720}
.stimulus figcaption{text-align:center;margin-top:.35rem}
.stimulus table{width:100%;border-collapse:collapse;font-size:clamp(.88rem,2vw,1rem)}
.stimulus caption{text-align:left;margin-bottom:.55rem}
.stimulus th,.stimulus td{padding:.42rem .53rem;border:1px solid #c5d6e5;text-align:left}
.stimulus thead th{background:#deebfa}
.stimulus tbody th{background:#ecf4fa;font-weight:650}
.option-content{min-width:0}
.option-figure{display:block;width:min(100%,23rem);height:auto;background:#f7fbff;margin-top:.52rem;border-radius:8px}
.option-figure text{font:600 15px system-ui,sans-serif;fill:#17324f}

.card-topic{display:flex;align-items:center;gap:.62rem;min-height:43px}
.topic-icon{width:42px;height:42px;display:grid;place-items:center;flex:none;border-radius:13px;color:var(--accent);background:linear-gradient(150deg,color-mix(in srgb,var(--accent) 26%,#142341),#15223f 82%);border:1px solid color-mix(in srgb,var(--accent) 57%,#526487);box-shadow:inset 0 1px 0 #ffffff2c}
.topic-icon svg{width:25px;height:25px}
.reader{padding-bottom:1rem}
.reader-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;padding-bottom:1rem}
.reader-head h1{font-size:clamp(1.65rem,4vw,2.8rem);margin-top:.3rem}
.reader-badge{display:inline-flex;align-items:center;gap:.45rem;border:1px solid #5d6d93;background:#253754;border-radius:999px;color:#f4d88e;padding:.36rem .7rem;font-size:.87rem;font-weight:750}
.reader-badge svg{width:1.05rem;height:1.05rem}
.reader-controls{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;padding:.65rem 0;background:var(--bg);border-bottom:1px solid var(--line);margin-bottom:.65rem}
.reader-page-control{display:flex;align-items:center;gap:.45rem;color:var(--muted);font-size:.9rem;font-weight:650}
.reader-zoom{margin-left:auto}
.reader-stage{overflow:auto;max-height:77vh;border:1px solid var(--line);border-radius:13px;background:#111c33;min-height:190px}
.reader-page{display:block;width:100%;height:auto;background:#fff;margin:0 auto}
.reader-enlarged .reader-page{width:max(980px,145%)}
.reader-loading{padding:3rem 1rem;text-align:center}
.reader-loading .button{margin-top:.7rem}
.reader-print-note{display:none}
@media(max-width:590px){
  .reader-head{gap:.65rem}
  .reader-controls{display:grid;grid-template-columns:1fr auto 1fr;gap:.35rem}
  .reader-controls .button{font-size:.84rem;padding:.4rem .6rem;min-width:0}
  .reader-page-control{gap:.3rem;font-size:.8rem}
  .reader-page-control select{font-size:.84rem;padding-left:.35rem}
  .reader-zoom{margin-left:0;grid-column:1/-1;justify-self:end}
}
@media print{
  body.reader-open{background:#fff;color:#111}
  body.reader-open .bar,body.reader-open .footer,body.reader-open .skip,body.reader-open .reader>:not(.reader-print-note){display:none!important}
  body.reader-open .reader-print-note{display:block!important;color:#111}
}
