/* ───────────────────────────────────────────────────
   Design Tokens
   ─────────────────────────────────────────────────── */
:root {
  --bg-canvas: #f4f1ea;
  --bg-glow-a: rgba(255, 225, 183, 0.42);
  --bg-glow-b: rgba(176, 226, 222, 0.34);
  --surface: #fffefb;
  --surface-muted: #fff8ee;
  --surface-strong: #fff3e2;
  --ink: #17202b;
  --ink-soft: #536172;
  --line: #d8ccba;
  --line-strong: #bca587;
  --brand: #0a6b60;
  --brand-soft: #dbf1ed;
  --brand-deep: #05453d;
  --accent: #b14d28;
  --accent-soft: #ffecdf;
  --ok: #1f7a57;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --shadow-soft: 0 10px 26px rgba(52, 40, 25, 0.08);
  --shadow-md: 0 16px 38px rgba(36, 24, 10, 0.12);
  --shadow-glow: 0 0 0 1px rgba(255, 255, 255, 0.65) inset;
  --transition-fast: 140ms ease;
  --transition-normal: 200ms ease;
}

/* ───────────────────────────────────────────────────
   Dark Mode Tokens
   ─────────────────────────────────────────────────── */
body.dark-mode {
  --bg-canvas: #1a1d23;
  --surface: #232730;
  --surface-muted: #2a2e38;
  --surface-strong: #323744;
  --ink: #e4e6eb;
  --ink-soft: #9aa0ad;
  --line: #3a3f4b;
  --line-strong: #4a5060;
  --brand: #4ec5b1;
  --brand-soft: #1a3a35;
  --brand-deep: #7be0cc;
  --accent: #e8855c;
  --accent-soft: #3a2820;
  --ok: #5cc495;
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 16px 38px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

/* ───────────────────────────────────────────────────
   Reset & Base
   ─────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--ink);
  line-height: 1.64;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  background:
    radial-gradient(circle at 0% 0%, var(--bg-glow-a), transparent 36%),
    radial-gradient(circle at 100% 15%, var(--bg-glow-b), transparent 44%),
    linear-gradient(165deg, #f6f3ec 0%, #f2ebdf 55%, #ece5d8 100%);
  transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode {
  background:
    radial-gradient(circle at 0% 0%, rgba(78, 197, 177, 0.08), transparent 36%),
    radial-gradient(circle at 100% 15%, rgba(232, 133, 92, 0.06), transparent 44%),
    linear-gradient(165deg, #1a1d23 0%, #1e2129 55%, #22252d 100%);
}

/* ─── Page Theme Overrides ─── */
body.page-home {
  --brand: #0a6b60;
  --brand-deep: #05453d;
  --accent: #b14d28;
  --accent-soft: #ffecdf;
}

body.page-exam {
  --brand: #0d5c91;
  --brand-deep: #093d62;
  --accent: #ad4f21;
  --accent-soft: #ffe8dc;
  --exam-topic-bg-a: rgba(188, 221, 255, 0.45);
  --exam-topic-bg-b: rgba(255, 222, 191, 0.32);
  --exam-topic-surface: #f8fcff;
  --exam-topic-border: rgba(122, 159, 191, 0.65);
  --exam-topic-head-a: #f3fbff;
  --exam-topic-head-b: #e7f2fa;
  --exam-topic-accent: #2f6fa3;
  --exam-topic-accent-soft: #dff0ff;
  --exam-topic-accent-deep: #1b4666;
}

body.page-discussion {
  --brand: #2c6c4a;
  --brand-deep: #1c4730;
  --accent: #9a4a2a;
  --accent-soft: #ffeade;
}

body.page-exam {
  background:
    radial-gradient(circle at 6% 0%, var(--exam-topic-bg-a), transparent 36%),
    radial-gradient(circle at 100% 12%, var(--exam-topic-bg-b), transparent 44%),
    linear-gradient(165deg, #f2f5f9 0%, #eef1f3 55%, #e6ecef 100%);
}

body.page-discussion {
  background:
    radial-gradient(circle at 0% 0%, rgba(196, 236, 219, 0.46), transparent 36%),
    radial-gradient(circle at 100% 14%, rgba(255, 226, 196, 0.32), transparent 44%),
    linear-gradient(165deg, #f2f5f0 0%, #edf0e6 55%, #e6eadf 100%);
}

body.dark-mode.page-exam {
  background:
    radial-gradient(circle at 6% 0%, rgba(13, 92, 145, 0.12), transparent 36%),
    radial-gradient(circle at 100% 12%, rgba(173, 79, 33, 0.08), transparent 44%),
    linear-gradient(165deg, #1a1d23 0%, #1e2129 55%, #22252d 100%);
}

body.dark-mode.page-discussion {
  background:
    radial-gradient(circle at 0% 0%, rgba(44, 108, 74, 0.12), transparent 36%),
    radial-gradient(circle at 100% 14%, rgba(154, 74, 42, 0.08), transparent 44%),
    linear-gradient(165deg, #1a1d23 0%, #1e2129 55%, #22252d 100%);
}

/* ─── Exam Topic Color Schemes ─── */
body.page-exam[data-exam-topic="bildungssystem"] {
  --exam-topic-bg-a: rgba(157, 211, 255, 0.5);
  --exam-topic-bg-b: rgba(217, 239, 255, 0.36);
  --exam-topic-surface: #f4fbff;
  --exam-topic-border: rgba(109, 158, 194, 0.72);
  --exam-topic-head-a: #f3fbff;
  --exam-topic-head-b: #e2f2ff;
  --exam-topic-accent: #2c77b9;
  --exam-topic-accent-soft: #d8ecff;
  --exam-topic-accent-deep: #194c76;
}

body.page-exam[data-exam-topic="schule-unterricht"] {
  --exam-topic-bg-a: rgba(182, 235, 191, 0.5);
  --exam-topic-bg-b: rgba(226, 250, 222, 0.36);
  --exam-topic-surface: #f5fff6;
  --exam-topic-border: rgba(111, 176, 119, 0.72);
  --exam-topic-head-a: #f5fff7;
  --exam-topic-head-b: #e3f8e7;
  --exam-topic-accent: #2f9550;
  --exam-topic-accent-soft: #d8f5df;
  --exam-topic-accent-deep: #1d5a31;
}

body.page-exam[data-exam-topic="universitaet-studium"] {
  --exam-topic-bg-a: rgba(218, 188, 255, 0.5);
  --exam-topic-bg-b: rgba(243, 226, 255, 0.38);
  --exam-topic-surface: #fbf7ff;
  --exam-topic-border: rgba(154, 116, 201, 0.72);
  --exam-topic-head-a: #fbf8ff;
  --exam-topic-head-b: #f0e4ff;
  --exam-topic-accent: #7a47bb;
  --exam-topic-accent-soft: #eddcff;
  --exam-topic-accent-deep: #4a2c70;
}

body.page-exam[data-exam-topic="technologie-medien"] {
  --exam-topic-bg-a: rgba(169, 243, 247, 0.52);
  --exam-topic-bg-b: rgba(214, 252, 255, 0.38);
  --exam-topic-surface: #f4feff;
  --exam-topic-border: rgba(100, 173, 188, 0.72);
  --exam-topic-head-a: #f2feff;
  --exam-topic-head-b: #dff3f8;
  --exam-topic-accent: #238ea5;
  --exam-topic-accent-soft: #d6f3f8;
  --exam-topic-accent-deep: #145968;
}

body.page-exam[data-exam-topic="gesellschaft-politik"] {
  --exam-topic-bg-a: rgba(240, 151, 168, 0.52);
  --exam-topic-bg-b: rgba(255, 209, 224, 0.4);
  --exam-topic-surface: #fff6fa;
  --exam-topic-border: rgba(191, 96, 130, 0.74);
  --exam-topic-head-a: #fff7fb;
  --exam-topic-head-b: #f8e3eb;
  --exam-topic-accent: #c23a73;
  --exam-topic-accent-soft: #ffdbe9;
  --exam-topic-accent-deep: #742245;
}

body.page-exam[data-exam-topic="kultur-kunst"] {
  --exam-topic-bg-a: rgba(255, 184, 212, 0.5);
  --exam-topic-bg-b: rgba(255, 220, 240, 0.38);
  --exam-topic-surface: #fff7fb;
  --exam-topic-border: rgba(199, 116, 161, 0.72);
  --exam-topic-head-a: #fff8fc;
  --exam-topic-head-b: #f8e3ef;
  --exam-topic-accent: #cb4c8c;
  --exam-topic-accent-soft: #ffe1ef;
  --exam-topic-accent-deep: #7a2b52;
}

body.page-exam[data-exam-topic="wissenschaft-forschung"] {
  --exam-topic-bg-a: rgba(192, 196, 255, 0.5);
  --exam-topic-bg-b: rgba(224, 231, 255, 0.38);
  --exam-topic-surface: #f7f8ff;
  --exam-topic-border: rgba(125, 134, 204, 0.72);
  --exam-topic-head-a: #f7f8ff;
  --exam-topic-head-b: #e7eaff;
  --exam-topic-accent: #4b63c7;
  --exam-topic-accent-soft: #dde4ff;
  --exam-topic-accent-deep: #2d3c77;
}

body.page-exam[data-exam-topic="arbeit-karriere"] {
  --exam-topic-bg-a: rgba(181, 190, 207, 0.52);
  --exam-topic-bg-b: rgba(216, 222, 234, 0.4);
  --exam-topic-surface: #f5f7fb;
  --exam-topic-border: rgba(119, 130, 153, 0.74);
  --exam-topic-head-a: #f8f9fc;
  --exam-topic-head-b: #e7ebf3;
  --exam-topic-accent: #516784;
  --exam-topic-accent-soft: #e1e7f2;
  --exam-topic-accent-deep: #2e3c4f;
}

body.page-exam[data-exam-topic="familie-jugend"] {
  --exam-topic-bg-a: rgba(255, 176, 165, 0.52);
  --exam-topic-bg-b: rgba(255, 218, 205, 0.4);
  --exam-topic-surface: #fff8f5;
  --exam-topic-border: rgba(208, 121, 104, 0.74);
  --exam-topic-head-a: #fff9f6;
  --exam-topic-head-b: #fbe8e4;
  --exam-topic-accent: #d66453;
  --exam-topic-accent-soft: #ffe1dc;
  --exam-topic-accent-deep: #88382d;
}

body.page-exam[data-exam-topic="umwelt-zukunft"] {
  --exam-topic-bg-a: rgba(206, 235, 176, 0.5);
  --exam-topic-bg-b: rgba(233, 247, 206, 0.38);
  --exam-topic-surface: #f8fff2;
  --exam-topic-border: rgba(149, 181, 103, 0.72);
  --exam-topic-head-a: #f8fff4;
  --exam-topic-head-b: #edf6df;
  --exam-topic-accent: #6f9c36;
  --exam-topic-accent-soft: #e7f4d7;
  --exam-topic-accent-deep: #425f1f;
}

/* ─── Exam Topic Component Overrides ─── */
body.page-exam[data-exam-topic] .experience-content .topic-header,
body.page-exam[data-exam-topic] .experience-content .module-card {
  border-color: var(--exam-topic-border);
  background: linear-gradient(170deg, #ffffff, var(--exam-topic-surface));
}

body.page-exam[data-exam-topic] .experience-content .topic-header {
  border-top-color: var(--exam-topic-accent);
}

body.page-exam[data-exam-topic] .experience-content .topic-header::before {
  background: linear-gradient(180deg, var(--exam-topic-accent), var(--exam-topic-accent-deep));
}

body.page-exam[data-exam-topic] .experience-content .module-card .module-head {
  background: linear-gradient(180deg, var(--exam-topic-head-a), var(--exam-topic-head-b));
}

body.page-exam[data-exam-topic] .experience-content .module-card .module-badge {
  border-color: var(--exam-topic-border);
  color: var(--exam-topic-accent-deep);
  background: #ffffff;
}

body.page-exam[data-exam-topic] .experience-content .module-card::before {
  background: linear-gradient(180deg, var(--exam-topic-accent), var(--exam-topic-accent-deep));
}

body.page-exam[data-exam-topic] .experience-content .module-card .toggle-btn,
body.page-exam[data-exam-topic] .experience-content .module-card .button-link {
  border-color: var(--exam-topic-accent);
  color: var(--exam-topic-accent-deep);
  background: linear-gradient(180deg, #fff, var(--exam-topic-accent-soft));
}

body.page-exam[data-exam-topic] .experience-content .module-card .toggle-btn:hover,
body.page-exam[data-exam-topic] .experience-content .module-card .button-link:hover {
  border-color: var(--exam-topic-accent-deep);
  background: linear-gradient(180deg, #fffdfb, var(--exam-topic-accent-soft));
  box-shadow: 0 8px 18px rgba(52, 48, 40, 0.18);
}

body.page-exam[data-exam-topic] .topic-switcher .topic-chip.is-active {
  border-color: var(--exam-topic-accent);
  color: var(--exam-topic-accent-deep);
  background: linear-gradient(180deg, #ffffff, var(--exam-topic-accent-soft));
}

body.page-exam[data-exam-topic] .experience-content .table-scroll {
  border-color: var(--exam-topic-border);
}

body.page-exam[data-exam-topic] .experience-content .argument-matrix-table {
  background: #ffffff;
}

body.page-exam[data-exam-topic] .experience-content .argument-matrix-table th {
  border-color: var(--exam-topic-border);
  color: var(--exam-topic-accent-deep);
  background: linear-gradient(180deg, #ffffff, var(--exam-topic-accent-soft));
}

body.page-exam[data-exam-topic] .experience-content .argument-matrix-table td {
  border-color: var(--exam-topic-border);
  background: rgba(255, 255, 255, 0.92);
}

body.page-exam[data-exam-topic] .experience-content .argument-matrix-table tr:nth-child(even) td {
  background: var(--exam-topic-surface);
}

body.page-exam[data-exam-topic] .experience-content .argument-matrix-table td::before {
  color: var(--exam-topic-accent-deep);
}

/* ─── Subtle grid texture ─── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(177, 156, 122, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(177, 156, 122, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black 52%, transparent 90%);
  opacity: 0.26;
}

body.dark-mode::before {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  opacity: 0.4;
}

/* ───────────────────────────────────────────────────
   Typography
   ─────────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5 {
  margin-top: 0;
  color: var(--ink);
  font-family: "Avenir Next Condensed", "Gill Sans Nova", "Trebuchet MS", sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

p,
li,
td,
th,
blockquote,
span,
small {
  font-size: 1rem;
}

/* ───────────────────────────────────────────────────
   Site Header
   ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.56rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 251, 244, 0.92);
  backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 4px 16px rgba(42, 28, 10, 0.06);
  transition: background 0.3s ease, border-color 0.3s ease;
}

body.dark-mode .site-header {
  background: rgba(26, 29, 35, 0.94);
  border-bottom-color: var(--line);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: 0.35;
}

.site-home-link {
  text-decoration: none;
  color: inherit;
  transition: opacity var(--transition-fast);
}

.site-home-link:hover {
  opacity: 0.8;
}

.site-home-link h1 {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.42rem);
  font-weight: 700;
  color: var(--ink);
}

.site-header-nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

/* ─── Breadcrumb ─── */
.site-breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.76rem;
  color: var(--ink-soft);
  font-family: "Avenir Next Condensed", "Gill Sans Nova", "Trebuchet MS", sans-serif;
}

.site-breadcrumb li + li::before {
  content: "/";
  margin-right: 0.3rem;
  opacity: 0.5;
}

.site-breadcrumb a {
  color: var(--brand);
  text-decoration: none;
}

.site-breadcrumb a:hover {
  text-decoration: underline;
}

.site-breadcrumb [aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

/* ─── Header Buttons ─── */
.site-header .dark-mode-btn,
.site-header .lang-toggle-btn {
  padding: 0.3rem 0.58rem;
  font-size: 0.82rem;
  min-width: auto;
  flex-shrink: 0;
}

.dark-mode-btn {
  font-size: 1.05rem !important;
  padding: 0.26rem 0.48rem !important;
  line-height: 1;
}

.skip-link {
  position: fixed;
  left: 0.9rem;
  top: 0.7rem;
  z-index: 80;
  transform: translateY(-140%);
  border: 1px solid rgba(10, 107, 96, 0.7);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #e9faf6);
  color: var(--brand-deep);
  text-decoration: none;
  padding: 0.35rem 0.72rem;
  font: 600 0.84rem/1.1 "Avenir Next Condensed", "Gill Sans Nova", "Trebuchet MS", sans-serif;
  box-shadow: 0 8px 18px rgba(16, 47, 41, 0.14);
  transition: transform 150ms ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid rgba(10, 107, 96, 0.4);
  outline-offset: 2px;
}

.subtitle {
  margin: 0;
  color: var(--ink-soft);
  max-width: 72ch;
}

.lang-toggle-btn {
  justify-self: end;
  width: auto;
}

.back-link {
  margin-bottom: 0.35rem;
  justify-self: start;
}

/* ───────────────────────────────────────────────────
   Page Shell
   ─────────────────────────────────────────────────── */
.page-shell {
  position: relative;
  width: calc(100% - clamp(1rem, 3.4vw, 4.8rem));
  max-width: 1560px;
  margin: 0 auto;
  padding: 1.15rem 0 2.1rem;
}

.page-shell > * {
  animation: rise-in 420ms cubic-bezier(0.2, 0.85, 0.32, 1) both;
}

body.page-exam .page-shell > *,
body.page-discussion .page-shell > * {
  animation: none;
}

/* ─── Shared Utilities ─── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  margin: 0 0 0.36rem;
  color: var(--brand-deep);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.75rem;
  font-family: "Avenir Next Condensed", "Gill Sans Nova", "Trebuchet MS", sans-serif;
}

.eyebrow::before {
  content: "";
  width: 0.65rem;
  height: 0.12rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.small-note {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.bilingual-zh {
  display: none;
  margin-top: 0.18rem;
  color: #4d5f72;
  font-size: 0.88rem;
  line-height: 1.44;
}

body.show-chinese .bilingual-zh {
  display: block;
}

body.dark-mode .bilingual-zh {
  color: #8a99aa;
}

/* ───────────────────────────────────────────────────
   Home Page: Hero & Cards
   ─────────────────────────────────────────────────── */
.hero-panel,
.topic-header {
  border: 1px solid var(--line);
  border-top: 4px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.97), rgba(255, 248, 236, 0.96)),
    var(--surface);
  box-shadow: var(--shadow-soft), var(--shadow-glow);
  transition: background 0.3s ease, border-color 0.3s ease;
}

body.dark-mode .hero-panel,
body.dark-mode .topic-header {
  background: linear-gradient(165deg, var(--surface), var(--surface-muted));
  border-color: var(--line);
  border-top-color: var(--line-strong);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 1.4rem;
  margin-bottom: 1.2rem;
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 107, 96, 0.14), transparent 68%);
  pointer-events: none;
}

.hero-panel h2 {
  margin: 0.12rem 0 0.6rem;
  font-size: clamp(1.5rem, 2.8vw, 2.3rem);
  max-width: 24ch;
  line-height: 1.15;
}

.hero-panel p {
  max-width: 62ch;
  line-height: 1.7;
}

/* ─── System Grid ─── */
.system-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-bottom: 1.2rem;
}

.system-card {
  display: grid;
  gap: 0.7rem;
  align-content: start;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.97), rgba(255, 248, 236, 0.96)),
    var(--surface);
  box-shadow: var(--shadow-soft), var(--shadow-glow);
  transition: transform var(--transition-normal), box-shadow 240ms ease, border-color var(--transition-normal);
}

body.dark-mode .system-card {
  background: linear-gradient(165deg, var(--surface), var(--surface-muted));
  border-color: var(--line);
  border-top-color: var(--line-strong);
}

.system-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.system-card--exam {
  border-top-color: #0d5c91;
}

.system-card--discussion {
  border-top-color: #2c6c4a;
}

body.dark-mode .system-card--exam {
  border-top-color: #4a9fd4;
}

body.dark-mode .system-card--discussion {
  border-top-color: #4ec5b1;
}

.system-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.system-card-header h2 {
  margin: 0;
  font-size: 1.32rem;
}

.system-card-stat {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  font: 600 0.76rem/1.2 "Avenir Next Condensed", "Gill Sans Nova", "Trebuchet MS", sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--brand-soft);
  color: var(--brand-deep);
  border: 1px solid rgba(10, 107, 96, 0.25);
}

body.dark-mode .system-card-stat {
  background: rgba(78, 197, 177, 0.15);
  border-color: rgba(78, 197, 177, 0.3);
}

.system-card-desc {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.system-card-highlights {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.3rem;
}

.system-card-highlights li {
  font-size: 0.92rem;
  line-height: 1.45;
}

.system-card-cta {
  margin-top: auto;
  justify-self: start;
}

/* ─── Onboarding ─── */
.onboarding-panel {
  border: 1px solid var(--line);
  border-top: 4px solid rgba(10, 107, 96, 0.55);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  background: linear-gradient(170deg, #fffef9, #f8fff9);
  box-shadow: 0 8px 20px rgba(21, 35, 21, 0.08);
}

body.dark-mode .onboarding-panel {
  background: linear-gradient(170deg, var(--surface), var(--surface-muted));
  border-color: var(--line);
  border-top-color: var(--brand);
}

.onboarding-panel h3 {
  margin-bottom: 0.72rem;
  font-size: 1.15rem;
}

.onboarding-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.onboarding-step {
  border: 1px solid rgba(171, 150, 116, 0.58);
  border-radius: var(--radius-md);
  padding: 0.72rem 0.76rem;
  background: linear-gradient(180deg, #fff, #fff3e6);
  transition: transform var(--transition-fast), box-shadow var(--transition-normal);
}

body.dark-mode .onboarding-step {
  background: linear-gradient(180deg, var(--surface-muted), var(--surface-strong));
  border-color: var(--line);
}

.onboarding-step:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(42, 33, 13, 0.1);
}

.onboarding-step strong {
  display: inline-flex;
  width: 1.7rem;
  height: 1.7rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  margin-bottom: 0.4rem;
  color: var(--brand-deep);
  background: linear-gradient(180deg, #f2fffc, #daf2ee);
  border: 1px solid rgba(10, 107, 96, 0.4);
  font-family: "Avenir Next Condensed", "Gill Sans Nova", "Trebuchet MS", sans-serif;
  font-size: 0.9rem;
}

body.dark-mode .onboarding-step strong {
  background: rgba(78, 197, 177, 0.15);
  border-color: rgba(78, 197, 177, 0.3);
}

.onboarding-step h4 {
  margin: 0 0 0.25rem;
  font-size: 0.98rem;
}

.onboarding-step p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ─── Metrics Panel ─── */
.metrics-panel {
  margin-top: 1rem;
  padding: 0.85rem;
  display: grid;
  gap: 0.78rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  border: 1px solid var(--line);
  border-top: 4px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.97), rgba(255, 248, 236, 0.96)), var(--surface);
  box-shadow: var(--shadow-soft), var(--shadow-glow);
}

.metric {
  border: 1px solid rgba(188, 165, 135, 0.65);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fff, #fff7eb);
  padding: 0.65rem;
}

.metric strong {
  display: block;
  color: var(--brand-deep);
  font-size: 1.5rem;
  line-height: 1.2;
}

.metric span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* ───────────────────────────────────────────────────
   Shared Buttons
   ─────────────────────────────────────────────────── */
.button-link,
.back-link,
.toggle-btn,
.map-jump-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.44rem 0.92rem;
  border: 1px solid rgba(177, 77, 40, 0.82);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, var(--accent-soft));
  color: #6c3018;
  text-decoration: none;
  cursor: pointer;
  font: 600 0.9rem/1.1 "Avenir Next Condensed", "Gill Sans Nova", "Trebuchet MS", sans-serif;
  transition:
    transform var(--transition-fast),
    box-shadow 190ms ease,
    border-color 190ms ease,
    background-color 190ms ease,
    color 190ms ease;
  overflow: hidden;
}

body.dark-mode .button-link,
body.dark-mode .back-link,
body.dark-mode .toggle-btn,
body.dark-mode .map-jump-btn {
  background: linear-gradient(180deg, var(--surface-muted), var(--surface-strong));
  border-color: var(--line-strong);
  color: var(--ink);
}

.button-link::before,
.back-link::before,
.toggle-btn::before,
.map-jump-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.52), transparent 80%);
  transform: translateX(-130%);
  transition: transform 320ms ease;
  pointer-events: none;
}

.button-link:hover,
.back-link:hover,
.toggle-btn:hover,
.map-jump-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(130, 53, 27, 0.9);
  box-shadow: 0 8px 18px rgba(142, 63, 28, 0.2);
  background: linear-gradient(180deg, #fff6f0, #ffd9c2);
}

body.dark-mode .button-link:hover,
body.dark-mode .back-link:hover,
body.dark-mode .toggle-btn:hover,
body.dark-mode .map-jump-btn:hover {
  background: linear-gradient(180deg, var(--surface-strong), #3a3228);
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

.button-link:hover::before,
.back-link:hover::before,
.toggle-btn:hover::before,
.map-jump-btn:hover::before {
  transform: translateX(125%);
}

.button-link:active,
.back-link:active,
.toggle-btn:active,
.map-jump-btn:active {
  transform: translateY(0);
}

.button-link:focus-visible,
.back-link:focus-visible,
.toggle-btn:focus-visible,
.map-jump-btn:focus-visible {
  outline: 3px solid rgba(177, 77, 40, 0.42);
  outline-offset: 2px;
}

.toggle-btn[aria-expanded]::after {
  content: "\u25BE";
  font-size: 0.78rem;
  opacity: 0.8;
  transition: transform 180ms ease;
}

.toggle-btn[aria-expanded="false"]::after {
  transform: rotate(-90deg);
}

/* ───────────────────────────────────────────────────
   Topic Header & Switcher
   ─────────────────────────────────────────────────── */
.topic-header {
  position: relative;
  overflow: hidden;
  padding: 1rem 1.08rem;
  margin-bottom: 0.9rem;
}

.topic-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
}

.topic-header h2 {
  margin: 0;
  font-size: clamp(1.27rem, 2vw, 1.65rem);
}

.topic-switcher {
  border: 1px solid var(--line);
  border-top: 4px solid rgba(12, 104, 94, 0.55);
  border-radius: var(--radius-lg);
  padding: 0.74rem 0.84rem;
  margin-bottom: 0.9rem;
  background: linear-gradient(170deg, #fffef9, #f8fff9);
  box-shadow: 0 8px 20px rgba(21, 35, 21, 0.08);
}

body.dark-mode .topic-switcher {
  background: linear-gradient(170deg, var(--surface), var(--surface-muted));
  border-color: var(--line);
  border-top-color: var(--brand);
}

.topic-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(177, 77, 40, 0.74);
  border-radius: 999px;
  padding: 0.3rem 0.78rem;
  background: linear-gradient(180deg, #fff, #ffeedf);
  color: #6c3018;
  text-decoration: none;
  font: 600 0.84rem/1.2 "Avenir Next Condensed", "Gill Sans Nova", "Trebuchet MS", sans-serif;
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.dark-mode .topic-chip {
  background: linear-gradient(180deg, var(--surface-muted), var(--surface-strong));
  border-color: var(--line-strong);
  color: var(--ink);
}

.topic-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(130, 53, 27, 0.9);
  box-shadow: 0 8px 17px rgba(142, 63, 28, 0.19);
}

.topic-chip.is-active {
  border-color: var(--brand);
  color: var(--brand-deep);
  background: linear-gradient(180deg, #f9fffd, #dcf3ee);
}

body.dark-mode .topic-chip.is-active {
  background: rgba(78, 197, 177, 0.15);
  border-color: var(--brand);
}

.topic-chip:focus-visible {
  outline: 3px solid rgba(10, 107, 96, 0.28);
  outline-offset: 2px;
}

/* ───────────────────────────────────────────────────
   Discussion Cockpit (Learning Progress)
   ─────────────────────────────────────────────────── */
.discussion-cockpit {
  position: sticky;
  top: 50px;
  z-index: 20;
  margin-bottom: 0.86rem;
  border: 1px solid rgba(130, 168, 154, 0.6);
  border-top: 4px solid rgba(44, 108, 74, 0.65);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, rgba(250, 255, 251, 0.97), rgba(238, 248, 241, 0.97));
  box-shadow: 0 14px 28px rgba(25, 53, 37, 0.12);
  padding: 0.72rem 0.78rem;
  backdrop-filter: blur(8px);
}

body.dark-mode .discussion-cockpit {
  background: linear-gradient(170deg, rgba(35, 39, 48, 0.97), rgba(30, 42, 36, 0.97));
  border-color: var(--line);
  border-top-color: var(--brand);
}

.discussion-cockpit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.discussion-cockpit-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

/* ─── Progress Bar ─── */
.cockpit-progress {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  max-width: 300px;
}

.cockpit-progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(44, 108, 74, 0.15);
  position: relative;
  overflow: hidden;
}

.cockpit-progress-bar::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: inherit;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--ok));
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode .cockpit-progress-bar {
  background: rgba(78, 197, 177, 0.15);
}

.cockpit-progress-label {
  font: 600 0.72rem/1 "Avenir Next Condensed", "Gill Sans Nova", "Trebuchet MS", sans-serif;
  color: var(--ink-soft);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.discussion-cockpit-head p {
  margin: 0;
}

/* ─── Flow Chips ─── */
.discussion-flow-nav {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.discussion-flow-chip {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0.04rem 0.45rem;
  border: 1px solid rgba(116, 155, 141, 0.66);
  border-radius: 12px;
  padding: 0.44rem 0.5rem;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(180deg, #fff, #edf8f2);
  transition: transform 0.14s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.dark-mode .discussion-flow-chip {
  background: linear-gradient(180deg, var(--surface-muted), var(--surface));
  border-color: var(--line);
  color: var(--ink);
}

.discussion-flow-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(33, 77, 51, 0.16);
  border-color: rgba(44, 108, 74, 0.8);
}

.discussion-flow-chip.is-active {
  border-color: rgba(44, 108, 74, 0.9);
  background: linear-gradient(180deg, #f8fffb, #d9f1e2);
  box-shadow: 0 0 0 2px rgba(44, 108, 74, 0.16);
}

body.dark-mode .discussion-flow-chip.is-active {
  background: rgba(78, 197, 177, 0.12);
  border-color: var(--brand);
}

.discussion-flow-chip.is-viewed {
  border-color: rgba(31, 122, 87, 0.6);
}

.discussion-flow-chip.is-viewed .discussion-flow-chip-check::after {
  opacity: 1;
  transform: scale(1);
}

.discussion-flow-chip:focus-visible {
  outline: 3px solid rgba(44, 108, 74, 0.22);
  outline-offset: 2px;
}

.discussion-flow-chip-check {
  grid-row: 1 / -1;
  width: 1.3rem;
  height: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 2px solid rgba(44, 108, 74, 0.3);
  align-self: center;
  position: relative;
  transition: border-color 0.2s ease;
}

body.dark-mode .discussion-flow-chip-check {
  border-color: rgba(78, 197, 177, 0.3);
}

.discussion-flow-chip.is-viewed .discussion-flow-chip-check {
  border-color: var(--ok);
  background: rgba(31, 122, 87, 0.1);
}

.discussion-flow-chip-check::after {
  content: "\2713";
  position: absolute;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ok);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.discussion-flow-chip-step {
  font: 700 0.77rem/1.1 "Avenir Next Condensed", "Gill Sans Nova", "Trebuchet MS", sans-serif;
  color: var(--brand-deep);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.discussion-flow-chip-title {
  font-size: 0.9rem;
  line-height: 1.25;
}

.discussion-cockpit-actions {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.discussion-cockpit-actions .toggle-btn {
  flex: 1 1 180px;
}

/* ───────────────────────────────────────────────────
   Experience Shell (Sidebar + Content)
   ─────────────────────────────────────────────────── */
.experience-shell {
  display: grid;
  grid-template-columns: minmax(250px, 22vw) minmax(0, 1fr);
  gap: 1.05rem;
  align-items: start;
}

.experience-rail {
  position: sticky;
  top: 50px;
  border: 1px solid rgba(176, 151, 111, 0.66);
  border-top: 4px solid rgba(10, 107, 96, 0.5);
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, #fffefb, #fff6e8);
  box-shadow: 0 12px 24px rgba(50, 38, 18, 0.11);
  padding: 0.76rem;
  max-height: calc(100vh - 72px);
  overflow: auto;
}

body.dark-mode .experience-rail {
  background: linear-gradient(165deg, var(--surface), var(--surface-muted));
  border-color: var(--line);
  border-top-color: var(--brand);
}

.experience-rail::-webkit-scrollbar {
  width: 10px;
}

.experience-rail::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid transparent;
  background: linear-gradient(180deg, rgba(10, 107, 96, 0.5), rgba(177, 77, 40, 0.5));
  background-clip: padding-box;
}

.experience-rail::-webkit-scrollbar-track {
  background: rgba(255, 246, 231, 0.6);
  border-radius: 999px;
}

.experience-rail-head h3 {
  margin: 0;
  font-size: 1.04rem;
}

.experience-rail-head p {
  margin: 0.25rem 0 0.55rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.rail-actions {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.62rem;
}

.rail-btn {
  width: 100%;
  justify-content: center;
}

.rail-map {
  margin-top: 0.66rem;
}

.rail-map h4 {
  margin: 0 0 0.38rem;
}

/* ─── Discussion Sidebar ─── */
.discussion-level-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.discussion-level-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(177, 77, 40, 0.74);
  border-radius: 999px;
  padding: 0.22rem 0.58rem;
  background: linear-gradient(180deg, #fff, #ffeedf);
  color: #6c3018;
  text-decoration: none;
  font: 600 0.8rem/1.2 "Avenir Next Condensed", "Gill Sans Nova", "Trebuchet MS", sans-serif;
  transition: transform var(--transition-fast), box-shadow var(--transition-normal);
}

body.dark-mode .discussion-level-chip {
  background: linear-gradient(180deg, var(--surface-muted), var(--surface-strong));
  border-color: var(--line-strong);
  color: var(--ink);
}

.discussion-level-chip:hover {
  transform: translateY(-1px);
}

.discussion-level-chip.is-active {
  border-color: var(--brand);
  color: var(--brand-deep);
  background: linear-gradient(180deg, #f9fffd, #dcf3ee);
}

body.dark-mode .discussion-level-chip.is-active {
  background: rgba(78, 197, 177, 0.15);
  border-color: var(--brand);
}

.discussion-topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.discussion-topic-link {
  display: block;
  border: 1px solid rgba(161, 130, 77, 0.6);
  border-radius: var(--radius-sm);
  padding: 0.42rem 0.5rem;
  background: linear-gradient(180deg, #fff, #ffefdb);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.84rem;
  line-height: 1.26;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.dark-mode .discussion-topic-link {
  background: linear-gradient(180deg, var(--surface-muted), var(--surface));
  border-color: var(--line);
}

.discussion-topic-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(142, 63, 28, 0.18);
  border-color: rgba(177, 77, 40, 0.8);
}

.discussion-topic-link.is-active {
  border-color: var(--brand);
  color: var(--brand-deep);
  background: linear-gradient(180deg, #f9fffd, #dcf3ee);
}

body.dark-mode .discussion-topic-link.is-active {
  background: rgba(78, 197, 177, 0.15);
  border-color: var(--brand);
}

.discussion-topic-link:focus-visible {
  outline: 3px solid rgba(10, 107, 96, 0.24);
  outline-offset: 2px;
}

/* ───────────────────────────────────────────────────
   Discussion Step Cards
   ─────────────────────────────────────────────────── */
.discussion-step-card {
  border-color: rgba(118, 156, 143, 0.6);
  background: linear-gradient(170deg, #fffffd, #f5fcf7);
}

body.dark-mode .discussion-step-card {
  background: linear-gradient(170deg, var(--surface), var(--surface-muted));
  border-color: var(--line);
}

.discussion-step-card .module-head {
  background: linear-gradient(180deg, #f6fff9, #e8f6ee);
}

body.dark-mode .discussion-step-card .module-head {
  background: linear-gradient(180deg, var(--surface-strong), var(--surface-muted));
}

.discussion-step-card .module-badge {
  background: #e8f6ee;
  color: #1f4c35;
  border-color: rgba(44, 108, 74, 0.44);
}

body.dark-mode .discussion-step-card .module-badge {
  background: rgba(78, 197, 177, 0.15);
  color: var(--brand);
  border-color: rgba(78, 197, 177, 0.3);
}

.discussion-step-content {
  display: grid;
  gap: 0.64rem;
}

.discussion-step-hint {
  margin: 0;
  padding: 0.45rem 0.56rem;
  border: 1px solid rgba(124, 156, 121, 0.44);
  border-radius: 9px;
  color: #355647;
  background: linear-gradient(180deg, #f8fff8, #edf7ee);
  font-size: 0.91rem;
}

body.dark-mode .discussion-step-hint {
  background: rgba(78, 197, 177, 0.08);
  border-color: rgba(78, 197, 177, 0.2);
  color: var(--ink-soft);
}

/* ─── Statements ─── */
.discussion-statements {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.statement-card {
  border: 1px solid rgba(156, 142, 106, 0.58);
  border-radius: 11px;
  padding: 0.56rem;
  background: linear-gradient(180deg, #fff, #fff5e7);
  transition: transform var(--transition-fast), box-shadow var(--transition-normal);
}

body.dark-mode .statement-card {
  background: linear-gradient(180deg, var(--surface-muted), var(--surface));
  border-color: var(--line);
}

.statement-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(42, 33, 13, 0.1);
}

.statement-card h4 {
  margin: 0 0 0.3rem;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.statement-card p {
  margin: 0;
}

.statement-card-a h4 {
  color: #0f5a83;
}

.statement-card-b h4 {
  color: #8a411f;
}

body.dark-mode .statement-card-a h4 {
  color: #6bb8e0;
}

body.dark-mode .statement-card-b h4 {
  color: #e8855c;
}

/* ─── Discussion Questions ─── */
.discussion-questions {
  display: grid;
  gap: 0.48rem;
}

.discussion-question-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.45rem;
  align-items: start;
  border: 1px solid rgba(154, 141, 108, 0.5);
  border-radius: 10px;
  padding: 0.46rem 0.5rem;
  background: linear-gradient(180deg, #fff, #fff7eb);
}

body.dark-mode .discussion-question-item {
  background: linear-gradient(180deg, var(--surface-muted), var(--surface));
  border-color: var(--line);
}

.discussion-question-index {
  width: 1.42rem;
  height: 1.42rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(44, 108, 74, 0.38);
  color: #1f4c35;
  background: #e8f6ee;
  font: 700 0.82rem/1 "Avenir Next Condensed", "Gill Sans Nova", "Trebuchet MS", sans-serif;
}

body.dark-mode .discussion-question-index {
  background: rgba(78, 197, 177, 0.15);
  border-color: rgba(78, 197, 177, 0.3);
  color: var(--brand);
}

.discussion-question-item p {
  margin: 0;
}

/* ─── Question Hints ─── */
.question-hint-list {
  display: grid;
  gap: 0.5rem;
}

.question-hint-item {
  border: 1px solid rgba(139, 161, 150, 0.58);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f3fbf6);
  overflow: hidden;
  transition: box-shadow var(--transition-normal);
}

body.dark-mode .question-hint-item {
  background: linear-gradient(180deg, var(--surface-muted), var(--surface));
  border-color: var(--line);
}

.question-hint-item[open] {
  box-shadow: 0 4px 12px rgba(33, 77, 51, 0.1);
}

.question-hint-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: start;
  list-style: none;
  cursor: pointer;
  padding: 0.52rem 0.56rem;
  transition: background var(--transition-fast);
}

.question-hint-summary:hover {
  background: rgba(44, 108, 74, 0.04);
}

body.dark-mode .question-hint-summary:hover {
  background: rgba(78, 197, 177, 0.06);
}

.question-hint-summary::-webkit-details-marker {
  display: none;
}

.question-hint-summary::after {
  content: "\u25BE";
  color: #2d5f49;
  transform-origin: center;
  transition: transform 160ms ease;
}

body.dark-mode .question-hint-summary::after {
  color: var(--brand);
}

.question-hint-item:not([open]) .question-hint-summary::after {
  transform: rotate(-90deg);
}

.question-hint-index {
  width: 1.42rem;
  height: 1.42rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(44, 108, 74, 0.38);
  color: #1f4c35;
  background: #e8f6ee;
  font: 700 0.82rem/1 "Avenir Next Condensed", "Gill Sans Nova", "Trebuchet MS", sans-serif;
}

body.dark-mode .question-hint-index {
  background: rgba(78, 197, 177, 0.15);
  border-color: rgba(78, 197, 177, 0.3);
  color: var(--brand);
}

.question-hint-title {
  line-height: 1.35;
  margin-right: 0.24rem;
}

.question-hint-body {
  border-top: 1px solid rgba(139, 161, 150, 0.45);
  padding: 0.5rem 0.56rem 0.56rem;
  background: linear-gradient(180deg, #fcfffd, #eef8f1);
}

body.dark-mode .question-hint-body {
  background: var(--surface-strong);
  border-top-color: var(--line);
}

.question-hint-body > .small-note {
  margin: 0.12rem 0 0.28rem;
}

.question-hint-body ul,
.question-hint-body ol {
  margin-top: 0;
}

/* ───────────────────────────────────────────────────
   Module Map (Rail)
   ─────────────────────────────────────────────────── */
.module-map-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.map-jump-btn {
  width: 100%;
  justify-content: flex-start;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.5rem;
  background: linear-gradient(180deg, #fff, #ffefdb);
}

body.dark-mode .map-jump-btn {
  background: linear-gradient(180deg, var(--surface-muted), var(--surface));
  border-color: var(--line);
}

.map-jump-btn.is-open {
  border-color: var(--brand);
  color: var(--brand-deep);
  background: linear-gradient(180deg, #f7fff9, #e5f8eb);
}

body.dark-mode .map-jump-btn.is-open {
  background: rgba(78, 197, 177, 0.12);
  border-color: var(--brand);
}

.map-index {
  width: 1.22rem;
  text-align: center;
  font-weight: 700;
}

.map-title {
  flex: 1;
  text-align: left;
  font-size: 0.86rem;
}

.map-state {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

/* ───────────────────────────────────────────────────
   Module Cards (Collapsible Sections)
   ─────────────────────────────────────────────────── */
.experience-content {
  min-width: 0;
}

.experience-content > .module-card {
  animation: module-in 360ms cubic-bezier(0.2, 0.85, 0.32, 1) both;
}

.experience-content > .module-card:nth-of-type(2) { animation-delay: 50ms; }
.experience-content > .module-card:nth-of-type(3) { animation-delay: 90ms; }
.experience-content > .module-card:nth-of-type(4) { animation-delay: 130ms; }
.experience-content > .module-card:nth-of-type(5) { animation-delay: 170ms; }
.experience-content > .module-card:nth-of-type(6) { animation-delay: 210ms; }

body.page-exam .experience-content > .module-card,
body.page-discussion .experience-content > .module-card {
  animation: none;
}

.module-card {
  position: relative;
  scroll-margin-top: 62px;
  border: 1px solid rgba(184, 166, 127, 0.64);
  border-radius: var(--radius-lg);
  margin-bottom: 0.95rem;
  overflow: hidden;
  background: linear-gradient(170deg, #fffefb, #fffaf1);
  box-shadow: 0 10px 22px rgba(42, 33, 13, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

body.dark-mode .module-card {
  background: linear-gradient(170deg, var(--surface), var(--surface-muted));
  border-color: var(--line);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.module-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--brand));
  opacity: 0;
  transition: opacity 200ms ease;
}

.module-card:hover::before,
.module-card.is-pulsing::before {
  opacity: 1;
}

.module-card:hover {
  border-color: rgba(10, 107, 96, 0.36);
  transform: translateY(-1px);
}

.module-card.is-pulsing {
  border-color: rgba(10, 107, 96, 0.56);
  box-shadow: 0 0 0 2px rgba(10, 107, 96, 0.14), 0 14px 27px rgba(34, 24, 9, 0.15);
  transform: translateY(-1px);
}

.module-card--nested {
  margin-top: 0.62rem;
  margin-bottom: 0.45rem;
  border-style: dashed;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fffdf8, #fff6eb);
}

body.dark-mode .module-card--nested {
  background: linear-gradient(180deg, var(--surface-strong), var(--surface-muted));
}

.module-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.82rem;
  padding: 0.64rem 0.84rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff8e8, #fff3df);
  transition: background-color 180ms ease;
  cursor: pointer;
  user-select: none;
}

body.dark-mode .module-head {
  background: linear-gradient(180deg, var(--surface-strong), var(--surface-muted));
  border-bottom-color: var(--line);
}

.module-card:hover .module-head {
  background: linear-gradient(180deg, #fff7e4, #ffefd6);
}

body.dark-mode .module-card:hover .module-head {
  background: linear-gradient(180deg, var(--surface-strong), #323744);
}

.module-head:focus-visible {
  outline: 3px solid rgba(10, 107, 96, 0.3);
  outline-offset: -3px;
}

.module-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.52rem;
  min-width: 0;
}

.module-head h3 {
  margin: 0;
  font-size: 1.03rem;
}

.module-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(161, 130, 77, 0.6);
  border-radius: 999px;
  background: #fff4dc;
  color: #6d4c1c;
  padding: 0.08rem 0.42rem;
  font-size: 0.71rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

body.dark-mode .module-badge {
  background: rgba(232, 133, 92, 0.15);
  border-color: rgba(232, 133, 92, 0.3);
  color: var(--accent);
}

.module-body {
  padding: 0.86rem 0.92rem 0.98rem;
  line-height: 1.72;
  color: var(--ink);
}

.module-body p {
  margin: 0;
  text-wrap: pretty;
}

.module-body p + p {
  margin-top: 0.84rem;
}

.module-body p,
.module-body li {
  width: 100%;
  max-width: 100%;
  overflow-wrap: break-word;
}

.module-body ul,
.module-body ol {
  width: 100%;
  max-width: 100%;
}

.module-body h4,
.module-body h5 {
  margin: 0.22rem 0 0.44rem;
}

/* ─── Reading Content ─── */
.reading-content {
  width: 100%;
  max-width: 100%;
}

.reading-content--input {
  font-size: clamp(1.04rem, 0.28vw + 0.95rem, 1.22rem);
  line-height: 1.85;
  letter-spacing: 0.01em;
}

.reading-content--input p {
  max-width: 72ch;
}

.reading-content--input p + p {
  margin-top: 1.15rem;
}

.reading-content--example {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.reading-content--example p + p {
  margin-top: 0.72rem;
}

.module-body.is-collapsed,
.module-card.is-hidden {
  display: none;
}

/* ───────────────────────────────────────────────────
   Expression & Answer Support
   ─────────────────────────────────────────────────── */
.expression-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
}

.expression-list li {
  margin: 0;
}

.answer-support {
  display: grid;
  gap: 0.72rem;
}

.answer-support-intro {
  margin: 0;
  padding: 0.48rem 0.58rem;
  border: 1px solid rgba(161, 130, 77, 0.52);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fff9ec, #fff2db);
}

body.dark-mode .answer-support-intro {
  background: var(--surface-strong);
  border-color: var(--line);
}

.answer-support-item {
  border: 1px solid rgba(178, 155, 110, 0.55);
  border-radius: var(--radius-sm);
  padding: 0.62rem;
  background: rgba(255, 255, 255, 0.8);
}

body.dark-mode .answer-support-item {
  background: var(--surface-muted);
  border-color: var(--line);
}

.answer-support-item h4 {
  margin: 0 0 0.35rem;
}

.answer-support-item > p {
  margin-top: 0.2rem;
}

/* ───────────────────────────────────────────────────
   Quote Training
   ─────────────────────────────────────────────────── */
.quote-training-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.62rem;
}

.quote-action-btn {
  flex: 1 1 200px;
  font-size: 0.86rem;
  padding: 0.34rem 0.78rem;
}

.quote-learning-head {
  margin-bottom: 0.74rem;
}

.quote-learning-head h4 {
  margin: 0 0 0.35rem;
}

.quote-learning-tip {
  margin: 0;
  border: 1px solid rgba(166, 144, 102, 0.58);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fff9ec, #fff2db);
  padding: 0.5rem 0.55rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

body.dark-mode .quote-learning-tip {
  background: var(--surface-strong);
  border-color: var(--line);
}

.quote-block {
  margin-bottom: 0.72rem;
  border: 1px solid rgba(182, 163, 129, 0.48);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fffef9, #fff8ea);
  padding: 0.62rem;
}

body.dark-mode .quote-block {
  background: var(--surface-muted);
  border-color: var(--line);
}

.quote-block p {
  margin: 0;
}

.quote-block p + p {
  margin-top: 0.74rem;
}

/* ───────────────────────────────────────────────────
   Tables
   ─────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.78);
}

body.dark-mode table {
  background: var(--surface);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(178, 155, 110, 0.42);
}

body.dark-mode .table-scroll {
  border-color: var(--line);
}

.argument-matrix-table {
  min-width: 680px;
  table-layout: fixed;
}

.argument-matrix-table th:first-child,
.argument-matrix-table td:first-child {
  width: 24%;
}

.argument-matrix-table td,
.argument-matrix-table th {
  overflow-wrap: anywhere;
}

th,
td {
  border: 1px solid rgba(178, 155, 110, 0.58);
  padding: 0.52rem;
  vertical-align: top;
}

body.dark-mode th,
body.dark-mode td {
  border-color: var(--line);
}

th {
  background: #fff0d9;
  text-align: left;
}

body.dark-mode th {
  background: var(--surface-strong);
}

tr:nth-child(even) td {
  background: rgba(255, 250, 238, 0.8);
}

body.dark-mode tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

blockquote {
  margin: 0.6rem 0;
  padding: 0.66rem 0.86rem;
  border-left: 4px solid var(--line-strong);
  border-radius: 9px;
  background: #fff8e6;
  font-style: italic;
}

body.dark-mode blockquote {
  background: var(--surface-strong);
}

ul,
ol {
  margin: 0.25rem 0 0.64rem 1.2rem;
  padding: 0;
}

li {
  margin-bottom: 0.25rem;
}

/* ───────────────────────────────────────────────────
   Manuscript Panel
   ─────────────────────────────────────────────────── */
.manuscript-panel {
  display: grid;
  gap: 0.72rem;
}

.manuscript-intro {
  margin: 0;
  padding: 0.48rem 0.58rem;
  border: 1px solid rgba(161, 130, 77, 0.52);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fff9ec, #fff2db);
}

body.dark-mode .manuscript-intro {
  background: var(--surface-strong);
  border-color: var(--line);
}

.manuscript-tips {
  margin: 0;
  padding-left: 1rem;
}

.manuscript-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.manuscript-view-btn {
  flex: 1 1 170px;
}

.manuscript-view-btn.is-active {
  border-color: var(--brand);
  color: var(--brand-deep);
  background: linear-gradient(180deg, #f7fff9, #e5f8eb);
}

body.dark-mode .manuscript-view-btn.is-active {
  background: rgba(78, 197, 177, 0.12);
  border-color: var(--brand);
}

.manuscript-pane-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.66rem;
}

.manuscript-pane {
  border: 1px solid rgba(178, 155, 110, 0.55);
  border-radius: var(--radius-sm);
  padding: 0.66rem;
  background: rgba(255, 255, 255, 0.8);
}

body.dark-mode .manuscript-pane {
  background: var(--surface-muted);
  border-color: var(--line);
}

.manuscript-pane h4 {
  margin: 0 0 0.4rem;
}

.manuscript-pane p:last-child {
  margin-bottom: 0;
}

.manuscript-speaker-list {
  display: none;
  gap: 0.66rem;
}

.speaker-card {
  border: 1px solid rgba(178, 155, 110, 0.55);
  border-radius: var(--radius-sm);
  padding: 0.64rem;
  background: rgba(255, 255, 255, 0.8);
}

body.dark-mode .speaker-card {
  background: var(--surface-muted);
  border-color: var(--line);
}

.speaker-card h4 {
  margin: 0 0 0.42rem;
}

.speaker-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.speaker-column {
  border: 1px solid rgba(178, 155, 110, 0.45);
  border-radius: 8px;
  padding: 0.46rem;
  background: #fffdf8;
}

body.dark-mode .speaker-column {
  background: var(--surface-strong);
  border-color: var(--line);
}

.speaker-column h5 {
  margin: 0 0 0.35rem;
  font-size: 0.86rem;
}

.speaker-column p:last-child {
  margin-bottom: 0;
}

.manuscript-panel[data-view="speaker"] .manuscript-pane-grid {
  display: none;
}

.manuscript-panel[data-view="speaker"] .manuscript-speaker-list {
  display: grid;
}

/* ───────────────────────────────────────────────────
   Warnings & Fallbacks
   ─────────────────────────────────────────────────── */
.warn-box,
.fallback-box {
  border: 1px solid #b6422f;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fff8f5, #ffece6);
  padding: 0.8rem;
}

body.dark-mode .warn-box,
body.dark-mode .fallback-box {
  background: linear-gradient(180deg, #2d2020, #332222);
  border-color: #a04040;
}

.fallback-box h2 {
  margin-top: 0;
}

/* ───────────────────────────────────────────────────
   Scroll-to-Top Button
   ─────────────────────────────────────────────────── */
.scroll-top-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 2.8rem;
  height: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 251, 244, 0.92);
  backdrop-filter: blur(8px);
  color: var(--brand-deep);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(42, 28, 10, 0.15);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body.dark-mode .scroll-top-btn {
  background: rgba(35, 39, 48, 0.92);
  border-color: var(--line);
  color: var(--brand);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.scroll-top-btn.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top-btn:hover {
  background: #fff;
  box-shadow: 0 12px 28px rgba(42, 28, 10, 0.22);
  transform: translateY(-2px);
}

body.dark-mode .scroll-top-btn:hover {
  background: var(--surface-strong);
}

.scroll-top-btn:active {
  transform: translateY(0);
}

/* ───────────────────────────────────────────────────
   Footer
   ─────────────────────────────────────────────────── */
.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  padding: 1.2rem 1.4rem;
  background: rgba(255, 251, 244, 0.6);
}

body.dark-mode .site-footer {
  background: rgba(26, 29, 35, 0.8);
  border-top-color: var(--line);
}

.footer-inner {
  max-width: 1560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-nav {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--brand);
  text-decoration: none;
  font: 600 0.84rem/1.2 "Avenir Next Condensed", "Gill Sans Nova", "Trebuchet MS", sans-serif;
  transition: color var(--transition-fast);
}

.footer-nav a:hover {
  color: var(--brand-deep);
  text-decoration: underline;
}

.footer-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

/* ───────────────────────────────────────────────────
   Animations
   ─────────────────────────────────────────────────── */
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes module-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ───────────────────────────────────────────────────
   Responsive: Tablet
   ─────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .site-header {
    position: sticky;
    flex-wrap: wrap;
  }

  .page-shell {
    width: calc(100% - clamp(0.9rem, 2.4vw, 1.8rem));
    padding-top: 0.95rem;
  }

  .experience-shell {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .discussion-cockpit {
    position: relative;
    top: auto;
  }

  .experience-rail {
    position: relative;
    top: auto;
    max-height: none;
    overflow: visible;
  }

  .discussion-topic-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ───────────────────────────────────────────────────
   Responsive: Mobile
   ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .site-header {
    padding: 0.5rem 0.82rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .site-header-nav {
    gap: 0.05rem;
  }

  .site-home-link h1 {
    font-size: 1.08rem;
  }

  .site-breadcrumb ol {
    font-size: 0.7rem;
  }

  .skip-link {
    left: 0.66rem;
    top: 0.5rem;
  }

  .page-shell {
    width: calc(100% - 0.9rem);
    padding: 0.8rem 0 1.46rem;
  }

  .hero-panel {
    padding: 1rem;
    border-radius: 16px;
  }

  .hero-panel h2 {
    font-size: 1.35rem;
  }

  .system-card,
  .topic-header {
    border-radius: 16px;
  }

  .system-grid {
    grid-template-columns: 1fr;
  }

  .module-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .module-title-wrap {
    width: 100%;
    flex-wrap: wrap;
  }

  .toggle-btn,
  .back-link,
  .button-link,
  .map-jump-btn {
    width: 100%;
    justify-content: center;
  }

  .toggle-btn[aria-expanded]::after {
    margin-left: auto;
  }

  .quote-action-btn {
    flex-basis: 100%;
  }

  .discussion-topic-list {
    grid-template-columns: 1fr;
  }

  .discussion-flow-nav {
    grid-template-columns: 1fr;
  }

  .discussion-statements {
    grid-template-columns: 1fr;
  }

  .cockpit-progress {
    max-width: none;
    width: 100%;
  }

  .reading-content--input {
    font-size: 1rem;
    line-height: 1.74;
  }

  .reading-content--input p + p {
    margin-top: 0.9rem;
  }

  p,
  li,
  td,
  th,
  blockquote,
  span,
  small {
    font-size: 0.96rem;
  }

  .lang-toggle-btn {
    width: auto;
    align-self: flex-end;
  }

  .dark-mode-btn {
    width: auto;
    align-self: flex-end;
  }

  .topic-switcher {
    padding: 0.66rem;
  }

  .topic-chip {
    width: 100%;
    justify-content: center;
  }

  .argument-matrix-table {
    min-width: 0;
    table-layout: auto;
  }

  .argument-matrix-table tr:first-child {
    display: none;
  }

  .argument-matrix-table tr {
    display: block;
    margin-bottom: 0.54rem;
    border: 1px solid rgba(178, 155, 110, 0.58);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.84);
  }

  body.page-exam[data-exam-topic] .experience-content .argument-matrix-table tr {
    border-color: var(--exam-topic-border);
    background: linear-gradient(180deg, #ffffff, var(--exam-topic-surface));
  }

  .argument-matrix-table td {
    display: grid;
    grid-template-columns: minmax(5.8rem, 36%) minmax(0, 1fr);
    gap: 0.45rem;
    border: 0;
    border-bottom: 1px solid rgba(178, 155, 110, 0.5);
    padding: 0.5rem;
  }

  .argument-matrix-table td:last-child {
    border-bottom: 0;
  }

  .argument-matrix-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--brand-deep);
  }

  .manuscript-pane-grid {
    grid-template-columns: 1fr;
  }

  .speaker-columns {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-nav {
    flex-direction: column;
    gap: 0.6rem;
    align-items: center;
  }

  .scroll-top-btn {
    bottom: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* ───────────────────────────────────────────────────
   Accessibility: Reduced Motion
   ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ───────────────────────────────────────────────────
   Notion-Style Homepage Reskin
   ─────────────────────────────────────────────────── */
body {
  font-family: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.02em;
}

body.page-home {
  --ink: #37352f;
  --ink-soft: #787774;
  --line: #eaeaea;
  --surface: #ffffff;
  --surface-muted: #f7f7f5;
  background: #ffffff;
}

body.page-home::before {
  display: none;
}

body.page-home .site-header {
  border-bottom-color: #eaeaea;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
}

body.page-home .site-header::after {
  display: none;
}

body.page-home .site-home-link h1 {
  font-size: 1rem;
  font-weight: 600;
  color: #37352f;
}

body.page-home .site-header .lang-toggle-btn,
body.page-home .site-header .dark-mode-btn {
  border-color: #d9d9d6;
  background: #ffffff;
  color: #5f5e5a;
  box-shadow: none;
}

body.page-home .site-header .lang-toggle-btn:hover,
body.page-home .site-header .dark-mode-btn:hover {
  border-color: #c6c6c3;
  background: #f7f7f5;
  color: #37352f;
  box-shadow: none;
}

body.page-home .site-header .lang-toggle-btn:focus-visible,
body.page-home .site-header .dark-mode-btn:focus-visible {
  outline: 2px solid rgba(55, 53, 47, 0.18);
  outline-offset: 2px;
}

body.page-home .page-shell {
  max-width: 1040px;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

body.page-home .home-section + .home-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #eaeaea;
}

body.page-home .hero-panel,
body.page-home .system-card,
body.page-home .onboarding-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.page-home .hero-panel {
  padding: 0;
  margin-bottom: 0;
  overflow: visible;
}

body.page-home .hero-panel::after,
body.page-home .eyebrow::before {
  display: none;
}

body.page-home .home-page-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1rem;
  border-radius: 1rem;
  background: #f1f1ef;
  font-size: 1.8rem;
  line-height: 1;
}

body.page-home .eyebrow {
  margin-bottom: 0.45rem;
  color: #787774;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

body.page-home .hero-panel h2 {
  max-width: 14ch;
  margin: 0 0 0.8rem;
  font-size: clamp(2.25rem, 5vw, 3.4rem);
  line-height: 1.04;
}

body.page-home .hero-panel p:last-child {
  max-width: 64ch;
  margin: 0;
  color: #787774;
  font-size: 1.04rem;
  line-height: 1.7;
}

body.page-home .system-grid {
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 0;
}

body.page-home .system-card {
  gap: 0.85rem;
  padding: 0.25rem 0;
}

body.page-home .system-card:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

body.page-home .system-card-header {
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

body.page-home .system-card-header h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

body.page-home .system-card-stat {
  padding: 0.2rem 0.55rem;
  border: 0;
  border-radius: 0.38rem;
  background: #f1f1ef;
  color: #5f5e5a;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

body.page-home .system-card-desc {
  margin: 0;
  color: #787774;
  font-size: 0.98rem;
  line-height: 1.7;
}

body.page-home .system-card-highlights {
  margin: 0;
  padding-left: 1.1rem;
  gap: 0.45rem;
}

body.page-home .system-card-highlights li {
  color: #37352f;
  font-size: 0.96rem;
  line-height: 1.55;
}

body.page-home .system-card-highlights li::marker {
  color: #9b9a97;
}

body.page-home .system-card-cta {
  margin-top: 0.1rem;
  padding: 0.12rem 0.28rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: #37352f;
  font-size: 0.95rem;
  font-weight: 700;
  justify-self: start;
}

body.page-home .system-card-cta:hover {
  transform: none;
  background: #f1f1ef;
  box-shadow: none;
  color: #37352f;
}

body.page-home .onboarding-panel {
  padding: 0;
}

body.page-home .onboarding-panel h3 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

body.page-home .onboarding-grid {
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

body.page-home .onboarding-step {
  min-height: 100%;
  padding: 1rem 1rem 1.1rem;
  border: 0;
  border-radius: 1rem;
  background: #f1f1ef;
  box-shadow: none;
}

body.page-home .onboarding-step:hover {
  transform: none;
  box-shadow: none;
}

body.page-home .onboarding-step strong {
  display: block;
  width: auto;
  height: auto;
  margin-bottom: 0.75rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #37352f;
  font-size: 1.35rem;
}

body.page-home .onboarding-step h4 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

body.page-home .onboarding-step p {
  margin: 0;
  color: #787774;
  font-size: 0.94rem;
  line-height: 1.6;
}

body.page-home .site-footer {
  border-top-color: #eaeaea;
  background: #ffffff;
}

body.dark-mode.page-home {
  --ink: #e8e6e3;
  --ink-soft: #a8a6a1;
  --line: #2f2f2f;
  background: #191919;
}

body.dark-mode.page-home::before {
  display: none;
}

body.dark-mode.page-home .site-header {
  background: rgba(25, 25, 25, 0.92);
  border-bottom-color: #2f2f2f;
}

body.dark-mode.page-home .site-home-link h1,
body.dark-mode.page-home .hero-panel h2,
body.dark-mode.page-home .system-card-header h2,
body.dark-mode.page-home .onboarding-panel h3,
body.dark-mode.page-home .onboarding-step h4,
body.dark-mode.page-home .onboarding-step strong,
body.dark-mode.page-home .system-card-cta {
  color: #e8e6e3;
}

body.dark-mode.page-home .site-header .lang-toggle-btn,
body.dark-mode.page-home .site-header .dark-mode-btn {
  border-color: #3a3a3a;
  background: #232323;
  color: #c9c7c3;
}

body.dark-mode.page-home .site-header .lang-toggle-btn:hover,
body.dark-mode.page-home .site-header .dark-mode-btn:hover {
  border-color: #4a4a4a;
  background: #2a2a2a;
  color: #e8e6e3;
}

body.dark-mode.page-home .home-section + .home-section,
body.dark-mode.page-home .site-footer {
  border-color: #2f2f2f;
}

body.dark-mode.page-home .home-page-icon,
body.dark-mode.page-home .system-card-stat,
body.dark-mode.page-home .onboarding-step,
body.dark-mode.page-home .system-card-cta:hover {
  background: #2a2a2a;
  color: #e8e6e3;
}

body.dark-mode.page-home .eyebrow,
body.dark-mode.page-home .hero-panel p:last-child,
body.dark-mode.page-home .system-card-desc,
body.dark-mode.page-home .onboarding-step p {
  color: #a8a6a1;
}

@media (max-width: 720px) {
  body.page-home .page-shell {
    padding-top: 1.35rem;
  }

  body.page-home .home-section + .home-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }

  body.page-home .hero-panel h2 {
    max-width: 100%;
  }
}

/* ───────────────────────────────────────────────────
   Expanded Notion Workspace Redesign
   ─────────────────────────────────────────────────── */
:root {
  --bg-canvas: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f7f6f3;
  --surface-strong: #f7f6f3;
  --ink: #37352f;
  --ink-soft: #787774;
  --line: #eaeaea;
  --line-strong: #eaeaea;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 12px;
  --radius-xl: 24px;
  --shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.06);
  --shadow-glow: none;
}

body {
  background: #ffffff;
  color: #37352f;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

body::before,
body.dark-mode::before {
  display: none;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.02em;
}

p,
li,
td,
th,
blockquote,
span,
small {
  line-height: 1.6;
}

.site-header {
  border-bottom: 1px solid #eaeaea;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
}

.site-header::after {
  display: none;
}

.button-link,
.back-link,
.toggle-btn,
.map-jump-btn {
  border-color: #d9d9d6;
  background: #ffffff;
  color: #5f5e5a;
  box-shadow: none;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.button-link::before,
.back-link::before,
.toggle-btn::before,
.map-jump-btn::before {
  display: none;
}

.button-link:hover,
.back-link:hover,
.toggle-btn:hover,
.map-jump-btn:hover {
  border-color: #c9c9c5;
  background: #f7f6f3;
  color: #37352f;
  box-shadow: none;
  transform: none;
}

.button-link:focus-visible,
.back-link:focus-visible,
.toggle-btn:focus-visible,
.map-jump-btn:focus-visible {
  outline: 2px solid rgba(55, 53, 47, 0.18);
}

body.dark-mode {
  --surface: #1f1f1f;
  --surface-muted: #272727;
  --surface-strong: #272727;
  --ink: #e7e5e4;
  --ink-soft: #a8a29e;
  --line: #353535;
  --line-strong: #353535;
  background: #191919;
}

body.dark-mode .site-header {
  background: rgba(25, 25, 25, 0.94);
  border-bottom-color: #353535;
}

body.dark-mode .button-link,
body.dark-mode .back-link,
body.dark-mode .toggle-btn,
body.dark-mode .map-jump-btn {
  border-color: #404040;
  background: #232323;
  color: #d6d3d1;
}

body.dark-mode .button-link:hover,
body.dark-mode .back-link:hover,
body.dark-mode .toggle-btn:hover,
body.dark-mode .map-jump-btn:hover {
  border-color: #4a4a4a;
  background: #2a2a2a;
  color: #f5f5f4;
  box-shadow: none;
}

body.page-exam {
  --category-surface: #e3f2fd;
  --category-accent: #2d9bf0;
  background: #ffffff;
}

body.page-discussion {
  --category-surface: #fff0e5;
  --category-accent: #fa7865;
  background: #ffffff;
}

body.dark-mode.page-exam {
  --category-surface: #193142;
  --category-accent: #67b8ff;
}

body.dark-mode.page-discussion {
  --category-surface: #3a2722;
  --category-accent: #ff9b88;
}

/* Homepage */
body.page-home {
  background: #ffffff;
}

body.page-home .page-shell {
  max-width: 1080px;
}

body.page-home .hero-panel {
  padding: 0;
  background: transparent;
}

body.page-home .hero-panel h2 {
  font-weight: 800;
}

body.page-home .system-grid {
  gap: 1.25rem;
}

body.page-home .system-card {
  border: 0;
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

body.page-home .system-card--exam {
  background: #e3f2fd;
}

body.page-home .system-card--discussion {
  background: #fff0e5;
}

body.page-home .system-card-header h2 {
  font-size: 1.4rem;
}

body.page-home .system-card-stat {
  border: 0;
  border-radius: 6px;
  background: #f1f1ef;
  color: #5f5e5a;
}

body.page-home .system-card-cta {
  padding: 0.62rem 1rem;
  border: 0;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  font-weight: 700;
}

body.page-home .system-card-cta:hover {
  background: #111111;
  color: #ffffff;
}

body.page-home .onboarding-panel {
  padding: 0;
  background: transparent;
}

body.page-home .onboarding-step {
  border: 0;
  border-radius: 12px;
  background: #f7f6f3;
  padding: 1.5rem;
}

body.dark-mode.page-home .system-card--exam {
  background: #1d3242;
}

body.dark-mode.page-home .system-card--discussion {
  background: #3b2823;
}

body.dark-mode.page-home .system-card-stat,
body.dark-mode.page-home .onboarding-step,
body.dark-mode.page-home .home-page-icon {
  background: #2a2a2a;
}

body.dark-mode.page-home .system-card-cta {
  background: #ffffff;
  color: #111111;
}

/* Workspace chrome */
.experience-shell {
  gap: 1.25rem;
}

.experience-rail,
.topic-switcher,
.discussion-cockpit {
  border: 1px solid #eaeaea;
  border-radius: 24px;
  background: #f7f6f3;
  box-shadow: none;
}

.experience-rail {
  padding: 1rem;
}

.experience-rail::-webkit-scrollbar-thumb {
  background: #d6d3d1;
  border-color: transparent;
}

.experience-rail::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}

.topic-switcher,
.discussion-cockpit {
  padding: 1rem;
}

.topic-chip,
.discussion-level-chip,
.discussion-topic-link,
.map-jump-btn,
.manuscript-view-btn {
  border: 1px solid transparent;
  background: transparent;
  color: #37352f;
  box-shadow: none;
}

.topic-chip:hover,
.discussion-level-chip:hover,
.discussion-topic-link:hover,
.map-jump-btn:hover,
.manuscript-view-btn:hover {
  border-color: #e0dfdb;
  background: rgba(255, 255, 255, 0.65);
  color: #37352f;
  box-shadow: none;
}

.topic-chip.is-active,
.discussion-level-chip.is-active,
.discussion-topic-link.is-active,
.map-jump-btn.is-open,
.manuscript-view-btn.is-active {
  border-color: #eaeaea;
  background: #ffffff;
  color: #37352f;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.topic-chip,
.discussion-level-chip {
  border-radius: 999px;
}

.discussion-topic-link,
.map-jump-btn {
  border-radius: 12px;
}

.map-state,
.experience-rail-head p,
.topic-switcher .small-note,
.discussion-cockpit .cockpit-progress-label,
.discussion-cockpit .discussion-flow-chip-step {
  color: #787774;
}

body.dark-mode .experience-rail,
body.dark-mode .topic-switcher,
body.dark-mode .discussion-cockpit {
  border-color: #353535;
  background: #232323;
}

body.dark-mode .topic-chip,
body.dark-mode .discussion-level-chip,
body.dark-mode .discussion-topic-link,
body.dark-mode .map-jump-btn,
body.dark-mode .manuscript-view-btn {
  color: #e7e5e4;
}

body.dark-mode .topic-chip:hover,
body.dark-mode .discussion-level-chip:hover,
body.dark-mode .discussion-topic-link:hover,
body.dark-mode .map-jump-btn:hover,
body.dark-mode .manuscript-view-btn:hover {
  border-color: #404040;
  background: rgba(255, 255, 255, 0.04);
}

body.dark-mode .topic-chip.is-active,
body.dark-mode .discussion-level-chip.is-active,
body.dark-mode .discussion-topic-link.is-active,
body.dark-mode .map-jump-btn.is-open,
body.dark-mode .manuscript-view-btn.is-active {
  border-color: #404040;
  background: #1f1f1f;
  color: #f5f5f4;
}

/* Category header Bento cards */
.topic-header {
  border: 0;
  border-radius: 24px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  background: var(--category-surface, #f7f6f3);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.topic-header::before,
.topic-header .eyebrow::before {
  display: none;
}

.topic-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.9rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--category-accent, #2d9bf0);
  font-size: 1.55rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.topic-header h2 {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
}

.topic-header p:last-child {
  max-width: 48rem;
}

body.dark-mode .topic-header {
  background: var(--category-surface, #232323);
}

body.dark-mode .topic-header-icon {
  background: rgba(255, 255, 255, 0.08);
}

/* Accordions */
.experience-content {
  min-width: 0;
  counter-reset: notion-module-step;
}

.experience-content > .module-card {
  counter-increment: notion-module-step;
}

.module-card,
body.page-exam[data-exam-topic] .experience-content .module-card,
body.page-exam[data-exam-topic] .experience-content .topic-header {
  border: 1px solid #eaeaea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.module-card::before,
body.page-exam[data-exam-topic] .experience-content .module-card::before,
body.page-exam[data-exam-topic] .experience-content .topic-header::before {
  display: none;
}

.module-card:hover,
.module-card.is-pulsing {
  transform: none;
  border-color: #dededb;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.module-card--nested {
  border-style: solid;
  background: #fbfbfa;
}

.module-head,
body.page-exam[data-exam-topic] .experience-content .module-card .module-head {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #eaeaea;
  background: #ffffff;
}

.module-card:hover .module-head,
body.page-exam[data-exam-topic] .experience-content .module-card:hover .module-head {
  background: #ffffff;
}

.experience-content > .module-card > .module-head .module-title-wrap::before {
  content: counter(notion-module-step);
  display: inline-flex;
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 1.9rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--category-accent, #2d9bf0);
  color: #ffffff;
  font-size: 0.83rem;
  font-weight: 700;
}

.module-title-wrap {
  gap: 0.7rem;
}

.module-head h3 {
  font-size: 1rem;
}

.module-badge,
body.page-exam[data-exam-topic] .experience-content .module-card .module-badge {
  border: 0;
  border-radius: 6px;
  background: #f1f1ef;
  color: #5f5e5a;
  text-transform: none;
  letter-spacing: 0;
  padding: 0.14rem 0.45rem;
}

.module-toggle-btn {
  width: 1.9rem;
  height: 1.9rem;
  min-width: 1.9rem;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #787774;
  font-size: 1rem;
}

.module-toggle-btn::before,
.module-toggle-btn::after,
.toggle-btn.module-toggle-btn[aria-expanded]::after {
  display: none !important;
}

.module-toggle-btn:hover {
  background: #f1f1ef;
  color: #37352f;
}

body.dark-mode .module-card,
body.dark-mode.page-exam[data-exam-topic] .experience-content .module-card,
body.dark-mode .module-head,
body.dark-mode.page-exam[data-exam-topic] .experience-content .module-card .module-head {
  border-color: #353535;
  background: #1f1f1f;
}

body.dark-mode .module-card--nested {
  background: #242424;
}

body.dark-mode .module-badge,
body.dark-mode.page-exam[data-exam-topic] .experience-content .module-card .module-badge,
body.dark-mode .module-toggle-btn:hover {
  background: #2a2a2a;
  color: #d6d3d1;
}

.module-body {
  padding: 1rem 1.1rem 1.15rem;
  line-height: 1.6;
}

.module-body > p,
.module-body > ul,
.module-body > ol,
.reading-content,
.reading-content--example,
.discussion-step-hint,
.answer-support-intro,
.quote-learning-tip,
.manuscript-intro {
  max-width: 48rem;
}

.reading-content,
.reading-content--example {
  max-width: 48rem;
}

.reading-content--input {
  width: min(100%, 48rem);
  max-width: 100%;
  font-size: clamp(0.98rem, 0.35vw + 0.9rem, 1.08rem);
  line-height: 1.75;
}

.reading-content--input p {
  max-width: 48rem;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

/* Supporting content blocks */
.statement-card,
.discussion-question-item,
.question-hint-item,
.answer-support-item,
.quote-block,
.manuscript-pane {
  border: 1px solid #eaeaea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: none;
}

.statement-card:hover,
.question-hint-item[open] {
  transform: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.statement-card h4,
.statement-card-a h4,
.statement-card-b h4 {
  color: #37352f;
}

.discussion-question-index,
.question-hint-index {
  border: 0;
  background: #f1f1ef;
  color: #37352f;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.question-hint-summary:hover {
  background: #f7f6f3;
}

.question-hint-body {
  border-top: 1px solid #eaeaea;
  background: #fcfcfb;
}

.answer-support-intro,
.quote-learning-tip,
.manuscript-intro {
  border: 0;
  border-radius: 6px;
  background: #f7f6f3;
}

.quote-block,
.manuscript-pane {
  padding: 0.9rem;
}

body.dark-mode .statement-card,
body.dark-mode .discussion-question-item,
body.dark-mode .question-hint-item,
body.dark-mode .answer-support-item,
body.dark-mode .quote-block,
body.dark-mode .manuscript-pane {
  border-color: #353535;
  background: #1f1f1f;
}

body.dark-mode .discussion-question-index,
body.dark-mode .question-hint-index,
body.dark-mode .answer-support-intro,
body.dark-mode .quote-learning-tip,
body.dark-mode .manuscript-intro,
body.dark-mode .question-hint-summary:hover,
body.dark-mode .question-hint-body {
  background: #272727;
  color: #e7e5e4;
}

body.dark-mode .question-hint-body {
  border-top-color: #353535;
}

/* Notion-style hint callout */
.discussion-step-hint {
  position: relative;
  padding: 0.85rem 0.95rem 0.85rem 2.6rem;
  border: 0;
  border-radius: 6px;
  background: #f7f6f3;
  color: #37352f;
}

.discussion-step-hint::before {
  content: "💡";
  position: absolute;
  left: 0.9rem;
  top: 0.78rem;
}

body.dark-mode .discussion-step-hint {
  background: #272727;
  color: #e7e5e4;
}

/* Footer */
.site-footer {
  border-top: 1px solid #eaeaea;
  background: #ffffff;
}

body.dark-mode .site-footer {
  border-top-color: #353535;
  background: #191919;
}

/* Follow-up refinement: discussion accordions + active exam topic pill */
body.page-discussion .discussion-step-card,
body.page-discussion .module-card,
body.page-discussion .discussion-step-card .module-head {
  background: #ffffff;
}

body.page-discussion .discussion-step-card,
body.page-discussion .module-card {
  border-color: #eaeaea;
}

body.page-discussion .discussion-step-card .module-head {
  border-bottom-color: #eaeaea;
}

body.page-exam .topic-chip.is-active {
  border-color: #c8def4;
  background: var(--category-surface, #e3f2fd);
  color: #1f2937;
  box-shadow: none;
}

body.page-exam .topic-chip.is-active:hover {
  border-color: #b7d3ef;
  background: var(--category-surface, #e3f2fd);
  color: #1f2937;
}

body.dark-mode.page-discussion .discussion-step-card,
body.dark-mode.page-discussion .module-card,
body.dark-mode.page-discussion .discussion-step-card .module-head {
  background: #1f1f1f;
}

body.dark-mode.page-discussion .discussion-step-card,
body.dark-mode.page-discussion .module-card,
body.dark-mode.page-discussion .discussion-step-card .module-head {
  border-color: #353535;
}

body.dark-mode.page-exam .topic-chip.is-active {
  border-color: #3b5973;
  background: #193142;
  color: #e7f2ff;
}

/* Follow-up refinement: 10-topic exam color + emoji map */
body.page-exam[data-exam-topic="bildungssystem"] {
  --category-surface: #e3f2fd;
  --category-accent: #0d47a1;
}

body.page-exam[data-exam-topic="schule-unterricht"] {
  --category-surface: #fff9c4;
  --category-accent: #f57f17;
}

body.page-exam[data-exam-topic="universitaet-studium"] {
  --category-surface: #f3e5f5;
  --category-accent: #4a148c;
}

body.page-exam[data-exam-topic="technologie-medien"] {
  --category-surface: #e0f7fa;
  --category-accent: #006064;
}

body.page-exam[data-exam-topic="gesellschaft-politik"] {
  --category-surface: #efebe9;
  --category-accent: #3e2723;
}

body.page-exam[data-exam-topic="kultur-kunst"] {
  --category-surface: #fce4ec;
  --category-accent: #880e4f;
}

body.page-exam[data-exam-topic="wissenschaft-forschung"] {
  --category-surface: #e8eaf6;
  --category-accent: #1a237e;
}

body.page-exam[data-exam-topic="arbeit-karriere"] {
  --category-surface: #fbe9e7;
  --category-accent: #bf360c;
}

body.page-exam[data-exam-topic="familie-jugend"] {
  --category-surface: #fff3e0;
  --category-accent: #e65100;
}

body.page-exam[data-exam-topic="umwelt-zukunft"] {
  --category-surface: #e8f5e9;
  --category-accent: #1b5e20;
}

body.page-exam .topic-chip[data-topic-id="bildungssystem"] {
  background: #e3f2fd;
  color: #0d47a1;
}

body.page-exam .topic-chip[data-topic-id="schule-unterricht"] {
  background: #fff9c4;
  color: #f57f17;
}

body.page-exam .topic-chip[data-topic-id="universitaet-studium"] {
  background: #f3e5f5;
  color: #4a148c;
}

body.page-exam .topic-chip[data-topic-id="technologie-medien"] {
  background: #e0f7fa;
  color: #006064;
}

body.page-exam .topic-chip[data-topic-id="gesellschaft-politik"] {
  background: #efebe9;
  color: #3e2723;
}

body.page-exam .topic-chip[data-topic-id="kultur-kunst"] {
  background: #fce4ec;
  color: #880e4f;
}

body.page-exam .topic-chip[data-topic-id="wissenschaft-forschung"] {
  background: #e8eaf6;
  color: #1a237e;
}

body.page-exam .topic-chip[data-topic-id="arbeit-karriere"] {
  background: #fbe9e7;
  color: #bf360c;
}

body.page-exam .topic-chip[data-topic-id="familie-jugend"] {
  background: #fff3e0;
  color: #e65100;
}

body.page-exam .topic-chip[data-topic-id="umwelt-zukunft"] {
  background: #e8f5e9;
  color: #1b5e20;
}

body.page-exam .topic-chip {
  border-color: transparent;
}

body.page-exam .topic-chip.is-active {
  background: var(--category-surface, #e3f2fd);
  color: var(--category-accent, #0d47a1);
  border-color: rgba(0, 0, 0, 0.04);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

body.page-exam .experience-content > .module-card > .module-head .module-title-wrap::before {
  background: var(--category-accent, #0d47a1);
  color: #ffffff;
}

body.dark-mode.page-exam[data-exam-topic="bildungssystem"] {
  --category-surface: #1d3554;
  --category-accent: #9cc4ff;
}

body.dark-mode.page-exam[data-exam-topic="schule-unterricht"] {
  --category-surface: #413a1f;
  --category-accent: #ffd466;
}

body.dark-mode.page-exam[data-exam-topic="universitaet-studium"] {
  --category-surface: #34233d;
  --category-accent: #d1a7ff;
}

body.dark-mode.page-exam[data-exam-topic="technologie-medien"] {
  --category-surface: #17363b;
  --category-accent: #81ebf6;
}

body.dark-mode.page-exam[data-exam-topic="gesellschaft-politik"] {
  --category-surface: #332c29;
  --category-accent: #f1d2bf;
}

body.dark-mode.page-exam[data-exam-topic="kultur-kunst"] {
  --category-surface: #3e2430;
  --category-accent: #ffb5d3;
}

body.dark-mode.page-exam[data-exam-topic="wissenschaft-forschung"] {
  --category-surface: #242b44;
  --category-accent: #b7c0ff;
}

body.dark-mode.page-exam[data-exam-topic="arbeit-karriere"] {
  --category-surface: #3c2723;
  --category-accent: #ffb79e;
}

body.dark-mode.page-exam[data-exam-topic="familie-jugend"] {
  --category-surface: #413224;
  --category-accent: #ffc78b;
}

body.dark-mode.page-exam[data-exam-topic="umwelt-zukunft"] {
  --category-surface: #203827;
  --category-accent: #9fe0a6;
}

/* Follow-up refinement: discussion sidebar emoji scanability + calm Notion states */
body.page-discussion .discussion-theme-rail {
  background: #f7f6f3;
}

body.page-discussion .discussion-topic-link {
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #37352f;
  box-shadow: none;
}

body.page-discussion .discussion-topic-link:hover {
  border-color: transparent;
  background: #eaeaea;
  color: #37352f;
  box-shadow: none;
  transform: none;
}

body.page-discussion .discussion-topic-link.is-active {
  border-color: #eaeaea;
  background: #ffffff;
  color: #37352f;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

body.page-discussion .discussion-topic-link:focus-visible {
  outline: 2px solid rgba(55, 53, 47, 0.16);
}

body.dark-mode.page-discussion .discussion-theme-rail {
  background: #232323;
}

body.dark-mode.page-discussion .discussion-topic-link {
  color: #e7e5e4;
}

body.dark-mode.page-discussion .discussion-topic-link:hover {
  background: #2b2b2b;
  color: #f5f5f4;
}

body.dark-mode.page-discussion .discussion-topic-link.is-active {
  border-color: #3a3a3a;
  background: #1f1f1f;
  color: #f5f5f4;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
}



/* Follow-up refinement: exam question numbering uses 1) style */
.exam-question-list {
  list-style: none;
  margin: 0;
  padding-left: 0;
  counter-reset: exam-question-item;
}

.exam-question-list > li {
  counter-increment: exam-question-item;
  position: relative;
  padding-left: 2.1rem;
}

.exam-question-list > li::before {
  content: counter(exam-question-item) ")";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ink);
  font-weight: 500;
}

.exam-question-list > li + li {
  margin-top: 0.6rem;
}


/* Follow-up refinement: smartphone-friendly Argumentmatrix */
.argument-matrix-table td,
.argument-matrix-table th {
  hyphens: auto;
}

@media (max-width: 720px) {
  body.page-exam .experience-content .table-scroll {
    overflow-x: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  body.page-exam .experience-content .argument-matrix-table {
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 0.75rem;
  }

  body.page-exam .experience-content .argument-matrix-table tr {
    display: block;
    margin: 0;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  }

  body.page-exam[data-exam-topic] .experience-content .argument-matrix-table tr {
    border-color: var(--exam-topic-border);
    background: #ffffff;
  }

  body.page-exam .experience-content .argument-matrix-table td {
    display: grid;
    grid-template-columns: minmax(4.6rem, 32%) minmax(0, 1fr);
    align-items: start;
    gap: 0.42rem 0.65rem;
    padding: 0.72rem 0.82rem;
    border: 0;
    border-bottom: 1px solid #eaeaea;
    background: transparent;
    font-size: 0.96rem;
    line-height: 1.6;
  }

  body.page-exam[data-exam-topic] .experience-content .argument-matrix-table td {
    border-bottom-color: var(--exam-topic-border);
  }

  body.page-exam .experience-content .argument-matrix-table td:first-child {
    display: block;
    width: 100%;
    padding: 0.78rem 0.82rem;
    border-bottom: 1px solid #eaeaea;
    background: #f7f6f3;
    color: #37352f;
    font-weight: 700;
  }

  body.page-exam[data-exam-topic] .experience-content .argument-matrix-table td:first-child {
    border-bottom-color: var(--exam-topic-border);
    background: var(--exam-topic-accent-soft);
    color: var(--exam-topic-accent-deep);
  }

  body.page-exam .experience-content .argument-matrix-table td:last-child {
    border-bottom: 0;
  }

  body.page-exam .experience-content .argument-matrix-table td::before {
    content: attr(data-label);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #787774;
  }

  body.page-exam .experience-content .argument-matrix-table td:first-child::before {
    display: none;
  }

  body.dark-mode.page-exam .experience-content .table-scroll {
    background: transparent;
  }

  body.dark-mode.page-exam .experience-content .argument-matrix-table tr,
  body.dark-mode.page-exam[data-exam-topic] .experience-content .argument-matrix-table tr {
    border-color: #353535;
    background: #1f1f1f;
    box-shadow: none;
  }

  body.dark-mode.page-exam .experience-content .argument-matrix-table td {
    border-bottom-color: #353535;
  }

  body.dark-mode.page-exam .experience-content .argument-matrix-table td:first-child {
    border-bottom-color: #353535;
    background: #272727;
    color: #f5f5f4;
  }

  body.dark-mode.page-exam .experience-content .argument-matrix-table td::before {
    color: #a8a29e;
  }
}


/* Follow-up refinement: exam content should use box width more fully */
body.page-exam .module-body > p,
body.page-exam .module-body > ul,
body.page-exam .module-body > ol,
body.page-exam .reading-content,
body.page-exam .reading-content--example,
body.page-exam .reading-content--input,
body.page-exam .reading-content--input p,
body.page-exam .expression-list,
body.page-exam .expression-list li,
body.page-exam .answer-support-intro,
body.page-exam .quote-learning-tip {
  width: 100%;
  max-width: none;
}

body.page-exam .reading-content--input {
  font-size: clamp(1rem, 0.22vw + 0.96rem, 1.08rem);
}

@media (max-width: 720px) {
  body.page-exam .module-body > p,
  body.page-exam .module-body > ul,
  body.page-exam .module-body > ol,
  body.page-exam .reading-content,
  body.page-exam .reading-content--example,
  body.page-exam .reading-content--input,
  body.page-exam .reading-content--input p,
  body.page-exam .expression-list,
  body.page-exam .expression-list li,
  body.page-exam .answer-support-intro,
  body.page-exam .quote-learning-tip {
    width: 100%;
    max-width: 100%;
  }
}


/* Follow-up refinement: Eingabetext important terms */
.reading-content--input strong {
  font-weight: 700;
  color: #2f2d28;
}

body.dark-mode .reading-content--input strong {
  color: #f5f5f4;
}
