/* =========================================================================
   pages.css: browse pages, section pages and content pages
   (loaded after site.css and story.css)
   Order: 1 page hero · 2 switch + chips · 3 story rows · 4 eras ·
          5 alphabetical · 6 books · 7 people · 8 places · 9 themes ·
          10 study aids · 11 sections · 12 overview sets · 13 first time ·
          14 story of the day · 15 prose pages · 16 reduced motion
   ========================================================================= */

/* ---------- 1. Page hero ----------
   The dark, warm-lit band of the story pages, shorter. The title gets the
   same gold light sweep as Home. */
.p-hero {
  position: relative;
  overflow: hidden;
  padding: 8rem 0 3.5rem;
  background:
    radial-gradient(70% 100% at 85% 20%, rgb(201 154 0 / 0.18), transparent 70%),
    radial-gradient(50% 80% at 0% 100%, rgb(193 15 24 / 0.08), transparent 70%),
    var(--ink);
  color: var(--beige);
  isolation: isolate;
}
.p-hero__glow {
  position: absolute;
  left: 70%;
  top: 30%;
  width: 70vmax;
  height: 45vmax;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgb(241 207 99 / 0.2), transparent 70%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: -1;
}
.p-hero__inner { position: relative; }
.p-hero__kicker {
  margin: 0 0 0.75rem;
  font-family: var(--font-head);
  font-size: 0.875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.p-hero__title {
  max-width: 18ch;
  padding-bottom: 0.14em;
  margin-bottom: calc(1rem - 0.14em);
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 1;
  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%;
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--beige);
  -webkit-text-fill-color: transparent;
}
.p-hero__lead { max-width: 42rem; font-size: 1.125rem; color: rgb(255 252 241 / 0.88); }
.p-hero__lead p:last-child { margin-bottom: 0; }
.p-hero__lead a, .p-hero__more a { color: var(--gold-light); }
.p-hero__more { max-width: 42rem; margin: 1rem 0 0; color: rgb(255 252 241 / 0.75); }
@media (min-width: 64rem) { .p-hero--first .p-hero__more { max-width: none; } .p-hero--first .p-hero__more br { display: none; } }
.p-hero :focus-visible { outline-color: var(--gold-light); }
@media (min-width: 768px) { .p-hero { padding: 9.5rem 0 4.5rem; } }
@media (prefers-reduced-motion: no-preference) {
  .p-hero__kicker, .p-hero__lead, .p-hero .switch, .p-hero__more { animation: rise 1s var(--ease-out) both; }
  .p-hero__kicker { animation-delay: 0.3s; }
  .p-hero__title { animation: rise 1.1s 0.45s var(--ease-out) both, gold-sweep 2.4s 0.9s ease-in-out both; }
  .p-hero__lead { animation-delay: 0.75s; }
  .p-hero .switch, .p-hero__more { animation-delay: 0.9s; }
}

/* ---------- 2. Switch (Chronological / Alphabetical / Biblical) + chips ---------- */
.switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 1.75rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgb(255 252 241 / 0.08);
  border: 1px solid rgb(255 252 241 / 0.16);
}
.switch a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 1.1rem;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--beige);
  transition: background-color 0.25s, color 0.25s;
}
.switch a:hover { background: rgb(255 252 241 / 0.12); }
.switch a[aria-current] { background: var(--beige); color: var(--brown); }
.switch--sections { border-radius: 22px; }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.5rem; }
.chip {
  min-height: 40px;
  padding: 0 1rem;
  border: 1px solid rgb(71 49 24 / 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--brown);
  font: 500 0.9375rem var(--font-head);
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.chip:hover { border-color: var(--gold); }
.chip.is-on { background: var(--brown); color: var(--beige); border-color: var(--brown); }

/* ---------- 3. Story rows (number · title · reference) ---------- */
.srows { margin: 0; padding: 0; list-style: none; }
.srow { position: relative; display: flex; align-items: center; gap: 0.5rem; border-bottom: 1px solid var(--line-soft); }
.srow__a {
  flex: 1;
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  align-items: baseline;
  gap: 0 0.5rem;
  padding: 0.7rem 0.5rem;
  text-decoration: none;
  border-radius: 10px;
  transition: background-color 0.2s;
}
.srow__a:hover { background: #fff; }
.srow__n { font-family: var(--font-head); font-size: 0.875rem; color: #8a6a00; }
.srow__t { font-size: 1.0625rem; line-height: 1.35; }
.srow__a:hover .srow__t { color: var(--red); }
.srow__r { grid-column: 2; font-size: 0.875rem; color: #6b5a45; }
@media (min-width: 768px) {
  /* title takes only the room it needs, so the reference starts close to it and rarely wraps */
  .srow__a { grid-template-columns: 3rem minmax(8rem, max-content) minmax(12rem, 1fr); column-gap: 1.25rem; }
  .srow__r { grid-column: 3; text-align: right; }
}
.mdots { display: inline-flex; gap: 4px; padding-right: 0.5rem; }
.mdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.mdot--b { background: #3c7fd0; }
.mdot--t { background: #3aa65b; }
.mdot--r { background: var(--red); }

/* ---------- 4. Eras (chronological library) ----------
   A sticky rail of the 32 eras (the current one lit as you scroll) beside
   the list. A gold journey line runs down the list and fills as you read;
   each era's marker lights when the line reaches it. */
.library { padding: 3rem 0 5rem; }
.library__grid { display: grid; gap: 2rem; }
.rail { display: none; }
@media (min-width: 1000px) {
  .library__grid { grid-template-columns: 15rem minmax(0, 1fr); gap: 3.5rem; align-items: start; }
  .rail { display: block; position: sticky; top: 6rem; max-height: calc(100vh - 7rem); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
}
.rail__title { margin: 0 0 0.6rem; font-family: var(--font-head); font-size: 0.8125rem; letter-spacing: 0.22em; text-transform: uppercase; color: #8a6a00; }
.rail__list { margin: 0; padding: 0; list-style: none; }
.rail__list a {
  display: grid;
  gap: 0;
  padding: 0.35rem 0.75rem;
  border-left: 2px solid var(--line-soft);
  font-family: var(--font-head);
  font-size: 0.875rem;
  line-height: 1.3;
  text-decoration: none;
  color: #6b5a45;
  transition: color 0.25s, border-color 0.25s, background-color 0.25s;
}
.rail__n { font-size: 0.6875rem; letter-spacing: 0.08em; color: #8a6a00; }
.rail__list a:hover { color: var(--brown); }
.rail__list a.is-on { color: var(--brown); border-left-color: var(--gold); background: linear-gradient(90deg, rgb(201 154 0 / 0.12), transparent); }

.legend { margin-bottom: 2.5rem; padding: 1.25rem 1.5rem; background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); }
.legend__title { margin: 0 0 0.6rem; font-family: var(--font-head); font-size: 1.125rem; }
.legend__list { display: grid; gap: 0.4rem; margin: 0; padding: 0; list-style: none; font-size: 0.9375rem; }
.legend__list li { display: flex; align-items: baseline; gap: 0.6rem; }
.legend__list a { color: var(--red); }
@media (min-width: 768px) { .legend__list { grid-template-columns: 1fr 1fr; } }

.journey { position: relative; padding-left: 2rem; }
.journey__line { position: absolute; left: 6px; top: 0.5rem; bottom: 0; width: 2px; background: var(--line-soft); border-radius: 2px; }
.journey__line span { position: absolute; inset: 0; background: linear-gradient(var(--gold-light), var(--gold)); transform-origin: 50% 0; transform: scaleY(var(--fill, 1)); }
.js .journey__line span { --fill: 0; }
.era { position: relative; padding-bottom: 2.5rem; scroll-margin-top: 6rem; }
.era__head { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; margin-bottom: 0.5rem; }
.era__mark {
  position: absolute;
  left: calc(-2rem + 1px);
  top: 0.45rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--beige);
  border: 2px solid rgb(71 49 24 / 0.25);
  transition: background-color 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.era.is-lit .era__mark { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 5px rgb(201 154 0 / 0.2); }
.era__title { margin: 0; font-size: clamp(1.5rem, 3.5vw, 2rem); }
.era__count { font-size: 0.9375rem; color: #6b5a45; }
.era__charts { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0.5rem 0 0.75rem; }
.era__charts .doc { padding: 0.6rem 1rem; gap: 0.75rem; }
.era__charts .doc__stack { width: 2rem; height: 2.6rem; }
.era__charts .doc__name { font-size: 1rem; }
.era__charts .doc__open, .era__charts .doc__meta { display: none; }

/* ---------- 5. Alphabetical ---------- */
.abc { position: sticky; top: 4.5rem; z-index: 20; padding: 0.4rem 0; background: rgb(255 252 241 / 0.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.abc__list { display: flex; gap: 0.15rem; margin: 0; padding: 0.35rem 0.3rem; list-style: none; overflow-x: auto; scrollbar-width: none; }
.abc__list a {
  display: grid;
  place-items: center;
  min-width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  font-family: var(--font-head);
  text-decoration: none;
  transition: background-color 0.25s, color 0.25s, transform 0.3s var(--ease-out);
}
.abc__list a:hover { background: #fff; }
.abc__list a:focus-visible { outline-offset: 1px; }
.abc__list a.is-on { background: var(--brown); color: var(--beige); transform: scale(1.08); }
.alpha { padding: 2.5rem 0 5rem; }
.letter { display: grid; gap: 0 2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line-soft); scroll-margin-top: 9rem; }
.letter__big { margin: 0; font-size: clamp(3rem, 9vw, 5.5rem); line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--gold); }
@media (min-width: 768px) { .letter { grid-template-columns: 8rem minmax(0, 1fr); } .letter__big { position: sticky; top: 10rem; align-self: start; } }

/* ---------- 6. Books ---------- */
.books { padding: 3rem 0 5rem; }
.books__note { color: #6b5a45; }
.books__testament { margin: 2.5rem 0 1.25rem; font-size: clamp(1.75rem, 4vw, 2.5rem); }
.shelf { columns: 1; column-gap: 1.25rem; }
@media (min-width: 700px) { .shelf { columns: 2; } }
@media (min-width: 1100px) { .shelf { columns: 3; } }
/* New Testament: two shelves so the long narrative books don't strand the short letters in one column */
.books__group { margin: 2rem 0 1rem; font-size: clamp(1.25rem, 2.6vw, 1.5rem); color: #6b5a45; }
.books__testament + .books__group { margin-top: 0.5rem; }
.shelf--wide { columns: auto; display: grid; gap: 1.25rem; }
.shelf--wide .book { margin-bottom: 0; }        /* more specific than .book below, so it wins */
/* the letters use the base .shelf masonry columns: every card keeps the same 1.25rem gap below it */
.book__cols { column-gap: 2rem; }
.book__cols .book__list { margin: 0; }
.book__cols .book__list li { break-inside: avoid; }
.book__cols .book__list:not(:last-child) li:last-child { border-bottom: 1px dashed var(--line-soft); }
.book__cols .book__bp { break-inside: avoid; break-after: avoid; padding-top: 0.5rem; margin: 0 0 0.25rem; }
.book__cols > .book__bp:first-child { padding-top: 0; }
@media (min-width: 700px) { .book__cols { columns: 2; } }
@media (min-width: 1100px) { .book__cols { columns: 3; } }
.book {
  position: relative;
  break-inside: avoid;
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.5rem 1rem 1.9rem;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 6px 16px 16px 6px;
  box-shadow: 0 14px 30px -24px rgb(71 49 24 / 0.6);
  scroll-margin-top: 6rem;
}
.book::before {                                  /* the spine */
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 10px;
  border-radius: 6px 0 0 6px;
  background: linear-gradient(90deg, #6d4a22, var(--brown));
  box-shadow: inset -2px 0 0 rgb(201 154 0 / 0.6);
}
.book__name { margin: 0 0 0.4rem; font-size: 1.375rem; }
.book__bp { margin: 0.5rem 0 0.25rem; font-size: 0.875rem; color: #6b5a45; }
.book__bp a { color: var(--red); }
.book__list { margin: 0 0 0.5rem; padding: 0; list-style: none; }
.book__list li { padding: 0.2rem 0; font-size: 0.9875rem; border-bottom: 1px dashed var(--line-soft); }
.book__list li:last-child { border-bottom: 0; }
.book__list a { text-decoration: none; }
.book__list a:hover { color: var(--red); text-decoration: underline; }
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .book.reveal { transform-origin: 0 50%; transform: perspective(900px) rotateY(-14deg) translateX(-0.75rem); }
  .reveal-ready .book.reveal.is-in { transform: none; transition-delay: calc(var(--i, 0) * 60ms); }
}

/* ---------- 7. People ---------- */
.people { padding: 3rem 0 4rem; }
.lineage { position: relative; display: grid; gap: 1rem; padding-left: 2.25rem; }
.lineage__line { position: absolute; left: 1.55rem; top: 1rem; bottom: 1rem; width: 2px; background: var(--line-soft); }
.lineage__line span { position: absolute; inset: 0; background: var(--gold); transform-origin: 50% 0; transform: scaleY(var(--fill, 1)); }
.js .lineage__line span { --fill: 0; }
.person {
  position: relative;
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-left: -2.25rem;
  padding: 1.1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  scroll-margin-top: 6rem;
}
.person__mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--brown);
  color: var(--gold-light);
  font-family: var(--font-head);
  font-size: 1.125rem;
  letter-spacing: 0.04em;
  box-shadow: 0 0 0 4px var(--beige), 0 0 0 5px rgb(201 154 0 / 0.5);
}
.person__name { margin: 0.1rem 0 0.2rem; font-size: 1.5rem; }
.person__meta { margin: 0 0 0.4rem; font-size: 0.9375rem; color: #6b5a45; }
.person__list summary { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 40px; font-family: var(--font-head); font-size: 0.9375rem; color: var(--red); cursor: pointer; list-style: none; }
.person__list summary::-webkit-details-marker { display: none; }
.person__list summary::after { content: ""; width: 0.45rem; height: 0.45rem; margin-top: -0.2rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.3s var(--ease-out); }
.person__list[open] summary::after { transform: rotate(225deg); margin-top: 0.2rem; }
.person__list ol, .women__list { columns: 16rem; column-gap: 1.5rem; margin: 0.5rem 0 0; padding: 0; list-style: none; }
.person__list li, .women__list li { break-inside: avoid; }
.person__list a, .women__list a { display: flex; gap: 0.6rem; padding: 0.3rem 0; text-decoration: none; }
.person__list a span, .women__list a span { min-width: 2.2rem; font-family: var(--font-head); font-size: 0.875rem; color: #8a6a00; }
.person__list a:hover, .women__list a:hover { color: var(--red); }
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .person.reveal .person__mark { transform: scale(0.4); opacity: 0; transition: transform 0.8s 0.15s var(--ease-out), opacity 0.6s 0.15s; }
  .reveal-ready .person.reveal.is-in .person__mark { transform: none; opacity: 1; }
}
.women { padding: 2rem 0 5rem; }

/* ---------- 8. Places ---------- */
.places { padding: 3rem 0 5rem; }
.places__head { margin-top: 3.5rem; }
.aids { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.aid a { display: grid; gap: 0.5rem; text-decoration: none; }
.aid__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; background: #efe6cf; box-shadow: 0 12px 26px -20px rgb(71 49 24 / 0.6); }
.aid__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.aid a:hover img { transform: scale(1.05); }
.aid__t { font-family: var(--font-head); font-size: 0.9375rem; line-height: 1.3; }
.maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.mapt { position: relative; }
.mapt[hidden] { display: none; }
.mapt > a:first-child { display: block; text-decoration: none; }
.mapt__img { display: block; aspect-ratio: 660 / 360; overflow: hidden; border-radius: 12px; background: #d9b77a; box-shadow: 0 12px 26px -20px rgb(71 49 24 / 0.7); }
.mapt__img img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.6) saturate(0.7); transition: filter 0.9s, transform 1s var(--ease-out); }
.mapt.is-in .mapt__img img, .mapt:hover .mapt__img img { filter: none; }
.mapt:hover .mapt__img img { transform: scale(1.05); }
.mapt__cap { display: flex; gap: 0.5rem; padding: 0.5rem 0.15rem 0; font-size: 0.9875rem; line-height: 1.3; }
.mapt__n { font-family: var(--font-head); font-size: 0.875rem; color: #8a6a00; }
.mapt__full { position: absolute; right: 0.5rem; top: 0.5rem; padding: 0.2rem 0.6rem; border-radius: 999px; background: rgb(28 19 9 / 0.75); color: var(--beige); font-family: var(--font-head); font-size: 0.75rem; text-decoration: none; opacity: 0; transition: opacity 0.25s; }
.mapt:hover .mapt__full, .mapt__full:focus-visible { opacity: 1; }
/* Creation and Job: the old site's blurred "no specific place" map */
.mapt__note { position: absolute; left: 0.5rem; top: 0.5rem; padding: 0.2rem 0.65rem; border-radius: 999px; background: rgb(28 19 9 / 0.62); color: var(--beige); font: italic 0.75rem/1.3 var(--font-body, Georgia, serif); letter-spacing: 0.01em; pointer-events: none; }

/* ---------- 9. Themes ---------- */
.themes-page { padding: 3rem 0 5rem; }
.cloud { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 0.5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.theme {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgb(71 49 24 / 0.12);
  font-family: var(--font-head);
  font-size: calc(0.875rem + var(--w) * 0.9rem);
  text-decoration: none;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.3s var(--ease-out);
}
.theme:hover { border-color: var(--gold); transform: translateY(-2px); }
.theme.is-on { background: var(--brown); color: var(--beige); border-color: var(--brown); }
.theme__n { font-size: 0.75rem; color: #8a6a00; }
.theme.is-on .theme__n { color: var(--gold-light); }
.themes-page__hint { min-height: 1.5em; color: #6b5a45; }
.tsec { padding: 1.5rem 0; border-top: 1px solid var(--line-soft); scroll-margin-top: 6rem; }
.tsec__h { font-size: 1.5rem; }
.tsec__h span { font-size: 0.9375rem; color: #6b5a45; font-family: var(--font-body); }
.js .tsecs.is-filtering .tsec { display: none; }
.js .tsecs.is-filtering .tsec.is-on { display: block; animation: rise 0.6s var(--ease-out) both; }
@media (prefers-reduced-motion: no-preference) {
  .js .cloud li { animation: rise 0.7s var(--ease-out) both; animation-delay: calc(var(--k, 0) * 12ms); }
}

/* ---------- 10. Study aids ---------- */
.study { padding: 3rem 0 5rem; }
.aidsec + .aidsec { margin-top: 3.5rem; }
.aidcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1.5rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.aidcard__img {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px 14px 14px 6px;
  background: #efe6cf;
  box-shadow: 0 16px 30px -22px rgb(71 49 24 / 0.7);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s;
}
.aidcard__img img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.aidcard:hover .aidcard__img { transform: translateY(-4px) rotate(-0.6deg); box-shadow: 0 22px 36px -22px rgb(71 49 24 / 0.8); }
.aidcard__t { margin: 0.7rem 0 0; font-family: var(--font-head); font-size: 1rem; line-height: 1.35; }
.aidcard__t a { color: var(--brown); text-decoration: none; transition: color 0.2s; }
.aidcard__t a:hover, .aidcard__t a:focus-visible { color: var(--red); text-decoration: underline; text-underline-offset: 0.18em; }
.aidcard__more { display: block; margin-top: 0.3rem; font-size: 0.9375rem; }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.tool a { display: grid; gap: 0.3rem; height: 100%; padding: 1.25rem 1.4rem; background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); text-decoration: none; transition: border-color 0.3s, transform 0.4s var(--ease-out); }
.tool a:hover { border-color: var(--gold); transform: translateY(-3px); }
.tool__t { font-family: var(--font-head); font-size: 1.25rem; }
.tool__t::after { content: " \2192"; color: var(--gold); }
.tool__d { font-size: 0.9375rem; color: #6b5a45; }
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .aidcard.reveal { transform: translateY(1.5rem) rotate(calc((var(--i, 0) - 1.5) * 1.5deg)); }
  .reveal-ready .aidcard.reveal.is-in { transform: none; transition-delay: calc(var(--i, 0) * 70ms); }
}

/* ---------- 11. Sections ----------
   Behind the title, a mosaic of this section's own story maps drifts at
   different speeds as you scroll. */
.p-hero--section { padding-bottom: 4rem; }
.mosaic {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 10px;
  opacity: 0.32;
  transform: rotate(-4deg) scale(1.15);
}
.mosaic__t { overflow: hidden; border-radius: 10px; transform: translateY(calc(var(--p, 0) * (var(--i) - 3) * -18px)); }
.mosaic__t:nth-child(even) { margin-top: 3rem; }
.mosaic__t img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.5) contrast(1.05); }
.p-hero--section::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--ink) 25%, rgb(28 19 9 / 0.7) 60%, rgb(28 19 9 / 0.45)); }
@media (prefers-reduced-motion: no-preference) {
  .mosaic { animation: mosaic-in 2.4s var(--ease-out) both; }
}
@keyframes mosaic-in { from { opacity: 0; transform: rotate(-4deg) scale(1.3); } }
.section-list { padding: 3rem 0 5rem; }
.sgroup + .sgroup { margin-top: 3rem; }
.sgroup { scroll-margin-top: 6rem; }
.sgroup__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; margin-bottom: 1.25rem; }
.sgroup__head h2 { margin: 0; font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
.sgroup__head span { color: #6b5a45; }
.scards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.85rem; margin: 0; padding: 0; list-style: none; }
.scard a {
  position: relative;
  display: grid;
  gap: 0.15rem;
  height: 100%;
  padding: 1.1rem 1.25rem 1.6rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  text-decoration: none;
  transition: border-color 0.3s, transform 0.45s var(--ease-out), box-shadow 0.45s;
}
.scard a:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 18px 34px -24px rgb(71 49 24 / 0.6); }
.scard__n { position: absolute; right: 0.75rem; bottom: 0.15rem; font-family: var(--font-head); font-size: 3.25rem; line-height: 1; color: rgb(201 154 0 / 0.13); transition: color 0.4s, transform 0.5s var(--ease-out); }
.scard a:hover .scard__n { color: rgb(201 154 0 / 0.28); transform: translateY(-4px); }
.scard__t { position: relative; font-family: var(--font-head); font-size: 1.1875rem; line-height: 1.25; }
.scard__r { position: relative; font-size: 0.875rem; color: #6b5a45; }
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .scard.reveal.is-in { transition-delay: calc(var(--i, 0) * 50ms); }
}

/* ---------- 12. Overview sets: the whole Bible on one line ---------- */
.sets-wrap { padding: 1rem 0 4rem; }
.sets__hint { color: #6b5a45; max-width: 42rem; }
.arc { position: relative; height: 5.5rem; margin: 1.5rem 0 1.25rem; }
.arc__line { position: absolute; left: 0; right: 0; top: 2.25rem; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--gold), var(--brown) 50%, var(--gold)); }
.arc__end { position: absolute; top: 3.5rem; font-family: var(--font-head); font-size: 0.8125rem; color: #6b5a45; }
.arc__end--a { left: 0; }
.arc__end--b { right: 0; }
.arc__dot {
  position: absolute;
  left: calc(var(--x) * (100% - 14px));
  top: calc(2.25rem - 6px);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--beige);
  box-shadow: 0 2px 6px rgb(193 15 24 / 0.4);
  transition: transform 0.3s var(--ease-out);
}
.arc__dot:hover, .arc__dot:focus-visible { transform: scale(1.5); }
@media (prefers-reduced-motion: no-preference) {
  .tabs__panel.is-entering .arc__dot, .sets.is-in .tabs__panel:not([hidden]) .arc__dot { animation: dot-drop 0.7s var(--ease-out) both; animation-delay: calc(var(--x) * 0.9s); }
}
@keyframes dot-drop { from { opacity: 0; transform: translateY(-1.75rem) scale(0.4); } }

/* ---------- 12b. Overview Stories page (cards) ----------
   Hero: lead + jump links, with the two Scripture slides as tilted tiles.
   Then: featured BibleTelling cards, a zig-zag grid of diagram cards, media
   rows, conference year cards on a dark band, set tabs of numbered cards and
   the other sets as map cards. */
.ov-hero { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 960px) { .ov-hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 3rem; } }
.ov-jump { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; margin-top: 1.75rem; }  /* the break line adds a second row gap */
/* two buttons per line, each as wide as its label: a break after the second */
.ov-jump::after { content: ""; flex-basis: 100%; order: 1; }
.ov-jump a:nth-child(n + 3) { order: 2; }
.ov-jump a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0.4rem 1rem; white-space: nowrap;
  border: 1px solid rgb(241 207 99 / 0.35); border-radius: 999px;
  color: var(--beige); font-family: var(--font-head); font-size: 0.9375rem; text-decoration: none;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}
.ov-jump a:hover, .ov-jump a:focus-visible { background: var(--gold-light); border-color: var(--gold-light); color: var(--ink); }
.scr__h { margin: 0 0 1rem; font-family: var(--font-head); font-size: 0.875rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-light); }
.scr__tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.scr__tile { transform: rotate(calc((var(--k) - 0.5) * 3deg)) translateY(calc(var(--k) * 1.5rem)); }
.scr__a { display: block; text-decoration: none; }
.scr__pic { display: block; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 10px; border: 3px solid var(--beige); background: #efe6cf; box-shadow: 0 24px 40px -22px rgb(0 0 0 / 0.8); transition: transform 0.5s var(--ease-out), box-shadow 0.5s; }
.scr__pic img { width: 100%; height: 100%; object-fit: cover; }
.scr__a:hover .scr__pic, .scr__a:focus-visible .scr__pic { transform: translateY(-4px) rotate(-0.6deg); box-shadow: 0 30px 46px -22px rgb(0 0 0 / 0.85); }
.scr__t { display: block; margin-top: 0.75rem; font-family: var(--font-head); font-size: 1rem; color: var(--gold-light); text-decoration: underline; text-decoration-color: rgb(241 207 99 / 0.45); text-underline-offset: 0.2em; transition: text-decoration-color 0.2s; }
.scr__a:hover .scr__t, .scr__a:focus-visible .scr__t { text-decoration-color: currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .js .scr__tile { animation: scr-in 1.1s var(--ease-out) both; animation-delay: calc(0.35s + var(--k) * 0.18s); }
}
@keyframes scr-in { from { opacity: 0; transform: rotate(calc((var(--k) - 0.5) * 12deg)) translateY(3rem); } }

.ov-sec { padding: 4rem 0; }
/* whole-card link: laid over the card; the text links sit above it */
.feat, .dgm, .mcard { position: relative; }
.ov-cover { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.feat__body a, .dgm__body a, .mcard__body a { position: relative; z-index: 2; }
.ov-app { padding-top: 4.5rem; }
.ov-label { display: flex; align-items: center; gap: 0.6rem; margin: 3.5rem 0 1.25rem; font-family: var(--font-head); font-size: 0.875rem; letter-spacing: 0.18em; text-transform: uppercase; color: #8a6a00; }
.ov-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgb(201 154 0 / 0.5), transparent); }
.ov-label__i { width: 1.25rem; height: 1.25rem; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Featured: the two BibleTelling approaches, dark cards */
.feats { display: grid; gap: 1.25rem; align-items: start; margin: 0; padding: 0; list-style: none; }
@media (min-width: 860px) { .feats { grid-template-columns: 1fr 1fr; } }
.feat { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: var(--radius); background: radial-gradient(90% 70% at 100% 0%, rgb(201 154 0 / 0.16), transparent 70%), var(--ink); color: var(--beige); box-shadow: 0 26px 50px -34px rgb(28 19 9 / 0.9); }
.feat__pic { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: #2a1d0f; }
.feat__pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out); }
.feat:hover .feat__pic img { transform: scale(1.04); }
.feat__pic::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(transparent, var(--ink)); }
.feat__play, .mcard__play { position: absolute; left: 50%; top: 50%; width: 3.5rem; height: 3.5rem; transform: translate(-50%, -50%); fill: rgb(193 15 24 / 0.9); stroke: #fff; stroke-width: 1.2; stroke-linejoin: round; filter: drop-shadow(0 4px 10px rgb(0 0 0 / 0.4)); z-index: 1; }
.feat__play path, .mcard__play path { fill: #fff; stroke: none; }
.feat__body { padding: 0.5rem 1.6rem 1.75rem; }
.feat__k { margin: 0 0 0.5rem; font-family: var(--font-head); font-size: 0.875rem; letter-spacing: 0.18em; text-transform: uppercase; }
.feat__k a { color: var(--gold-light); text-decoration: none; }
.feat__k a:hover, .feat__k a:focus-visible { color: var(--beige); text-decoration: underline; }
.feat__t { margin: 0; font-size: 1.0625rem; line-height: 1.75; color: rgb(255 252 241 / 0.9); }
.feat__t a { display: inline-block; margin: 0.1rem 0; padding: 0.05rem 0.65rem; border: 1px solid rgb(241 207 99 / 0.4); border-radius: 999px; color: var(--gold-light); font-family: var(--font-head); font-size: 0.875rem; line-height: 1.6; text-decoration: none; transition: background-color 0.2s, color 0.2s; }
.feat__t a:hover, .feat__t a:focus-visible { background: var(--gold-light); color: var(--ink); }

/* Diagrams: zig-zag grid, a wide card leading rows 1 and 2 from opposite sides */
.dgms { display: grid; gap: 1.25rem; margin: 0; padding: 0; list-style: none; grid-auto-flow: dense; }
@media (min-width: 640px) { .dgms { grid-template-columns: repeat(2, 1fr); } .dgm:nth-child(5n + 1) { grid-column: span 2; } }
@media (min-width: 1100px) { .dgms { grid-template-columns: repeat(4, 1fr); } .dgm:nth-child(5n + 1) { grid-column: span 2; } .dgm:nth-child(10n + 6) { grid-column: 3 / span 2; } }
.dgm { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--line-soft); border-radius: 18px; transition: border-color 0.3s, transform 0.45s var(--ease-out), box-shadow 0.45s; }
.dgm:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 18px 34px -24px rgb(71 49 24 / 0.6); }
.dgm__pic { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #efe6cf; }
.dgm__pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 1s var(--ease-out); }
.dgm:hover .dgm__pic img { transform: scale(1.04); }
.dgm__body { padding: 1rem 1.2rem 1.25rem; }
.dgm__t { margin: 0; font-size: 1.125rem; line-height: 1.3; }
.dgm__t a, .mcard__t a { color: var(--brown); text-decoration: none; }
.dgm__t a:hover, .dgm__t a:focus-visible, .mcard__t a:hover, .mcard__t a:focus-visible { color: var(--red); text-decoration: underline; text-underline-offset: 0.18em; }
.dgm__by, .mcard__by { margin: 0.35rem 0 0; font-size: 0.9375rem; line-height: 1.55; color: #5a4630; }
.dgm__by a, .mcard__by a { color: var(--red); text-decoration: underline; text-decoration-color: rgb(193 15 24 / 0.4); text-underline-offset: 0.18em; border-radius: 3px; transition: background-color 0.2s, color 0.2s, text-decoration-color 0.2s; }
.dgm__by a:hover, .dgm__by a:focus-visible, .mcard__by a:hover, .mcard__by a:focus-visible { color: var(--red-dark); background: rgb(201 154 0 / 0.2); text-decoration-color: currentColor; text-decoration-thickness: 2px; }
.dgm__t a, .mcard__t a { border-radius: 3px; transition: background-color 0.2s, color 0.2s; }
.dgm__t a:hover, .dgm__t a:focus-visible, .mcard__t a:hover, .mcard__t a:focus-visible { background: rgb(201 154 0 / 0.16); }
/* hovering the card itself: the title shows what the card opens */
.dgm:has(.ov-cover:hover) .dgm__t, .mcard:has(.ov-cover:hover) .mcard__t, .dgm:has(.ov-cover:hover) .dgm__t a, .mcard:has(.ov-cover:hover) .mcard__t a { color: var(--red); }
/* hovering a link inside a card: only that link reacts */
.dgm:has(.dgm__body a:hover), .mcard:has(.mcard__body a:hover), .feat:has(.feat__body a:hover) { transform: none; box-shadow: none; border-color: var(--line-soft); }
.dgm:has(.dgm__body a:hover) .dgm__pic img, .feat:has(.feat__body a:hover) .feat__pic img { transform: none; }
/* wide diagram cards: picture beside the text */
@media (min-width: 640px) {
  .dgm:nth-child(5n + 1) { flex-direction: row; }
  .dgm:nth-child(5n + 1) .dgm__pic { flex: 0 0 58%; aspect-ratio: auto; min-height: 15rem; }
  .dgm:nth-child(5n + 1) .dgm__body { display: flex; flex-direction: column; justify-content: center; padding: 1.5rem; }
  .dgm:nth-child(5n + 1) .dgm__t { font-size: 1.375rem; }
}
@media (min-width: 1100px) { .dgm:nth-child(10n + 6) { flex-direction: row-reverse; } }

/* Media rows: thumbnail or icon beside the text, two columns */
.mwrap { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 900px) { .mwrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (min-width: 1100px) { .mwrap { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } .mcards--rest { grid-template-columns: 1fr 1fr; } }
.mcards { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.mcard { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; align-items: start; padding: 0.85rem; background: #fff; border: 1px solid var(--line-soft); border-radius: 18px; transition: border-color 0.3s, transform 0.45s var(--ease-out); }
@media (min-width: 480px) { .mcard { grid-template-columns: 10rem minmax(0, 1fr); } }
.mcard:hover { border-color: var(--gold); transform: translateY(-2px); }
.mcard__pic { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: linear-gradient(135deg, #f6ecd2, #efe0bb); }
.mcard__pic img { width: 100%; height: 100%; object-fit: cover; }
.mcard__play { width: 2.4rem; height: 2.4rem; }
.mcard__icon { width: 2.25rem; height: 2.25rem; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mcard__body { padding: 0.2rem 0.25rem 0.2rem 0; }
.mcard__t { margin: 0; font-size: 1.0625rem; line-height: 1.3; }
/* lead media card: picture across the top, text below; the others fill in beside it */
.mcard--lead { grid-template-columns: 1fr; gap: 0.9rem; }
.mcard--lead .mcard__pic { aspect-ratio: 16 / 9; }
.mcard--lead .mcard__play { width: 3.5rem; height: 3.5rem; }
.mcard--lead .mcard__body { padding: 0 0.4rem 0.4rem; }
.mcard--lead .mcard__t { font-size: 1.25rem; }
@media (min-width: 1100px) { .mcard:not(.mcard--lead) { grid-template-columns: 7.5rem minmax(0, 1fr); } }

/* Conference: year cards on a dark band */
.conf { position: relative; overflow: hidden; isolation: isolate; background: radial-gradient(60% 90% at 10% 0%, rgb(201 154 0 / 0.16), transparent 70%), var(--ink); color: var(--beige); }
.conf__glow { position: absolute; right: -20vmax; bottom: -30vmax; width: 70vmax; height: 60vmax; background: radial-gradient(closest-side, rgb(193 15 24 / 0.12), transparent); z-index: -1; pointer-events: none; }
.conf .sec-head__kicker { color: var(--gold-light); }
.conf .sec-head__title, .conf .sec-head__title a { color: var(--beige); text-decoration: none; }
.conf .sec-head__title a:hover { color: var(--gold-light); }
.conf__cards { display: grid; gap: 1.25rem; }
@media (min-width: 860px) { .conf__cards { grid-template-columns: 1fr 1fr; } }
.conf__card { position: relative; padding: 1.75rem 1.6rem 1.6rem; border: 1px solid rgb(241 207 99 / 0.25); border-radius: var(--radius); background: rgb(255 252 241 / 0.045); }
.conf__y { margin: 0 0 0.75rem; font-size: clamp(2.75rem, 7vw, 4rem); line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--gold-light); }
.conf__body { color: rgb(255 252 241 / 0.88); }
.conf__body p { margin: 0 0 0.85rem; }
.conf__body a { color: var(--gold-light); text-underline-offset: 0.18em; border-radius: 3px; transition: background-color 0.2s, color 0.2s; }
.conf__body a:hover, .conf__body a:focus-visible { color: var(--ink); background: var(--gold-light); text-decoration: none; }
.conf .sec-head__title a { text-decoration: underline; text-decoration-color: rgb(241 207 99 / 0.4); text-underline-offset: 0.15em; }
.conf__body ul { display: grid; gap: 0.5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.conf__body li { padding: 0.65rem 0.9rem; border-left: 3px solid var(--gold); border-radius: 4px 10px 10px 4px; background: rgb(255 252 241 / 0.06); }
.conf__body strong { color: var(--beige); }
.conf__label { margin: 1.25rem 0 0.5rem !important; font-family: var(--font-head); font-size: 0.8125rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-light); }
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .conf__card.reveal.is-in { transition-delay: calc(var(--i, 0) * 140ms); }
}

/* Set cards: numbered story cards in the tabs */
.sets-wrap { padding-top: 4rem; }
.sets .tabs__panel { max-width: none; }
.setcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.75rem; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.setcard a, .setcard__a { position: relative; display: grid; align-content: start; gap: 0.1rem; height: 100%; padding: 0.9rem 1.1rem 1rem 3.6rem; overflow: hidden; background: #fff; border: 1px solid var(--line-soft); border-radius: 16px; text-decoration: none; transition: border-color 0.3s, transform 0.45s var(--ease-out), box-shadow 0.45s; }
.setcard a:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 16px 30px -24px rgb(71 49 24 / 0.6); }
.setcard__n { position: absolute; left: 0.9rem; top: 0.95rem; min-width: 2.1rem; font-family: var(--font-head); font-size: 1.125rem; line-height: 1.2; color: #8a6a00; }
.setcard__n::after { content: ""; display: block; width: 1.4rem; height: 2px; margin-top: 0.3rem; background: var(--gold); border-radius: 2px; transition: width 0.4s var(--ease-out); }
.setcard a:hover .setcard__n::after { width: 2.1rem; }
.setcard__t { font-family: var(--font-head); font-size: 1.0625rem; line-height: 1.3; }
.setcard__s { font-size: 0.875rem; font-style: italic; color: #5a4630; }
.setcard__r { font-size: 0.8125rem; color: #6b5a45; }
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .setcard.reveal.is-in { transition-delay: calc(var(--i, 0) * 40ms); }
}

/* Other sets: map cards */
.osets { padding-top: 1rem; padding-bottom: 5rem; }
.oset__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; margin-bottom: 1.25rem; }
.oset__head h3 { margin: 0; font-size: clamp(1.375rem, 3vw, 1.875rem); }
.oset__head span { color: #6b5a45; }
.setcards--maps { grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: 1rem; }
.setcards--maps a, .setcards--maps .setcard__a { padding: 0 0 1rem; align-content: start; }
.setcard__map { position: relative; display: block; aspect-ratio: 660 / 360; overflow: hidden; margin-bottom: 0.6rem; background: #d9b77a; }
.setcard__map--none { background: linear-gradient(135deg, #efe0bb, #d9b77a); }
.setcard__map img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.6) saturate(0.7); transition: filter 0.9s, transform 1s var(--ease-out); }
.setcard.is-in .setcard__map img, .setcard a:hover .setcard__map img { filter: none; }
.setcard a:hover .setcard__map img { transform: scale(1.05); }
.setcards--maps .setcard__n { position: static; padding: 0 1rem; font-size: 0.875rem; }
.setcards--maps .setcard__n::after { display: none; }
.setcards--maps .setcard__t, .setcards--maps .setcard__s, .setcards--maps .setcard__r { padding: 0 1rem; }

/* ---------- 13. First time ---------- */
.first { padding: 3rem 0 5rem; }
.steps { display: grid; gap: 1.25rem; margin: 2rem 0; padding: 0; list-style: none; counter-reset: s; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; display: grid; align-content: start; gap: 0.5rem; padding: 1.75rem 1.5rem 1.5rem; background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); }
.step__n { position: absolute; right: 1.25rem; top: 0.5rem; font-family: var(--font-head); font-size: 3.5rem; color: rgb(201 154 0 / 0.18); }
.step__icon { width: 2.25rem; height: 2.25rem; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.step__t { margin: 0.25rem 0 0; font-size: 1.375rem; }
.step p { margin: 0; color: #5a4630; }
.step__a { margin-top: 0.5rem; font-family: var(--font-head); color: var(--red); text-decoration: none; }
.step__a::after { content: " \2192"; }
.first__go { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.first__alt { font-family: var(--font-head); }
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .step.reveal.is-in { transition-delay: calc(var(--i, 0) * 120ms); }
  .reveal-ready .step.reveal .step__icon path, .reveal-ready .step.reveal .step__icon circle { stroke-dasharray: 80; stroke-dashoffset: 80; transition: stroke-dashoffset 1.6s 0.3s var(--ease-out); }
  .reveal-ready .step.reveal.is-in .step__icon path, .reveal-ready .step.reveal.is-in .step__icon circle { stroke-dashoffset: 0; }
}

/* ---------- 14. Story of the Day ---------- */
.sotd-page { padding: 3rem 0 5rem; }
.sotd-page__grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 900px) {
  .sotd-page__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-template-areas: "form sample" "how sample"; grid-template-rows: auto 1fr; }
  .sotd-page__grid > .signup { grid-area: form; }
  .sotd-page__grid > .sample { grid-area: sample; }
  .sotd-page__grid > .how { grid-area: how; }
}
/* How it works: three steps joined by a gold thread */
.how__title { margin: 0 0 1rem; font-size: 1.5rem; }
.how__steps { position: relative; display: grid; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.how__steps::before { content: ""; position: absolute; left: calc(1.125rem - 1px); top: 1.25rem; bottom: 1.25rem; width: 2px; background: linear-gradient(var(--gold), rgb(201 154 0 / 0.25)); transform-origin: top; }
.how__step { position: relative; display: grid; grid-template-columns: 2.25rem 1fr; gap: 1rem; align-items: start; }
.how__step .step__icon { box-sizing: content-box; width: 1.5rem; height: 1.5rem; padding: 0.375rem; background: var(--beige); border: 1px solid rgb(201 154 0 / 0.5); border-radius: 50%; }
.how__t { margin: 0.2rem 0 0.15rem; font-size: 1.125rem; }
.how__step p { margin: 0; color: #5a4630; }
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .how.reveal .how__steps::before { transform: scaleY(0); transition: transform 1.2s 0.2s var(--ease-out); }
  .reveal-ready .how.reveal.is-in .how__steps::before { transform: none; }
  .reveal-ready .how.reveal .how__step { opacity: 0; transform: translateY(8px); transition: opacity 0.6s, transform 0.6s var(--ease-out); }
  .reveal-ready .how.reveal.is-in .how__step { opacity: 1; transform: none; }
  .reveal-ready .how.reveal.is-in .how__step:nth-child(2) { transition-delay: 0.35s; }
  .reveal-ready .how.reveal.is-in .how__step:nth-child(3) { transition-delay: 0.7s; }
  .reveal-ready .how.reveal .step__icon path, .reveal-ready .how.reveal .step__icon rect { stroke-dasharray: 80; stroke-dashoffset: 80; transition: stroke-dashoffset 1.6s 0.3s var(--ease-out); }
  .reveal-ready .how.reveal.is-in .step__icon path, .reveal-ready .how.reveal.is-in .step__icon rect { stroke-dashoffset: 0; }
}
.signup { padding: 2rem; background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: 0 22px 44px -28px rgb(71 49 24 / 0.5); }
.signup__title { font-size: 1.5rem; }
.signup__label { display: block; margin-bottom: 0.4rem; font-family: var(--font-head); }
.signup__input { width: 100%; min-height: 52px; padding: 0 1rem; border: 2px solid rgb(71 49 24 / 0.2); border-radius: 14px; font: 1.0625rem var(--font-body); color: var(--brown); background: var(--beige); transition: border-color 0.25s, box-shadow 0.25s; }
.signup__input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 5px rgb(201 154 0 / 0.18); }
.signup__hp { position: absolute; left: -5000px; }
.signup__btn { margin-top: 1rem; }
.signup__status { margin: 0.75rem 0 0; color: var(--red); }
.signup__status:empty { margin: 0; }
/* Sample story: one weekday story, shown like it arrives in the inbox */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sample__kicker { margin: 0 0 0.25rem; font-family: var(--font-head); font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: #6b5a45; }
.sample__heading { margin: 0 0 1rem; font-size: 1.5rem; }
.sample__days { display: none; gap: 0.375rem; margin-bottom: 1rem; }
.js .sample__days { display: flex; }
.sample__day { flex: 1; min-height: 44px; border: 1px solid rgb(71 49 24 / 0.2); border-radius: 999px; background: transparent; font: 0.9375rem var(--font-head); color: var(--brown); cursor: pointer; transition: background-color 0.25s, color 0.25s, border-color 0.25s; }
.sample__day:hover { border-color: var(--gold); }
.sample__day[aria-selected="true"] { background: var(--brown); border-color: var(--brown); color: var(--beige); }
.sample__day.is-today::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 0.35em; vertical-align: 0.15em; border-radius: 50%; background: var(--gold); }
.sample__card { position: relative; padding: 1.75rem 1.5rem 1.5rem; background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: 0 22px 44px -28px rgb(71 49 24 / 0.5); overflow: hidden; }
.sample__card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--gold); transform-origin: var(--ox, 50%) 50%; }
.sample__card--alt, .sample__card[hidden] { display: none; }
.sample__meta { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; margin: 0 0 0.5rem; font-family: var(--font-head); font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: #6b5a45; }
.sample__era::before { content: "·"; margin-right: 0.75rem; color: var(--gold); }
.sample__title { margin: 0; font-size: 1.75rem; }
.sample__ref { margin: 0.25rem 0 1rem; font-style: italic; color: #6b5a45; }
.sample__body { position: relative; }
.sample__body p { margin: 0 0 1em; }
.sample__body::after { content: ""; position: absolute; inset: auto 0 0; height: 3.5em; background: linear-gradient(rgb(255 255 255 / 0), #fff); pointer-events: none; }
.sample__more { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--font-head); color: var(--red); text-underline-offset: 0.2em; }
/* Arrival: the gold seal draws across, then each part settles in */
@media (prefers-reduced-motion: no-preference) {
  .sample__card.is-arriving::before { animation: sample-seal 0.7s cubic-bezier(.2,.7,.2,1) both; }
  .sample__card.is-arriving > * { animation: sample-in 0.6s cubic-bezier(.2,.7,.2,1) both; }
  .sample__card.is-arriving > :nth-child(2) { animation-delay: 0.08s; }
  .sample__card.is-arriving > :nth-child(3) { animation-delay: 0.16s; }
  .sample__card.is-arriving .sample__body p { animation: sample-in 0.7s cubic-bezier(.2,.7,.2,1) both; }
  .sample__card.is-arriving .sample__body p:nth-child(1) { animation-delay: 0.28s; }
  .sample__card.is-arriving .sample__body p:nth-child(2) { animation-delay: 0.5s; }
  .sample__card.is-arriving > .sample__more { animation-delay: 0.7s; }
}
@keyframes sample-seal { from { transform: scaleX(0); } }
@keyframes sample-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- 15. Prose pages ---------- */
.prose-page { padding: 3rem 0 5rem; }
.prose-page__grid { display: grid; gap: 2rem; }
@media (min-width: 1000px) {
  .prose-page__grid.has-toc { grid-template-columns: 15rem minmax(0, 48rem); gap: 4rem; }
}
.toc { align-self: start; }
@media (min-width: 1000px) { .toc { position: sticky; top: 6rem; max-height: calc(100vh - 7rem); overflow-y: auto; } }
.toc__title { margin: 0 0 0.6rem; font-family: var(--font-head); font-size: 0.8125rem; letter-spacing: 0.22em; text-transform: uppercase; color: #8a6a00; }
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc a { display: block; padding: 0.3rem 0.75rem; border-left: 2px solid var(--line-soft); font-size: 0.9375rem; text-decoration: none; color: #6b5a45; transition: color 0.2s, border-color 0.2s; }
.toc a:hover, .toc a.is-on { color: var(--brown); border-left-color: var(--gold); }
.prose { max-width: 48rem; font-size: 1.0625rem; line-height: 1.75; }
.prose > * + * { margin-top: 1rem; }
.prose p { margin: 0 0 1rem; }
.prose .is-center { text-align: center; }
.prose a { color: var(--red); }
.prose .prose__h { margin: 2.25rem 0 0.75rem; font-size: clamp(1.4rem, 3vw, 1.9rem); scroll-margin-top: 6rem; }
.prose h3.prose__h { font-size: 1.375rem; }
.prose h4.prose__h { font-size: 1.125rem; }
.prose__list { margin: 0 0 1.25rem; padding-left: 1.25rem; }
.prose__list li { margin-bottom: 0.35rem; }
.prose__list li::marker { color: var(--gold); }
.prose blockquote { margin: 1.5rem 0; padding: 0.5rem 0 0.5rem 1.25rem; border-left: 3px solid var(--gold); font-style: italic; color: #5a4630; }
.prose--dark { color: var(--beige); }
.prose--dark a { color: var(--gold-light); }
.prose--dropcap > p:first-of-type::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); }
/* Short page band (About): the dark band only, behind the site header.
   The title opens the text column below it, brown with a small gold dash. */
.p-hero--compact { padding: 0; height: 5.75rem; }
@media (min-width: 768px) { .p-hero--compact { height: 6.5rem; } }
.prose-page--centered { padding-top: 3rem; }
.prose-page--centered .prose-page__grid { max-width: calc(48rem + 2 * var(--pad)); }
.page-title { margin: 0 0 2rem; font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1.15; color: var(--brown); }
.page-title::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 3px;
  margin-top: 1rem;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold) 0 80%, transparent);
}
.prose-page--centered .prose { margin-inline: auto; text-align: left; }
.prose-page--centered .prose > * + * { margin-top: 0; }
.prose-page--centered .prose p { margin: 0 0 1.25rem; }
.prose__sign { margin-top: 2rem !important; text-align: right; font-style: italic; font-size: 1.1875rem; color: var(--brown); }

/* Questions: title + subtitle with one gold dash, the question stems as cards, the rest in the text column */
.page-head { margin: 0 0 2.25rem; }
.page-head .page-title { margin: 0; }
.page-head .page-title::after { display: none; }
.page-sub { margin: 0.5rem 0 0; font-size: clamp(1.125rem, 2.4vw, 1.375rem); font-style: italic; line-height: 1.4; color: #6b5a45; }
.page-head::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 3px;
  margin-top: 1rem;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold) 0 80%, transparent);
}
.qpage__wide { max-width: calc(70rem + 2 * var(--pad)); }
/* Cards keep their own height (no row stretching). Without JS: CSS columns,
   1 / 2 (700px) / 3 (1100px). pages.js then places each card in the column that
   makes the column bottoms as even as possible (.is-placed), keeping one 1.25rem
   gap between cards in a column and between columns. */
.qcards { --gap: 1.25rem; columns: 1; column-gap: var(--gap); margin: 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .qcards { columns: 2; } }
@media (min-width: 1100px) { .qcards { columns: 3; } }
.qcard { display: flex; break-inside: avoid; margin: 0 0 var(--gap); }
.qcard article { flex: 1; }
.qcards.is-placed { display: grid; columns: auto; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: 1px; gap: 0 var(--gap); }
.qcards.is-placed .qcard { margin: 0; }
.qcard article {
  position: relative;
  overflow: hidden;
  padding: 1.25rem 1.5rem 0.9rem;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 6px 16px 16px 6px;
  box-shadow: 0 14px 30px -24px rgb(71 49 24 / 0.6);
  transition: transform 0.45s var(--ease-out), border-color 0.3s, box-shadow 0.45s;
}
.qcard article::before {                         /* a gold edge, like a tabbed index card */
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--gold), rgb(201 154 0 / 0.25));
}
.qcard article::after {                          /* a large faint question mark in the corner */
  content: "?";
  position: absolute;
  top: -0.9rem;
  right: 0.6rem;
  font: italic 600 6rem/1 var(--font-body);
  color: rgb(201 154 0 / 0.13);
  transform: rotate(12deg);
  transition: transform 0.6s var(--ease-out), color 0.4s;
  pointer-events: none;
}
.qcard article:hover { transform: translateY(-3px); border-color: rgb(201 154 0 / 0.55); box-shadow: 0 20px 34px -24px rgb(71 49 24 / 0.75); }
.qcard article:hover::after { transform: rotate(0deg) scale(1.06); color: rgb(201 154 0 / 0.22); }
.qcard__n { margin: 0 0 0.2rem; font-family: var(--font-head); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.18em; color: #8a6a00; }
.qcard__t { position: relative; margin: 0 0 0.6rem; padding-right: 2.5rem; font-size: 1.25rem; line-height: 1.25; color: var(--brown); }
.qcard__list { position: relative; margin: 0; padding: 0; list-style: none; }
.qcard__list li { padding: 0.45rem 0; font-size: 0.9875rem; line-height: 1.55; border-top: 1px dashed var(--line-soft); }
.qcard__blank { color: #8a6a00; font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; }
.qcredit { margin: 1.25rem 0 0; text-align: right; font-style: italic; font-size: 1.0625rem; color: var(--brown); }
.qpage__prose { margin: 3.5rem auto 0; padding-top: 2.5rem; border-top: 1px solid transparent; border-image: linear-gradient(90deg, transparent, rgb(201 154 0 / 0.6), transparent) 1; }
.qpage__prose > .prose__h:first-child { margin-top: 0; }
.qpage__prose .prose__h { font-size: clamp(1.25rem, 2.6vw, 1.5rem); letter-spacing: 0.04em; }
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .qcard.reveal { transform: translateY(1.25rem) rotate(calc((var(--i, 0) - 1) * 1.2deg)); }
  .reveal-ready .qcard.reveal.is-in { transform: none; transition-delay: calc(var(--i, 0) * 80ms); }
}
@media (prefers-reduced-motion: reduce) {
  .qcard article, .qcard article::after { transition: none; }
  .qcard article:hover { transform: none; }
  .qcard article:hover::after { transform: rotate(12deg); }
}

/* Pie chart (About: how the Bible is written) */
.pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 2rem; margin: 0.5rem 0 2rem; padding: 1.25rem 1rem; border: 1px solid var(--line-soft); border-radius: var(--radius); background: rgb(201 154 0 / 0.05); }
.pie__svg { width: 11rem; height: 11rem; flex: none; overflow: visible; }
.pie__slice { cursor: pointer; transition: transform 0.35s var(--ease-out), opacity 0.3s; }
.pie__slice path { stroke: var(--beige); stroke-width: 2; stroke-linejoin: round; }
.pie__slice text { font: 600 13px var(--font-head); text-anchor: middle; pointer-events: none; fill: var(--beige); }
.pie__slice--story path { fill: var(--brown); }
.pie__slice--poetry path { fill: var(--gold); }
.pie__slice--poetry text { fill: var(--ink); }
.pie__slice--reason path { fill: var(--red); }
.pie__sw { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 3px; flex: none; }
.pie__sw--story { background: var(--brown); }
.pie__sw--poetry { background: var(--gold); }
.pie__sw--reason { background: var(--red); }
.pie__cap { min-width: 13rem; }
.pie__title { display: block; margin-bottom: 0.4rem; font-family: var(--font-head); font-size: 0.8125rem; letter-spacing: 0.18em; text-transform: uppercase; color: #8a6a00; }
.pie__keys { margin: 0; padding: 0; list-style: none; }
.pie__key { display: flex; align-items: center; gap: 0.6rem; width: 100%; min-height: 44px; padding: 0.35rem 0.6rem; border: 0; border-radius: 10px; background: none; font: 1rem var(--font-body); color: var(--brown); text-align: left; cursor: pointer; transition: background-color 0.2s, opacity 0.3s; }
.pie__key:hover, .pie__key[aria-pressed="true"] { background: rgb(201 154 0 / 0.14); }
.pie__v { margin-left: auto; font-family: var(--font-head); font-weight: 600; }
.pie[data-on] .pie__slice:not(.is-on) { opacity: 0.35; }
.pie[data-on] .pie__key:not([aria-pressed="true"]) { opacity: 0.55; }
.pie__slice.is-on { transform: translate(var(--dx), var(--dy)); }
@media (prefers-reduced-motion: reduce) { .pie__slice, .pie__key { transition: none; } .pie__slice.is-on { transform: none; } }
@media (forced-colors: active) { .pie__sw { forced-color-adjust: none; } }

.figure { margin: 1.5rem 0; }
.figure img { border-radius: 14px; box-shadow: 0 18px 36px -24px rgb(71 49 24 / 0.6); }
.figure figcaption { margin-top: 0.6rem; font-size: 0.9375rem; color: #6b5a45; }
.rule { height: 1px; margin: 2.5rem 0; border: 0; background: linear-gradient(90deg, transparent, rgb(201 154 0 / 0.6), transparent); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tr:first-child td { font-family: var(--font-head); background: rgb(201 154 0 / 0.1); }
.cols { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .cols { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); } }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.note { color: #6b5a45; font-style: italic; }
.code-label { display: block; margin-top: 1rem; font-family: var(--font-head); }
.code { width: 100%; margin-top: 0.4rem; padding: 0.75rem 1rem; border: 1px solid var(--line-soft); border-radius: 12px; background: #fff; font: 0.875rem/1.5 ui-monospace, Menlo, monospace; color: var(--brown); resize: vertical; }

/* Accordions (the live site's drop-downs) */
.acc { margin: 0.75rem 0; background: #fff; border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden; }
.acc > summary {
  position: relative;
  display: block;
  padding: 1rem 3rem 1rem 1.25rem;
  font-family: var(--font-head);
  font-size: 1.0625rem;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.2s;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary:hover { background: rgb(201 154 0 / 0.08); }
.acc > summary::after { content: ""; position: absolute; right: 1.25rem; top: 1.3rem; width: 0.55rem; height: 0.55rem; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); transition: transform 0.35s var(--ease-out); }
.acc[open] > summary::after { transform: rotate(225deg); top: 1.55rem; }
.acc__body { padding: 0.25rem 1.25rem 1.25rem; }
.acc__body > :first-child { margin-top: 0; }
.acc.is-opening .acc__body { animation: rise 0.45s var(--ease-out) both; }

/* Story pages: generic tab content uses prose rhythm */
.tabs__panel p, .tabs__panel li { line-height: 1.7; }
.tabs__panel ol.prose__list, .tabs__panel ul.prose__list { max-width: 48rem; }
.tabs__panel .figure { max-width: 48rem; }

/* Home: quick links under the categories */
.begin__more { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem; margin: 2rem 0 0; font-family: var(--font-head); }
.begin__more a { text-decoration: none; border-bottom: 1px solid rgb(201 154 0 / 0.7); padding-bottom: 2px; }
.begin__more a:hover { color: var(--red); }

/* Contact: blocks in the centered column, set apart by soft gold rules */
.prose a.btn, .prose a.btn:hover, .prose a.btn:visited { color: #fff; text-decoration: none; }   /* .prose a turned button text red on red */
.cblock + .cblock { margin-top: 2.25rem; padding-top: 2.25rem; border-top: 1px solid transparent; border-image: linear-gradient(90deg, transparent, rgb(201 154 0 / 0.6), transparent) 1; }
.cblock > :last-child { margin-bottom: 0 !important; }
.cblock__h { margin: 0 0 0.5rem; font-size: clamp(1.25rem, 2.6vw, 1.5rem); letter-spacing: 0.02em; color: var(--brown); }
.prose .cblock__mail { font-family: var(--font-head); font-size: clamp(1.25rem, 3vw, 1.5rem); }
.cblock__mail a { text-decoration-color: rgb(193 15 24 / 0.35); text-underline-offset: 0.2em; }
.cblock__mail a:hover { text-decoration-color: currentColor; }
.prose .cblock__act { margin: 0.25rem 0 1.5rem; }
.cbanner { margin: 0.5rem 0 1.5rem; }
.cbanner img { display: block; width: 240px; max-width: 100%; height: auto; }
.cbanner.is-live img { cursor: copy; transition: transform 0.25s var(--ease-out); }
.cbanner.is-live img:hover { transform: translateY(-2px); }
.codebox__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.codebox__label { display: block; font-family: var(--font-head); color: var(--brown); }
.codebox__code { display: block; margin: 0; resize: none; word-break: break-all; }
.codebox__code { field-sizing: content; }                       /* grows to fit the code (Chrome, Edge, Safari) */
@media (max-width: 599px) { .codebox__code { min-height: 9.5rem; } }   /* older browsers: room for the wrapped code on phones */
.codebox__copy {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 40px; padding: 0.4rem 1rem;
  border: 1px solid var(--gold); border-radius: 999px; background: var(--beige); color: var(--brown);
  font: 500 0.9375rem/1 var(--font-head); cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.codebox__copy::before { content: ""; width: 0.95em; height: 0.95em; border: 1.5px solid currentColor; border-radius: 2px; box-shadow: 3px -3px 0 -1.5px var(--beige), 3px -3px 0 0 currentColor; }
.codebox__copy[hidden] { display: none; }                         /* no JS, no copy: the code box stays selectable */
.codebox__copy:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.codebox__copy:hover::before { box-shadow: 3px -3px 0 -1.5px var(--gold), 3px -3px 0 0 currentColor; }
.codebox__copy.is-done { background: var(--brown); border-color: var(--brown); color: var(--beige); }
.codebox__copy.is-done::before { width: 0.45em; height: 0.8em; border-width: 0 2px 2px 0; border-radius: 0; box-shadow: none; transform: rotate(45deg) translate(-1px, -2px); }
.codebox__status { min-height: 1.5em; margin: 0.4rem 0 0 !important; font-size: 0.875rem; color: #6b5a45; }
@media (prefers-reduced-motion: reduce) { .codebox__copy { transition: none; } }

/* Languages: one card per language, then the two language families side by side.
   Same index-card language as Questions: white card, gold edge, cards dealt in. */
.lpage__wide { max-width: calc(70rem + 2 * var(--pad)); }
.lcards { display: grid; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .lcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .lcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lcard { display: flex; }
.lcard article, .lfam {
  position: relative;
  flex: 1;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 6px 16px 16px 6px;
  box-shadow: 0 14px 30px -24px rgb(71 49 24 / 0.6);
}
.lcard article { display: flex; flex-direction: column; padding: 1.35rem 1.5rem 1.25rem 1.75rem; transition: transform 0.45s var(--ease-out), border-color 0.3s, box-shadow 0.45s; }
.lcard article::before, .lfam::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 6px 0 0 6px;
  background: linear-gradient(180deg, var(--gold), rgb(201 154 0 / 0.25));
}
.lcard__t { margin: 0 0 0.85rem; font-size: 1.375rem; line-height: 1.25; color: var(--brown); }
.lang__link { color: inherit; text-decoration: none; }
.lcard .lang__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }   /* whole card opens the language */
.lcard .lang__link:focus-visible { outline: none; }
.lcard article:has(.lang__link:focus-visible) { outline: 3px solid var(--gold); outline-offset: 3px; }
.lang__native { display: block; margin-bottom: 0.15rem; font-family: var(--font-body); font-size: 2.25rem; font-weight: 500; line-height: 1.25; color: #8a6a00; }
.lang__native[dir="rtl"] { text-align: left; }
.lang__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.5rem; margin: auto 0 0; font-family: var(--font-head); font-size: 0.8125rem; }
.lang__kind { display: inline-flex; align-items: center; gap: 0.35rem; letter-spacing: 0.12em; text-transform: uppercase; color: #6b5a45; }
.lang__kind svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lang__note { color: #6b5a45; font-family: var(--font-body); font-style: italic; font-size: 0.9375rem; }
.lang__kind + .lang__note::before, .lang__new + .lang__note::before { content: "·"; margin-right: 0.5rem; font-style: normal; color: var(--gold); }
.lang__new { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; background: rgb(201 154 0 / 0.14); color: #6e5400; font-family: var(--font-head); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; white-space: nowrap; }
/* hover: the card lifts, the title turns red */
.lcard:not(.is-soon) article:hover { transform: translateY(-3px); border-color: rgb(201 154 0 / 0.55); box-shadow: 0 20px 34px -24px rgb(71 49 24 / 0.75); }
.lcard article:hover .lang__link .lang__en { color: var(--red); }
.lang__en { transition: color 0.25s; }
/* Spanish: its two editions, each with its own link, above the card link */
.lcard__eds { margin: -0.25rem 0 1rem; padding: 0; list-style: none; font-size: 0.9875rem; line-height: 1.5; }
.lcard__eds li { padding: 0.55rem 0; border-top: 1px dashed var(--line-soft); }
.lcard__eds .lang__new { margin-left: 0.4rem; vertical-align: 1px; }
.lcard__eds li:last-child { border-bottom: 1px dashed var(--line-soft); }
.lcard__eds a, .lfam a { position: relative; z-index: 2; color: var(--red); text-underline-offset: 3px; }
.lcard__eds a:hover, .lfam a:hover { background: rgb(201 154 0 / 0.18); text-decoration-thickness: 2px; }
.lcard:has(.lcard__eds a:hover) article { transform: none; }
/* in progress (Pashtun): no link yet, so a quieter dashed card */
.lcard.is-soon article { background: transparent; border-style: dashed; border-color: rgb(134 118 99 / 0.45); box-shadow: none; }
.lcard.is-soon article::before { background: rgb(134 118 99 / 0.35); }
.lcard.is-soon .lcard__t { color: #6b5a45; }
/* Language families: two cards, a row per language */
.lfams { display: grid; gap: 1.25rem; margin-top: 1.25rem; }
@media (min-width: 900px) { .lfams { grid-template-columns: 3fr 2fr; align-items: start; } }
.lfam { padding: 1.35rem 1.5rem 0.75rem 1.75rem; }
.lfam__t { margin: 0 0 0.5rem; font-size: 1.375rem; line-height: 1.25; color: var(--brown); }
.lfam__list { margin: 0; padding: 0; list-style: none; }
.lrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.35rem 1rem; padding: 0.7rem 0; border-top: 1px dashed var(--line-soft); }
.lrow__name { font-size: 1.0625rem; font-weight: 600; }
.lrow__name a { display: inline-flex; min-height: 2rem; align-items: center; text-decoration: none; }
.lrow__name a:hover .lang__en, .lrow__name a:focus-visible .lang__en { text-decoration: underline; text-underline-offset: 3px; }
.lrow.is-plain .lrow__name { font-weight: 500; color: #5a4630; }
.lrow .lang__tags { margin: 0; }
@media (min-width: 640px) { .lrow .lang__tags { justify-content: flex-end; } }
@media (max-width: 639.98px) { .lrow { flex-direction: column; align-items: flex-start; } }
/* West Africa: five names, no links: set as a tidy run of names */
.lfam:not(:has(a)) .lfam__list { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.5rem 0 0.75rem; border-top: 1px dashed var(--line-soft); }
.lfam:not(:has(a)) .lrow { padding: 0.3rem 0.85rem; border: 1px solid var(--line-soft); border-radius: 999px; background: var(--beige); }
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .lcard.reveal { transform: translateY(1.25rem) rotate(calc((var(--i, 0) - 1) * 1.2deg)); }
  .reveal-ready .lcard.reveal.is-in { transform: none; transition-delay: calc(var(--i, 0) * 80ms); }
  .reveal-ready .lfam.reveal.is-in { transition-delay: calc(var(--i, 0) * 120ms); }
}
@media (prefers-reduced-motion: reduce) {
  .lcard article, .lang__en { transition: none; }
  .lcard:not(.is-soon) article:hover { transform: none; }
}

/* Tutorials: six numbered steps on a gold line (the old heading images are now real headings),
   a live demo story, media buttons that open and close their player, a map that opens full screen. */
.tpage__wide { max-width: calc(52rem + 2 * var(--pad)); }
.tpage__sub::first-letter { text-transform: uppercase; }
.tjump { margin: 0 0 3rem; }
.tjump ol { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.tjump a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0.3rem 0.9rem 0.3rem 0.35rem; border: 1px solid var(--line-soft); border-radius: 999px; background: #fff; font-family: var(--font-head); font-size: 0.9375rem; line-height: 1.25; color: var(--brown); text-decoration: none; transition: border-color 0.25s, background-color 0.25s; }
.tjump a span { display: grid; place-items: center; flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: rgb(201 154 0 / 0.14); color: #6e5400; font-weight: 600; font-size: 0.875rem; }
.tjump a:hover { border-color: rgb(201 154 0 / 0.6); background: rgb(201 154 0 / 0.08); }

.tsteps { margin: 0; padding: 0; list-style: none; }
.tstep { --node: 2.75rem; position: relative; display: grid; grid-template-columns: var(--node) minmax(0, 1fr); gap: 0 1.1rem; padding-bottom: 3.25rem; scroll-margin-top: 6rem; }
.tstep:last-child { padding-bottom: 0; }
.tstep::before {                                   /* the gold line down to the next step */
  content: "";
  position: absolute;
  left: calc(var(--node) / 2 - 1px);
  top: calc(var(--node) + 0.4rem);
  bottom: 0.4rem;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--gold), rgb(201 154 0 / 0.2));
  transform-origin: top;
}
.tstep:last-child::before { display: none; }
.tstep__n { display: grid; place-items: center; width: var(--node); height: var(--node); border: 2px solid var(--gold); border-radius: 50%; background: var(--beige); font: 600 1.25rem/1 var(--font-body); color: var(--brown); box-shadow: 0 0 0 5px var(--beige); }
.tstep__t { margin: 0.35rem 0 0.9rem; font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.2; color: var(--brown); }
.tstep__body { min-width: 0; font-size: 1.0625rem; line-height: 1.75; }
.tstep__body > p { margin: 0 0 1rem; }
.tstep__body > :last-child { margin-bottom: 0; }
@media (min-width: 768px) { .tstep { --node: 3.25rem; gap: 0 1.75rem; } .tstep__t { margin-top: 0.45rem; } }

/* Step 1: the six story groups, as real links */
.tgroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr)); gap: 0.6rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.tgroup { display: flex; align-items: center; gap: 0.7rem; min-height: 52px; padding: 0.5rem 1rem 0.5rem 0.6rem; background: #fff; border: 1px solid var(--line-soft); border-radius: 6px 14px 14px 6px; box-shadow: inset 4px 0 0 var(--gold), 0 10px 22px -20px rgb(71 49 24 / 0.6); font-family: var(--font-head); font-size: 1rem; line-height: 1.25; color: var(--brown); text-decoration: none; transition: transform 0.3s var(--ease-out), border-color 0.25s, color 0.2s; }
.tgroup__n { display: grid; place-items: center; flex: none; width: 1.9rem; height: 1.9rem; margin-left: 0.25rem; border-radius: 50%; background: rgb(201 154 0 / 0.14); color: #6e5400; font-size: 0.875rem; font-weight: 600; }
.tgroup:hover { transform: translateY(-2px); border-color: rgb(201 154 0 / 0.55); color: var(--red); }

/* Step 3: the demo story */
.tdemo { margin-top: 1.5rem; }
.tdemo__kicker { margin: 0 0 0.6rem; font-family: var(--font-head); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: #8a6a00; }
.tdemo__kicker::after { content: " \2193"; letter-spacing: 0; }
.tstory { position: relative; padding: 1.5rem 1.5rem 1.25rem 1.75rem; background: #fff; border: 1px solid var(--line-soft); border-radius: 6px 18px 18px 6px; box-shadow: inset 4px 0 0 var(--gold), 0 18px 36px -26px rgb(71 49 24 / 0.6); }
.tstory__t { margin: 0 0 0.6rem; font-size: 1.5rem; color: var(--brown); }
.tstory .refs { margin: 0 0 1rem; }
.tstory .ref { min-height: 40px; border-color: rgb(201 154 0 / 0.5); background: rgb(201 154 0 / 0.1); color: var(--brown); }
.tstory .ref--links a { color: var(--red); font-family: var(--font-head); }
.tstory .ref--links a::after { content: " \2197"; }
.tstory .ref:hover { background: rgb(201 154 0 / 0.2); border-color: var(--gold); }
.tstory .ref--links a:hover { color: var(--red-dark); }
.tstory__text p { margin: 0 0 1rem; }
.tstory__more:focus { outline: none; }
.tstory.is-collapsed .tstory__more { display: none; }
.tstory.is-collapsed .tstory__text > p:last-of-type { -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.tmore { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; margin-top: -0.25rem; padding: 0 1.1rem; border: 1px solid rgb(193 15 24 / 0.35); border-radius: 999px; background: transparent; font: 500 0.9375rem var(--font-head); color: var(--red); cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.tmore:hover { background: var(--red); color: #fff; }
.tmore svg, .tgo svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s var(--ease-out); }
.tmore:hover svg, .tgo a:hover svg { transform: translateX(3px); }

/* Step 4: media buttons and their players */
.thint { font-size: 0.9875rem; color: #5a4630; }
.tmedia__btns { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.tbtn { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 48px; padding: 0 1.25rem 0 1rem; border: 1.5px solid rgb(71 49 24 / 0.25); border-radius: 999px; background: #fff; font: 500 1rem var(--font-head); color: var(--brown); text-decoration: none; cursor: pointer; transition: background-color 0.2s, border-color 0.2s, color 0.2s; }
.tbtn svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tbtn:hover { border-color: var(--gold); background: rgb(201 154 0 / 0.1); }
.tbtn[aria-expanded="true"] { border-color: var(--gold); background: var(--gold); color: var(--ink); }
.tpanel + .tpanel { margin-top: 1rem; }
.tpanel[hidden], .tbtn[hidden], .tmore[hidden] { display: none; }
.tpanel .screen__frame { box-shadow: 0 18px 36px -24px rgb(28 19 9 / 0.7); }
@media (min-width: 768px) { .tpanel .player { grid-template-columns: 11rem 1fr; } }

/* Step 5: the map, opened full screen by pages.js (a new tab without JS) */
.tmap { margin: 1.25rem 0 0; }
.tmap__link { position: relative; display: block; overflow: hidden; border-radius: 16px; background: var(--ink); box-shadow: 0 18px 36px -24px rgb(28 19 9 / 0.7); }
.tmap__link img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 40%; transition: transform 0.8s var(--ease-out); }
.tmap__link:hover img { transform: scale(1.04); }
.tmap__btn { position: absolute; right: 0.75rem; bottom: 0.75rem; display: inline-flex; align-items: center; gap: 0.45rem; min-height: 40px; padding: 0 1rem; border-radius: 999px; background: rgb(28 19 9 / 0.78); color: var(--beige); font: 500 0.9375rem var(--font-head); }
.tmap__btn svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: var(--gold-light); stroke-width: 2; stroke-linecap: round; }
.tmap figcaption { margin-top: 0.6rem; font-style: italic; font-size: 0.9375rem; color: #6b5a45; }
.tgo { margin-top: 1.5rem !important; }
.tgo .btn { gap: 0.55rem; }

/* Full-screen map viewer (pages.js): drag or scroll to move around the map */
.zoom { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: var(--ink); color: var(--beige); }
.zoom::backdrop { background: rgb(28 19 9 / 0.85); }
.zoom__view { position: absolute; inset: 0; overflow: auto; cursor: grab; overscroll-behavior: contain; touch-action: pan-x pan-y; }
.zoom__view.is-dragging { cursor: grabbing; }
.zoom__view img { display: block; max-width: none; margin: auto; user-select: none; -webkit-user-drag: none; }
.zoom__close { position: fixed; top: 0.75rem; right: 0.75rem; z-index: 2; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; padding: 0 1rem; border: 1px solid rgb(241 207 99 / 0.5); border-radius: 999px; background: rgb(28 19 9 / 0.8); font: 500 0.9375rem var(--font-head); color: var(--beige); cursor: pointer; }
.zoom__close:hover { background: var(--red); border-color: var(--red); }
.zoom__hint { position: fixed; left: 50%; bottom: 0.9rem; z-index: 2; margin: 0; padding: 0.35rem 0.9rem; border-radius: 999px; background: rgb(28 19 9 / 0.75); font: 0.875rem var(--font-head); transform: translateX(-50%); pointer-events: none; white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .tstep.reveal::before { transform: scaleY(0); transition: transform 1.1s 0.35s var(--ease-out); }
  .reveal-ready .tstep.reveal.is-in::before { transform: none; }
  .reveal-ready .tstep.reveal .tstep__n { transform: scale(0.6); transition: transform 0.6s var(--ease-out), box-shadow 0.6s; }
  .reveal-ready .tstep.reveal.is-in .tstep__n { transform: none; box-shadow: 0 0 0 5px var(--beige), 0 0 0 9px rgb(201 154 0 / 0.16); }
  .tpanel.is-opening { animation: tpanel-in 0.5s var(--ease-out); }
  @keyframes tpanel-in { from { opacity: 0; transform: translateY(-6px); } }
}
@media (prefers-reduced-motion: reduce) {
  .tgroup, .tmap__link img, .tmore svg, .tgo svg { transition: none; }
  .tgroup:hover, .tmap__link:hover img { transform: none; }
}

/* ---------- 16. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .mosaic__t { transform: none; }
}
.legend__body { font-size: 0.9375rem; }
.legend__body p, .legend__body .prose__list { margin: 0.25rem 0; }
.legend__body .prose__list { padding-left: 1.1rem; }
.legend__body a { color: var(--red); }
.legend__body .mdot { vertical-align: -1px; }
.srow--other .srow__t a { color: var(--red); }
.poem__pdf { display: inline-flex; margin-top: 0.75rem; font-family: var(--font-head); font-size: 0.9375rem; color: var(--red); }
.poem__pdf::after { content: " \2197"; }
@media (max-width: 479.98px) {
  .switch { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .switch a { padding: 0 0.8rem; font-size: 0.875rem; white-space: nowrap; }
  .switch--sections { flex-wrap: wrap; }
}
.prose-page__grid { grid-template-columns: minmax(0, 1fr); }
.prose-page__grid > * { min-width: 0; }
.prose img, .tabs__panel img { max-width: 100%; height: auto; }
.tabs, .tabs__panel { min-width: 0; max-width: 100%; }

/* ---------- Picture credits ---------- */
.credits { padding-block: 3rem 5rem; }
.credits__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1.5rem; padding: 0; margin: 0; list-style: none; }
.credit { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: var(--radius); background: #fffcf1; box-shadow: 0 0 0 1px rgb(201 154 0 / 0.25), 0 18px 34px -24px rgb(71 49 24 / 0.5); }
.credit__thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink); }
.credit__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out); }
.credit__thumb:hover img { transform: scale(1.05); }
.credit__text { padding: 0.9rem 1rem 1rem; }
.credit__text p { margin: 0 0 0.3rem; font-size: 0.9375rem; line-height: 1.45; }
.credit__story a { font-family: var(--font-head); font-size: 1.0625rem; color: var(--brown); text-decoration: none; }
.credit__story span { color: #8a6a00; margin-right: 0.3rem; }
.credit__art cite { font-style: italic; }
.credit__src { color: rgb(71 49 24 / 0.75); }

/* Story Tellers: one card per storyteller, the whole card opens their site (Languages card style) */
.tcard article { padding-top: 1.25rem; min-height: 11rem; }
.tcard__mono {
  display: grid; place-items: center;
  width: 3rem; height: 3rem; margin-bottom: 0.9rem;
  border-radius: 50%;
  border: 1px solid rgb(201 154 0 / 0.55);
  background: radial-gradient(circle at 35% 30%, #fffcf1, rgb(201 154 0 / 0.16));
  font-family: var(--font-head); font-size: 1.0625rem; font-weight: 600; letter-spacing: 0.06em; color: #6e5400;
}
.tcard__t { margin-bottom: 0.4rem; }
.tcard__t .lang__link { transition: color 0.25s; }
.tcard article:hover .tcard__t .lang__link { color: var(--red); }
.tcard__site { display: flex; flex-direction: column; gap: 0.2rem; margin: auto 0 0; }
.tcard__label { font-style: italic; color: #5a4630; }
.tcard__host { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--font-head); font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: #6b5a45; }
.tcard__host svg { width: 0.95rem; height: 0.95rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .tcard__t .lang__link { transition: none; } }
