/* =========================================================================
   story.css: the Story Page template (loaded after site.css)
   Order: 1 shared bits · 2 hero · 3 where it sits · 4 the story + reading
          companion · 5 watch · 6 listen · 7 explore tabs · 8 poems
          9 paintings · 10 pager · 11 reduced motion
   Reading surfaces stay calm: the text never moves once it is in place.
   The motion lives beside it (the companion) and in the media sections.
   ========================================================================= */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Section heads: small gold kicker, then the title */
.sec-head { margin-bottom: 2rem; }
.sec-head__kicker {
  margin: 0 0 0.6rem;
  font-family: var(--font-head);
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8a6a00;                 /* deep gold: AA on beige */
}
.sec-head__title { font-size: clamp(1.875rem, 4.5vw, 2.75rem); margin: 0; }
.sec-head__title::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 3px;
  margin-top: 1rem;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold) 70%, transparent);
}

/* Gold reading thread pinned to the very top (under the floating header) */
.read-thread {
  position: fixed;
  inset: 0 0 auto;
  z-index: 45;
  height: 3px;
  pointer-events: none;
}
.read-thread span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform-origin: 0 50%;
  transform: scaleX(var(--read, 0));
  box-shadow: 0 0 10px rgb(241 207 99 / 0.6);
}
html:not(.js) .read-thread { display: none; }

/* Current section in the nav (desktop: the gold thread stays drawn) */
@media (min-width: 1100px) {
  .site-nav__link[aria-current]::after { transform: scaleX(1); }
}

/* ---------- 2. Hero ----------
   Dark, cinematic, like Home. The painting sits right on wide screens and
   fills the top on phones. It rocks gently (story.js) and settles as you
   scroll down into the story. */
.s-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--ink);
  color: var(--beige);
  isolation: isolate;
}
.s-hero__media {
  position: absolute;
  inset: 0 0 34svh;
  z-index: -1;
}
.s-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
  transform-origin: 50% 70%;
  transform: translate3d(0, calc(var(--p, 0) * 6svh), 0) rotate(var(--rock, 0deg)) scale(1.06);
  will-change: transform;
}
.s-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--ink) 0%, rgb(28 19 9 / 0.65) 30%, rgb(28 19 9 / 0.1) 65%),
    radial-gradient(120% 90% at 50% 40%, transparent 50%, rgb(28 19 9 / 0.55));
}
.s-hero__glow {
  position: absolute;
  left: 55%;
  top: 30%;
  width: 70vmax;
  height: 50vmax;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgb(241 207 99 / 0.28), rgb(201 154 0 / 0.08) 50%, transparent 72%);
  mix-blend-mode: screen;
  pointer-events: none;
}
.s-hero__content {
  position: relative;
  z-index: 1;
  padding-top: 7rem;
  padding-bottom: 3.5rem;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0;
  margin-bottom: 1.5rem;
  font-family: var(--font-head);
  font-size: 0.875rem;
  color: rgb(255 252 241 / 0.75);
}
.crumbs a { color: rgb(255 252 241 / 0.9); text-decoration: none; }
.crumbs a:hover { color: var(--gold-light); }
.crumbs > * + *::before {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin: 0 0.7rem 0.1rem 0.6rem;
  border-top: 1.5px solid var(--gold);
  border-right: 1.5px solid var(--gold);
  transform: rotate(45deg);
}
.crumbs [aria-current] { color: var(--gold-light); }

.s-hero__num {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 0.25rem;
  font-family: var(--font-head);
  color: var(--gold-light);
}
.s-hero__num-label { font-size: 0.875rem; letter-spacing: 0.22em; text-transform: uppercase; }
.s-hero__num-value { font-size: 1.5rem; letter-spacing: 0.04em; }
.s-hero__title {
  max-width: 14ch;
  padding-bottom: 0.14em;
  margin-bottom: calc(1rem - 0.14em);
  font-size: clamp(2.75rem, 10.5vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  /* Same gold light as the Home title */
  background: linear-gradient(100deg, var(--beige) 0 40%, var(--gold-light) 47%, #fff7d6 50%, var(--gold-light) 53%, var(--beige) 60% 100%);
  background-size: 250% 100%;
  background-position: 0% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--beige);
  -webkit-text-fill-color: transparent;
}

.refs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 2rem; }
.ref {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.9rem;
  border: 1px solid rgb(241 207 99 / 0.45);
  border-radius: 999px;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--beige);
  background: rgb(28 19 9 / 0.35);
  transition: background-color 0.25s, border-color 0.25s;
}
.ref:hover { background: rgb(201 154 0 / 0.22); border-color: var(--gold-light); }

/* Four ways in: Read / Watch / Listen / Explore */
.ways {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  max-width: 32rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.way {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 0.8rem 0.25rem 0.7rem;
  border-radius: 18px;
  background: rgb(255 252 241 / 0.08);
  border: 1px solid rgb(255 252 241 / 0.18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: var(--font-head);
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--beige);
  transition: background-color 0.3s, border-color 0.3s, transform 0.4s var(--ease-out);
}
.way svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: var(--gold-light);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.way:hover { background: rgb(255 252 241 / 0.16); border-color: rgb(241 207 99 / 0.7); transform: translateY(-2px); }
.s-hero :focus-visible { outline-color: var(--gold-light); }

.s-hero__credit {
  position: absolute;
  right: var(--pad);
  bottom: 1rem;
  z-index: 1;
  max-width: 60%;
  margin: 0;
  font-size: 0.75rem;
  text-align: right;
  color: rgb(255 252 241 / 0.6);
}
.s-hero__credit cite { font-style: italic; }

@media (max-width: 767.98px) {
  .s-hero__credit { position: static; max-width: none; text-align: left; padding: 0 var(--pad) 1rem; }
  .s-hero { flex-direction: column; justify-content: flex-end; }
}

@media (min-width: 900px) {
  .s-hero { align-items: center; }
  .s-hero__media {
    inset: 0 0 0 36%;
    /* the painting's own left edge melts into the dark */
    -webkit-mask-image: linear-gradient(to right, transparent, #000 22%);
    mask-image: linear-gradient(to right, transparent, #000 22%);
  }
  .s-hero__media::after {
    background:
      linear-gradient(to right, var(--ink) 0%, rgb(28 19 9 / 0.75) 18%, rgb(28 19 9 / 0.1) 55%),
      linear-gradient(to top, rgb(28 19 9 / 0.7), transparent 30%),
      radial-gradient(120% 90% at 60% 40%, transparent 55%, rgb(28 19 9 / 0.5));
  }
  .s-hero__content { padding-top: 8rem; padding-bottom: 4rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .crumbs, .s-hero__num, .refs, .ways { animation: rise 1s var(--ease-out) both; }
  .crumbs { animation-delay: 0.35s; }
  .s-hero__num { animation-delay: 0.5s; }
  .s-hero__title { animation: rise 1.1s 0.6s var(--ease-out) both, gold-sweep 2.4s 1.1s ease-in-out both; }
  .refs { animation-delay: 0.9s; }
  .ways { animation-delay: 1.05s; }
  .s-hero__img { animation: s-hero-in 2.6s var(--ease-out) both; }
  .s-hero__glow { animation: hero-glow 3.2s 0.5s ease-out both; }
}
@keyframes s-hero-in { from { opacity: 0; filter: brightness(0.3); } }

/* ---------- 3. Where this story sits ---------- */
.sits { padding-block: 3rem 1rem; }
.sits__grid {
  display: grid;
  gap: 1rem;
}
.sits__cell {
  padding: 1.4rem 1.5rem 1.5rem;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: 0 2px 4px rgb(71 49 24 / 0.04), 0 16px 34px -24px rgb(71 49 24 / 0.35);
}
.sits__label {
  margin: 0 0 1rem;
  font-family: var(--font-head);
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8a6a00;
}
@media (min-width: 900px) {
  .sits__grid { grid-template-columns: 1.25fr 1fr 1fr; }
}

/* When: the timeline from the live site, drawn as a line; the gem slides
   from Creation to the story's date */
.when { position: relative; height: 4.5rem; --at: 0.8; }
.when__svg { position: absolute; inset: 0 0 auto; width: 100%; height: 64px; overflow: visible; }
.when__track { stroke: var(--line-soft); stroke-width: 3; stroke-linecap: round; }
.when__fill {
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 600;
  stroke-dashoffset: calc(600 - 600 * var(--at));
}
.when__ticks { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.when__ticks li {
  position: absolute;
  top: 14px;
  left: calc(var(--x) * 100%);
  padding-top: 18px;
  font-family: var(--font-head);
  font-size: 0.75rem;
  white-space: nowrap;
  color: #6b5a45;
  transform: translateX(-50%);
}
.when__ticks li:first-child { transform: none; }
.when__ticks li::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 1.5px;
  height: 18px;
  background: rgb(71 49 24 / 0.3);
}
.when__ticks li:first-child::before { left: 0; }
.when__mark {
  position: absolute;
  left: calc(var(--at) * 100%);
  top: 24px;
  transform: translate(-50%, -50%);
}
.when__gem {
  display: block;
  width: 16px;
  height: 16px;
  background: var(--red);
  border: 2px solid #fff;
  border-radius: 3px;
  transform: rotate(45deg);
  box-shadow: 0 2px 8px rgb(193 15 24 / 0.45);
}
.when__tag {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--brown);
  color: var(--beige);
  font-family: var(--font-head);
  font-size: 0.75rem;
  white-space: nowrap;
}
@media (max-width: 479.98px) {
  .when__ticks li:nth-child(2), .when__ticks li:nth-child(4) { font-size: 0; }   /* keep the ticks, drop the crowded labels */
}
@media (prefers-reduced-motion: no-preference) {
  .js .when:not(.is-in) { --at: 0 !important; }
  .js .when__fill { transition: stroke-dashoffset 1.8s 0.2s var(--ease-in-out); }
  .js .when__mark { transition: left 1.8s 0.2s var(--ease-in-out); }
  .js .when:not(.is-in) .when__tag { opacity: 0; }
  .js .when__tag { transition: opacity 0.5s 1.8s; }
}

/* Era: one dot per story; this one is the gold one */
.era__name { margin: 0 0 1rem; font-family: var(--font-head); font-size: 1.125rem; line-height: 1.3; }
.era__name a { text-decoration: none; }
.era__name a:hover { color: var(--red); }
.era__dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}
.era__dots a {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgb(71 49 24 / 0.14);
  transition: background-color 0.25s, transform 0.3s var(--ease-out);
}
.era__dots a::before { content: ""; position: absolute; inset: -6px; }    /* bigger tap area */
.era__dots a:hover, .era__dots a:focus-visible { background: var(--taupe); transform: scale(1.25); }
.era__dots .is-here a { background: var(--gold); box-shadow: 0 0 0 4px rgb(201 154 0 / 0.22); }
.era__dots .is-read a { background: rgb(201 154 0 / 0.4); }
.era__tip {
  position: absolute;
  z-index: 5;
  padding: 0.35rem 0.7rem;
  border-radius: 10px;
  background: var(--brown);
  color: var(--beige);
  font-family: var(--font-head);
  font-size: 0.8125rem;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 10px));
  opacity: 0;
  transition: opacity 0.2s;
}
.era__tip.is-on { opacity: 1; }
.era__pos { margin: 0; font-size: 0.9375rem; color: #6b5a45; }
.era__pos strong { color: var(--brown); font-weight: 600; }
.sits__cell { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  .js .sits__cell:not(.is-in) .era__dots li { transform: scale(0); }
  .js .era__dots li { transition: transform 0.5s var(--ease-out); transition-delay: calc(0.3s + var(--i, 0) * 35ms); }
}

/* Themes: quiet chips. Long lists (more than three rows) scroll inside the
   card so the cards beside it keep their own height; a fade at the bottom
   shows there is more, and goes once the end is reached. */
@property --themes-fade { syntax: "<length>"; inherits: false; initial-value: 0px; }
ul.themes {                       /* ul. beats the ul[role="list"] reset in site.css */
  --themes-pad: 6px;              /* room for the focus ring inside the scroll box */
  display: flex; flex-wrap: wrap; gap: 0.4rem; align-content: flex-start;
  max-height: calc(3 * 36px + 2 * 0.4rem + 2 * var(--themes-pad));
  margin: calc(-1 * var(--themes-pad));
  padding: var(--themes-pad);
  overflow-y: auto;
  scroll-padding-block: var(--themes-pad) 1.75rem;
  scrollbar-width: thin;
  scrollbar-color: rgb(201 154 0 / 0.55) transparent;
  list-style: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--themes-fade)), transparent);
          mask-image: linear-gradient(to bottom, #000 calc(100% - var(--themes-fade)), transparent);
}
@supports (animation-timeline: scroll()) {
  .themes { animation: themes-fade linear both; animation-timeline: scroll(self); }
  @keyframes themes-fade { from { --themes-fade: 1.75rem; } 92% { --themes-fade: 1.75rem; } to { --themes-fade: 0px; } }
}
.themes a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.8rem;
  border-radius: 999px;
  background: var(--beige);
  border: 1px solid rgb(71 49 24 / 0.14);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: border-color 0.25s, background-color 0.25s;
}
.themes a:hover { border-color: var(--gold); background: rgb(201 154 0 / 0.1); }

/* ---------- 4. The story + reading companion ---------- */
.story { position: relative; padding-block: 3.5rem 5rem; }
.story__grid { display: grid; gap: 3rem; }
.story__text { max-width: 40rem; }
.story__label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #735800;                 /* deeper gold: stays AA on the tinted story background */
  scroll-margin-top: 6rem;
}
.story__label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgb(201 154 0 / 0.6), transparent); }

/* A gold thread runs down the left of the text and fills as you read */
.story__body {
  position: relative;
  padding-left: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.8;
}
.story__body::before,
.story__body::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  border-radius: 2px;
  background: rgb(71 49 24 / 0.1);
}
.story__body::after {
  background: linear-gradient(var(--gold-light), var(--gold));
  transform-origin: 50% 0;
  transform: scaleY(var(--fill, 1));
}
.js .story__body::after { --fill: 0; }
.story__body p { position: relative; margin-bottom: 1.15em; }
/* Marker on the thread beside the paragraph being read */
.story__body p::before {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 4px);
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgb(201 154 0 / 0.2);
  transform: scale(0);
  transition: transform 0.4s var(--ease-out);
}
.story__body p.is-current::before { transform: scale(1); }
/* Drop cap */
.story__body p:first-child::first-letter {
  float: left;
  margin: 0.08em 0.12em 0 0;
  font-family: var(--font-head);
  font-size: 3.6em;
  line-height: 0.8;
  color: var(--red);
}
/* The turn of the story ("Be still!") gets a little more air */
.story__body p.is-turn { font-size: 1.1em; }
.story__end { display: flex; justify-content: center; margin: 2.5rem 0 0; }
.story__end span {
  width: 9px; height: 9px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: -22px 22px 0 -2px var(--gold), 22px -22px 0 -2px var(--gold);
  opacity: 0.8;
}

@media (min-width: 768px) {
  .story__body { padding-left: 2.25rem; font-size: 1.1875rem; line-height: 1.85; }
  .story__body p::before { left: calc(-2.25rem - 4px); }
}

/* Companion card (desktop: sticky beside the text) */
.companion { display: none; }
@media (min-width: 1000px) {
  .story__grid { grid-template-columns: minmax(0, 40rem) minmax(0, 1fr); gap: 4rem; align-items: start; }
  .companion { display: block; position: sticky; top: 6.5rem; }
}
.companion__card {
  padding: 1.25rem 1.25rem 0.75rem;
  border-radius: var(--radius);
  background: var(--brown);
  color: var(--beige);
  box-shadow: 0 2px 4px rgb(71 49 24 / 0.1), 0 24px 50px -24px rgb(71 49 24 / 0.6);
  overflow: hidden;
  position: relative;
}
.companion__card::before {             /* warm light, as on Home */
  content: "";
  position: absolute;
  left: -30%;
  top: -40%;
  width: 120%;
  height: 80%;
  background: radial-gradient(closest-side, rgb(201 154 0 / 0.2), transparent);
  pointer-events: none;
}
.companion__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
  font-family: var(--font-head);
}
.companion__place { font-size: 1.25rem; transition: opacity 0.3s; }
.companion__place.is-swapping { opacity: 0; }
.companion__sea {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgb(255 252 241 / 0.1);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
}
.companion__sea-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--red) calc(var(--w, 0) * 100%), #7fb3c9);
}

.lake { display: block; width: 100%; height: auto; max-height: calc(100vh - 17rem); margin-inline: auto; overflow: visible; }
.lake__water {
  fill: color-mix(in srgb, #2c4a57 calc(var(--w, 0) * 100%), #4f7f92);
  stroke: rgb(255 252 241 / 0.55);
  stroke-width: 1.2;
  transition: fill 0.6s;
}
.lake__river { fill: none; stroke: rgb(127 179 201 / 0.7); stroke-width: 1.6; stroke-linecap: round; }
.lake__swell path { fill: none; stroke: rgb(255 252 241 / 0.5); stroke-width: 1; stroke-linecap: round; }
.lake__name {
  font-family: var(--font-head);
  font-size: 15px;
  text-anchor: middle;
  fill: rgb(255 252 241 / 0.32);
  letter-spacing: 0.06em;
}
.route { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route--track { stroke: rgb(255 252 241 / 0.16); stroke-width: 2; stroke-dasharray: 3 5; }
.route--out { stroke: var(--gold-light); stroke-width: 2.4; }
.route--back { stroke: var(--gold-light); stroke-width: 2; stroke-dasharray: 5 5; }
.place circle { fill: var(--beige); }
.place path { fill: var(--taupe); }
.place text { font-family: var(--font-head); font-size: 10.5px; fill: rgb(255 252 241 / 0.82); }
.place--goal circle { fill: var(--gold-light); }
.place--goal text { fill: var(--gold-light); font-size: 11.5px; }
.ripple circle { fill: none; stroke: var(--gold-light); stroke-width: 1; opacity: 0; }
.ripple.is-on circle { animation: ripple 2.4s ease-out infinite; }
.ripple.is-on circle:nth-child(2) { animation-delay: 0.6s; }
.ripple.is-on circle:nth-child(3) { animation-delay: 1.2s; }
@keyframes ripple { 0% { opacity: 0.9; transform: scale(0.2); } 100% { opacity: 0; transform: scale(1.2); } }
.boat__halo { fill: rgb(241 207 99 / 0.22); }
.boat__hull { fill: var(--gold-light); }
.boat__sail { fill: none; stroke: var(--beige); stroke-width: 1.3; stroke-linejoin: round; }

.wave { display: block; width: calc(100% + 2.5rem); height: 40px; margin: 0.25rem -1.25rem 0; }
.wave__line { fill: none; stroke: var(--gold-light); stroke-width: 2; stroke-linecap: round; }
.wave__line--2 { stroke: rgb(255 252 241 / 0.35); stroke-width: 1.2; }

/* Phones / tablets: slim fixed bar at the bottom while the story is on screen */
.companion-bar {
  position: fixed;
  left: 50%;
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  z-index: 30;
  display: none;
  align-items: center;
  gap: 0.75rem;
  width: min(22rem, calc(100% - 2rem));
  padding: 0.5rem 0.9rem 0.5rem 0.6rem;
  border-radius: 999px;
  background: rgb(71 49 24 / 0.94);
  color: var(--beige);
  box-shadow: inset 0 0 0 1px rgb(201 154 0 / 0.45), 0 14px 30px -12px rgb(28 19 9 / 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--font-head);
  font-size: 0.9375rem;
  transform: translate(-50%, 160%);
  transition: transform 0.6s var(--ease-out);
  pointer-events: none;
}
.js .companion-bar { display: flex; }
.companion-bar.is-on { transform: translate(-50%, 0); }
.companion-bar__wave { flex: none; width: 4.5rem; height: 1.75rem; border-radius: 999px; background: rgb(255 252 241 / 0.08); }
.companion-bar__wave path { fill: none; stroke: var(--gold-light); stroke-width: 2; stroke-linecap: round; }
.companion-bar__place { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.companion-bar__pct { position: relative; flex: none; width: 2.75rem; height: 4px; border-radius: 4px; background: rgb(255 252 241 / 0.2); overflow: hidden; }
.companion-bar__pct span { position: absolute; inset: 0; background: var(--gold-light); transform-origin: 0 50%; transform: scaleX(var(--read, 0)); }
@media (min-width: 1000px) { .js .companion-bar { display: none; } }

/* ---------- 5. Watch ---------- */
.watch {
  position: relative;
  padding-block: 5rem;
  background: var(--brown);
  color: var(--beige);
  overflow: hidden;
}
.watch::before {
  content: "";
  position: absolute;
  right: -15rem;
  top: -10rem;
  width: 50rem;
  height: 34rem;
  background: radial-gradient(closest-side, rgb(201 154 0 / 0.16), transparent);
  pointer-events: none;
}
.watch .sec-head__kicker { color: var(--gold-light); }
.watch .sec-head__title { color: var(--beige); }
.watch :focus-visible { outline-color: var(--gold-light); }
.watch__grid { position: relative; display: grid; gap: 1.5rem; }
@media (min-width: 900px) {
  .watch__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; gap: 2rem; }
}

.screen__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
  box-shadow: 0 24px 50px -24px rgb(0 0 0 / 0.7);
}
/* Fine gold frame, like the Home tiles */
.screen__frame::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgb(241 207 99 / 0.7);
  border-radius: calc(var(--radius) - 8px);
  opacity: 0;
  transition: opacity 0.45s, inset 0.6s var(--ease-out);
  pointer-events: none;
}
.screen__frame:hover::after { opacity: 1; inset: 8px; }
.screen__frame.is-playing::after { display: none; }
.screen__poster {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}
.screen__poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out), filter 0.5s;
  filter: saturate(0.9) brightness(0.8);
}
.screen__poster:hover img { transform: scale(1.04); filter: saturate(1) brightness(0.9); }
.screen__play {
  position: relative;
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 10px rgb(193 15 24 / 0.25), 0 10px 26px -6px rgb(0 0 0 / 0.6);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s;
}
.screen__play svg { width: 1.75rem; height: 1.75rem; fill: #fff; margin-left: 3px; }
.screen__poster:hover .screen__play { transform: scale(1.08); box-shadow: 0 0 0 16px rgb(193 15 24 / 0.18), 0 10px 26px -6px rgb(0 0 0 / 0.6); }
.screen__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.screen__caption { margin: 0.9rem 0 0; font-size: 0.9375rem; color: rgb(255 252 241 / 0.8); }
.screen__caption a { color: var(--gold-light); }
.screen.is-swapping .screen__frame { animation: swap-in 0.7s var(--ease-out); }
@keyframes swap-in { from { opacity: 0.2; transform: scale(0.98); } }

.reel { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.tape {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.6rem;
  border-radius: 18px;
  background: rgb(255 252 241 / 0.06);
  border: 1px solid rgb(255 252 241 / 0.12);
  text-decoration: none;
  color: var(--beige);
  transition: background-color 0.3s, border-color 0.3s, transform 0.4s var(--ease-out);
}
.tape:hover, .tape.is-active { background: rgb(255 252 241 / 0.12); border-color: rgb(241 207 99 / 0.6); }
.tape:hover { transform: translateX(3px); }
.tape__thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: var(--ink);
}
.tape__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.75); }
/* No still for the Vimeo telling: a warm "lamp-lit" poster instead */
.tape__thumb--plain { background: radial-gradient(80% 90% at 30% 20%, rgb(201 154 0 / 0.55), transparent 70%), linear-gradient(135deg, #5a3e1f, var(--ink)); }
.tape__play { position: relative; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--red); }
.tape__play svg { width: 1rem; height: 1rem; fill: #fff; margin-left: 2px; }
.tape__text { font-size: 0.9375rem; line-height: 1.45; }
.tape.is-active .tape__play { background: var(--gold); }

/* ---------- 6. Listen ----------
   A gold sound wave: bars fill with gold as the story plays; click or use
   the arrow keys on the wave to move through it. */
.listen { padding-block: 4rem 1rem; }
.player {
  display: grid;
  gap: 1.25rem;
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: 0 2px 4px rgb(71 49 24 / 0.04), 0 22px 44px -26px rgb(71 49 24 / 0.45);
}
.player__title { margin: 0; font-size: clamp(1.5rem, 3.5vw, 2rem); }
.player__audio { width: 100%; }
.player__ui { display: flex; align-items: center; gap: 1rem; }
.player__ui[hidden] { display: none; }
.player__btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 3.75rem;
  height: 3.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--red);
  cursor: pointer;
  box-shadow: 0 8px 20px -8px rgb(193 15 24 / 0.7);
  transition: transform 0.3s var(--ease-out), background-color 0.2s;
}
.player__btn:hover { background: var(--red-dark); transform: scale(1.05); }
.player__btn svg { width: 1.5rem; height: 1.5rem; fill: #fff; }
.player__btn .i-play { margin-left: 3px; }
.player__btn .i-pause, .player.is-playing .player__btn .i-play { display: none; }
.player.is-playing .player__btn .i-pause { display: block; }
.player__wave {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 3.5rem;
  cursor: pointer;
  border-radius: 8px;
}
.player__wave span {
  flex: 1;
  min-width: 1px;
  height: calc(var(--v) * 100%);
  border-radius: 2px;
  background: rgb(71 49 24 / 0.16);
  transition: background-color 0.2s, transform 0.4s var(--ease-out);
}
.player__wave span.is-done { background: var(--gold); }
.player.is-playing .player__wave span.is-near { transform: scaleY(1.18); }
.player__time { flex: none; min-width: 5.5rem; font-family: var(--font-head); font-size: 0.875rem; color: #6b5a45; text-align: right; }
.player__dur::before { content: " / "; }
.player__dur:empty::before { content: ""; }
@media (min-width: 768px) {
  .player { grid-template-columns: 15rem 1fr; align-items: center; padding: 2rem 2.25rem; }
}
@media (max-width: 479.98px) {
  .player__ui { flex-wrap: wrap; }
  .player__wave { flex-basis: calc(100% - 4.75rem); }
  .player__time { min-width: 0; width: 100%; text-align: left; padding-left: 4.75rem; margin-top: -0.5rem; }
}

/* ---------- 7. Explore tabs ---------- */
.explore { padding-block: 5rem 3rem; }
.tabs__list {
  position: relative;
  display: flex;
  gap: 0.25rem;
  padding: 0.35rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
}
.tabs__list::-webkit-scrollbar { display: none; }
.tabs__tab {
  position: relative;
  z-index: 1;
  flex: none;
  min-height: 44px;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--brown);
  font: 500 0.9375rem var(--font-head);
  cursor: pointer;
  transition: color 0.3s;
}
.tabs__tab[aria-selected="true"] { color: var(--beige); }
html:not(.js) .tabs__list { display: none; }
.tabs__ink {
  position: absolute;
  z-index: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: var(--brown);
  box-shadow: inset 0 0 0 1px rgb(201 154 0 / 0.5);
  transition: transform 0.45s var(--ease-out), width 0.45s var(--ease-out);
}
.tabs__heading { font-size: 1.375rem; margin-bottom: 1rem; }
.js .tabs__heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
html:not(.js) .tabs__panel + .tabs__panel { margin-top: 2.5rem; }
.js .tabs__panel[hidden] { display: none; }
.js .tabs__panel.is-entering { animation: rise 0.55s var(--ease-out) both; }
.tabs__panel { max-width: 52rem; }
.tabs__panel .screen__caption { color: #6b5a45; }
.tabs__panel .screen__caption a { color: var(--red); }

/* Documents: a small stack of pages that fans out on hover */
.doc {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  max-width: 34rem;
  padding: 1.5rem 1.75rem;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: 0 14px 30px -22px rgb(71 49 24 / 0.5);
  transition: border-color 0.3s, transform 0.4s var(--ease-out);
}
.doc:hover { border-color: var(--gold); transform: translateY(-2px); }
.doc__stack { position: relative; flex: none; width: 4.25rem; height: 5.5rem; }
.doc__stack span {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: var(--beige);
  border: 1px solid rgb(71 49 24 / 0.2);
  box-shadow: 0 4px 10px -6px rgb(71 49 24 / 0.5);
  transition: transform 0.5s var(--ease-out);
}
.doc__stack span:nth-child(3) {
  background:
    linear-gradient(var(--gold), var(--gold)) 0.6rem 0.8rem / 1.8rem 3px no-repeat,
    repeating-linear-gradient(transparent 0 0.45rem, rgb(71 49 24 / 0.16) 0.45rem calc(0.45rem + 1.5px)) 0.6rem 1.4rem / calc(100% - 1.2rem) 3.2rem no-repeat,
    #fff;
}
.doc:hover .doc__stack span:nth-child(1), .doc.is-in .doc__stack span:nth-child(1) { transform: rotate(-9deg) translate(-6px, 2px); }
.doc:hover .doc__stack span:nth-child(2), .doc.is-in .doc__stack span:nth-child(2) { transform: rotate(-4deg) translate(-2px, 0); }
.doc__text { display: grid; gap: 0.15rem; }
.doc__name { font-family: var(--font-head); font-size: 1.1875rem; line-height: 1.25; }
.doc__meta { font-size: 0.9375rem; color: #6b5a45; }
.doc__open { margin-top: 0.4rem; font-family: var(--font-head); font-size: 0.9375rem; color: var(--red); }
.doc__open::after { content: " \2192"; display: inline-block; transition: transform 0.3s var(--ease-out); }
.doc:hover .doc__open::after { transform: translateX(4px); }
.doc--small { padding: 1.1rem 1.25rem; gap: 1.25rem; }
.doc--small .doc__stack { width: 3.25rem; height: 4.25rem; }

.mapview { display: grid; gap: 1.5rem; align-items: start; }
.mapview__img { display: block; max-width: 22rem; overflow: hidden; border-radius: var(--radius); box-shadow: 0 18px 40px -24px rgb(71 49 24 / 0.6); }
.mapview__img img { transition: transform 1.2s var(--ease-out); }
.mapview__img:hover img { transform: scale(1.04); }
@media (min-width: 768px) { .mapview { grid-template-columns: 22rem 1fr; } }

/* ---------- 8. Poems ---------- */
.poems { padding-block: 4rem 5rem; background: linear-gradient(var(--beige), #f8f0da 30%, #f8f0da 70%, var(--beige)); }
.poems__grid { display: grid; gap: 2rem; }
@media (min-width: 1000px) { .poems__grid { grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: start; } }
.poem { margin: 0; }
.poem__head { display: grid; gap: 0.3rem; margin-bottom: 1.5rem; }
.poem__title { font-family: var(--font-head); font-size: clamp(1.5rem, 3.5vw, 2rem); line-height: 1.1; }
.poem__meta { font-size: 0.9375rem; color: #6b5a45; }

/* The chain poem: love lines sit left, hate lines step in */
.couplet {
  display: grid;
  gap: 0.1rem;
  margin: 0 0 1.1rem;
  padding-left: 1rem;
  border-left: 2px solid rgb(201 154 0 / 0.55);
  font-size: 1.1875rem;
  line-height: 1.55;
}
.couplet--hate { margin-left: clamp(1rem, 6vw, 3.5rem); border-left-color: rgb(134 118 99 / 0.45); }
.couplet span + span { font-style: italic; color: #5a4630; }
.couplet b { font-weight: 600; border-radius: 4px; transition: background-color 0.6s, color 0.6s, box-shadow 0.6s; }
/* The word handed on lights gold (JS marks each couplet .is-lit as it's reached; no JS: all lit) */
html:not(.js) .couplet b, .couplet.is-lit span:last-child b, .couplet.is-lit span:first-child b { background: rgb(201 154 0 / 0.2); box-shadow: 0 0 0 2px rgb(201 154 0 / 0.2); }
.poem--chain.is-closed .couplet:first-child span:first-child b,
.poem--chain.is-closed .couplet--last span:first-child b { background: var(--gold); color: #fff; box-shadow: 0 0 0 2px var(--gold); }
@media (prefers-reduced-motion: no-preference) {
  .js .couplet { opacity: 0; transform: translateX(-0.75rem); transition: opacity 0.9s var(--ease-out), transform 1s var(--ease-out); }
  .js .couplet--hate { transform: translateX(0.75rem); }
  .js .couplet.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .couplet b { background: rgb(201 154 0 / 0.2); }
}

.poem--song {
  padding: 1.75rem 1.75rem 1.25rem;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: 0 22px 44px -28px rgb(71 49 24 / 0.45);
}
.poem--song .poem__body p { line-height: 1.7; }
.poem__label { margin: 0 0 0.2rem; font-family: var(--font-head); font-size: 0.8125rem; letter-spacing: 0.16em; text-transform: uppercase; color: #8a6a00; }
.chorus { margin-bottom: 1.25rem; padding: 1rem 1.25rem 0.25rem; border-radius: 14px; background: rgb(201 154 0 / 0.1); }
.poem__label--repeat { margin-bottom: 1.25rem; }
.poem__label--repeat::after { content: " \21BB"; color: var(--gold); }

/* ---------- 9. Paintings ----------
   Each painting is unveiled from the centre out as it scrolls in, then
   drifts very slightly as the page moves (story.js sets --sp). */
.paintings { padding-block: 5rem; }
.paintings__grid { display: grid; gap: 2rem; }
@media (min-width: 900px) { .paintings__grid { grid-template-columns: 1.65fr 1fr; align-items: end; gap: 2.5rem; } }
.paintings__grid--single { max-width: 560px; margin-inline: auto; }
@media (min-width: 900px) { .paintings__grid--single { grid-template-columns: 1fr; } }
.painting { margin: 0; }
.painting__frame {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
  box-shadow: 0 2px 4px rgb(71 49 24 / 0.08), 0 28px 50px -28px rgb(71 49 24 / 0.6);
}
.painting__frame img { width: 100%; transform: translateY(calc((var(--sp, 0.5) - 0.5) * -4%)) scale(1.08); }
.painting figcaption { margin-top: 0.9rem; font-size: 0.9375rem; color: #6b5a45; }
.painting figcaption a { color: var(--red); }
@media (prefers-reduced-motion: no-preference) {
  .js .painting__frame { clip-path: inset(12% 12% 12% 12% round var(--radius)); transition: clip-path 1.4s var(--ease-out); }
  .js .painting.is-in .painting__frame { clip-path: inset(0 0 0 0 round var(--radius)); }
  .js .painting figcaption { opacity: 0; transition: opacity 0.8s 0.6s; }
  .js .painting.is-in figcaption { opacity: 1; }
}

/* ---------- 10. Previous / next ---------- */
.pager { padding-block: 1rem 5rem; }
.pager__grid { display: grid; gap: 1rem; }
.pager__link {
  position: relative;
  display: grid;
  gap: 0.2rem;
  padding: 1.5rem 1.75rem 2.1rem;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line-soft);
  text-decoration: none;
  box-shadow: 0 16px 34px -26px rgb(71 49 24 / 0.5);
  transition: border-color 0.3s, transform 0.45s var(--ease-out);
}
.pager__link:hover { border-color: var(--gold); transform: translateY(-3px); }
.pager__dir { font-family: var(--font-head); font-size: 0.8125rem; letter-spacing: 0.18em; text-transform: uppercase; color: #8a6a00; }
.pager__num {
  position: absolute;
  right: 1.25rem;
  bottom: 0.2rem;
  font-family: var(--font-head);
  font-size: 5rem;
  line-height: 1;
  color: rgb(201 154 0 / 0.14);
  transition: transform 0.6s var(--ease-out), color 0.4s;
}
.pager__link:hover .pager__num { transform: translateY(-6px); color: rgb(201 154 0 / 0.26); }
.pager__title { position: relative; font-family: var(--font-head); font-size: 1.5rem; line-height: 1.2; }
.pager__ref { position: relative; font-size: 0.9375rem; color: #6b5a45; }
.pager__dir::before, .pager__dir::after { display: inline-block; transition: transform 0.35s var(--ease-out); }
.pager__link--prev .pager__dir::before { content: "\2190\00a0"; }
.pager__link--next .pager__dir::after { content: "\00a0\2192"; }
.pager__link--prev:hover .pager__dir::before { transform: translateX(-4px); }
.pager__link--next:hover .pager__dir::after { transform: translateX(4px); }
.pager__home {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 56px;
  padding: 0 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-head);
  text-decoration: none;
  color: var(--brown);
  transition: color 0.25s;
}
.pager__home svg { width: 1.375rem; height: 1.375rem; fill: none; stroke: var(--gold); stroke-width: 1.8; }
.pager__home:hover { color: var(--red); }
@media (min-width: 900px) {
  .pager__grid { grid-template-columns: 1fr auto 1fr; align-items: stretch; }
  .pager__link--next { text-align: right; }
  .pager__link--next .pager__num { right: auto; left: 1.25rem; }
  .pager__home { flex-direction: column; padding: 0 1.5rem; }
}
@media (max-width: 899.98px) {
  .pager__home { order: 3; }
}

/* ---------- 11. Reduced motion ----------
   site.css stops transitions and animations. Here: nothing is left waiting
   to be revealed. */
@media (prefers-reduced-motion: reduce) {
  .s-hero__img { transform: scale(1.02); }
  .painting__frame img { transform: none; }
}

/* =========================================================================
   12. Generated story pages (every story but the hand-built 196)
   The hero has no painting: a dark room lit by a warm glow, the story's
   number standing large in the background, and the story's own map laid
   down beside the title (it unfolds on load). The reading companion shows
   that map again, slowly panning as you read, with a reading meter.
   ========================================================================= */
.s-hero:not(:has(.s-hero__media)) { min-height: auto; padding-bottom: 0; }
.s-hero:not(:has(.s-hero__media)) .s-hero__content { padding-top: 7.5rem; padding-bottom: 3.5rem; }
.s-hero { --tint: 201 154 0; }
.s-hero--beginnings { --tint: 241 207 99; }
.s-hero--abraham { --tint: 214 140 60; }
.s-hero--moses { --tint: 201 120 40; }
.s-hero--david { --tint: 193 15 24; }
.s-hero--gospels { --tint: 241 207 99; }
.s-hero--acts { --tint: 120 160 190; }
.s-hero:not(:has(.s-hero__media)) {
  background:
    radial-gradient(70% 90% at 85% 30%, rgb(var(--tint) / 0.18), transparent 70%),
    radial-gradient(60% 80% at 10% 100%, rgb(201 154 0 / 0.1), transparent 70%),
    var(--ink);
}
.s-hero:not(:has(.s-hero__media)) .s-hero__glow { left: 75%; top: 40%; }
.s-hero__numeral {
  position: absolute;
  right: -0.06em;
  bottom: -0.22em;
  z-index: 0;
  font-family: var(--font-head);
  font-size: clamp(10rem, 34vw, 30rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgb(241 207 99 / 0.16);
  pointer-events: none;
  user-select: none;
}
.s-hero__content { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) {
  .s-hero--map .s-hero__content { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 3.5rem; }
}
.s-hero__title { max-width: 16ch; }

/* The map, laid on the table */
.s-map { margin: 0; perspective: 1400px; }
.s-map__frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: #d4a35a;
  box-shadow: 0 0 0 1px rgb(241 207 99 / 0.45), 0 30px 60px -20px rgb(0 0 0 / 0.75);
  transform: rotate(-1.5deg);
  transform-origin: 50% 0;
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s;
}
.s-map__frame img { width: 100%; height: auto; aspect-ratio: 660 / 360; object-fit: cover; }
.s-map__frame::after {             /* paper folds */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 32.8%, rgb(0 0 0 / 0.14) 33.3%, rgb(255 255 255 / 0.1) 33.8%, transparent 34.5%, transparent 65.8%, rgb(0 0 0 / 0.14) 66.3%, rgb(255 255 255 / 0.1) 66.8%, transparent 67.5%),
    linear-gradient(180deg, transparent 49.4%, rgb(0 0 0 / 0.12) 50%, rgb(255 255 255 / 0.08) 50.6%, transparent 51.5%);
  pointer-events: none;
}
.s-map__open {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 1;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgb(28 19 9 / 0.78);
  color: var(--beige);
  font-family: var(--font-head);
  font-size: 0.8125rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s, transform 0.4s var(--ease-out);
}
.s-map__frame:hover { transform: rotate(0deg) translateY(-4px); }
.s-map__frame:hover .s-map__open, .s-map__frame:focus-visible .s-map__open { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .s-map__frame { animation: map-unfold 1.6s 0.5s var(--ease-out) both; }
  .s-hero__numeral { animation: numeral-in 2.4s 0.2s var(--ease-out) both; }
}
@keyframes map-unfold {
  0% { opacity: 0; transform: rotateX(78deg) rotate(-1.5deg) scale(0.92); }
  35% { opacity: 1; }
  100% { opacity: 1; transform: rotateX(0) rotate(-1.5deg); }
}
@keyframes numeral-in { from { opacity: 0; transform: translateY(8%); } }

.ref--plain { cursor: default; }
/* block flow (not flex) so the space after each comma in a reference is kept */
.ref--plain { display: inline-block; padding: 0.4rem 0.9rem; line-height: 1.4; border-radius: 18px; }
.ref--links a { color: inherit; text-underline-offset: 3px; }
.ref--links a:hover { color: var(--gold-light); }
.sits__grid--two { }
@media (min-width: 900px) { .sits__grid--two { grid-template-columns: 1fr 1fr; } }

/* When: the live site's timeline image, wiped in from Creation */
.when-img { overflow: hidden; border-radius: 10px; background: #fff; }
.when-img img { width: 100%; height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .js .sits__cell .when-img { clip-path: inset(0 100% 0 0); transition: clip-path 1.8s 0.2s var(--ease-in-out); }
  .js .sits__cell.is-in .when-img { clip-path: inset(0 0 0 0); }
}

/* Generic companion: the map pans slowly as you read */
.companion--map .companion__card { padding-bottom: 1.25rem; }
.companion__map {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin: 0.75rem -1.25rem 0;
}
.companion__map img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: calc(var(--read, 0) * 100%) 50%;
  transform: scale(calc(1.12 - var(--read, 0) * 0.08));
  transition: transform 0.4s linear;
  filter: sepia(0.15) saturate(0.95);
}
.companion__map::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 40px rgb(28 19 9 / 0.55);
  pointer-events: none;
}
.companion__meter { position: relative; height: 3px; margin-top: 1rem; border-radius: 3px; background: rgb(255 252 241 / 0.15); overflow: hidden; }
.companion__meter span { position: absolute; inset: 0; background: linear-gradient(90deg, var(--gold), var(--gold-light)); transform-origin: 0 50%; transform: scaleX(var(--read, 0)); }
.companion__note { margin: 0.6rem 0 0; font-family: var(--font-head); font-size: 0.8125rem; letter-spacing: 0.06em; color: rgb(255 252 241 / 0.7); }
.companion__place { font-size: 1rem; line-height: 1.25; }
.companion-bar__dot { flex: none; width: 10px; height: 10px; margin-left: 0.4rem; border-radius: 50%; background: var(--gold-light); box-shadow: 0 0 0 4px rgb(241 207 99 / 0.2); }

.story__extra { margin-top: 2rem; }
.watch__grid--single { grid-template-columns: minmax(0, 52rem) !important; }
.watch__more { margin-top: 2rem; }
.screen__poster--plain { background: radial-gradient(80% 90% at 30% 20%, rgb(201 154 0 / 0.45), transparent 70%), linear-gradient(135deg, #5a3e1f, var(--ink)); }
.screen__name { position: absolute; left: 1.25rem; right: 1.25rem; bottom: 1rem; font-family: var(--font-head); font-size: 1rem; color: var(--beige); text-align: left; }
.listen .player + .player { margin-top: 1rem; }
.tabs__panel > * + * { margin-top: 1.25rem; }
.tabs__panel .screen--inline { max-width: 52rem; }

/* =========================================================================
   13. Story pages with a painting and a living scene (every story but 196)
   Hero: the story's painting or engraving (public domain, from Wikimedia
   Commons). Big paintings fill the right of the hero like 196; smaller
   engravings hang as a framed plate over a blurred, darkened copy of
   themselves. A canvas of weather (rain, embers, dust, stars, rays) lies
   over it and settles as you scroll (scene.js).
   Story: beside the text (desktop) or pinned above it (phones), a scene
   card whose drawing follows the story paragraph by paragraph.
   ========================================================================= */
.s-hero--art { min-height: 100vh; min-height: 100svh; }
.s-hero--art .s-hero__media { overflow: hidden; }
.s-hero__bg {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  object-fit: cover;
  filter: blur(34px) brightness(0.42) saturate(0.85);
  transform: scale(1.05);
}
.s-hero__frame {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}
.s-hero__art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
  transform-origin: 50% 70%;
  transform: translate3d(0, calc(var(--p, 0) * 6svh), 0) var(--drift, scale(1)) scale(1.06);
  will-change: transform;
}
/* Plates: the engraving hangs in the light, never stretched past its size */
.s-hero__media--plate .s-hero__frame {
  inset: auto;
  left: 50%;
  top: 46%;
  width: min(86%, calc(62svh * var(--ar)));
  aspect-ratio: var(--ar);
  max-height: 64svh;
  translate: -50% -50%;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgb(241 207 99 / 0.5), 0 0 0 8px rgb(28 19 9 / 0.5), 0 0 0 9px rgb(241 207 99 / 0.22), 0 40px 80px -20px rgb(0 0 0 / 0.85);
}
.s-hero__media--plate .s-hero__art { transform: var(--drift, scale(1)); object-fit: contain; }
.s-hero__frame--crop .s-hero__art {
  position: absolute;
  left: var(--l); top: var(--t);
  width: var(--w); height: var(--h);
  max-width: none;
  object-fit: fill;
}
.s-hero__media--plate::after {
  background:
    linear-gradient(to top, var(--ink) 0%, rgb(28 19 9 / 0.4) 24%, transparent 50%),
    radial-gradient(90% 80% at 50% 45%, transparent 50%, rgb(28 19 9 / 0.55));
}
.s-hero__fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.s-hero--art .s-hero__credit a { color: inherit; text-underline-offset: 2px; }
.s-hero--art .s-hero__credit a:hover { color: var(--gold-light); }
@media (max-width: 899.98px) {
  .s-hero--art .s-hero__media { inset: 0 0 38svh; }
  .s-hero__media--plate .s-hero__frame { top: 54%; width: min(78%, calc(44svh * var(--ar))); max-height: 44svh; }
}
@media (min-width: 900px) {
  .s-hero__media--plate { -webkit-mask-image: linear-gradient(to right, transparent, #000 14%); mask-image: linear-gradient(to right, transparent, #000 14%); }
  .s-hero__media--plate .s-hero__frame { left: 54%; top: 50%; width: min(78%, calc(70svh * var(--ar))); max-height: 70svh; }
  .s-hero__media--plate::after {
    background:
      linear-gradient(to right, var(--ink) 0%, rgb(28 19 9 / 0.55) 14%, transparent 40%),
      linear-gradient(to top, rgb(28 19 9 / 0.7), transparent 30%);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .s-hero--art .s-hero__frame { animation: s-hero-in 2.6s var(--ease-out) both; }
  .s-hero--art .s-hero__bg { animation: s-hero-in 3.2s var(--ease-out) both; }
}
@media (prefers-reduced-motion: reduce) { .s-hero--art .s-hero__art { transform: none; } .s-hero__fx { display: none; } }

/* Where: the story's own map, small, opens full size */
.sits__grid--auto { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)) !important; }
/* The animated When timeline in a narrow card (four cards in a row): keep every tick, drop the crowded labels */
.sits__cell:has(> .when) { container-type: inline-size; }
@container (max-width: 380px) {
  .when__ticks li:nth-child(2), .when__ticks li:nth-child(4) { font-size: 0; }
}
.where-map { position: relative; display: block; overflow: hidden; border-radius: 10px; box-shadow: 0 0 0 1px rgb(201 154 0 / 0.35); }
.where-map img { width: 100%; height: auto; aspect-ratio: 660 / 360; object-fit: cover; transition: transform 0.8s var(--ease-out); }
.where-map span {
  position: absolute; right: 0.5rem; bottom: 0.5rem;
  padding: 0.2rem 0.7rem; border-radius: 999px;
  background: rgb(28 19 9 / 0.78); color: var(--beige);
  font-family: var(--font-head); font-size: 0.75rem;
}
.where-map:hover img { transform: scale(1.05); }
/* Creation and Job: the old site's blurred "no specific place" map */
.where-map .where-map__note { right: auto; bottom: auto; left: 0.5rem; top: 0.5rem; padding: 0.2rem 0.65rem; background: rgb(28 19 9 / 0.62); font: italic 0.75rem/1.3 var(--font-body); letter-spacing: 0.01em; pointer-events: none; }

/* The scene card */
.scene .scene__svg {
  display: block;
  width: calc(100% + 2.5rem);
  margin: 0.75rem -1.25rem 0;
  aspect-ratio: 1;
  height: auto;
  max-height: calc(100vh - 16rem);
  overflow: hidden;
  background: #2a1d10;
}
.js .scene:not(.is-ready) .scene__svg { opacity: 0; }
.scene .scene__svg { transition: opacity 0.8s; }
.scene::after {                        /* lightning lights the whole card */
  content: "";
  position: absolute; inset: 0;
  background: #fff8e0;
  opacity: var(--flash, 0);
  pointer-events: none;
  mix-blend-mode: overlay;
}
.scene__cue { transition: opacity 0.3s; }
.scene__cue.is-swapping { opacity: 0; }
.scene .companion__sea-dot { background: color-mix(in srgb, var(--red) calc(var(--i, 0) * 100%), var(--gold-light)); }
.scene .companion__note { margin-top: 0.55rem; }

/* Drawing styles (shared by every scene) */
.scene__svg * { vector-effect: non-scaling-stroke; }
.sc-hill { fill: #3b2a18; }
.sc-hill--far { fill: #5a4228; opacity: 0.8; }
.sc-hill--night { fill: #121522; }
.sc-dune { fill: #b8743a; } .sc-dune--far { fill: #d49a5a; opacity: 0.85; }
.sc-peak { fill: #2f2a2a; stroke: rgb(255 252 241 / 0.12); }
.sc-sea { fill: #2c4a57; stroke: rgb(255 252 241 / 0.35); stroke-width: 1; }
.sc-sea--2 { fill: #36596a; } .sc-sea--flat { stroke: none; } .sc-sea--3 { fill: #426b7d; opacity: 0.85; }
.sc-river { fill: #4f7f92; }
.sc-ripple { fill: none; stroke: rgb(255 252 241 / 0.4); stroke-width: 1; }
.sc-rain { stroke: rgb(214 226 232 / 0.55); stroke-width: 1; }
.sc-hail { stroke: #e8eef0; }
.sc-hail .sc-rain { stroke: #f4f8fa; stroke-width: 2; stroke-linecap: round; }
.sc-bolt { fill: none; stroke: #fff6c8; stroke-width: 2.4; stroke-linejoin: round; filter: drop-shadow(0 0 6px #f1cf63); }
.sc-boat__hull { fill: var(--gold-light); } .sc-boat__sail { fill: none; stroke: var(--beige); stroke-width: 1.4; stroke-linejoin: round; }
.sc-ark path, .sc-ark rect { fill: #7a4f24; stroke: var(--gold-light); stroke-width: 1; }
.sc-dove { fill: none; stroke: #fffaf0; stroke-width: 1.6; stroke-linecap: round; }
.sc-bow path { fill: none; stroke-width: 3.4; opacity: 0.75; }
.sc-flame { fill: url(#sc-fire); mix-blend-mode: screen; }
.sc-ember { fill: #f6b24a; }
.sc-motes .sc-ember { fill: #fff0b8; }
.sc-altar rect, .sc-block { fill: #8a7356; stroke: #3b2a18; stroke-width: 0.8; }
.sc-dust { fill: rgb(214 170 110 / 0.35); }
.sc-star { fill: #fff8dc; }
.sc-moon { fill: #f6efd2; }
.sc-sun { fill: #f6d27a; filter: drop-shadow(0 0 12px rgb(246 210 122 / 0.8)); }
.sc-ray { fill: rgb(255 236 170 / 0.16); }
.fig { fill: #1c1309; stroke: rgb(255 252 241 / 0.55); stroke-width: 0.8; }
.fig--glow { fill: #fff3c4; stroke: var(--gold-light); filter: drop-shadow(0 0 5px rgb(241 207 99 / 0.9)); }
.fig--foe { fill: #3a120c; }
.sc-spear, .sc-staff { stroke: rgb(255 252 241 / 0.7); stroke-width: 1; fill: none; }
.sc-floor { fill: #3b2a18; } .sc-pillar { fill: #8a7356; } .sc-roof { fill: #6a5640; }
.sc-banner { fill: #8a1a14; stroke: var(--gold-light); stroke-width: 0.6; }
.sc-steps rect, .sc-throne { fill: #6a4a2a; stroke: var(--gold-light); stroke-width: 0.8; }
.sc-crown { fill: var(--gold-light); filter: drop-shadow(0 0 4px #f1cf63); }
.sc-redglow { fill: #c10f18; mix-blend-mode: screen; filter: blur(30px); }
.sc-cloud circle { fill: rgb(255 248 230 / 0.55); filter: blur(4px); }
.sc-smoke { fill: none; stroke: rgb(255 252 241 / 0.35); stroke-width: 3; stroke-linecap: round; }
.sc-wall { fill: #2a2018; }
.sc-window { fill: #0d0f1a; stroke: #4a3a2a; stroke-width: 2; }
.sc-beam { fill: rgb(255 236 170 / 0.5); mix-blend-mode: screen; }
.sc-bars rect { fill: #5a4a3a; stroke: #1c1309; stroke-width: 0.6; }
.sc-chain { fill: none; stroke: #9a8a7a; stroke-width: 2.5; stroke-dasharray: 4 2; }
.sc-notes path { fill: none; stroke: var(--gold-light); stroke-width: 1.4; } .sc-notes circle { fill: var(--gold-light); }
.sc-table { fill: #6a4a2a; stroke: #3b2a18; stroke-width: 6; }
.sc-loaf { fill: #d49a5a; stroke: #7a4f24; } .sc-cup { fill: #c9a46a; stroke: #7a4f24; stroke-width: 0.8; }
.sc-lampbody { fill: #c9a46a; stroke: #7a4f24; }
.sc-stalk { fill: none; stroke: #e8c46a; stroke-width: 1.4; stroke-linecap: round; }
.sc-path { fill: none; stroke: rgb(255 252 241 / 0.2); stroke-width: 2; stroke-dasharray: 3 5; }
.sc-trail { fill: none; stroke: var(--gold-light); stroke-width: 2.2; stroke-linecap: round; }
.sc-shimmer path { fill: none; stroke: rgb(255 240 200 / 0.4); stroke-width: 1; }
.sc-tent path { fill: #4a3a28; stroke: rgb(255 252 241 / 0.3); }
.sc-tomb, .sc-cave { fill: #2f2a26; }
.sc-candle { fill: #e8dcc0; }
.sc-ash circle { fill: rgb(230 220 210 / 0.7); }
.sc-rings circle { fill: none; stroke: var(--gold-light); stroke-width: 1.2; }
.sc-mat { fill: #8a6a4a; }
.sc-summit { mix-blend-mode: screen; }
.sc-void { fill: #07060a; }
.sc-plant path { fill: none; stroke: #8fb36a; stroke-width: 1.4; }
.sc-birds path { fill: none; stroke: #fffaf0; stroke-width: 1.3; }
.sc-fish path { fill: #c9a46a; }
.sc-beast path { fill: none; stroke: #e8dcc0; stroke-width: 1.4; stroke-linecap: round; }
.sc-tower rect { fill: #a07a4a; stroke: #3b2a18; stroke-width: 0.8; }
.sc-words text { font-family: var(--font-head); font-size: 15px; fill: var(--gold-light); text-anchor: middle; }
.sc-city rect { fill: #4a3424; stroke: #2a1a10; }
.sc-firerain line { stroke: #f6a03a; stroke-width: 2; stroke-linecap: round; }
.sc-salt { fill: #e8e4dc; }
.sc-wood { stroke: #8a5a2a; stroke-width: 2.4; fill: none; }
.sc-knife { fill: #e8eef0; }
.sc-ram path, .sc-calf { fill: #c9a46a; }
.sc-calf { fill: #f1cf63; filter: drop-shadow(0 0 6px #f1cf63); }
.sc-thicket { fill: none; stroke: #6a7a4a; stroke-width: 2; }
.sc-bush path { fill: none; stroke: #6a7a3a; stroke-width: 2.6; stroke-linecap: round; }
.sc-pyramid { fill: #d4a35a; stroke: #8a5a2a; }
.sc-nile { fill: #4f7f92; transition: fill 0.8s; }
.sc-swarm circle { fill: #1c1309; }
.sc-door { fill: #1c1309; stroke: #6a4a2a; stroke-width: 2; }
.sc-bloodmark { fill: none; stroke: #9a1a1a; stroke-width: 4; stroke-linecap: round; }
.sc-shadow { fill: #000; opacity: 0.55; filter: blur(14px); }
.sc-seabed { fill: #a08060; }
.sc-chariot path, .sc-firechariot path, .sc-firechariot circle { fill: none; stroke: var(--gold-light); stroke-width: 1.6; }
.sc-firechariot path, .sc-firechariot circle { stroke: #f6a03a; filter: drop-shadow(0 0 6px #e8892a); }
.sc-wind path { fill: none; stroke: rgb(255 252 241 / 0.35); stroke-width: 1.2; stroke-linecap: round; }
.sc-tablets path { fill: #b8b0a0; stroke: #4a3a2a; } .sc-lines { fill: none; stroke: #4a3a2a; stroke-width: 1; }
.sc-count { font-family: var(--font-head); font-size: 15px; fill: var(--gold-light); text-anchor: middle; letter-spacing: 0.1em; }
.sc-horn path { fill: none; stroke: var(--gold-light); stroke-width: 1.4; }
.sc-torch { fill: #f6a03a; filter: drop-shadow(0 0 4px #f6a03a); }
.sc-stone { fill: #9a8a7a; } .sc-arc { fill: none; stroke: var(--gold-light); stroke-dasharray: 2 4; }
.sc-trench { fill: none; stroke: #7fb3c9; stroke-width: 3; }
.sc-firecolumn { fill: url(#sc-fire); mix-blend-mode: screen; }
.sc-raincloud { fill: #6a6e74; }
.sc-mantle { fill: #7a5a3a; stroke: var(--gold-light); stroke-width: 0.6; }
.sc-bigfish { fill: #3a5a64; stroke: rgb(255 252 241 / 0.4); }
.sc-bone { fill: none; stroke: #e8e0cc; stroke-width: 1.6; stroke-linecap: round; }
.sc-furnace { fill: #3a2418; stroke: #1c1309; stroke-width: 2; } .sc-furnace__in { fill: #7a1a0c; }
.sc-writing { font-size: 22px; fill: #fff3c4; filter: drop-shadow(0 0 6px #f1cf63); direction: rtl; }
.sc-hand { fill: #f0e0c8; }
.sc-eyes ellipse { fill: #f6c24a; filter: drop-shadow(0 0 3px #f6c24a); }
.sc-rubble rect { fill: #8a7356; }
.sc-bigstar path { fill: #fff8dc; filter: drop-shadow(0 0 8px #fff3c4); }
.sc-stable { fill: #4a3424; stroke: var(--gold-light); stroke-width: 0.6; }
.sc-sheep ellipse { fill: #e8e0cc; }
.sc-jar { fill: none; stroke: #c9a46a; stroke-width: 1.6; } .sc-jarfill { fill: #7fb3c9; transition: fill 1s; }
.sc-coin { fill: var(--gold-light); }
.sc-roll circle { fill: #6a5e54; stroke: #3a3230; }
.sc-cross path { fill: none; stroke: #1c1309; stroke-width: 4; stroke-linecap: round; }
.sc-veil path { fill: #8a1a2a; }
.sc-tongue { fill: url(#sc-fire); filter: drop-shadow(0 0 4px #e8892a); }
.sc-flash { fill: #fffbe8; }
.sc-salt, .sc-ram, .sc-bow, .sc-dove { transition: opacity 0.6s; }

/* Desktop: the card's height follows the screen; phones/tablets: a pinned strip */
@media (max-width: 999.98px) {
  .story--scene .story__grid { gap: 0; }
  .story--scene .companion--scene {
    display: block;
    order: -1;
    position: sticky;
    top: 4.4rem;
    z-index: 6;
    margin: 0 0 1.75rem;
  }
  .companion--scene .companion__card { padding: 0; border-radius: 14px; }
  .companion--scene .companion__head {
    position: absolute; z-index: 2; left: 0.75rem; right: 0.75rem; top: 0.55rem;
    font-size: 0.9375rem;
    text-shadow: 0 1px 6px rgb(0 0 0 / 0.7);
  }
  .companion--scene .scene__svg { width: 100%; margin: 0; aspect-ratio: auto; height: 132px; max-height: none; border-radius: 14px; }
  .companion--scene .companion__meter { position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0.5rem; margin: 0; }
  .companion--scene .companion__note { display: none; }
  .story-page--scene .js .companion-bar, .story-page--scene .companion-bar { display: none !important; }
}
@media (min-width: 1000px) { .story-page--scene .companion-bar { display: none !important; } }

/* ---------- 14. Quiet story layout (no side animation) ----------
   The text sits alone in a centred column. While it is read, the section's
   background takes a pale mood colour that follows the drama of the
   paragraph being read (--story-rgb, set by js/hero-fx.js). Its top and
   bottom edges fade into the page, so there is never a hard line. */
.story__grid--single { grid-template-columns: minmax(0, 40rem) !important; justify-content: center; }
.story--quiet { isolation: isolate; overflow: clip; }
.story--quiet {
  --story-rgb: 255 252 241;
  background: linear-gradient(var(--beige), rgb(var(--story-rgb)) 10rem, rgb(var(--story-rgb)) calc(100% - 10rem), var(--beige));
}
.story-page--quiet .companion-bar { display: none !important; }
