:root {
  color-scheme: light;
  --paper: #fffaf1;
  --ink: #242e25;
  --muted: #505b50;
  --green: #254d3a;
  --sage: #e3ebdf;
  --line: #d7dcd0;
  --accent: #f5be87;
  --compact: calc(4.5rem + env(safe-area-inset-bottom));
  --extra: 9rem;
  scroll-padding-bottom: var(--compact);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.55 "DM Sans", system-ui, sans-serif; }
[hidden] { display: none !important; }
a { color: inherit; }
a:focus-visible, summary:focus-visible, video:focus-visible { outline: 3px solid #bb6744; outline-offset: 4px; }
p, h1, h2, h3 { margin: 0; }
.wrap { width: min(100% - 2.5rem, 71rem); margin-inline: auto; }
.site-header { min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-size: 1.2rem; font-weight: 760; letter-spacing: -.035em; white-space: nowrap; }
.brand-mark { display: block; width: 2.5rem; height: 2.5rem; }
nav { display: flex; gap: clamp(.65rem, 3vw, 2rem); font-size: .83rem; }
nav a { text-decoration: none; }
nav a:hover { text-decoration: underline; }
.hero { padding-block: 2.2rem 1.8rem; display: grid; gap: 1.6rem; align-items: center; }
.eyebrow { color: var(--green); font-size: .73rem; letter-spacing: .135em; font-weight: 780; margin-bottom: .65rem; }
h1, h2, .closing-title { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; letter-spacing: -.057em; line-height: 1; }
h1 { font-size: clamp(3rem, 12vw, 6.7rem); }
h1 em { color: var(--green); font-weight: inherit; }
.intro { max-width: 32rem; margin-top: 1.1rem; color: var(--muted); font-size: clamp(1rem, 2vw, 1.17rem); }
.rating { font-size: .86rem; margin-top: 1.15rem; }
.rating span { color: #985015; font-size: 1.05rem; margin-right: .25rem; }
.hero-image { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 1.35rem; background: #ead8c3; }
.facts { background: var(--sage); }
.facts ul { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; padding: 1rem 0; margin-block: 0; text-align: center; }
.facts li { display: grid; padding-inline: .25rem; }
.facts li + li { border-left: 1px solid #bacbb9; }
.facts strong { font-size: clamp(.83rem, 2.25vw, 1.03rem); }
.facts span { font-size: clamp(.68rem, 1.7vw, .9rem); color: var(--muted); }
.curriculum, .question-grid { padding-block: clamp(2.6rem, 7vw, 5.6rem); display: grid; gap: 1.4rem; }
h2 { font-size: clamp(2.5rem, 7vw, 4.65rem); }
.curriculum > div > p:last-child { color: var(--muted); max-width: 29rem; margin-top: 1rem; }
.lessons { margin: 0; padding: 0; list-style: none; counter-reset: topic; border-top: 1px solid var(--line); }
.lessons li { counter-increment: topic; border-bottom: 1px solid var(--line); position: relative; padding: .95rem .25rem .95rem 2.75rem; }
.lessons li::before { content: counter(topic, decimal-leading-zero); position: absolute; left: 0; top: 1.1rem; font-size: .83rem; color: var(--green); }
h3 { font-size: 1.07rem; }
.lessons p, details p { color: var(--muted); margin-top: .2rem; }
.questions { background: #f1eee3; }
details { border-bottom: 1px solid #cbd0c3; padding: .85rem 0; }
details:first-child { border-top: 1px solid #cbd0c3; }
summary { cursor: pointer; font-weight: 670; padding-block: .2rem; }
details p { margin-block: .3rem .25rem; }
.media { padding-bottom: 2.5rem; }
video { display: block; width: min(100%, 42rem); margin-top: 1rem; border-radius: 1rem; background: var(--ink); max-height: 70vh; }
video.reel { width: min(100%, 21rem); }
.site-footer { padding-block: 1.45rem; display: flex; flex-wrap: wrap; gap: .45rem 1.1rem; align-items: baseline; }
.site-footer p { font-size: .82rem; color: var(--muted); }
.purchase-space { height: var(--compact); }
.enhanced .purchase-space { height: calc(var(--compact) + var(--extra)); }
.purchase { position: fixed; z-index: 2; bottom: 0; inset-inline: 0; background: var(--green); color: var(--paper); box-shadow: 0 -4px 20px #172c211f; padding-bottom: env(safe-area-inset-bottom); }
.purchase-inner { max-width: 71rem; margin-inline: auto; }
.purchase-action { display: flex; align-items: center; justify-content: center; gap: 1.15rem; min-height: 4.5rem; padding: .5rem 1rem; }
.payment { display: none; font-size: .83rem; }
.checkout { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; width: min(100%, 24rem); min-height: 2.85rem; padding: .55rem .8rem; border-radius: 100px; background: var(--accent); color: #212b22; text-decoration: none; font-weight: 780; text-align: center; }
.checkout:hover { background: #ffd3a6; }
.checkout:focus-visible { outline-color: white; }
.purchase-message { height: 0; overflow: hidden; opacity: 0; text-align: center; padding-inline: 1rem; display: grid; align-content: end; gap: .45rem; }
.closing-title { font-size: clamp(1.75rem, 6vw, 3.35rem); }
.purchase-message p + p { font-size: .88rem; color: #edf2e8; }
@media (min-width: 45rem) {
  .hero { grid-template-columns: .92fr 1.08fr; padding-block: 2.7rem; gap: clamp(1.4rem, 5vw, 4.5rem); }
  h1 { font-size: clamp(3.5rem, 7.7vw, 6.7rem); }
  .curriculum, .question-grid { grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 7vw, 6rem); }
  .payment { display: block; }
}
@media (max-height: 400px) {
  :root { --extra: 6rem; }
  .closing-title { font-size: 1.6rem; }
}

/* In-page navigation follows the device's motion preference. */
:root { scroll-padding-top: 1.25rem; }
@media (prefers-reduced-motion: no-preference) {
  :root { scroll-behavior: smooth; }
  @supports selector(details::details-content) and (interpolate-size: allow-keywords) {
    .answers { interpolate-size: allow-keywords; }
    details::details-content {
      block-size: 0;
      overflow: clip;
      opacity: 0;
      transition: block-size .24s ease, opacity .2s ease, content-visibility .24s allow-discrete;
    }
    details[open]::details-content { block-size: auto; opacity: 1; }
  }
}
.reel-section { display: grid; align-items: center; gap: 1.25rem; }
.reel-section p { color: var(--muted); max-width: 27rem; margin-top: .9rem; }
video.reel { width: min(100%, 16rem, 37vh); height: auto; aspect-ratio: 9 / 16; margin: 0 auto; }
@media (min-width: 45rem) {
  .reel-section { grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 7vw, 6rem); }
}
