@font-face {
  font-family: "Baskervville";
  src: url("fonts/baskervville-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Baskervville";
  src: url("fonts/baskervville-italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #141824;
  --night-deep: #10141e;
  --ivory: #fff5e8;
  --amber: #f1bf7d;
  --amber-light: #ffcf92;
  --paper: #f8f4ed;
  --ink: #232331;
  --secondary: #5d5652;
  --rule: #d9cfc0;
  --serif: "Baskervville", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 5.75vw, 6.25rem);
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.25rem; }
body { margin: 0; font-size: 1rem; line-height: 1.55; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid #b67530;
  outline-offset: 4px;
}
.masthead :focus-visible, .hero :focus-visible { outline-color: #ffda9b; }
::selection { background: #dfac70; color: var(--night); }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
svg { display: block; }
[hidden] { display: none !important; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon { width: 1.15rem; height: 1.15rem; flex: none; }
.wrap { width: 100%; max-width: 92rem; margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: absolute; top: .5rem; left: 1rem; z-index: 10; padding: .6rem 1rem; transform: translateY(-200%); background: var(--ivory); color: var(--ink); }
.skip-link:focus { transform: translateY(0); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.masthead { position: relative; z-index: 2; background: var(--night-deep); color: var(--ivory); border-bottom: 1px solid #353440; }
.masthead-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.masthead-inner { min-height: 4.75rem; }
.wordmark { display: inline-flex; gap: .42rem; align-items: center; width: fit-content; min-height: 2.8rem; color: inherit; font-family: var(--serif); font-size: 1.92rem; letter-spacing: -.075em; line-height: 1; text-decoration: none; }
.brand-mark { width: 1.75rem; height: 2.05rem; color: var(--amber); }
.main-nav { display: flex; gap: clamp(1.05rem, 2.9vw, 2.65rem); align-items: center; font-size: .91rem; font-weight: 500; }
.main-nav > a, .back-link { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: none; }
.main-nav > a { color: #e4ded8; }
.main-nav > a:hover, .back-link:hover, .read-link:hover { text-decoration: underline; text-underline-offset: .27em; }
.share-area { position: relative; }
.share-button, .read-link, .play-toggle { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; white-space: nowrap; }
.share-button { min-height: 2.75rem; padding: .5rem 1.05rem; border: 1px solid #615e61; border-radius: 2rem; background: transparent; color: var(--ivory); line-height: 1.15; }
.share-button:hover { border-color: var(--amber); color: var(--amber); }
.share-button .ui-icon { width: 1rem; height: 1rem; }
.share-feedback { position: absolute; top: calc(100% + .55rem); right: 0; width: max-content; max-width: min(19rem, calc(100vw - 2.5rem)); background: var(--night-deep); border-radius: .5rem; font-size: .86rem; box-shadow: 0 .5rem 1.5rem #080a1240; }
.share-feedback p:not(:empty) { padding: .6rem .9rem; border-left: 2px solid var(--amber); }
#share-url { display: block; width: min(16rem, 70vw); margin: 0 .7rem .7rem; padding: .5rem; color: var(--ink); background: var(--paper); }

.hero { position: relative; isolation: isolate; overflow: hidden; min-width: 0; background: var(--night); color: var(--ivory); }
.hero-art { position: absolute; z-index: -1; inset: 0 0 0 15%; }
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 74% 25%; }
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--night) 0%, rgba(20,24,36,.98) 9%, rgba(20,24,36,.87) 24%, rgba(20,24,36,.50) 39%, rgba(20,24,36,.12) 59%, transparent 79%),
    linear-gradient(0deg, rgba(14,18,26,.3), transparent 26%);
}
.hero-inner { min-height: clamp(34rem, 44vw, 42rem); display: flex; align-items: center; padding-block: clamp(3.4rem, 5.3vw, 5rem); }
.hero-copy { width: min(53%, 38rem); }
.story-kicker, .note-kicker { display: flex; align-items: center; gap: .7rem; font-size: .8rem; font-weight: 700; line-height: 1.4; letter-spacing: .17em; text-transform: uppercase; }
.story-kicker { color: var(--amber); }
.story-kicker > span, .note-kicker > span { display: inline-block; width: 1.7rem; height: 1px; flex: none; background: currentColor; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1 { margin-top: 1.05rem; font-size: clamp(3.4rem, 5.7vw, 5.45rem); line-height: 1.015; letter-spacing: -.058em; }
h1 em, .family-note h2 em { display: block; font-weight: inherit; }
h1 em { margin-top: .05em; color: #f3c686; }
.story-hook { max-width: 28rem; margin-top: 1.15rem; color: #e9e3dd; font-size: clamp(1.015rem, 1.3vw, 1.18rem); line-height: 1.55; text-wrap: pretty; }
.story-facts { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-top: 1.2rem; padding: 0; list-style: none; color: #d8d2cd; font-size: .89rem; line-height: 1.5; }
.story-facts li { display: flex; align-items: center; gap: .4rem; }
.story-facts li + li::before { content: ""; width: 3px; height: 3px; margin-right: .35rem; border-radius: 50%; background: #ae9f94; }
.story-facts .ui-icon { width: 1rem; height: 1rem; color: #dfc5a4; }
.audio-area { width: min(100%, 24rem); margin-top: 1.65rem; }
.audio-area:focus { outline: 0; }
#journey-audio:not([controls]) { display: none; }
#journey-audio[controls] { display: block; width: 100%; max-width: 24rem; }
#journey-audio[controls] ~ .play-actions, #journey-audio[controls] ~ .timeline { display: none; }
.play-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1.5rem; }
.play-toggle { min-width: 9.5rem; min-height: 3.15rem; padding: .65rem 1.45rem; border: 0; border-radius: 3rem; background: var(--amber); color: #221b1a; font-size: 1rem; font-weight: 700; line-height: 1.15; box-shadow: 0 2px 12px #090e1e25; }
.play-toggle:hover { background: var(--amber-light); }
.play-toggle:active { transform: translateY(1px); }
.play-toggle .ui-icon { width: 1rem; height: 1rem; }
.play-toggle .pause-icon, .play-toggle:is([data-state="playing"],[data-state="loading"]) .play-icon { display: none; }
.play-toggle:is([data-state="playing"],[data-state="loading"]) .pause-icon { display: block; }
.read-link { min-height: 2.75rem; text-decoration: none; color: var(--ivory); font-size: .92rem; font-weight: 500; }
.read-link .ui-icon { color: #e8c497; }
.timeline { display: grid; grid-template-columns: 2.75rem auto minmax(0,1fr) auto; align-items: center; column-gap: .55rem; margin: .7rem 0 0 -.45rem; }
.rewind { position: relative; width: 2.75rem; height: 2.75rem; padding: .63rem; border: 0; border-radius: 50%; background: transparent; color: #efe7df; }
.rewind svg { width: 100%; height: 100%; }
.rewind span { position: absolute; top: 50%; left: 50%; transform: translate(-49%,-44%); font-size: .5rem; font-weight: 700; line-height: 1; }
.rewind:hover { background: #ffffff12; }
.time { min-width: 2.1rem; color: #e4ded6; font-size: .82rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
#duration { text-align: right; }
#seek { --progress: 0%; width: 100%; min-width: 0; height: 2.75rem; margin: 0; padding: 0; appearance: none; accent-color: var(--amber); border: 0; background: transparent; cursor: pointer; }
#seek::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(to right, var(--amber) var(--progress), #827d7c var(--progress)); }
#seek::-moz-range-track { height: 3px; border-radius: 3px; background: #827d7c; }
#seek::-moz-range-progress { height: 3px; background: var(--amber); }
#seek::-webkit-slider-thumb { width: 11px; height: 11px; margin-top: -4px; border: 0; border-radius: 50%; appearance: none; background: var(--amber); }
#seek::-moz-range-thumb { width: 11px; height: 11px; border: 0; border-radius: 50%; background: var(--amber); }
.play-status:not(:empty) { padding: .4rem 0 .15rem; font-size: .92rem; color: #ffdb9e; }

.reading-room { background: var(--paper); border-top: 1px solid #f2e1c9; }
.reading-grid { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(0, .92fr); align-items: start; gap: clamp(3rem, 8.5vw, 9rem); padding-block: clamp(3.2rem, 5.6vw, 5.65rem); }
.chapter-list { margin-top: .9rem; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section-heading h2, .family-note h2 { color: var(--ink); letter-spacing: -.055em; }
.section-heading h2 { font-size: clamp(2.1rem, 3.1vw, 3rem); line-height: 1.1; }
.chapter-count { flex: none; color: var(--secondary); font-size: .87rem; }
.chapter-list li { border-bottom: 1px solid var(--rule); }
.chapter { width: 100%; min-height: 3.58rem; display: grid; grid-template-columns: 1.75rem minmax(0,1fr) auto 1.5rem; align-items: center; gap: .9rem; padding: .55rem .15rem; text-align: left; border: 0; color: var(--ink); background: transparent; }
.chapter:hover { background: #f0e9df; }
.chapter-index { font-family: var(--serif); font-size: 1.09rem; line-height: 1; color: #7d6452; }
.chapter-name { font-size: .99rem; line-height: 1.35; font-weight: 500; }
.chapter-time { color: var(--secondary); font-size: .86rem; font-variant-numeric: tabular-nums; }
.chapter-glyph { display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border: 1px solid #bfb1a0; border-radius: 50%; color: #6f5847; }
.chapter-glyph svg { width: .6rem; height: .6rem; }
.chapter[aria-current="true"] .chapter-glyph { color: var(--paper); background: #6e5039; border-color: #6e5039; }
.transcript { margin-top: 1.15rem; }
.transcript summary { min-height: 3rem; display: flex; align-items: center; gap: .65rem; padding: .5rem 0; width: fit-content; cursor: pointer; color: #6e4d31; font-size: .97rem; font-weight: 600; list-style: none; }
.transcript summary::-webkit-details-marker { display: none; }
.transcript summary:hover span { text-decoration: underline; text-underline-offset: .22em; }
.summary-chevron { width: .95rem; height: .95rem; }
.transcript[open] .summary-chevron { transform: rotate(180deg); }
.transcript-copy { scroll-margin-top: 1.25rem; margin-block: .8rem 0; padding-top: 1rem; padding-bottom: .4rem; border-top: 1px solid var(--rule); }
.transcript-copy h3 { margin: .6rem 0 1.2rem; font-size: 2.05rem; line-height: 1.17; letter-spacing: -.04em; }
.transcript-copy h4 { margin: 1.75rem 0 .8rem; font-size: 1.08rem; line-height: 1.35; }
.transcript-copy p { margin: .7rem 0; max-width: 62ch; line-height: 1.75; }
.family-note { margin-top: .1rem; padding-left: clamp(1.9rem, 4.1vw, 4.2rem); border-left: 1px solid var(--rule); }
.note-kicker { padding-top: .08rem; color: #805a3b; }
.family-note h2 { margin: 1rem 0 1.1rem; font-size: clamp(2.25rem, 3.05vw, 3.15rem); line-height: 1.09; }
.family-note h2 em { color: #765337; }
.family-note > p:not(.note-kicker) { color: #4e4948; font-size: 1rem; line-height: 1.64; }
.family-note p + p { margin-top: .9rem; }
.format-note { margin-top: 1.35rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: .88rem; line-height: 1.6; color: var(--secondary); }
.guide-link { display: inline-flex; align-items: center; min-height: 2.75rem; margin-top: .3rem; color: #6e4d31; font-size: .9rem; font-weight: 600; text-underline-offset: .22em; }
footer { color: var(--ivory); background: var(--night-deep); }
.footer-inner { min-height: 5.3rem; }
footer .wordmark { font-size: 1.48rem; }
footer .brand-mark { width: 1.35rem; height: 1.65rem; }
.back-link { color: #d9d0c7; font-size: .88rem; }

@media (min-width: 105rem) {
  .hero-art { left: max(15%, calc(50% - 35.5rem)); }
}

@media (max-width: 65rem) {
  .reading-grid { gap: 3.35rem; grid-template-columns: minmax(0,1.25fr) minmax(0,.9fr); }
  .family-note { padding-left: 2.25rem; }
  .hero-art { left: 9%; }
  .hero-copy { width: 57%; }
}

@media (max-width: 48rem) {
  :root { --gutter: clamp(1.25rem, 5.2vw, 2.5rem); }
  .masthead-inner { min-height: 4.25rem; }
  .wordmark { font-size: 1.7rem; }
  .brand-mark { width: 1.55rem; height: 1.85rem; }
  .main-nav { gap: 1rem; }
  .hero-inner { min-height: 29rem; padding-block: 2.8rem; }
  .story-hook { font-size: 1.02rem; }
  .hero-copy { width: 61%; }
  h1 { font-size: clamp(2.95rem, 7.2vw, 3.8rem); }
  .hero-art { left: 7%; }
  .hero-art::after { background: linear-gradient(90deg, var(--night), rgba(20,24,36,.9) 31%, rgba(20,24,36,.45) 55%, transparent 85%); }
  .reading-grid { grid-template-columns: 1fr; gap: 2.6rem; padding-block: 2.75rem; }
  .family-note { width: min(100%, 41rem); padding: 2.3rem 0 0; border-left: 0; border-top: 1px solid var(--rule); }
  .family-note h2 em { display: inline; }
}

@media (max-width: 39rem) {
  .masthead-inner { min-height: 3.92rem; }
  .main-nav .chapter-nav { display: none; }
  .main-nav { font-size: .85rem; gap: .8rem; }
  .share-button { min-height: 2.75rem; padding: .45rem .83rem; gap: .42rem; }
  .share-word { display: none; }
  .hero-art { inset: 0 0 auto; height: clamp(12rem, 52vw, 18rem); }
  .hero-art img { object-position: 74% 45%; }
  .hero-art::after { background: linear-gradient(0deg, var(--night) 1%, rgba(20,24,36,.94) 12%, rgba(20,24,36,.62) 30%, rgba(20,24,36,.15) 58%, transparent 75%); }
  .hero-inner { min-height: 0; padding-top: clamp(7.8rem, 37vw, 13rem); padding-bottom: 1.6rem; }
  .hero-copy { width: 100%; }
  .story-kicker { font-size: .75rem; }
  h1 { margin-top: .65rem; font-size: clamp(2.78rem, 11.15vw, 4rem); line-height: 1.025; }
  .story-hook { max-width: 31rem; margin-top: .85rem; font-size: 1rem; line-height: 1.51; }
  .story-facts { margin-top: .92rem; }
  .audio-area { margin-top: 1.15rem; }
  .timeline { margin-top: .4rem; }
  .reading-grid { gap: 2rem; padding-block: 2.3rem; }
  .chapter { gap: .5rem; grid-template-columns: 1.65rem minmax(0,1fr) auto 1.3rem; }
  .section-heading h2 { font-size: 2.05rem; }
  .chapter-count { font-size: .82rem; }
  .family-note { padding-top: 1.95rem; }
  .family-note h2 { font-size: 2.15rem; }
  .footer-inner { min-height: 4.3rem; }
}

@media (max-width: 22rem) {
  .main-nav { gap: .55rem; }
  .main-nav > a { font-size: .81rem; }
  .share-button { padding-inline: .6rem; }
  .play-actions { column-gap: 1.15rem; }
  .chapter { gap: .4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .play-toggle:active { transform: none; }
}

@media (forced-colors: active) {
  .play-toggle, .share-button, .chapter-glyph { border: 1px solid ButtonText; }
  #seek { appearance: auto; }
  #seek::-webkit-slider-thumb { background: ButtonText; }
}
