:root {
  color-scheme: light;
  --ink: #18231f;
  --ink-soft: #4b5a54;
  --paper: #f6f2e9;
  --surface: #fffdf8;
  --surface-muted: #ece7dc;
  --line: #d7d0c2;
  --forest: #145c4b;
  --forest-dark: #0c4437;
  --forest-soft: #e4eee9;
  --amber: #b85d14;
  --amber-soft: #f7e5d2;
  --correct: #17663d;
  --correct-soft: #e1f2e8;
  --incorrect: #a33a31;
  --incorrect-soft: #f8e5e2;
  --focus: #1d6ea8;
  --sidebar-width: 272px;
  --topbar-height: 72px;
  --shadow: 0 12px 32px rgb(24 35 31 / 14%);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-synthesis: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.72;
}

button,
input {
  font: inherit;
}

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--forest-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--amber);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: #fff;
  background: var(--forest-dark);
  border-radius: 6px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow-y: auto;
  color: #f8fbf9;
  background: var(--forest-dark);
  border-right: 1px solid rgb(255 255 255 / 10%);
}

.brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 24px 24px;
  border-bottom: 1px solid rgb(255 255 255 / 13%);
}

.brand__link {
  display: grid;
  color: #fff;
  text-decoration: none;
  line-height: 1.12;
}

.brand__link:hover {
  color: #fff;
}

.brand__eyebrow,
.eyebrow,
.topbar__kicker,
.nav-label,
.section-kicker,
.stat-label {
  color: var(--amber);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.brand strong {
  margin-top: 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  letter-spacing: -.03em;
}

.brand__link > span:last-child {
  margin-top: 7px;
  color: rgb(255 255 255 / 68%);
  font-size: .82rem;
}

.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.icon-button:hover {
  background: rgb(255 255 255 / 10%);
  border-color: rgb(255 255 255 / 20%);
}

.sidebar__close,
.menu-button {
  display: none;
}

.chapter-nav {
  padding: 24px 14px;
}

.nav-label {
  margin: 0 10px 10px;
  color: #d8ac7f;
}

.chapter-nav ol {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chapter-link {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 8px;
  min-height: 44px;
  align-items: center;
  padding: 8px 10px;
  color: rgb(255 255 255 / 75%);
  border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.chapter-link:hover {
  color: #fff;
  background: rgb(255 255 255 / 7%);
}

.chapter-link[aria-current="page"] {
  color: #fff;
  background: rgb(255 255 255 / 11%);
  border-left-color: #e5a461;
}

.chapter-link__number,
.chapter-link__progress {
  color: rgb(255 255 255 / 50%);
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
}

.chapter-link__name {
  font-size: .88rem;
  font-weight: 620;
  line-height: 1.25;
}

.sidebar-progress {
  margin-top: auto;
  padding: 20px 24px 24px;
  border-top: 1px solid rgb(255 255 255 / 13%);
}

.progress-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: .82rem;
}

.progress-track {
  height: 6px;
  margin: 9px 0 14px;
  overflow: hidden;
  background: rgb(255 255 255 / 15%);
  border-radius: 99px;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: #e5a461;
  transition: width 220ms ease;
}

.text-button {
  min-height: 38px;
  padding: 0;
  color: rgb(255 255 255 / 62%);
  background: none;
  border: 0;
  cursor: pointer;
  font-size: .76rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-button:hover {
  color: #fff;
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  gap: 16px;
  padding: 10px 32px;
  background: rgb(246 242 233 / 94%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar__title {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.topbar__title strong {
  overflow: hidden;
  font-size: .92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__kicker {
  color: var(--ink-soft);
  font-size: .62rem;
}

.search-trigger {
  display: flex;
  min-width: 270px;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 0 12px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.search-trigger:hover {
  border-color: var(--forest);
  box-shadow: 0 3px 12px rgb(24 35 31 / 8%);
}

kbd {
  margin-left: auto;
  padding: 1px 7px;
  color: var(--ink-soft);
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: inherit;
  font-size: .72rem;
}

#main-content {
  min-height: calc(100vh - var(--topbar-height));
}

.loading-state {
  width: min(820px, calc(100% - 48px));
  margin: 0 auto;
  padding: 80px 0;
  color: var(--ink-soft);
}

.page {
  width: min(100%, 1220px);
  margin: 0 auto;
  padding: 64px clamp(24px, 6vw, 84px) 96px;
}

.page--reading {
  display: grid;
  grid-template-columns: minmax(0, 820px) minmax(170px, 208px);
  gap: clamp(42px, 6vw, 84px);
  justify-content: center;
}

.reading-column {
  min-width: 0;
}

.page-header {
  margin-bottom: 48px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.page-header h1,
.home-hero h1,
.simulator-intro h1,
.results-header h1 {
  max-width: 760px;
  margin: 8px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.page-header__lead,
.home-hero__lead {
  max-width: 680px;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1.03rem, 1.6vw, 1.2rem);
}

.page-actions,
.dialog-actions,
.quiz-actions,
.simulator-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  color: #fff;
  background: var(--forest);
  border: 1px solid var(--forest);
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.button:hover {
  color: #fff;
  background: var(--forest-dark);
  border-color: var(--forest-dark);
}

.button:active {
  transform: translateY(1px);
}

.button:disabled {
  color: #7a817d;
  background: #e5e3de;
  border-color: #d7d4cd;
  cursor: not-allowed;
}

.button--quiet {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.button--quiet:hover {
  color: var(--forest-dark);
  background: var(--forest-soft);
  border-color: var(--forest);
}

.button--danger {
  background: var(--incorrect);
  border-color: var(--incorrect);
}

.button--danger:hover {
  background: #812d27;
  border-color: #812d27;
}

.button--amber {
  color: #25160b;
  background: #e7a15d;
  border-color: #d68b45;
}

.button--amber:hover {
  color: #1e130a;
  background: #d98d45;
  border-color: #c87831;
}

.tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 32px;
  padding: 4px;
  background: var(--surface-muted);
  border-radius: 8px;
}

.tab {
  min-height: 42px;
  padding: 8px 16px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 680;
}

.tab[aria-selected="true"] {
  color: var(--forest-dark);
  background: var(--surface);
  box-shadow: 0 1px 4px rgb(24 35 31 / 9%);
}

.markdown-body {
  min-width: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
  scroll-margin-top: calc(var(--topbar-height) + 24px);
}

.markdown-body h1 {
  display: none;
}

.markdown-body h2 {
  margin: 60px 0 18px;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  letter-spacing: -.025em;
}

.markdown-body h3 {
  margin: 42px 0 14px;
  font-size: clamp(1.28rem, 2.2vw, 1.7rem);
}

.markdown-body h4 {
  margin: 32px 0 10px;
  font-size: 1.08rem;
}

.markdown-body p,
.markdown-body li {
  max-width: 76ch;
}

.markdown-body p {
  margin: 0 0 1.15em;
}

.markdown-body ul,
.markdown-body ol {
  margin: 0 0 1.3em;
  padding-left: 1.45em;
}

.markdown-body li + li {
  margin-top: .28em;
}

.markdown-body hr {
  margin: 48px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.markdown-body blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  color: #593419;
  background: var(--amber-soft);
  border-left: 4px solid var(--amber);
}

.markdown-body blockquote p:last-child {
  margin-bottom: 0;
}

.markdown-body code {
  padding: .12em .34em;
  overflow-wrap: anywhere;
  color: #7f321f;
  background: #efe8dc;
  border: 1px solid #e3d8c7;
  border-radius: 4px;
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  font-size: .9em;
}

.markdown-body pre {
  max-width: 100%;
  margin: 24px 0;
  padding: 20px;
  overflow: auto;
  color: #eff6f2;
  background: #17241f;
  border-radius: 8px;
  line-height: 1.55;
  tab-size: 2;
}

.markdown-body pre code {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
}

.table-wrap {
  max-width: 100%;
  margin: 28px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.markdown-body table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: var(--surface);
  font-size: .91rem;
  line-height: 1.45;
}

.markdown-body th,
.markdown-body td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  color: var(--forest-dark);
  background: var(--forest-soft);
  font-size: .78rem;
  letter-spacing: .02em;
}

.markdown-body tr:last-child td {
  border-bottom: 0;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-left: -1.25em;
  list-style: none;
}

.check-item input {
  width: 19px;
  height: 19px;
  margin-top: 5px;
  accent-color: var(--forest);
}

.check-item label {
  cursor: pointer;
}

.check-item input:checked + label {
  color: var(--ink-soft);
  text-decoration: line-through;
}

.local-toc {
  position: sticky;
  top: calc(var(--topbar-height) + 28px);
  max-height: calc(100vh - var(--topbar-height) - 56px);
  overflow-y: auto;
  align-self: start;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.local-toc p {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.local-toc ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.local-toc a {
  display: block;
  color: var(--ink-soft);
  font-size: .78rem;
  line-height: 1.35;
  text-decoration: none;
}

.local-toc a:hover {
  color: var(--forest);
}

.home-page {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0 96px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: clamp(40px, 8vw, 100px);
  align-items: end;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--line);
}

.home-hero__notice {
  padding: 22px;
  background: var(--amber-soft);
  border-top: 4px solid var(--amber);
}

.home-hero__notice strong {
  display: block;
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
}

.home-hero__notice p {
  margin: 0;
  color: #684124;
  font-size: .9rem;
  line-height: 1.55;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.home-stats > div {
  padding: 0 24px;
  border-right: 1px solid var(--line);
}

.home-stats > div:first-child {
  padding-left: 0;
}

.home-stats > div:last-child {
  border-right: 0;
}

.home-stats dt {
  color: var(--ink-soft);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.home-stats dd {
  margin: 5px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 700;
}

.continue-panel {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
  margin: 48px 0 60px;
  padding: 24px 28px;
  color: #fff;
  background: var(--forest-dark);
}

.continue-panel h2 {
  margin: 0 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
}

.continue-panel p {
  margin: 0;
  color: rgb(255 255 255 / 72%);
  font-size: .9rem;
}

.route-section h2,
.practice-header h2,
.results-header h2 {
  margin: 8px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.15;
}

.study-route {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: route;
  border-top: 1px solid var(--line);
}

.study-route li {
  counter-increment: route;
  border-bottom: 1px solid var(--line);
}

.route-link {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 20px;
  min-height: 84px;
  align-items: center;
  padding: 14px 8px;
  color: var(--ink);
  text-decoration: none;
  transition: padding 180ms ease, background-color 180ms ease;
}

.route-link::before {
  content: counter(route, decimal-leading-zero);
  color: var(--amber);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.route-link:hover {
  padding-right: 16px;
  padding-left: 16px;
  color: var(--forest-dark);
  background: var(--surface);
}

.route-link strong,
.route-link span {
  display: block;
}

.route-link strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.route-link span {
  color: var(--ink-soft);
  font-size: .82rem;
}

.route-status {
  color: var(--ink-soft);
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}

.practice-view {
  max-width: 880px;
}

.practice-header {
  margin-bottom: 32px;
}

.practice-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 18px;
  align-items: center;
  margin: 24px 0 32px;
}

.practice-progress .progress-track {
  grid-column: 1 / -1;
  margin: 0;
  background: var(--surface-muted);
}

.practice-progress .progress-track span {
  background: var(--forest);
}

.quiz-card {
  margin: 0 0 28px;
  padding: clamp(20px, 4vw, 34px);
  scroll-margin-top: calc(var(--topbar-height) + 20px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--amber);
}

.quiz-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 16px;
  color: var(--ink-soft);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.quiz-card fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.quiz-card legend {
  width: 100%;
  margin: 0 0 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 2.3vw, 1.55rem);
  font-weight: 700;
  line-height: 1.38;
}

.question-context {
  margin-bottom: 22px;
  padding: 18px 20px;
  color: var(--ink-soft);
  background: var(--paper);
  border-left: 3px solid var(--line);
  font-size: .92rem;
}

.option-list {
  display: grid;
  gap: 10px;
}

.option-row {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  min-height: 52px;
  align-items: center;
  padding: 11px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.option-row:hover {
  border-color: #93a29b;
}

.option-row:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.option-row:has(input:checked) {
  background: var(--forest-soft);
  border-color: var(--forest);
}

.option-row input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--forest);
}

.option-row__letter {
  font-weight: 800;
}

.option-row.is-correct {
  background: var(--correct-soft);
  border-color: var(--correct);
}

.option-row.is-incorrect {
  background: var(--incorrect-soft);
  border-color: var(--incorrect);
}

.answer-feedback {
  margin-top: 22px;
  padding: 18px 20px;
  scroll-margin-top: calc(var(--topbar-height) + 20px);
  border-left: 4px solid var(--correct);
}

.answer-feedback.is-incorrect {
  background: var(--incorrect-soft);
  border-left-color: var(--incorrect);
}

.answer-feedback.is-correct {
  background: var(--correct-soft);
}

.answer-feedback strong {
  display: block;
  margin-bottom: 6px;
}

.answer-feedback p:last-child {
  margin-bottom: 0;
}

.answer-review {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.answer-review__choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 12px;
}

.answer-review__choice {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink-soft);
}

.answer-review__choice--correct {
  background: var(--correct-soft);
  border-left-color: var(--correct);
}

.answer-review__choice > span {
  display: block;
  color: var(--ink-soft);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.answer-review__choice > strong {
  display: block;
  margin: 5px 0 0;
  line-height: 1.5;
}

.answer-review__letter {
  display: inline;
  color: var(--forest-dark);
}

.answer-review__explanation {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.answer-review__explanation h3 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
}

.answer-review__explanation .markdown-body p:last-child {
  margin-bottom: 0;
}

.simulator-intro {
  max-width: 820px;
  padding: 12px 0 24px;
}

.simulator-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 32px 0;
  border-block: 1px solid var(--line);
}

.simulator-facts div {
  padding: 18px;
  border-right: 1px solid var(--line);
}

.simulator-facts div:last-child {
  border-right: 0;
}

.simulator-facts strong,
.simulator-facts span {
  display: block;
}

.simulator-facts strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
}

.simulator-facts span {
  color: var(--ink-soft);
  font-size: .8rem;
}

.simulator-toolbar {
  position: sticky;
  z-index: 10;
  top: calc(var(--topbar-height) + 12px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 24px;
  margin: 0 0 24px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 4px 18px rgb(24 35 31 / 8%);
}

.simulator-toolbar .progress-track {
  grid-column: 1 / -1;
  margin: 0;
  background: var(--surface-muted);
}

.question-map {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 20px 0 28px;
}

.question-map button {
  min-width: 44px;
  min-height: 44px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
}

.question-map button.is-answered {
  color: #fff;
  background: var(--forest);
  border-color: var(--forest);
}

.question-map button[aria-current="step"] {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

.results-summary {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 36px;
  align-items: center;
  margin: 30px 0 42px;
  padding: 28px;
  color: #fff;
  background: var(--forest-dark);
}

.score-orb {
  display: grid;
  width: 160px;
  height: 160px;
  place-items: center;
  border: 2px solid rgb(255 255 255 / 40%);
  border-radius: 50%;
}

.score-orb > div {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}

.score-orb strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.7rem;
  line-height: 1;
}

.score-orb span {
  display: block;
  color: rgb(255 255 255 / 70%);
  font-size: .72rem;
  text-transform: uppercase;
}

.breakdown-list {
  display: grid;
  gap: 9px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.breakdown-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgb(255 255 255 / 18%);
}

.review-list {
  display: grid;
  gap: 14px;
}

.review-item {
  padding: 20px;
  background: var(--surface);
  border-left: 4px solid var(--incorrect);
}

.review-item.is-correct {
  border-left-color: var(--correct);
}

.search-dialog,
.confirm-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.search-dialog::backdrop,
.confirm-dialog::backdrop {
  background: rgb(12 32 26 / 55%);
  backdrop-filter: blur(2px);
}

.search-dialog__frame,
.confirm-dialog form {
  margin: 0;
  padding: 24px;
}

.search-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.search-dialog h2,
.confirm-dialog h2 {
  margin: 3px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
}

.search-dialog .icon-button,
.confirm-dialog .icon-button {
  color: var(--ink);
}

.search-dialog .icon-button:hover,
.confirm-dialog .icon-button:hover {
  background: var(--surface-muted);
  border-color: var(--line);
}

.search-field {
  display: grid;
  grid-template-columns: 28px 1fr;
  min-height: 52px;
  align-items: center;
  padding: 0 14px;
  border: 2px solid var(--forest);
  border-radius: 7px;
}

.search-field input {
  width: 100%;
  height: 48px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.search-results {
  min-height: 140px;
  max-height: 470px;
  margin-top: 18px;
  overflow-y: auto;
}

.search-hint,
.empty-state {
  padding: 28px 10px;
  color: var(--ink-soft);
  text-align: center;
}

.search-result {
  display: block;
  padding: 14px 12px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.search-result:hover {
  color: var(--ink);
  background: var(--forest-soft);
}

.search-result strong,
.search-result span,
.search-result small {
  display: block;
}

.search-result small {
  color: var(--amber);
  font-weight: 700;
  text-transform: uppercase;
}

.search-result span {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: .84rem;
  line-height: 1.45;
}

mark {
  color: inherit;
  background: #f3d3a9;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 32px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-size: .74rem;
}

.site-footer p {
  margin: 0;
}

.sr-live {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 1279px) {
  .page--reading {
    display: block;
    max-width: 900px;
  }

  .local-toc {
    display: none;
  }
}

@media (max-width: 1023px) {
  .sidebar {
    transform: translateX(-105%);
    box-shadow: var(--shadow);
    transition: transform 220ms ease;
  }

  body.menu-open {
    overflow: hidden;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .sidebar__close,
  .menu-button {
    display: inline-grid;
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 25;
    inset: 0;
    background: rgb(12 32 26 / 50%);
  }

  .workspace {
    margin-left: 0;
  }

  .menu-button {
    flex: 0 0 auto;
    color: var(--ink);
  }

  .menu-button:hover {
    background: var(--surface-muted);
    border-color: var(--line);
  }
}

@media (max-width: 767px) {
  body {
    font-size: 16px;
    line-height: 1.65;
  }

  .topbar {
    min-height: 64px;
    padding: 8px 14px;
  }

  .topbar__kicker,
  .search-trigger > span:not(:first-child),
  .search-trigger kbd {
    display: none;
  }

  .search-trigger {
    min-width: 44px;
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .page {
    padding: 38px 20px 72px;
  }

  .page-header {
    margin-bottom: 30px;
    padding-bottom: 24px;
  }

  .page-header h1,
  .home-hero h1,
  .simulator-intro h1,
  .results-header h1 {
    font-size: clamp(2.05rem, 11vw, 3.1rem);
  }

  .home-page {
    width: calc(100% - 40px);
    padding: 42px 0 72px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 42px;
  }

  .home-stats {
    grid-template-columns: 1fr 1fr;
  }

  .home-stats > div {
    padding: 16px;
    border-bottom: 1px solid var(--line);
  }

  .home-stats > div:nth-child(2) {
    border-right: 0;
  }

  .home-stats > div:nth-child(n + 3) {
    border-bottom: 0;
  }

  .home-stats > div:first-child {
    padding-left: 16px;
  }

  .continue-panel {
    align-items: stretch;
    flex-direction: column;
    margin: 36px 0 48px;
    padding: 22px;
  }

  .route-link {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
  }

  .route-status {
    grid-column: 2;
  }

  .tabs {
    overflow-x: auto;
  }

  .tab {
    flex: 1 0 auto;
  }

  .markdown-body h2 {
    margin-top: 46px;
  }

  .markdown-body pre {
    padding: 16px;
    font-size: .82rem;
  }

  .quiz-card {
    padding: 20px 16px;
  }

  .quiz-card legend {
    font-size: 1.17rem;
  }

  .option-row {
    padding: 12px;
  }

  .question-map {
    grid-template-columns: repeat(5, 1fr);
  }

  .simulator-facts {
    grid-template-columns: 1fr;
  }

  .simulator-facts div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .simulator-facts div:last-child {
    border-bottom: 0;
  }

  .simulator-toolbar {
    top: 72px;
  }

  .results-summary {
    grid-template-columns: 1fr;
  }

  .score-orb {
    width: 140px;
    height: 140px;
  }

  .site-footer {
    flex-direction: column;
    padding: 22px 20px;
  }

  .search-dialog,
  .confirm-dialog {
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
  }

  .search-dialog__frame,
  .confirm-dialog form {
    padding: 18px;
  }
}

@media (max-width: 400px) {
  .sidebar {
    width: min(88vw, 320px);
  }

  .topbar__title strong {
    max-width: 190px;
  }

  .page,
  .home-page {
    width: 100%;
    padding-right: 16px;
    padding-left: 16px;
  }

  .question-map {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .sidebar,
  .topbar,
  .site-footer,
  .tabs,
  .page-actions,
  .local-toc,
  .quiz-actions {
    display: none !important;
  }

  .workspace {
    margin: 0;
  }

  .page,
  .home-page {
    width: 100%;
    padding: 0;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 11pt;
  }
}
