/* ============================================================
   BEDTIMESTORY.KIDS design system
   A story-book at night: indigo sky, golden moon, cream paper.
   Fredoka for headings (rounded, friendly), Nunito for reading.
   No third-party resources; fonts are self-hosted.
   ============================================================ */
@import url("/static/fonts/fonts.css");
:root {
  --night: #1b1a4b; --night-2: #26245f; --night-3: #322f75; --night-4: #403c8f;
  --cream: #fff8ec; --paper: #fffdf7; --paper-2: #fbf3e2; --lilac: #ece8ff; --lilac-2: #ddd6ff;
  --ink: #2b2a45; --ink-2: #4d4b6e; --muted: #75739a; --faint: #a3a1bf;
  --line: #ebe2cf; --line-2: #d9cfb6;
  --moon: #f5b942; --moon-dark: #d99a1a; --moon-ink: #3a2a03; --moon-soft: rgba(245, 185, 66, .18);
  --sky: #8b7cf6; --sky-dark: #6b5ce0; --rose: #f27a9d; --mint: #5cc8a8; --peach: #ffb88c;
  --good: #22a06b; --bad: #d94b5a;
  --display: "Fredoka", "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 14px; --radius-sm: 8px; --radius-lg: 22px;
  --shadow: 0 10px 30px rgba(27, 26, 75, .12); --shadow-sm: 0 3px 12px rgba(27, 26, 75, .08);
  --header-h: 72px;
  --gutter: clamp(1rem, 4vw, 4rem);
  --story-size: 1.22rem;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
body.menu-open { overflow: hidden; }
body.menu-open .site-header { position: fixed; top: 0; left: 0; right: 0; }
a { color: var(--sky-dark); text-decoration: none; }
a:hover { color: var(--night); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; font-family: var(--display); font-weight: 600; letter-spacing: -.01em; color: var(--night); }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
strong { color: var(--night); }
/* The base rule above assumes ink on paper. Wherever the ground is the brand's
   night indigo, bold text must keep the light colour it inherits instead, or it
   disappears into the background. */
.home-hero strong, .how-band strong, .page-cta strong, .site-footer strong, .mobile-panel strong,
.theme-card strong, .play-bar strong, .book-top strong, .continue-strip strong, .site-header strong,
.tonight-card .kicker strong { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--moon); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--moon); color: var(--moon-ink); padding: .5rem 1rem; border-radius: 6px; z-index: 999; }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.ico { flex: none; vertical-align: -3px; }
.kicker { display: inline-flex; align-items: center; gap: .4rem; margin: 0 0 .6rem; font-family: var(--display); font-weight: 600; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sky-dark); }
.kicker a { color: inherit; display: inline-flex; align-items: center; gap: .35rem; }
.deck { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-2); line-height: 1.6; max-width: 62ch; }
.fs-md { font-size: 1.4rem; }
.ml-3 { margin-left: .75rem; }

/* ---------- Layout ---------- */
.container { width: calc(100% - var(--gutter) * 2); max-width: 1320px; margin-inline: auto; }
.container-narrow { width: calc(100% - var(--gutter) * 2); max-width: 860px; margin-inline: auto; }
.section { padding: 3.25rem 0; }
.section-tight { padding: 2rem 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.section-head h2 { margin: 0; display: flex; align-items: center; gap: .5rem; }
.section-head h2 small { font-size: .95rem; font-family: var(--font); font-weight: 600; }
.section-head p { margin: .25rem 0 0; color: var(--ink-2); }
.text-link { color: var(--sky-dark); font-weight: 700; font-size: .92rem; display: inline-flex; align-items: center; gap: .3rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Buttons & chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: 0 1.25rem; border-radius: 999px; border: 2px solid transparent; font-family: var(--display); font-weight: 600; font-size: 1rem; white-space: nowrap; transition: transform .12s, background .15s, color .15s, border-color .15s; background: var(--lilac); color: var(--night); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--moon); color: var(--moon-ink); box-shadow: 0 6px 18px rgba(245, 185, 66, .35); }
.btn-primary:hover { background: #ffc85c; color: var(--moon-ink); }
.btn-moon { background: var(--night-3); color: #fff; }
.btn-moon:hover { background: var(--night-4); color: #fff; }
.btn-outline { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-outline:hover { border-color: var(--sky); color: var(--night); background: #fff; }
.btn-outline-light { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.btn-sm { min-height: 38px; padding: 0 .95rem; font-size: .9rem; }
.btn-lg { min-height: 54px; padding: 0 1.6rem; font-size: 1.08rem; }
.btn-icon { padding: 0; width: 46px; }
.btn[aria-pressed="true"] { background: var(--night); color: #fff; border-color: var(--night); }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .85rem; border-radius: 999px; font-size: .86rem; font-weight: 700; color: var(--ink-2); background: #fff; border: 1.5px solid var(--line); transition: .15s; }
.chip small { color: var(--muted); font-weight: 600; }
.chip:hover, .chip.active { border-color: var(--sky); color: var(--night); background: var(--lilac); }
.chip-lg { padding: .6rem 1.05rem; font-size: .95rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 200; height: var(--header-h); background: var(--night); color: #fff; box-shadow: 0 2px 0 rgba(255, 255, 255, .04), 0 6px 24px rgba(27, 26, 75, .25); }
.site-header .container { max-width: 1500px; }
.header-inner { display: flex; align-items: center; height: 100%; gap: 1.25rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-family: var(--display); font-weight: 600; font-size: 1.35rem; white-space: nowrap; }
.brand:hover { color: #fff; }
.brand-logo { width: 40px; height: 40px; border-radius: 12px; flex: none; }
.brand-accent { color: var(--moon); }
.brand-tld { color: var(--sky); font-weight: 400; font-size: .85em; }
.desktop-nav { flex: 1 1 auto; min-width: 0; }
.nav-links { display: flex; align-items: center; gap: .1rem; list-style: none; margin: 0; padding: 0; }
.nav-links > li { position: relative; }
.nav-link { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .75rem; border-radius: 999px; color: #e7e4ff; font-family: var(--display); font-size: .98rem; font-weight: 500; white-space: nowrap; }
.nav-link > svg:first-child { color: var(--sky); }
.nav-link:hover, .nav-link.active, .nav-has-mega:hover > .nav-link, .nav-has-mega.open > .nav-link { color: #fff; background: rgba(255, 255, 255, .1); }
.mega { position: absolute; top: calc(100% + 12px); left: 0; min-width: 720px; background: #fff; color: var(--ink); border-radius: 18px; box-shadow: var(--shadow); padding: 1.1rem; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 210; }
.mega::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.nav-has-mega:hover .mega, .nav-has-mega:focus-within .mega, .nav-has-mega.open .mega { opacity: 1; visibility: visible; transform: translateY(0); }
.mega-stories { min-width: 900px; }
.mega-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.mega-stories .mega-cols { grid-template-columns: repeat(6, 1fr); gap: .5rem; }
.mega-guides .mega-cols { grid-template-columns: 1fr 1fr; }
.mega-heading { display: flex; align-items: center; gap: .4rem; font-family: var(--display); font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--sky-dark); padding: 0 .5rem .5rem; }
a.mega-heading:hover { color: var(--night); }
.mega-item { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: .6rem; align-items: start; padding: .5rem; border-radius: 10px; color: var(--ink-2); }
.mega-item-sm { grid-template-columns: minmax(0, 1fr); padding: .32rem .5rem; }
.mega-item-sm .mega-symbol { display: none; }
.mega-item:hover { background: var(--lilac); color: var(--night); }
.mega-symbol { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--lilac); color: var(--sky-dark); }
.mega-title { display: block; font-size: .92rem; font-weight: 700; color: var(--night); line-height: 1.3; }
.mega-title small { color: var(--muted); font-weight: 600; }
.mega-sub { display: block; font-size: .76rem; color: var(--muted); line-height: 1.35; margin-top: .1rem; }
.mega-footer { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.mega-footer a { font-size: .88rem; font-weight: 700; color: var(--sky-dark); display: inline-flex; align-items: center; gap: .3rem; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.header-search { display: flex; align-items: center; gap: .4rem; padding: 0 .75rem; height: 40px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #cfcbff; }
.header-search input { width: 150px; border: 0; background: transparent; color: #fff; outline: 0; font-size: .92rem; }
.header-search input::placeholder { color: #a9a4e6; }

/* Hamburger + mobile panel (GTA6.free pattern, storybook dress) */
.hamburger { display: none; align-items: center; gap: .55rem; min-width: 72px; height: 40px; padding: 0 .3rem 0 .6rem; border: 0; border-left: 1px solid rgba(255, 255, 255, .2); border-radius: 0; background: transparent; color: #fff; font-family: inherit; }
.hamburger-label { font-family: var(--display); font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.hamburger-mark { position: relative; display: block; width: 22px; height: 18px; }
.hamburger-mark i { position: absolute; right: 0; display: block; height: 2px; border-radius: 2px; background: currentColor; transition: top .18s ease, width .18s ease, transform .18s ease; }
.hamburger-mark i:first-child { top: 5px; width: 22px; }
.hamburger-mark i:last-child { top: 12px; width: 14px; }
.hamburger.open { color: var(--moon); }
.hamburger.open .hamburger-mark i { top: 9px; width: 18px; }
.hamburger.open .hamburger-mark i:first-child { transform: rotate(45deg); }
.hamburger.open .hamburger-mark i:last-child { transform: rotate(-45deg); }
.mobile-panel { display: none; position: fixed; inset: var(--header-h) 0 0; z-index: 190; background: var(--night); color: #e7e4ff; overflow-y: auto; overscroll-behavior: contain; padding: 1.25rem 0 4rem; border-top: 1px solid rgba(255, 255, 255, .1); background-image: radial-gradient(circle at 85% 8%, rgba(245, 185, 66, .18), transparent 30%), radial-gradient(circle at 10% 90%, rgba(139, 124, 246, .22), transparent 35%); }
.mobile-panel.open { display: block; }
.mobile-menu-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; padding-bottom: 1.1rem; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.mobile-menu-head strong { display: inline-flex; align-items: center; gap: .5rem; color: #fff; font-family: var(--display); font-size: 1.25rem; font-weight: 600; }
.mobile-menu-head strong svg { color: var(--moon); }
.mobile-menu-head p { margin: .3rem 0 0; color: #b9b5ea; font-size: .82rem; line-height: 1.45; }
.mobile-menu-note { flex: none; padding: .3rem .6rem; border-radius: 999px; background: var(--moon-soft); color: var(--moon); font: 700 .75rem var(--display); letter-spacing: .05em; }
.mobile-search { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .65rem; margin-top: 1rem; padding: .4rem .4rem .4rem .85rem; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; background: rgba(255, 255, 255, .08); color: #b9b5ea; }
.mobile-search input { min-width: 0; padding: .35rem 0; border: 0; outline: 0; background: transparent; color: #fff; font: 600 .95rem var(--font); }
.mobile-search input::placeholder { color: #9a95d8; }
.mobile-search button { min-height: 36px; padding: .44rem .9rem; border: 0; border-radius: 999px; background: var(--moon); color: var(--moon-ink); font: 600 .8rem var(--display); }
.mobile-featured { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: 1.15rem; }
.mobile-featured a { display: grid; grid-template-columns: 34px 1fr; column-gap: .6rem; align-items: center; padding: .8rem .7rem; border-radius: 14px; background: rgba(255, 255, 255, .07); color: #fff; }
.mobile-featured a > span { grid-row: 1 / 3; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--moon-soft); color: var(--moon); }
.mobile-featured strong, .mobile-featured small { display: block; }
.mobile-featured strong { font-family: var(--display); font-size: .86rem; font-weight: 600; }
.mobile-featured small { color: #b9b5ea; font-size: .75rem; }
.mobile-nav-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; margin-top: 1.6rem; }
.mob-group { margin: 0; }
.mob-head { display: flex; align-items: center; gap: .5rem; padding-bottom: .5rem; border-bottom: 1px solid rgba(255, 255, 255, .14); font-family: var(--display); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--moon); }
.mob-head-mt { margin-top: 1.2rem; }
.mob-link { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .62rem .2rem; border-bottom: 1px solid rgba(255, 255, 255, .08); color: #e7e4ff; font-size: .9rem; font-weight: 700; }
.mob-link > span { display: inline-flex; align-items: center; gap: .5rem; }
.mob-link > span svg { color: var(--sky); }
.mob-link small { color: #9a95d8; font-weight: 600; }
.mob-link svg:last-child { color: #7f79c9; }
.mob-link:hover, .mob-link.active { color: var(--moon); }
.mobile-utility { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: 1.7rem; padding: 1rem; border-radius: 14px; background: rgba(0, 0, 0, .2); }
.mobile-utility a { color: #cfcbff; font-size: .78rem; font-weight: 700; }
@media (max-width: 1100px) {
  .desktop-nav, .header-cta span, .header-search { display: none; }
  .hamburger { display: inline-flex; }
  .header-cta { padding: 0; width: 40px; min-height: 40px; }
}
@media (max-width: 640px) {
  .mobile-featured { grid-template-columns: 1fr; }
  .mobile-nav-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .brand-word { font-size: 1.15rem; }
}

/* ---------- Hero ---------- */
.home-hero { position: relative; overflow: hidden; background: var(--night); color: #fff; padding: clamp(2.5rem, 6vw, 5rem) 0; background-image: radial-gradient(ellipse at 80% 10%, rgba(139, 124, 246, .35), transparent 45%), radial-gradient(ellipse at 15% 100%, rgba(245, 185, 66, .18), transparent 40%); }
.home-sky { position: absolute; inset: 0; pointer-events: none; }
.hs-star, .fs-star { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 2px rgba(255, 255, 255, .6); opacity: .8; animation: twinkle 3s ease-in-out infinite; }
.hs-star.a { top: 12%; left: 8%; } .hs-star.b { top: 30%; left: 22%; animation-delay: .7s; width: 4px; height: 4px; } .hs-star.c { top: 8%; left: 48%; animation-delay: 1.3s; } .hs-star.d { top: 70%; left: 14%; animation-delay: 2s; width: 4px; height: 4px; } .hs-star.e { top: 18%; left: 88%; animation-delay: .4s; } .hs-star.f { top: 55%; left: 60%; animation-delay: 1.7s; width: 3px; height: 3px; } .hs-star.g { top: 85%; left: 42%; animation-delay: 2.4s; width: 4px; height: 4px; }
@keyframes twinkle { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .hs-star, .fs-star { animation: none; } }
.home-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; }
.home-hero h1 { color: #fff; font-size: clamp(2.4rem, 5.4vw, 4rem); }
.home-hero h1 .hl { color: var(--moon); }
.home-hero .deck { color: #d7d3ff; }
.home-hero .kicker { color: var(--moon); }
.home-hero-art img { border-radius: var(--radius-lg); box-shadow: 0 30px 60px rgba(0, 0, 0, .4); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.hero-quick { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin-top: 1.4rem; }
.hero-quick a { display: inline-flex; align-items: center; gap: .35rem; color: #cfcbff; font-size: .9rem; font-weight: 700; }
.hero-quick a:hover { color: var(--moon); }
@media (max-width: 900px) { .home-hero-grid { grid-template-columns: 1fr; } .home-hero-art { order: -1; } }
.page-hero { padding: 2rem 0 2.25rem; background: linear-gradient(180deg, var(--lilac) 0%, var(--cream) 100%); border-bottom: 1px solid var(--line); }
.page-hero-sm { padding: 1.25rem 0 1.5rem; }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 2rem; align-items: center; }
.page-hero-grid.no-art { grid-template-columns: 1fr; }
.page-hero-art img { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
@media (max-width: 800px) { .page-hero-grid { grid-template-columns: 1fr; } .page-hero-art { display: none; } }

/* ---------- Breadcrumbs ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: 0 0 1rem; font-size: .82rem; color: var(--muted); }
.breadcrumb a { color: var(--ink-2); font-weight: 700; }
.breadcrumb .sep { color: var(--faint); }
.breadcrumb .current { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

/* ---------- Cards ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.card-soft { background: var(--lilac); border-color: var(--lilac-2); }
.card-head { display: flex; align-items: center; gap: .4rem; padding: .7rem 1rem; font-family: var(--display); font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sky-dark); border-bottom: 1px solid var(--line); }
.card.sticky { position: sticky; top: calc(var(--header-h) + 1rem); }
.rail-links { display: flex; flex-direction: column; }
.rail-links a { padding: .6rem 1rem; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: .9rem; font-weight: 600; display: flex; align-items: center; gap: .4rem; }
.rail-links a:last-child { border-bottom: 0; }
.rail-links a:hover { background: var(--paper-2); color: var(--night); }
.rail-story-links { display: flex; flex-direction: column; }
.rail-story { display: grid; grid-template-columns: 80px 1fr; gap: .7rem; align-items: center; padding: .65rem .8rem; border-bottom: 1px solid var(--line); color: var(--ink); }
.rail-story:last-child { border-bottom: 0; }
.rail-story:hover { background: var(--paper-2); }
.rail-story img { width: 80px; height: 54px; object-fit: cover; border-radius: 8px; }
.rail-story small { display: block; color: var(--muted); font-size: .75rem; }
.rail-story strong { font-size: .9rem; line-height: 1.3; }
.story-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s; }
.story-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.story-card-media { position: relative; display: block; aspect-ratio: 3 / 2; background: var(--lilac); overflow: hidden; }
.story-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.story-card:hover .story-card-media img { transform: scale(1.04); }
.story-card-placeholder { display: grid; place-items: center; height: 100%; color: var(--sky); }
.story-card-time { position: absolute; right: .6rem; bottom: .6rem; display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .55rem; border-radius: 999px; background: rgba(27, 26, 75, .85); color: #fff; font-size: .75rem; font-weight: 700; }
.story-card-copy { display: flex; flex-direction: column; gap: .3rem; padding: .9rem 1rem 1.1rem; }
.story-card-copy small { color: var(--muted); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.story-card-copy strong { font-family: var(--display); font-size: 1.08rem; font-weight: 600; color: var(--night); line-height: 1.25; }
.story-card-copy p { margin: 0; color: var(--ink-2); font-size: .88rem; line-height: 1.5; }
.story-rows { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0 2rem; }
.story-row { display: grid; grid-template-columns: 96px 1fr auto; gap: .9rem; align-items: center; padding: .6rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); }
.story-row:hover { border-color: var(--sky); }
.story-row img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; }
.story-row-ph { display: grid; place-items: center; width: 96px; height: 64px; border-radius: 8px; background: var(--lilac); color: var(--sky); }
.story-row strong { display: block; font-family: var(--display); font-weight: 600; color: var(--night); }
.story-row small { color: var(--muted); }
.guide-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s; }
.guide-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.guide-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.guide-card-copy { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem 1.2rem; }
.guide-card-copy small { color: var(--muted); font-size: .76rem; font-weight: 700; }
.guide-card-copy strong { font-family: var(--display); font-size: 1.08rem; font-weight: 600; color: var(--night); line-height: 1.3; }
.guide-card-copy p { margin: 0; font-size: .88rem; color: var(--ink-2); }
.guide-card-copy i { font-style: normal; color: var(--sky-dark); font-weight: 700; font-size: .85rem; display: inline-flex; gap: .3rem; align-items: center; margin-top: .3rem; }
.tile { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .18s; min-height: 110px; }
.tile:hover { transform: translateY(-3px); color: var(--ink); }
.tile img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.tile-icon { display: grid; place-items: center; width: 46px; height: 46px; margin: 1rem 1rem 0; border-radius: 12px; background: var(--lilac); color: var(--sky-dark); }
.tile-copy { padding: .8rem 1rem 1rem; display: flex; flex-direction: column; gap: .2rem; }
.tile-copy strong { font-family: var(--display); font-weight: 600; color: var(--night); font-size: 1.02rem; }
.tile-copy small { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.tile-count { position: absolute; top: .6rem; right: .6rem; padding: .2rem .55rem; border-radius: 999px; background: var(--night); color: #fff; font-size: .75rem; font-weight: 800; }

/* ---------- Home sections ---------- */
.tonight-band { background: var(--paper); border-block: 1px solid var(--line); }
.tonight-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 2rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow); }
.tonight-card-lg { padding: 1.5rem; }
.tonight-media img { border-radius: var(--radius); width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.tonight-copy h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.tonight-copy h2 a { color: var(--night); }
.tonight-moral { padding: .7rem 1rem; border-left: 4px solid var(--moon); background: var(--moon-soft); border-radius: 0 10px 10px 0; color: var(--ink); }
@media (max-width: 800px) { .tonight-card { grid-template-columns: 1fr; } }
.chooser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.chooser { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.chooser h3 { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; margin-bottom: .8rem; }
.chooser h3 svg { color: var(--sky-dark); }
@media (max-width: 900px) { .chooser-grid { grid-template-columns: 1fr; } }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.theme-card { position: relative; display: flex; flex-direction: column; background: var(--night); color: #fff; border-radius: var(--radius); overflow: hidden; min-height: 240px; box-shadow: var(--shadow-sm); transition: transform .18s; }
.theme-card:hover { transform: translateY(-3px); color: #fff; }
.theme-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; transition: opacity .3s, transform .5s; }
.theme-card:hover img { opacity: .9; transform: scale(1.03); }
.theme-card-copy { position: relative; margin-top: auto; padding: 1.1rem 1.2rem; background: linear-gradient(180deg, transparent, rgba(27, 26, 75, .95) 55%); display: flex; flex-direction: column; gap: .2rem; padding-top: 3rem; }
.theme-card-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--moon); color: var(--moon-ink); margin-bottom: .3rem; }
.theme-card-copy strong { font-family: var(--display); font-size: 1.3rem; font-weight: 600; }
.theme-card-copy small { color: #d7d3ff; font-size: .86rem; }
.theme-card-copy em { font-style: normal; color: var(--moon); font-size: .76rem; font-weight: 700; margin-top: .3rem; }
@media (max-width: 900px) { .theme-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .theme-grid { grid-template-columns: 1fr; } }
.how-band { background: var(--night); color: #fff; }
.how-band h2, .how-band h3 { color: #fff; }
.how-band .section-head p { color: #cfcbff; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.how-item { padding: 1.3rem; border-radius: var(--radius); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.how-item p { color: #d7d3ff; font-size: .92rem; margin: 0; }
.how-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--moon); color: var(--moon-ink); margin-bottom: .8rem; }
@media (max-width: 900px) { .how-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .how-grid { grid-template-columns: 1fr; } }
.guides-band { background: var(--paper); border-block: 1px solid var(--line); }
.cluster-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.cluster-card { display: flex; flex-direction: column; gap: .3rem; padding: 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); transition: transform .18s; }
.cluster-card:hover { transform: translateY(-3px); border-color: var(--sky); color: var(--ink); }
.cluster-card strong { font-family: var(--display); font-weight: 600; color: var(--night); }
.cluster-card small { color: var(--muted); font-size: .82rem; }
.cluster-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--lilac); color: var(--sky-dark); margin-bottom: .3rem; }
@media (max-width: 1000px) { .cluster-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cluster-grid { grid-template-columns: 1fr; } }
.theme-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.theme-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.theme-block-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem; margin-bottom: .7rem; color: var(--ink); }
.theme-block-head svg { color: var(--sky-dark); }
.theme-block-head strong { display: block; font-family: var(--display); font-weight: 600; font-size: 1.1rem; color: var(--night); }
.theme-block-head small { color: var(--muted); font-size: .82rem; }
.theme-block-head em { font-style: normal; padding: .2rem .6rem; border-radius: 999px; background: var(--lilac); color: var(--sky-dark); font-size: .78rem; font-weight: 800; }
@media (max-width: 800px) { .theme-list { grid-template-columns: 1fr; } }
.continue-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin: 1rem 0 0; padding: .8rem 1.1rem; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); color: #fff; font-size: .92rem; }
.continue-strip a { color: var(--moon); font-weight: 700; }
.fav-strip { margin-top: 1rem; }
.fav-strip .chip { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: #fff; }

/* ---------- Listing pages ---------- */
.listing-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2rem; padding: 2rem 0 3rem; }
.listing-rail { display: flex; flex-direction: column; gap: 1rem; }
.listing-intro { margin-bottom: 1.5rem; }
@media (max-width: 960px) { .listing-layout { grid-template-columns: 1fr; } }
.az-nav { display: flex; flex-wrap: wrap; gap: .3rem; margin: 1.25rem 0; }
.az-nav a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-family: var(--display); font-weight: 600; color: var(--night); }
.az-nav a:hover { background: var(--lilac); border-color: var(--sky); }
.az-group { padding: 1rem 0 1.5rem; border-top: 1px solid var(--line); }
.az-group h2 { font-size: 2rem; color: var(--sky-dark); }
.az-list { list-style: none; margin: 0; padding: 0; columns: 3; column-gap: 2rem; }
.az-list li { break-inside: avoid; padding: .3rem 0; }
.az-list a { font-weight: 700; color: var(--ink); }
.az-list small { color: var(--muted); font-size: .78rem; }
@media (max-width: 900px) { .az-list { columns: 2; } }
@media (max-width: 560px) { .az-list { columns: 1; } }
.age-section { border-top: 1px solid var(--line); }
.prose-p { max-width: 70ch; color: var(--ink-2); margin-bottom: 1.2rem; }
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 2rem 0 3rem; }
.pager-info { color: var(--muted); font-weight: 700; }
.search-form { display: flex; align-items: center; gap: .6rem; padding: .5rem .5rem .5rem 1rem; margin: 1.25rem 0; background: #fff; border: 1.5px solid var(--line-2); border-radius: 999px; color: var(--muted); }
.search-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 1.05rem; }
.sitemap-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; padding: 2rem 0 3rem; }
.sitemap-stories { grid-column: 1 / -1; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: .25rem 0; }
.plain-list.cols { columns: 4; column-gap: 2rem; }
@media (max-width: 900px) { .sitemap-grid { grid-template-columns: repeat(2, 1fr); } .plain-list.cols { columns: 2; } }
@media (max-width: 520px) { .sitemap-grid { grid-template-columns: 1fr; } .plain-list.cols { columns: 1; } }
.page-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin: 2rem 0 3rem; padding: 1.5rem 1.75rem; background: var(--night); color: #fff; border-radius: var(--radius-lg); }
.page-cta h2 { color: #fff; margin-bottom: .2rem; }
.page-cta p { color: #d7d3ff; margin: 0; }
.empty-state { text-align: center; padding: 3rem 1rem; }
.error-page { text-align: center; padding: 3rem 0 4rem; }
.error-page img { max-width: 420px; margin: 0 auto 1.5rem; border-radius: var(--radius-lg); }
.error-page .hero-actions { justify-content: center; }
.flash-wrap { padding-top: 1rem; }
.alert { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.alert-error { border-color: var(--bad); color: var(--bad); }
.alert-success { border-color: var(--good); color: var(--good); }

/* ---------- Prose ---------- */
.prose { color: var(--ink); font-size: 1.05rem; line-height: 1.75; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1.2rem; }
.prose li { margin-bottom: .4rem; }
.prose blockquote { margin: 1.5rem 0; padding: 1rem 1.3rem; border-left: 4px solid var(--moon); background: var(--paper-2); border-radius: 0 12px 12px 0; font-style: italic; color: var(--ink-2); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--paper-2); font-family: var(--display); font-weight: 600; }
.prose a { text-decoration: underline; text-decoration-color: var(--lilac-2); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--sky); }
.magazine-page { padding: 2rem 0 4rem; }
.legal-page { padding: 1.5rem 0 4rem; font-size: .98rem; }
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.5rem 0 2rem; }
.team-card { display: grid; grid-template-columns: 48px 1fr; gap: .9rem; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.team-card strong { display: block; font-family: var(--display); font-weight: 600; color: var(--night); }
.team-card small { display: block; color: var(--muted); font-size: .8rem; margin-bottom: .3rem; }
.team-card p { margin: 0; font-size: .9rem; }
@media (max-width: 700px) { .team-grid { grid-template-columns: 1fr; } }
.avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--lilac); color: var(--sky-dark); flex: none; }
.byline-box { display: grid; grid-template-columns: 48px 1fr; gap: 1rem; align-items: start; margin: 2rem 0; padding: 1.1rem 1.2rem; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); }
.byline-box strong { font-family: var(--display); font-weight: 600; color: var(--night); }
.byline-box p { margin: .2rem 0 0; font-size: .9rem; color: var(--ink-2); }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr); gap: 2rem; padding: 1.5rem 0 4rem; }
.contact-form { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; font-weight: 700; font-size: .92rem; color: var(--ink-2); }
.field input, .field textarea { padding: .7rem .9rem; border: 1.5px solid var(--line-2); border-radius: 10px; background: #fff; font-weight: 500; color: var(--ink); }
.field input:focus, .field textarea:focus { border-color: var(--sky); outline: 0; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 760px) { .contact-layout { grid-template-columns: 1fr; } }

/* ---------- Magazine article layout ---------- */
.article-head { padding: 1.5rem 0 1.25rem; max-width: 900px; }
.article-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; color: var(--muted); font-size: .84rem; font-weight: 700; }
.article-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.article-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr) 280px; gap: 2.25rem; padding-bottom: 3rem; }
.article-hero-img { border-radius: var(--radius-lg); margin-bottom: 1.5rem; box-shadow: var(--shadow); }
.magazine { max-width: 760px; }
.article-body { font-size: 1.1rem; }
.article-body > p:first-of-type::first-letter { float: left; font-family: var(--display); font-size: 3.6rem; line-height: .85; padding: .35rem .5rem 0 0; color: var(--sky-dark); }
.toc a { font-size: .84rem; }
.key-points { margin: 0 0 1.75rem; padding: 1.1rem 1.3rem; background: var(--lilac); border-radius: var(--radius); }
.kp-title { display: flex; align-items: center; gap: .4rem; font-family: var(--display); font-weight: 600; color: var(--night); margin-bottom: .5rem; }
.key-points ul { margin: 0; padding-left: 1.2rem; }
.key-points li { margin-bottom: .35rem; }
.faq-section { margin: 2.5rem 0; }
.faq-item { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: .6rem; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.1rem; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; font-size: 1.02rem; }
.faq-item[open] summary svg { transform: rotate(180deg); }
.faq-body { padding: 0 1.1rem 1rem; color: var(--ink-2); }
.sources ol { padding-left: 1.3rem; font-size: .92rem; }
.pillar-band { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); gap: 1.5rem; align-items: center; margin: 1.5rem 0; padding: 1.25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.pillar-band img { border-radius: var(--radius); }
.directory-section { padding: 1.5rem 0; border-top: 1px solid var(--line); }
@media (max-width: 1100px) { .article-layout { grid-template-columns: minmax(0, 1fr) 280px; } .article-toc { display: none; } }
@media (max-width: 860px) { .article-layout { grid-template-columns: 1fr; } .pillar-band { grid-template-columns: 1fr; } }

/* ---------- Story page ---------- */
.story-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2rem; align-items: center; padding: 1rem 0 1.5rem; }
.story-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.story-cover img { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; }
.story-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; margin: .5rem 0 1rem; color: var(--muted); font-size: .88rem; font-weight: 700; }
.story-meta span, .story-meta a { display: inline-flex; align-items: center; gap: .35rem; }
.story-meta a { color: var(--sky-dark); }
.reader-tools { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.reader-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .7rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm); }
.reader-note { flex-basis: 100%; padding: 0 .8rem; font-size: .8rem; color: var(--muted); font-weight: 700; }
.reader-note:empty { display: none; }
@media (max-width: 800px) { .reader-tools { margin-left: 0; } .story-head { grid-template-columns: 1fr; } .story-cover { order: -1; } .reader-bar { border-radius: 18px; } .reader-bar .btn .btn-label { display: none; } .reader-bar .btn-primary .btn-label { display: inline; } }
.story-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr) 280px; gap: 2rem; padding: 1rem 0 2rem; }
.story-main { min-width: 0; max-width: 720px; }
.story-body { font-size: var(--story-size); line-height: 1.8; }
.story-body h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin: 2.2rem 0 .8rem; padding-top: 1.2rem; border-top: 1px dashed var(--line-2); display: flex; align-items: center; gap: .6rem; }
.story-body h2::before { content: "\2726"; color: var(--moon); font-size: .9em; }
.story-body h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.story-body p { margin-bottom: 1.25em; }
.story-body p.speaking { background: var(--moon-soft); border-radius: 8px; box-shadow: 0 0 0 8px var(--moon-soft); }
.story-body figure { margin: 1.5rem 0; }
.story-body figure img, .story-body > img, .story-body p > img { border-radius: var(--radius); box-shadow: var(--shadow-sm); margin: 1.5rem auto; }
.story-body figcaption { text-align: center; color: var(--muted); font-size: .85rem; margin-top: .5rem; }
.story-end { text-align: center; padding: 2rem 0 1rem; }
.the-end { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--display); font-size: 1.5rem; color: var(--sky-dark); margin-bottom: 1rem; }
.the-end svg { color: var(--moon); }
.story-end-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.5rem; margin-top: 1rem; font-weight: 700; font-size: .92rem; }
.story-end-links a { display: inline-flex; align-items: center; gap: .3rem; }
.story-stars { margin-top: 1rem; color: var(--muted); font-size: .9rem; font-weight: 700; }
.story-stars b { color: var(--moon-dark); }
.talk-about { margin: 2rem 0; padding: 1.5rem; background: var(--lilac); border-radius: var(--radius-lg); }
.talk-about h2 { display: flex; align-items: center; gap: .5rem; }
.talk-about h3 { margin-top: 1.4rem; font-size: 1.05rem; }
.moral-box { padding: 1rem 1.2rem; background: #fff; border-radius: 12px; border-left: 4px solid var(--moon); }
.moral-box p { margin: .3rem 0 0; font-size: 1.05rem; }
.moral-label { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--display); font-weight: 600; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--moon-dark); }
.question-list { padding-left: 1.4rem; }
.question-list li { margin-bottom: .55rem; font-size: 1.02rem; }
.vocab-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin: 0; }
.vocab-list > div { background: #fff; border-radius: 10px; padding: .7rem .9rem; }
.vocab-list dt { font-family: var(--display); font-weight: 600; color: var(--night); }
.vocab-list dd { margin: .15rem 0 0; font-size: .92rem; color: var(--ink-2); }
@media (max-width: 560px) { .vocab-list { grid-template-columns: 1fr; } }
.story-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0; }
.story-rail { display: flex; flex-direction: column; gap: 1rem; }
.story-chapters a { font-size: .84rem; line-height: 1.3; }
.story-chapters a.active { color: var(--sky-dark); background: var(--lilac); }
@media (max-width: 1150px) { .story-layout { grid-template-columns: minmax(0, 1fr) 280px; } .story-rail-left { display: none; } }
@media (max-width: 860px) { .story-layout { grid-template-columns: 1fr; } .story-main { max-width: none; } }
.story-illustration { margin: 1.5rem 0; }

/* ---------- Hover tips ----------
   Every control in the reader bar says what it does on hover and on keyboard
   focus. The icon-only buttons keep their aria-label as well, so the tip is a
   convenience for sighted mouse users rather than the only explanation. */
.tip { position: relative; }
.tip::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 60;
  width: max-content; max-width: 220px; padding: .4rem .65rem; border-radius: 9px;
  background: var(--night); border: 1px solid rgba(255, 255, 255, .14); color: #fff;
  font: 600 .76rem/1.35 var(--font); text-align: center; white-space: normal;
  opacity: 0; transform: translate(-50%, 4px); pointer-events: none;
  transition: opacity .15s ease, transform .15s ease; box-shadow: var(--shadow);
}
.tip::before {
  content: ""; position: absolute; left: 50%; bottom: calc(100% + 5px); z-index: 61;
  border: 5px solid transparent; border-top-color: var(--night);
  opacity: 0; transform: translateX(-50%); transition: opacity .15s ease;
}
.tip:hover::after, .tip:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.tip:hover::before, .tip:focus-visible::before { opacity: 1; }
/* Controls that sit at the top of the screen point their tip downwards. */
.tip-down::after { bottom: auto; top: calc(100% + 10px); transform: translate(-50%, -4px); }
.tip-down::before { bottom: auto; top: calc(100% + 5px); border-top-color: transparent; border-bottom-color: var(--night); }
.tip-down:hover::after, .tip-down:focus-visible::after { transform: translate(-50%, 0); }
/* A tip on the first or last control would run off a narrow screen, and a
   touch device has no hover to trigger it with. */
@media (hover: none), (max-width: 560px) { .tip::after, .tip::before { display: none; } }
@media (prefers-reduced-motion: reduce) { .tip::after { transition: none; } }
body.night .tip::after { background: #2a2764; }
body.night .tip::before { border-top-color: #2a2764; }
body.night .tip-down::before { border-top-color: transparent; border-bottom-color: #2a2764; }

/* ---------- Reading bar ----------
   Fixed to the foot of the window while the story is read aloud. The Listen
   button scrolls away with the top of the page; this does not, so pause and
   stop are always one tap away. */
.i-play, .i-pause { display: inline-flex; align-items: center; }
[data-state="playing"] .i-play { display: none; }
[data-state="idle"] .i-pause, [data-state="paused"] .i-pause, [data-state="finished"] .i-pause { display: none; }
.play-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 320; background: var(--night); color: #fff; box-shadow: 0 -8px 30px rgba(27, 26, 75, .35); }
.play-bar-progress { height: 3px; background: rgba(255, 255, 255, .16); }
.play-bar-progress i { display: block; height: 100%; width: 0; background: var(--moon); transition: width .35s ease; }
.play-bar-inner { display: flex; align-items: center; gap: .9rem; padding: .65rem 0; }
.play-bar-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--moon-soft); color: var(--moon); flex: none; }
.play-bar[data-state="playing"] .play-bar-icon { animation: listening 1.8s ease-in-out infinite; }
@keyframes listening { 0%, 100% { box-shadow: 0 0 0 0 rgba(245, 185, 66, .35); } 50% { box-shadow: 0 0 0 7px rgba(245, 185, 66, 0); } }
@media (prefers-reduced-motion: reduce) { .play-bar[data-state="playing"] .play-bar-icon { animation: none; } }
.play-bar-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.play-bar-copy strong { font-family: var(--display); font-weight: 600; font-size: .96rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-bar-copy small { color: #b9b5ea; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-bar-actions { display: flex; align-items: center; gap: .45rem; flex: none; }
.play-bar-toggle { min-width: 104px; }
.play-bar .book-btn:hover { background: rgba(255, 255, 255, .22); }
.play-bar-next { white-space: nowrap; }
/* Room for the bar, so the last line of the story is never behind it. */
body.playing { padding-bottom: 86px; }
/* In story-book mode the page has its own controls and covers the screen. */
body.book-open .play-bar { display: none; }
@media (max-width: 700px) {
  .play-bar-icon { display: none; }
  .play-bar-label { display: none; }
  .play-bar-toggle { min-width: 0; width: 48px; padding: 0; }
  .play-bar-next span, .play-bar-next { font-size: .8rem; }
  body.playing { padding-bottom: 84px; }
}
@media (max-width: 420px) { .play-bar-next { display: none; } }

/* ---------- Hub editorial ----------
   The answer block, sections, comparison tables, tip strips and the compact
   full list that every theme, collection, age and length page carries. */
.direct-answer { margin: 0 0 1.5rem; padding: 1rem 1.2rem; border-left: 4px solid var(--moon); background: var(--moon-soft); border-radius: 0 12px 12px 0; }
.direct-answer p { margin: 0; font-size: 1.08rem; line-height: 1.6; color: var(--ink); }
.direct-answer a { font-weight: 700; }
body.night .direct-answer { background: rgba(245, 185, 66, .12); }
body.night .direct-answer p { color: #dcd9f5; }
.section-lead { color: var(--ink-2); margin: -.5rem 0 1.1rem; }
.hub-section { padding: 1.5rem 0 0; }
.hub-section > h2 { margin-bottom: .6rem; }
.hub-section .prose h3 { margin-top: 1.4rem; font-size: 1.1rem; color: var(--sky-dark); }
.table-wrap { overflow-x: auto; margin: 1.25rem 0; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: .94rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.data-table caption { caption-side: top; text-align: left; padding: 0 0 .6rem; color: var(--muted); font-size: .86rem; }
.data-table th, .data-table td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table thead th { background: var(--lilac); font-family: var(--display); font-weight: 600; color: var(--night); white-space: nowrap; }
.data-table tbody th { font-weight: 700; color: var(--night); }
.data-table tbody tr:last-child th, .data-table tbody tr:last-child td { border-bottom: 0; }
body.night .data-table { background: #1d1c48; border-color: #2f2d6b; }
body.night .data-table th, body.night .data-table td { border-color: #2f2d6b; }
body.night .data-table thead th { background: #26245f; color: #fff; }
.tip-strip { margin: 1.75rem 0; padding: 1.1rem 1.3rem; background: var(--lilac); border-radius: var(--radius); }
.tip-strip-title { display: flex; align-items: center; gap: .45rem; font-size: 1rem; margin: 0 0 .5rem; }
.tip-strip ul { margin: 0; padding-left: 1.2rem; }
.tip-strip li { margin-bottom: .35rem; color: var(--ink-2); }
body.night .tip-strip { background: #1d1c48; }
.story-index { list-style: none; margin: 1rem 0 0; padding: 0; columns: 2; column-gap: 2.5rem; }
.story-index li { break-inside: avoid; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .42rem 0; border-bottom: 1px solid var(--line); }
.story-index a { color: var(--ink); font-weight: 700; }
.story-index a:hover { color: var(--sky-dark); }
.si-meta { flex: none; color: var(--muted); font-size: .76rem; white-space: nowrap; }
body.night .story-index li { border-color: #2f2d6b; }
body.night .story-index a { color: #dcd9f5; }
@media (max-width: 760px) { .story-index { columns: 1; } }
.child-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; margin-top: 1rem; }
.child-block { padding: 1.1rem 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.child-block h3 { margin-bottom: .3rem; font-size: 1.05rem; }
.child-block h3 small { color: var(--muted); font-family: var(--font); font-size: .78rem; font-weight: 600; }
.child-block > p { color: var(--ink-2); font-size: .9rem; margin-bottom: .6rem; }
body.night .child-block { background: #1d1c48; border-color: #2f2d6b; }
.mini-list { list-style: none; margin: 0 0 .7rem; padding: 0; }
.mini-list li { display: flex; justify-content: space-between; gap: .8rem; padding: .3rem 0; border-bottom: 1px dashed var(--line); font-size: .88rem; }
.mini-list a { color: var(--ink); font-weight: 650; }
.mini-list span { color: var(--muted); font-size: .76rem; flex: none; }
body.night .mini-list a { color: #dcd9f5; }
.pager-numbers { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.pager-numbers li a, .pager-numbers li span { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 .4rem; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: .9rem; color: var(--ink); }
.pager-numbers li a:hover { border-color: var(--sky); background: var(--lilac); }
.pager-numbers li span { background: var(--night); border-color: var(--night); color: #fff; }
body.night .pager-numbers li a { background: #1d1c48; border-color: #2f2d6b; color: #dcd9f5; }
@media (max-width: 600px) { .pager { flex-wrap: wrap; } }

/* ---------- About this story ---------- */
.about-story { margin: 2rem 0; padding: 1.4rem 1.5rem; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.about-story h2 { font-size: 1.25rem; margin-bottom: .6rem; }
.about-story h3 { font-size: 1rem; margin: 1.2rem 0 .6rem; color: var(--sky-dark); }
.about-note { font-size: 1.04rem; line-height: 1.7; color: var(--ink); margin: 0; }
.about-note a { font-weight: 700; text-decoration: underline; text-decoration-color: var(--lilac-2); text-underline-offset: 3px; }
.next-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.next-list li { display: grid; grid-template-columns: 72px 1fr; gap: .8rem; align-items: start; padding: .7rem .8rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.next-list img { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; }
.next-list a { font-family: var(--display); font-weight: 600; color: var(--night); }
.next-list small { color: var(--muted); font-size: .76rem; margin-left: .35rem; }
.next-list em { display: block; font-style: normal; color: var(--ink-2); font-size: .9rem; line-height: 1.5; margin-top: .2rem; }
body.night .about-story { background: #1d1c48; border-color: #2f2d6b; }
body.night .about-note { color: #dcd9f5; }
body.night .next-list li { background: #26245f; border-color: #3d3a80; }
body.night .next-list a { color: #fff; }
@media (max-width: 480px) { .next-list li { grid-template-columns: 1fr; } .next-list img { display: none; } }

.group-head { margin: 1.25rem 0 .8rem; font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sky-dark); font-family: var(--display); }

/* ---------- Target size ----------
   WCAG 2.2 asks for a 24px minimum on anything tappable that is not a link
   inside a run of prose. These are the standalone link groups: breadcrumbs,
   the footer columns, the quick links under the hero, story meta and tags. */
.breadcrumb a, .breadcrumb .current,
.hero-quick a, .footer-links a, .footer-bottom-links a, .mobile-utility a,
.story-meta a, .story-meta span, .story-end-links a, .article-meta span,
.chip, .mega-footer a, .text-link, .si-meta, .next-list a, .rail-links a, .mini-list a, .story-chapters a,
.az-list a, .child-block h3 a, .sources li a, .plain-list a, .footer-bottom-links a {
  display: inline-flex; align-items: center; min-height: 24px;
}
.az-list li { padding: .35rem 0; }
.sources li { margin-bottom: .2rem; }
.footer-links li { margin-bottom: .15rem; }
.story-index li { min-height: 30px; }
.legal-toc { margin: 0 0 2rem; padding: 1.1rem 1.3rem; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); }
.legal-toc h2 { font-size: 1rem; margin-bottom: .5rem; }
.legal-toc ol { margin: 0; padding-left: 1.3rem; columns: 2; column-gap: 2rem; }
.legal-toc li { margin-bottom: .2rem; break-inside: avoid; }
.legal-toc a { font-size: .92rem; }
@media (max-width: 640px) { .legal-toc ol { columns: 1; } }
body.night .legal-toc { background: #1d1c48; border-color: #2f2d6b; }
.legal-next { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.legal-next h2 { font-size: 1.1rem; }
.hero-facts { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: .5rem; }
.hero-facts li { display: grid; grid-template-columns: 22px 1fr; gap: .6rem; align-items: start; color: #d7d3ff; font-size: .95rem; line-height: 1.5; }
.hero-facts svg { color: var(--moon); margin-top: .25rem; }
.hero-facts strong { color: #fff; }

/* ---------- Night light ---------- */
body.night { background: #12112e; color: #dcd9f5; }
body.night .story-body, body.night .prose { color: #dcd9f5; }
body.night .story-body h2, body.night h1, body.night h2, body.night h3, body.night strong { color: #fff; }
body.night .page-hero { background: #1b1a4b; border-color: #2c2a66; }
body.night .card, body.night .reader-bar, body.night .story-card, body.night .guide-card, body.night .tile, body.night .theme-block, body.night .chooser, body.night .byline-box, body.night .story-row, body.night .moral-box, body.night .vocab-list > div { background: #1d1c48; border-color: #2f2d6b; color: #dcd9f5; }
body.night .card-head { border-color: #2f2d6b; }
body.night .rail-links a, body.night .rail-story { border-color: #2f2d6b; color: #cfcbff; }
body.night .rail-links a:hover, body.night .rail-story:hover { background: #26245f; }
body.night .talk-about { background: #1d1c48; }
body.night .btn-outline { border-color: #3d3a80; color: #dcd9f5; }
body.night .story-card-copy strong, body.night .guide-card-copy strong, body.night .tile-copy strong, body.night .rail-story strong { color: #fff; }
body.night .story-card-copy p, body.night .deck, body.night .story-meta { color: #b9b5ea; }
body.night .story-body p.speaking { background: rgba(245, 185, 66, .22); box-shadow: 0 0 0 8px rgba(245, 185, 66, .22); }
body.night .story-body h2 { border-color: #3d3a80; }
body.night .chip { background: #26245f; border-color: #3d3a80; color: #dcd9f5; }
body.night .breadcrumb a { color: #b9b5ea; }
body.night .story-end-links a, body.night a { color: #b3a6ff; }
body.night .site-footer { border-top: 1px solid #2f2d6b; }
body.night .story-body img, body.night .story-cover img { filter: brightness(.8); }

/* ---------- Story-book mode ---------- */
.book-mode { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; background: var(--cream); color: var(--ink); }
.book-top { display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; background: var(--night); color: #fff; }
.book-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--display); font-weight: 600; }
.book-progress { font-size: .82rem; color: #cfcbff; font-weight: 700; }
.book-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; }
.book-btn[aria-pressed="true"] { background: var(--moon); color: var(--moon-ink); }
.book-page { flex: 1; overflow-y: auto; padding: clamp(1.25rem, 4vw, 3rem) var(--gutter); font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.7; max-width: 900px; width: 100%; margin: 0 auto; }
.book-page h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 1rem; }
.book-page img { border-radius: var(--radius-lg); margin: 0 auto 1.5rem; max-height: 46vh; width: auto; box-shadow: var(--shadow); }
.book-page p { margin-bottom: 1.2em; }
.book-page p.speaking { background: var(--moon-soft); border-radius: 8px; box-shadow: 0 0 0 8px var(--moon-soft); }
.book-page .book-end { text-align: center; padding: 2rem 0; }
.book-page .book-end .btn { margin-top: 1rem; }
.book-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem var(--gutter); background: #fff; border-top: 1px solid var(--line); }
.book-dots { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: center; }
.book-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.book-dots i.on { background: var(--moon); }
body.night .book-mode { background: #12112e; color: #dcd9f5; }
body.night .book-nav { background: #1d1c48; border-color: #2f2d6b; }
body.night .book-page h2 { color: #fff; }
@media (max-width: 600px) { .book-nav .btn { min-height: 48px; padding: 0 1rem; font-size: .95rem; } .book-dots { display: none; } }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: hidden; margin-top: 3rem; padding: 3rem 0 2rem; background: var(--night); color: #cfcbff; }
.footer-sky { position: absolute; inset: 0; pointer-events: none; }
.fs-star.s1 { top: 15%; left: 5%; } .fs-star.s2 { top: 40%; left: 30%; width: 4px; height: 4px; animation-delay: 1s; } .fs-star.s3 { top: 10%; left: 55%; animation-delay: 2s; } .fs-star.s4 { top: 70%; left: 75%; width: 4px; height: 4px; animation-delay: .5s; } .fs-star.s5 { top: 25%; left: 92%; animation-delay: 1.5s; } .fs-star.s6 { top: 80%; left: 15%; width: 3px; height: 3px; animation-delay: 2.5s; }
.footer-grid { position: relative; display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 2rem; }
.footer-brand-col .brand { margin-bottom: .8rem; }
.footer-desc { color: #b9b5ea; font-size: .9rem; max-width: 40ch; }
.footer-desc a { color: var(--moon); }
.footer-heading { font-family: var(--display); font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--moon); margin-bottom: .7rem; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: #cfcbff; font-size: .9rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1.5rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .82rem; color: #9a95d8; }
.footer-bottom-links { display: flex; gap: 1rem; }
.footer-bottom-links a { color: #cfcbff; }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand-col { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Print ---------- */
@media print {
  .site-header, .mobile-panel, .site-footer, .reader-bar, .play-bar, .story-rail, .story-end, .story-tags, .breadcrumb, .book-mode, .story-cover, .section-tight { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .story-layout { display: block; }
  .story-main { max-width: none; }
  .story-body { font-size: 13pt; }
  .story-body img { max-width: 60%; margin: 1rem auto; page-break-inside: avoid; }
  .talk-about { background: none; border: 1px solid #999; }
  a { color: #000; text-decoration: none; }
}
