:root {
  --paper: #f6f1e8;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #17201b;
  --muted: #667069;
  --line: #d8cfbd;
  --blue: #2454a6;
  --green: #14745b;
  --red: #c94936;
  --gold: #b67b1c;
  --violet: #6d4aa2;
  --soft-blue: #e8eef9;
  --soft-green: #e5f2ee;
  --soft-red: #fae9e5;
  --soft-gold: #f8edd8;
  --soft-violet: #eee9f6;
  --shadow: 0 18px 48px rgba(45, 39, 29, .12);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255,255,255,.62), rgba(255,255,255,0) 320px), var(--paper);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}
a { color: inherit; }
.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}
.site-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green) 0 48%, transparent 49%), linear-gradient(315deg, var(--gold) 0 48%, var(--blue) 49%);
  border: 2px solid rgba(23, 32, 27, .12);
}
.home-hero,
.lesson-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 22px;
}
.home-hero,
.hero-copy,
.visual-panel,
.lesson-block,
.note,
.resource-strip,
.index-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.home-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 46px);
}
.home-hero::before,
.hero-copy::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 9px;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--gold), var(--red));
}
.hero-copy {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  padding: clamp(26px, 4vw, 46px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.kicker {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 14px;
  font-weight: 900;
}
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: 0; }
h1 {
  max-width: 780px;
  font-size: clamp(38px, 5.2vw, 68px);
}
.home-hero h1 { max-width: 760px; }
.lead {
  max-width: 720px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
}
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-weight: 900;
  text-decoration: none;
}
.primary-link {
  background: var(--ink);
  color: #fffdf8;
}
.secondary-link {
  background: var(--surface-strong);
  color: var(--ink);
  border: 1px solid var(--line);
}
.home-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-self: center;
}
.home-board div {
  min-height: 150px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.68);
}
.home-board b {
  display: block;
  margin-bottom: 18px;
  font-size: 46px;
}
.home-board span {
  color: var(--muted);
  font-weight: 900;
}
.lesson-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 34px;
}
.lesson-meta div {
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .62);
}
.lesson-meta b { display: block; margin-bottom: 4px; font-size: 14px; }
.lesson-meta span { color: var(--muted); font-size: 14px; }
.visual-panel {
  padding: 20px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  background: #fbfaf5;
}
.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}
.panel-head p { margin: 8px 0 0; color: var(--muted); }
.lesson-visual {
  width: 100%;
  min-height: 330px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(36,84,166,.06) 1px, transparent 1px), linear-gradient(180deg, rgba(36,84,166,.06) 1px, transparent 1px), #fff;
  background-size: 42px 42px;
}
.lesson-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}
.progress-pill {
  height: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  overflow: hidden;
}
.progress-pill span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--gold));
}
.lesson-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr);
  gap: 20px;
  margin-bottom: 20px;
}
.lesson-block,
.note,
.resource-strip,
.index-section {
  padding: clamp(22px, 3vw, 34px);
}
.lesson-block h2,
.note h2,
.resource-strip h2,
.index-section h2 {
  font-size: clamp(24px, 3vw, 36px);
  margin-bottom: 14px;
}
.lesson-block p,
.note p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}
.point-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.point-list li {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--muted);
}
.exercise {
  background: var(--soft-green);
  border-color: rgba(20, 116, 91, .34);
}
.note {
  background: var(--soft-gold);
  border-color: rgba(182, 123, 28, .35);
  box-shadow: none;
}
.answer {
  margin-top: 14px;
  border: 1px solid rgba(20, 116, 91, .35);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
.answer summary {
  cursor: pointer;
  padding: 13px 14px;
  font-weight: 900;
  list-style: none;
}
.answer summary::-webkit-details-marker { display: none; }
.answer div { padding: 0 14px 14px; color: var(--muted); }
.resource-strip,
.index-section {
  margin-bottom: 22px;
  box-shadow: none;
}
.section-head p {
  margin: 0 0 5px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.resource-card {
  min-height: 142px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  text-decoration: none;
}
.resource-card span {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}
.resource-card strong { line-height: 1.25; }
.resource-card em {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
}
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}
.course-card {
  min-height: 166px;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease;
}
.course-card:hover {
  transform: translateY(-3px);
  border-color: rgba(36, 84, 166, .45);
}
.course-card span {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}
.course-card strong {
  font-size: 20px;
  line-height: 1.2;
}
.course-card em {
  color: var(--muted);
  font-style: normal;
}
.disclaimer {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.axis { stroke: #d8cfbd; stroke-width: 2; }
.thin-lines line, .thin-lines path { stroke: #d8cfbd; stroke-width: 2; }
.blue-path { fill: none; stroke: var(--blue); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.green-path { fill: none; stroke: var(--green); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.red-path { fill: none; stroke: var(--red); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.green-stroke { stroke: var(--green); stroke-width: 7; stroke-linecap: round; }
.green-fill { fill: var(--green); }
.red-fill { fill: var(--red); }
.gold-fill { fill: #d8a13a; }
.dark-fill { fill: var(--ink); }
.green-dot { fill: var(--green); }
.gold-dot { fill: var(--gold); }
.red-dot { fill: var(--red); }
.soft-green { fill: var(--soft-green); }
.soft-blue { fill: var(--soft-blue); }
.soft-red { fill: var(--soft-red); }
.soft-gold { fill: var(--soft-gold); }
.soft-violet { fill: var(--soft-violet); }
.soft-gray { fill: #edf0f2; }
.surface-stroke { fill: var(--surface-strong); stroke: var(--line); stroke-width: 2; }
.big-label { fill: var(--ink); font-size: 26px; font-weight: 900; }
.muted-label { fill: var(--muted); font-size: 18px; font-weight: 800; }
.formula-text { fill: #193965; font-size: 22px; font-weight: 900; text-anchor: middle; }
.white-center { fill: #fffdf8; font-size: 28px; font-weight: 900; text-anchor: middle; }
.small-center { fill: var(--ink); font-size: 18px; font-weight: 900; text-anchor: middle; }
.tiny-center { fill: var(--muted); font-size: 15px; font-weight: 800; text-anchor: middle; }
.small-label { fill: var(--ink); font-size: 22px; font-weight: 900; }
.muted-center { fill: var(--muted); font-size: 18px; font-weight: 800; text-anchor: middle; }
.center { text-anchor: middle; }
.risk-bubbles text { fill: var(--ink); font-size: 17px; font-weight: 900; text-anchor: middle; }
.coin-text { fill: #fffdf8; font-size: 38px; font-weight: 900; text-anchor: middle; }

@media (max-width: 900px) {
  .home-hero,
  .lesson-hero,
  .lesson-grid {
    grid-template-columns: 1fr;
  }
  .hero-copy { min-height: 0; }
  .home-board,
  .lesson-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 22px, 1180px);
    padding-top: 14px;
  }
  .site-top,
  .panel-head,
  .lesson-nav {
    grid-template-columns: 1fr;
    display: grid;
  }
  .home-board,
  .lesson-meta {
    grid-template-columns: 1fr;
  }
  h1 { font-size: clamp(36px, 12vw, 48px); }
  .lesson-visual { min-height: 260px; }
}
