@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/plex-mono-latin.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin.woff2") format("woff2");
  font-display: swap;
}

:root {
  --paper: #f2efe7;
  --paper-deep: #e7e2d7;
  --ink: #171713;
  --muted: #69675f;
  --line: #c9c3b7;
  --acid: #d8ff3e;
  --orange: #ff5c35;
  --night: #171713;
  --white: #fffdf7;
  color-scheme: light;
  font-family: "Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--line) 35%, transparent) 1px, transparent 1px) 0 0 / 6.25rem 100%,
    var(--paper);
  font-size: 15px;
  line-height: 1.65;
}

a { color: inherit; }
button, input { font: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: .7rem 1rem;
  background: var(--acid);
  border: 2px solid var(--ink);
}

.skip-link:focus { top: 1rem; }

.docs-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 clamp(1.25rem, 4vw, 4.5rem);
  border-bottom: 1px solid var(--ink);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(14px);
}

.docs-mark {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .06em;
}

.mark-dot {
  width: .72rem;
  height: .72rem;
  background: var(--orange);
  border-radius: 50%;
}

.mark-section { color: var(--muted); font-weight: 400; }
.docs-header nav { display: flex; gap: clamp(1rem, 3vw, 2.5rem); }

.docs-header nav a {
  color: var(--muted);
  font-size: .78rem;
  text-underline-offset: .25rem;
}

.docs-header nav a:hover { color: var(--ink); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr);
  gap: clamp(3rem, 8vw, 9rem);
  min-height: calc(100vh - 64px);
  padding: clamp(4rem, 9vw, 9rem) clamp(1.25rem, 7vw, 8rem) 5rem;
  border-bottom: 1px solid var(--ink);
  align-items: center;
}

.hero-copy { max-width: 850px; }

.kicker, .card-label, .course-rail > p:first-child, .lesson-heading > p,
.workshop-note > p, .player-topline, footer {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.kicker { margin: 0 0 1.25rem; color: var(--muted); }

h1, h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .91;
}

h1 { font-size: clamp(4.6rem, 10.6vw, 10rem); }

.hero-lede {
  max-width: 720px;
  margin: 2.25rem 0 2rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  line-height: 1.28;
}

.start-button {
  display: inline-flex;
  gap: 2rem;
  align-items: center;
  padding: .9rem 1.1rem;
  border: 1px solid var(--ink);
  background: var(--acid);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.start-button:hover, .start-button:focus-visible {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--ink);
}

.bring-card {
  align-self: end;
  border-top: 4px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
}

.card-label { margin: 0; padding: .8rem 0; border-bottom: 1px solid var(--ink); }
.bring-card ul { list-style: none; padding: 0; margin: 0; }

.bring-card li {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: .8rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--line);
}

.bring-card li span { color: var(--orange); font-size: .7rem; font-weight: 700; }
.bring-note { color: var(--muted); font-size: .74rem; line-height: 1.5; }

.course-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 8rem);
  padding: 0 clamp(1.25rem, 7vw, 8rem);
}

.course-rail {
  position: sticky;
  top: 6.5rem;
  align-self: start;
  padding: 4rem 0;
}

.course-rail > p:first-child { margin: 0 0 1rem; }
.rail-progress { height: 4px; overflow: hidden; background: var(--line); }

.rail-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--orange);
  transition: width 240ms ease;
}

.rail-count { margin: .5rem 0 1.5rem; color: var(--muted); font-size: .7rem; }
.rail-count strong { color: var(--ink); }
.course-rail ol { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.course-rail li { border-bottom: 1px solid var(--line); }

.course-rail a, .course-rail li.is-pending {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  padding: .55rem 0;
  text-decoration: none;
  font-size: .75rem;
}

.course-rail a span, .course-rail li.is-pending span { color: var(--muted); }
.course-rail a[aria-current="step"] { font-weight: 700; }
.course-rail a[aria-current="step"] span { color: var(--orange); }
.course-rail .is-pending { color: var(--muted); }
.lessons { max-width: 1000px; min-width: 0; }
.lesson { padding: clamp(5rem, 9vw, 9rem) 0; border-bottom: 1px solid var(--ink); }
.lesson-heading > p:first-child { margin: 0 0 1rem; color: var(--orange); }
.lesson-heading h2 { max-width: 850px; font-size: clamp(3.5rem, 7vw, 7.5rem); }

.lesson-heading > p:last-child {
  max-width: 680px;
  margin: 1.5rem 0 2.5rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  line-height: 1.35;
}

.minute-player {
  border: 1px solid var(--ink);
  background: var(--night);
  color: var(--white);
  box-shadow: 10px 10px 0 var(--orange);
}

.player-topline, .player-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
}

.player-topline { border-bottom: 1px solid #4b4a43; color: #bbb8ae; }

.player-stage {
  position: relative;
  display: grid;
  min-height: clamp(270px, 43vw, 440px);
  padding: clamp(2rem, 6vw, 5.25rem);
  align-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--orange) 50%, transparent) 0 1px, transparent 2px) 0 0 / 24px 24px,
    var(--night);
}

.player-stage::after {
  content: "";
  position: absolute;
  width: 10rem;
  height: 10rem;
  right: -4rem;
  bottom: -4rem;
  border: 1px solid var(--acid);
  border-radius: 50%;
}

.scene-number { position: absolute; top: 1rem; right: 1rem; margin: 0; color: #858278; font-size: .7rem; }
.film-scenes { list-style: none; padding: 0; margin: 0; }
.film-scenes li { max-width: 760px; }
.film-scenes li > span { color: var(--acid); font-size: .72rem; }

.film-scenes strong {
  display: block;
  margin: .65rem 0 1rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 5vw, 4.75rem);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1;
}

.film-scenes p { max-width: 610px; margin: 0; color: #c9c6bd; }
.player-controls { gap: 1rem; border-top: 1px solid #4b4a43; }

.player-controls button {
  border: 0;
  padding: .5rem .7rem;
  background: var(--acid);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.player-controls .text-button { background: transparent; color: #bbb8ae; font-size: .72rem; font-weight: 400; }
.player-timeline { flex: 1; height: 3px; overflow: hidden; background: #4b4a43; }
.player-timeline span { display: block; width: 0; height: 100%; background: var(--acid); }

.lesson-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr);
  gap: clamp(2rem, 7vw, 6rem);
  margin-top: 3.5rem;
}

.lesson-body h3 { margin: 0 0 1rem; font-size: .78rem; letter-spacing: .1em; }
.actions { padding: 0; margin: 0; list-style: none; counter-reset: action; border-top: 1px solid var(--ink); }

.actions li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: .75rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
  counter-increment: action;
}

.actions li::before { content: counter(action, decimal-leading-zero); color: var(--orange); font-size: .7rem; font-weight: 700; }
.actions a { font-weight: 700; text-underline-offset: .2em; }
.truth-note { margin: 1.5rem 0 0; padding-left: 1rem; border-left: 3px solid var(--orange); color: var(--muted); font-size: .78rem; }
.truth-note strong { color: var(--ink); }

.example {
  margin: 1.5rem 0 0;
  padding: 1rem;
  border: 1px solid var(--ink);
  background: var(--white);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.45;
}

.example span {
  display: block;
  margin-bottom: .5rem;
  color: var(--orange);
  font-family: "Plex Mono", ui-monospace, monospace;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.workshop-note {
  align-self: start;
  padding: 1.25rem;
  border: 1px solid var(--ink);
  background: var(--acid);
  box-shadow: 5px 5px 0 var(--ink);
}

.workshop-note > p { margin: 0 0 1rem; }
.workshop-note blockquote { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: 1.25rem; line-height: 1.35; }
.transcript { margin-top: 2.5rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.transcript summary { padding: .85rem 0; cursor: pointer; font-size: .75rem; font-weight: 700; }
.transcript p { max-width: 780px; margin: 0; padding: 0 0 1.25rem; color: var(--muted); }
footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 4.5rem);
  background: var(--night);
  color: var(--white);
}

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .bring-card { max-width: 520px; }
  .course-shell { grid-template-columns: 1fr; }
  .course-rail { position: static; padding: 2rem 0 0; }
  .course-rail ol { display: none; }
  .lesson-body { grid-template-columns: 1fr; }
  .workshop-note { max-width: 520px; }
}

@media (max-width: 620px) {
  body { background: var(--paper); }
  .docs-header nav a:not(:last-child) { display: none; }
  .mark-section { display: none; }
  .hero { padding-top: 4rem; }
  h1 { font-size: clamp(4rem, 21vw, 6.8rem); }
  .lesson-heading h2 { font-size: clamp(3.15rem, 16vw, 5.5rem); }
  .minute-player { box-shadow: 6px 6px 0 var(--orange); }
  .player-stage { padding: 3.5rem 1.25rem 2rem; }
  .film-scenes strong { font-size: clamp(2.2rem, 11vw, 3.5rem); }
  .player-controls { flex-wrap: wrap; }
  .player-timeline { order: 3; flex-basis: 100%; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
