/* ============================================================
   Intro to Sociology — Study Guide
   A warm, print-inspired "risograph" academic aesthetic.
   Two-tone ink + terracotta, serif reading column, calm UI.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  color-scheme: light;

  /* Paper & ink */
  --paper:      #f7f3ec;
  --paper-2:    #efe8dc;
  --card:       #fffdf8;
  --ink:        #23201b;
  --ink-soft:   #4d463c;
  --ink-faint:  #8a8172;
  --line:       #ddd3c2;
  --line-soft:  #e9e1d3;

  /* Duotone accents */
  --rust:       #bd4b2b;   /* primary accent */
  --rust-deep:  #9c3b1f;
  --rust-tint:  #f4dccf;
  --teal:       #2f6b63;   /* secondary accent */
  --teal-tint:  #d6e6e2;
  --gold:       #b4832a;
  --gold-tint:  #f0e2c2;

  --shadow:     0 1px 2px rgba(35,32,27,.05), 0 6px 22px -12px rgba(35,32,27,.28);
  --shadow-lg:  0 10px 40px -16px rgba(35,32,27,.4);

  --radius:     14px;
  --radius-sm:  9px;

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --display: "Fraunces", Georgia, serif;

  --sidebar-w: 300px;
  --maxread: 74ch;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:      #16140f;
  --paper-2:    #1d1a14;
  --card:       #201c15;
  --ink:        #f2ebdd;
  --ink-soft:   #cdc4b2;
  --ink-faint:  #8f8674;
  --line:       #362f24;
  --line-soft:  #2a251c;

  --rust:       #e0764f;
  --rust-deep:  #c9603a;
  --rust-tint:  #3a241a;
  --teal:       #6fb8ac;
  --teal-tint:  #17322e;
  --gold:       #d6a544;
  --gold-tint:  #362a13;

  --shadow:     0 1px 2px rgba(0,0,0,.3), 0 8px 26px -14px rgba(0,0,0,.7);
  --shadow-lg:  0 14px 46px -18px rgba(0,0,0,.8);
}

* { box-sizing: border-box; }

/* Base link color: theme-aware, never browser blue.
   Specific components (.toc, .map-card, .brand) override below. */
a { color: var(--rust-deep); text-decoration: none; }
:root[data-theme="dark"] a { color: var(--rust); }

html { scroll-behavior: smooth; scroll-padding-top: 92px; font-size: 106.25%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Reading progress bar ---------- */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--rust);
  z-index: 60; transition: width .12s linear;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 12px clamp(14px, 3vw, 28px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 600; color: var(--ink); text-decoration: none; }
.brand .glyph {
  width: 34px; height: 34px; flex: none; border-radius: 9px;
  display: grid; place-items: center; color: #fff; font-size: 18px;
  background: var(--rust);
  box-shadow: var(--shadow);
}
.brand b { font-size: 1.02rem; letter-spacing: -.01em; }
.brand span { display: block; font-family: var(--sans); font-size: .68rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }

.topbar .spacer { flex: 1; }

.search {
  position: relative; display: flex; align-items: center;
  min-width: 0; flex: 0 1 320px;
}
.search svg { position: absolute; left: 11px; color: var(--ink-faint); pointer-events: none; }
.search input {
  width: 100%; font-family: var(--sans); font-size: .9rem; color: var(--ink);
  padding: 9px 12px 9px 34px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
  transition: border-color .15s, box-shadow .15s;
}
.search input:focus { outline: none; border-color: var(--rust);
  box-shadow: 0 0 0 3px var(--rust-tint); }
.search kbd {
  position: absolute; right: 9px; font-family: var(--sans); font-size: .68rem;
  color: var(--ink-faint); border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 6px; background: var(--paper-2);
}

.icon-btn {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink-soft); cursor: pointer; transition: .15s;
}
.icon-btn:hover { color: var(--rust); border-color: var(--rust); transform: translateY(-1px); }
.icon-btn .sun { display: none; }
:root[data-theme="dark"] .icon-btn .sun { display: block; }
:root[data-theme="dark"] .icon-btn .moon { display: none; }

/* ---------- Layout shell ---------- */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 46px);
  max-width: 1240px; margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 28px) 120px;
}

/* ---------- Sidebar / TOC ---------- */
.sidebar {
  position: sticky; top: 74px; align-self: start;
  height: calc(100vh - 90px);
  display: flex; flex-direction: column;
  padding: 22px 6px 14px 0;
}
.side-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding-bottom: 14px; }
.side-title {
  font-family: var(--sans); font-size: .7rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-faint); margin: 4px 0 10px 12px;
}
.toc { list-style: none; margin: 0 0 18px; padding: 0; }
.toc a {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-size: .9rem; color: var(--ink-soft);
  text-decoration: none; padding: 7px 12px; border-radius: 8px;
  line-height: 1.3;
  transition: background .13s, color .13s;
}
.toc a .num {
  font-size: .68rem; font-variant-numeric: tabular-nums; color: var(--ink-faint);
  width: 1.4em; flex: none;
}
.toc a:hover { background: var(--paper-2); color: var(--ink); }
.toc a.active {
  color: var(--rust); background: var(--rust-tint);
  font-weight: 600;
}
:root[data-theme="dark"] .toc a.active { color: var(--rust); }

/* ---------- Reading rail (bottom of the sidebar) ---------- */
.scroll-rail {
  flex: 0 0 auto; margin: 0 8px; padding: 13px 4px 2px;
  border-top: 1px solid var(--line-soft);
}
.rail-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--sans); font-size: .66rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint);
  margin-bottom: 14px;
}
.rail-head .rail-pct {
  font-size: .8rem; letter-spacing: 0; color: var(--rust);
  font-variant-numeric: tabular-nums;
}
.rail {
  position: relative; height: 6px; margin: 0 7px;
  border-radius: 999px; background: var(--line);
}
.rail-fill {
  position: absolute; top: 0; left: 0; bottom: 0; width: 0%;
  border-radius: 999px; background: var(--rust); transition: width .12s linear;
}
.rail-mark {
  position: absolute; top: 50%; left: 0; width: 12px; height: 12px;
  margin: -6px 0 0 -6px; padding: 0; border-radius: 50%;
  border: 2px solid var(--paper); background: var(--line);
  cursor: pointer; appearance: none;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.rail-mark:hover { background: var(--ink-faint); transform: scale(1.3); }
.rail-mark.passed { background: var(--rust); }
.rail-mark.current {
  background: var(--rust); transform: scale(1.15);
  box-shadow: 0 0 0 2px var(--rust-tint);
}
.rail-mark:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
.rail-foot {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-family: var(--sans); font-size: .73rem; color: var(--ink-faint);
  margin-top: 13px;
}
.rail-foot .rail-now {
  color: var(--ink-soft); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rail-foot .rail-left { flex: none; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
  .rail-fill, .rail-mark { transition: none; }
}

/* ---------- Main content ---------- */
.content { min-width: 0; padding-top: 8px; }

/* Hero */
.hero { padding: 40px 0 24px; }
.eyebrow {
  font-family: var(--sans); font-size: .74rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--rust); margin-bottom: 12px;
}
.hero h1 {
  font-family: var(--display); font-weight: 600; font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.04; letter-spacing: -.02em; margin: 0 0 16px;
  font-optical-sizing: auto;
}
.hero h1 em { font-style: italic; color: var(--rust); }
.hero .lede { font-size: clamp(1.05rem, 2vw, 1.22rem); color: var(--ink-soft);
  max-width: 62ch; margin: 0 0 26px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--sans); font-size: .8rem; font-weight: 500; color: var(--ink-soft);
  padding: 7px 13px; border-radius: 999px; background: var(--card);
  border: 1px solid var(--line-soft); box-shadow: var(--shadow);
}
.pill .k { width: 8px; height: 8px; border-radius: 50%; background: var(--rust); }
.pill.teal .k { background: var(--teal); }
.pill.gold .k { background: var(--gold); }

/* Syllabus map */
.map {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px; margin: 30px 0 8px;
}
.map-card {
  display: block; text-decoration: none; color: inherit;
  padding: 16px 16px 15px; border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--line-soft); box-shadow: var(--shadow);
  position: relative; overflow: hidden; transition: transform .16s, box-shadow .16s, border-color .16s;
}
.map-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line); }
.map-card .tag {
  font-family: var(--sans); font-size: .68rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--rust);
}
.map-card.c-teal .tag { color: var(--teal); }
.map-card.c-gold .tag { color: var(--gold); }
.map-card h3 { font-family: var(--display); font-weight: 600; font-size: 1.12rem;
  margin: 7px 0 4px; line-height: 1.15; letter-spacing: -.01em; }
.map-card p { font-family: var(--sans); font-size: .82rem; color: var(--ink-faint); margin: 0; }

/* Section blocks */
.section { scroll-margin-top: 90px; padding: 34px 0 8px; border-top: 1px solid var(--line-soft); margin-top: 30px; }
.section:first-of-type { border-top: none; }
.section-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.section-index {
  font-family: var(--display); font-size: 2rem; font-weight: 500; line-height: 1;
  color: var(--rust); opacity: .5; flex: none; width: 1.7em;
}
.section-head .htext { flex: 1; min-width: 0; }
.section h2 {
  font-family: var(--display); font-weight: 600; font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  letter-spacing: -.015em; line-height: 1.08; margin: 0 0 6px;
}
.section .source {
  font-family: var(--sans); font-size: .8rem; color: var(--ink-faint);
  display: inline-flex; align-items: center; gap: 7px;
}
.section .source b { color: var(--teal); font-weight: 600; }

/* Reading column typography */
.prose { max-width: var(--maxread); }
.prose h3 {
  font-family: var(--display); font-weight: 600; font-size: 1.22rem; letter-spacing: -.01em;
  margin: 30px 0 8px; color: var(--ink);
}
.prose h4 {
  font-family: var(--sans); font-weight: 700; font-size: .82rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--rust); margin: 22px 0 6px;
}
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 1.3em; }
.prose li { margin: 5px 0; }
.prose li::marker { color: var(--rust); }
.prose a, .foot a { text-decoration: underline; text-underline-offset: 3px; }
.prose a { color: var(--rust-deep); }
:root[data-theme="dark"] .prose a { color: var(--rust); }

/* Key term */
.prose dfn, .term {
  font-style: normal; font-weight: 600; color: var(--rust-deep);
  border-bottom: 1.5px dotted var(--rust); cursor: help;
}
:root[data-theme="dark"] .prose dfn, :root[data-theme="dark"] .term { color: var(--rust); }

/* Callout boxes */
.callout {
  margin: 20px 0; padding: 15px 17px; border-radius: var(--radius-sm);
  background: var(--card); border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
}
.callout .clabel {
  font-family: var(--sans); font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 5px;
  display: flex; align-items: center; gap: 7px;
}
.callout p:last-child { margin-bottom: 0; }
.callout.key .clabel { color: var(--rust); }
.callout.classic .clabel { color: var(--teal); }

/* Definition list / glossary within section */
.defs { margin: 20px 0; display: grid; gap: 0; border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.defs > div { display: grid; grid-template-columns: minmax(120px, 210px) 1fr; gap: 0;
  border-top: 1px solid var(--line-soft); }
.defs > div:first-child { border-top: none; }
.defs dt { font-family: var(--sans); font-weight: 600; font-size: .9rem; color: var(--rust-deep);
  padding: 12px 14px; background: color-mix(in srgb, var(--rust-tint) 40%, transparent); }
:root[data-theme="dark"] .defs dt { color: var(--rust); }
.defs dd { margin: 0; padding: 12px 15px; font-size: .96rem; color: var(--ink-soft); }
@media (max-width: 560px){ .defs > div { grid-template-columns: 1fr; }
  .defs dd { padding-top: 0; } }

/* Thinker cards */
.thinkers { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr));
  gap: 14px; margin: 22px 0; max-width: none; }
.thinkers.four { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 560px){ .thinkers.four { grid-template-columns: 1fr; } }
.thinker {
  padding: 18px; border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--line-soft); box-shadow: var(--shadow); position: relative;
}
.thinker .avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: #fff; margin-bottom: 10px;
}
.thinker.comte .avatar { background: var(--ink-soft); }
.thinker.marx .avatar { background: var(--rust); }
.thinker.weber .avatar { background: var(--teal); }
.thinker.durkheim .avatar { background: var(--gold); }
.thinker h4 { font-family: var(--display); font-size: 1.15rem; font-weight: 600; margin: 0; letter-spacing: -.01em; text-transform: none; color: var(--ink); }
.thinker .years { font-family: var(--sans); font-size: .74rem; color: var(--ink-faint); margin-bottom: 10px; }
.thinker ul { font-family: var(--sans); font-size: .84rem; padding-left: 1.1em; margin: 0; color: var(--ink-soft); }
.thinker ul li { margin: 4px 0; }

/* Compare table */
.tablewrap { overflow-x: auto; margin: 20px 0; border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft); box-shadow: var(--shadow); }
table.compare { border-collapse: collapse; width: 100%; font-size: .9rem; background: var(--card); min-width: 460px; }
table.compare th, table.compare td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.compare thead th { font-family: var(--sans); font-size: .74rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-faint); background: var(--paper-2); }
table.compare tbody th { font-family: var(--sans); font-weight: 600; color: var(--rust-deep); font-size: .84rem; white-space: nowrap; }
:root[data-theme="dark"] table.compare tbody th { color: var(--rust); }
table.compare tr:last-child td, table.compare tr:last-child th { border-bottom: none; }

/* Exam points */
.exam {
  margin: 24px 0 8px; padding: 18px 20px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--rust-tint) 45%, var(--card));
  border: 1px solid var(--line);
}
.exam .clabel { font-family: var(--sans); font-size: .74rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--rust); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.exam ul { margin: 0; padding-left: 1.15em; font-family: var(--sans); font-size: .9rem; }
.exam li { margin: 6px 0; color: var(--ink-soft); }
.exam li::marker { color: var(--rust); }

/* Empty / ongoing state */
.ongoing {
  padding: 26px; border-radius: var(--radius); text-align: center;
  border: 2px dashed var(--line); background: var(--card); color: var(--ink-faint);
  font-family: var(--sans); font-size: .92rem;
}
.ongoing b { color: var(--ink-soft); }

/* ---------- Flashcards modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center;
  padding: 20px; background: color-mix(in srgb, var(--ink) 62%, transparent); }
.modal.open { display: grid; }
.modal-inner { width: min(520px, 100%); }
.fc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; color: #fff; }
:root[data-theme="dark"] .fc-top { color: var(--ink); }
.fc-top .ftitle { font-family: var(--display); font-size: 1.2rem; font-weight: 600; }
.fc-top .fcount { font-family: var(--sans); font-size: .82rem; opacity: .85; }
.fc-close { background: rgba(255,255,255,.15); border: none; color: inherit; width: 34px; height: 34px;
  border-radius: 9px; cursor: pointer; font-size: 18px; }
.flashcard { perspective: 1400px; height: 300px; cursor: pointer; }
.fc-face { position: relative; width: 100%; height: 100%; transition: transform .5s; transform-style: preserve-3d; }
.flashcard.flipped .fc-face { transform: rotateY(180deg); }
.fc-front, .fc-back {
  position: absolute; inset: 0; backface-visibility: hidden; border-radius: var(--radius);
  display: grid; place-items: center; text-align: center; padding: 30px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.fc-front .kicker, .fc-back .kicker { position: absolute; top: 16px; left: 20px;
  font-family: var(--sans); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.fc-front .term-big { font-family: var(--display); font-size: 1.7rem; font-weight: 600; color: var(--rust-deep); letter-spacing: -.01em; }
:root[data-theme="dark"] .fc-front .term-big { color: var(--rust); }
.fc-front .hint { position: absolute; bottom: 16px; font-family: var(--sans); font-size: .76rem; color: var(--ink-faint); }
.fc-back { transform: rotateY(180deg); }
.fc-back .def { font-size: 1.02rem; color: var(--ink-soft); line-height: 1.6; }
.fc-nav { display: flex; gap: 10px; margin-top: 14px; }
.fc-nav button { flex: 1; font-family: var(--sans); font-weight: 600; font-size: .9rem; padding: 12px;
  border-radius: 10px; border: none; cursor: pointer; background: var(--card); color: var(--ink); box-shadow: var(--shadow); transition: .14s; }
.fc-nav button:hover { transform: translateY(-1px); }
.fc-nav button.primary { background: var(--rust); color: #fff; }
.fc-progress { height: 4px; border-radius: 4px; background: rgba(255,255,255,.25); margin-top: 14px; overflow: hidden; }
.fc-progress i { display: block; height: 100%; background: var(--gold); transition: width .3s; }

/* Flashcards launcher (lives in the top bar, so nothing moves while you read) */
.nav-fc {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  font-family: var(--sans); font-weight: 600; font-size: .9rem; color: #fff;
  padding: 9px 15px; border-radius: 10px; border: none; cursor: pointer;
  background: var(--rust); box-shadow: var(--shadow); transition: background .15s, transform .15s;
}
.nav-fc:hover { background: var(--rust-deep); transform: translateY(-1px); }
.nav-fc b { font-variant-numeric: tabular-nums; }

/* Back to top */
.totop { position: fixed; right: 22px; bottom: 22px; z-index: 39; width: 42px; height: 42px;
  border-radius: 50%; display: grid; place-items: center; cursor: pointer; opacity: 0; pointer-events: none;
  background: var(--card); border: 1px solid var(--line); color: var(--ink-soft); box-shadow: var(--shadow); transition: .2s; }
.totop.show { opacity: 1; pointer-events: auto; }
.totop:hover { color: var(--rust); border-color: var(--rust); }

/* Search: dim non-matches */
.section.search-hide { display: none; }
mark.hit { background: var(--gold-tint); color: inherit; border-radius: 3px; padding: 0 2px; }
.no-results { display: none; padding: 40px 0; text-align: center; color: var(--ink-faint); font-family: var(--sans); }
.no-results.show { display: block; }

/* Footer */
.foot { max-width: var(--maxread); margin-top: 50px; padding-top: 22px; border-top: 1px solid var(--line-soft);
  font-family: var(--sans); font-size: .82rem; color: var(--ink-faint); }
.foot a { color: var(--rust-deep); }
:root[data-theme="dark"] .foot a { color: var(--rust); }

/* Mobile menu button */
.menu-btn { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 84vw); z-index: 70;
    align-self: stretch; height: 100vh; height: 100dvh;
    background: var(--paper); border-right: 1px solid var(--line);
    padding: 20px 14px 16px; transform: translateX(-105%); transition: transform .26s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .scrim { position: fixed; inset: 0; z-index: 65; background: rgba(0,0,0,.4);
    opacity: 0; pointer-events: none; transition: opacity .2s; }
  .scrim.show { opacity: 1; pointer-events: auto; }
  .menu-btn { display: grid; }
  .search { flex-basis: 200px; }
  .search kbd { display: none; }
}
@media (max-width: 620px) {
  body { font-size: .99rem; }
  .brand span { display: none; }
  .search { flex-basis: 150px; }
  .section-index { font-size: 1.5rem; }
  .nav-fc span { display: none; }
  .nav-fc { padding: 9px 11px; }
}

/* ---------- Print ---------- */
@media print {
  .topbar, .sidebar, .fab, .totop, .scrim, #progress-bar { display: none !important; }
  body { background: #fff; color: #000; }
  .shell { display: block; max-width: none; padding: 0; }
  .section { break-inside: avoid; border-top: 1px solid #ccc; }
  .prose { max-width: none; }
}

/* ---------- Exam paper review (section 09) ---------- */
.qblock { margin: 20px 0; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.qblock:first-of-type { border-top: none; }
.qhead { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; flex-wrap: wrap; }
.qnum { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--rust); }
.qtext { font-size: 1.05rem; margin: 2px 0 10px; }
.score { font-family: var(--sans); font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-soft); background: var(--card); white-space: nowrap; }
.score.full { color: #2f6b4f; border-color: #8fc6a8; background: color-mix(in srgb, #8fc6a8 22%, var(--card)); }
.score.bad { color: var(--rust-deep); border-color: var(--rust); background: var(--rust-tint); }
.score.part { color: var(--gold); border-color: var(--gold); background: var(--gold-tint); }
:root[data-theme="dark"] .score.full { color: #8fd3ab; }

.callout.miss { background: color-mix(in srgb, var(--rust-tint) 70%, var(--card)); border-color: var(--rust); }
.callout.miss .clabel { color: var(--rust); }

.akey b { color: var(--ink); }
.yours { font-size: .98rem; color: var(--ink-soft); }

details.passage { margin: 18px 0; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--card); box-shadow: var(--shadow); }
details.passage > summary { cursor: pointer; padding: 13px 16px; font-family: var(--sans); font-weight: 600; font-size: .9rem; color: var(--rust); list-style: none; }
details.passage > summary::-webkit-details-marker { display: none; }
details.passage > summary::before { content: "\25B8  "; }
details.passage[open] > summary::before { content: "\25BE  "; }
details.passage .pbody { padding: 0 16px 14px; font-size: .97rem; color: var(--ink-soft); }
details.passage .pbody p { margin: 0 0 10px; }
