:root {
  color-scheme: light;
  --bg: #f8f9f3; --paper: #fff; --ink: #17362d; --muted: #4e655a;
  --line: #dbe5d9; --green: #135943; --lime: #d0f29c; --purple: #ece4ff;
  --shadow: 0 4px 0 #dce6d8;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #7449bf; outline-offset: 4px;
}
a { color: var(--green); text-underline-offset: 3px; }
.skip { position: absolute; left: .6rem; top: .6rem; padding: .8rem; background: white; z-index: 3; transform: translateY(-200%); }
.skip:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.bar { background: #10392e; color: white; }
.bar-inner { max-width: 76rem; margin: auto; padding: .85rem clamp(.9rem, 4vw, 2.5rem); display: flex; justify-content: space-between; gap: .65rem; align-items: center; min-height: 4.65rem; }
.brand { display: flex; text-align: left; gap: .63rem; align-items: center; background: transparent; border: 0; color: inherit; padding: 0; min-height: 44px; }
.brand strong { display: block; font-size: 1.22rem; line-height: 1.05; letter-spacing: -.04em; }
.brand small { display: block; font-weight: 750; font-size: .72rem; letter-spacing: .13em; margin-top: .34rem; color: #c8e2d4; }
.brand-icon { width: 42px; height: 42px; padding: 8px; border-radius: 12px; background: var(--lime); display: flex; gap: 3px; align-items: end; justify-content: center; flex: none; }
.brand-icon i { width: 5px; border-radius: 2px; background: #164433; height: 10px; }
.brand-icon i:nth-child(2) { height: 16px; }.brand-icon i:nth-child(3) { height: 23px; }
.stats { display: flex; gap: .42rem; align-items: center; }
.stat { white-space: nowrap; font-size: .9rem; font-weight: 600; border-radius: .7rem; padding: .46rem .63rem; background: #235042; }
.stat b { font-size: 1.03rem; color: #efff9f; margin-right: .24rem; }
.stat.streak b { color: #ffcfaa; }
.shell { max-width: 76rem; margin: auto; padding: 1.75rem clamp(.9rem, 4vw, 2.5rem) 3rem; display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.6rem); }
.rail { padding-top: .1rem; }
.rail nav { display: grid; gap: .35rem; }
.nav-link { display: flex; gap: .63rem; align-items: center; text-align: left; padding: .65rem .75rem; min-height: 48px; border-radius: 12px; color: var(--green); background: transparent; border: 1px solid transparent; font-weight: 750; }
.nav-link span { font-size: 1.2rem; }
.nav-link:hover, .nav-link[aria-current="page"] { background: #e7f1df; border-color: #d6e5d0; }
.principle { margin-top: 2.25rem; padding: 1.1rem .85rem; border-top: 1px solid var(--line); }
.principle p { font-size: 1.08rem; font-weight: 720; line-height: 1.45; letter-spacing: -.015em; margin: .6rem 0; }
.principle small { color: var(--muted); font-size: .85rem; }
main { min-width: 0; }
main:focus, h1:focus, h2:focus, .feedback:focus { outline: none; }
.screen { animation: appear 240ms ease-out both; }
@keyframes appear { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4.5vw, 3.75rem); line-height: 1.04; letter-spacing: -.06em; margin-bottom: .65rem; }
h2 { font-size: clamp(1.37rem, 2.7vw, 1.95rem); letter-spacing: -.04em; line-height: 1.16; margin-bottom: .55rem; }
h3 { font-size: 1.08rem; margin-bottom: .35rem; line-height: 1.3; }
p { line-height: 1.58; margin-bottom: .9rem; }
p:last-child { margin-bottom: 0; }
.eyebrow { display: block; color: #42604f; font-size: .83rem; font-weight: 800; letter-spacing: .075em; text-transform: uppercase; line-height: 1.45; }
.hero { position: relative; isolation: isolate; display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) minmax(9rem, .46fr); gap: .7rem; min-height: 16.6rem; overflow: hidden; padding: clamp(1.25rem, 4vw, 2.55rem); background: #daf0c2; border: 1px solid #c4e0a9; border-radius: 22px; box-shadow: 0 4px 0 #c5ddae; }
.hero .eyebrow { margin-bottom: .66rem; }
.hero p { max-width: 26rem; }
.hero-visual { position: relative; display: grid; place-items: center; min-height: 10rem; }
.orbit { width: clamp(7.5rem, 16vw, 13rem); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; border: 1px solid #9dbe87; box-shadow: 0 0 0 12px #e8f6d9; rotate: -9deg; }
.orbit::before, .orbit::after { position: absolute; content: ""; width: 13px; height: 13px; background: #184c39; border-radius: 50%; }
.orbit::before { top: 12%; right: 12%; }.orbit::after { bottom: 12%; left: 11%; background: #6b4a99; }
.orb { width: 72%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 36%; color: #1a4838; background: #f9ffe8; box-shadow: 0 7px 0 #9dbc86; font-size: clamp(2.55rem, 6vw, 5.15rem); font-weight: 800; letter-spacing: -.06em; }
.row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .55rem .85rem; }
.cta, .quiet { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .66rem .95rem; font-weight: 780; min-height: 48px; border-radius: 11px; }
.cta { color: white; background: #146047; border: 1px solid #124e3b; box-shadow: 0 3px 0 #083e2c; }
.cta:hover:enabled { background: #104a37; }
.cta:active:enabled { transform: translateY(2px); box-shadow: 0 1px 0 #083e2c; }
.cta:disabled { background: #e9eee7; color: #526357; box-shadow: none; border-color: #d6e0d5; }
.quiet { color: var(--green); background: white; border: 1px solid #c8dbcb; }
.quiet:hover { background: #eef6eb; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: clamp(1rem, 3vw, 1.55rem); box-shadow: var(--shadow); }
.stack { display: grid; gap: .9rem; }
.section-head { margin: 1.7rem 0 .7rem; }
.path { display: grid; list-style: none; gap: .6rem; padding: 0; margin: 0; }
.path-step { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: .8rem; padding: .7rem; background: white; border: 1px solid var(--line); border-radius: 13px; }
.path-step span:last-child { font-size: .85rem; color: var(--muted); font-weight: 670; }
.step-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #234330; background: #e4f2d5; font-size: 1.25rem; font-weight: 780; }
.path-step:nth-child(2) .step-icon { background: var(--purple); }.path-step:nth-child(3) .step-icon { background: #ffe9cf; }
.path-step strong { line-height: 1.25; }
.meta { color: var(--muted); }
.details { color: var(--muted); margin-top: 1.35rem; font-size: .92rem; }
.details summary { cursor: pointer; width: fit-content; min-height: 44px; display: list-item; align-content: center; font-weight: 720; color: var(--green); }
.details p { margin-bottom: .35rem; }
.module { padding: .8rem .9rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.module strong { display: block; }
.module .eyebrow { margin-bottom: .25rem; }
.module.active { background: #edf6e7; border-color: #c9e1bf; }
.content-width { width: min(100%, 44rem); }
.headline { margin-bottom: 1rem; }
.headline .eyebrow { margin: .85rem 0 .32rem; }
.page-title { font-size: clamp(1.78rem, 4.1vw, 2.75rem); }
progress { width: 100%; height: .7rem; display: block; border: none; border-radius: 20px; overflow: hidden; color: #23724f; background: #e2ede1; }
progress::-webkit-progress-bar { background: #e2ede1; } progress::-webkit-progress-value { background: #23724f; border-radius: 20px; }
progress::-moz-progress-bar { background: #23724f; border-radius: 20px; }
.lesson-card { margin-top: 1rem; }
.lesson-card .eyebrow { margin-bottom: .52rem; }
.remember { background: #e9f4dc; border-radius: 12px; padding: .78rem .95rem; margin: 1rem 0; }
.remember h3 { color: var(--green); }
.actions { margin-top: .9rem; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .6rem; }
.question { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.question legend { font-weight: 800; font-size: clamp(1.22rem, 3vw, 1.55rem); line-height: 1.23; padding: 0; margin-bottom: .65rem; width: 100%; }
.options { display: grid; gap: .58rem; margin-top: .7rem; }
.option { display: flex; gap: .69rem; align-items: center; min-height: 49px; padding: .57rem .72rem; border-radius: 11px; border: 1px solid #d1e1d3; background: #fff; cursor: pointer; }
.option:has(input:checked) { border-color: #398768; background: #edf6e7; }
.option:has(input:disabled) { cursor: default; }
.option:has(input:focus-visible) { outline: 3px solid #7449bf; outline-offset: 3px; }
.option input { accent-color: #145a43; inline-size: 1.18rem; block-size: 1.18rem; margin: 0; flex: none; }
textarea { width: 100%; min-height: 5.5rem; resize: vertical; border: 1px solid #a6bfb0; border-radius: 10px; color: var(--ink); padding: .65rem .7rem; background: white; line-height: 1.5; }
.feedback { border-radius: 12px; padding: 1rem; margin-top: 1rem; animation: appear 240ms ease-out both; background: #e7f4dc; }
.feedback.incorrect { background: #fff0df; }
.feedback.correct h3 { color: #125641; }.feedback.incorrect h3 { color: #713e19; }
.feedback .tip { margin-top: .55rem; }
.finish-title { margin-top: 1.1rem; }
.finish-tile { display: inline-flex; align-items: center; gap: .4rem; margin: 0 .35rem .5rem 0; padding: .55rem .7rem; background: #e9f4dc; border-radius: 9px; font-weight: 720; }
.finish-tile:nth-child(2) { background: var(--purple); }
.finish-icon { display: grid; place-items: center; width: 63px; height: 63px; background: var(--lime); border-radius: 19px; font-size: 1.8rem; color: #144531; animation: celebrate 420ms ease-out both; }
@keyframes celebrate { 0% { scale: .65; opacity: 0; } 65% { scale: 1.12; opacity: 1; } 100% { scale: 1; } }
@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; gap: .8rem; padding-top: .65rem; }
  .rail nav { display: flex; gap: .5rem; }
  .principle { display: none; }
  .hero { min-height: 0; }
}
@media (max-width: 465px) {
  .hero { grid-template-columns: minmax(0, 1fr) 4.7rem; gap: .15rem; }
  .hero-visual { min-height: 5rem; align-self: start; margin-top: 1.1rem; }
  .orbit { width: 4.5rem; box-shadow: 0 0 0 5px #e8f6d9; }
  .orbit::before, .orbit::after { width: 8px; height: 8px; }
  .orb { font-size: 1.74rem; box-shadow: 0 4px 0 #9dbc86; }
  .stat { padding: .38rem .42rem; font-size: .81rem; }
  .bar-inner { gap: .3rem; }
  .brand strong { font-size: 1.08rem; }
  .brand small { font-size: .63rem; letter-spacing: .08em; }
  .brand-icon { width: 34px; height: 37px; padding: 6px; }
  .path-step { grid-template-columns: 42px 1fr; column-gap: .66rem; row-gap: .1rem; }
  .path-step .step-icon { grid-row: span 2; }.path-step span:last-child { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}

.shell { padding-bottom: 6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.topic-card { display: flex; flex-direction: column; gap: .28rem; }
.topic-card .row { margin-top: auto; }
.topic-card p { margin-bottom: .6rem; }
.streak-card { margin-top: 1.1rem; }
.streak-card h2 { margin-bottom: 0; }
.week { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: .45rem; padding: 0; margin: .85rem 0 0; }
.day { display: grid; min-width: 0; justify-items: center; gap: .3rem; font-size: .78rem; font-weight: 750; color: var(--muted); }
.day b { display: grid; place-items: center; width: min(100%, 2.6rem); aspect-ratio: 1; color: #52665a; background: #edf3eb; border: 1px solid #dce8dc; border-radius: 11px; font-size: 1.2rem; }
.day.today b { border: 2px solid #6d43aa; }
.day.done b { color: #17472e; background: #d3f0b1; border-color: #7daf67; }
.quiz-subjects small, .source-list small { display: block; color: var(--muted); font-size: .88rem; margin-top: .2rem; }
.maxim { width: fit-content; padding: .7rem .87rem; color: #2a4b3b; background: #e9f3df; border-radius: 10px; font-weight: 670; }
.source-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; list-style: none; margin: 0; padding: 0; }
.source-list a { display: inline-grid; min-height: 44px; align-content: center; font-weight: 760; }
.source-list small { margin-top: 0; }
.quiz-settings { display: grid; gap: .85rem; }
.quiz-settings label { display: grid; gap: .35rem; font-weight: 760; }
.quiz-subjects { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.quiz-subjects legend { font-weight: 800; padding: 0; }
.quiz-subjects details { margin-top: .45rem; border: 1px solid #d1e1d3; border-radius: 10px; }
.quiz-subjects summary { min-height: 44px; align-content: center; padding: .33rem .62rem; font-weight: 750; color: var(--green); cursor: pointer; }
.quiz-subjects .topic-grid { gap: .48rem; padding: 0 .52rem .52rem; }
.quiz-subjects .option { display: flex; gap: .65rem; }
select, input[type="number"], input[type="text"] {
  font: inherit; border: 1px solid #a6bfb0; background: white; color: var(--ink); border-radius: 10px;
  padding: .67rem .72rem; min-height: 48px; width: 100%; max-width: 100%;
}
select:focus-visible, input[type="number"]:focus-visible, input[type="text"]:focus-visible {
  outline: 3px solid #7449bf; outline-offset: 3px;
}
#bank-size { margin: 0; }
.explain {
  z-index: 2; position: fixed; bottom: max(.78rem,env(safe-area-inset-bottom)); right: max(.9rem,env(safe-area-inset-right));
  display: flex; gap: .5rem; align-items: center; padding: .65rem .85rem; min-height: 48px; border-radius: 13px;
  color: #342354; background: #eee5ff; border: 1px solid #8a6dbe; box-shadow: 0 3px 0 #a48cc9; font-weight: 800;
}
.explain:hover { background: #e3d6fe; }
dialog {
  color: var(--ink); background: white; border: 1px solid #d4c6ec; border-radius: 17px; width: min(90vw, 32rem); padding: 1.15rem;
  box-shadow: 0 9px 55px #18372d45;
}
dialog::backdrop { background: #102b2360; }
dialog h2 { margin: 0; }
dialog p { margin-top: .85rem; }
@media (max-width: 720px) {
  .rail nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .27rem; }
  .nav-link { padding: .47rem .25rem; justify-content: center; border-radius: .65rem; font-size: .83rem; gap: .29rem; }
  .nav-link span { font-size: 1rem; }
}
@media (max-width: 535px) {
  .topic-grid, .source-list { grid-template-columns: 1fr; }
}
@media (max-width: 390px) {
  .nav-link span { display: none; }
  .nav-link { font-size: .79rem; padding-inline: .12rem; }
  .hero .cta { text-align: center; }
}

@media (max-width: 465px) {
  .explain { left: max(.9rem,env(safe-area-inset-left)); right: auto; }
}

.course-tools { justify-content: flex-start; align-items: stretch; margin-bottom: 1.25rem; }
.course-tools a, .paper-actions a { display: inline-flex; align-items: center; min-height: 44px; }
.course-tools a { padding: .5rem .75rem; }
.course-unit { margin-top: 1.25rem; }
.course-unit h2 { margin-bottom: .7rem; }
.paper-filters { display: grid; grid-template-columns: minmax(0, 3fr) minmax(7rem, 1fr); gap: .8rem; }
.paper-filters label { display: grid; gap: .3rem; font-weight: 760; }
.paper-year { margin: 1.25rem 0 .7rem; }
.paper-year h2 { margin-bottom: .7rem; }
.paper-list { display: grid; gap: .55rem; padding: 0; margin: 0; list-style: none; }
.paper-list h3 { margin-bottom: 0; }
.paper-actions { display: flex; flex-wrap: wrap; gap: 0 .95rem; }
.paper-note { background: #e9f4dc; border-radius: 10px; padding: .8rem; margin-top: 1rem; }
@media (max-width: 515px) {
  .paper-filters { grid-template-columns: 1fr; }
}

.course-unit > .row { margin-bottom: .75rem; }
.course-unit > .row h2 { margin: 0 0 .22rem; }
.coverage-note { margin: .4rem 0 1.3rem; }
.spec-checklist { margin-bottom: .8rem; }
.spec-checklist summary { display: list-item; min-height: 44px; align-content: center; color: var(--green); font-weight: 750; cursor: pointer; padding: 0 .5rem; }
.spec-checklist ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap: .4rem; margin: 0 0 .75rem; padding: 0; }
.spec-checklist button { text-align: left; justify-content: flex-start; width: 100%; }

.country-control {
  width: 100%; margin-top: .7rem; min-height: 48px; display: flex; align-items: center; justify-content: space-between;
  gap: .55rem; padding: .55rem .72rem; border: 1px solid #c8dbcb; border-radius: 12px; background: #fff; color: #135943;
  font: inherit; text-align: left;
}
.country-control span { font-size: .8rem; }
.country-control[hidden] { display: none; }
.country-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .9rem; }
.country-choice { display: flex; flex-direction: column; align-items: start; }
.country-choice p { margin-bottom: .55rem; }
.country-choice button { margin-top: auto; }
.board-option { margin: 0 0 1rem; }
@media (max-width: 720px) {
  .country-control { margin: .4rem 0 0; padding: .38rem .6rem; min-height: 44px; width: fit-content; }
}
@media (max-width: 495px) {
  .country-grid { grid-template-columns: minmax(0,1fr); }
}
.question-stimulus {
  display: block;
  width: min(100%, 15rem);
  height: auto;
  margin-block: 0.5rem 1rem;
}

.dictation-prompt {
  margin-block-end: 1rem;
}

.dictation-prompt details {
  margin-block-start: 0.5rem;
}

.question-figure {
  margin: 0.75rem 0 1rem;
}

.question-figure figcaption {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.question-chart {
  background: #f7faff;
  border-radius: 0.5rem;
  display: block;
  width: min(100%, 29rem);
  height: auto;
}

.study-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 0.75rem;
}

.study-photo img { display: block; width: 100%; height: auto; }
.subject-audit-list h3 { margin-block: 0; }
.subject-audit-list > .module { min-width: 0; }
.qualification-audit-list { padding-inline-start: 1.25rem; }
.qualification-audit-list li { padding-block: .5rem; overflow-wrap: anywhere; }
