:root {
  color-scheme: light;
  --bg: #F7F6F3;
  --surface: #FFFFFF;
  --ink: #1F2328;
  --ink-soft: #3D434B;
  --muted: #5B616B;
  --line: #E4E2DD;
  --line-strong: #CFCBC3;
  --primary: #2F5D8A;
  --primary-hover: #264D73;
  --primary-ink: #FFFFFF;
  --primary-soft: #E8EEF5;
  --ok: #2E7D4F;
  --ok-soft: #E7F3EC;
  --bad: #A3472E;
  --bad-soft: #F8EAE5;
  --warn: #8A5A0B;
  --warn-soft: #FBF4E4;
  --warn-line: #EAD9B0;
  --chip: #F0EEEA;
  --paper: var(--bg);
  --card: var(--surface);
  --cinnabar: var(--bad);
  --jade: var(--primary);
  --jade-strong: var(--primary);
  --gold: var(--warn);
  --danger: var(--bad);
  --shadow: 0 1px 2px rgba(31, 35, 40, 0.05), 0 4px 14px rgba(31, 35, 40, 0.05);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "PMingLiU", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
}
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--primary); }
h1, h2, h3 { font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
h1 { font-size: 1.5rem; line-height: 1.35; margin: 0.2rem 0 0.8rem; }
h2 { font-size: 1.25rem; line-height: 1.4; margin: 0 0 0.6rem; }
h3 { font-size: 1.0625rem; line-height: 1.5; }
p { line-height: 1.75; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.88em; color: var(--ink); background: var(--chip); border-radius: 4px; padding: 0 0.25em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (min-width: 768px) {
  h1 { font-size: 1.75rem; }
}

.app { min-height: 100vh; }
.top, .nav, .main { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; padding: 1.1rem 0 0.4rem; }
.brand { display: flex; align-items: center; text-decoration: none; color: inherit; min-width: 0; border-radius: 12px; }
.brand-mark { display: block; height: 40px; width: auto; }
.brand-mark-light, .brand-mark-compact { display: none; }
.brand:hover, .brand:focus-visible { background: #395D87; }
.brand:hover .brand-mark-full, .brand:focus-visible .brand-mark-full { display: none; }
.brand:hover .brand-mark-light, .brand:focus-visible .brand-mark-light { display: block; }
.top .brand { flex: 0 1 auto; }
.atlas-bar .brand { flex: 0 1 auto; max-width: min(42vw, 14rem); min-width: 0; }
.atlas-bar .brand-mark-full, .atlas-bar .brand-mark-light { display: none; }
.atlas-bar .brand-mark-compact { display: block; height: 36px; }
.atlas-bar .brand:hover .brand-mark-light, .atlas-bar .brand:focus-visible .brand-mark-light { display: none; }
.atlas-bar .brand:hover .brand-mark-compact, .atlas-bar .brand:focus-visible .brand-mark-compact { display: block; filter: brightness(0) invert(1); }
.atlas-nav {
  display: flex; flex-wrap: nowrap; gap: 0.12rem 0.16rem; pointer-events: auto;
  flex: 1 1 auto; justify-content: flex-start; min-width: 0;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.atlas-nav::-webkit-scrollbar { display: none; }
.atlas-nav a {
  text-decoration: none; color: var(--ink); white-space: nowrap;
  padding: 0.45rem 0.7rem; border-radius: 999px; font-size: 0.875rem;
  border: 1px solid transparent; flex: none; min-height: 2.75rem;
  display: inline-flex; align-items: center; box-sizing: border-box;
}
.atlas-nav a.active, .atlas-nav a:hover { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.who { display: flex; gap: 0.55rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.atlas-bar .who { flex: none; flex-wrap: nowrap; gap: 0.35rem; }
.atlas-bar .who span { max-width: 5.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: flex; flex-wrap: wrap; gap: 0.35rem; overflow: visible; padding: 0.4rem 0 0.8rem; }
.nav a {
  text-decoration: none; color: var(--ink); white-space: nowrap;
  padding: 0.4rem 0.85rem; border-radius: 999px; border: 1px solid transparent;
  min-height: 2.75rem; display: inline-flex; align-items: center;
}
.nav a.active, .nav a:hover { background: var(--primary-soft); color: var(--primary); }
.nav a.active { font-weight: 600; }
.nav-more { position: relative; flex: none; }
.nav-more > summary {
  list-style: none; cursor: pointer; color: var(--ink); white-space: nowrap;
  padding: 0.4rem 0.85rem; border-radius: 999px; min-height: 2.75rem;
  display: inline-flex; align-items: center; font-size: inherit;
}
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::after { content: "▾"; margin-left: 0.3rem; font-size: 0.75em; color: var(--muted); }
.nav-more:has(a.active) > summary, .nav-more > summary:hover, .nav-more[open] > summary { background: var(--primary-soft); color: var(--primary); }
.nav-more-list {
  position: absolute; z-index: 40; top: calc(100% + 0.3rem); right: 0; min-width: 10rem;
  display: grid; gap: 0.1rem; padding: 0.35rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 28px rgba(31, 35, 40, 0.12);
}
.nav-more-list a { display: flex; align-items: center; min-height: 2.75rem; padding: 0 0.8rem; border-radius: 8px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.nav-more-list a:hover, .nav-more-list a.active { background: var(--primary-soft); color: var(--primary); }
@media (max-width: 720px) {
  .brand-mark-full, .brand-mark-light { display: none; }
  .brand-mark-compact { display: block; height: 36px; }
  .brand:hover .brand-mark-light, .brand:focus-visible .brand-mark-light { display: none; }
  .brand:hover .brand-mark-compact, .brand:focus-visible .brand-mark-compact { display: block; filter: brightness(0) invert(1); }
  .atlas-bar .brand-mark-full { display: none; }
}
@media (max-width: 480px) {
  .nav { gap: 0.1rem; }
  .nav a, .nav-more > summary { padding: 0.4rem 0.55rem; }
}
.atlas-nav .nav-more > summary { font-size: 0.875rem; padding: 0.45rem 0.7rem; }
.atlas-nav .nav-more-list { position: fixed; top: 3.4rem; right: auto; }
.public-intro { position: relative; max-width: 42rem; margin: 3rem auto 2rem; padding: 0 1rem; }
.public-intro-video { display: none; }
.public-intro.has-backdrop { max-width: none; min-height: 70vh; margin: 0; padding: 4.5rem 8vw 3rem; overflow: hidden; color: #fff; }
.public-intro.has-backdrop .public-intro-video { display: block; position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.public-intro-shade { display: none; }
.public-intro.has-backdrop .public-intro-shade { display: block; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(16, 24, 32, 0.72), rgba(16, 24, 32, 0.28)); pointer-events: none; }
.public-intro.has-backdrop > h1,
.public-intro.has-backdrop > p,
.public-intro.has-backdrop > ul { position: relative; z-index: 2; }
.public-intro.has-backdrop h1,
.public-intro.has-backdrop .public-intro-lede,
.public-intro.has-backdrop .public-intro-points span,
.public-intro.has-backdrop .public-intro-points b { color: #fff; }
.public-intro.has-backdrop .public-intro-points { border-top-color: rgba(255, 255, 255, 0.35); }
.public-intro.has-backdrop .public-intro-points li { border-bottom-color: rgba(255, 255, 255, 0.25); }
.public-intro h1 { font-size: 1.75rem; line-height: 1.3; margin: 0 0 0.75rem; }
.public-intro-lede { font-size: 1.0625rem; color: var(--ink-soft); margin: 0 0 1.25rem; }
.public-intro .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0 0 2rem; }
.public-intro-points { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.public-intro-points li { display: grid; grid-template-columns: 5rem 1fr; gap: 0.75rem; padding: 0.875rem 0; border-bottom: 1px solid var(--line); }
.public-intro-points b { color: var(--primary); }
.public-intro-points span { color: var(--ink-soft); }
.page-tabs { display: flex; gap: 0.25rem; margin: 0.5rem 0 0.75rem; border-bottom: 1px solid var(--line); }
.page-tabs a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.page-tabs a:hover { color: var(--ink); }
.page-tabs a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.site-foot { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 1rem 0 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.site-foot summary { cursor: pointer; min-height: 2.75rem; display: inline-flex; align-items: center; }
.site-foot p { margin: 0.3rem 0 0; max-width: 680px; }
.main { padding-bottom: 3rem; }
.main:has(.atlas.is-embed),
.main:has(.atlas.is-stage) { width: 100%; max-width: none; padding-bottom: 0; }

.hero { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 1.2rem; align-items: stretch; margin-top: 1rem; }
.card, .panel, .gap, .subject-card, .task, .stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 1.15rem 1.2rem;
}
.subject-card, .task, .gap, .stat { display: block; text-decoration: none; color: inherit; }
[data-focused-course] > p { margin: 0.08rem 0; }
.gap { margin: 0.7rem 0; }
.eyebrow, .atlas-kicker { color: var(--muted); letter-spacing: 0.04em; font-size: 0.875rem; margin: 0; }
.lede { font-size: 1.0625rem; color: var(--ink-soft); }
.atlas-lede-full { display: block; overflow: visible; -webkit-line-clamp: unset; }
.atlas-help { pointer-events: auto; margin: 0.35rem 0; font-size: 0.95rem; }
.atlas-help summary { cursor: pointer; }
.answer-sheet { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0 0.8rem; }
.answer-sheet button { min-width: 2.75rem; min-height: 2.75rem; }
.answer-sheet button[aria-current="true"] { outline: 2px solid var(--primary); }
.answer-sheet button[data-answer-state="failed"] { color: var(--warn); }
.question-number { margin: 0; font-size: 1.15rem; font-weight: 650; }
.actions, .row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.btn, button, .ghost {
  border: 1px solid transparent; border-radius: 10px; padding: 0.55rem 1rem; background: var(--primary); color: var(--primary-ink);
  cursor: pointer; text-decoration: none; min-height: 2.75rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
}
.btn:hover, button:not([class]):hover { background: var(--primary-hover); }
.ghost, .btn.ghost, a.ghost { background: var(--surface); color: var(--primary); border: 1px solid var(--line-strong); }
.ghost:hover, .btn.ghost:hover, a.ghost:hover { background: var(--primary-soft); }
button:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: default; }
button.danger { background: var(--bad); color: #FFFFFF; }
.btn.small, button.small { padding: 0.3rem 0.75rem; min-height: 2.25rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; }
.subject-card small, .muted { color: var(--muted); }
.bar { height: 0.45rem; background: var(--chip); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--primary); }
.notice { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 10px; padding: 0.75rem 0.9rem; color: var(--ink); }
.reading-passage { margin: 0 0 0.8rem; }
.reading-passage figcaption { font-weight: 600; margin-bottom: 0.4rem; }
.question-diagram { margin: 0 0 0.85rem; max-width: min(34rem, 100%); width: 100%; }
.question-diagram img { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: #FFFFFF; }
.question-diagram figcaption { margin-top: 0.35rem; font-size: 0.85rem; }
.question-audio { margin: 0 0 0.85rem; max-width: min(34rem, 100%); width: 100%; }
.question-audio-label { margin: 0 0 0.35rem; font-weight: 600; }
.question-audio audio { display: block; width: 100%; }
.question-audio figcaption { margin-top: 0.35rem; font-size: 0.85rem; }
.error { color: var(--danger); }
.field, fieldset { display: grid; gap: 0.35rem; margin: 0.7rem 0; border: 0; padding: 0; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 0.6rem 0.75rem; min-height: 2.75rem;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--primary); }
.choice { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.65rem 0.75rem; border: 1.5px solid var(--line-strong); border-radius: 10px; margin: 0.4rem 0; background: var(--surface); min-height: 2.75rem; cursor: pointer; }
.choice:hover { border-color: var(--primary); }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice b { color: var(--primary); margin-right: 0.25rem; }
.weeks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.week { min-height: 8rem; }
.tag { display: inline-block; border-radius: 99px; padding: 0.1rem 0.55rem; background: var(--primary-soft); color: var(--primary); font-size: 0.8125rem; }
.tag.warn { background: var(--bad-soft); color: var(--bad); }
.tag.pending { background: var(--warn-soft); color: var(--warn); }
.split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 0.8rem; }
.map-wrap { overflow: auto; background: var(--surface); border-radius: 12px; border: 1px solid var(--line); }
.map-svg { min-width: 720px; width: 100%; height: auto; }
.nbox { fill: var(--surface); stroke: var(--line-strong); }
.nbox.elementary { stroke: var(--ok); }
.nbox.junior { stroke: var(--primary); }
.edge { stroke: #8a8074; stroke-width: 1.4; }
.edge.support { stroke-dasharray: 4 4; }
.gnode { cursor: pointer; }
.gnode text { font-size: 13px; fill: var(--ink); }
.gnode .sub { font-size: 11px; fill: var(--muted); }
.coach { display: grid; grid-template-columns: 180px 1fr; gap: 1rem; }
.avatar { width: 140px; height: 160px; margin: 0 auto; }
.avatar.talking .mouth { transform: scaleY(1.6); transform-origin: center; }
.bubble { background: var(--chip); border-radius: 12px; padding: 0.8rem; margin: 0.6rem 0; }
.scroll-table { overflow-x: auto; max-width: 100%; min-width: 0; }
.main { min-width: 0; overflow-wrap: anywhere; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
[data-candidate-gaps] summary { cursor: pointer; }
[data-candidate-gaps] ul { margin: 0.35rem 0 0; padding-left: 1.1rem; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 0.45rem 0.3rem; vertical-align: top; }
.accounts { display: grid; gap: 0.45rem; }
.accounts button { text-align: left; justify-content: flex-start; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 10px; }
.accounts button:hover { background: var(--primary-soft); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.panel:has(.atlas) {
  background: var(--bg); border: 0; box-shadow: none; border-radius: 0;
  padding: 0.55rem 0 1.15rem;
}
.panel:has(.atlas) > :not(.atlas) {
  width: min(1120px, calc(100% - 2rem));
  margin-left: auto; margin-right: auto;
}
.atlas-page { position: relative; min-height: 100dvh; height: 100dvh; overflow: hidden; width: 100%; }
.atlas {
  position: relative; overflow: hidden; background: var(--bg); color: var(--ink);
  width: 100%; max-width: none; min-width: 0;
}
.atlas.is-stage { position: fixed; inset: 0; z-index: 30; height: 100dvh; width: 100%; max-width: none; }
.atlas.is-embed { height: max(520px, calc(100dvh - 7.2rem)); min-height: 420px; border-radius: 0; width: 100%; }
.atlas.is-work {
  height: min(78vh, 860px); min-height: 520px; border-radius: 1rem;
  border: 1px solid var(--line); margin: 0.4rem 0 1rem;
}
.atlas canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  touch-action: none; cursor: grab; z-index: 0;
}
.atlas::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    linear-gradient(180deg, rgba(247, 246, 243, 0.92) 0%, rgba(247, 246, 243, 0) 14%, rgba(247, 246, 243, 0) 86%, rgba(247, 246, 243, 0.85) 100%);
}
.atlas-bar {
  position: absolute; z-index: 6; left: 0; right: 0; top: 0;
  display: flex; justify-content: space-between; align-items: center; gap: 0.4rem 0.55rem;
  padding: max(0.45rem, env(safe-area-inset-top)) 0.85rem 0.4rem;
  pointer-events: none; flex-wrap: nowrap; max-width: 100%;
}
.atlas-bar a, .atlas-bar button, .atlas-bar .who, .atlas-bar .brand, .atlas-bar .atlas-nav, .atlas-bar .atlas-role-links { pointer-events: auto; }
.atlas-role-links { display: flex; align-items: center; gap: 0.75rem; margin-right: 0.35rem; font-size: 0.82rem; }
.atlas-role-links a { color: var(--muted); text-decoration: none; }
.atlas-role-links a:hover { color: var(--ink); }
.atlas-copy {
  position: absolute; z-index: 2; pointer-events: none;
  left: clamp(1rem, 2.6vw, 2.2rem); max-width: min(32rem, 42vw);
}
.atlas.is-stage .atlas-copy { top: 3.4rem; }
.atlas:has(.atlas-nav).is-stage .atlas-copy { top: 3.6rem; }
.atlas.is-student.is-stage .atlas-copy { top: 2.7rem; max-width: min(22rem, 34vw); }
.atlas.is-student .atlas-links { display: none; }
.atlas.is-stage .atlas-copy h1 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  max-width: none;
  line-height: 1.25;
}
.atlas.is-embed .atlas-copy { top: 0.85rem; left: 1rem; }
.atlas-copy h1 {
  color: var(--ink); font-family: var(--sans); font-weight: 600; letter-spacing: 0;
  font-size: clamp(2.7rem, 6vw, 5.3rem); line-height: 1.08; margin: 0.35rem 0 0.7rem;
  text-shadow: 0 0 12px rgba(247, 246, 243, 0.9);
}
.atlas.is-embed .atlas-copy h1, .atlas.is-work .atlas-copy h1 { font-size: clamp(2.3rem, 5vw, 4.2rem); }
.atlas.is-selected .atlas-copy, .atlas.is-selected .atlas-hint-work { opacity: 0.38; }
.atlas-copy .lede, .atlas-note, .atlas-hint, .atlas-keys, .atlas-count, .atlas-disclaimer {
  color: var(--ink-soft); max-width: 36rem;
  text-shadow: 0 0 8px rgba(247, 246, 243, 0.95);
}
.atlas-count { color: var(--ink-soft); margin-bottom: 0.2rem; }
.atlas-count.is-view-fallback { color: var(--warn); -webkit-line-clamp: 3; }
.atlas-disclaimer { color: var(--warn); font-size: 0.92rem; }
.atlas-keys, .atlas-hint { font-size: 0.9rem; }
.atlas-links { display: flex; flex-wrap: wrap; gap: 0.8rem; pointer-events: auto; margin-top: 0.4rem; }
.atlas-links a { color: var(--primary); text-decoration: none; border-bottom: 1px solid rgba(47, 93, 138, 0.35); }
.atlas-hint-work {
  position: absolute; z-index: 2; left: 0.9rem; top: 0.75rem; margin: 0; max-width: min(36rem, 70%);
  pointer-events: none; color: var(--muted); font-size: 0.84rem;
  text-shadow: 0 0 8px rgba(247, 246, 243, 0.95);
}
.atlas-legend {
  position: absolute; z-index: 4; left: 0.8rem; right: auto;
  bottom: max(0.7rem, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; flex-wrap: nowrap; justify-content: flex-end;
  align-items: flex-start; gap: 0.28rem;
  max-height: min(48vh, 28rem); max-width: min(16.5rem, 28vw); overflow: auto;
  touch-action: manipulation;
  scrollbar-width: thin;
}
.atlas.is-selected .atlas-legend { right: auto; }
.atlas-legend .chip,
.atlas-subject-rail .chip,
button.chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.32rem 0.7rem; border-radius: 999px; cursor: pointer; user-select: none;
  background: rgba(255, 255, 255, 0.9); color: var(--ink);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px); font-size: 0.84rem; line-height: 1.2;
}
.atlas-subject-rail .chip {
  width: 100%; justify-content: flex-start; text-align: left;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.28rem 0.62rem; font-size: 0.82rem; line-height: 1.2;
}
.atlas.has-views .atlas-copy { max-width: min(20rem, 28vw); }
.atlas.has-views .atlas-keys { display: none; }
.atlas.has-views.is-stage .atlas-copy h1,
.atlas.has-views.is-embed .atlas-copy h1 {
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  line-height: 1.16;
  margin: 0.08rem 0 0.18rem;
  max-width: 10em;
}
.atlas.has-views .atlas-copy .lede,
.atlas.has-views .atlas-copy .atlas-count,
.atlas.has-views .atlas-copy .atlas-hint {
  font-size: 0.86rem;
  line-height: 1.35;
  margin: 0.08rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.atlas.is-focused.has-views .atlas-copy .lede,
.atlas.is-focused.has-views .atlas-copy .atlas-count,
.atlas.is-focused.has-views .atlas-copy .atlas-disclaimer,
.atlas.is-focused.has-views .atlas-copy .atlas-hint { display: none; }
.atlas.is-student.has-views.is-stage .atlas-copy { max-width: min(17rem, 24vw); }
.atlas.is-student.has-views .atlas-note,
.atlas.is-student.has-views .atlas-disclaimer,
.atlas.is-student.has-views .atlas-keys { display: none; }
.atlas.is-student.has-views .atlas-count {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.atlas.is-student.has-views .atlas-copy .lede {
  -webkit-line-clamp: 1;
  margin: 0.04rem 0;
}
.atlas.is-student.has-views .atlas-copy .atlas-hint {
  -webkit-line-clamp: 1;
  font-size: 0.82rem;
  margin: 0.04rem 0 0;
}
.atlas-subject-rail .chip.is-on,
.atlas-legend .chip:has(input:checked) {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary-soft);
}
.atlas-legend .chip .dot, .atlas-kicker .dot, .atlas-fallback .dot, .atlas-subject-rail .dot {
  width: 0.62rem; height: 0.62rem; border-radius: 50%; display: inline-block; flex: none;
}
.atlas-legend .chip .count, .atlas-fallback .count, .atlas-subject-rail .count { color: var(--muted); margin-left: auto; }
.atlas-legend input[type="checkbox"] {
  appearance: none; width: 0.82rem; height: 0.82rem; margin: 0; flex: none;
  border-radius: 0.2rem; border: 1px solid var(--line-strong);
  background: var(--surface); display: grid; place-content: center;
}
.atlas-legend input[type="checkbox"]:checked {
  border-color: transparent; background: var(--primary);
}
.atlas-legend input[type="checkbox"]:checked::after {
  content: ""; width: 0.24rem; height: 0.46rem;
  border: solid #FFFFFF; border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}
.atlas-legend input[type="checkbox"]:indeterminate {
  border-color: transparent; background: var(--primary);
}
.atlas-legend input[type="checkbox"]:indeterminate::after {
  content: ""; width: 0.42rem; height: 0; border-bottom: 2px solid #FFFFFF;
}
.atlas-legend .chip:has(input:not(:checked):not(:indeterminate)) { opacity: 0.4; }
.atlas.has-views { --atlas-view-space: 5.2rem; }
.atlas.has-views.is-viewing { --atlas-view-space: 7.2rem; }
.atlas.has-views.is-view-status { --atlas-view-space: 7rem; }
.atlas.has-views.is-viewing.is-view-status { --atlas-view-space: 9.2rem; }
.atlas-views {
  position: absolute; z-index: 6;
  left: 0.85rem; right: auto; width: min(17.5rem, 26vw);
  bottom: max(0.55rem, env(safe-area-inset-bottom));
  padding: 0.45rem 0.55rem 0.5rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 12px;
  backdrop-filter: blur(14px);
  max-height: min(46vh, 22rem); overflow: auto;
  touch-action: manipulation;
  scrollbar-width: thin;
}
.atlas-view-bar {
  display: flex; flex-direction: column; align-items: stretch;
  gap: 0.32rem; width: 100%;
}
.atlas-subject-rail {
  display: flex; flex-direction: column; gap: 0.16rem;
  max-height: none; overflow: visible;
}
.atlas-subject-more {
  margin: 0.08rem 0 0;
}
.atlas-subject-more summary {
  cursor: pointer; list-style: none;
  color: var(--primary);
  font-size: 0.84rem; line-height: 1.35;
  padding: 0.22rem 0.28rem;
}
.atlas-subject-more summary::-webkit-details-marker { display: none; }
.atlas-subject-extra {
  display: flex; flex-direction: column; gap: 0.22rem;
  margin-top: 0.22rem;
}
.atlas-view-tools {
  display: flex; flex-wrap: wrap; align-items: end; gap: 0.3rem 0.45rem;
}
.atlas-view-field {
  display: grid; gap: 0.2rem; margin: 0;
  flex: 1 1 8.5rem; min-width: min(100%, 7.5rem);
  font-size: 0.82rem; letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.atlas-view-subject-select {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.atlas-views select { width: 100%; min-height: 2.35rem; font-size: 0.92rem; letter-spacing: 0; }
.atlas-view-reset, .atlas-view-list { min-height: 2.35rem; padding: 0.32rem 0.8rem; align-self: end; }
.atlas-view-note {
  flex: 1 1 100%; margin: 0.12rem 0 0; font-size: 0.82rem; line-height: 1.4; color: var(--warn);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.atlas-scope-stat { margin: 0 0 0.2rem; font-size: 0.92rem; font-weight: 650; line-height: 1.35; color: var(--ink); }
.atlas-subject-rail .chip.is-empty,
.atlas-subject-rail .chip:disabled { opacity: 0.38; filter: grayscale(0.85); cursor: not-allowed; }
.atlas-search { display: grid; gap: 0.28rem; margin: 0.35rem 0 0.7rem; font-size: 0.84rem; }
.student-today, .student-knowledge-search { margin: 0.15rem 0 1rem; }
.atlas-view-status {
  flex: 1 1 100%; margin: 0.14rem 0 0; font-size: 0.88rem; line-height: 1.4; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.atlas-view-status.is-empty {
  margin-top: 0.35rem; padding: 0.4rem 0.55rem; color: var(--warn);
  background: var(--warn-soft); border-radius: 0.5rem;
  -webkit-line-clamp: 5;
}
.atlas-trail { margin: 0.15rem 0 0.35rem; }
.atlas-trail .atlas-view-reset { min-height: 2.1rem; padding: 0.25rem 0.7rem; font-size: 0.82rem; }
.atlas-meta b { color: var(--ink); }
.atlas-fallback button.is-dim { opacity: 0.45; }
.atlas-fallback button.is-bridge { opacity: 0.82; }
.atlas.has-views .atlas-card { max-height: calc(100% - var(--atlas-view-space, 7rem) - 4.8rem); }
.atlas.has-views.is-embed .atlas-card,
.atlas.has-views.is-work .atlas-card { max-height: calc(100% - var(--atlas-view-space, 7rem) - 1.3rem); }
.atlas-note, .atlas-disclaimer {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.atlas-zoom {
  position: absolute; z-index: 4; right: 0.85rem; top: 46%;
  display: grid; gap: 0.35rem;
}
.atlas.is-selected .atlas-zoom { right: auto; left: 0.85rem; }
.atlas-hint-dock {
  position: absolute; z-index: 3; right: 0.9rem; bottom: max(0.65rem, env(safe-area-inset-bottom));
  margin: 0; max-width: min(16rem, 42vw);
  pointer-events: none; color: var(--muted);
  font-size: 0.8rem; line-height: 1.35;
  text-shadow: 0 0 8px rgba(247, 246, 243, 0.95);
}
button.atlas-zoom-btn {
  width: 2.75rem; height: 2.75rem; padding: 0; border-radius: 999px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong);
}
button.atlas-zoom-btn:hover { background: var(--primary-soft); }
.atlas.is-stage .atlas-card {
  top: 3.35rem;
  bottom: 0.75rem;
  width: min(20rem, 30vw);
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
}
@media (min-width: 1000px) {
  .atlas.is-stage .atlas-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .atlas.is-stage .atlas-card-head,
  .atlas.is-stage .atlas-card-lead,
  .atlas.is-stage .atlas-card-more {
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
  }
  .atlas.is-stage .atlas-card-lead h3 { margin: 0.35rem 0 0.15rem; }
}
.atlas.is-stage .atlas-card .atlas-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.atlas.is-stage .atlas-card { padding: 0.75rem 0.9rem 0.65rem; }
.atlas.is-stage .atlas-card h2 { font-size: 1.32rem; margin-bottom: 0.35rem; }
.atlas-card {
  position: absolute; z-index: 5; top: 5.2rem; right: 1rem;
  width: min(24rem, calc(100% - 1.5rem)); max-height: calc(100% - 7.2rem);
  overflow: auto; padding: 1.1rem 1.15rem 1.2rem;
  background: rgba(255, 255, 255, 0.97); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px;
  backdrop-filter: blur(18px); box-shadow: 0 8px 28px rgba(31, 35, 40, 0.12);
}
.atlas.is-embed .atlas-card { top: 0.8rem; max-height: calc(100% - 6.4rem); }
.atlas.is-work .atlas-card { top: 0.7rem; max-height: calc(100% - 4.6rem); }
.atlas-card h2 { font-size: 1.7rem; line-height: 1.25; margin: 0.25rem 2rem 0.5rem 0; }
.atlas-card h3 { font-size: 1rem; margin: 0.95rem 0 0.3rem; color: var(--ink-soft); }
.atlas-card ul { list-style: none; padding: 0; margin: 0.15rem 0 0.4rem; }
.atlas-card li { margin: 0.16rem 0; }
.atlas-stat { font-size: 1.08rem; }
.atlas-stat b { font-family: var(--sans); font-size: 1.45rem; margin-left: 0.25rem; }
.atlas-summary { color: var(--ink); font-size: 1rem; line-height: 1.6; }
.atlas-meta { margin: 0.2rem 0 0.4rem; font-size: 0.95rem; }
.atlas-support, .atlas-cross { margin: 0.2rem 0 0.5rem; color: var(--warn); font-size: 0.95rem; }
.atlas-study { margin: 0.75rem 0 0.15rem; }
.atlas-study h3 { margin-top: 0.2rem; }
button.atlas-close {
  position: absolute; top: 0.45rem; right: 0.45rem;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 0.35rem 0.7rem;
  min-width: 2.75rem; min-height: 2.4rem;
  touch-action: manipulation;
}
button.atlas-jump, .atlas-fallback button {
  display: block; width: 100%; text-align: left; background: transparent; color: inherit;
  border: 0; border-radius: 0.45rem; padding: 0.38rem 0.42rem;
  font-size: 0.95rem; line-height: 1.35;
}
button.atlas-jump small, .atlas-fallback button small, .atlas-fallback h3 {
  display: block; color: var(--muted); font-size: 0.8rem; font-weight: 500;
}
button.atlas-jump:hover, .atlas-fallback button:hover, button.atlas-jump[aria-current="true"] {
  background: var(--primary-soft);
}
.atlas-fallback button[aria-current="true"] { color: var(--primary); font-weight: 600; }
.atlas-fallback {
  position: absolute; z-index: 4; left: 1rem; top: 38%;
  width: min(22rem, calc(100% - 2rem)); max-height: 46vh; overflow: auto;
  padding: 0.85rem 0.9rem 1rem; background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line); border-radius: 12px;
}
.atlas.is-list .atlas-fallback { z-index: 7; }
.atlas-list-close { position: sticky; float: right; top: 0; z-index: 2; min-width: 44px; min-height: 44px; padding: 0 10px; color: var(--ink); background: var(--bg); border-radius: 10px; }
.atlas-list-mode { position: absolute; right: 0.7rem; bottom: 0.7rem; z-index: 8; min-width: 44px; min-height: 44px; }
.atlas-fallback h2 { font-size: 1.15rem; }
.atlas-fallback h3 { margin: 0.8rem 0 0.25rem; font-size: 0.95rem; color: var(--ink); }
.atlas-held { color: var(--muted); }

body:has(.atlas.is-stage) { overflow: hidden; height: 100%; }

@media (min-width: 1080px) {
  .atlas-bar .brand { max-width: min(36vw, 28rem); }
  .atlas-bar .brand-mark-full { display: block; height: 40px; }
  .atlas-bar .brand-mark-compact { display: none; }
  .atlas-bar .brand:hover .brand-mark-full, .atlas-bar .brand:focus-visible .brand-mark-full { display: none; }
  .atlas-bar .brand:hover .brand-mark-light, .atlas-bar .brand:focus-visible .brand-mark-light { display: block; filter: none; }
  .atlas-bar .brand:hover .brand-mark-compact, .atlas-bar .brand:focus-visible .brand-mark-compact { display: none; }
  .atlas.has-views .atlas-copy { max-width: 15.5rem; }
  .atlas.has-views.is-stage:not(.is-student) .atlas-copy {
    top: 3.05rem;
    max-width: min(24rem, 36vw);
  }
  .atlas.has-views.is-stage .atlas-note,
  .atlas.has-views.is-stage .atlas-disclaimer,
  .atlas.has-views.is-stage .atlas-hint,
  .atlas.has-views.is-stage .atlas-keys,
  .atlas.has-views.is-stage .atlas-links,
  .atlas.has-views.is-stage:not(.is-student) .eyebrow { display: none; }
  .atlas.has-views.is-stage .atlas-copy h1,
  .atlas.has-views.is-stage:not(.is-student) .atlas-copy h1 {
    font-family: var(--sans);
    font-weight: 600;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    line-height: 1.25;
    letter-spacing: 0;
    margin: 0 0 0.35rem;
    max-width: none;
    display: block;
    overflow: visible;
  }
  .atlas.has-views.is-stage:not(.is-student) .atlas-copy .lede,
  .atlas.has-views.is-stage:not(.is-student) .atlas-copy .atlas-count {
    font-size: 0.95rem;
    line-height: 1.4;
    max-width: 22rem;
    -webkit-line-clamp: 2;
  }
  .atlas.has-views.is-stage:not(.is-student) .atlas-views {
    top: 18.7rem;
    bottom: auto;
    width: min(16rem, 30vw);
    max-height: calc(100vh - 19.15rem);
    overflow: visible;
  }
  .atlas.has-views.is-stage:not(.is-student) .atlas-subject-rail .chip {
    padding: 0.1rem 0.42rem;
    font-size: 0.84rem;
    line-height: 1.28;
  }
  .atlas.has-views.is-stage:not(.is-student) .atlas-view-note,
  .atlas.has-views.is-stage:not(.is-student) .atlas-view-status {
    display: none;
  }
  .atlas.has-views.is-embed .atlas-copy h1 {
    font-size: clamp(1.28rem, 1.7vw, 1.72rem);
    max-width: 8.5em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .atlas-views {
    width: min(12.6rem, 22vw);
    max-height: none;
    overflow: visible;
    padding: 0.22rem 0.28rem 0.28rem;
    background: rgba(255, 255, 255, 0.82);
  }
  .atlas-subject-rail { gap: 0.02rem; }
  .atlas-subject-rail .chip {
    padding: 0.05rem 0.32rem;
    font-size: 0.74rem;
    line-height: 1.15;
    background: transparent;
    border-color: transparent;
    backdrop-filter: none;
  }
  .atlas-views select,
  .atlas-view-reset,
  .atlas-view-list { min-height: 1.8rem; font-size: 0.8rem; }
}

@media (max-width: 900px) {
  .atlas-copy,
  .atlas.has-views .atlas-copy { max-width: calc(100% - 1.7rem); }
  .atlas.is-student .atlas-copy,
  .atlas.is-student.has-views .atlas-copy { max-width: min(16.5rem, 70vw); right: auto; }
  .atlas.has-views { --atlas-view-space: 4.4rem; }
  .atlas.has-views.is-viewing { --atlas-view-space: 6.6rem; }
  .atlas.has-views.is-view-status { --atlas-view-space: 6.8rem; }
  .atlas.has-views.is-viewing.is-view-status { --atlas-view-space: 8.8rem; }
  .atlas-legend {
    left: 0.4rem; right: 0.4rem; max-width: none; max-height: 22vh;
    flex-direction: row; flex-wrap: wrap; justify-content: flex-start;
  }
  .atlas-views {
    left: 0.4rem; right: 0.4rem; width: auto;
    max-height: min(26vh, 8.6rem);
    padding: 0.32rem 0.42rem 0.38rem;
    overflow: auto;
  }
  .atlas-view-bar { gap: 0.28rem; }
  .atlas-subject-rail {
    flex-direction: row; flex-wrap: nowrap; max-height: none;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  }
  .atlas-subject-rail::-webkit-scrollbar { display: none; }
  .atlas-subject-rail .chip { width: auto; flex: none; }
  .atlas-subject-more { display: contents; }
  .atlas-subject-more summary { display: none; }
  .atlas-subject-extra { display: contents; margin: 0; }
  .atlas-views select { min-height: 2.05rem; font-size: 0.88rem; }
  .atlas-view-reset, .atlas-view-list { min-height: 2.05rem; padding: 0.22rem 0.65rem; }
  .atlas-view-note { font-size: 0.74rem; }
  .atlas-view-subject-select {
    position: static; width: auto; height: auto; margin: 0; clip: auto;
    overflow: visible; white-space: normal;
  }
}

@media (max-width: 800px) {
  .atlas-role-links { display: none; }
  .hero, .split, .weeks, .coach { grid-template-columns: 1fr; }
  .top, .nav, .main { width: min(100% - 1.2rem, 1120px); }
  .main:has(.atlas.is-embed) { width: 100%; }
  .atlas-bar { gap: 0.28rem 0.4rem; flex-wrap: nowrap; }
  .atlas-nav { flex: 1 1 auto; flex-wrap: nowrap; }
  .atlas.is-stage .atlas-bar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .atlas.is-stage .atlas-bar .brand { max-width: none; }
  .atlas.is-stage .atlas-bar .who { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .atlas.is-stage .atlas-bar .who span { max-width: none; flex: 0 0 auto; overflow: visible; text-overflow: clip; }
  .atlas.is-stage .atlas-copy, .atlas.is-embed .atlas-copy { top: 2.8rem; left: 0.75rem; right: auto; }
  .atlas.is-stage .atlas-copy { top: 8.8rem; }
  .atlas:has(.atlas-nav).is-stage .atlas-copy { top: 2.85rem; }
  .atlas.is-student:has(.atlas-nav).is-stage .atlas-copy { top: 2.5rem; }
  .atlas.is-embed .atlas-copy { top: 0.7rem; }
  .atlas-copy h1, .atlas.is-embed .atlas-copy h1 { font-size: 2.15rem; }
  .atlas-card, .atlas.is-embed .atlas-card, .atlas.is-work .atlas-card {
    left: 0.55rem; right: 0.55rem; top: auto; bottom: 0.55rem; width: auto;
    max-height: min(46vh, 22rem);
    z-index: 7;
  }
  .atlas.is-selected .atlas-legend { opacity: 0; pointer-events: none; }
  .atlas.has-views.is-selected .atlas-views { opacity: 0; pointer-events: none; }
  .atlas.is-list .atlas-fallback { bottom: 3.4rem; }
  .atlas-note, .atlas-keys, .atlas-disclaimer { display: none; }
  .atlas.has-views.is-stage .atlas-links { display: none; }
  .atlas-zoom { top: auto; bottom: 38%; right: 0.55rem; }
  .atlas.is-selected .atlas-zoom { left: 0.55rem; right: auto; }
  .atlas.is-selected .atlas-hint-dock,
  .atlas.has-views.is-selected .atlas-hint-dock { display: none; }
  .atlas-hint-dock { right: 0.55rem; bottom: calc(var(--atlas-view-space, 4.4rem) + 0.4rem); }
  .atlas-fallback { top: auto; bottom: 0.55rem; right: 0.55rem; width: auto; max-height: 52vh; }
  .atlas.has-views .atlas-card,
  .atlas.has-views.is-embed .atlas-card,
  .atlas.has-views.is-work .atlas-card {
    bottom: calc(var(--atlas-view-space, 4.7rem) + 0.35rem);
    max-height: min(42vh, 18rem);
  }
  .atlas.has-views.is-selected .atlas-card,
  .atlas.has-views.is-selected.is-embed .atlas-card,
  .atlas.has-views.is-selected.is-work .atlas-card {
    bottom: 0.55rem;
    max-height: min(52vh, 22rem);
  }
  .atlas.has-views.is-selected.is-list .atlas-fallback {
    bottom: calc(min(52vh, 22rem) + 1.2rem);
    max-height: min(22vh, 8rem);
    z-index: 6;
  }
  .atlas.has-views.is-list .atlas-fallback {
    bottom: calc(var(--atlas-view-space, 4.7rem) + 0.35rem);
    max-height: 32vh;
    z-index: 7;
  }
  .atlas.has-views .atlas-copy h1,
  .atlas.has-views.is-embed .atlas-copy h1,
  .atlas.has-views.is-stage .atlas-copy h1 {
    font-size: 1.35rem;
    line-height: 1.2;
    margin: 0.06rem 0 0.1rem;
    max-width: 12em;
  }
  .atlas.has-views .atlas-copy .lede,
  .atlas.has-views:not(.is-student) .atlas-count { display: none; }
  .atlas.has-views .atlas-hint {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.8rem;
    line-height: 1.35;
    margin: 0.06rem 0 0;
  }
  .atlas.has-views.is-stage .atlas-hint { display: none; }
  .atlas.has-views.is-embed .atlas-copy,
  .atlas.has-views.is-work .atlas-copy { max-height: 5.4rem; overflow: hidden; }
  .atlas.has-views.is-stage .atlas-copy { max-height: 4.8rem; overflow: hidden; }
  .atlas.is-student.has-views.is-stage .atlas-copy { max-height: 4.2rem; max-width: min(18rem, 72vw); }
  .atlas.is-student.has-views .atlas-hint { display: none; }
  .atlas.has-views .atlas-links { margin-top: 0.15rem; gap: 0.35rem 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  .atlas-card, button.chip { transition: none; }
}

[data-lesson-entries] { margin: 0.35rem 0 0.75rem; }
[data-lesson-entries] h2 { font-size: 1rem; margin: 0 0 0.35rem; }
a[data-lesson-entry] {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  min-height: 2.6rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  text-decoration: none;
}
a[data-lesson-entry] [data-lesson-name] { font-weight: 700; }
.grade-switch { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: end; }
.grade-switch .field { min-width: min(100%, 14rem); max-width: 18rem; margin-top: 0; }
.study-main { margin: 0.35rem 0 0.9rem; }
.study-main [data-study-next] { margin: 0.35rem 0 0.85rem; }
.study-start-row {
  display: block;
  margin-top: 0.55rem;
}
a.study-start-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-ink);
  min-height: 2.75rem;
  text-decoration: none;
  white-space: nowrap;
  max-width: 100%;
  cursor: pointer;
}
.subject-catalog {
  margin: 1.1rem 0 0.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.9rem 0.7rem;
  background: var(--surface);
}
.subject-catalog > summary {
  cursor: pointer;
  color: var(--primary);
  font-size: 1rem;
  padding: 0.25rem 0;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
}
.subject-catalog > summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 0.25rem;
}
.subject-catalog[open] > summary { margin-bottom: 0.5rem; }
.subject-catalog-body > h2:first-child { margin-top: 0.35rem; }
.subject-catalog .card { margin: 0.7rem 0; }
.prereq-region {
  margin: 1.1rem 0;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--warn-line);
  border-radius: 12px;
  background: var(--warn-soft);
}
details.prereq-region > summary { cursor: pointer; }
.prereq-region h2 { margin-top: 0.2rem; }
.empty-state { margin: 0.2rem 0 0.8rem; }
.practice .variant { margin-top: 0.85rem; padding-top: 0.7rem; border-top: 1px solid var(--line); }

/* Student stage-exam entry: compact filters + product CTA above the fold */
.exam-entry-panel {
  padding: 0.85rem 1rem 1.1rem;
}
.exam-entry-panel .exam-entry-head { margin: 0 0 0.35rem; }
.exam-entry-panel .exam-entry-head .eyebrow { margin: 0; letter-spacing: 0.1em; }
.exam-entry-panel .exam-entry-head h1 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.25;
  margin: 0.1rem 0 0;
}
.exam-entry-panel .exam-filters {
  display: grid;
  gap: 0.28rem;
  margin: 0.45rem 0 0.5rem;
}
.exam-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.45rem;
}
.exam-filter-label {
  flex: 0 0 2.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.2;
}
.exam-filter-empty { margin: 0; font-size: 0.88rem; }
.exam-entry-panel .exam-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  align-items: center;
  margin: 0;
}
.exam-entry-panel .exam-choice-row .btn,
.exam-entry-panel .exam-choice-row a.btn {
  min-height: 2rem;
  padding: 0.28rem 0.72rem;
  font-size: 0.88rem;
  border-radius: 999px;
}
.exam-entry-panel .exam-slot-title {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.exam-primary-stack { display: grid; gap: 0.55rem; margin: 0 0 0.65rem; }
.exam-product-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  padding: 0.75rem 0.9rem 0.8rem;
  background: var(--surface);
}
.exam-product-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.55rem;
  margin-bottom: 0.2rem;
}
.exam-product-head h2 { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.exam-product-title { margin: 0.05rem 0 0.35rem; color: var(--ink); font-size: 1rem; line-height: 1.5; }
.exam-product-meta {
  list-style: none; margin: 0 0 0.45rem; padding: 0;
  display: grid; gap: 0.15rem; color: var(--muted); font-size: 0.875rem;
}
.exam-product-meta li { line-height: 1.35; }
.exam-product-notice {
  margin: 0 0 0.55rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.9rem;
  line-height: 1.4;
}
.exam-product-actions { margin: 0 0 0.2rem; }
.exam-start-cta {
  position: static;
  min-height: 2.5rem; padding: 0.55rem 1.2rem; font-size: 1rem;
  border-radius: 0.85rem;
}
.exam-status-card, .exam-secondary-card, .exam-empty-state {
  margin: 0.55rem 0;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.exam-empty-state {
  border-color: var(--warn-line);
  background: var(--warn-soft);
}
.exam-entry-panel .exam-history-title {
  margin: 0.85rem 0 0.45rem;
  font-size: 1.2rem;
}
.exam-source-details {
  margin: 0.45rem 0 0;
  border-top: 1px solid var(--line);
  padding-top: 0.35rem;
}
.exam-page-details,
.exam-entry-panel > .exam-source-details {
  border-top: 0;
  padding-top: 0;
  margin-top: 0.35rem;
}
.exam-source-details > summary {
  cursor: pointer; color: var(--primary); font-size: 0.875rem;
  list-style-position: outside; padding: 0.2rem 0; min-height: 2.75rem;
}
.exam-source-details > summary:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 0.25rem;
}
.exam-source-details[open] > summary { margin-bottom: 0.3rem; }
.exam-source-details p, .exam-source-details ul { margin: 0.3rem 0; }
.exam-grid { margin: 0.5rem 0 0.75rem; }
.exam-grid p { margin: 0 0 0.35rem; font-size: 0.875rem; }
.exam-grid ol { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0; padding: 0; list-style: none; }
.exam-grid .exam-cell { min-width: 2.75rem; min-height: 2.75rem; padding: 0; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 500; }
.exam-grid .exam-cell[data-state="saved"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.exam-grid .exam-cell[data-state="dirty"] { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.exam-grid .exam-cell[aria-current="step"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.exam-confirm { margin: 0.75rem 0; padding: 0.875rem 1rem; border: 1px solid var(--warn-line); border-radius: 10px; background: var(--warn-soft); }
.exam-confirm p { margin: 0.25rem 0; }
[data-exam-report] h1 {
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  line-height: 1.15;
  margin: 0.2rem 0 0.45rem;
}
[data-exam-report] .exam-score {
  font-size: 1.05rem;
  line-height: 1.45;
  margin: 0.2rem 0 0.65rem;
}
[data-exam-report] .actions { margin: 0 0 0.75rem; }
[data-exam-report] [data-exam-provenance] p { font-size: 0.92rem; line-height: 1.45; }
@media (max-width: 720px) {
  [data-exam-report] h1 { font-size: 1.35rem; }
  [data-exam-report] .exam-score { font-size: 1rem; }
  [data-exam-report] .actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
  [data-exam-report] .actions .btn { flex: 1 1 auto; }
}

.lesson-scaffold {
  margin: 0.55rem 0 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.lesson-scaffold .lesson-step {
  margin: 0.55rem 0 0;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
}
.lesson-scaffold .lesson-step:first-of-type { border-top: 0; padding-top: 0; }
.lesson-scaffold h4 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: var(--ink);
  font-weight: 600;
}
.lesson-scaffold .lesson-step-body { margin: 0; line-height: 1.55; }
.lesson-scaffold .lesson-step.is-soft { opacity: 0.78; }
.lesson-scaffold .lesson-meta,
.node-meta {
  margin-top: 0.55rem;
  font-size: 0.88rem;
}
.lesson-scaffold .lesson-meta > summary,
.node-meta > summary {
  cursor: pointer;
  color: var(--muted, #9aa3b2);
  list-style-position: outside;
}
.lesson-preface { margin: 0 0 0.4rem; }

@media (max-width: 800px) {
  .exam-entry-panel { padding: 0.75rem 0.75rem 1rem; }
  .exam-filter-label { flex-basis: 100%; }
  .exam-product-card, .exam-status-card, .exam-secondary-card, .exam-empty-state {
    padding: 0.7rem 0.75rem;
  }
  .exam-product-head h2 { font-size: 1.08rem; }
  .exam-start-cta { width: 100%; }
  .exam-entry-panel .exam-choice-row { gap: 0.35rem; }
  .exam-entry-panel .exam-choice-row .btn,
  .exam-entry-panel .exam-choice-row a.btn {
    min-height: 2.35rem;
    padding: 0.4rem 0.8rem;
  }
}

.atlas.has-views .atlas-legend {
  display: none !important;
}
.atlas.is-focused.has-views .atlas-copy .atlas-count,
.atlas.is-focused.has-views:not(.is-student) .atlas-copy .lede.is-grade-note {
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.atlas.is-focused.has-views.is-stage:not(.is-student) .atlas-copy {
  max-height: none;
  overflow: visible;
}
.atlas.is-student.has-views.is-stage.is-focused .atlas-copy {
  max-height: 6.4rem;
  overflow: hidden;
}
.atlas-view-note[hidden],
.atlas-view-status[hidden] {
  display: none !important;
}
.atlas.is-focused.has-views.is-stage:not(.is-student) .atlas-view-note,
.atlas.is-focused.has-views.is-stage:not(.is-student) .atlas-view-status {
  display: block;
}
.atlas.is-student.has-views.is-stage .atlas-copy {
  left: 0.85rem;
  top: 2.65rem;
  width: min(16.5rem, 22vw);
  max-width: min(16.5rem, 22vw);
  max-height: 6.4rem;
  overflow: hidden;
}
.atlas.is-student.has-views.is-stage .atlas-copy .eyebrow,
.atlas.is-student.has-views.is-stage .atlas-copy .atlas-hint {
  display: none;
}
.atlas.is-student.has-views.is-stage .atlas-copy h1 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.25;
  margin: 0 0 0.2rem;
  max-width: none;
}
.atlas.is-student.has-views.is-stage .atlas-copy .atlas-count {
  -webkit-line-clamp: 2;
  font-size: 0.92rem;
  line-height: 1.35;
  margin: 0;
}
.atlas.is-student.has-views.is-stage .atlas-views {
  left: 0.85rem;
  right: auto;
  top: 8.75rem;
  bottom: 0.55rem;
  width: min(16.5rem, 22vw);
  max-height: none;
  overflow: auto;
  background: rgba(255, 255, 255, 0.95);
}
.atlas.is-student.has-views.is-stage .atlas-subject-rail .chip {
  font-size: 0.875rem;
  line-height: 1.3;
  padding: 0.2rem 0.48rem;
  background: var(--surface);
  border-color: var(--line);
}
.atlas.is-student.is-list .atlas-hint-dock,
.atlas.is-student.is-selected .atlas-hint-dock { display: none; }
.atlas.is-student .atlas-views .atlas-view-search {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  color: var(--ink);
}
.atlas.is-student .atlas-views .atlas-view-search input {
  width: 100%;
  min-height: 2.4rem;
  font-size: 1rem;
}
@media (min-width: 1000px) {
  .atlas.is-student.has-views.is-selected .atlas-zoom {
    left: calc(min(16.5rem, 22vw) + 1.35rem);
    right: auto;
    top: 46%;
  }
  .atlas.is-student.has-views.is-list .atlas-fallback {
    left: calc(min(16.5rem, 22vw) + 1.15rem);
    top: 4.4rem;
    width: min(22rem, calc(100vw - min(16.5rem, 22vw) - min(21rem, 32vw) - 2rem));
    max-height: calc(100% - 5.2rem);
    z-index: 6;
  }
}
@media (max-width: 900px) {
  .atlas.is-student.has-views.is-stage .atlas-copy {
    top: 2.45rem;
    left: 0.7rem;
    max-width: min(18rem, 78vw);
    width: auto;
    max-height: 4.8rem;
  }
  .atlas.is-student.has-views.is-stage .atlas-views {
    top: auto;
    left: 0.4rem;
    right: 0.4rem;
    width: auto;
    bottom: max(0.45rem, env(safe-area-inset-bottom));
    max-height: min(40vh, 14rem);
  }
  .atlas.is-student.has-views.is-stage .atlas-copy h1 {
    font-size: 1.45rem;
  }
  .atlas.is-student.has-views.is-list .atlas-view-field,
  .atlas.is-student.has-views.is-list .atlas-subject-rail,
  .atlas.is-student.has-views.is-list .atlas-view-search,
  .atlas.is-student.has-views.is-list .atlas-view-status,
  .atlas.is-student.has-views.is-list .atlas-view-note,
  .atlas.is-student.has-views.is-list .grade-nav,
  .atlas.is-student.has-views.is-list .atlas-view-reset {
    visibility: hidden;
  }
  .atlas.is-student.has-views.is-list.has-view-fallback .atlas-view-status {
    visibility: visible;
  }
  .atlas.is-student.has-views.is-list .atlas-view-list { visibility: visible; pointer-events: auto; }
  .atlas.is-student.has-views.is-list .atlas-fallback {
    left: 0.4rem;
    right: 0.4rem;
    width: auto;
    top: auto;
    bottom: 0.4rem;
    max-height: min(62vh, 28rem);
    z-index: 8;
  }
  .atlas.is-student.has-views.is-stage .atlas-card,
  .atlas.is-student.has-views.is-selected.is-stage .atlas-card {
    left: 0.45rem;
    right: 0.45rem;
    top: auto;
    bottom: 0.45rem;
    width: auto;
    height: auto;
    max-height: min(78vh, 40rem);
  }
}

figure[data-rich-figure] img {
  width: auto;
  max-width: 100%;
  height: auto;
}

dialog[data-illustration-dialog] {
  box-sizing: border-box;
  width: min(96vw, 64rem);
  max-width: min(96vw, 64rem);
  max-height: 92vh;
  overflow: hidden;
  padding: 0.6rem;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
}
dialog[data-illustration-dialog]::backdrop { background: rgba(31, 35, 40, 0.55); }
dialog[data-illustration-dialog] .math-zoom-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}
dialog[data-illustration-dialog] .math-zoom-viewport {
  overflow: auto;
  max-width: 100%;
  max-height: calc(92vh - 6.5rem);
}
dialog[data-illustration-dialog] .math-zoom-viewport img {
  display: block;
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
}

button[data-enlarge-illustration] {
  display: inline-block;
  margin: 0.35rem 0;
}

.package-digest { overflow-wrap: anywhere; }
.package-preview-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow: auto;
  max-height: 36rem;
}
