:root {
  color-scheme: light;
  --ink: oklch(23% .018 255);
  --muted: oklch(48% .018 255);
  --paper: oklch(97.2% .009 75);
  --surface: oklch(99% .004 75);
  --line: rgb(47 55 70 / 14%);
  --accent: oklch(58% .17 255);
  --accent-soft: oklch(93% .035 255);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
}

button,
a {
  font: inherit;
}

.hero {
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(64px, 8vw, 128px) clamp(24px, 5vw, 76px) clamp(48px, 6vw, 86px);
}

.eyebrow,
.nav-label,
.chapter-kicker,
.fact-label {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 720;
  letter-spacing: .07em;
}

h1 {
  max-width: 11.5em;
  margin: 18px 0 24px;
  font-size: clamp(48px, 6.5vw, 104px);
  font-weight: 620;
  letter-spacing: -.06em;
  line-height: .98;
}

.hero-copy {
  max-width: 46em;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 1.45vw, 23px);
  line-height: 1.65;
}

.layout {
  display: grid;
  grid-template-columns: minmax(230px, 290px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 76px) clamp(72px, 8vw, 132px);
}

.chapter-nav {
  align-self: start;
  position: sticky;
  top: 24px;
}

.chapter-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.chapter-button {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.chapter-button:hover {
  background: rgb(255 255 255 / 62%);
  color: var(--ink);
}

.chapter-button[aria-current="true"] {
  border-color: oklch(58% .17 255 / 22%);
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 680;
}

.chapter-button:focus-visible,
.guide-link:focus-visible {
  outline: 3px solid oklch(58% .17 255 / 22%);
  outline-offset: 2px;
}

.demo {
  min-width: 0;
}

.chapter-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

h2 {
  margin: 7px 0 0;
  font-size: clamp(28px, 3.4vw, 48px);
  font-weight: 650;
  letter-spacing: -.04em;
  line-height: 1.1;
}

.guide-link {
  flex: 0 0 auto;
  padding-bottom: 3px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 680;
  text-underline-offset: 4px;
}

.demo-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 60px rgb(31 37 48 / 10%);
}

.chapter-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.chapter-facts section {
  padding: 20px 22px;
  background: rgb(255 255 255 / 72%);
}

.chapter-question,
.chapter-boundary {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .chapter-nav {
    position: static;
  }

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

@media (max-width: 620px) {
  .chapter-list,
  .chapter-facts {
    grid-template-columns: 1fr;
  }

  .chapter-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .demo-player {
    aspect-ratio: 5 / 4;
  }
}
