:root {
  --bg: #f7f8f5;
  --paper: #ffffff;
  --ink: #18211f;
  --muted: #5d6a66;
  --line: #dfe6df;
  --accent: #0f766e;
  --accent-strong: #0a4f49;
  --accent-soft: #dff3ef;
  --warm: #f3efe3;
  --shadow: 0 18px 45px rgba(24, 33, 31, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.68;
}

a {
  color: inherit;
}

.site-layout {
  min-height: 100vh;
}

.site-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 20;
  width: 292px;
  height: 100dvh;
  padding: 18px 14px;
  background: rgba(250, 251, 248, 0.96);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(12px);
  overflow-y: auto;
}

.page-shell {
  margin-left: 292px;
  min-width: 0;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 4px 4px 18px;
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-strong);
  color: #ffffff;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 14px;
}

.module-link,
.chapter-link {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}

.module-link:hover,
.chapter-link:hover,
.module-link.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.module-link.active .nav-number,
.module-link:hover .nav-number {
  background: var(--accent);
  color: #ffffff;
}

.overview-link {
  margin-bottom: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 760;
}

.nav-number {
  display: inline-grid;
  flex: 0 0 auto;
  width: 26px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  background: #eef3ef;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.nav-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-tools {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.chapter-nav {
  margin: 2px 0 9px 22px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.chapter-link {
  display: block;
  font-size: 13px;
  line-height: 1.35;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero,
.module-hero {
  padding: 64px 0 38px;
}

.hero.compact {
  padding-bottom: 18px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 880px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
}

h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

p {
  margin: 0 0 14px;
}

.hero-lead {
  max-width: 780px;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
}

.overview-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 32px;
  align-items: center;
  min-height: 650px;
  padding: 58px 0 34px;
}

.overview-copy h1 {
  max-width: 960px;
  font-size: clamp(42px, 6.5vw, 82px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-actions a {
  padding: 11px 16px;
  border: 1px solid #a7d7ce;
  border-radius: 999px;
  color: var(--accent);
  font-weight: 760;
  text-decoration: none;
}

.hero-actions a:first-child {
  background: var(--accent);
  color: #ffffff;
}

.overview-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 560px;
  margin-top: 28px;
}

.overview-stats div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.overview-stats strong {
  display: block;
  color: var(--accent-strong);
  font-size: 28px;
  line-height: 1;
}

.overview-stats span {
  color: var(--muted);
  font-size: 13px;
}

.hero-machine {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #cfe1dc;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(239, 250, 247, 0.92)),
    repeating-linear-gradient(90deg, rgba(15, 118, 110, 0.06) 0, rgba(15, 118, 110, 0.06) 1px, transparent 1px, transparent 34px);
  box-shadow: var(--shadow);
}

.machine-card {
  padding: 20px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 10px;
  background: #ffffff;
}

.machine-card span,
.episode-stage {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.machine-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.machine-card p {
  margin: 0;
  color: var(--muted);
}

.machine-arrow {
  justify-self: center;
  color: var(--accent);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.overview-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
  align-items: center;
}

.overview-story > div:first-child p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.story-card {
  padding: 22px;
  border: 1px solid #a7d7ce;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #effaf7 100%);
}

.story-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.story-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 23px;
}

.story-card p {
  margin: 0;
  color: #244c47;
}

.overview-lenses input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.lens-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7fbf9;
}

.lens-tabs label {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 760;
}

#lens-cashflow:checked ~ .lens-tabs label[for="lens-cashflow"],
#lens-risk:checked ~ .lens-tabs label[for="lens-risk"],
#lens-decision:checked ~ .lens-tabs label[for="lens-decision"] {
  background: var(--accent);
  color: #ffffff;
}

.lens-panel {
  display: none;
  padding: 24px;
  border: 1px solid #cfe1dc;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf9 100%);
}

#lens-cashflow:checked ~ .lens-panels .cashflow-panel,
#lens-risk:checked ~ .lens-panels .risk-panel,
#lens-decision:checked ~ .lens-panels .decision-panel {
  display: block;
}

.lens-panel h3 {
  font-size: 26px;
}

.lens-panel > p {
  max-width: 860px;
  color: var(--muted);
  font-size: 17px;
}

.lens-panel ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.lens-panel li {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.lens-panel b {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-strong);
}

.lens-panel span {
  color: var(--muted);
  font-size: 14px;
}

.route-section h2 {
  max-width: 820px;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.episode-card {
  display: grid;
  gap: 8px;
  min-height: 210px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.episode-card:hover {
  transform: translateY(-2px);
  border-color: #9ccfc6;
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.08);
}

.episode-card h3 {
  font-size: 22px;
}

.episode-card p {
  color: #244c47;
}

.episode-card small {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.principle-grid article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfa;
}

.principle-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: 18px;
}

.principle-grid p {
  margin: 0;
  color: var(--muted);
}

.story-module-hero,
.story-lesson-hero {
  padding: 62px 0 34px;
}

.story-module-hero h1,
.story-lesson-hero h1 {
  max-width: 980px;
}

.story-hero-note {
  width: min(680px, 100%);
  margin-top: 26px;
  padding: 18px;
  border: 1px solid #a7d7ce;
  border-radius: 10px;
  background: #f0faf7;
}

.story-hero-note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
}

.story-hero-note p {
  margin: 0;
  color: #244c47;
  font-size: 20px;
  font-weight: 760;
}

.story-module-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: center;
}

.story-module-intro > div:first-child p,
.concept-dashboard > div p {
  max-width: 820px;
  color: var(--muted);
  font-size: 17px;
}

.story-quote {
  padding: 20px;
  border: 1px solid #a7d7ce;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #effaf7 100%);
}

.story-quote span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.story-quote p {
  margin: 0;
  color: #244c47;
  font-size: 18px;
  font-weight: 760;
}

.story-machine-grid,
.story-chapter-grid,
.lesson-story-cards,
.takeaway-grid {
  display: grid;
  gap: 14px;
}

.story-machine-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.story-machine-grid article,
.story-chapter-card,
.lesson-story-cards article,
.takeaway-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfa;
}

.story-machine-grid strong,
.lesson-story-cards strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: 18px;
}

.story-machine-grid p,
.story-chapter-card p,
.lesson-story-cards p {
  margin: 0;
  color: var(--muted);
}

.story-perspectives input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.story-perspective-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7fbf9;
}

.story-perspective-tabs label {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 760;
}

.story-perspectives input:nth-of-type(1):checked ~ .story-perspective-tabs label:nth-of-type(1),
.story-perspectives input:nth-of-type(2):checked ~ .story-perspective-tabs label:nth-of-type(2),
.story-perspectives input:nth-of-type(3):checked ~ .story-perspective-tabs label:nth-of-type(3) {
  background: var(--accent);
  color: #ffffff;
}

.story-perspective-panel {
  display: none;
  padding: 22px;
  border: 1px solid #cfe1dc;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf9 100%);
}

.story-perspectives input:nth-of-type(1):checked ~ .story-perspective-panels .panel-1,
.story-perspectives input:nth-of-type(2):checked ~ .story-perspective-panels .panel-2,
.story-perspectives input:nth-of-type(3):checked ~ .story-perspective-panels .panel-3 {
  display: block;
}

.story-perspective-panel h3 {
  font-size: 26px;
}

.story-perspective-panel p {
  max-width: 840px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.story-chapter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.story-chapter-card {
  display: grid;
  align-content: start;
  min-height: 190px;
  color: var(--ink);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.story-chapter-main {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.story-chapter-card:hover {
  transform: translateY(-2px);
  border-color: #9ccfc6;
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.08);
}

.story-chapter-main > span,
.lesson-story-cards span,
.takeaway-grid span {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.story-chapter-card h3 {
  font-size: 22px;
}

.story-chapter-card small {
  display: block;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.story-scene {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.story-scene p {
  max-width: 900px;
  font-size: 17px;
}

.story-scene aside {
  padding: 18px;
  border: 1px solid #a7d7ce;
  border-radius: 10px;
  background: #f0faf7;
}

.story-scene aside span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.story-scene aside p {
  margin: 0;
  color: #244c47;
  font-size: 18px;
  font-weight: 760;
}

.lesson-story-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.lesson-story-flow li {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid #b8dcd5;
  border-radius: 999px;
  background: #f7fbf9;
  color: #164c46;
}

.lesson-story-flow span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.lesson-story-flow strong {
  font-size: 14px;
}

.lesson-story-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lesson-story-cards article {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf9 100%);
}

.pitfall-switch {
  display: grid;
  gap: 12px;
}

.pitfall-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.pitfall-item[open] {
  border-color: #a7d7ce;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.08);
}

.pitfall-item summary {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.pitfall-item summary::-webkit-details-marker {
  display: none;
}

.pitfall-item summary span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.pitfall-item summary strong {
  font-size: 18px;
}

.pitfall-item p {
  margin: 0;
  padding: 0 18px 12px 18px;
  color: var(--muted);
}

.pitfall-item b {
  color: var(--accent-strong);
}

.takeaway-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.takeaway-grid article {
  background: #ffffff;
}

.takeaway-grid p {
  margin: 0;
  color: #244c47;
  font-weight: 700;
}

.section {
  margin: 28px 0;
  padding: 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.section.note {
  background: var(--warm);
}

.lesson-section p {
  max-width: 860px;
  font-size: 17px;
}

.deep-reader .lesson-section p {
  max-width: 920px;
}

.big-question {
  color: var(--accent);
  font-size: 24px;
  font-weight: 760;
}

.section-note {
  max-width: 820px;
  margin: -4px 0 18px;
  color: var(--muted);
}

.mechanism-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.mechanism-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 176px;
  padding: 18px;
  border: 1px solid #b8dcd5;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #effaf7 100%);
  color: #164c46;
}

.mechanism-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.mechanism-head span {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.mechanism-head strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.mechanism-step p {
  margin: 0;
  color: #244c47;
}

.mechanism-label {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.mechanism-step small {
  display: block;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 118, 110, 0.18);
  color: var(--muted);
  line-height: 1.55;
}

.position-map .mechanism-step {
  min-height: 150px;
}

.position-map b {
  color: var(--accent);
}

.mechanism-lab {
  display: grid;
  gap: 18px;
}

.mechanism-route {
  padding: 16px;
  border: 1px solid #cfe1dc;
  border-radius: 8px;
  background: #f7fbf9;
}

.mechanism-route > span,
.compass-label {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.mechanism-route ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mechanism-route li {
  padding: 7px 10px;
  border: 1px solid #b8dcd5;
  border-radius: 999px;
  background: #ffffff;
  color: #164c46;
  font-size: 13px;
  font-weight: 700;
}

.lesson-panels {
  display: grid;
  gap: 12px;
}

.lesson-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.lesson-panel[open] {
  border-color: #a7d7ce;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.08);
}

.lesson-panel summary {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.lesson-panel summary::-webkit-details-marker {
  display: none;
}

.lesson-panel summary span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.lesson-panel summary strong {
  font-size: 19px;
}

.lesson-panel > p {
  margin: 0;
  padding: 0 18px 16px 48px;
  color: #244c47;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 18px 48px;
}

.panel-grid > div {
  padding: 14px;
  border-radius: 8px;
  background: #f7fbf9;
}

.panel-grid b {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
}

.panel-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.system-compass {
  display: grid;
  gap: 16px;
}

.compass-core {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid #cfe1dc;
  border-radius: 8px;
  background: #f7fbf9;
}

.compass-core h3 {
  margin-bottom: 6px;
  font-size: 21px;
}

.compass-core p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.module-jump {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid #a7d7ce;
  border-radius: 999px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
}

.context-route {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.context-card {
  display: block;
  min-height: 168px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
}

.context-card.current {
  border-color: #a7d7ce;
  background: linear-gradient(180deg, #ffffff 0%, #effaf7 100%);
}

.context-card.muted {
  color: var(--muted);
  background: #fbfcfa;
}

.context-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.context-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.35;
}

.context-card p,
.context-card small {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.context-card small {
  display: block;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 118, 110, 0.16);
}

.context-tags {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.context-tags > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.context-tags strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
}

.context-tags p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.three-cols,
.card-grid,
.module-grid {
  display: grid;
  gap: 16px;
}

.three-cols {
  grid-template-columns: repeat(3, 1fr);
}

.three-cols > div,
.mini-card,
.module-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.three-cols strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.card-grid {
  grid-template-columns: repeat(3, 1fr);
}

.explain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.explain-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.explain-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
}

.mini-card span {
  display: block;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.mini-card p {
  color: var(--muted);
}

.module-grid {
  grid-template-columns: repeat(2, 1fr);
}

.module-card {
  display: block;
  color: var(--ink);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease;
}

.module-card:hover {
  transform: translateY(-2px);
  border-color: #9ccfc6;
}

.module-id {
  display: inline-flex;
  width: 42px;
  height: 30px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.split {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 22px;
  align-items: start;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 15px;
}

.visual-table {
  min-width: 540px;
}

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

th {
  background: #f1f5f0;
  color: #293834;
  font-weight: 760;
}

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #eef3ef;
  color: #2c5d57;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.source-link {
  display: inline-flex;
  align-items: center;
  margin: 0 3px 4px 0;
  padding: 2px 7px;
  border-radius: 6px;
  background: #eef3ef;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
}

.source-link:hover {
  background: var(--accent-soft);
}

.source-group {
  display: inline;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 26px 0 54px;
}

.callout {
  padding: 18px;
  border: 1px solid #b8dcd5;
  border-radius: 8px;
  background: #f0faf7;
}

.callout strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
}

.formula-strip {
  display: flex;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #b8dcd5;
  border-radius: 8px;
  background: #f0faf7;
}

.formula-strip span {
  color: var(--accent);
  font-weight: 760;
}

.formula-strip code {
  font-size: 15px;
}

.check-list {
  margin: 0;
  padding-left: 20px;
}

.check-list li {
  margin: 8px 0;
}

.pager a {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--accent);
  font-weight: 760;
  text-decoration: none;
}

.site-footer {
  margin-top: 56px;
  padding: 26px clamp(18px, 4vw, 48px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 820px) {
  .site-layout {
    display: block;
  }

  .site-sidebar {
    position: sticky;
    left: auto;
    bottom: auto;
    width: auto;
    height: auto;
    max-height: 44vh;
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    display: block;
    margin-bottom: 8px;
  }

  .page-shell {
    margin-left: 0;
  }

  .three-cols,
  .card-grid,
  .explain-grid,
  .module-grid,
  .overview-hero,
  .overview-story,
  .story-module-intro,
  .story-machine-grid,
  .story-chapter-grid,
  .story-scene,
  .lesson-story-cards,
  .takeaway-grid,
  .episode-grid,
  .principle-grid,
  .lens-panel ol,
  .context-route,
  .context-tags,
  .panel-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .overview-hero {
    min-height: auto;
    padding-top: 34px;
  }

  .overview-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .compass-core {
    display: block;
  }

  .module-jump {
    display: inline-flex;
    margin-top: 14px;
  }

  .lesson-panel > p,
  .panel-grid {
    padding-left: 18px;
  }

  h1 {
    font-size: 42px;
  }

  .overview-copy h1 {
    font-size: 42px;
  }

  .section {
    padding: 22px;
  }
}

@media (max-width: 640px) {
  .overview-stats {
    grid-template-columns: 1fr;
  }

  .lens-tabs {
    display: grid;
    border-radius: 12px;
  }

  .lens-tabs label,
  .story-perspective-tabs label {
    text-align: center;
  }

  .story-perspective-tabs {
    display: grid;
    border-radius: 12px;
  }

  table,
  .visual-table {
    min-width: 0;
  }

  thead {
    display: none;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
    border-bottom: 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 760;
  }
}
