:root {
  color-scheme: light;
  --ink: #17162d;
  --muted: #67677f;
  --soft: #7b7b92;
  --purple: #6746df;
  --purple-dark: #5230cb;
  --primary-hover: #5230cb;
  --tint: #f0ebff;
  --line: #eae9f3;
  --paper: #fff;
  --bg: #f7f7fc;
  --green: #157866;
  --paper-sticky: #fffffff5;
  --graphic-sheet: #faf8ff;
  --calendar-done: #197451;
  --calendar-idle: #b74451;
  --shadow: 0 2px 6px #19133f06;
  font-family: "Inter", "Microsoft YaHei UI", "Noto Sans SC", system-ui, sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--ink);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f0edf8;
  --muted: #c4bcd3;
  --soft: #aca2bf;
  --purple: #7449db;
  --purple-dark: #c8b5ff;
  --primary-hover: #6940c8;
  --tint: #302447;
  --line: #3c344e;
  --paper: #211d2d;
  --paper-sticky: #211d2df5;
  --bg: #15131e;
  --green: #90e2be;
  --calendar-done: #74d8a5;
  --calendar-idle: #f0869a;
  --shadow: 0 2px 6px #07050e40;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button,input,select,textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #9074fe; outline-offset: 3px; }
button:focus:not(:focus-visible) { outline: none; }
a { color: var(--purple-dark); }
h1,h2,h3,p { margin: 0; }
h1 { font-size: clamp(1.65rem, 3vw, 2.15rem); line-height: 1.2; letter-spacing: -.045em; }
h2 { font-size: 1.23rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; }
p { line-height: 1.72; }
small { font-size: .81rem; }
.muted { color: var(--muted); }
.math { font-family: "Cambria Math", Cambria, Georgia, serif; }
.icon { width: 20px; height: 20px; vertical-align: middle; flex: none; }
.skip-link { position: fixed; top: -60px; left: 12px; z-index: 100; background: var(--paper); padding: 10px; }
.skip-link:focus { top: 10px; }
.startup-help { max-width: 40rem; margin: min(12vh, 80px) auto 0; padding: 20px 24px; }
.startup-help h1 { font-size: clamp(1.5rem, 5vw, 2.25rem); }
body[data-software-version^="_"] .startup-legacy { display: block; }
html[data-startup-failed] .startup-error { display: block; }
body[data-software-version^="_"] .startup-loading,
body[data-software-version^="_"] .startup-error,
html[data-startup-failed] .startup-loading { display: none; }
.layout { --rail-width: 224px; --site-header-height: 58px; --work-sticky-top: var(--site-header-height); display: grid;
  grid-template-columns: var(--rail-width) minmax(0,1fr); grid-template-rows: var(--site-header-height) 1fr; min-height: 100vh; }
.site-header { --header-inline: clamp(12px,2.25vw,34px); grid-column: 1/-1; position: sticky; z-index: 10; top: 0; display: flex; align-items: center;
  justify-content: space-between; gap: 8px; min-width: 0; height: var(--site-header-height);
  padding-inline: var(--header-inline); border-bottom: 1px solid var(--line); background: var(--paper); }
.site-brand,.site-account-tools,.site-quick-tools { display: flex; align-items: center; gap: 8px; min-width: 0; }
.site-brand { --brand-gap: 8px; flex-shrink: 0; }
.site-account-tools { justify-content: flex-end; }
.site-quick-tools { display: none; flex: none; }
.site-account { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 5px; min-width: 0; min-height: 37px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font-size: .85rem; font-weight: 650; }
.site-account:hover,.site-account[aria-current="page"] { background: var(--tint); color: var(--purple-dark); }
.site-account-avatar { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--tint); color: var(--purple-dark); }
.site-account-avatar .icon { width: 15px; height: 15px; }
#site-account-name { min-width: 0; max-width: min(25vw,240px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-account-menu { position: fixed; inset: calc(var(--site-header-height) + 5px) clamp(10px,2.25vw,34px) auto auto;
  width: min(252px,calc(100vw - 20px)); max-height: calc(100dvh - var(--site-header-height) - 15px);
  margin: 0; padding: 8px; color: var(--ink); background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 12px 34px #19113832; }
.site-account-card-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px; overflow-wrap: anywhere; }
.site-account-card-head .site-account-avatar { display: grid; width: 37px; height: 37px; font-weight: 700; }
.site-account-actions { display: grid; gap: 3px; padding-top: 6px; border-top: 1px solid var(--line); }
.site-account-actions .btn-account { min-height: 38px; justify-content: flex-start; padding: 7px 9px;
  border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: .88rem; }
.site-account-actions .btn-account:hover,.site-account-actions .btn-account:focus-visible { background: var(--tint); color: var(--purple-dark); }
#account-switch-dialog { --dialog-width: 380px; }
#account-switch-dialog .account-message:empty { display: none; }
#account-switch-dialog .actions { justify-content: flex-end; }
.rail { height: calc(100dvh - var(--site-header-height)); position: sticky; top: var(--site-header-height); border-right: 1px solid var(--line);
  background: var(--paper); display: flex; flex-direction: column; padding: 23px 16px 16px; z-index: 2; }
.brand { display: flex; align-items: center; gap: 8px; text-align: left; padding: 0; background: none; border: 0; color: var(--ink); white-space: nowrap; }
.theme-toggle.icon-btn { flex: none; min-width: 34px; min-height: 34px; border-color: transparent; }
.theme-toggle span { display: grid; place-items: center; }
.theme-toggle .icon { width: 17px; height: 17px; }
.theme-toggle .theme-sun,[data-theme="dark"] .theme-toggle .theme-moon { display: none; }
[data-theme="dark"] .theme-toggle .theme-sun { display: grid; }
.brand-mark { display: grid; place-items: center; height: 42px; width: 42px; border-radius: 13px; background: #6e4beb; color: white; box-shadow: 0 5px 12px #6e4beb45; }
.brand-mark .icon { width: 25px; height: 25px; }
.brand b { display: block; font-size: 1.16rem; letter-spacing: -.03em; }
.brand small { display: block; color: var(--soft); font-size: .72rem; margin-top: 3px; }
.volume-switch { display: flex; flex: none; align-items: center; justify-content: flex-start; gap: 8px; min-height: 36px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--purple-dark); font-weight: 700; }
.volume-switch:hover { background: var(--tint); }
.volume-switch .icon { width: 18px; height: 18px; }
.volume-switch-label { display: flex; line-height: 1.15; white-space: nowrap; }
.app-dialog { position: fixed; width: min(var(--dialog-width,480px),calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  margin: auto; padding: clamp(18px,5vw,28px); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 64px #221a5160; overflow: auto; }
.app-dialog::backdrop { background: #1712366b; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.dialog-header h2 { align-self: center; min-width: 0; overflow-wrap: anywhere; }
.dialog-header-actions { display: flex; flex: none; gap: 8px; }
.work-question-picker { --dialog-width: 540px; }
.bank-dialog { display: grid; gap: 14px; }
.bank-dialog .dialog-header { margin-bottom: 0; }
.bank-count { margin: 0 0 6px; font-size: .8rem; }
.bank-rows { max-height: min(48dvh,400px); overflow: auto; overscroll-behavior: contain; list-style: none;
  margin: 0; padding: 0 3px; border-block: 1px solid var(--line); }
.bank-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 5px 12px;
  width: 100%; min-height: 54px; padding: 8px; border: 0; border-bottom: 1px solid var(--line);
  color: var(--ink); background: transparent; text-align: left; }
.bank-rows li:last-child .bank-row { border-bottom: 0; }
.bank-row:hover,.bank-row[aria-current] { background: var(--tint); }
.bank-row:focus-visible { outline-offset: -3px; }
.bank-row-title { flex: 1 1 11rem; min-width: 0; overflow-wrap: anywhere; font-size: .91rem; }
.bank-row-title small { display: block; margin-top: 3px; color: var(--muted); }
.bank-row-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .76rem; }
.bank-row-meta .chip { padding: 3px 7px; min-height: 24px; }
.plan-picker-scroll { max-height: min(56dvh,480px); overflow: auto; overscroll-behavior: contain;
  padding: 0 3px; border-block: 1px solid var(--line); }
.plan-picker-scroll > section + section { margin-top: 18px; }
.plan-picker-scroll h3 { padding: 12px 8px 6px; }
.plan-picker-scroll h4 { margin: 8px 8px 0; font-size: .8rem; color: var(--muted); }
.plan-picker-rows { margin: 0; padding: 0; list-style: none; }
.dialog-content > p { margin-top: 8px; }
.volume-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-block: 20px 12px; }
.volume-options .btn { min-height: 48px; }
.backup-options { margin-block: 20px 12px; }
#backup-dialog [data-backup-status]:not([hidden]) { margin-bottom: 12px; }
#confirm-dialog .actions { margin-top: 18px; justify-content: flex-end; }
#login-dialog .account-box { margin: 0; padding: 0; border: 0; box-shadow: none; }
#login-dialog .account-tabs { margin-top: 14px; }
[data-volume-status]:empty { display: none; }
.nav-label { font-size: .73rem; font-weight: 650; letter-spacing: .11em; color: var(--soft); margin: 0 12px 11px; }
.nav { display: grid; gap: 5px; }
#featured-notes-title,#archive-notes-title,#answer-records-title { scroll-margin-top:130px; }
.notes-shortcuts { margin-bottom:16px; }
.nav .nav-short { display: none; }
.nav button { display: flex; text-align: left; align-items: center; gap: 12px; border: 0; border-radius: 10px; min-height: 46px; padding: 9px 12px; background: transparent; color: var(--muted); font-size: .91rem; font-weight: 580; }
.nav button:hover { background: var(--bg); }
.nav button[aria-current="page"] { color: var(--purple-dark); background: var(--tint); font-weight: 700; }
.question-chapters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding: 4px; margin: -4px -4px 12px; }
.question-chapters .chapter-filter { flex: none; white-space: nowrap; min-height: 36px; border-radius: 999px;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); padding: 6px 14px; }
.question-chapters .chapter-filter:hover { background: var(--tint); color: var(--purple-dark); }
.question-chapters .chapter-filter[aria-pressed="true"] { border-color: var(--purple); background: var(--tint); color: var(--purple-dark); }
.question-chapters .chapter-filter:focus-visible { outline-offset: -3px; }
.library-filters { display: grid; grid-template-columns: minmax(0,2.2fr) repeat(3,minmax(0,1fr)) auto; gap: 12px; align-items: end; margin-bottom: 16px; }
.library-filters .field { min-width: 0; }
.library-filters select,.library-filters input { min-width: 0; width: 100%; }
.library-filters .btn { justify-self: start; }
.library-rows { padding: 0; list-style: none; margin: 12px 0 18px; border-top: 1px solid var(--line); }
.library-row { display: grid; grid-template-columns: minmax(0,1fr) auto 16px; align-items: center; gap: 14px;
  width: 100%; min-height: 62px; padding: 14px 12px; background: transparent; border: 0;
  border-bottom: 1px solid var(--line); text-align: left; color: inherit; }
.library-row:hover,.library-row:focus-visible { background: var(--tint); }
.library-row:focus-visible { outline-offset: -3px; }
.library-row > .icon { width: 16px; height: 16px; color: var(--muted); }
.library-row:is(:hover,:focus-visible) > .icon { color: var(--purple-dark); }
.library-row strong,.library-row small { display: block; overflow-wrap: anywhere; }
.library-row small { color: var(--muted); }
.library-row-copy { display: grid; min-width: 0; gap: 5px; }
.library-row-copy > strong { line-height: 1.35; }
.library-meta { display: flex; align-items: center;
  gap: 8px; font-size: .875rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.question-difficulty { flex: none; min-width: 2.5ch; white-space: nowrap; }
.library-meta .chip { min-width: 5.25rem; justify-content: center; }
.quest-page { --quest-accent: var(--purple-dark); --quest-line: color-mix(in srgb,var(--quest-accent) 47%,var(--line));
  --quest-grid-line: color-mix(in srgb,var(--quest-accent) 8%,transparent);
  --quest-track: color-mix(in srgb,var(--quest-accent) 11%,var(--line));
  --quest-success: color-mix(in srgb,var(--green) 13%,var(--paper));
  max-width: 1040px; margin: 0 auto; }
.quest-hero { position: relative; display: flex; align-items: center; min-height: 186px; overflow: hidden;
  padding: 30px clamp(22px,4.3vw,48px); border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(112deg,var(--tint),color-mix(in srgb,var(--tint) 62%,var(--paper))); }
.quest-hero > div { position: relative; z-index: 1; }
.quest-hero h1 { font-size: clamp(1.9rem,3.6vw,2.65rem); }
.quest-hero p { margin-top: 10px; color: var(--muted); line-height: 1.65; }
.quest-hero-graph { position: absolute; inset: 50% clamp(14px,4.5vw,52px) auto auto; transform: translateY(-50%);
  width: min(42%,340px); height: auto; color: var(--quest-accent); fill: currentColor; }
.quest-hero-graph path { fill: none; stroke: currentColor; }
.quest-graph-grid { opacity: .13; }
.quest-graph-axis { opacity: .66; }
.quest-graph-curve { stroke-width: 2; }
.quest-hero-graph text { font: italic 16px Cambria,serif; }
.quest-route-list { display: grid; gap: 13px; margin-top: 22px; }
.quest-route-card { display: grid; grid-template-columns: auto minmax(0,1fr) minmax(100px,22%) auto; align-items: center;
  gap: clamp(10px,2.5vw,25px); width: 100%; min-width: 0; padding: 16px clamp(14px,2.4vw,25px);
  border: 1px solid var(--line); border-radius: 16px; text-align: left; color: var(--ink); background: var(--paper); box-shadow: var(--shadow); }
.quest-route-card:hover,.quest-level-button:enabled:hover { border-color: var(--quest-line); }
.quest-route-symbol { display: grid; place-items: center; width: 66px; aspect-ratio: 1; border-radius: 12px;
  color: var(--quest-accent); background: var(--tint); }
.quest-route-symbol i { font: bold italic 2.1rem Cambria,serif; }
.quest-route-symbol .icon { width: 33px; height: 33px; }
.quest-route-card[data-id="geometry"] .quest-route-symbol { color: var(--green); background: var(--quest-success); }
.quest-route-card[data-id="probability"] .quest-route-symbol {
  color: #916213; background: color-mix(in srgb,#e6a32c 16%,var(--paper)); }
.quest-route-copy,.quest-level-copy { display: grid; min-width: 0; gap: 4px; overflow-wrap: anywhere; }
.quest-route-copy strong { font-size: clamp(1.05rem,2.1vw,1.36rem); line-height: 1.3; }
.quest-route-copy small,.quest-level-copy small { color: var(--muted); font-size: .8rem; }
.quest-route-card > .icon { width: 16px; height: 16px; color: var(--muted); }
.quest-progress { display: grid; gap: 6px; color: var(--muted); font-size: .86rem; font-variant-numeric: tabular-nums; }
.quest-progress progress { appearance: none; width: 100%; height: 7px; overflow: hidden; border: 0;
  border-radius: 999px; background: var(--quest-track); accent-color: var(--quest-accent); }
.quest-progress progress::-webkit-progress-bar { background: var(--quest-track); }
.quest-progress progress::-webkit-progress-value { border-radius: 999px; background: var(--quest-accent); }
.quest-progress progress::-moz-progress-bar { border-radius: 999px; background: var(--quest-accent); }
.quest-map-header { position: sticky; z-index: 2; top: var(--work-sticky-top); display: grid;
  grid-template-columns: auto minmax(0,1fr) minmax(110px,24%); align-items: center; gap: 13px;
  padding: 12px 0 16px; background: var(--bg); }
.quest-map-header h1 { font-size: clamp(1.45rem,3vw,2rem); }
.quest-map-header h1:focus { outline: none; }
.quest-back { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--paper); color: var(--ink); }
.quest-back .icon { transform: rotate(180deg); }
.quest-back:hover { color: var(--quest-accent); border-color: var(--quest-line); }
.quest-map-header .quest-progress { grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 10px; }
.quest-chapter { margin: 0 0 16px; padding: 12px; overflow: clip; border: 1px solid var(--line); border-radius: 15px;
  background: repeating-linear-gradient(90deg,var(--quest-grid-line) 0 1px,transparent 1px 28px),
    repeating-linear-gradient(var(--quest-grid-line) 0 1px,transparent 1px 28px),var(--paper); }
.quest-chapter h2 { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 8px;
  font-size: .98rem; line-height: 1.4; background: var(--tint); }
.quest-chapter h2::before { content: ""; flex: 0 0 4px; height: 18px; border-radius: 3px; background: var(--quest-accent); }
.quest-levels { list-style: none; display: grid; grid-auto-rows: 102px; width: min(100%,680px);
  padding: 6px 0; margin: 0 auto; }
.quest-level { position: relative; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); place-items: center; }
.quest-level:nth-child(even) .quest-level-button { grid-column: 2; }
.quest-connector { position: absolute; top: 50%; left: 50%; transform: translateX(-50%);
  width: max(14px,calc(50% - 218px)); height: 100%; pointer-events: none;
  fill: none; stroke: var(--quest-line); stroke-width: 1.75; stroke-dasharray: 5 5; stroke-linecap: round; }
.quest-level-button { isolation: isolate; grid-column: 1; grid-row: 1; display: grid; grid-template-columns: auto minmax(0,1fr);
  align-items: center; gap: 10px; width: min(220px,calc(100% - 12px)); min-height: 64px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink);
  text-align: left; box-shadow: var(--shadow);
  scroll-margin-top: calc(var(--work-sticky-top) + 74px); }
.quest-level-button[aria-current="step"] { background: var(--tint); border-color: var(--quest-line); }
.quest-level-button[data-passed] { border-color: color-mix(in srgb,var(--green) 36%,var(--line)); }
.quest-level-button:disabled { opacity: 1; color: var(--muted); background: var(--bg); box-shadow: none; }
.quest-level-button:disabled .quest-level-node { color: var(--muted); background: var(--line); }
.quest-level-copy strong { font-size: .97rem; line-height: 1.3; }
.quest-level-node { display: flex; align-items: center; justify-content: center; gap: 3px; min-width: 33px; height: 33px;
  padding-inline: 6px; border-radius: 999px; background: var(--tint); color: var(--quest-accent);
  font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.quest-level-button[aria-current="step"] .quest-level-node { background: var(--purple); color: white; }
.quest-level-button[data-passed] .quest-level-node { background: var(--quest-success); color: var(--green); }
.quest-level-node .icon { width: 13px; height: 13px; }
.quest-map-dialog { --dialog-width: 720px; padding: 0; overflow: hidden; }
.quest-map-dialog[open] { display: flex; flex-direction: column; }
.quest-map-dialog .dialog-header { flex: none; align-items: center; margin: 0;
  padding: 12px clamp(10px,3vw,20px); border-bottom: 1px solid var(--line); }
.quest-map-scroll { width: 100%; min-height: 0; overflow: auto; overscroll-behavior: contain;
  padding: 10px clamp(8px,2.5vw,16px) 0; }
.quest-map-scroll .quest-level-button { scroll-margin-top: 8px; }
.quest-map-dialog-progress { width: min(100%,220px); margin: 0 0 12px auto; }
.quest-map-dialog-progress .quest-progress { grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 10px; }
.plan-section { margin-block: 24px; }
.plan-section > h2 { margin-bottom: 12px; }
.guide-block + .guide-block { margin-top: 14px; }
.guide-section { margin-top: 12px; }
.guide-section .library-rows { margin-bottom: 0; }
.guide-reference td { min-width: 14rem; vertical-align: top; }
.guide-reference ol { margin: 0; padding-inline-start: 1.3rem; }
.guide-reference td .question-source-figure { margin: 0; }
.guide-models { margin-block-start: 12px; }
.guide-models ol { margin: 0; padding-inline-start: 1.3rem; }
.chapter-section { --chapter-inline: 24px; margin-top: 24px; scroll-margin-block-start: 95px;
  overflow: clip; border-radius: 14px; box-shadow: none; }
.chapter-section:first-child { margin-top: 0; }
.chapter-section h2 { padding: 20px var(--chapter-inline) 0; font-size: 1.35rem; line-height: 1.3; }
.chapter-section-number { color: var(--purple-dark); margin-inline-end: .2em; }
.chapter-section .plan-goal { scroll-margin-block-start: 100px; }
.chapter-section .plan-goal h3 { padding: 12px var(--chapter-inline) 14px; font-size: 1.04rem; }
.chapter-section .plan-goal + .plan-goal { padding-top: 12px; border-top: 1px solid var(--line); }
.chapter-question-list { margin: 0; }
.chapter-question-list .library-row { padding-inline: var(--chapter-inline); }
.chapter-question-list li:last-child .library-row { border-bottom: 0; }
.chapter-section-empty { padding: 12px var(--chapter-inline) 20px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,265px),1fr)); gap: 12px; }
.ongoing-plans { margin-bottom: 16px; }
.plan-card { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 15px; text-align: left; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--paper); }
.plan-card:hover { border-color: #b6a8ef; background: #faf9ff; }
.plan-card-copy { display: grid; min-width: 0; gap: 4px; }
.plan-card-copy strong { overflow-wrap: anywhere; }
.plan-card-copy small { color: var(--muted); }
.plan-card-complete { display: grid; place-items: center; flex: none; align-self: center;
  width: 26px; height: 26px; margin-inline-start: auto; border-radius: 50%; color: var(--green);
  background: color-mix(in srgb,var(--green) 12%,var(--paper));
  border: 1px solid color-mix(in srgb,var(--green) 45%,var(--paper)); }
.plan-card-complete .icon { width: 16px; height: 16px; stroke-width: 2.5; }
.plan-progress-card { align-items: center; gap: 14px; padding: 9px 12px 9px 9px; }
.plan-progress-cover { width: 70px; height: 70px; flex: none; display: block; border-radius: 8px; }
.plan-progress-copy { display: grid; flex: 1; min-width: 0; gap: 8px; }
.plan-progress-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.plan-progress-title strong { min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.plan-progress-track { display: block; overflow: hidden; height: 5px; border-radius: 999px; background: var(--tint); }
.plan-progress-track > span { display: block; height: 100%; border-radius: inherit; background: var(--purple); }
.plan-progress-caption { display: flex; justify-content: space-between; gap: 6px;
  font-size: .77rem; line-height: 1.35; font-variant-numeric: tabular-nums; color: var(--muted); }
.plan-progress-caption > :last-child { white-space: nowrap; }
.plan-progress-caption b { color: var(--purple-dark); }
.featured-plans { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); grid-auto-rows: 1fr; gap: 14px; }
.featured-plan { display: flex; flex-direction: column; justify-content: space-between; gap: 9px; padding: 12px; min-width: 0; }
.featured-copy { display: grid; gap: 6px; padding: 4px 3px 3px; }
.featured-copy strong { font-size: 1.03rem; line-height: 1.32; overflow-wrap: anywhere; }
.featured-copy small { color: var(--muted); font-size: .79rem; line-height: 1.42; }
.featured-plan canvas { width: 100%; height: auto; aspect-ratio: 360 / 208; display: block; border-radius: 9px; }
.featured-plan:focus-visible { outline-offset: -3px; }
@media(max-width:1080px) { .featured-plans { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width:960px) { .featured-plans { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:430px) { .featured-plans { grid-template-columns: minmax(0,1fr); } }
@media(max-width:700px) {
  .quest-hero { min-height: 152px; }
  .quest-hero p { max-width: 14em; font-size: .9rem; }
  .quest-hero-graph { opacity: .65; }
  .quest-route-card { grid-template-columns: auto minmax(0,1fr) minmax(52px,20%) auto; gap: 10px; }
  .quest-route-symbol { width: 48px; }
  .quest-route-symbol i { font-size: 1.65rem; }
  .quest-route-symbol .icon { width: 25px; height: 25px; }
  .quest-map-header { grid-template-columns: auto minmax(0,1fr) minmax(72px,24%); gap: 8px; }
  .quest-map-header .quest-progress { grid-template-columns: 1fr; gap: 4px; }
  .quest-chapter { padding: 8px; }
  .quest-levels { grid-auto-rows: 94px; }
  .quest-level-button { gap: 6px; padding: 8px; }
  .quest-level-copy strong { font-size: .9rem; }
  .quest-level-copy small { font-size: .73rem; }
  .quest-level-node { min-width: 27px; height: 27px; padding-inline: 4px; }
  .library-filters { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .library-query { grid-column: 1/-1; }
  .library-row { grid-template-columns: minmax(0,1fr) 16px; gap: 7px; }
  .library-row > :first-child { grid-column: 1/-1; }
  .library-meta { flex-wrap: wrap; font-size: .78rem; }
  .library-meta .chip { min-width: 0; }
  .chapter-section { --chapter-inline: 16px; }
}
.rail-bottom { margin-top: auto; }
.rail-calendar,#calendar-dialog [data-calendar-body] { padding: 8px 7px; border-radius: 12px; background: #f7f4ff; }
.rail-calendar { margin-bottom: 11px; }
.calendar-heading { display: grid; grid-template-columns: auto 1fr auto; align-items: center; text-align: center; gap: 4px; }
.calendar-heading .icon-btn { min-height: 27px; min-width: 27px; padding: 4px; border-color: transparent; background: transparent; }
.calendar-heading .icon-btn:hover { background: #ebe4ff; color: var(--purple-dark); }
.calendar-heading strong { font-size: .82rem; color: #443180; font-variant-numeric: tabular-nums; }
.study-calendar { table-layout: fixed; margin: 3px 0 7px; }
.study-calendar :is(th,td) { text-align: center; padding: 0; border: 0; font-size: .72rem; background: transparent; }
.study-calendar th { padding-block: 3px; color: #75698c; font-weight: 600; }
.calendar-day { display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: min(100%,24px); min-height: 24px; margin-inline: auto; border-radius: 7px; line-height: 1.15;
  font-variant-numeric: tabular-nums; }
.calendar-day.future { justify-content: flex-start; padding-top: 2px; color: #766d86; }
.study-calendar td[aria-current="date"] .calendar-day { background: #e9dfff; color: #4c2a98; font-weight: 750; box-shadow: inset 0 0 0 1px #d8c9ff; }
.calendar-dot { width: 5px; height: 5px; display: block; margin-top: 2px; border-radius: 50%; background: var(--calendar-idle); }
.calendar-dot.worked { background: var(--calendar-done); }
.calendar-legend { display: flex; justify-content: center; gap: 8px; color: var(--muted); font-size: .68rem; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 3px; }
.calendar-legend .calendar-dot { margin: 0; }
#calendar-dialog { --dialog-width: 400px; }
#calendar-dialog .calendar-day { width: 32px; min-height: 32px; }
#calendar-dialog .calendar-day.future { padding-top: 6px; }
.archive-notes .topic-list,.notes-form,.note-status { margin-top: 10px; }
.notes-form { display: grid; gap: 12px; }
.note-entry { margin-bottom: 16px; scroll-margin-top: calc(var(--work-sticky-top,0px) + 10px); }
.archive-notes .topic-row > span { min-width: 0; overflow-wrap: anywhere; }
.archive-note-preview { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden; white-space: pre-wrap; color: var(--ink); margin-top: 4px; }
.note-source { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between;
  margin-top: 12px; padding: 10px 12px; background: var(--tint); border: 1px solid var(--line); border-radius: 10px; }
.note-source div { min-width: 0; overflow-wrap: anywhere; }
.note-source small { display: block; margin-top: 2px; color: var(--muted); }
.featured-notes { margin-bottom: 18px; }
.featured-notes-header,.featured-note-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.featured-notes-header p { margin-top: 6px; }
.featured-notes-layout { display: grid; grid-template-columns: minmax(200px, .8fr) minmax(0, 2fr); gap: 24px; margin-top: 20px; }
.featured-note-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; align-self: start; }
.featured-note-card { display: grid; gap: 6px; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; overflow-wrap: anywhere; }
.featured-note-card small,.featured-note-heading small { color: var(--muted); font-size: .76rem; }
.featured-note-card b { font-size: .9rem; line-height: 1.5; }
.featured-note-card:hover,.featured-note-card.active { border-color: var(--purple); background: var(--tint); }
.featured-note-card:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.featured-note-detail { min-width: 0; }
.featured-note-heading { scroll-margin-top: 112px; }
.featured-note-heading h3 { margin-top: 7px; font-size: 1.1rem; line-height: 1.5; }
.featured-note-heading h3:focus { outline: none; }
.featured-note-heading h3:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }
.featured-note-overview { margin-top: 16px; font-size: .9rem; line-height: 1.85; overflow-wrap: anywhere; }
.featured-note-reading-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-block: 16px; }
.featured-note-reading-tools > p { font-size: .8rem; }
.featured-note-sections { display: grid; gap: 12px; margin-bottom: 18px; }
.featured-note-section { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); overflow-wrap: anywhere; }
.featured-note-section > summary { cursor: pointer; padding: 14px 16px; color: var(--ink); line-height: 1.6; }
.featured-note-section > summary > span { font-weight: 700; font-size: .92rem; }
.featured-note-section > summary > small { display: block; margin-top: 3px; color: var(--muted); font-size: .75rem; padding-left: 17px; }
.featured-note-section[open] > summary { border-bottom: 1px solid var(--line); }
.featured-note-section-content { padding: 4px 16px 16px; font-size: .9rem; line-height: 1.9; }
.featured-note-section-content h4 { font-size: .85rem; color: var(--purple-dark); margin-top: 16px; margin-bottom: 6px; }
.featured-note-point-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
.featured-note-point-list li { border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; color: var(--muted); font-size: .75rem; }
.featured-note-rules,.featured-note-steps { padding-left: 22px; }
.featured-note-rules li,.featured-note-steps li { margin-block: 7px; padding-left: 3px; }
.featured-note-example { border-top: 1px solid var(--line); margin-top: 16px; }
.featured-note-example h5 { font-size: .8rem; margin-top: 12px; color: var(--muted); }
.featured-note-problem { font-weight: 600; }
.featured-note-answer { background: var(--tint); color: var(--ink); padding: 10px 12px; border-radius: 8px; margin-top: 12px; }
.featured-note-pitfall { margin-top: 16px; padding-left: 12px; border-left: 3px solid var(--purple); color: var(--muted); font-size: .83rem; }
.featured-note-sources { border-block: 1px solid var(--line); padding: 12px 0; font-size: .82rem; line-height: 1.75; overflow-wrap: anywhere; }
.featured-note-sources summary { cursor: pointer; color: var(--purple-dark); font-weight: 650; }
.featured-note-sources p { color: var(--muted); margin-top: 10px; }
.featured-note-sources ul { padding-left: 20px; }
.featured-note-sources li { margin-top: 10px; }
.featured-note-sources small { display: block; color: var(--muted); }
.featured-note-empty { padding: 16px 0; }
.featured-notes-storage { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .76rem; }
@media (min-width: 761px) {
  .featured-note-list { position: sticky; top: 82px; }
}
@media (max-width: 760px) {
  .featured-notes-layout { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .featured-note-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .featured-note-card { padding: 10px; }
  .featured-note-card b { font-size: .82rem; }
}
.edition { display: flex; gap: 9px; align-items: center; padding: 14px 10px 0; margin: 12px 0 0; border-top: 1px solid var(--line); color: var(--soft); font-size: .76rem; }
.main { width: min(100%, 1550px); margin: 0 auto; align-self: start; padding: 29px 37px 45px; min-width: 0; }
.page-header { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 20px; margin-bottom: 22px;
  padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.page-heading { flex: 1 1 21rem; min-width: 0; overflow-wrap: anywhere; }
.page-heading p { max-width: 72ch; margin-top: 7px; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.page-actions { min-width: 0; }
.page-content { display: flow-root; min-width: 0; }
.page-content > .plan-section:first-child { margin-block-start: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 29px; padding: 5px 10px; border-radius: 99px; border: 1px solid transparent; font-size: .78rem; font-weight: 650; color: var(--purple-dark); background: var(--tint); white-space: nowrap; }
.chip.muted { color: var(--muted); background: #f3f3f9; }
.chip.ok { color: #136c5b; background: #e6f5ed; }
.chip.warn { color: #8a500b; background: #fff4de; }
.chip.white { background: var(--paper); border-color: var(--line); color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; border: 1px solid transparent; padding: 8px 14px; border-radius: 9px; font-weight: 680; font-size: .88rem; line-height: 1.35; text-decoration: none; text-align: center; }
.btn .icon { width: 17px; height: 17px; }
.btn.primary { background: var(--purple); color: #fff; box-shadow: 0 2px 4px #402b7330; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.light { background: #fff; color: #512acb; }
.btn.light:hover { background: #f0eaff; }
.btn.secondary { background: #fff; border-color: #e5e1ed; color: #423b57; }
.btn.secondary:hover { background: #f9f7ff; border-color: #cabcfb; }
.btn.ghost { background: transparent; color: var(--purple-dark); }
.btn.ghost:hover { background: var(--tint); }
.btn.danger { background: #fff1f4; color: #a93855; }
.btn.small { padding: 5px 9px; min-height: 34px; font-size: .79rem; }
.icon-btn { border: 1px solid var(--line); background: var(--paper); color: var(--muted); border-radius: 8px; min-height: 34px; min-width: 34px; padding: 5px; display: inline-grid; place-items: center; }
.icon-btn:hover,.icon-btn[aria-pressed=true] { color: var(--purple-dark); background: var(--tint); }
.bank-nav { display: inline-flex; align-items: center; gap: 2px; padding: 2px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.bank-nav .bank-trigger { gap: 5px; padding-inline: 7px; white-space: nowrap; }
.bank-nav .icon-btn { min-width: 30px; min-height: 34px; border-color: transparent; }
.bank-nav .icon-btn:disabled:hover { color: var(--muted); background: var(--paper); }
.bank-nav .icon { width: 17px; height: 17px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); min-width: 0; }
.badge-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 11px; color: #6543d7; background: #eee9ff; }
.badge-icon.teal { background: #e2f6f1; color: #14856f; }
.badge-icon.peach { background: #fceee4; color: #b4633c; }
.badge-icon.blue { background: #e7f0ff; color: #426cc2; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 12px; }
.section-head .btn { margin-right: -6px; }
.study-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; }
.study-layout > .splitter { display: none; }
.main:has(.work-workspace) { width: 100%; padding: 14px 16px 16px; }
.work-reference,.work-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0;
  overflow-wrap: anywhere; border-radius: 12px; box-shadow: none; }
.work-panel-tabs { flex: none; display: flex; flex-wrap: wrap; gap: 0 12px; padding: 0 16px;
  border-bottom: 1px solid var(--line); border-radius: 11px 11px 0 0; background: var(--bg); }
.work-panel-tabs .btn { min-height: 45px; padding: 7px 8px; border: 0; border-bottom: 2px solid transparent;
  border-radius: 0; color: var(--muted); background: transparent; font-size: .9rem; }
.work-reference-tab[aria-pressed="true"] { color: var(--purple-dark); border-color: var(--purple); }
.work-panel-tabs .btn:hover { background: var(--tint); }
.work-panel-body { flex: 1; min-height: 0; min-width: 0; padding: clamp(14px,1.5vw,22px); }
#work-reference-content > [data-question-scope] { margin: 0 0 18px; }
.work-problem-heading { display: flex; align-items: center; gap: 12px; }
.work-problem-heading h1 { font-size: clamp(1.3rem,2vw,1.7rem); }
.work-reference .question-prompt { background: transparent; border: 0; padding: 0; margin: 12px 0 0; }
.work-reference .question-prompt canvas { width: min(100%,340px); }
.work-answer-footer { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px;
  padding: 10px 14px; border-top: 1px solid var(--line); }
.work-answer-footer .work-controls { margin-inline-start: auto; }
.work-answer-footer .work-controls:empty { display: none; }
.work-controls [hidden] { display: none; }
.answer-result, .answer-field {
  --answer-tone: var(--muted);
  --answer-fill: var(--bg);
}
:is(.answer-result,.answer-field)[data-verdict="pass"] {
  --answer-tone: var(--green);
  --answer-fill: var(--success-fill,#e5f5ed);
}
:is(.answer-result,.answer-field)[data-verdict="wrong"] {
  --answer-tone: var(--danger-ink,#b42548);
  --answer-fill: var(--danger-fill,#fceaf0);
}
:is(.answer-result,.answer-field):is([data-verdict="review"],[data-verdict="blank"],[data-verdict="missing"],[data-verdict="edited"]) {
  --answer-tone: var(--warning-ink,#835016);
  --answer-fill: var(--warning-fill,#fff2df);
}
.answer-result {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px;
  margin-bottom: 22px; padding: 16px; border-radius: 12px; background: var(--answer-fill);
}
.answer-result-icon {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none;
  border: 2px solid currentColor; border-radius: 50%; color: var(--answer-tone); font-weight: 750;
}
.answer-result-copy { display: grid; flex: 1; gap: 2px; }
.answer-result-copy strong { font-size: 1.12rem; color: var(--ink); }
.answer-result-copy span { color: var(--muted); font-size: .85rem; }
.answer-result .btn { margin-inline-start: auto; }
.answer-field-heading { display: flex; align-items: start; justify-content: space-between; gap: 6px 10px; }
.answer-field-heading label { padding-block: 2px; }
.answer-mark {
  display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 2px 8px;
  border-radius: 1em; background: var(--answer-fill); color: var(--answer-tone);
  font-size: .76rem; font-weight: 650;
}
.answer-field .answer-mark-reason { display: block; margin: 5px 0 0; color: var(--answer-tone); }
.answer-field .answer-mark[hidden],.answer-field .answer-mark-reason[hidden] { display: none; }
.answer-field .answer-field-note { display: block; margin: 2px 0 0; }
#work-hints .bubble:first-child { margin-top: 0; }
.work-inline-guidance,.work-panel-body #answer-form + .actions { margin-top: 14px; }
.work-solution details { margin-top: 10px; }
.work-incomplete { color: var(--muted); }
.work-incomplete { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: .84rem; }
.work-incomplete[hidden],.work-incomplete [hidden] { display: none; }
.question,.paper,.box { padding: 21px; }
.question { scroll-margin-top: 15px; }
.question-prompt { background: #f8f6ff; border: 1px solid #eee8fe; border-radius: 12px; padding: 15px; margin: 15px 0; }
.question-prompt p { font-size: 1rem; }
.question-prompt canvas { max-width: 100%; display: block; width: 250px; margin: 10px auto 0; }
.question-prompt table { width: 100%; margin-top: 10px; }
.question-rich-text { max-width: 100%; overflow-x: auto; }
.question-rich-text > :first-child { margin-top: 0; }
.question-rich-text > :last-child { margin-bottom: 0; }
.question-rich-text pre { white-space: pre; }
.question-rich-text th, .question-rich-text td { white-space: nowrap; }
.form-fields { display: grid; gap: 13px; }
.answer-scenario { min-inline-size: 0; margin: 0; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 10px; }
.answer-scenario legend { padding-inline: 4px; font-weight: 650; }
.answer-scenario p { margin: 0 0 .75rem; }
.answer-scenario .field + .field { margin-top: .65rem; }
[data-scenario-keyboard]:empty { display: none; }
[data-scenario-fields] .proof-notice { margin: 0; }
.construction { min-width: 0; display: grid; gap: 8px; }
.construction-grid { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--graphic-sheet); }
.construction-grid[data-editable] { cursor: crosshair; }
.construction output { font-size: .875rem; color: var(--muted); }
.field { display: block; color: #46415a; font-size: .9rem; font-weight: 650; }
.field small { font-weight: 400; margin-left: 6px; }
.field input,.field textarea,.field select,input.control,select.control,textarea.control { width: 100%; margin-top: 5px; border-radius: 9px; border: 1px solid #dedbe9; background: #fff; padding: 9px 10px; color: var(--ink); font-weight: 400; min-height: 41px; }
textarea { resize: vertical; }
.field textarea { min-height: 94px; }
.field input[readonly],.field textarea[readonly] { background: #f7f7fa; }
.keyboard { margin: 12px 0; }
.keyboard-groups { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 14px; }
.keyboard-group { display: grid; gap: 3px; min-width: 0; max-width: 100%; }
.keyboard-group-label { font-size: .75rem; color: var(--muted); }
.keyboard-keys { display: flex; flex-wrap: wrap; gap: 5px; }
.keyboard button { font: 1rem "Cambria Math",serif; min-width: 34px; min-height: 30px; padding: 2px 6px; }
.keyboard-more { margin-top: 6px; }
.keyboard-more summary { font-size: .85rem; cursor: pointer; }
.keyboard-extra { margin-top: 6px; }
.work-top { position: sticky; top: var(--work-sticky-top,0px); z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; padding: 6px 0; background: var(--bg); }
.work-controls { margin-top: 0; }
.exercise-workspace .work-toolbar { position: relative; top: auto; flex: none; justify-content: space-between;
  margin-bottom: 12px; padding: 8px 12px; background: var(--paper); box-shadow: none; border-radius: 12px; }
@media(min-width:701px) {
  .work-workspace { display: flex; flex-direction: column;
    height: max(570px,calc(100dvh - var(--site-header-height) - 30px)); }
  .study-layout { flex: 1; min-height: 0; grid-template-columns: minmax(0,calc((100% - 14px) * var(--split-ratio,.5))) 14px minmax(0,1fr); gap: 0; }
  .study-layout > .splitter { display: grid; place-items: center; cursor: col-resize; touch-action: none; }
  .splitter::after { content: ""; width: 4px; height: 24px; border-radius: 5px;
    background: radial-gradient(circle,var(--purple) 1.5px,transparent 2px) 0 0 / 4px 8px repeat-y; opacity: .65; }
  .splitter:is(:hover,:focus-visible)::after { opacity: 1; }
  .work-panel-body { overflow: auto; overscroll-behavior: contain; }
}
.question-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.question-nav button[aria-current="step"] { color: white; background: var(--purple); border-color: var(--purple); }
.question-nav button.answered:not([aria-current="step"]) { background: #eee9ff; color: var(--purple-dark); border-color: #dfd4ff; }
.bubble { padding: 12px 14px; margin-top: 12px; background: #f3efff; border-radius: 10px; color: #443273; font-size: .89rem; }
.bubble.ok { background: #e8f6ef; color: #205b4b; }
.bubble.warn { background: #fff3e5; color: #784516; }
.bubble p + p { margin-top: 5px; }
.bubble .actions { margin-top: 7px; }
[data-step-hint], [data-step-check] { scroll-margin-block: 100px 70px; min-width: 0; }
[data-step-hint] > .bubble, [data-step-check] > .bubble { margin: 0; }
.answer-scenario [data-step-hint], .answer-scenario [data-step-check] { margin-block: 8px; }
.topic-alternatives { margin-block: 8px 10px; }
.topic-alternatives .btn { font-size: .82rem; padding: 6px 10px; min-height: 34px; }
@media(max-width:700px) {
}
.review-note { margin-top: 12px; }
.model { margin-top: 12px; border: 1px solid #e3dbf5; border-radius: 10px; padding: 12px; background: white; }
.model canvas { display: block; width: 100%; height: 150px; }
.model .slider { display: grid; grid-template-columns: 52px 1fr 32px; gap: 7px; align-items: center; margin: 7px 0; }
input[type=range] { width: 100%; accent-color: var(--purple); }
.paper { display: flex; flex-direction: column; gap: 11px; }
.draft-choices { display: grid; gap: 7px; }
.draft-choices .draft-choice { display: grid; gap: 3px; justify-content: stretch; text-align: left; overflow-wrap: anywhere; }
.draft-choice small { color: var(--muted); }
.draft-choice[aria-pressed="true"] { border-color: var(--purple); background: var(--tint); }
.paper-tools { display: grid; grid-template-columns: repeat(auto-fit,minmax(48px,1fr)); gap: 6px; }
.btn.paper-tool {
  flex-direction: column; gap: 4px; min-height: 60px; min-width: 0; padding: 6px 3px;
  border-color: var(--line); background: var(--paper); color: var(--ink); font-size: .8rem; white-space: nowrap;
}
.paper-tool .icon { width: 23px; height: 23px; }
.paper-tool[data-tool="point"] .icon { fill: currentColor; }
.btn.paper-tool:hover,.btn.paper-command:hover { background: var(--bg); }
.btn.paper-tool[aria-pressed="true"],.btn.paper-command[aria-pressed="true"] {
  color: var(--purple-dark); border-color: color-mix(in srgb,var(--purple) 27%,var(--line)); background: var(--tint);
}
.paper-utilities { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 5px; padding-block: 5px;
  border-block: 1px solid var(--line); }
.paper-utility-group { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding-inline-end: 5px;
  border-inline-end: 1px solid var(--line); }
.btn.paper-command {
  min-height: 32px; gap: 4px; padding: 4px 5px; border-radius: 7px;
  background: transparent; color: var(--muted); font-size: .76rem; white-space: nowrap;
}
.paper-command .icon { width: 15px; height: 15px; flex: none; }
.paper-zoom { min-width: 4ch; color: var(--ink); font-size: .78rem; font-variant-numeric: tabular-nums; text-align: center; }
.btn.paper-clear { margin-inline-start: auto; color: var(--danger-ink,#b42548); }
.btn.paper-clear:hover { background: var(--danger-fill,#fceaf0); }
.drawing { position: relative; flex: 1 0 auto; min-height: clamp(230px,35dvh,470px);
  overflow: hidden; border-radius: 9px; border: 1px solid #e5e0ef; background: #fff; }
.drawing.grid { background-image: linear-gradient(#ece8f7 1px,transparent 1px),linear-gradient(90deg,#ece8f7 1px,transparent 1px); background-size: 18px 18px; }
.drawing canvas { display: block; }
.drawing #paper { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.paper:has([data-tool="hand"][aria-pressed="true"]) #paper { cursor: grab; }
.paper:has([data-tool="hand"][aria-pressed="true"]) #paper:active { cursor: grabbing; }
.drawing #paper-diagram { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: contain; transform-origin: 0 0; pointer-events: none; opacity: .65; }
.paper-text-entry { display: flex; flex-wrap: wrap; align-items: end; gap: 7px 9px; margin-top: 5px; }
.paper-text-entry #scratch { flex: 1 1 220px; margin: 0; min-height: 56px; }
.paper-text-entry .btn { margin-inline-start: auto; white-space: nowrap; }
.paper [data-paper-angle-status] { color: var(--muted); }
.topic-layout { display: grid; grid-template-columns: minmax(330px,1fr) minmax(290px,.82fr); gap: 18px; align-items: start; }
.filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 10px 0; }
.filters .wide { grid-column: 1 / -1; }
.filter-toggle { color: var(--muted); font-size: .87rem; display: inline-flex; gap: 6px; align-items: center; }
.filter-toggle input { accent-color: var(--purple); }
.topic-list { display: grid; gap: 5px; margin-top: 12px; max-height: min(64vh, 650px); overflow: auto; padding: 3px; }
.topic-row { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 10px; display: flex; justify-content: space-between; align-items: center; gap: 7px; color: var(--ink); }
.topic-row b { display: block; font-size: .91rem; }
.topic-row small { display: block; color: var(--muted); margin-top: 4px; }
.topic-row.active,.topic-row:hover { background: #f7f3ff; border-color: #d8c8ff; }
.route-step { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; }
.route-step p { font-size: .82rem; color: var(--muted); }
.box > .actions:last-child { margin-top: 14px; }
.box + .box { margin-top: 15px; }
.box h2 + p,.box h3 + p { margin-top: 7px; }
details { border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; margin-top: 7px; }
summary { cursor: pointer; font-weight: 650; line-height: 1.55; }
details p { font-size: .87rem; margin-top: 7px; }
pre.response { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: .9rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th,td { text-align: left; border-bottom: 1px solid var(--line); padding: 8px 9px; font-size: .87rem; }
th { background: #f6f3fc; color: #53436d; }
.table-wrap td { min-width: 75px; }
.table-wrap td:nth-child(2) { min-width: 140px; }
.method { border-left: 3px solid #cdbbf9; padding-left: 10px; margin: 10px 0; }
.tiny-gap { display: grid; gap: 7px; }
.dice-bars { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 7px; margin: 12px 0 6px; }
.dice-bars > div { display: grid; grid-template-rows: auto 52px auto; gap: 4px; align-items: end; text-align: center; font-size: .82rem; }
.dice-bars span { background: var(--purple); height: max(2px,var(--bar)); border-radius: 5px 5px 0 0; }
.material-panel { display: grid; gap: 10px; margin-top: 12px; }
.material-task { font-size: .94rem; }
.material-canvas { width: 100%; height: auto; display: block; border: 1px solid var(--line); background: var(--graphic-sheet); border-radius: 10px; }
.function-graph-legend { display: flex; flex-wrap: wrap; gap: 5px 14px; padding: 6px 0; font-size: .83rem; }
.function-graph-legend span { display: inline-flex; align-items: center; gap: 6px; }
.function-graph-legend span::before { content: ''; width: 13px; height: 3px; border-radius: 2px; background: var(--graph-color); }
.function-graph-legend [data-graph-color="purple"] { --graph-color: #6543cf; }
.function-graph-legend [data-graph-color="green"] { --graph-color: #188575; }
.function-graph-legend [data-graph-color="brown"] { --graph-color: #a85827; }
.question-aid-controls { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.question-aid-controls input,.question-aid-controls select { width: 100%; min-width: 0; }
.question-aid-controls.pair-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
.question-aid-cube-grid { display: grid; gap: 5px; margin-block: 8px 12px; }
.question-aid-cube-grid .btn { min-height: 34px; padding: 4px; }
.question-aid-cube-grid .btn[aria-pressed="true"] { opacity: 1; border-color: var(--accent, #6543cf); }
.question-aid-cube-grid input { width: 100%; min-width: 0; }
.question-aid-steps:empty { display: none; }
.question-aid-steps { padding-inline-start: 1.5rem; overflow-wrap: anywhere; }
.question-aid-draggable { cursor: grab; touch-action: none; }
.question-aid-draggable:active { cursor: grabbing; }
.question-aid-table-scroll { max-width: 100%; overflow-x: auto; margin: 8px 0; }
.question-aid-table { width: 100%; border-collapse: collapse; text-align: center; white-space: nowrap; }
.question-aid-table caption { padding-bottom: 6px; text-align: left; font-weight: 650; }
.question-aid-table th,.question-aid-table td { padding: 3px; border: 1px solid #ddd3ee; }
.question-aid-table th { background: #f1ecfb; }
.question-aid-table button { width: 100%; min-height: 36px; padding-inline: 4px; font-variant-numeric: tabular-nums; }
.question-aid-table button[aria-pressed="true"] { background: #e3d7fb; color: #352463; box-shadow: inset 0 0 0 2px #7756cd; }
.trial-outcomes { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 6px; }
.trial-outcomes .btn { min-width: 43px; min-height: 38px; }
.trial-outcomes-grid { display: grid; grid-template-columns: repeat(var(--trial-columns), minmax(0,1fr)); }
.trial-outcomes-grid .btn { min-width: 0; padding-inline: 2px; }
.trial-outcomes button[aria-pressed="true"] { background: #e3d7fb; color: #352463; box-shadow: inset 0 0 0 2px #7756cd; }
.trial-outcomes button:disabled { opacity: .38; text-decoration: line-through; }
.product-grid-table :is(th,td) { min-width: 52px; padding: 4px 7px; }
.product-grid-table button[data-sign="negative"]:not([aria-pressed="true"]) { background: #fbe9dc; color: #77391f; }
.product-grid-table button[data-sign="positive"]:not([aria-pressed="true"]) { background: #e1f2ec; color: #22594b; }
.polyomino-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 4px; max-width: 252px; margin: 8px 0; }
.polyomino-grid button { aspect-ratio: 1; padding: 0; justify-content: center; }
.polyomino-grid button[aria-pressed="true"] { background: #e3d7fb; color: #352463; box-shadow: inset 0 0 0 2px #7756cd; }
@media (max-width: 520px) { .question-aid-controls { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.question-medium-label { margin: .45rem 0; font-size: .85rem; }
.question-givens { margin: .65rem 0; }
.question-source-figure img { display: block; width: min(100%, 46rem); height: auto; margin-inline: auto; }
.guide-source-figure img { width: min(100%, var(--guide-figure-width)); }
.guide-source-figure-wide { overflow-x: auto; }
.guide-source-figure-wide img { width: var(--guide-figure-width); max-width: none; }
.question-givens figcaption { margin-top: .45rem; }
.material-draggable { cursor: grab; touch-action: none; }
.material-axis-markable { cursor: crosshair; touch-action: manipulation; }
.material-draggable:active { cursor: grabbing; }
.material-pickable { cursor: pointer; }
.material-reading,.material-feedback { color: #433163; font-size: .88rem; line-height: 1.55; }
[data-quadratic-equation-reading] { overflow-wrap: anywhere; }
.material-feedback:empty { display: none; }
.material-slider { display: grid; grid-template-columns: minmax(105px,auto) minmax(60px,1fr) 32px; align-items: center; gap: 8px; font-size: .84rem; }
.quadratic-slider { grid-template-columns: minmax(96px,auto) minmax(40px,1fr) minmax(58px,auto); }
.material-slider input[hidden]+output { grid-column: 2 / -1; }
.material-slider .similarity-select { grid-column: 2 / -1; min-width: 0; margin-top: 0; }
.material-operation { display: grid; gap: 4px; }
.material-operation[hidden], .material-canvas[hidden] { display: none; }
[data-pythagorean-sliders][hidden], [data-pythagorean-chooser][hidden] { display: none; }
.material-operation .actions { margin: 0; }
.material-operation .btn { min-height: 44px; }
.material-builds { white-space: pre-line; }
.material-panel label[hidden] { display: none; }
.material-options,.material-buttons { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.material-cell { min-width: 65px; }
.worksheet-block { border: 1px solid #ddd5ed; border-radius: 12px; margin: 12px 0; padding: 10px 14px; min-inline-size: 0; }
.worksheet-block > legend { padding: 0 5px; font-weight: 650; }
.worksheet-block > h4 { margin: 2px 0 8px; }
.worksheet-fields,.worksheet-methods { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,155px),1fr)); gap: 8px 12px; }
.worksheet-block > p { overflow-wrap: anywhere; }
.material-frames { margin-top: 4px; }
.inline-material { border-radius: 12px; border: 1px solid #dcd4ee; padding: 12px; margin-top: 14px; background: #f9f7ff; }
.account-box { max-width: 750px; }
.account-form { display: grid; gap: 11px; margin-top: 13px; }
.account-tabs { margin-bottom: 14px; }
.account-message { color: #4c356a; border-left: 3px solid #baa0ea; background: #f8f3ff; padding: 7px 10px; margin: 8px 0; }
.account-relation { margin-top: 9px; }
.checkbox { font-size: .9rem; display: flex; align-items: flex-start; gap: 6px; color: #483961; }
.checkbox input { accent-color: var(--purple); }
.main:has(#assistance-catalog) { padding-top: 23px; }
.library-material-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; }
.library-material-header h1 { margin: 0; font-size: clamp(1.65rem,2.6vw,2.2rem); }
.library-material-filters { display: flex; flex: 1 1 380px; justify-content: end; align-items: center; flex-wrap: wrap; gap: 8px; }
.library-material-filters .field:has(input) { flex: 1 1 180px; max-width: 420px; min-width: 0; }
.library-material-filters .field :is(input,select) { margin: 0; }
.library-material-filters .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.library-material-categories { display: flex; flex-wrap: wrap; gap: 7px; margin-block: 17px; }
.library-material-categories .btn { white-space: nowrap; min-height: 36px; padding-inline: 10px; }
.library-material-layout { display: grid; grid-template-columns: minmax(180px,.95fr) minmax(0,2.65fr); gap: 12px; align-items: stretch; }
.library-results,.library-detail { border-radius: 13px; box-shadow: none; }
.library-results { display: flex; flex-direction: column; height: max(400px,calc(100dvh - 205px)); overflow: hidden; }
.library-results > header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 16px 13px 12px; }
.library-results h2 { margin: 0; font-size: 1.12rem; }
.library-results > header span { flex: none; font-size: .8rem; }
#material-list { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 0 8px 8px; }
.library-material-rows { margin: 0; padding: 0; list-style: none; }
.library-material-rows li + li { border-top: 1px solid var(--line); }
.library-material-row { width: 100%; min-height: 65px; border: 0; border-inline-start: 3px solid transparent;
  border-radius: 7px; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 9px;
  color: var(--ink); background: transparent; text-align: start; }
.library-material-row > .icon { flex: none; width: 21px; height: 21px; color: var(--purple-dark); }
.library-material-row > span { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.library-material-row strong { font-size: .88rem; }
.library-material-row small { color: var(--muted); font-size: .73rem; }
.library-material-row:hover { background: var(--bg); }
.library-material-row[aria-current="true"] { border-inline-start-color: var(--purple); background: var(--tint); }
.library-detail { overflow: hidden; }
.library-detail-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 9px; padding: 16px 19px 10px; }
.library-detail-heading h2 { font-size: clamp(1.3rem,2.1vw,1.75rem); margin: 0; overflow-wrap: anywhere; }
.library-detail-heading p { margin: 3px 0 0; font-size: .87rem; }
.library-detail-tabs { margin-inline: 16px; padding-inline: 0; border-radius: 0; background: transparent; }
.library-detail-tabs .btn { min-height: 40px; }
#library-detail-body { padding: 16px; overflow-wrap: anywhere; }
.library-detail .library-back { display: none; }
.library-sample { display: flex; align-items: center; gap: 9px; max-width: 440px; margin-bottom: 12px; white-space: nowrap; }
.library-sample select { min-width: 0; margin-top: 0; }
.library-demo { min-width: 0; margin-top: 0; gap: 8px; }
.library-material-description dl { display: grid; gap: 12px; }
.library-material-description dl > div { display: grid; grid-template-columns: minmax(4.5em,auto) minmax(0,1fr); gap: 10px; }
.library-material-description dt { font-weight: 670; }
.library-material-description dd { margin: 0; color: var(--muted); }
.library-practice-link.btn { min-height: 42px; width: 100%; flex-direction: row-reverse; justify-content: space-between; text-align: start; }
.library-practice-rows { max-height: 58dvh; overflow: auto; overscroll-behavior: contain; }
.library-external-links { margin-top: 12px; }
.library-balance-stage {
  padding: 14px 12px 8px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 10px;
  background-color: var(--bg); background-image: linear-gradient(var(--line) 1px,transparent 1px),linear-gradient(90deg,var(--line) 1px,transparent 1px);
  background-size: 20px 20px;
}
.library-balance-equation { color: var(--ink); margin: 0; text-align: center; font: 1.65rem Cambria Math,serif; }
.library-balance-stage svg { display: block; width: 100%; max-height: clamp(125px,24dvh,215px); margin: 5px auto 0; color: var(--purple); }
.library-balance-stage text { fill: var(--ink); font: 19px Cambria Math,serif; }
.library-balance-actions { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; }
.library-balance-actions .field { flex: 1 1 100px; min-width: 0; }
@media (max-width: 770px) {
  .library-material-layout { display: block; }
  .library-material-layout[data-detail-open="false"] .library-detail,
  .library-material-layout[data-detail-open="true"] .library-results { display: none; }
  .library-detail .library-back { display: inline-flex; flex-basis: fit-content; }
  .library-detail-heading > div { flex-basis: 100%; }
  .library-results { height: min(540px,65dvh); min-height: 280px; }
  .library-material-filters { justify-content: start; }
}
.empty { border: 1px dashed #dcd3ed; border-radius: 11px; padding: 14px; color: var(--muted); font-size: .89rem; margin: 10px 0; }
#notice { position: fixed; z-index: 9; right: 20px; bottom: 18px; max-width: min(430px,calc(100% - 40px)); }
#notice:not(:empty) { background: #2b2149; color: white; border-radius: 10px; padding: 10px 15px; box-shadow: 0 5px 20px #2b214942; font-size: .91rem; }

:root[data-theme="dark"] {
  --form-edge: #5a4c70;
  --neutral-panel: #2a253a;
  --success-fill: #163b31;
  --warning-fill: #402d22;
  --warning-ink: #ffd49c;
  --danger-fill: #492533;
  --danger-ink: #ffacbc;
}
[data-theme="dark"] :is(.field,.checkbox,.material-reading,.material-feedback) { color: var(--muted); }
[data-theme="dark"] :is(.field input,.field textarea,.field select,.control,.btn.secondary) {
  background: var(--bg); color: var(--ink); border-color: var(--form-edge); }
[data-theme="dark"] :is(.btn.secondary:hover,.topic-row:hover,.topic-row.active,.plan-card:hover) {
  background: var(--tint); border-color: var(--form-edge); }
[data-theme="dark"] :is(.field input[readonly],.field textarea[readonly],.chip.muted,th) { background: var(--neutral-panel); color: var(--muted); }
.answer-field[data-verdict]:not([data-verdict=""]) :is(input,select,textarea)[data-field] {
  border-color: color-mix(in srgb,var(--answer-tone) 65%,var(--line));
}
.answer-field:is([data-verdict="wrong"],[data-verdict="blank"],[data-verdict="missing"]) :is(input,select,textarea)[data-field] {
  background: color-mix(in srgb,var(--answer-fill) 48%,var(--paper));
}
[data-theme="dark"] :is(.chip.ok,.bubble.ok) { background: var(--success-fill); color: var(--green); }
[data-theme="dark"] :is(.chip.warn,.bubble.warn) { background: var(--warning-fill); color: var(--warning-ink); }
[data-theme="dark"] .btn.danger { background: var(--danger-fill); color: var(--danger-ink); }
[data-theme="dark"] :is(.question-prompt,.inline-material,.account-message) { background: var(--neutral-panel); color: var(--ink); border-color: var(--line); }
[data-theme="dark"] :is(.model,.topic-row) { background: var(--paper); border-color: var(--line); }
[data-theme="dark"] :is(.worksheet-block,.empty,.method) { border-color: var(--form-edge); }
[data-theme="dark"] .bubble:not(.ok,.warn) { background: var(--tint); color: var(--ink); }
[data-theme="dark"] .question-nav button.answered:not([aria-current="step"]) { background: var(--tint); border-color: var(--form-edge); }
[data-theme="dark"] :is(.question-prompt canvas,.model canvas) { background: var(--graphic-sheet); border-radius: 8px; }
[data-theme="dark"] .badge-icon { background: var(--tint); color: var(--purple-dark); }
[data-theme="dark"] .badge-icon.teal { background: var(--success-fill); color: var(--green); }
[data-theme="dark"] .badge-icon.peach { background: var(--warning-fill); color: var(--warning-ink); }
[data-theme="dark"] .badge-icon.blue { background: #242e49; color: #b8ccff; }

[data-theme="dark"] .quest-route-card[data-id="probability"] .quest-route-symbol { color: var(--warning-ink); }
[data-theme="dark"] :is(.featured-plan canvas,.plan-progress-cover) { filter: brightness(.87) saturate(.83); }
[data-theme="dark"] :is(.rail-calendar,#calendar-dialog [data-calendar-body]) { background: var(--neutral-panel); }
[data-theme="dark"] .calendar-heading strong { color: var(--ink); }
[data-theme="dark"] :is(.study-calendar th,.calendar-day.future) { background: transparent; color: var(--soft); }
[data-theme="dark"] .calendar-heading .icon-btn:hover { background: var(--tint); }
[data-theme="dark"] .study-calendar td[aria-current="date"] .calendar-day { background: #47355f; color: var(--ink); box-shadow: inset 0 0 0 1px #7456a0; }

@media(max-width:1120px) {
  .layout { --rail-width: 188px; }
  .rail { padding-inline: 12px; }
  .brand b { font-size: 1.05rem; }
  .main { padding-inline: 25px; }
}
@media(max-width:900px) {
  .layout { --rail-width: 65px; }
  .rail { padding: 21px 9px; align-items: stretch; }
  .nav-label,.rail .nav button span,.rail-bottom { display: none; }
  .site-quick-tools { display: flex; }
  .nav button { justify-content: center; padding: 8px; }
  .nav[aria-label="学习空间"] button { flex-direction: column; gap: 4px; }
  .rail .nav .nav-short { display: block; font-size: .66rem; line-height: 1; }
  .main { padding-inline: 19px; }
}
@media(max-width:700px) {
  .layout { display: block; --site-header-height: 52px; --mobile-rail-height: 45px; }
  .layout:has(.rail > .nav[aria-label="学习空间"]) { --work-sticky-top: calc(var(--site-header-height) + var(--mobile-rail-height)); }
  .rail { height: var(--mobile-rail-height); z-index: 3; padding: 2px 9px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail:not(:has(> .nav[aria-label="学习空间"])) { display: none; }
  .rail > .nav[aria-label="学习空间"] { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 2px; }
  .site-header { padding-inline: 10px; }
  .site-brand { --brand-gap: 4px; }
  .site-brand,.site-account-tools,.site-quick-tools { gap: 4px; }
  .site-quick-tools .icon-btn { min-width: 29px; min-height: 31px; padding: 4px; }
  .site-quick-tools .icon { width: 17px; height: 17px; }
  .site-account { min-height: 32px; gap: 4px; padding: 4px 6px; font-size: .73rem; }
  .site-account-avatar { width: 21px; height: 21px; }
  .volume-switch { min-height: 34px; gap: 4px; padding: 4px 6px; font-size: .74rem; }
  .volume-switch .icon { width: 15px; height: 15px; }
  .brand b { font-size: .91rem; }
  .brand small { display: none; }
  .brand .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .brand-mark .icon { width: 21px; height: 21px; }
  .theme-toggle.icon-btn { min-width: 29px; min-height: 31px; padding: 3px; }
  .nav { display: flex; gap: 2px; }
  .nav button { min-height: 39px; min-width: 39px; }
  .nav[aria-label="学习空间"] button { gap: 3px; padding: 4px; }
  .nav[aria-label="学习空间"] .icon { width: 17px; height: 17px; }
  .main { padding: 20px 13px 32px; }
  .page-header { flex-direction: column; margin-bottom: 16px; padding-bottom: 13px; }
  .page-heading { flex: none; width: 100%; }
  .page-actions:has(.bank-nav) { gap: 6px; }
  .topic-layout,.study-layout { grid-template-columns: minmax(0,1fr); }
  .splitter { display: none; }
  .topic-list { max-height: 320px; }
  .question,.paper,.box { padding: 14px; }
  .work-top { gap: 5px 8px; }
  .work-top .question-nav { gap: 4px; }
  .work-top .question-nav .icon-btn { min-width: 30px; min-height: 30px; }
  .study-layout { row-gap: 12px; }
  .work-reference,.question,.work-pane-tabs { scroll-margin-top: calc(var(--work-sticky-top,0px) + 155px); }
}
@media(max-width:400px) {
  .site-brand .brand > span:last-child,.site-account-avatar { display: none; }
  .site-account { padding-inline: 7px; }
}
@media(max-width:370px) {
  .rail { padding-inline: 8px; }
  .nav { gap: 1px; }
  .nav button { min-width: 36px; }
}
@media(min-width:901px) and (max-height:820px) {
  .rail { overflow-y: auto; padding-block: 18px 12px; }
  .rail .nav button { min-height: 37px; padding-block: 5px; }
}

.grid-path-scroll { max-width: 100%; overflow-x: auto; padding: 3px; }
.grid-path-board {
  display: grid; grid-template-columns: 24px repeat(calc(var(--path-cols) - 1), minmax(24px,1fr));
  gap: 3px; width: min(100%,440px); min-width: calc(27px * var(--path-cols)); align-items: stretch;
}
.grid-path-coordinate {
  display: grid; place-items: center; min-height: 26px;
  color: var(--muted); font-size: .68rem; font-variant-numeric: tabular-nums;
}
.grid-path-point {
  min-width: 0; min-height: 29px; padding: 0 1px; border: 1px solid var(--line);
  border-radius: 5px; background: var(--paper); color: var(--ink);
  font-size: clamp(.58rem,1.9vw,.76rem); font-variant-numeric: tabular-nums;
}
.grid-path-point:disabled { opacity: 1; cursor: default; }
.grid-path-point[data-state="blocked"] { color: var(--muted); background: var(--bg); }
.grid-path-point:is([data-state="start"],[data-state="route"],[data-state="next"],[data-state="end"]) {
  border-color: var(--purple); background: var(--tint); color: var(--purple-dark); font-weight: 650;
}
.grid-path-point[aria-current] { border-width: 2px; }
.grid-path-point[data-path-frontier] { border-inline-start: 2px solid var(--green); }
.grid-path-point:focus-visible { outline: 2px solid var(--purple); outline-offset: 1px; }
.grid-path-controls { flex-wrap: wrap; margin-block: 10px 4px; }
.grid-path-controls [hidden] { display: none; }
.grid-path-controls .btn[aria-pressed="true"] { background: var(--tint); color: var(--purple-dark); }
.grid-path-counts {
  margin-block: 4px 8px; padding: 10px 12px; border-radius: 8px;
  background: var(--tint); color: var(--ink); font-size: .9rem; line-height: 1.55;
}
.level-analysis { display:grid; gap:18px; margin-top:24px; }
.level-entry-grid,.level-insights { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.level-entry-grid .box { display:flex; flex-direction:column; align-items:flex-start; }
.level-entry-grid .btn { margin-top:auto; }
.level-test-card { background:linear-gradient(130deg,var(--tint),var(--paper)); }
.level-entry-grid > .panel,.level-domains > .panel,.level-insights > .panel,.level-analysis > .panel { margin:0; }
.level-eyebrow { color:var(--purple-dark); font-size:.8rem; font-weight:650; }
.level-overview h2 { margin-top:10px; }
.level-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin:24px 0; }
.level-stats div { display:grid; gap:6px; }
.level-stats strong { font-size:1.65rem; color:var(--purple-dark); }
.level-stats span { color:var(--muted); font-size:.82rem; }
.level-domains { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.level-domain-title { display:flex; flex-wrap:wrap; gap:8px; justify-content:space-between; align-items:center; }
.level-domain-title h3 { margin:0; }
.level-score { font-size:1.8rem; font-weight:700; margin:20px 0 10px; }
.level-score small { font-weight:400; font-size:.76rem; color:var(--muted); margin-left:10px; }
.level-domain progress { width:100%; height:7px; accent-color:var(--purple-dark); }
.level-domain p { font-size:.8rem; line-height:1.8; }
.level-table-wrap { overflow-x:auto; }
.level-table { border-collapse:collapse; width:100%; margin-top:16px; font-size:.85rem; }
.level-table th,.level-table td { text-align:left; padding:12px; border-bottom:1px solid var(--line); }
.level-table td { white-space:nowrap; }
.level-table th { min-width:95px; }
.level-practice-reason { padding:12px; background:var(--tint); border-radius:10px; font-size:.85rem; }
.level-weakness-heading { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.level-weakness-heading p { margin:0; }
.level-weakness + .level-weakness { margin-top:18px; }
.level-test-result { margin-bottom:18px; border-left:4px solid var(--purple-dark); }
.level-journey { display:flex; flex-wrap:wrap; gap:14px 30px; list-style:none; padding:0; margin:0 0 24px; color:var(--muted); }
.level-journey li { display:flex; gap:10px; align-items:center; }
.level-journey b { display:grid; place-items:center; width:28px; height:28px; border:1px solid var(--line); border-radius:50%; }
.level-journey [aria-current] { color:var(--purple-dark); font-weight:650; }
.level-journey [aria-current] b { background:var(--tint); border-color:var(--purple-dark); }
.level-overview,.level-round-recap { margin-bottom:20px; }
.level-overview > p,.level-round-recap > p { line-height:1.8; overflow-wrap:anywhere; }
.level-profile-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:24px 0; }
.level-profile-stats > div { display:flex; flex-direction:column; gap:8px; padding:16px; background:var(--tint); border-radius:10px; }
.level-profile-stats b { font-size:1.5rem; }
.level-profile-stats span { color:var(--muted); font-size:.82rem; }
.level-estimates ul { padding:0; list-style:none; margin:14px 0; }
.level-estimates li { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(130px,auto); gap:12px; padding:10px 0; border-bottom:1px solid var(--line); align-items:center; }
.level-estimates small { color:var(--muted); }
.level-skill-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:20px 0; }
.level-skill-grid article { padding:14px; border:1px solid var(--line); border-radius:10px; }
.level-skill-grid h3 { font-size:.9rem; margin:0 0 12px; }
.level-skill-grid p { font-size:.8rem; }
@media(max-width:700px) {
  .level-profile-stats { gap:8px; }
  .level-profile-stats > div { padding:10px; }
  .level-profile-stats b { font-size:1.15rem; }
  .level-estimates li { grid-template-columns:minmax(0,1fr) auto; }
  .level-estimates small { grid-column:1/-1; }
  .level-skill-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .level-journey { gap:10px; font-size:.82rem; }
}
.level-training-focus { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(230px,1fr); gap:32px; padding:32px; background:linear-gradient(120deg,var(--tint),var(--paper) 70%); }
.level-training-copy h2 { font-size:1.7rem; margin:12px 0 24px; }
.level-training-copy h3 { font-size:1.15rem; }
.level-training-copy .chip { margin-left:10px; }
.level-training-copy > .actions { margin-top:24px; }
.level-training-copy > .actions .btn { min-height:48px; min-width:160px; }
.level-training-note { font-size:.82rem; margin-top:12px; }
.level-training-rhythm { padding:22px; border:1px solid var(--line); border-radius:12px; background:var(--paper); }
.level-training-rhythm ol { padding-left:22px; margin:20px 0 0; }
.level-training-rhythm li { padding-left:8px; margin-top:20px; color:var(--purple-dark); }
.level-training-rhythm b,.level-training-rhythm span { display:block; }
.level-training-rhythm span { color:var(--muted); font-size:.82rem; margin-top:5px; }
.level-test-tools { display:flex; justify-content:space-between; align-items:center; gap:20px; }
.level-test-tools .btn { flex-shrink:0; }
.level-test-recap,.student-next-step { margin-bottom:20px; overflow-wrap:anywhere; }
.level-test-recap li { margin-block:14px; }
.level-test-recap p,.student-next-step p { line-height:1.75; }
.level-test-recap > details { margin-top:16px; }
.level-test-recap > details { border:0; padding:0; background:transparent; }
.student-next-step .actions .btn { min-height:44px; }
@media(max-width:1050px) { .level-domains { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) {
  .level-training-focus { grid-template-columns:minmax(0,1fr); gap:20px; padding:20px; }
  .level-training-copy h2 { font-size:1.4rem; margin-bottom:20px; }
  .level-training-rhythm { padding:16px; }
  .level-test-tools { align-items:flex-start; flex-direction:column; }
  .rail > .nav[aria-label="学习空间"] { grid-template-columns:repeat(7,minmax(0,1fr)); }
  .level-entry-grid,.level-insights { grid-template-columns:minmax(0,1fr); }
  .level-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .level-domains { grid-template-columns:minmax(0,1fr); }
  .level-analysis { gap:14px; }
}
.level-progress-dialog { width:min(640px,calc(100vw - 24px)); }
.level-progress-choice { display:block; padding:10px 0; font-weight:600; }
.level-progress-choice small { display:block; color:var(--muted); margin-left:24px; font-weight:400; }
.level-progress-points { max-height:45vh; overflow:auto; border:1px solid var(--line); border-radius:10px; padding:12px; }
.level-progress-points details { padding:8px 0; }
.level-progress-points section { padding:12px 12px 0; }
.level-progress-points h3 { font-size:.95rem; }
.level-progress-points label { display:flex; gap:9px; padding:10px 0; cursor:pointer; }
/* Teaching progress: one scrollable accordion with a persistent confirmation footer. */
html:has(.level-progress-dialog[open]) { overflow:hidden; }
.level-progress-dialog { width:min(720px,calc(100vw - 48px)); height:min(900px,calc(100dvh - 48px)); max-width:none; max-height:none; padding:0; overflow:hidden; border:1px solid var(--line); border-radius:20px; color:var(--ink); background:var(--paper); box-shadow:0 24px 90px #100b3040; }
.progress-picker { display:flex; flex-direction:column; height:100%; min-height:0; }
.progress-picker svg { flex-shrink:0; width:20px; height:20px; }
.progress-picker button { color:inherit; }
.progress-picker-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:24px 28px 16px; flex-shrink:0; }
.progress-picker-header h2 { font-size:28px; line-height:1.3; }
.progress-picker-header p { margin-top:6px; color:var(--muted); font-size:14px; }
.progress-close { display:grid; place-items:center; width:44px; height:44px; padding:10px; border:0; background:transparent; border-radius:8px; }
.progress-picker-tools { display:flex; align-items:center; gap:12px; padding:0 28px 14px; flex-shrink:0; }
.progress-book { display:block; flex:1; min-width:0; }
.progress-book select { width:100%; min-height:46px; border:1px solid var(--line); border-radius:10px; padding:10px 12px; color:var(--ink); background:var(--paper); font-weight:650; }
.progress-mode { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); flex:1.25; padding:3px; border:1px solid var(--line); border-radius:10px; background:var(--bg); }
.progress-mode button { min-height:42px; padding:7px 10px; border:0; border-radius:7px; background:transparent; font-size:14px; }
.progress-mode button[aria-pressed="true"] { color:white; background:var(--purple); }
.progress-search { display:flex; align-items:center; gap:10px; min-height:46px; margin:0 28px 14px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; flex-shrink:0; }
.progress-search svg { color:var(--muted); }
.progress-search input { min-width:0; width:100%; flex:1; font-size:15px; border:0; outline:none; background:none; color:var(--ink); }
.progress-search>span { display:none; }
.progress-search:focus-within { outline:2px solid var(--purple); outline-offset:2px; }
.progress-accordion-scroll { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:0 28px 20px; scrollbar-width:thin; scroll-padding-block:8px; }
.progress-directory-toolbar { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:44px; color:var(--muted); font-size:13px; }
.progress-locate { display:flex; align-items:center; gap:6px; min-height:44px; border:0; padding:8px; border-radius:8px; background:transparent; color:var(--purple-dark)!important; font-size:13px; }
.progress-locate svg { width:17px; height:17px; }
.progress-all-note { padding:10px 12px; margin-bottom:8px; border-radius:8px; color:var(--muted); background:var(--bg); font-size:13px; }
.progress-accordion { border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.progress-chapter-group+.progress-chapter-group { border-top:1px solid var(--line); }
.progress-chapter-toggle,.progress-section-toggle { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; min-height:54px; padding:13px 16px; border:0; background:transparent; text-align:left; line-height:1.5; }
.progress-chapter-toggle { font-size:17px; font-weight:650; }
.progress-chapter-toggle[aria-expanded="true"],.progress-section-toggle[aria-expanded="true"] { background:var(--tint); color:var(--purple-dark); font-weight:650; }
.progress-chapter-toggle[aria-expanded="true"]>svg,.progress-section-toggle[aria-expanded="true"]>svg { transform:rotate(90deg); }
.progress-chapter-content { padding:4px 8px 8px 14px; }
.progress-section-toggle { min-height:50px; border-radius:8px; font-size:15px; padding:12px; }
.progress-section-group+.progress-section-group { border-top:1px solid var(--line); }
.progress-point-list { display:grid; gap:5px; padding:5px 0 8px 10px; }
.progress-point { display:flex; align-items:center; gap:10px; width:100%; min-height:52px; border:1px solid transparent; border-radius:9px; padding:12px; background:var(--bg); text-align:left; font-size:15px; line-height:1.5; }
.progress-point>span:nth-child(2) { flex:1; min-width:0; overflow-wrap:anywhere; }
.progress-point[aria-pressed="true"] { color:var(--purple-dark); background:var(--tint); font-weight:650; }
.progress-radio { display:grid; place-items:center; flex:none; width:21px; height:21px; border:1.5px solid var(--soft); border-radius:50%; }
.progress-radio svg { width:14px; height:14px; }
.progress-point[aria-pressed="true"] .progress-radio { background:var(--purple); border-color:var(--purple); color:white; }
.progress-point small { flex:none; padding:2px 6px; border-radius:5px; background:var(--purple); color:white; font-size:11px; white-space:nowrap; }
.progress-picker button:hover:not(:disabled):not([aria-pressed="true"]):not(.primary) { background:var(--tint); }
.progress-picker-footer { flex-shrink:0; padding:16px 28px 20px; border-top:1px solid var(--line); background:var(--paper); }
.progress-selection { display:flex; align-items:baseline; gap:7px; font-size:14px; line-height:1.5; }
.progress-selection>span { flex:none; color:var(--muted); }
.progress-selection strong { color:var(--purple-dark); min-width:0; overflow-wrap:anywhere; }
.progress-selection-note { margin-top:5px; font-size:12px; color:var(--muted); }
.progress-footer-bottom { margin-top:12px; }
.progress-footer-bottom>div { display:flex; gap:12px; }
.progress-footer-bottom .btn { min-height:48px; flex:1; padding:10px 18px; }
.progress-footer-bottom .primary { flex:1.4; color:white; }
.progress-results>button { display:grid; position:relative; gap:6px; width:100%; min-height:64px; padding:12px 36px 12px 12px; margin-bottom:6px; border:1px solid var(--line); border-radius:9px; text-align:left; background:var(--paper); }
.progress-results>button>svg { position:absolute; right:10px; top:50%; transform:translateY(-50%); color:var(--purple-dark); }
.progress-results>button[aria-pressed="true"] { background:var(--tint); color:var(--purple-dark); }
.progress-result-path { color:var(--muted); font-size:12px; line-height:1.5; }
.progress-empty { padding:20px 12px; color:var(--muted); font-size:14px; }
@media(max-width:599px) {
 .level-progress-dialog { width:100%; height:100dvh; margin:0; border:0; border-radius:0; }
 .progress-picker-header { padding:16px 16px 12px; }
 .progress-picker-header h2 { font-size:25px; }
 .progress-picker-tools { flex-direction:column; align-items:stretch; gap:10px; padding:0 16px 12px; }
 .progress-book,.progress-mode { flex:none; }
 .progress-search { margin:0 16px 8px; }
 .progress-accordion-scroll { padding:0 16px 16px; }
 .progress-picker-footer { padding:12px 16px max(16px,env(safe-area-inset-bottom)); }
 .progress-chapter-toggle { font-size:16px; padding-inline:12px; }
 .progress-chapter-content { padding-left:10px; }
 .progress-point-list { padding-left:6px; }
 .progress-point { padding:11px 9px; gap:8px; }
 .progress-selection { font-size:13px; }
}
@media(max-height:500px) and (orientation:landscape) {
 .level-progress-dialog { width:100%; height:100dvh; margin:0; border:0; border-radius:0; }
 .progress-picker-header { padding:8px 20px 4px; align-items:center; }
 .progress-picker-header h2 { font-size:22px; }
 .progress-picker-header p { display:none; }
 .progress-picker-tools { padding:0 20px 8px; }
 .progress-search { margin:0 20px 4px; }
 .progress-accordion-scroll { padding:0 20px 12px; }
 .progress-picker-footer { padding:8px 20px max(8px,env(safe-area-inset-bottom)); display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:18px; }
 .progress-selection { grid-column:1; font-size:12px; }
 .progress-selection-note { grid-column:1; }
 .progress-footer-bottom { grid-column:2; grid-row:1/3; margin:0; align-self:center; }
 .progress-footer-bottom .btn { min-height:44px; min-width:100px; }
}
/* One compact entry for the selected book and teaching endpoint. */
.site-brand:has(.progress-switch) { flex:1; min-width:0; flex-shrink:1; }
.site-brand > .brand { flex-shrink:0; }
.site-header:has(.progress-switch) .site-account-tools { flex-shrink:0; }
@media(min-width:901px) {
 .site-brand:has(.progress-switch) { display:grid; grid-template-columns:var(--rail-width) minmax(0,1fr);
   gap:0; margin-inline-start:calc(-1 * var(--header-inline)); }
 .site-brand:has(.progress-switch) > .brand { justify-self:center; }
 .site-brand > .progress-switch { justify-self:start; }
}
.mobile-bottom-nav { display:none; }
.site-account { width:36px; height:36px; min-height:36px; padding:4px; border-radius:50%; background:var(--tint); border-color:transparent; }
.site-account .site-account-avatar { display:grid; width:26px; height:26px; }
#site-account-name { display:none; }
.mobile-nav-drawer { position:fixed; inset:0 0 0 auto; width:min(320px,76vw); height:100dvh; max-width:none; max-height:none; margin:0; padding:20px 18px; border:0; border-left:1px solid var(--line); border-radius:18px 0 0 18px; background:var(--paper); color:var(--ink); overflow-y:auto; overscroll-behavior:contain; box-shadow:-12px 0 40px #17123625; transform:translateX(100%); transition:transform .22s ease,display .22s allow-discrete,overlay .22s allow-discrete; }
.mobile-nav-drawer[open] { transform:translateX(0); }
.mobile-nav-drawer[open] { display:flex; flex-direction:column; }
.mobile-nav-drawer > * { flex-shrink:0; }
.mobile-nav-drawer::backdrop { background:#17123670; }
@starting-style { .mobile-nav-drawer[open] { transform:translateX(100%); } }
html:has(.mobile-nav-drawer[open]) { overflow:hidden; }
.mobile-nav-drawer .dialog-header { margin-bottom:20px; align-items:center; }
.mobile-nav-drawer .nav { display:grid; gap:5px; }
.mobile-nav-drawer .nav button,.mobile-menu-link { display:flex; align-items:center; flex-direction:row; justify-content:flex-start; width:100%; min-height:46px; gap:12px; padding:11px 12px; font-size:.95rem; border-radius:10px; }
.mobile-nav-drawer .nav .nav-short { display:none; }
.mobile-nav-drawer .nav .icon,.mobile-menu-link .icon { width:20px; height:20px; }
.mobile-menu-calendar { margin-top:auto; padding-top:20px; border-top:1px solid var(--line); }
.mobile-menu-calendar h3 { margin:0 0 12px; font-size:.9rem; }
.mobile-menu-calendar [data-mobile-calendar-body] { width:90%; margin-inline:auto; }
.mobile-menu-calendar .calendar-day { min-height:22px; }
.mobile-menu-link { background:transparent; border:0; color:var(--ink); }
.mobile-menu-link:hover { background:var(--tint); color:var(--purple-dark); }
.mobile-menu-account { margin-top:18px; padding-top:18px; border-top:1px solid var(--line); }
.mobile-menu-account-heading { display:flex; align-items:center; gap:10px; padding:0 12px 14px; overflow-wrap:anywhere; }
.mobile-menu-account .site-account-avatar { display:grid; width:30px; height:30px; }
.mobile-menu-account .site-account-actions { border-top:0; }
.mobile-menu-account .btn-account { gap:12px; min-height:44px; padding:10px 12px; font-size:.9rem; }
@media(max-width:599px) {
 .mobile-nav-drawer { width:min(296px,max(248px,76vw)); max-width:calc(100vw - 56px); padding-inline:16px; }
}
@media(min-width:901px) and (orientation:portrait) and (pointer:coarse) {
 .mobile-nav-drawer { width:344px; }
}
@media(max-width:1100px) and (max-height:500px) {
 .mobile-nav-drawer { width:min(280px,70vw); padding:14px 16px; }
}
@media(max-width:900px), (max-width:1100px) and (max-height:500px), (max-width:1100px) and (orientation:portrait) and (pointer:coarse) {
 .layout { display:block; --site-header-height:52px; }
 .layout:has(.rail > .nav[aria-label="学习空间"]) { --work-sticky-top:var(--site-header-height); }
 .layout > .rail { display:none; }
 .site-header .site-quick-tools { display:none; }
 .site-header .theme-toggle.icon-btn { min-width:34px; min-height:34px; }
 .site-header .site-account { width:34px; height:34px; min-height:34px; padding:3px; }
 .site-header .site-account .site-account-avatar { display:grid; }
 .site-brand:has(.progress-switch) { display:flex; gap:var(--brand-gap); margin-inline-start:0; }
 .layout:has(>.mobile-bottom-nav)>.main { padding-bottom:calc(106px + env(safe-area-inset-bottom,0px)); }
 .mobile-bottom-nav { position:fixed; z-index:9; bottom:0; inset-inline:0; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); height:calc(68px + env(safe-area-inset-bottom,0px)); padding:0 max(8px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(8px,env(safe-area-inset-left,0px)); border-top:1px solid var(--line); background:var(--paper); box-shadow:0 -3px 18px #17123608; }
 .mobile-nav-item { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:5px; min-width:0; height:67px; padding:7px 3px 9px; border:0; border-radius:8px; background:transparent; color:var(--muted); font-size:11px; line-height:16px; }
 .mobile-nav-item>.icon { width:23px; height:23px; }
 .mobile-nav-item[aria-current="page"],.mobile-nav-item:hover { color:var(--purple-dark); }
 .mobile-nav-training { color:var(--purple-dark); font-weight:700; }
 .mobile-nav-training>.icon { position:absolute; top:-20px; left:50%; transform:translateX(-50%); width:58px; height:58px; padding:14px; border:4px solid var(--paper); border-radius:50%; color:white; background:var(--purple); box-shadow:0 4px 12px #6746df40; }
 .mobile-nav-training:hover>.icon { background:var(--purple-dark); }
}
@media(max-width:1100px) and (max-height:500px) {
 .mobile-bottom-nav { height:calc(54px + env(safe-area-inset-bottom,0px)); }
 .mobile-nav-item { height:53px; gap:2px; padding-block:4px; font-size:10px; line-height:14px; }
 .mobile-nav-item>.icon { width:20px; height:20px; }
 .mobile-nav-training>.icon { width:46px; height:46px; padding:10px; top:-15px; }
 .layout:has(>.mobile-bottom-nav)>.main { padding-bottom:calc(86px + env(safe-area-inset-bottom,0px)); }
}
@media(prefers-reduced-motion:reduce) { .mobile-nav-drawer { transition:none; } }
.volume-switch.progress-switch { min-width:0; flex:0 1 auto; max-width:100%; gap:9px; padding:4px 10px 4px 5px; min-height:38px; border-radius:10px; font-weight:400; transition:border-color .15s,background .15s; }
.progress-switch:hover { border-color:var(--purple); }
.progress-switch-icon { display:grid; place-items:center; width:28px; height:28px; flex-shrink:0; border-radius:7px; background:var(--tint); color:var(--purple-dark); }
.progress-switch .progress-switch-icon .icon { width:17px; height:17px; }
.progress-switch-path { display:flex; align-items:center; gap:7px; min-width:0; font-size:12px; line-height:1.5; white-space:nowrap; }
.progress-switch-path strong { font-weight:700; }
.progress-switch-book { flex-shrink:0; }
.progress-switch-middle { color:var(--muted); min-width:0; overflow:hidden; text-overflow:ellipsis; }
.progress-switch-separator { color:var(--soft); opacity:.6; font-size:11px; flex-shrink:0; font-weight:400; }
.progress-switch-end { min-width:0; overflow:hidden; text-overflow:ellipsis; color:var(--purple-dark); }
@media(max-width:1100px) {
 .progress-switch-middle,.progress-switch-path > .progress-switch-separator:not(.progress-switch-final-separator) { display:none; }
}
@media(max-width:700px) {
 .site-header:has(.progress-switch) .brand > span:last-child { display:none; }
 .volume-switch.progress-switch { min-height:34px; padding:3px 6px 3px 3px; gap:5px; }
 .progress-switch-icon { width:24px; height:24px; border-radius:6px; }
 .progress-switch-path { gap:4px; font-size:10px; }
 .progress-switch-book { flex-shrink:1; }
 .site-header:has(.progress-switch) .site-account { max-width:85px; }
 .site-header:has(.progress-switch) #site-account-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
}
/* Header hit areas follow the available space and input method. */
.layout { --site-header-height:60px; --header-hit-size:40px; }
.site-header .brand { min-width:var(--header-hit-size); min-height:var(--header-hit-size); justify-content:center; }
.site-header .volume-switch.progress-switch { min-height:var(--header-hit-size); }
.site-header .theme-toggle.icon-btn,
.site-header .site-account { width:var(--header-hit-size); height:var(--header-hit-size); min-width:var(--header-hit-size); min-height:var(--header-hit-size); flex-shrink:0; }
.site-header .site-account { justify-content:center; }
@media(max-width:900px), (pointer:coarse) {
 .layout { --site-header-height:64px; --header-hit-size:44px; }
 .site-header .progress-switch-path { font-size:12px; }
 .site-header .theme-toggle .icon { width:20px; height:20px; }
 .site-header .site-account-avatar { width:30px; height:30px; }
 .site-header .site-account-avatar .icon { width:18px; height:18px; }
}
@media(min-width:600px) and (min-height:501px) and (max-width:1100px), (min-width:600px) and (min-height:501px) and (pointer:coarse) {
 .layout { --site-header-height:68px; --header-hit-size:48px; }
}
@media(max-width:1100px) and (max-height:500px) {
 .layout { --site-header-height:56px; --header-hit-size:44px; }
}
@media(prefers-reduced-motion:reduce) { .volume-switch.progress-switch { transition:none; } }
.answer-record-step{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.answer-record-verdict{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border:1px solid;border-radius:6px;font-size:14px;font-weight:750;line-height:1.5;flex-shrink:0}
.answer-record-verdict--correct{color:#166534;background:#dcfce7;border-color:#86efac}
.answer-record-verdict--incorrect{color:#991b1b;background:#fee2e2;border-color:#fca5a5}
.answer-record-verdict--pending{color:#854d0e;background:#fef9c3;border-color:#fde047}
.solution-article{max-width:76ch;margin-inline:auto;line-height:1.8;overflow-wrap:anywhere}
.solution-section{padding:18px 0;border-bottom:1px solid var(--line)}
.solution-section:last-child{border-bottom:0}
.solution-section h3{margin-bottom:10px;font-size:1rem}
.solution-section h4{font-size:.94rem;margin:0 0 8px}
.solution-section p+p{margin-top:8px}
.solution-steps{list-style:none;counter-reset:solution-step;padding:0;margin:0;display:grid;gap:20px}
.solution-steps>li{counter-increment:solution-step;position:relative;padding-left:38px;scroll-margin-top:16px}
.solution-steps>li::before{content:counter(solution-step);position:absolute;left:0;top:0;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--tint);color:var(--purple-dark);font-weight:700;font-size:.85rem}
.solution-step-plan{color:var(--muted);margin-bottom:8px}
.solution-conclusion{margin-top:10px;padding:10px 12px;background:var(--tint);border-radius:7px;font-size:.9rem}
.solution-conclusion>b{color:var(--purple-dark);margin-right:8px}
.solution-final{background:var(--tint);border-radius:9px;padding:16px;margin-top:18px;border:0}
.solution-correction{border:1px solid #efc188;border-radius:10px;padding:16px;background:#fff9ee;color:#573513}
.solution-correction h3{font-size:1rem;margin:0 0 10px}
.solution-correction-item+.solution-correction-item{border-top:1px solid #efdfc7;margin-top:12px;padding-top:12px}
.solution-my-answer{color:#9a3412}
.solution-pitfall{border-left:3px solid #d99b39;padding:4px 12px;margin:12px 0}
.solution-method-comparison{border-top:1px solid var(--line);padding-top:10px;margin-top:10px}
.solution-step-checks{font-size:.86rem;color:var(--muted);padding-left:20px}
:root[data-theme="dark"] .solution-correction{background:#332719;border-color:#70502e;color:#f1d7b4}
:root[data-theme="dark"] .solution-my-answer{color:#ffb58b}
@media(max-width:600px){.solution-steps>li{padding-left:32px}.solution-section{padding-block:14px}.solution-correction{padding:12px}}
.solution-figure{margin:12px 0}
.solution-figure canvas{display:block;width:100%;height:200px;border:1px solid var(--line);border-radius:9px;background:var(--graphic-sheet)}
.solution-figure figcaption{font-size:.82rem;color:var(--muted);margin-top:6px}
/* Ability analysis follows the selected semester and saved teaching progress. */
.main:has(.analysis-redesign)>.page-header { border:0; padding-bottom:0; margin-bottom:16px; }
.main:has(.analysis-redesign)>.page-content>.level-analysis { margin-top:0; }
.analysis-redesign { gap:16px; font-size:.9rem; }
.analysis-redesign .panel { border-radius:10px; box-shadow:none; margin:0; }
.analysis-scope { padding:16px 20px 12px; }
.analysis-scope-main { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.analysis-scope-main>b { font-size:1.12rem; }
.analysis-scope-progress { border-left:1px solid var(--line); padding-left:16px; font-weight:600; }
.analysis-scope-main>.btn { margin-left:auto; }
.analysis-scope p { margin:9px 0 0; font-size:.8rem; color:var(--muted); }
.analysis-current { display:inline-block; padding:3px 8px; border-radius:5px; color:var(--purple-dark); background:var(--tint); font-size:.75rem; font-weight:600; }
.analysis-evidence-note { margin:-5px 10px 0; color:var(--muted); font-size:.8rem; }
.analysis-main { display:grid; grid-template-columns:minmax(0,1.75fr) minmax(290px,1fr); gap:16px; }
.analysis-main.analysis-main-single { grid-template-columns:minmax(0,1fr); }
.analysis-main>.box,.analysis-knowledge.box { padding:18px; min-width:0; }
.analysis-main h2,.analysis-knowledge h2 { font-size:1.25rem; margin:0; }
.analysis-section-heading { display:flex; align-items:center; gap:16px; justify-content:space-between; flex-wrap:wrap; }
.analysis-section-heading>.muted { font-size:.8rem; margin-right:auto; }
.analysis-chart-head,.analysis-chart-row { display:grid; grid-template-columns:minmax(150px,1.15fr) minmax(155px,1.2fr) minmax(125px,1fr); align-items:center; gap:16px; }
.analysis-chart-head { margin-top:18px; padding:9px 12px; background:var(--bg); border-radius:6px; font-size:.8rem; }
.analysis-chart-row { width:100%; padding:17px 12px; background:transparent; color:var(--ink); border:0; border-bottom:1px solid var(--line); font:inherit; text-align:left; cursor:pointer; }
.analysis-chart-row.is-current,.analysis-chart-row:hover,.analysis-chart-row[aria-pressed=true] { background:var(--tint); border-radius:6px; }
.analysis-chapter-name b { font-size:.88rem; }
.analysis-chapter-name .analysis-current { margin-left:7px; font-size:.66rem; padding:2px 5px; background:var(--paper); }
.analysis-chapter-name small { display:block; color:var(--muted); font-size:.74rem; margin-top:6px; }
.analysis-performance,.analysis-coverage { display:grid; grid-template-columns:minmax(0,1fr) 62px; align-items:center; gap:10px; font-size:.8rem; }
.analysis-coverage { grid-template-columns:minmax(0,1fr) 52px; }
.analysis-track { display:block; height:11px; border-radius:12px; overflow:hidden; background:var(--line); }
.analysis-track>span { display:block; height:100%; border-radius:inherit; background:var(--purple); }
.analysis-track.coverage>span { background:var(--green); }
.analysis-track.is-unknown { background:transparent; border:1px dashed var(--soft); }
.analysis-caption { font-size:.75rem; margin:10px 0 0; color:var(--muted); }
.analysis-scope-hint { display:block; margin-top:5px; }
.analysis-due { display:inline-block; padding:4px 9px; border-radius:5px; margin:14px 0 0; background:#fff1d4; color:#914500; font-size:.78rem; font-weight:600; }
.analysis-task-preview article { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:15px 0; border-bottom:1px solid var(--line); }
.analysis-task-preview h3 { font-size:.9rem; margin:0; }
.analysis-task-preview p { margin:5px 0 0; font-size:.78rem; }
.analysis-task-preview .btn { flex-shrink:0; }
.analysis-recommend { margin-top:14px; }
.analysis-recommend article { padding-top:9px; }
.analysis-state { display:inline-block; padding:3px 8px; border-radius:5px; font-size:.75rem; font-weight:600; }
.analysis-state.due { background:#fff1d4; color:#914500; }
.analysis-state.weak { background:#ffe4de; color:#a23a22; }
.analysis-state.neutral { background:var(--bg); color:var(--muted); }
.analysis-text-button { padding:7px 0; background:none; border:0; font:inherit; font-size:.8rem; color:var(--purple-dark); cursor:pointer; display:block; margin-top:8px; }
.analysis-link.btn { background:none; border:0; box-shadow:none; color:var(--purple-dark); padding:4px 0; min-height:32px; font-size:.8rem; }
.analysis-recommend .analysis-link { border:1px solid var(--purple); padding:5px 12px; }
.analysis-chapter-select { margin-left:auto; }
.analysis-chapter-select select { min-width:180px; padding:8px 12px; border:1px solid var(--line); border-radius:6px; background:var(--paper); color:var(--ink); font:inherit; font-size:.8rem; }
.analysis-tabs { display:flex; flex-wrap:wrap; gap:10px; margin:13px 0; }
.analysis-tabs button { border:1px solid var(--line); border-radius:6px; background:var(--paper); color:var(--muted); font:inherit; font-size:.83rem; padding:7px 14px; cursor:pointer; }
.analysis-tabs button[aria-pressed=true] { color:white; border-color:var(--purple); background:var(--purple); }
.analysis-knowledge .level-table { margin-top:0; font-size:.82rem; }
.analysis-knowledge .level-table thead { background:var(--bg); }
.analysis-knowledge .level-table th,.analysis-knowledge .level-table td { padding:11px 12px; vertical-align:top; }
.analysis-knowledge .level-table td { white-space:normal; }
.analysis-knowledge .level-table th { min-width:0; }
.analysis-knowledge .level-table th:first-child { width:34%; }
.analysis-knowledge .level-table td:nth-child(2) { width:16%; }
.analysis-knowledge .level-table td:last-child { width:110px; white-space:nowrap; }
.analysis-point-evidence { font-weight:400; }
.analysis-point-evidence summary { font-weight:600; cursor:pointer; }
.analysis-point-evidence p { font-size:.76rem; color:var(--muted); margin:8px 0; }
.analysis-point-evidence[open] { min-width:220px; }
.analysis-task-skill { display:block; margin-top:5px; font-size:.73rem; color:var(--muted); font-weight:400; }
.analysis-empty,.analysis-next-empty { padding:20px 0; }
.analysis-rules.box { padding:13px 20px; font-size:.84rem; }
.analysis-rules summary { cursor:pointer; font-weight:600; }
.analysis-rules p { color:var(--muted); line-height:1.8; }
.analysis-redesign button:focus-visible,.analysis-redesign select:focus-visible { outline:2px solid var(--purple); outline-offset:3px; }
:root[data-theme="dark"] .analysis-state.due,:root[data-theme="dark"] .analysis-due { background:#49331b; color:#ffcf8c; }
:root[data-theme="dark"] .analysis-state.weak { background:#492a2b; color:#ffb4a4; }
@media(min-width:1000px) {
 .main:has(.analysis-redesign) .page-heading { display:flex; align-items:center; gap:20px; }
 .main:has(.analysis-redesign) .page-heading p { margin:0; }
}
@media(max-width:1250px) { .analysis-main { grid-template-columns:minmax(0,1fr); } }
@media(max-width:600px) {
 .analysis-main>.box,.analysis-knowledge.box,.analysis-scope { padding:14px; }
 .analysis-scope-main { gap:10px; }
 .analysis-scope-progress { border:0; padding:0; order:3; flex-basis:100%; line-height:1.7; }
 .analysis-scope-main>b { font-size:1rem; }
 .analysis-scope-main>.btn { font-size:.72rem; padding:5px 8px; }
 .analysis-scope-main>.analysis-current { display:none; }
 .analysis-chart-head { grid-template-columns:1fr 1fr; padding:8px 0; gap:8px; }
 .analysis-chart-head>b:first-child { display:none; }
 .analysis-chart-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr); padding:12px 4px; gap:10px; }
 .analysis-chapter-name { grid-column:1/-1; }
 .analysis-performance,.analysis-coverage { gap:6px; font-size:.74rem; }
 .analysis-performance { grid-template-columns:minmax(0,1fr) 60px; }
 .analysis-coverage { grid-template-columns:minmax(0,1fr) 43px; }
 .analysis-main h2,.analysis-knowledge h2 { font-size:1.12rem; }
 .analysis-section-heading { gap:8px; }
 .analysis-section-heading>.muted { font-size:.72rem; }
 .analysis-chapter-select select { min-width:0; max-width:165px; font-size:.74rem; }
 .analysis-knowledge .level-table { min-width:640px; }
 .analysis-rules.box { padding:13px 14px; }
}
/* Match the approved compact chapter layout while retaining native app chrome. */
.analysis-point-evidence { border:0; border-radius:0; padding:0; margin:0; background:none; }
.analysis-chapter-select .sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.analysis-redesign { font-size:1rem; }
.analysis-scope-progress { font-size:.94rem; }
.analysis-scope p,.analysis-evidence-note { font-size:.84rem; }
.analysis-knowledge .level-table { font-size:.88rem; }
.analysis-knowledge .level-table tbody th { background:transparent; }
.analysis-main h2,.analysis-knowledge h2 { font-size:1.35rem; }
.analysis-chapter-name b { font-size:.93rem; }
.analysis-task-preview h3 { font-size:.95rem; }
.analysis-scope-hint { display:inline; margin-left:14px; }
.analysis-next { position:relative; }
.analysis-next:has(.analysis-due)>.analysis-task-preview>.analysis-due { position:absolute; top:17px; right:18px; margin:0; }
.analysis-next:has(.analysis-due)>.analysis-task-preview { margin-top:9px; }
@media(min-width:1251px) {
 .layout:has(.analysis-redesign) { grid-template-columns:208px minmax(0,1fr); }
 .main:has(.analysis-redesign) { padding:20px; }
}
@media(max-width:600px) {
 .analysis-main h2,.analysis-knowledge h2 { font-size:1.12rem; }
 .analysis-scope-hint { display:block; margin:5px 0 0; }
 .analysis-next:has(.analysis-due)>.analysis-task-preview>.analysis-due { right:14px; top:14px; }
 .analysis-scope-progress { font-size:.86rem; }
}
/* Compact row rhythm keeps the task list and rules visible with the chart. */
.analysis-scope { padding:12px 18px 10px; line-height:1.6; }
.analysis-scope p { margin-top:7px; line-height:1.6; }
.analysis-evidence-note { line-height:1.6; }
.analysis-main h2,.analysis-knowledge h2 { line-height:1.4; }
.analysis-chart-head { margin-top:16px; padding-block:8px; line-height:1.4; }
.analysis-chart-row { padding-block:14px; }
.analysis-caption { line-height:1.6; }
.analysis-task-preview article { padding-block:11px; }
.analysis-task-preview h3 { line-height:1.4; }
.analysis-task-preview p { line-height:1.4; margin-top:5px; }
.analysis-task-preview .btn { font-size:.8rem; padding:6px 12px; min-height:32px; border-radius:6px; box-shadow:none; }
.analysis-text-button { line-height:1.5; }
.analysis-knowledge .level-table th,.analysis-knowledge .level-table td { padding-block:8px; }
.analysis-knowledge .level-table td .analysis-link { min-height:24px; padding-block:0; }
@media(max-width:600px) { .analysis-scope { padding:14px; } .analysis-chart-row { padding-block:12px; } }
.analysis-task-preview article { padding-block:9px; }
.analysis-next:has(.analysis-due)>.analysis-task-preview { margin-top:4px; }
.analysis-text-button { padding-block:5px; }
.analysis-knowledge.box { padding:16px 18px; }
.analysis-tabs { margin-block:10px; }
.guardian-report { overflow-wrap:anywhere; font-size:1rem; margin-top:20px; padding-top:20px; border-top:1px solid var(--line); }
.guardian-report h4 { margin:16px 0 8px; }
.guardian-report p { line-height:1.7; margin:8px 0; }
.guardian-knowledge,.guardian-record { padding:14px 0; border-top:1px solid var(--line); scroll-margin-top:80px; }
.guardian-report .actions { flex-wrap:wrap; }
.guardian-report .actions .btn { white-space:normal; text-align:left; }
.guardian-report pre { white-space:pre-wrap; overflow-wrap:anywhere; }
.guardian-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:16px 0; }
.guardian-metrics>div,.guardian-skills>div { padding:12px; border:1px solid var(--line); border-radius:8px; }
.guardian-metrics dt { font-size:.82rem; }
.guardian-metrics dd { margin:6px 0 0; font-weight:700; }
.guardian-metrics>div { background:var(--tint); }
.guardian-skills { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.guardian-skills b,.guardian-skills span,.guardian-skills small { display:block; margin-block:3px; }
.guardian-task { border-left:3px solid var(--line); padding:8px 12px; margin:10px 0; }
.guardian-knowledge>summary,.guardian-history>summary { cursor:pointer; padding:8px 0; font-weight:650; line-height:1.7; }
.guardian-history { margin-top:20px; padding-top:12px; border-top:1px solid var(--line); }
@media(max-width:600px) { .guardian-skills { grid-template-columns:1fr; } .guardian-metrics>div { padding:9px 7px; } .guardian-metrics dt { font-size:.76rem; } .guardian-metrics dd { font-size:.95rem; } }
.layout.non-learner { grid-template-columns:minmax(0,1fr); }
.layout.non-learner>.main { width:min(100%,1100px); }
.layout.non-learner .account-box { max-width:none; }
.guardian-skill-details>summary,.guardian-explainer>summary,.guardian-management>summary { cursor:pointer; padding:10px 0; font-weight:600; }
.guardian-scope { font-size:.86rem; }
.guardian-conclusion { font-weight:600; }
.account-relation.is-selected { border-color:var(--purple); }
@media(max-width:600px) {
 .analysis-knowledge .level-table th:first-child,
 .analysis-knowledge .level-table td:first-child {
  position:sticky;
  left:0;
  z-index:1;
  background:var(--paper);
  box-shadow:1px 0 var(--line);
 }
 .analysis-knowledge .level-table thead th:first-child { background:var(--bg); }
}

