:root {
  --paper: #e9e4da;
  --card: #ffffff;
  --ink: #17211c;
  --muted: #5c675f;
  --line: #e4ddd2;
  --moss: #1e4d3d;
  --moss-deep: #14352b;
  --moss-soft: #e7f3ee;
  --clay: #d4652f;
  --header: #12261f;
  --cream: #f7f4ee;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --shadow: 0 16px 40px rgba(18, 38, 31, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }
a { color: var(--moss-deep); }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }
.skip {
  position: absolute; left: 12px; top: -40px; background: white; color: var(--header);
  padding: 8px 12px; border-radius: 8px; z-index: 20;
}
.skip:focus { top: 12px; }

.mast {
  position: sticky; top: 0; z-index: 20;
  background: var(--header);
  color: var(--cream);
  box-shadow: 0 10px 30px rgba(18, 38, 31, 0.22);
}
.mast-inner {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  min-height: 72px; padding-top: 10px; padding-bottom: 10px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: white; text-decoration: none; font-weight: 800; letter-spacing: -0.03em;
}
.mark {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--clay); color: white;
  font-family: var(--serif); font-weight: 650; font-size: 20px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}
.nav-toggle { display: none; }
.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;
}
.mast-nav, .section-nav { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.nav-codes {
  display: flex; gap: 2px; align-items: center;
  margin: 0 6px; padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}
.mast-nav a, .section-nav a {
  color: #d5e4dc; text-decoration: none; font-weight: 700; font-size: 14px;
  padding: 8px 12px; border-radius: 999px;
}
.mast-nav a:hover, .section-nav a:hover { color: white; background: rgba(255, 255, 255, 0.08); }
.mast-nav a[aria-current="page"] { background: white; color: var(--header); }
.subjects { position: relative; }
.subjects summary {
  list-style: none; cursor: pointer; color: #d5e4dc; font-weight: 700; font-size: 14px;
  padding: 8px 12px; border-radius: 999px;
}
.subjects summary::-webkit-details-marker { display: none; }
.subjects summary::after { content: " ▾"; font-size: 11px; }
.subjects[open] > summary, .subjects > summary:hover { color: white; background: rgba(255, 255, 255, 0.12); }
.subject-drop {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 220px; z-index: 30;
  background: white; border-radius: 14px; padding: 8px; box-shadow: var(--shadow);
}
.subject-branch { position: relative; }
.subject-branch > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; color: var(--ink); font-weight: 800; font-size: 14px;
  padding: 10px 12px; border-radius: 10px;
}
.subject-branch > summary::-webkit-details-marker { display: none; }
.subject-branch > summary::after { content: "▸"; color: var(--muted); font-size: 12px; }
.subject-branch > summary:hover,
.subject-branch[open] > summary { background: var(--moss-soft); color: var(--moss-deep); }
.subject-branch[open] > summary::after { content: "▾"; }
.code-menu {
  display: grid; margin: 2px 4px 6px 12px; padding-left: 8px;
  border-left: 2px solid var(--line);
}
.code-empty { margin: 6px 10px; color: var(--muted); font-size: 13px; }
.mast-nav .code-menu a {
  display: block; color: var(--ink); background: transparent; border-radius: 10px;
  padding: 8px 10px; font-size: 13px;
}
.mast-nav .code-menu a:hover,
.mast-nav .code-menu a[aria-current="page"] { background: var(--moss-soft); color: var(--moss-deep); }
.submast { background: #17362d; }
.submast .wrap { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 8px; padding-bottom: 8px; }
.submast a {
  color: #d5e4dc; text-decoration: none; font-weight: 700; font-size: 14px;
  padding: 6px 12px; border-radius: 999px;
}
.submast a:hover, .submast a[aria-current="page"] { background: rgba(255, 255, 255, 0.12); color: white; }
.staff {
  margin-left: auto; color: var(--cream); font-weight: 700; font-size: 14px; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 999px; padding: 8px 14px;
}
.staff:hover { background: white; color: var(--header); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 780px; }
.deck { padding-top: 28px; padding-bottom: 56px; }

.band {
  position: relative;
  background:
    radial-gradient(520px 220px at 100% 0%, rgba(212, 101, 47, 0.45), transparent 60%),
    radial-gradient(480px 240px at 0% 100%, rgba(255, 255, 255, 0.08), transparent 55%),
    linear-gradient(145deg, #10241d 0%, #1b4336 48%, #246350 100%);
  color: var(--cream);
  padding: 28px 0 36px;
  overflow: hidden;
}
.band::after {
  content: "";
  position: absolute; right: -80px; bottom: -90px;
  width: 280px; height: 280px; border-radius: 50%;
  border: 40px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}
.band .kicker { color: #f3b48a; }
.band h1, .band .page-title, .band .live { color: white; }
.band .lede, .band .crumbs { color: #d5e3db; }
.band .crumbs a { color: white; }
.band .page-title::after, .band h1::after { background: #e7a27a; }

.kicker {
  margin: 0 0 8px; color: #7a3412; font-size: 12px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 650; letter-spacing: -0.03em; }
.hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.85fr); gap: 36px; align-items: end; padding-top: 8px; }
.hero-home { grid-template-columns: minmax(0, 760px); }
.hero h1, .page-title { margin: 0; font-size: clamp(38px, 5vw, 60px); line-height: 1.02; }
.page-title { font-size: clamp(34px, 4vw, 52px); }
.hero h1::after, .page-title::after {
  content: ""; display: block; width: 56px; height: 4px; margin-top: 16px;
  background: var(--clay); border-radius: 99px;
}
.lede { margin: 14px 0 0; max-width: 62ch; }
.live { margin: 16px 0 0; font-weight: 700; }

.band-inner .page-head { align-items: end; }
.band-side { display: grid; justify-items: end; gap: 12px; }
.facts { display: flex; gap: 8px; }
.facts div {
  min-width: 84px; padding: 10px 12px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}
.facts strong { display: block; font-family: var(--serif); font-size: 16px; line-height: 1.2; color: white; }
.facts span { display: block; margin-top: 4px; font-size: 12px; font-weight: 700; color: #d5e3db; }

.paths { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.paths a {
  display: block; padding: 14px 16px; border-radius: 16px; text-decoration: none;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); color: white;
}
.paths a strong { display: block; font-family: var(--sans); letter-spacing: 0; font-size: 15px; }
.paths a span { display: block; color: #c9ddd4; font-size: 13px; margin-top: 2px; }
.paths a:hover { background: rgba(255, 255, 255, 0.16); }
.paths .is-here a { background: white; color: var(--header); }
.paths .is-here a span { color: var(--muted); }

.unit-nav {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: white; border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow);
}
.unit-nav a {
  padding: 16px 14px; text-decoration: none; color: inherit;
  border-right: 1px solid var(--line);
}
.unit-nav a:last-child { border-right: 0; }
.unit-nav a:hover { background: var(--moss-soft); }
.unit-nav small { display: block; color: #7a3412; font-weight: 800; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.unit-nav strong { display: block; margin-top: 4px; font-size: 15px; font-family: var(--sans); letter-spacing: 0; }
.unit-nav em { display: block; margin-top: 8px; color: var(--moss); font-style: normal; font-size: 12px; font-weight: 800; }

.pack { display: grid; gap: 42px; margin-top: 36px; }
.unit { scroll-margin-top: 92px; }
.unit-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 14px; }
.unit-head h2 { margin: 0; font-size: 34px; }
.unit-head p { margin: 6px 0 0; color: var(--muted); max-width: 62ch; }
.unit-all {
  color: white; background: var(--moss); font-weight: 800; text-decoration: none;
  white-space: nowrap; border-radius: 999px; padding: 10px 14px;
}
.unit-all:hover { background: var(--moss-deep); }

.topic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.topic-card {
  position: relative;
  display: flex; flex-direction: column; gap: 8px; min-height: 168px;
  padding: 20px 20px 16px; background: white; color: inherit; text-decoration: none;
  border-radius: 20px; box-shadow: var(--shadow);
  border-top: 4px solid var(--moss);
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px rgba(18, 38, 31, 0.12); }
.topic-card h3 { margin: 0; font-size: 26px; }
.topic-card p { margin: 0; color: var(--muted); }
.topic-meta { margin-top: auto; color: var(--moss); font-weight: 800; font-size: 13px; }
.topic-card::after { content: "→"; position: absolute; right: 18px; bottom: 16px; color: var(--clay); font-weight: 800; }
.topic-card.is-quiet { background: transparent; box-shadow: none; border: 1px dashed #c9c0b2; border-top-style: dashed; }
.topic-card.is-quiet .topic-meta, .topic-card.is-quiet::after { color: var(--muted); }

.course-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; position: relative; }
.course-panel {
  background: white; border-radius: 24px; padding: 26px; box-shadow: var(--shadow);
  border-top: 6px solid var(--clay);
}
.course-panel h2 { margin: 0 0 8px; font-size: clamp(26px, 3vw, 34px); }
.course-code { margin: 0 0 10px; font-weight: 800; color: var(--header); }
.hero-path { margin: 18px 0 0; font-weight: 700; }
.hero-course .hero-actions { margin-top: 10px; }
.course-panel p { margin: 0; color: var(--muted); }
.course-panel .live { color: var(--ink); }
.path-links { display: grid; gap: 8px; margin: 16px 0; }
.path-links a {
  display: block; padding: 12px 14px; border-radius: 14px; text-decoration: none; color: inherit;
  background: #f6f3ed; border: 1px solid transparent;
}
.path-links a:hover { border-color: #d7cfc2; background: white; }
.path-links strong { display: block; font-size: 15px; }
.path-links span { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.home-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.home-jump a {
  color: white; text-decoration: none; font-weight: 800; font-size: 14px;
  padding: 8px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.home-jump a:hover { background: white; color: var(--header); }
.trust { padding: 46px 0 10px; }
.trust-head { text-align: center; }
.trust-head h2 { margin: 0 auto; max-width: 16ch; font-size: clamp(32px, 4vw, 46px); line-height: 1.05; }
.trust-head p { margin: 12px auto 0; max-width: 52ch; color: var(--muted); }
.trust-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px; margin-top: 22px; align-items: stretch;
}
.trust-card {
  display: flex; flex-direction: column; min-height: 210px;
  padding: 18px 18px 14px; border-radius: 18px;
  background: white; color: inherit; text-decoration: none; box-shadow: var(--shadow);
}
.trust-card:hover { transform: translateY(-3px); }
.trust-card p { margin: 0; }
.trust-card footer {
  margin-top: auto; padding-top: 16px; min-height: 52px;
  display: flex; align-items: center; gap: 10px;
}
.trust-card strong { display: block; font-size: 14px; line-height: 1.25; min-height: 2.5em; }
.trust-card small { display: block; color: var(--muted); line-height: 1.2; }
.trust-dot { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; }
.trust-dot.clay { background: var(--clay); }
.trust-dot.moss { background: var(--moss); }
.trust-dot.ink { background: var(--header); }
.trust-more { text-align: center; margin: 18px 0 0; }
.trust-more a { font-weight: 800; }
.proof-head { text-align: center; }
.proof-head h2 { margin: 0; font-size: clamp(32px, 4vw, 44px); line-height: 1.1; }
.proof-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px; margin-top: 22px; align-items: stretch;
}
.proof-grid a {
  display: flex; flex-direction: column; min-height: 100%;
  background: white; color: inherit; text-decoration: none;
  border-radius: 22px; padding: 22px 22px 20px; box-shadow: var(--shadow);
  border-top: 5px solid var(--moss);
}
.proof-grid a:nth-child(2) { border-top-color: var(--clay); }
.proof-grid a:nth-child(3) { border-top-color: var(--header); }
.proof-grid a:hover { transform: translateY(-3px); }
.proof-grid b {
  display: block; font-family: var(--serif); font-weight: 650;
  font-size: 28px; line-height: 1; letter-spacing: -0.03em; color: var(--header);
}
.proof-grid h3 {
  margin: 14px 0 8px; min-height: 2.6em;
  font-family: var(--sans); font-size: 16px; line-height: 1.3;
  letter-spacing: 0; font-weight: 800;
}
.proof-grid p { margin: 0; color: var(--muted); }
.practice { background: var(--header); color: white; text-align: center; padding: 56px 0; }
.practice h2 { margin: 0 auto; max-width: 16ch; font-size: clamp(32px, 4vw, 46px); line-height: 1.05; }
.practice p { margin: 12px auto 0; max-width: 46ch; color: #d5e3db; }
.practice-actions { justify-content: center; }
.home-page { display: grid; gap: 54px; }
.home-block { scroll-margin-top: 92px; }
.home-head h2 { margin: 0; font-size: clamp(28px, 4vw, 40px); }
.home-head p:last-child { margin: 8px 0 0; color: var(--muted); max-width: 62ch; }
.set-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 18px; }
.set-col-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.set-col-head h3 { margin: 0; font-size: 22px; }
.set-col-head a { font-weight: 800; text-decoration: none; }
.set-col-head a:hover { text-decoration: underline; }
.set-grid { display: grid; gap: 8px; }
.set-scroll {
  height: 468px; overflow-y: auto; padding-right: 6px;
  scrollbar-width: thin; scrollbar-color: #c9c0b2 transparent;
}
.set-scroll::-webkit-scrollbar { width: 8px; }
.set-scroll::-webkit-scrollbar-thumb { background: #c9c0b2; border-radius: 99px; }
.set-link, .note-link {
  display: grid; gap: 2px; padding: 14px 16px; border-radius: 16px;
  background: white; color: inherit; text-decoration: none; box-shadow: var(--shadow);
}
.set-link:hover, .note-link:hover { transform: translateY(-2px); }
.set-link small, .note-link small { color: #7a3412; font-weight: 800; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.set-link strong, .note-link strong { font-size: 16px; }
.set-link span, .note-link span { color: var(--muted); font-size: 13px; }
.home-weeks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.home-weeks a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: white; border-radius: 16px; text-decoration: none; color: inherit; box-shadow: var(--shadow);
}
.home-weeks a:hover { transform: translateY(-2px); }
.home-week-no {
  width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px;
  background: var(--header); color: white; font-family: var(--serif); font-weight: 650;
}
.home-weeks strong { display: block; }
.home-weeks small { color: var(--muted); }
.note-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.paper-col, .set-columns > div { min-width: 0; }
.go {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  margin-top: 8px; padding: 12px 16px; border-radius: 14px;
  background: var(--moss); color: white; text-decoration: none; font-weight: 800;
  box-shadow: 0 8px 16px rgba(30, 77, 61, 0.2);
}
.go::after { content: "→"; }
.go:hover { background: var(--moss-deep); }
.go-small { padding: 9px 12px; }
.go-light { background: white; color: var(--header); }
.go-clay { background: var(--clay); box-shadow: 0 8px 16px rgba(212, 101, 47, 0.28); }
.go-clay:hover { background: #b65324; }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 14px; }
.crumbs a { font-weight: 800; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; }
.sheet-btn {
  border: 0; background: white; color: var(--header); border-radius: 14px;
  min-height: 44px; padding: 0 16px; font-weight: 800; cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}
.sheet-btn:hover { transform: translateY(-1px); }

.list-top { padding: 22px 0 0; }
.list-top .crumbs { color: var(--muted); }
.list-top .crumbs a { color: var(--moss-deep); }
.list-top .page-title { color: var(--ink); font-size: clamp(32px, 4vw, 44px); }
.list-top .page-title::after { display: none; }
.list-top .lede { color: var(--muted); margin-top: 6px; }
.list-top .sheet-btn { background: var(--header); color: white; box-shadow: none; }

.filters {
  display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: end;
  margin: 18px 0; padding: 14px 16px;
  background: white; border-radius: 18px; box-shadow: var(--shadow);
  position: relative;
}
.filter-label { margin: 0 0 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg a {
  text-decoration: none; color: var(--ink); font-weight: 800; font-size: 14px;
  padding: 8px 12px; border-radius: 999px; background: #f4f0e8;
}
.seg a span { color: var(--muted); font-weight: 700; margin-left: 4px; }
.seg a[aria-current="page"] { background: var(--header); color: white; }
.seg a[aria-current="page"] span { color: #f3b48a; }
.shown { margin: 0 0 8px auto; color: var(--muted); font-size: 13px; font-weight: 700; }

.q-list { display: grid; gap: 12px; width: 100%; }
.q-card {
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  width: 100%; background: white; border-radius: 18px; padding: 16px 18px;
  box-shadow: var(--shadow);
}
.q-main { min-width: 0; }
.q-facts { margin: 0 0 4px; color: var(--muted); font-size: 13px; font-weight: 700; }
.q-card h2 { margin: 0; font-size: 24px; line-height: 1.25; }
.q-card h2 a { color: inherit; text-decoration: none; }
.q-card h2 a:hover { text-decoration: underline; }
.access { margin-left: 8px; font-weight: 800; }
.access-free { color: var(--moss-deep); }
.access-paid { color: #7a3412; }
.q-card .status-form { margin: 0; min-width: 190px; }
.q-card .status-form select { max-width: none; }
.slip {
  display: block;
  width: 100%;
  background: white; border-radius: 24px;
  box-shadow: var(--shadow);
}
.slip[hidden] { display: none; }
.slip.is-tried { box-shadow: var(--shadow), inset 5px 0 0 var(--moss); }
.slip-side {
  background: linear-gradient(180deg, #f8f4ee, #efe8dc);
  padding: 20px 12px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.slip-no {
  width: 58px; height: 58px; margin: 0;
  display: grid; place-items: center;
  border-radius: 18px; background: var(--header); color: white;
  font-family: var(--serif); font-size: 20px; font-weight: 650;
  box-shadow: 0 8px 16px rgba(18, 38, 31, 0.18);
}
.slip-no::before { content: counter(slip, decimal-leading-zero); }
.slip.is-tried .slip-no { background: var(--moss); }
.slip-mark { margin: 10px 0 0; color: var(--muted); font-size: 13px; font-weight: 800; }
.tried {
  display: grid; justify-items: center; gap: 4px; margin-top: auto; padding-top: 14px;
  font-size: 12px; font-weight: 800; color: var(--muted);
}
.slip-body { display: block; width: 100%; min-width: 0; padding: 20px 22px 18px; }
.slip-meta {
  display: inline-flex; margin: 0 0 8px; color: #7a3412;
  font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
}
.slip-body h2 { margin: 0 0 8px; font-size: 28px; line-height: 1.2; max-width: none; }
.math-p { margin: 0 0 12px; max-width: 100%; overflow: visible; line-height: 1.7; }
.diagram { margin: 12px 0; max-width: 420px; background: #f7f4ee; border-radius: 12px; padding: 8px; }
.tools { margin-top: 14px; }
.reveal { border-radius: 14px; background: #f6f3ed; padding: 0 14px; }
.reveal[open] { background: #f8fbf9; }
.reveal summary { cursor: pointer; font-weight: 800; color: var(--moss-deep); padding: 12px 0; list-style: none; }
.reveal summary::-webkit-details-marker { display: none; }
.reveal summary::before { content: "▸ "; color: var(--clay); }
.reveal[open] summary::before { content: "▾ "; }
.reveal-body { padding-bottom: 14px; }
.solution-panel {
  margin-top: 14px; padding: 16px 18px 8px;
  background: #f6f3ed; border-radius: 14px;
}
.solution-panel[hidden] { display: none; }
.solution-label, .answer-label {
  margin: 0 0 8px; font-size: 12px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; color: #7a3412;
}
.answer {
  background: white; border-radius: 12px; padding: 12px 14px; margin: 8px 0 12px;
  border: 1px solid var(--line); border-left: 4px solid var(--moss);
}
.answer .math-p:last-child { margin-bottom: 0; }
.empty { color: var(--muted); background: white; border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow); }

.weeks, .notes, .mock-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.weeks li, .notes li, .mock-list li {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  background: white; border-radius: 20px; padding: 18px; box-shadow: var(--shadow);
}
.week-no {
  width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px;
  background: var(--header); color: white; font-family: var(--serif); font-size: 20px; font-weight: 650;
}
.weeks h2, .notes h2, .later h2 { margin: 0 0 4px; font-size: 26px; }
.weeks p, .notes p, .mock-list span, .later > p { margin: 0; color: var(--muted); }
.notes li { grid-template-columns: 1fr auto; align-items: center; }
.notes li .kicker { grid-column: 1 / -1; margin-bottom: 0; }
.later { margin-top: 36px; }
.later h2 { font-size: 30px; }
.mock-list { margin-top: 14px; }
.mock-list li { grid-template-columns: 160px minmax(0, 1fr); }
.mock-list strong { font-family: var(--sans); }
.mock-papers { display: flex; flex-wrap: wrap; gap: 6px 16px; }

.reading {
  background: white; border-radius: 24px; padding: 8px 28px 28px; box-shadow: var(--shadow); margin-top: -36px;
}
.account-wrap { max-width: 560px; }
.account-card { max-width: 560px; margin-left: auto; margin-right: auto; padding-top: 22px; }
.account-form { display: grid; gap: 14px; margin-top: 4px; }
.account-form label { display: grid; gap: 6px; font-weight: 800; font-size: 14px; }
.account-form input {
  width: 100%; border: 1px solid var(--line); background: #fbfaf7; border-radius: 12px;
  min-height: 46px; padding: 10px 12px; font: inherit; font-weight: 500; color: var(--ink);
}
.account-form input:focus { outline: 2px solid var(--moss); border-color: transparent; }
.account-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.account-form .go { justify-self: start; margin-top: 2px; }
.prose { font-family: var(--serif); font-size: 20px; line-height: 1.6; font-weight: 500; }
.prose p { margin: 18px 0; }
.narrow .go { margin-top: 8px; }

.site-foot {
  background: var(--header); color: #d5e4dc; padding: 36px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.foot-grid {
  display: grid; grid-template-columns: minmax(240px, 1.3fr) minmax(220px, 1fr) minmax(160px, 0.8fr);
  gap: 28px 32px; align-items: start;
}
.foot-brand { margin: 0 0 8px; color: white; font-family: var(--serif); font-size: 24px; font-weight: 650; }
.foot-label { margin: 0 0 10px; color: #f3b48a; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.foot-links a { display: block; color: white; text-decoration: none; font-weight: 700; margin: 0 0 8px; }
.foot-links a:hover { color: #f3b48a; }
.foot-course small {
  display: block; margin-top: 2px; color: #d5e4dc; font-size: 13px; font-weight: 600; line-height: 1.35;
}
.foot-course:hover small { color: #f3b48a; }
.site-foot p { margin: 0; max-width: 36ch; line-height: 1.5; }
.foot-address, .foot-support { margin-top: 12px; }
.foot-address { max-width: 34ch; }
.foot-support a { color: white; font-weight: 700; text-decoration: none; white-space: nowrap; }
.foot-support a:hover { color: #f3b48a; }
.keep { white-space: nowrap; }
.foot-support a { display: inline; margin: 0; font-weight: 700; }
.address-card .support-line { margin-top: 12px; }
.address-card a { font-weight: 800; }

dialog {
  border: 0; border-radius: 22px; padding: 8px 8px 18px; width: min(560px, calc(100% - 24px));
  background: white; color: var(--ink);
  box-shadow: 0 24px 60px rgba(18, 38, 31, 0.28);
}
dialog::backdrop { background: rgba(18, 38, 31, 0.55); }
.dialog-bar { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 12px 0; }
.dialog-bar h2 { margin: 0; font-size: 24px; }
dialog .sheet-btn { background: var(--header); color: white; box-shadow: none; }
.formula-list { list-style: none; margin: 12px 0 0; padding: 0 12px; display: grid; gap: 14px; }
.formula-list li { background: #f6f3ed; border-radius: 14px; padding: 12px 14px; }
.formula-list p { margin: 0 0 4px; font-weight: 800; font-size: 14px; }

.about-page { display: grid; gap: 22px; }
.about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
.about-grid article, .contact-card, .contact-aside {
  background: white; border-radius: 22px; padding: 22px; box-shadow: var(--shadow);
}
.about-grid h2, .contact-card h2, .contact-aside h2 { margin: 0 0 8px; font-size: 26px; }
.about-grid p, .contact-aside p, .contact-card p { margin: 0; color: var(--muted); }
.about-how { margin-top: 0; }
.about-how h2 { margin: 0 0 8px; font-size: 32px; }
.legal-body h2 { margin: 26px 0 0; font-size: 28px; }
.legal-body p { margin: 10px 0 0; }
.legal-body ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.legal-updated { margin: 18px 0 0; color: var(--muted); font-size: 14px; font-weight: 700; }
.about-how ol { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 16px; }
.contact-form .span-2, .contact-form .go { grid-column: 1 / -1; }
.contact-form label { display: grid; gap: 6px; font-weight: 800; font-size: 14px; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; border: 1px solid var(--line); background: #fbfaf7; border-radius: 12px;
  min-height: 46px; padding: 10px 12px; font: inherit; font-weight: 500; color: var(--ink);
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: 2px solid var(--moss); border-color: transparent;
}
.contact-form small { color: #7a3412; font-weight: 700; }
.contact-form .go { border: 0; cursor: pointer; }
.contact-aside { display: grid; align-content: start; gap: 8px; }
.contact-aside a { font-weight: 800; text-decoration: none; }
.contact-aside a:hover { text-decoration: underline; }

@media (max-width: 980px) {
  .hero, .course-grid, .topic-grid, .tools, .foot-grid, .set-columns, .note-grid, .about-grid, .contact-form, .proof-grid { grid-template-columns: 1fr; }
  .trust-row { grid-template-columns: 1fr 1fr; }
  .contact-form .span-2, .contact-form .go { grid-column: auto; }
  .mast-nav { border-right: 0; padding-right: 0; }
  .unit-nav { grid-template-columns: 1fr 1fr; }
  .unit-nav a { border-bottom: 1px solid var(--line); }
  .unit-nav a:nth-child(2n) { border-right: 0; }
  .band-side, .page-head { display: block; }
  .facts { margin-top: 16px; }
  .course-grid { margin-top: 0; }
}
@media (max-width: 860px) {
  .mast-inner { flex-wrap: nowrap; min-height: 64px; }
  .nav-toggle {
    display: grid; place-items: center; margin-left: auto;
    width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px;
    background: transparent; color: white; cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 18px; height: 2px; border-radius: 2px; background: white;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after {
    content: ""; position: absolute; left: 0;
  }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .mast.is-open .nav-toggle-bars { background: transparent; }
  .mast.is-open .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
  .mast.is-open .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }
  .mast-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    margin: 0; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 8px 16px 16px; background: var(--header);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.22);
  }
  .mast.is-open .mast-nav { display: flex; }
  .mast-nav > a, .subjects { width: 100%; }
  .mast-nav > a, .subjects summary {
    display: flex; align-items: center; min-height: 44px; border-radius: 12px;
  }
  .subjects summary { width: 100%; }
  .subject-drop {
    position: static; min-width: 0; margin: 4px 0 8px;
    box-shadow: none;
  }
  .submast { padding-left: 0; padding-right: 0; }
  .submast .wrap { justify-content: flex-start; }
}
@media (max-width: 720px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .account-pair { grid-template-columns: 1fr; }
  .trust-row { grid-template-columns: 1fr; }
  .staff { margin-left: 0; }
  .unit-head { display: block; }
  .unit-all { display: inline-block; margin-top: 10px; }
  .slip { display: block; width: 100%; }
  .slip-side {
    flex-direction: row; justify-content: space-between; gap: 12px;
    padding: 14px 16px;
  }
  .slip-mark, .tried { margin: 0; padding-top: 0; }
  .tried { grid-auto-flow: column; align-items: center; }
  .weeks li, .mock-list li, .notes li { grid-template-columns: 1fr; }
  .shown { margin-left: 0; }
  .filters { margin-top: 0; }
  .reading { margin-top: 0; }
  .q-nav, .dash { grid-template-columns: 1fr; }
  .pager { justify-content: flex-start; }
}

.exam-year { margin: 10px 0 0; color: #f3b48a; font-weight: 800; font-size: 13px; letter-spacing: 0.04em; }
.foot-quiet { font-weight: 600; font-size: 13px; }
.meta-row { display: flex; flex-flow: row wrap; align-items: center; gap: 6px; width: 100%; margin: 0 0 12px; }
.chip {
  display: inline-flex; align-items: center; width: auto; flex: 0 0 auto; white-space: nowrap;
  min-height: 28px; padding: 2px 10px;
  border-radius: 999px; background: #f4f0e8; color: var(--ink);
  font-size: 13px; font-weight: 800;
}
.chip-free { background: var(--moss-soft); color: var(--moss-deep); }
.chip-paid { background: #f8e7df; color: #7a3412; }
.slip h2 a { color: inherit; text-decoration: none; display: inline; }
.slip h2 a:hover { text-decoration: underline; }
.slip-id { margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.slip-single { grid-template-columns: 1fr; }
.sign-note, .hint { color: var(--ink); }
.hint.warn { color: #7a3412; font-weight: 800; }
.status-form, .report form, .working-label { display: grid; gap: 8px; margin-top: 14px; }
.status-form label, .report label, .working-label { font-weight: 800; font-size: 14px; }
.status-form select, .report textarea, .working-label textarea {
  width: 100%; max-width: 420px; border: 1px solid var(--line); background: #fbfaf7;
  border-radius: 12px; min-height: 44px; padding: 8px 12px; font: inherit;
}
.working-label textarea { max-width: none; min-height: 120px; }
.field-btn {
  border: 0; border-radius: 12px; min-height: 44px; padding: 0 16px;
  background: var(--header); color: white; font-weight: 800; cursor: pointer; width: auto;
}
.field-btn:hover { background: var(--moss-deep); }
.q-read .status-form {
  display: flex; flex-wrap: wrap; align-items: end; gap: 10px;
  margin-top: 22px; max-width: 560px;
}
.q-read .status-form label { display: grid; gap: 6px; flex: 1 1 240px; margin: 0; }
.q-read .status-form select { width: 100%; max-width: none; background: white; }
.report {
  margin-top: 22px;
  max-width: 520px;
}
.report summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  cursor: pointer;
  font-weight: 800;
  color: var(--moss-deep);
  background: var(--moss-soft);
  border-radius: 12px;
  min-height: 40px;
  padding: 0 14px;
}
.report summary::-webkit-details-marker { display: none; }
.report summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  margin-top: -3px;
}
.report[open] summary::before { transform: rotate(45deg); margin-top: 2px; }
.report-panel {
  margin-top: 12px;
  background: #f6f3ed;
  border-radius: 16px;
  padding: 16px;
}
.report-note { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.report-note-ok { color: var(--moss-deep); font-weight: 800; }
.report form {
  display: grid;
  gap: 12px;
  margin: 0;
  max-width: none;
}
.report label {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}
.report textarea {
  width: 100%;
  max-width: none;
  min-height: 108px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  resize: vertical;
}
.report form .field-btn { justify-self: start; margin: 0; }
.q-nav, .pager {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center;
  margin-top: 16px;
}
.q-nav a, .pager a { font-weight: 800; }
.locked {
  background: #f8f4ee; border-radius: 16px; padding: 16px 18px; margin: 8px 0 16px;
}
.locked h2 { margin: 0 0 8px; font-size: 28px; }
.part-label { margin: 12px 0 6px; font-weight: 800; }
.working-saved { white-space: pre-wrap; background: #f6f3ed; border-radius: 12px; padding: 12px 14px; }
.dash { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash section, .dash-continue {
  background: white; border-radius: 20px; padding: 18px 20px; box-shadow: var(--shadow);
}
.dash h2 { margin: 0 0 8px; font-size: 28px; }
.dash-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dash-list a { display: block; text-decoration: none; color: inherit; padding: 8px 0; border-bottom: 1px solid var(--line); }
.dash-list strong { display: block; }
.dash-list span { color: var(--muted); font-size: 13px; }
.demo-accounts { margin-top: 18px; }
.demo-accounts ul { margin: 8px 0 0; padding-left: 18px; }
.formula-jump { margin-top: 18px; }
mjx-container { max-width: 100%; overflow: visible; }
.diagram img { width: 100%; height: auto; }
@media (max-width: 720px) {
  .dash, .q-nav { grid-template-columns: 1fr; }
  .nav-codes { border-left: 0; margin: 0; padding-left: 0; }
  .q-card { display: block; }
  .q-card .status-form { margin-top: 12px; }
  .filters { margin-top: 16px; }
}

.paper-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
}
.paper-head .page-title { font-size: clamp(32px, 4vw, 46px); }
.paper-stats {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: none;
}
.paper-stats li {
  min-width: 108px;
  margin: 0;
  padding: 12px 14px 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
}
.paper-stats strong {
  display: block;
  color: white;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.paper-stats span {
  display: block;
  margin-top: 4px;
  color: #d5e3db;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.paper { display: grid; gap: 14px; }
.paper-save {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  min-height: 52px;
  padding: 12px 16px;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow);
  color: var(--moss-deep);
  font-weight: 700;
}
.paper-save::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--moss);
}
.paper-questions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.paper-q {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: stretch;
  background: white;
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.paper-q-no {
  display: grid;
  place-items: start center;
  padding-top: 24px;
  background: linear-gradient(180deg, #f8f4ee, #efe8dc);
  color: var(--header);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 650;
}
.paper-q-body { min-width: 0; padding: 22px 26px 20px; }
.paper-q-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.paper-q-head h2 { margin: 0; font-size: 28px; line-height: 1.2; }
.paper-q-head .chip { margin-top: 6px; flex: none; }
.paper-q-meta {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.paper-q .part-label { margin: 14px 0 6px; }
.paper-q .working-label { margin-top: 16px; }
.paper-q .working-label textarea {
  width: 100%;
  max-width: none;
  min-height: 132px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfaf7;
  resize: vertical;
  line-height: 1.5;
}
.paper-q .working-label textarea:focus {
  outline: 2px solid var(--moss);
  border-color: transparent;
  background: white;
}
.paper-q .working-saved { margin: 0; }
.choices {
  margin: 16px 0 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 8px;
}
.choices legend {
  margin-bottom: 4px;
  font-weight: 800;
}
.choice {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  cursor: pointer;
}
.choice:has(input:checked) {
  border-color: var(--moss);
  background: var(--moss-soft);
}
.choice input { margin-top: 4px; accent-color: var(--moss); }
.choice-mark { font-weight: 800; }
.choice-copy .math-p { margin: 0; }
.choice-cards {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.choice-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.choice-card em { grid-column: 2; font-style: normal; font-size: 13px; font-weight: 800; color: var(--muted); }
.choice-card.is-answer { border-color: var(--moss); background: var(--moss-soft); }
.choice-card.is-answer em { color: var(--moss-deep); }
.choice-card.is-yours:not(.is-answer) { border-color: var(--clay); }
.choice-card.is-yours:not(.is-answer) em { color: var(--clay); }
.result-flag { margin: 0 0 8px; font-weight: 800; }
.result-flag.is-right { color: var(--moss-deep); }
.result-flag.is-wrong { color: var(--clay); }
.paper-q .answer { margin-top: 12px; }
.paper-q-link { margin: 14px 0 0; }
.paper-q-link a { font-weight: 800; text-decoration: none; }
.paper-q-link a:hover { text-decoration: underline; }
.paper-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 14px 18px;
  background: white;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.paper-actions a:not(.go) { font-weight: 800; text-decoration: none; }
.paper-actions a:not(.go):hover { text-decoration: underline; }
.paper-actions .go, .weeks .go { margin-top: 0; border: 0; cursor: pointer; }
.week-state {
  justify-self: end;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
@media (max-width: 720px) {
  .paper-head { display: block; }
  .paper-stats { margin-top: 18px; flex-wrap: wrap; }
  .paper-stats li { flex: 1 1 96px; }
  .paper-q { grid-template-columns: 1fr; }
  .paper-q-no {
    place-items: center start;
    padding: 16px 18px 0;
    background: transparent;
  }
  .paper-q-body { padding: 8px 18px 18px; }
  .paper-q-head { display: block; }
  .paper-q-head .chip { margin: 10px 0 0; }
  .paper-actions { flex-direction: column-reverse; align-items: stretch; }
  .paper-actions .go { justify-content: center; }
}
