:root {
  color-scheme: dark;
  --bg: #090a0b;
  --surface: #111315;
  --surface-2: #171a1d;
  --ink: #f2f4ef;
  --muted: rgba(242, 244, 239, .62);
  --faint: rgba(242, 244, 239, .25);
  --line: rgba(242, 244, 239, .09);
  --accent: #d1ff00;
  --accent-ink: #111500;
  --warm: #f0bb66;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Noto Sans TC", ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
}
a { color: inherit; }
button, textarea, input { font: inherit; }
textarea { resize: vertical; }
.skip-link { position: fixed; left: -100vw; top: 1rem; z-index: 30; padding: .75rem 1rem; background: var(--accent); color: var(--accent-ink); }
.skip-link:focus { left: 1rem; }
main { overflow: clip; }
.kicker { margin: 0 0 1rem; color: var(--accent); font-size: .72rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }

.lesson-hero {
  min-height: 82vh;
  padding: clamp(4rem, 8vw, 7.5rem) max(24px, calc((100vw - var(--max)) / 2));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(135deg, rgba(209,255,0,.045), transparent 42%),
    radial-gradient(circle at 84% 22%, rgba(209,255,0,.08), transparent 26rem);
  border-bottom: 1px solid var(--line);
}
.hero-meta { display: flex; flex-wrap: wrap; gap: .7rem 1.4rem; color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hero-meta span:first-child { color: var(--accent); }
.chapter-name { max-width: 52rem; margin: 4rem 0 1.1rem; color: var(--muted); font-size: 1rem; }
.lesson-hero h1 {
  max-width: 17em;
  margin: 0;
  font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
  font-size: clamp(3rem, 6vw, 4.75rem);
  line-height: 1.08;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.hero-deck { max-width: 48rem; margin: 2rem 0 2.4rem; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.28rem); }
.ratio-rail { width: min(32rem, 100%); height: 6px; background: rgba(255,255,255,.08); }
.ratio-rail span { display: block; height: 100%; background: var(--accent); }
.lesson-nav { display: flex; gap: 1.25rem; overflow-x: auto; margin-top: 2.8rem; padding-block: .8rem; border-top: 1px solid var(--line); }
.lesson-nav a { min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); font-size: .84rem; text-decoration: none; white-space: nowrap; }
.lesson-nav a:hover, .lesson-nav a:focus-visible { color: var(--ink); }

.thought-hook,
.thesis-section,
.knowledge-section,
.case-section,
.application-section,
.checkpoint,
.boundary-section {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
  padding-block: clamp(4.5rem, 9vw, 8rem);
  border-bottom: 1px solid var(--line);
}
.thought-hook { min-height: 52vh; display: flex; flex-direction: column; justify-content: center; }
.thought-hook blockquote { max-width: 21em; margin: 0; font-family: "Space Grotesk", "Noto Sans TC", sans-serif; font-size: clamp(2.1rem, 4.3vw, 3.7rem); font-weight: 800; line-height: 1.18; letter-spacing: -.02em; text-wrap: pretty; }
.thought-hook > p:last-child { margin: 2rem 0 0; color: var(--muted); }

.thesis-section { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.thesis-section h2, .section-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.15; letter-spacing: -.02em; }
.thesis-section > blockquote { margin: 0; padding-left: 1.6rem; border-left: 4px solid var(--accent); font-size: clamp(1.4rem, 2.6vw, 2.2rem); font-weight: 750; line-height: 1.48; }
.model { grid-column: 1 / -1; min-height: 260px; margin-top: 2rem; position: relative; overflow: hidden; background: var(--surface); border-block: 1px solid var(--line); }

.task-model { display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; gap: 1px; background: var(--line); }
.task-model span { height: 100%; display: grid; place-items: center; background: var(--surface); color: var(--muted); font-weight: 800; }
.task-model strong { position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%); padding: .7rem 1rem; background: var(--accent); color: var(--accent-ink); }
.target-model strong { position: absolute; right: 10%; top: 50%; width: 13rem; height: 7rem; transform: translateY(-50%); display: grid; place-items: center; border: 2px solid var(--accent); color: var(--accent); }
.target-model .path { position: absolute; left: 8%; width: 68%; height: 2px; transform-origin: left; background: linear-gradient(90deg, rgba(255,255,255,.08), var(--accent)); }
.target-model .path-a { top: 30%; transform: rotate(8deg); }
.target-model .path-b { top: 50%; transform: rotate(-2deg); }
.target-model .path-c { top: 70%; transform: rotate(-11deg); }
.estimate-model { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; padding: 2rem; background: var(--line); }
.estimate-model span { display: grid; place-items: center; min-height: 5rem; background: var(--surface); color: var(--muted); }
.estimate-model strong { grid-column: 1 / -1; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 1.4rem; }
.estimate-model b { grid-column: 1 / -1; text-align: right; color: var(--warm); }
.range-model { display: grid; place-items: center; }
.range-model span { position: absolute; display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(209,255,0,.5); color: var(--muted); }
.range-model span:nth-child(1) { width: 240px; }
.range-model span:nth-child(2) { width: 185px; }
.range-model span:nth-child(3) { width: 130px; }
.range-model span:nth-child(4) { width: 76px; background: var(--accent); color: var(--accent-ink); font-size: .78rem; text-align: center; }
.comparison-model, .context-model, .timeline-model, .decision-model { display: flex; align-items: center; justify-content: center; gap: clamp(.7rem, 3vw, 2.4rem); padding: 2rem; }
.comparison-model span, .context-model span { min-width: 9rem; padding: 1.4rem; text-align: center; border: 1px solid var(--line); font-size: 2rem; font-weight: 900; }
.comparison-model small, .context-model small { display: block; margin-top: .3rem; color: var(--muted); font-size: .72rem; font-weight: 600; }
.comparison-model .focus { background: var(--accent); color: var(--accent-ink); }
.comparison-model .focus small { color: rgba(17,21,0,.68); }
.context-model span { height: 9rem; display: grid; place-content: center; background: rgba(255,255,255,.025); }
.timeline-model span, .decision-model span { font-weight: 800; text-align: center; }
.timeline-model i { width: 7rem; height: 2px; background: linear-gradient(90deg, var(--accent), rgba(209,255,0,.14)); }
.decision-model i { color: var(--accent); font-style: normal; }

.knowledge-section { display: grid; grid-template-columns: .7fr 1.3fr; gap: clamp(2rem, 6vw, 6rem); }
.section-heading { position: sticky; top: 2rem; align-self: start; }
.section-heading > p:last-child { max-width: 30rem; margin-top: 1.5rem; color: var(--muted); }
.concepts { display: grid; }
.concept { display: grid; grid-template-columns: 3rem 1fr; gap: 1.2rem; padding: 2.2rem 0; border-top: 1px solid var(--line); }
.concept:first-child { border-top: 0; padding-top: 0; }
.concept > span { color: var(--accent); font-size: .8rem; font-weight: 900; }
.concept h3 { margin: 0 0 .8rem; font-size: clamp(1.35rem, 2.2vw, 1.9rem); }
.concept p { margin: 0; color: var(--muted); }

.case-section { padding-inline: clamp(1.4rem, 5vw, 4rem); background: var(--surface); }
.case-section h2 { max-width: 22em; margin: 0; font-size: clamp(2.2rem, 4.5vw, 4rem); line-height: 1.12; }
.case-section > p:not(.kicker) { max-width: 52rem; margin: 2rem 0 0; color: var(--muted); font-size: 1.15rem; }
.case-note { display: grid; grid-template-columns: 12rem 1fr; gap: 2rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.case-note span { color: var(--muted); font-size: .84rem; }

.application-section { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(2rem, 6vw, 6rem); }
.application-steps { margin: 0; padding: 0; list-style: none; }
.application-steps li { min-width: 0; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; padding: 1.35rem 0; border-top: 1px solid var(--line); }
.application-steps li:first-child { border-top: 0; }
.application-steps span { color: var(--accent); font-weight: 900; }
.application-steps p { margin: 0; }

.checkpoint { background: var(--surface); padding-inline: clamp(1.4rem, 5vw, 4rem); }
.checkpoint h2 { max-width: 18em; margin: 0; font-size: clamp(2.2rem, 4.3vw, 3.8rem); line-height: 1.14; }
.checkpoint > p:not(.kicker, .save-note) { color: var(--muted); }
.checkpoint-fields, .aba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.5rem; }
.aba-grid { grid-template-columns: repeat(3, 1fr); }
.checkpoint label { display: grid; gap: .7rem; min-width: 0; }
.checkpoint label span { color: var(--muted); font-size: .86rem; font-weight: 750; }
.checkpoint textarea { width: 100%; min-height: 9rem; padding: 1rem; border: 1px solid var(--line); border-radius: .45rem; background: rgba(255,255,255,.035); color: var(--ink); line-height: 1.65; }
.checkpoint textarea:focus { outline: 2px solid rgba(209,255,0,.55); outline-offset: 2px; }
.wide-field { margin-top: 1rem; }
.save-note { margin-top: 1rem; color: var(--muted); font-size: .78rem; }

.boundary-section { border-bottom: 0; }
.boundary-main h2 { max-width: 22em; margin: 0; font-size: clamp(2.2rem, 4.5vw, 4rem); line-height: 1.16; }
.boundary-section aside { display: grid; grid-template-columns: 12rem 1fr; gap: 2rem; margin-top: 4rem; padding: 1.5rem 0; border-block: 1px solid var(--line); }
.boundary-section aside span { color: var(--warm); font-size: .8rem; font-weight: 900; }
.boundary-section aside p { margin: 0; color: var(--muted); }
.boundary-section details { margin-top: 2rem; color: var(--muted); }
.boundary-section summary { min-height: 44px; display: flex; align-items: center; color: var(--ink); cursor: pointer; font-weight: 800; }
.boundary-section li + li { margin-top: .5rem; }
.unit-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 5rem; }
.unit-pager a { min-width: 0; padding: 1.2rem 0; border-top: 1px solid var(--line); text-decoration: none; }
.unit-pager a:last-child { text-align: right; }
.unit-pager small { display: block; color: var(--muted); }
.unit-pager span { overflow-wrap: anywhere; }
.course-finished { text-align: right; color: var(--accent); }
.download-link { display: inline-flex; min-height: 48px; align-items: center; gap: 1rem; margin-top: 3rem; padding: .85rem 1rem; background: var(--accent); color: var(--accent-ink); font-size: .8rem; font-weight: 900; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }

@media (max-width: 820px) {
  .thesis-section, .knowledge-section, .application-section { grid-template-columns: 1fr; }
  .section-heading { position: static; }
  .estimate-model { grid-template-columns: 1fr 1fr; }
  .comparison-model, .context-model, .timeline-model, .decision-model { flex-wrap: wrap; }
  .timeline-model i { width: 2rem; }
  .checkpoint-fields, .aba-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .lesson-hero { min-height: 76vh; padding-inline: 20px; }
  .lesson-hero h1 { font-size: clamp(2.65rem, 13vw, 3.7rem); }
  .thought-hook, .thesis-section, .knowledge-section, .case-section, .application-section, .checkpoint, .boundary-section { width: min(calc(100% - 40px), var(--max)); }
  .task-model { grid-template-columns: 1fr 1fr; }
  .task-model strong { width: max-content; max-width: 80%; text-align: center; }
  .target-model strong { right: 5%; width: 9rem; }
  .range-model span:nth-child(1) { width: 210px; }
  .range-model span:nth-child(2) { width: 165px; }
  .range-model span:nth-child(3) { width: 120px; }
  .comparison-model span, .context-model span { min-width: 7.3rem; font-size: 1.5rem; }
  .case-note, .boundary-section aside { grid-template-columns: 1fr; gap: .6rem; }
  .unit-pager { grid-template-columns: 1fr; }
  .unit-pager a:last-child { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
