/* Born of Olympus demo (members-area preview). Same tokens as /styles.css. */
:root {
  --night: #14213d;
  --night-deep: #0d1730;
  --lapis: #2e4e9e;
  --gold: #d4af37;
  --gold-soft: #e9d48a;
  --gold-deep: #8a6d1d;
  --marble: #f3f4f1;
  --marble-2: #e8eae4;
  --paper: #fffdf7;
  --stone: #5b6274;
  --line: #d3d6dd;
  --pomegranate: #a3293c;
  --olive: #4f6b2c;
  --ink: #1a2238;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  --story: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --nav-h: 4.25rem;
  --radius: 14px;
  color-scheme: light;
}

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }

body {
  margin: 0;
  background: var(--marble);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.6;
}

a { color: var(--lapis); text-underline-offset: 0.18em; }
a:hover { color: var(--night); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.2; color: var(--night); }
h3 { font-weight: 600; font-size: 1.05rem; margin: 0 0 0.5rem; }
strong { font-weight: 600; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--gold); color: var(--night); padding: 0.6rem 1rem; border-radius: 8px; font-weight: 600;
}
.skip:focus { top: 1rem; }

.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

/* Demo note and top bar ------------------------------------------------ */

.demo-note {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem 1rem; flex-wrap: wrap;
  background: var(--gold-soft); color: var(--night);
  padding: 0.5rem 1rem; font-size: 0.9rem; text-align: center;
}
.demo-note p { margin: 0; }
.demo-note-cta { font-weight: 600; color: var(--night); }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem clamp(1rem, 3vw, 2rem);
  background: var(--night-deep); color: var(--marble);
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid #ffffff14;
}

.brand {
  display: inline-flex; align-items: baseline; gap: 0.4em;
  font-family: var(--display); font-weight: 700; text-decoration: none;
  color: var(--gold-soft); letter-spacing: 0.08em; text-transform: uppercase; font-size: 1.15rem;
}
.brand:hover { color: #fff; }
.brand-of { font-weight: 500; font-size: 0.7em; letter-spacing: 0.2em; text-transform: lowercase; color: var(--marble); }

.crew { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: #dfe3ee; }
.crew-badge { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: #ffffff12; color: var(--gold); }
.crew-badge svg { width: 1.2rem; height: 1.2rem; }

/* Shell: sidebar on wide screens, tab bar on phones ------------------- */

.shell {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  max-width: 82rem; margin: 0 auto;
  min-height: 70vh;
}

.sidenav { padding: 1.75rem 1rem; border-right: 1px solid var(--line); }
.sidenav ul { list-style: none; margin: 0; padding: 0; position: sticky; top: 5.5rem; }
.sidenav a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 0.85rem; margin-bottom: 0.25rem; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-weight: 400;
}
.sidenav svg { width: 1.35rem; height: 1.35rem; flex: none; color: var(--stone); }
.sidenav a:hover { background: var(--marble-2); }
.sidenav a[aria-current="page"] { background: var(--night); color: var(--gold-soft); font-weight: 600; }
.sidenav a[aria-current="page"] svg { color: var(--gold); }

.view {
  padding: clamp(1.25rem, 3.5vw, 2.75rem) clamp(1rem, 3.5vw, 2.75rem) 4rem;
  min-width: 0;
  view-transition-name: demo-view;
}
.view:focus { outline: none; }

::view-transition-old(demo-view) { animation: 160ms ease-out both fade-out; }
::view-transition-new(demo-view) { animation: 220ms ease-out both fade-in; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } }

.noscript { max-width: 36rem; }

.demo-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem clamp(1rem, 3vw, 2rem) 2rem;
  color: var(--stone); font-size: 0.9rem; text-align: center;
}
.demo-footer p { margin: 0 0 0.25rem; }

/* Shared page pieces --------------------------------------------------- */

.page-head { margin-bottom: 1.5rem; max-width: 46rem; }
.page-head h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin: 0 0 0.35rem; }
.page-head h1:focus { outline: none; }
.page-sub { margin: 0; color: var(--stone); font-size: 1.1rem; }

.lead { font-size: 1.1rem; max-width: 42rem; }
.tip {
  max-width: 42rem; margin: 1.5rem 0 0;
  padding: 0.85rem 1rem; border-radius: 10px;
  background: #e9d48a33; border-left: 4px solid var(--gold);
}
.sample-note {
  display: inline-block; margin: 0 0 1.25rem; font-size: 0.9rem; color: var(--stone);
  padding: 0.4rem 0.8rem; border: 1px dashed var(--stone); border-radius: 10px;
}
.crumb { margin: 0 0 0.75rem; font-size: 0.95rem; }
.crumb a, .cover-kicker a { display: inline-flex; align-items: center; gap: 0.35rem; text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: inherit; font-weight: 600; line-height: 1.2;
  padding: 0.8rem 1.25rem; border-radius: 10px; border: 0; cursor: pointer;
  text-decoration: none; min-height: 2.9rem;
}
.btn-gold { background: var(--gold); color: var(--night); }
.btn-gold:hover { background: var(--gold-soft); color: var(--night); }
.btn-quiet { background: transparent; color: var(--lapis); padding-inline: 0.5rem; }
.btn-quiet:hover { color: var(--night); text-decoration: underline; }
.btn-line { background: transparent; border: 1.5px solid var(--line); color: var(--stone); }
.btn[disabled] { cursor: not-allowed; opacity: 0.8; }

.pills { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.pills li { border: 1.5px solid var(--night); border-radius: 999px; padding: 0.2rem 0.85rem; font-size: 0.92rem; font-weight: 400; }

.plain { padding-left: 1.2rem; margin: 0; }
.plain li { margin-bottom: 0.3rem; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.75rem; margin: 0 0 1.5rem; }
.facts div { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem 1rem; }
.facts dt { font-size: 0.85rem; color: var(--stone); }
.facts dd { margin: 0.15rem 0 0; font-weight: 600; }

/* Quest map ------------------------------------------------------------ */

.quest-head { max-width: none; display: grid; gap: 0.25rem 2rem; grid-template-columns: 1fr auto; align-items: end; }
.quest-head h1, .quest-head .page-sub { grid-column: 1; }
.resume {
  grid-column: 2; grid-row: 1 / span 2;
  display: flex; align-items: center; gap: 1rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.75rem 0.75rem 0.75rem 1.1rem;
}
.resume-text { display: grid; gap: 0.3rem; font-size: 0.9rem; min-width: 11rem; }
.resume-text > span:first-child { font-weight: 600; }
.resume-count { color: var(--stone); font-size: 0.82rem; }
.meter { display: block; height: 6px; border-radius: 6px; background: var(--marble-2); overflow: hidden; }
.meter-fill { display: block; height: 100%; width: var(--pct, 0%); background: var(--gold); border-radius: inherit; transition: width 400ms ease; }

.map {
  position: relative;
  aspect-ratio: 1000 / 560;
  border-radius: 22px;
  overflow: hidden;
  color: var(--marble);
  background:
    radial-gradient(1px 1px at 8% 12%, #fffa 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 22% 30%, #fff9 50%, transparent 51%),
    radial-gradient(1px 1px at 35% 9%, #fff8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 51% 22%, #fffb 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 7%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 26%, #fff7 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 94% 9%, #fffa 50%, transparent 51%),
    radial-gradient(1px 1px at 15% 45%, #fff6 50%, transparent 51%),
    radial-gradient(ellipse at 85% 0%, #2e4e9e66 0%, transparent 55%),
    linear-gradient(180deg, var(--night-deep) 0%, var(--night) 100%);
  box-shadow: inset 0 0 0 1px #ffffff12;
}

.map-art { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: calc(100% * 520 / 560); }
.trail-line { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 2 9; opacity: 0.85; }

.summit {
  position: absolute; right: 12%; top: 2.5%;
  font-family: var(--display); font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase;
  font-size: clamp(0.7rem, 1.3vw, 0.95rem); color: var(--gold-soft);
}

.nodes { list-style: none; margin: 0; padding: 0; position: absolute; left: 0; right: 0; bottom: 0; height: calc(100% * 520 / 560); }

.node { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; }
.node a {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
  color: inherit; text-decoration: none; width: clamp(6.5rem, 11vw, 9.5rem);
}
.node-dot {
  display: grid; place-items: center;
  width: clamp(2.1rem, 3.6vw, 2.9rem); height: clamp(2.1rem, 3.6vw, 2.9rem); border-radius: 50%;
  font-family: var(--display); font-weight: 700; font-size: clamp(0.8rem, 1.2vw, 1rem);
  background: var(--night-deep); border: 2px solid #ffffff55; color: #ffffffaa;
  transition: transform 160ms ease, border-color 160ms ease;
}
.node-dot .i { width: 45%; height: 45%; }
.node-text { display: grid; text-align: center; margin-top: 0.35rem; line-height: 1.2; }
.node-num { font-size: 0.68rem; color: #c9cfe0; }
.node-title { font-family: var(--display); font-weight: 700; font-size: clamp(0.72rem, 1.05vw, 0.9rem); text-shadow: 0 1px 6px var(--night-deep); }
.node-teaser { display: none; }
.node-up a { flex-direction: column-reverse; }
.node-up .node-text { margin: 0 0 0.35rem; }
/* The dot sits on the trail point; its label hangs below or above it. */
.node a { transform: translate(-50%, calc(-1 * clamp(1.05rem, 1.8vw, 1.45rem))); }
.node-up a { transform: translate(-50%, calc(-100% + clamp(1.05rem, 1.8vw, 1.45rem))); }
/* Chapter 1 sits near the left edge, so its label lines up with the dot instead. */
.node-first a { align-items: flex-start; transform: translate(calc(-0.5 * clamp(2.1rem, 3.6vw, 2.9rem)), calc(-1 * clamp(1.05rem, 1.8vw, 1.45rem))); }
.node-first .node-text { text-align: left; }

.node-current .node-dot { background: var(--gold); color: var(--night); border-color: var(--gold-soft); box-shadow: 0 0 0 6px #d4af3733, 0 0 26px #d4af3799; }
.node-done .node-dot { background: var(--gold-soft); color: var(--night); border-color: var(--gold); }
.node-locked .node-title { color: #e2e6f0; }
.node a:hover .node-dot, .node a:focus-visible .node-dot { transform: scale(1.12); border-color: var(--gold); }

.map-note { position: absolute; left: 1.25rem; top: 1rem; margin: 0; font-size: 0.75rem; color: #c9cfe0; }

@media (prefers-reduced-motion: no-preference) {
  .map .node { animation: node-in 500ms cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0ms); }
  .node-current .node-dot { animation: glow 2.8s ease-in-out infinite 1.2s; }
  @keyframes node-in { from { opacity: 0; } }
  @keyframes glow { 50% { box-shadow: 0 0 0 10px #d4af3722, 0 0 34px #d4af37cc; } }
}

.quest-cards { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 1rem; margin-top: 1.25rem; }
.qcard {
  display: flex; flex-direction: column; gap: 0.4rem;
  padding: 1.25rem; border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
a.qcard:hover { border-color: var(--night); color: var(--ink); }
.qcard h2 { font-family: var(--display); font-size: 1.3rem; margin: 0; }
.qcard p { margin: 0; color: var(--stone); font-size: 0.95rem; }
.qcard-go { margin-top: auto; padding-top: 0.5rem; font-weight: 600; color: var(--lapis); display: inline-flex; align-items: center; gap: 0.4rem; }
.qcard-hydra { background: var(--night); border-color: var(--night); }
.qcard-hydra h2 { color: var(--gold-soft); }
.qcard-hydra p { color: #c9cfe0; }
.qcard-hydra .qcard-go { color: var(--gold); }
a.qcard-hydra:hover { border-color: var(--gold); }

.gifts { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.5rem; }
.gift { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; }
.gift > span:last-child { display: grid; line-height: 1.3; }
.gift > span:last-child span { color: var(--stone); font-size: 0.82rem; }
.gift-art { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; flex: none; border-radius: 50%; border: 1.5px dashed #b9bdc8; color: #8f95a6; }
.gift-art svg { width: 70%; height: 70%; }

/* Chapter cover and step nav -------------------------------------------- */

.cover {
  position: relative; overflow: hidden;
  display: grid; align-items: end;
  min-height: clamp(11rem, 26vw, 15rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 22px;
  background: radial-gradient(ellipse at 90% 120%, var(--lapis) 0%, var(--night) 55%, var(--night-deep) 100%);
  color: var(--marble);
}
.cover-numeral {
  position: absolute; right: clamp(0.5rem, 3vw, 2.5rem); top: 50%; transform: translateY(-50%);
  font-family: var(--display); font-weight: 700; line-height: 1;
  font-size: clamp(7rem, 20vw, 13rem);
  color: transparent; -webkit-text-stroke: 1.5px #d4af3799;
  pointer-events: none;
}
.cover-text { position: relative; max-width: 36rem; }
.cover-kicker { display: flex; gap: 1rem; flex-wrap: wrap; margin: 0 0 0.6rem; font-size: 0.88rem; color: #c9cfe0; }
.cover-kicker a { color: var(--gold-soft); }
.cover h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 0.4rem; color: var(--gold-soft); }
.cover h1:focus { outline: none; }
.cover-teaser { margin: 0; color: #dfe3ee; font-size: 1.05rem; }

.steps { margin: 1.25rem 0 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.steps ol { list-style: none; margin: 0; padding: 0.25rem 0; display: flex; gap: 0.5rem; }
.steps li { flex: 1 0 auto; scroll-snap-align: start; }
.steps a {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.55rem 0.9rem 0.55rem 0.55rem; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-size: 0.93rem; font-weight: 400; white-space: nowrap;
}
.steps a:hover { border-color: var(--night); }
.step-n {
  display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--marble-2); font-weight: 600; font-size: 0.82rem;
}
.steps a.is-done .step-n { background: var(--olive); color: #fff; }
.steps a[aria-current="page"] { background: var(--night); color: var(--gold-soft); border-color: var(--night); font-weight: 600; }
.steps a[aria-current="page"] .step-n { background: var(--gold); color: var(--night); }

.step-body { max-width: 52rem; }
.step-body > h2 { font-family: var(--display); font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 0 0 0.75rem; }
.step-body > h3, .step-body section > h3 { margin-top: 1.5rem; }

.step-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  max-width: 52rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
}
.done-toggle { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; cursor: pointer; }

input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none;
  width: 1.35rem; height: 1.35rem; border-radius: 6px; border: 2px solid var(--stone); background: #fff;
  display: grid; place-items: center; cursor: pointer;
}
input[type="checkbox"]::after {
  content: ""; width: 0.4rem; height: 0.7rem; margin-top: -0.15rem;
  border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0);
  transition: transform 140ms ease;
}
input[type="checkbox"]:checked { background: var(--olive); border-color: var(--olive); }
input[type="checkbox"]:checked::after { transform: rotate(45deg) scale(1); }

/* Supplies and printing ------------------------------------------------- */

.lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.list-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.1rem 0.6rem; }
.list-card h3 { margin: 0 0 0.2rem; }
.list-note { margin: 0 0 0.4rem; font-size: 0.85rem; color: var(--stone); }
.checks { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.checks li { border-top: 1px solid var(--marble-2); }
.checks label { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.6rem 0; cursor: pointer; }
.checks input { margin-top: 0.1rem; }
.checks input:checked + span { color: var(--stone); text-decoration: line-through; text-decoration-color: #5b627488; }

.print-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.print-list li {
  display: grid; grid-template-columns: minmax(10rem, 14rem) 1fr; gap: 0.5rem 1.5rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem;
}
.print-list h3 { margin: 0; }
.print-list p { margin: 0; }
.paper-type { font-size: 0.88rem; color: var(--stone); }

.setup-steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.setup-steps li {
  counter-increment: s;
  display: grid; grid-template-columns: 2.25rem 1fr auto; gap: 1rem; align-items: start;
  padding: 0.9rem 0; border-top: 1px solid var(--line);
}
.setup-steps li::before {
  content: counter(s);
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--night); color: var(--gold-soft); font-family: var(--display); font-weight: 700;
}
.setup-steps p { margin: 0.35rem 0 0; }
.time { margin-top: 0.4rem; font-size: 0.85rem; color: var(--stone); white-space: nowrap; }

/* Overview -------------------------------------------------------------- */

.read-aloud {
  margin: 0 0 1.25rem; padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--paper); border: 1px solid #e3d8b8; border-radius: var(--radius);
  font-family: var(--story); font-size: clamp(1.15rem, 2.3vw, 1.35rem); line-height: 1.65; color: var(--night);
}
.read-aloud p { margin: 0; }
.read-aloud .ra-label { font-family: var(--body); font-size: 0.85rem; color: var(--gold-deep); font-weight: 600; margin-bottom: 0.5rem; }

.toggles { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.chip-toggle {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font: inherit; font-size: 0.92rem; font-weight: 400;
  padding: 0.5rem 1rem; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--night); border: 1.5px solid var(--night);
}
.chip-toggle[aria-pressed="true"] { background: var(--night); color: var(--gold-soft); }
.reveal { margin-bottom: 1.25rem; }
.devotional { padding: 1rem 1.1rem; border-radius: 12px; background: var(--marble-2); }
.devotional h3 { margin: 0 0 0.3rem; }
.devotional p { margin: 0; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

/* Video placeholder ----------------------------------------------------- */

.video { margin: 0 0 1.5rem; max-width: 46rem; }
.video-frame {
  aspect-ratio: 16 / 9; border-radius: var(--radius); display: grid; place-items: center;
  background:
    radial-gradient(ellipse at 30% 110%, #2e4e9e 0%, transparent 60%),
    repeating-linear-gradient(135deg, #ffffff06 0 12px, transparent 12px 24px),
    var(--night);
}
.video-asl .video-frame { aspect-ratio: 4 / 3; max-width: 22rem; }
.video-play { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 50%; background: var(--gold); color: var(--night); }
.video-play .i { width: 2rem; height: 2rem; }
.video figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; margin-top: 0.5rem; font-weight: 600; font-size: 0.95rem; }
.video figcaption span { font-weight: 300; color: var(--stone); }

/* Walkthrough ----------------------------------------------------------- */

.scenes { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.scenes li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.scenes h3 { display: grid; gap: 0.15rem; font-family: var(--display); font-size: 1.2rem; margin: 0 0 0.75rem; }
.scene-n { font-family: var(--body); font-size: 0.82rem; font-weight: 600; color: var(--gold-deep); }
.say, .task { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.75rem; margin: 0.4rem 0 0; }
.say span, .task span { font-size: 0.82rem; font-weight: 600; color: var(--stone); padding-top: 0.15rem; }
.say { font-family: var(--story); font-size: 1.12rem; font-style: italic; color: var(--night); }
.say span { font-family: var(--body); font-style: normal; }
.next-time { margin: 1.5rem 0 0; font-family: var(--display); font-size: 1.15rem; color: var(--night); }

/* Printables ------------------------------------------------------------ */

.printables { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); gap: 1rem; }
.printables li { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 0.75rem 1rem; }
.printables h3 { margin: 0.75rem 0.25rem 0.1rem; }
.printables p { margin: 0 0.25rem 0.75rem; font-size: 0.88rem; color: var(--stone); }
.printables .btn { margin-top: auto; font-size: 0.88rem; min-height: 2.5rem; padding: 0.55rem 0.8rem; }
.pr-art { border-radius: 10px; background: var(--marble-2); aspect-ratio: 5 / 3; display: grid; place-items: center; }
.pr-art svg { width: 100%; height: 100%; }
.pr-art .coin { fill: #d9c27a; stroke: var(--gold-deep); stroke-width: 2; }
.pr-art .coin-ring { fill: none; stroke: var(--gold-deep); stroke-width: 1.2; stroke-dasharray: 2 3; }
.pr-art .coin-mark { fill: #c2a656; stroke: var(--gold-deep); stroke-width: 1.6; }
.pr-art .coin-eye { fill: var(--paper); stroke: var(--gold-deep); stroke-width: 1.4; }
.pr-art .coin-line { fill: none; stroke: var(--gold-deep); stroke-width: 2; stroke-linecap: round; }
.pr-art .coin-text { font-family: var(--display); font-size: 11px; font-weight: 700; fill: var(--gold-deep); text-anchor: middle; }
.pr-art .paper { fill: #f4ead0; stroke: #c9b58a; }
.pr-art .roll { fill: #e3d3a9; stroke: #b49b67; }
.pr-art .ink { fill: none; stroke: #6b5a3a; stroke-width: 2.2; stroke-linecap: round; }
.pr-art .seal { fill: var(--pomegranate); }
.pr-art .wood { fill: #a0784c; }
.pr-art .wax { fill: #3a3127; }
.pr-art .scratch { fill: none; stroke: #e9d48a; stroke-width: 2; stroke-linecap: round; }
.pr-art .stylus { stroke: #6b5a3a; stroke-width: 4; stroke-linecap: round; }
.pr-art .card { fill: var(--paper); stroke: var(--night); stroke-width: 2; }
.pr-art .card-art { fill: #dfe3ee; }

/* Locked chapter -------------------------------------------------------- */

.locked { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 1.5rem; margin-top: 1.5rem; }
.locked-main h2 { font-family: var(--display); font-size: 1.5rem; margin: 0 0 0.5rem; }
.locked-main h3 { margin-top: 1.25rem; }
.locked-flag { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0 0 1rem; padding: 0.35rem 0.85rem; border-radius: 999px; background: var(--marble-2); font-size: 0.9rem; font-weight: 400; }
.locked-side { align-self: start; display: grid; gap: 0.6rem; padding: 1.25rem; border-radius: var(--radius); background: var(--night); color: #dfe3ee; }
.locked-side h3 { font-family: var(--display); color: var(--gold-soft); font-size: 1.2rem; margin: 0; }
.locked-side p { margin: 0 0 0.25rem; }
.locked-side .btn-quiet { color: var(--gold-soft); }
.gift-reward { display: flex; gap: 1rem; align-items: center; margin: 1.25rem 0; padding: 1rem; border-radius: var(--radius); background: var(--paper); border: 1px solid #e3d8b8; }
.gift-reward .gift-art { width: 3.75rem; height: 3.75rem; border-style: solid; border-color: var(--gold); color: var(--gold-deep); background: #e9d48a33; }
.gift-reward h3 { margin: 0 0 0.2rem; }
.gift-reward p { margin: 0; color: var(--stone); }
.chapter-pager { display: flex; justify-content: space-between; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.chapter-pager a { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; text-decoration: none; }

/* Start here ------------------------------------------------------------ */

.how { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: h; }
.how li { counter-increment: h; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; }
.how li::before { content: counter(h); font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1; color: var(--gold); }
.how h3 { margin: 0.5rem 0 0.25rem; }
.how p { margin: 0; color: var(--stone); font-size: 0.95rem; }
.asl-note { border-left: 4px solid var(--gold); padding-left: 1rem; }
.ways { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.ways li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; }
.ways li:last-child { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.ways p { margin: 0; color: var(--stone); }

/* Member chat ----------------------------------------------------------- */

.tags { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; gap: 0.4rem; overflow-x: auto; scrollbar-width: none; }
.tags span { display: block; white-space: nowrap; padding: 0.35rem 0.85rem; border-radius: 999px; border: 1px solid var(--line); font-size: 0.88rem; background: var(--paper); }
.tags .on { background: var(--night); color: var(--gold-soft); border-color: var(--night); }
.threads { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); max-width: 52rem; }
.threads li { border-bottom: 1px solid var(--line); }
.threads a { display: grid; gap: 0.3rem; padding: 1rem 0.25rem; color: var(--ink); text-decoration: none; }
.threads a:hover .th-title { color: var(--lapis); text-decoration: underline; }
.th-title { font-weight: 600; font-size: 1.05rem; }
.th-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.85rem; color: var(--stone); }
.th-tag { color: var(--gold-deep); font-weight: 600; }

.posts { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 1rem; max-width: 48rem; }
.post { display: grid; grid-template-columns: 2.5rem 1fr; gap: 0.85rem; padding: 1rem; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.post p { margin: 0; }
.post-by { display: flex; flex-wrap: wrap; gap: 0 0.6rem; margin-bottom: 0.25rem !important; }
.post-by span { font-size: 0.85rem; color: var(--stone); }
.post-team { border-color: var(--gold); }
.avatar { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--night); color: var(--gold-soft); font-family: var(--display); font-weight: 700; }
.reply { display: grid; gap: 0.5rem; max-width: 48rem; }
.reply label { font-weight: 600; }
.reply textarea { font: inherit; padding: 0.75rem; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; resize: vertical; }
.reply .btn { justify-self: start; }

/* Purchases ------------------------------------------------------------- */

.order { max-width: 48rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 1.5rem); }
.order-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; }
.order-head h2 { font-family: var(--display); font-size: 1.3rem; margin: 0; }
.order-head span { color: var(--stone); font-size: 0.9rem; }
.track { list-style: none; padding: 0; margin: 1.5rem 0 1rem; display: grid; grid-template-columns: repeat(4, 1fr); }
.track li { position: relative; display: grid; justify-items: center; gap: 0.4rem; text-align: center; font-size: 0.85rem; color: var(--stone); }
.track li::before { content: ""; position: absolute; top: 0.8rem; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.track li:first-child::before { display: none; }
.track .t-done::before, .track .t-now::before { background: var(--olive); }
.t-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--marble-2); border: 3px solid var(--line); color: #fff; }
.t-dot .i { width: 0.95rem; height: 0.95rem; }
.t-done .t-dot { background: var(--olive); border-color: var(--olive); }
.t-now .t-dot { background: #fff; border-color: var(--olive); box-shadow: 0 0 0 5px #4f6b2c22; }
.t-now { color: var(--ink); font-weight: 600; }
.order-status { margin: 0 0 1rem; }
.order-items { list-style: none; padding: 0; margin: 0 0 1.25rem; border-top: 1px solid var(--line); }
.order-items li { display: grid; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.order-items span { font-size: 0.88rem; color: var(--stone); }
.sub-h { font-family: var(--display); font-size: 1.3rem; margin: 2rem 0 0.75rem; }
.history { list-style: none; padding: 0; margin: 0; max-width: 48rem; }
.history li { display: grid; grid-template-columns: 4.5rem 1fr auto; gap: 1rem; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.history li span:first-child { color: var(--stone); }
.badge { font-size: 0.8rem; padding: 0.15rem 0.6rem; border-radius: 999px; background: #e9d48a66; color: var(--night); font-weight: 600; }
.badge-ok { background: #4f6b2c22; color: var(--olive); }

/* Support --------------------------------------------------------------- */

.faq { max-width: 48rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1rem 0.25rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--display); font-size: 1.3rem; line-height: 1; color: var(--gold-deep); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0.25rem 1rem; color: var(--stone); max-width: 42rem; }
.help-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin-top: 1.5rem; max-width: 48rem; }
.help-card { display: flex; gap: 0.85rem; align-items: flex-start; padding: 1.1rem; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.help-card:hover { border-color: var(--night); color: var(--ink); }
.help-card .i { width: 1.5rem; height: 1.5rem; color: var(--gold-deep); }
.help-card > span { display: grid; }
.help-card > span span { color: var(--stone); font-size: 0.9rem; }

/* Hydra trial ----------------------------------------------------------- */

.hydra { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.5rem; align-items: stretch; }
.hydra-stage {
  position: relative; border-radius: 22px; overflow: hidden; display: grid; align-content: end;
  background: radial-gradient(ellipse at 50% 120%, #2b5a4a 0%, #16302b 45%, var(--night-deep) 100%);
  min-height: 18rem;
}
.hydra-stage svg { width: 100%; height: auto; display: block; }
.hydra-count { position: absolute; left: 1rem; top: 0.75rem; margin: 0; color: var(--gold-soft); font-family: var(--display); font-weight: 700; }
.h-body { fill: #2f6b55; }
.h-belly { fill: none; stroke: #8fbf8a; stroke-width: 3; stroke-linecap: round; opacity: 0.5; }
.h-neck { fill: none; stroke: #2f6b55; stroke-width: 16; stroke-linecap: round; }
.h-skull { fill: #3f8a6c; stroke: #1d4537; stroke-width: 2; }
.h-eye { fill: var(--gold-soft); }
.h-tongue { fill: none; stroke: var(--pomegranate); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.h-active .h-skull { fill: #57a983; stroke: var(--gold); stroke-width: 2.5; }
.h-active .h-eye { fill: #fff; }
.shake { animation: shake 420ms ease; }
.chop .h-head:last-child { animation: grow 360ms ease both; transform-origin: 200px 222px; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes grow { from { opacity: 0.4; } }

.hydra-play { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.25rem; border-radius: 22px; background: var(--paper); border: 1px solid var(--line); }
.level { border: 0; padding: 0; margin: 0; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.level legend { font-size: 0.85rem; color: var(--stone); margin-bottom: 0.4rem; padding: 0; }
.level label { cursor: pointer; }
.level input { position: absolute; opacity: 0; pointer-events: none; }
.level span { display: block; padding: 0.4rem 0.9rem; border-radius: 999px; border: 1.5px solid var(--night); font-size: 0.9rem; }
.level input:checked + span { background: var(--night); color: var(--gold-soft); }
.level input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.hydra-q-label { margin: 0.5rem 0 0; font-size: 0.9rem; color: var(--stone); }
.hydra-q { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(2.2rem, 6vw, 3.2rem); line-height: 1.1; color: var(--night); }
.hydra-answer { display: flex; gap: 0.5rem; }
.hydra-answer input {
  flex: 1; min-width: 0; font: inherit; font-size: 1.4rem; font-weight: 600; text-align: center;
  padding: 0.6rem; border-radius: 10px; border: 2px solid var(--stone); background: #fff; color: var(--ink);
}
.hydra-msg { min-height: 1.6em; margin: 0; font-weight: 400; }
.hydra-msg.ok { color: var(--olive); }
.hydra-msg.err { color: var(--pomegranate); }
.hydra-play .btn-quiet { align-self: flex-start; }
.hydra-play.won .hydra-q { color: var(--olive); }
.hydra-play.won .hydra-answer { display: none; }

/* Tablet and phone ------------------------------------------------------ */

@media (max-width: 1100px) {
  .quest-cards { grid-template-columns: 1fr 1fr; }
  .qcard-gifts { grid-column: 1 / -1; }
  .qcard-gifts .gifts { grid-template-columns: repeat(3, 1fr); }
  .shell { grid-template-columns: 12.5rem minmax(0, 1fr); }
}

@media (max-width: 860px) {
  body { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .crew-name { display: none; }
  .demo-note-more { display: none; }

  .sidenav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 0 0.25rem env(safe-area-inset-bottom);
    background: #fffffff2; border: 0; border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  .sidenav ul { position: static; display: grid; grid-template-columns: repeat(5, 1fr); }
  .sidenav a {
    flex-direction: column; gap: 0.15rem; margin: 0; padding: 0.55rem 0.1rem 0.5rem; border-radius: 0;
    font-size: 0.68rem; text-align: center; line-height: 1.15; min-height: var(--nav-h); justify-content: center;
  }
  .sidenav a:hover { background: transparent; }
  .sidenav a[aria-current="page"] { background: transparent; color: var(--night); }
  .sidenav a[aria-current="page"] svg { color: var(--night); background: var(--gold-soft); border-radius: 999px; width: 3rem; padding: 0.1rem 0.8rem; }

  .quest-head { grid-template-columns: 1fr; }
  .resume { grid-column: 1; grid-row: auto; margin-top: 0.75rem; justify-content: space-between; flex-wrap: wrap; }
  .resume .btn { flex: 1 1 auto; }

  /* The map turns into a trail you scroll down. */
  .map { aspect-ratio: auto; padding: 1.5rem 1rem 1rem; }
  .map-art, .summit { display: none; }
  .nodes { position: relative; height: auto; display: grid; gap: 0.25rem; }
  .nodes::before { content: ""; position: absolute; left: 1.2rem; top: 1rem; bottom: 1rem; border-left: 2.5px dotted #d4af37aa; }
  .node, .node-up { position: relative; left: auto; top: auto; width: auto; height: auto; }
  .node a, .node-up a { position: relative; transform: none; width: auto; flex-direction: row; align-items: flex-start; gap: 0.9rem; padding: 0.55rem 0; }
  .node-dot { width: 2.4rem; height: 2.4rem; font-size: 0.85rem; flex: none; }
  .node-text, .node-up .node-text { text-align: left; margin: 0; gap: 0.1rem; }
  .node-title { font-size: 1.05rem; }
  .node-teaser { display: block; font-size: 0.86rem; color: #c9cfe0; line-height: 1.4; }
  .node-locked .node-teaser { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .map-note { position: static; margin: 0.75rem 0 0 3.3rem; }

  .locked { grid-template-columns: 1fr; }
  .how { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .hydra { grid-template-columns: 1fr; }
  .hydra-stage { min-height: 0; }
}

@media (max-width: 560px) {
  .quest-cards { grid-template-columns: 1fr; }
  .qcard-gifts .gifts { grid-template-columns: 1fr; }
  .print-list li { grid-template-columns: 1fr; }
  .setup-steps li { grid-template-columns: 2.25rem 1fr; }
  .setup-steps .time { grid-column: 2; margin-top: -0.6rem; }
  .say, .task { grid-template-columns: 1fr; gap: 0.1rem; }
  .history li { grid-template-columns: 1fr auto; }
  .history li span:first-child { grid-column: 1 / -1; font-size: 0.82rem; }
  .track li { font-size: 0.74rem; }
  .step-foot .btn-quiet { padding-inline: 0; }
  .cover-numeral { font-size: 4.25rem; top: 0.9rem; right: 1rem; transform: none; -webkit-text-stroke-color: #d4af3766; }
  .cover { padding-top: 5.25rem; }
  .brand { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
  @view-transition { navigation: none; }
}
