:root {
  color-scheme: light;
  --paper: #f6f0e6;
  --ink: #24231d;
  --muted: #655e54;
  --wine: #872b41;
  --rule: #cec4b4;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.55 var(--sans); }
button { color: inherit; font: inherit; }
a { color: inherit; text-underline-offset: .28em; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 5px;
}

.shell { width: min(1280px, calc(100% - 112px)); margin-inline: auto; }
.masthead, .footer { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.masthead { min-height: 82px; border-bottom: 1px solid var(--rule); }
.wordmark { font: 600 1.7rem/1 var(--serif); letter-spacing: -.047em; text-decoration: none; }
.wordmark em { font-weight: 400; }
.wordmark span { color: var(--wine); }
.masthead nav { display: flex; gap: clamp(.8rem, 3vw, 2rem); }
.masthead nav a, .login-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; white-space: nowrap; }
.masthead nav a:hover, .login-link:hover { color: var(--wine); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: clamp(3rem, 6vw, 6.25rem);
}
.eyebrow {
  margin: 0;
  color: var(--wine);
  font-size: .78rem;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.intro .eyebrow span {
  display: inline-block;
  width: 1.375rem;
  height: 1px;
  margin-inline-end: .4rem;
  vertical-align: .28em;
  background: currentColor;
}
h1, h2, p, blockquote { margin-block-start: 0; }
h1 {
  margin: .9rem 0 1.4rem;
  font: 400 clamp(4rem, 7.4vw, 7.5rem)/.89 var(--serif);
  letter-spacing: -.075em;
}
h1 em, .inside h2 em { color: var(--wine); font-weight: 400; }
.intro-copy { max-width: 26rem; margin-bottom: 1.6rem; font-size: 1.08rem; color: var(--muted); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: .6rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 3px;
  font-weight: 655;
  text-decoration: none;
}
.button-primary { color: #fff7ec; background: var(--wine); }
.button-primary:hover { background: #702135; }

.inside, .practice { scroll-margin-top: 1.25rem; }
.practice:focus { outline: none; }
.scene-selector {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: .75rem;
}
.scene-selector button {
  padding: .55rem .8rem;
  min-height: 44px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  font-size: .875rem;
  font-weight: 680;
}
.scene-selector button:hover { border-color: var(--ink); }
.scene-selector [aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff8e9; }

.reel {
  margin: 0;
}
.frame { position: relative; --native-controls-space: 2.75rem; }
.frame video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 5px;
  background: #29241d;
}
.play-scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
}
.frame.has-controls .play-scene {
  /* Leave the native seek bar and the corner sound control tappable. */
  inset-block-end: var(--native-controls-space);
  inset-inline-end: var(--native-controls-space);
  padding-block-start: var(--native-controls-space);
  padding-inline-start: var(--native-controls-space);
}
.play-badge {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-height: 54px;
  padding: .65rem 1.2rem;
  border-radius: 40px;
  box-shadow: 0 3px 20px #15120d40;
  background: #fff7ec;
  color: #272923;
  font-weight: 700;
  white-space: nowrap;
}
.play-scene:hover .play-badge { background: #fff; }
.play-scene:focus-visible { outline: 2px solid #fff7ec; outline-offset: -3px; }
.play-icon { width: 0; height: 0; border-block: .45rem solid transparent; border-left: .7rem solid currentColor; }
.frame video:focus-visible { outline: 2px solid var(--wine); outline-offset: 4px; }
.reel-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .8rem;
  padding-top: .4rem;
}
.reel-cta { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; font-weight: 650; }
.captions {
  min-height: 44px;
  padding: 0 .65rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: transparent;
  font-size: .875rem;
  font-weight: 650;
  cursor: pointer;
}
.captions:hover { border-color: var(--wine); }
.captions[aria-pressed="true"] { background: var(--wine); border-color: var(--wine); color: #fff7ec; }
.video-error { margin: 0; color: var(--wine); font-size: .875rem; }
.video-error:not(:empty) { margin-top: .5rem; }

.practice { background: #ebe2d3; border-block: 1px solid var(--rule); }
.exercise {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  column-gap: clamp(2rem, 7vw, 7rem);
  padding-block: clamp(2.4rem, 5vw, 4.5rem);
}
.exercise blockquote {
  margin: .55rem 0 .75rem;
  font: 400 clamp(2.35rem, 4.05vw, 4rem)/1.12 var(--serif);
  letter-spacing: -.06em;
}
.exercise blockquote em { color: var(--wine); }
.episode { white-space: nowrap; }
.scene-context { margin-bottom: .45rem; color: var(--muted); }
.exercise h2 { margin: 0; font-size: 1.1rem; font-weight: 600; }
.answers { display: grid; gap: .5rem; }
.answers button {
  padding: .65rem .9rem;
  min-height: 44px;
  text-align: left;
  border: 1px solid #b9ac99;
  border-radius: 3px;
  background: #f9f3e8;
  cursor: pointer;
}
.answers button:hover { border-color: var(--ink); }
.answers [data-result="correct"] { border-color: #475b37; background: #e2e9d8; }
.answers [data-result="retry"] { border-color: var(--wine); background: #f4e2e0; }
.feedback { margin: .75rem 0 0; font-weight: 650; }
.feedback:empty { margin: 0; }
.explanation { margin-top: .6rem; }
.explanation summary {
  width: fit-content;
  padding-block: .55rem;
  color: var(--wine);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: .25em;
}
.explanation p { margin: .25rem 0 0; }
.next-scene { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.explanation:not([open]) + .next-scene { display: none; }
.next-scene p { margin-bottom: .7rem; color: var(--muted); }

.inside { padding-block: clamp(3rem, 6.5vw, 6.25rem); }
.inside-intro { max-width: 50rem; }
.inside h2 { margin: .55rem 0 .9rem; font: 400 clamp(2.55rem, 5.3vw, 5.25rem)/1.03 var(--serif); letter-spacing: -.06em; }
.inside-intro > :last-child { max-width: 37rem; margin-bottom: 0; color: var(--muted); font-size: 1.08rem; }
.app-previews {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 4rem);
  max-width: 66rem;
  margin-block: clamp(1.75rem, 4vw, 3.25rem);
}
.app-previews figure { margin: 0; }
.app-previews img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 5px; }
.app-previews figcaption { padding-block: .8rem 0; }
.app-previews figcaption strong { font-size: 1rem; }
.app-previews figcaption p { margin: .25rem 0 0; color: var(--muted); }
.learning-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 4vw, 4rem);
  margin-block: clamp(1.85rem, 4vw, 3.5rem);
}
.learning-steps article { padding-top: 1rem; border-top: 1px solid var(--rule); }
.learning-steps h3 { margin: 0 0 .5rem; font: 400 clamp(1.4rem, 2.35vw, 2.15rem)/1.12 var(--serif); letter-spacing: -.03em; }
.learning-steps p { margin: 0; color: var(--muted); }
.start { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: clamp(1.2rem, 3.2vw, 2.35rem); background: #272923; color: #fff4df; }
.start p { margin: 0; font: 400 clamp(1.55rem, 3vw, 2.5rem)/1.15 var(--serif); letter-spacing: -.04em; }
.start .button { background: #fff4df; color: var(--ink); }
.start .button:hover { background: #e9d9be; }
.start .button:focus-visible { outline-color: #fff4df; }
.footer { padding-block: 1rem; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.footer .wordmark { font-size: 1.35rem; }
.footer-legal { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .9rem; }
.footer-legal a { text-decoration: underline; text-underline-offset: .2em; }

@media (max-width: 1080px) {
  .shell { width: calc(100% - 64px); }
  .hero { gap: 2.25rem; }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 40px); }
  .masthead { min-height: 64px; }
  .masthead .wordmark { font-size: clamp(1.35rem, 6vw, 1.7rem); }
  .masthead nav a { font-size: .875rem; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-block: 2rem 2.5rem; gap: 1.65rem; }
  .eyebrow { font-size: .74rem; letter-spacing: .09em; }
  h1 { margin-block: .65rem .9rem; font-size: clamp(3.5rem, 12vw, 5.75rem); }
  h1 br { display: none; }
  .intro-copy { margin-bottom: 1rem; }
  .intro .button-primary { width: 100%; }
  .scene-selector { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exercise { grid-template-columns: minmax(0, 1fr); row-gap: 1.15rem; }
  .learning-steps { grid-template-columns: minmax(0, 1fr); }
  .app-previews { grid-template-columns: minmax(0, 1fr); }
}
