:root {
  color-scheme:light; --bg:#fff; --paper:#faf9f7; --ink:#202731; --muted:#586271;
  --line:#e5e7eb; --blue:#263e60; --blue-dark:#1e304b; --blue-soft:#edf2f8; --blue-line:#dbe3ee;
  --warm:#984c32; --warm-soft:#f9eee7; --green:#26664e; --green-soft:#edf7f0;
  --red:#993f3a; --red-soft:#fdf1ee; --r:13px; --side:242px;
  --sans:Geist,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; --serif:"EB Garamond",Georgia,serif;
}
* {box-sizing:border-box}
body {margin:0;background:var(--bg);color:var(--ink);font:400 15px/1.55 var(--sans);-webkit-font-smoothing:antialiased}
h1,h2,h3,p {margin:0}
a {color:var(--blue);text-underline-offset:3px}
button,input,select {font:inherit;color:inherit}
button,select {cursor:pointer}
button:disabled {cursor:default}
:focus-visible {outline:2px solid #486a9a;outline-offset:3px}
h1[tabindex]:focus, main[tabindex]:focus, .feedback:focus {outline:none}
.sr,.skip:not(:focus) {position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.skip:focus {position:fixed;z-index:20;top:10px;left:10px;padding:10px;background:#fff}
.icon {display:inline-block;vertical-align:middle;width:19px;height:19px;flex:none}
.loading {margin:8vh auto;width:min(90%,660px)}
.side {position:fixed;inset:0 auto 0 0;z-index:5;width:var(--side);background:var(--paper);border-right:1px solid var(--line);display:flex;flex-direction:column;padding:26px 15px 20px}
.brand {display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink);margin:0 0 35px 9px}
.brand b {display:block;font-family:var(--serif);font-size:26px;line-height:1;font-weight:600;letter-spacing:-.01em}
.brand small {display:block;font-size:11px;color:var(--muted);margin-top:4px}
.side nav {display:grid;gap:4px}
.side nav a {display:flex;align-items:center;gap:12px;color:#465060;padding:0 12px;min-height:45px;text-decoration:none;font-weight:480;border-radius:8px}
.side nav a:hover {background:#efeeeb}
.side nav a[aria-current] {background:#e9edf3;color:var(--blue-dark);font-weight:630}
.side nav .icon {width:18px;height:18px}
.sidefoot {margin:auto 9px 0;padding:15px 0 1px;border-top:1px solid var(--line);display:flex;align-items:center;gap:9px;color:var(--muted);font-size:12px}
.flag {display:inline-block;width:18px;height:12px;border-radius:2px;border:1px solid #d5d7db;background:linear-gradient(to right,#405d8c 33%,#fff 33%,#fff 66%,#bb7467 66%)}
.workspace {margin-left:var(--side)}
.top {height:65px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 max(28px,calc((100% - 1010px)/2));border-bottom:1px solid var(--line);background:#fff;font-size:13px}
.crumb,.streak-mini {display:inline-flex;align-items:center;gap:9px}
.crumb {color:var(--muted);min-width:0}
.crumb b {color:var(--ink);font-weight:550;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crumb .icon {width:13px;height:13px}
.streak-mini {color:var(--warm);background:var(--warm-soft);padding:6px 10px;border-radius:7px;white-space:nowrap;text-decoration:none;min-height:36px;gap:5px}
.streak-mini .icon {width:16px;height:16px}
.main {width:min(100%,1074px);margin:0 auto;padding:41px 32px 24px;min-height:calc(100vh - 65px)}
.page-title {margin:0 0 25px}
.eyebrow {color:var(--muted);font-size:12px;font-weight:550;letter-spacing:.015em}
.page-title h1 {font:500 clamp(42px,5vw,62px)/.99 var(--serif);letter-spacing:-.035em;margin:7px 0 10px;text-wrap:balance}
.page-title>p:last-child {color:var(--muted);font-size:15px;max-width:63ch}
.hero {isolation:isolate;position:relative;min-height:244px;overflow:hidden;border:1px solid var(--blue-line);border-radius:16px;background:#f1f4f9;display:grid;grid-template-columns:minmax(0,1.28fr) minmax(0,1fr)}
.hero-copy {padding:30px 32px;z-index:1;align-self:center}
.hero-eyebrow {display:flex;align-items:center;gap:8px;color:#435d7d}
.signal {width:7px;height:7px;background:#5275a3;border-radius:50%;box-shadow:0 0 0 4px #dfe8f5}
.hero h2 {font:500 clamp(34px,4vw,51px)/.98 var(--serif);letter-spacing:-.02em;margin:12px 0 7px;text-wrap:balance}
.hero-copy>p:not(.eyebrow) {color:#4a5667}
.hero-actions,.action-row {display:flex;flex-wrap:wrap;align-items:center;gap:12px 17px;margin-top:22px}
.btn {display:inline-flex;justify-content:center;align-items:center;gap:11px;text-decoration:none;min-height:44px;padding:8px 14px;border:1px solid transparent;border-radius:8px;font-weight:590;font-size:14px;line-height:1.2;text-align:center}
.primary {background:var(--blue);color:#fff;border-color:var(--blue)}
.primary:hover:not(:disabled) {background:var(--blue-dark);border-color:var(--blue-dark)}
.primary:disabled {background:#e9edf1;color:#566171;border-color:#e5e9ee}
.secondary {background:#fff;color:var(--blue);border-color:#d5dce6}
.secondary:hover {background:var(--blue-soft)}
.btn .icon {width:17px;height:17px}
.quiet {display:inline-flex;align-items:center;gap:5px;font-size:12px;color:#4e5d70;white-space:nowrap}
.quiet .icon {width:14px;height:14px}
.art {position:relative;min-height:218px;display:grid;place-items:center;margin-right:14px}
.art-grid {position:absolute;inset:15px 0;background-image:radial-gradient(#b1bfd3 1px,transparent 1px);background-size:14px 14px;opacity:.67;mask-image:radial-gradient(ellipse,#000 28%,transparent 71%)}
.sheet {width:min(76%,250px);height:157px;position:absolute;border-radius:12px;border:1px solid #cad7e7}
.sheet.back {transform:rotate(-10deg) translate(-21px,0);background:#e4ebf6}
.sheet.front {background:#fff;transform:rotate(6deg) translate(11px,0);box-shadow:0 7px 16px #253a5d14;padding:13px 17px}
.sheet-head {display:flex;align-items:center;gap:7px;border-bottom:1px solid #e1e7ee;padding-bottom:8px;font-size:12px;font-weight:650;color:var(--blue)}
.sheet-head i {margin-left:auto;width:6px;height:6px;border-radius:50%;background:#c4816c}
.sheet-head .icon {width:15px;height:15px}
.sheet-lines {padding:8px 0 3px}
.sheet-lines p {font:500 clamp(17px,1.9vw,24px)/1.22 var(--serif);color:#263e60;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sheet-lines p+p {margin-top:5px}
.sheet-note {font-size:10px;color:#59697e;letter-spacing:.1em}
.overview {display:grid;grid-template-columns:1fr 1fr;gap:15px;margin-top:15px}
.mini-card {padding:18px 20px;border:1px solid var(--line);border-radius:var(--r);min-width:0;background:#fff}
.mini-head {display:flex;align-items:center;gap:12px}
.mini-head h2 {font-size:16px;font-weight:625;line-height:1.2}
.mini-head p {margin-top:3px;color:var(--muted);font-size:13px}
.mini-symbol,.topic-icon {width:37px;height:37px;display:grid;place-items:center;flex:none;border-radius:8px;background:#f2f3f5;color:#4b5d74}
.mini-symbol.warm {background:var(--warm-soft);color:var(--warm)}
.mini-symbol.blue {background:var(--blue-soft);color:var(--blue)}
.week {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;max-width:358px;margin-top:12px}
.weekday {display:grid;justify-items:center;gap:4px;font-size:11px;color:var(--muted);text-transform:capitalize}
.daydot {width:30px;height:30px;border-radius:8px;background:#f4f5f7;display:grid;place-items:center}
.daydot .icon {width:12px;height:12px}
.current .daydot {box-shadow:inset 0 0 0 1px #9fadc2;color:var(--blue)}
.done .daydot {background:var(--green-soft);color:var(--green)}
.plain {color:var(--blue);text-decoration:none;display:inline-flex;align-items:center;gap:6px;font-weight:580;font-size:13px;min-height:35px}
.plain:hover {text-decoration:underline}
.plain .icon {width:15px;height:15px}
.review-card .plain {margin-top:10px}
.section-head {margin:30px 0 13px;display:flex;justify-content:space-between;align-items:end;gap:10px}
.section-head h2,.reading>section>h2 {font:500 36px/1 var(--serif);letter-spacing:-.02em}
.section-head p {font-size:13px;color:var(--muted);margin-top:4px}
.unit + .unit {margin-top:24px}
.unit-title {display:flex;justify-content:space-between;align-items:center;gap:8px;margin:0 0 8px;padding:0 3px}
.unit-title h3 {font-size:14px;font-weight:620}
.unit-title>span {font-size:12px;color:var(--muted)}
.topic-list {border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
.topic-row {display:grid;grid-template-columns:24px 37px minmax(0,1fr) auto auto 16px;align-items:center;gap:13px;min-height:66px;padding:9px 15px;color:var(--ink);text-decoration:none}
.topic-row+.topic-row {border-top:1px solid var(--line)}
.topic-row:hover {background:#f8f9fc}
.topic-row:focus-visible {outline-offset:-3px}
.topic-row.slim {grid-template-columns:37px minmax(0,1fr) auto 16px}
.topic-row .chevron,.topic-row>.icon {width:14px;height:14px;color:#667182}
.index,.topic-count {color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}
.topic-label {min-width:0}
.topic-label b,.topic-row>b {font-weight:600}
.topic-label small {display:block;color:var(--muted);font-size:13px}
.tag {justify-self:end;background:#f4f5f7;color:#4e5a6a;border-radius:5px;font-size:11px;padding:4px 7px;white-space:nowrap}
.tag.due {background:var(--warm-soft);color:var(--warm)}
.tag.learning {background:var(--blue-soft);color:var(--blue)}
.tag.retained {background:var(--green-soft);color:var(--green)}
.reading {max-width:690px}
.backlink {margin-bottom:10px}
.rule-content h2,.examples h2 {margin-bottom:12px}
.rule-content p {margin:0 0 10px;font-size:16px}
.table-wrap {overflow:auto;margin:17px 0 22px;border:1px solid var(--line);border-radius:10px;max-width:420px}
table {border-collapse:collapse;width:100%;text-align:left}
td,th {padding:7px 14px;border-bottom:1px solid var(--line)}
th {font-size:13px;font-weight:620;background:var(--paper)}
tr:last-child td {border-bottom:0}
td {font-size:16px}
.examples {margin-top:20px}
.examples>div {background:var(--blue-soft);border-left:2px solid #94a9c4;padding:8px 14px;margin:6px 0;border-radius:0 7px 7px 0}
.examples span {display:block;font:500 25px/1.15 var(--serif)}
.examples small {font-size:13px;color:var(--muted)}
.subtle {color:var(--muted);font-size:13px;margin-top:15px}
.review-page .btn {margin-top:15px}
/* Each topic is a row, with one stable cell per question in the bank. */
.task-legend {display:flex;flex-wrap:wrap;gap:6px 16px;margin:0 0 13px;color:var(--muted);font-size:13px}
.task-legend span {display:inline-flex;align-items:center;gap:6px}
.task-legend i {width:12px;height:12px;border-radius:3px;background:var(--task-fill);border:1px solid var(--task-edge)}
.task-new {--task-fill:#edf0f3;--task-edge:#d6dce4;--task-ink:#455266}
.task-right {--task-fill:#73b797;--task-edge:#549575;--task-ink:#205840}
.task-assisted {--task-fill:#f1cb80;--task-edge:#ca9d4d;--task-ink:#754e1f}
.task-retry {--task-fill:#e5a099;--task-edge:#c77d74;--task-ink:#843e38}
.task-map {border:1px solid var(--line);border-radius:var(--r)}
.task-row {display:grid;grid-template-columns:minmax(158px,21%) minmax(0,1fr);gap:8px 16px;align-items:center;padding:12px 15px}
.task-row+.task-row {border-top:1px solid var(--line)}
.task-row-title {min-width:0;display:grid;gap:2px}
.task-row-title a {display:flex;gap:7px;align-items:center;text-decoration:none;font-weight:600;font-size:14px;line-height:1.3}
.task-row-title a:hover {text-decoration:underline}
.task-row-title .icon {width:16px;height:16px}
.task-row-title span {font-size:12px;color:var(--muted);margin-left:23px}
.task-cells {display:flex;flex-wrap:wrap;gap:4px}
.task-cell {width:20px;height:20px;padding:0;border:1px solid var(--task-edge);border-radius:4px;background:var(--task-fill)}
.task-cell:hover,.task-cell[aria-pressed="true"] {border-color:var(--ink)}
.task-cell[aria-pressed="true"] {box-shadow:0 0 0 1px var(--ink)}
.task-cell:focus-visible {outline-offset:2px}
.task-detail {grid-column:2;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:4px 12px;padding:8px 10px;border-left:2px solid var(--line);background:var(--paper)}
.task-detail[hidden] {display:none}
.task-detail-text {min-width:0;overflow-wrap:anywhere}
.task-detail-text b,.task-detail-text small {display:block}
.task-detail-text small {color:var(--muted)}
.task-badge {font-size:12px;font-weight:550;color:var(--task-ink)}
.heat-card {width:fit-content;max-width:100%}
.heat-scroll {overflow-x:auto;margin:8px -5px 0;padding:4px 5px 7px}
.heat-grid {display:flex;gap:3px;width:max-content}
.heat-week,.heat-labels {display:grid;grid-template-rows:16px repeat(7,13px);gap:3px}
.heat-labels {position:sticky;left:-5px;z-index:1;background:white;width:22px;font-size:10px;color:var(--muted)}
.heat-month {position:relative;width:13px;font-size:10px;color:var(--muted);white-space:nowrap}
.heat-cell,.heat-future {display:block;width:13px;height:13px;border-radius:3px}
.heat-cell {border:1px solid #17273c1c;padding:0}
.heat-cell:hover,.heat-cell[aria-pressed="true"] {border-color:var(--blue)}
.heat-cell:focus-visible {outline-offset:1px;position:relative;z-index:2}
.heat-0 {background:#edf0f3}
.heat-1 {background:#c8e6d4}
.heat-2 {background:#8bcbab}
.heat-3 {background:#459b76}
.heat-4 {background:#24694d}
.heat-legacy {background:repeating-linear-gradient(135deg,#e0e5ed 0 2px,#f6f7fa 2px 4px)}
.heat-caption {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 8px;margin-top:4px;color:var(--muted);font-size:11px}
.heat-detail {min-width:0}
.heat-legend {display:flex;align-items:center;gap:3px;white-space:nowrap}
.heat-legend i {width:9px;height:9px;border-radius:2px;border:1px solid #17273c1c}
.source {padding:14px 0;border-bottom:1px solid var(--line)}
.source h3 {font-size:16px}
.source p {color:var(--muted);margin-top:4px}
.source+.btn {margin-top:18px}
.source+h2 {margin-top:28px}
.bank-tools {display:grid;grid-template-columns:1.4fr 1fr .85fr;gap:10px}
.bank-actions {display:flex;align-items:center;flex-wrap:wrap;gap:7px 12px;margin-top:12px}
.bank-actions:empty {display:none}
.bank-actions span {color:var(--muted);font-size:13px}
.bank-tools select,.searchbox,.answer {width:100%;height:46px;border:1px solid #ccd4df;border-radius:8px;background:#fff;padding:0 10px}
.searchbox {display:flex;align-items:center;gap:8px}
.searchbox .icon {color:var(--muted)}
.searchbox input {width:100%;min-width:0;height:100%;border:0;outline:0;background:transparent}
.searchbox:focus-within {outline:2px solid #486a9a;outline-offset:2px}
.bank-list {border:1px solid var(--line);border-radius:var(--r);margin-top:8px}
.bank-list:empty {display:none}
.bank-list details+details {border-top:1px solid var(--line)}
.bank-list summary {padding:10px 14px;cursor:pointer;min-height:47px}
.bank-list summary:hover {background:var(--paper)}
.bank-list summary small {color:var(--muted);margin-left:10px;font-size:12px}
.bank-prompt {font-size:16px;font-weight:550}
.bank-answer {padding:0 14px 12px 28px;color:#465060}
.bank-answer b {display:block;margin:2px 0;color:var(--blue);font-size:17px}
.bank-answer a {font-size:12px}
.pager {display:flex;gap:8px;margin-top:13px}
.practice-shell {min-height:100dvh;display:flex;flex-direction:column}
.practice-top {display:grid;grid-template-columns:43px 1fr;gap:15px;align-items:center;width:min(100%,730px);padding:22px 22px 16px;margin:0 auto}
.exit {display:grid;place-items:center;width:43px;height:43px;border:1px solid var(--line);border-radius:9px;color:var(--muted)}
.exit:hover {background:var(--paper)}
.practice-meta {display:flex;justify-content:space-between;gap:10px;font-size:13px;color:var(--muted)}
.practice-meta b {font-weight:560;color:var(--ink)}
progress {display:block;appearance:none;width:100%;height:8px;border:0;border-radius:8px;margin-top:7px;background:#e9edf3;color:#486a9a;overflow:hidden}
progress::-webkit-progress-bar {background:#e9edf3}
progress::-webkit-progress-value {background:#486a9a;border-radius:8px}
progress::-moz-progress-bar {background:#486a9a;border-radius:8px}
.practice-main {width:min(100%,644px);padding:clamp(16px,4vh,50px) 22px 23px;margin:0 auto;flex:1}
.practice-main h1 {font:500 clamp(34px,5vw,51px)/1 var(--serif);margin-top:5px;letter-spacing:-.025em}
.prompt {margin-top:18px;font:500 clamp(25px,4vw,37px)/1.17 var(--serif);color:#263b59;overflow-wrap:anywhere}
.blank {color:#526b8d}
.context {margin-top:5px;color:var(--muted);font-size:14px}
.choices {margin:16px 0 0;padding:0;border:0;display:grid;grid-template-columns:1fr 1fr;gap:9px;min-width:0}
.choice {min-height:52px;border:1px solid #d9e0ea;border-radius:9px;display:flex;align-items:center;gap:10px;position:relative;padding:8px 12px;font-size:18px;cursor:pointer;overflow-wrap:anywhere}
.choice input {position:absolute;opacity:0;inset:0;width:100%;height:100%;margin:0;cursor:pointer}
.choice-index {font:550 12px/1 var(--sans);width:25px;height:25px;display:grid;place-items:center;border:1px solid #d9e0ea;border-radius:5px;color:var(--muted);flex:none}
.choice:has(input:checked) {background:#edf3fb;border-color:#6886ad}
.choice:has(input:focus-visible) {outline:2px solid #486a9a;outline-offset:2px}
.choice.correct {background:var(--green-soft);border-color:#84ad98}
.choice.wrong {background:var(--red-soft);border-color:#c88884}
.choice:has(input:disabled),.choice input:disabled {cursor:default}
.answer {margin-top:17px;font-size:18px}
.keys,.token-bank,.assembled {display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.key,.token {min-height:44px;border-color:#d9e0ea;background:#fff;color:var(--blue);padding:7px 11px;font-size:16px}
.key:hover,.token:hover:not(:disabled) {background:var(--blue-soft)}
.key {min-width:38px}
.assembled {align-items:center;min-height:60px;padding:7px;border:1px dashed #a7b7ca;border-radius:9px;margin-top:16px;background:#f8fafc}
.assembled>span {color:var(--muted);padding:4px 6px;font-size:14px}
.token.selected {background:var(--blue-soft);border-color:#a4b7d0}
.token-bank .token:disabled {opacity:.43}
.practice-main details {margin-top:15px;color:var(--muted);font-size:14px}
.practice-main details summary {cursor:pointer;min-height:43px;line-height:43px;width:fit-content;color:var(--blue)}
.practice-main details p {margin-bottom:6px}
.feedback {margin-top:17px;padding:12px 15px;background:var(--red-soft);color:#703530;border-radius:9px;border:1px solid #eed9d4}
.feedback.right {background:var(--green-soft);border-color:#c8e4d3;color:var(--green)}
.feedback.accent {background:var(--warm-soft);color:#764328}
.feedback>div {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.feedback p {margin-top:4px}
.practice-bottom {position:sticky;bottom:0;background:#fff;border-top:1px solid var(--line);padding:12px 22px calc(12px + env(safe-area-inset-bottom));z-index:2}
.practice-bottom>div {width:min(100%,600px);margin:auto;display:flex;justify-content:end}
.practice-bottom .btn {min-width:145px}
.result>.mini-symbol {margin-bottom:12px}
@media(max-width:1100px) {
  :root {--side:208px}
  .hero-copy {padding-left:24px;padding-right:18px}
  .topic-count {display:none}
  .topic-row:not(.slim) {grid-template-columns:20px 37px minmax(0,1fr) auto 14px}
}
@media(max-width:760px) {
  .side {inset:auto 0 0;width:auto;padding:3px 6px env(safe-area-inset-bottom);border:0;border-top:1px solid var(--line);background:#fff}
  .side nav {grid-template-columns:repeat(5,minmax(0,1fr));gap:2px}
  .side nav a {min-height:51px;justify-content:center;flex-direction:column;gap:2px;padding:3px 2px;font-size:10px;line-height:1.15;text-align:center}
  .brand,.sidefoot {display:none}
  .workspace {margin:0 0 calc(55px + env(safe-area-inset-bottom))}
  .top {height:53px;padding:0 16px}
  .main {padding:25px 16px 18px}
  .hero {min-height:0;grid-template-columns:1fr}
  .hero-copy {padding:19px 18px 18px}
  .hero h2 {font-size:40px}
  .hero-actions {margin-top:15px;gap:9px 12px}
  .art {display:none}
  .overview {gap:9px}
  .mini-card {padding:13px}
  .mini-head {gap:7px;align-items:flex-start}
  .mini-head p {font-size:12px}
  .mini-head h2 {font-size:14px}
  .mini-symbol {width:30px;height:30px}
  .mini-symbol .icon {width:16px;height:16px}
  .week {gap:1px}
  .daydot {width:22px;height:23px;border-radius:5px}
  .weekday {font-size:9px}
  .section-head {margin-top:22px}
  .topic-row:not(.slim) {grid-template-columns:30px minmax(0,1fr) 12px;gap:9px;padding:8px 10px}
  .topic-row:not(.slim) .tag,.topic-row .index {display:none}
  .topic-row .topic-icon {width:30px;height:31px}
  .topic-row .topic-icon .icon {width:16px;height:16px}
  .topic-label small {font-size:12px;line-height:1.25}
  .page-title {margin-bottom:18px}
  .task-row {grid-template-columns:minmax(0,1fr);gap:7px;padding:11px 12px}
  .task-row-title {display:flex;justify-content:space-between;align-items:baseline;gap:6px}
  .task-row-title span {margin-left:0;white-space:nowrap}
  .task-cells {display:grid;grid-template-columns:repeat(13,minmax(0,1fr));max-width:334px}
  .task-cell {width:100%;height:auto;aspect-ratio:1}
  .task-detail {grid-column:1}
  .bank-tools {grid-template-columns:1fr 1fr}
  .searchbox {grid-column:1/-1}
  .bank-list summary small {display:block;margin:2px 0 0 16px}
  .practice-top {padding:13px 14px}
  .practice-main {padding:13px 14px 15px}
  .practice-bottom {padding-left:14px;padding-right:14px}
  .practice-bottom .btn {width:100%}
}
@media(max-width:390px) {
  .overview {grid-template-columns:1fr}
  .week {max-width:260px}
}
.choice.correct:has(input:checked) {background:var(--green-soft);border-color:#84ad98}
.choice.wrong:has(input:checked) {background:var(--red-soft);border-color:#c88884}
