/* The story pages: home, readers, publishers.
   Rules of the road:
   - Content is visible with no script and under reduced motion. The scroll
     engine only ever adds motion (html[data-live]); it never reveals content.
   - Motion is transform and opacity, driven by --p (0 to 1) which site.js
     writes per scene. Nothing else is animated.
   - The ibis is never mirrored, in either direction. */

:root {
  --gold-l: #d8bc69;
  --night: #170c2b;
  --night-2: #1f1340;
  --sun: #f1dc9a;
  --skin: #d9a574;
  --skin-n: #b98560;
  --font: "IBM Plex Sans Arabic", "SF Arabic", "Geeza Pro", system-ui, sans-serif;
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.tale { padding: 0; background: var(--paper-base); color: var(--ink); font-family: var(--font); line-height: 1.7; overflow-x: clip; }
main[lang="en"] { line-height: 1.6; }
.tale > main, body.home > main { max-width: none; margin: 0; }
.tale > header, .tale > footer, .tale > .site-header { max-width: none; }
.wrap { width: min(100% - 2.5rem, 78rem); margin-inline: auto; }

/* Header: opaque paper, quiet. */
.tale > .site-header { margin: 0; padding: 0.35rem max(1.25rem, calc((100vw - 78rem) / 2)); background: var(--paper-base); border-bottom: 1px solid var(--gutter); z-index: 30; }
.tale .wordmark, .tale .site-nav a { color: var(--ink); }
.tale .site-nav a { font-weight: 500; padding-inline: 0.4rem; }
.tale .site-nav a:hover, .tale .site-nav a[aria-current="page"] { color: var(--brand-ink); }
.tale .switch, .tale .nav-toggle { border-color: var(--gutter); background: var(--paper-raised); color: var(--ink); min-height: 2.75rem; min-width: 2.75rem; font-weight: 600; }
.tale .site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
@media (max-width: 64rem) {
  .tale > .site-header { flex-wrap: wrap; }
  .tale .site-nav[data-open="true"] { background: var(--paper-base); padding-bottom: 1rem; }
}

/* Buttons */
.tale .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.tale .button { min-height: 3rem; padding: 0.7rem 1.4rem; font: 600 1rem/1.2 var(--font); border-radius: 999px; background: var(--brand); color: var(--on-brand); border: 1px solid transparent; transition: transform 160ms ease-out, background-color 160ms ease-out; }
.tale .button:hover { background: var(--brand-ink); transform: translateY(-2px); }
.tale .button:active { transform: translateY(0); }
.tale .button.quiet { background: transparent; color: var(--brand-ink); border-color: color-mix(in srgb, var(--brand-ink) 35%, transparent); }
.tale .button.quiet:hover { background: var(--brand-wash); border-color: var(--brand); }
.tale .button.light { background: #fbf9f4; color: #2d1759; }
.tale .button.light:hover { background: #fff; }
.tale .button.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.tale .button.ghost:hover { background: rgba(255, 255, 255, 0.14); }
.store-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--gold-l); box-shadow: 0 0 0 3px rgba(216, 188, 105, 0.3); }
.tale a:focus-visible, .tale button:focus-visible { outline: 3px solid var(--brand-lifted); outline-offset: 3px; }
.on-violet a:focus-visible, .on-night a:focus-visible, .on-deep a:focus-visible, .on-violet button:focus-visible, .on-night button:focus-visible, .on-deep button:focus-visible { outline-color: #fff; }

/* Scene theming: every scene sets its own ground and ink. */
.scene, .hero { --bg: var(--paper-base); --fg: var(--ink); --fg-soft: #4b4d56; --kick: #7b6535; background: var(--bg); color: var(--fg); }
.on-wash { --bg: #f0e9ff; }
.on-night { --bg: #1c1238; --fg: #f7f5ff; --fg-soft: #d3cae6; --kick: var(--gold-l); }
.on-deep { --bg: var(--night); --fg: #f7f5ff; --fg-soft: #d3cae6; --kick: var(--gold-l); }
.on-violet { --bg: var(--brand); --fg: #fff; --fg-soft: #ece6ff; --kick: #f1dc9a; }
.on-sun { --bg: var(--sun); --fg: #1a1b22; --fg-soft: #3b3326; --kick: #5c4a1c; }
.scene a:not(.button) { color: inherit; }

.scene { --p: 1; position: relative; padding-block: clamp(4rem, 9vw, 8rem); }
.scene-grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.scene:nth-of-type(even) .scene-copy { order: 2; }
@media (max-width: 56rem) {
  .scene-grid { grid-template-columns: minmax(0, 1fr); }
  .scene:nth-of-type(even) .scene-copy { order: 0; }
}

/* Type */
.scene h1, .scene h2, .hero h1 { margin: 0; font-weight: 600; text-wrap: balance; letter-spacing: -0.015em; }
.scene h2 { font-size: clamp(2.1rem, 4.8vw, 4rem); line-height: 1.08; }
.scene h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); line-height: 1.02; }
.hero h1 { font-size: clamp(2.7rem, 6.6vw, 6.2rem); line-height: 1.02; }
[lang="ar"] .scene h1, [lang="ar"] .scene h2, [lang="ar"] .hero h1 { line-height: 1.22; letter-spacing: 0; }
.lede { max-width: 34rem; margin: 1.25rem 0 0; color: var(--fg-soft); font-size: clamp(1.05rem, 1.2vw + 0.7rem, 1.3rem); line-height: 1.75; text-wrap: pretty; }
.hero .lede { --fg-soft: #4b4d56; }
.kicker { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 1rem; color: var(--kick); font: 600 0.9375rem/1.3 var(--font); }

.chip { display: inline-flex; align-items: center; gap: 0.6rem; margin: 0 0 1.25rem; padding: 0.35rem 0.9rem; border: 1px solid var(--gutter); border-radius: 999px; background: var(--paper-raised); color: var(--brand-ink); font: 600 0.9375rem/1.4 var(--font); }
.chip-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #3f9a62; }

/* Hero */
.hero { --p: 0; position: relative; }
.hero-pin { position: relative; padding-block: clamp(2.5rem, 6vw, 5rem) 2rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 2rem; align-items: center; }
.hero-copy { position: relative; z-index: 2; }
.hero-copy .actions { margin-top: 2rem; }
.cue { margin: 1.75rem 0 0; color: #6b6d76; font: 500 0.875rem/1.4 var(--font); }
.hero-stage { position: relative; width: min(100%, 36rem); aspect-ratio: 1 / 1.06; justify-self: center; }
.tower-wrap { position: absolute; inset: auto auto 0 0; width: 36%; z-index: 3; }
.tower { display: block; width: 100%; height: auto; overflow: visible; }
.hero-device { position: absolute; inset: 12% 0 auto 0; margin-inline: auto; width: 64%; aspect-ratio: 3 / 4; z-index: 1; }
.hero-device[data-kind="iphone"] { width: 50%; aspect-ratio: 9 / 19; inset-block-start: 4%; }
.hero-hanin { inset-inline-start: auto !important; inset-inline-end: 0; width: 36% !important; bottom: 0 !important; z-index: 4; }
.hero-hanin.s-a { display: none; }
@media (max-width: 56rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-stage { width: min(100%, 26rem); }
}

@media (min-height: 38rem) {
  html[data-pinned] .hero { height: 250vh; }
  html[data-pinned] .hero-pin { position: sticky; top: 0; height: 100vh; height: 100svh; padding-block: 4.75rem 1rem; box-sizing: border-box; }
  html[data-pinned] .hero-grid { height: 100%; grid-template-rows: minmax(0, 1fr); }
  html[data-pinned] .hero-stage { height: 100%; width: auto; max-width: 100%; max-height: 44rem; }
  @media (max-width: 56rem) {
    html[data-pinned] .hero-grid { grid-template-rows: auto minmax(0, 1fr); gap: 0.5rem; align-content: stretch; }
    html[data-pinned] .hero-stage { justify-self: center; height: 100%; }
    html[data-pinned] .hero h1 { font-size: clamp(2.2rem, 10vw, 3.2rem); }
    html[data-pinned] .hero .lede { margin-top: 0.6rem; font-size: 1rem; line-height: 1.55; }
    html[data-pinned] .hero-copy .actions { margin-top: 1rem; }
    html[data-pinned] .hero .chip { display: none; }
    html[data-pinned] .cue { margin-top: 0.7rem; font-size: 0.8125rem; }
  }
  html[data-pinned] .tower-wrap { inset: 0; width: 100%; }
  html[data-pinned] .tower { height: 100%; }
  html[data-pinned] .hero-device { inset: 0; margin: auto; height: fit-content; --ds: calc(0.5 + 0.5 * clamp(0, calc(var(--p) * 1.25), 1)); transform: scale(var(--ds)); opacity: clamp(0, calc((var(--p) - 0.18) * 4), 1); width: 64%; }
  html[data-pinned] .hero-device[data-kind="iphone"] { width: 46%; }
  html[data-pinned] .hero-hanin.s-a { display: block; opacity: calc(1 - clamp(0, calc((var(--p) - 0.3) * 8), 1)); }
  html[data-pinned] .hero-hanin.s-b { opacity: clamp(0, calc((var(--p) - 0.42) * 8), 1); }
  html[data-pinned] .cue { opacity: clamp(0, calc(1 - var(--p) * 8), 1); }

  /* Books: each one waits its turn (top first), then flies into the device. */
  html[data-pinned] .bk { --l: clamp(0, calc(var(--p) * 2.1 - var(--j) * 0.1 - 0.15), 1); transform-box: fill-box; transform-origin: center; transform: translate(calc(var(--l) * var(--dx) * 1px), calc(var(--l) * var(--dy) * 1px)) rotate(calc(var(--l) * var(--r) * 1deg)) scale(calc(1 - var(--l) * 0.82)); opacity: calc(1 - clamp(0, calc((var(--l) - 0.7) * 3.4), 1)); }
}
.tower-sway { transform-box: fill-box; transform-origin: 50% 100%; }
html[data-live] .tower-sway { animation: sway 3.4s ease-in-out infinite alternate; }
html[data-live] .bk9 { animation: jig 1.1s ease-in-out infinite alternate; }
html[data-live] .bk8 { animation: jig 1.4s ease-in-out infinite alternate-reverse; }
html[data-live] .bk7 { animation: jig 1.7s ease-in-out infinite alternate; }
html[data-live] .bk6 { animation: jig 2.1s ease-in-out infinite alternate-reverse; }
@keyframes sway { from { transform: rotate(-1.8deg); } to { transform: rotate(2.2deg); } }
@keyframes jig { from { translate: -4px 0; } to { translate: 5px 0; } }
.bk rect { stroke: rgba(26, 27, 34, 0.18); stroke-width: 1.5; }
.bk path { stroke: rgba(255, 255, 255, 0.4); stroke-width: 3; fill: none; }
.bk1 { --j: 8; --dx: 0; --dy: -218; --r: 14; } .bk1 rect { fill: #3c1fb4; }
.bk2 { --j: 7; --dx: -12; --dy: -174; --r: -18; } .bk2 rect { fill: #d8bc69; } .bk2 path { stroke: rgba(26, 27, 34, 0.3); }
.bk3 { --j: 6; --dx: 10; --dy: -130; --r: 22; } .bk3 rect { fill: #2d1759; }
.bk4 { --j: 5; --dx: -16; --dy: -86; --r: -12; } .bk4 rect { fill: #f5f2eb; stroke: #c9c0ad; } .bk4 path { stroke: rgba(26, 27, 34, 0.25); }
.bk5 { --j: 4; --dx: 14; --dy: -42; --r: 20; } .bk5 rect { fill: #7b55e0; }
.bk6 { --j: 3; --dx: -8; --dy: 2; --r: -24; } .bk6 rect { fill: #a8893c; }
.bk7 { --j: 2; --dx: 18; --dy: 46; --r: 16; } .bk7 rect { fill: #5c33c7; }
.bk8 { --j: 1; --dx: -10; --dy: 90; --r: -20; } .bk8 rect { fill: #eae0ff; stroke: #c9bbf0; } .bk8 path { stroke: rgba(26, 27, 34, 0.25); }
.bk9 { --j: 0; --dx: 6; --dy: 134; --r: 26; } .bk9 rect { fill: #1a1b22; }

/* Device frames */
.scene-visual { position: relative; width: 100%; max-width: 40rem; margin-inline: auto; aspect-ratio: 560 / 460; container-type: inline-size; }
.art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
[dir="rtl"] .art { transform: scaleX(-1); }
.device { position: absolute; margin: 0; }
.scene-visual .device[data-kind="ipad"] { width: 38%; aspect-ratio: 3 / 4; inset-inline-end: 3%; top: 12%; z-index: 2; }
.scene[data-scene="pencil"] .scene-visual .device[data-kind="ipad"], .scene[data-scene="review"] .scene-visual .device[data-kind="ipad"] { top: 24%; }
.scene-visual .device[data-kind="iphone"] { width: 27%; aspect-ratio: 9 / 19; inset-inline-end: 24%; top: 4%; z-index: 2; }
.scene[data-scene="offline"] .scene-visual .device { inset-inline-end: 36%; top: 12%; }
.scene[data-scene="studyhelp"] .scene-visual .device { inset-inline-end: 24%; }
.bezel { width: 100%; height: 100%; padding: 2.4cqw; background: #14101c; border-radius: 4.2cqw; box-shadow: 0 32px 80px rgba(60, 31, 180, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.device[data-kind="iphone"] .bezel { padding: 1.5cqw; border-radius: 6.2cqw; }
.screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 2.2cqw; background: var(--paper-raised); }
.device[data-kind="iphone"] .screen { border-radius: 4.8cqw; }
.screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 500ms ease-out; background: var(--paper-raised); }
.device[data-state="ready"] video, .device[data-state="poster"] video { opacity: 1; }
.hero-device { container-type: normal; }
.hero-stage .bezel { padding: 3%; border-radius: 6%/4.5%; }
.hero-stage .screen { border-radius: 3.4%/2.6%; }
.hero-stage .device[data-kind="iphone"] .bezel { padding: 3%; border-radius: 14%/6.8%; }
.hero-stage .device[data-kind="iphone"] .screen { border-radius: 11%/5.2%; }
.ph { position: absolute; inset: 0; width: 100%; height: 100%; }
.device[data-kind="ipad"] .ph-t, .device[data-kind="iphone"] .ph-w { display: none; }
.ph-bg { fill: #fbf9f4; } .ph-paper { fill: #fffdf6; stroke: #e6dfcf; stroke-width: 1; }
.ph-l { fill: #ddd5c4; } .ph-bar, .ph-dock { fill: #eae0ff; } .ph-track { fill: #e0d9c8; } .ph-fill { fill: #7b55e0; }
.ph-pill { fill: #f3ecff; } .ph-pill-on { fill: #5c33c7; } .ph-dot { fill: #cfc4ea; } .ph-dot-on { fill: #5c33c7; }
.pc1 { fill: #5c33c7; } .pc2 { fill: #d8bc69; } .pc3 { fill: #2d1759; } .pc4 { fill: #b9a2f2; } .pc5 { fill: #3f4a6b; } .pc6 { fill: #e07a5f; }
.pc-spine { fill: rgba(255, 255, 255, 0.28); }
.ph-hl { fill: rgba(216, 188, 105, 0.6); } .ph-sel { fill: rgba(123, 85, 224, 0.3); } .ph-handle, .ph-spark { fill: #5c33c7; }
.ph-ink { fill: none; stroke: #5c33c7; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - clamp(0, calc((var(--p) - 0.18) * 2.6), 1) * 100); }
.ph-margin { fill: none; stroke: #7b6535; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ph-sheet { fill: #f3ecff; stroke: #d9cdf3; stroke-width: 1; }
.ph-badge { fill: #d9f2e3; } .ph-tick { fill: none; stroke: #2d8a57; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ph-nosig rect { fill: #8c8a96; } .ph-nosig path { stroke: #c43d2e; stroke-width: 2; stroke-linecap: round; }
.ph-card2 { fill: #d3c4f2; }
.rt1 { fill: #f2b8ae; } .rt2 { fill: #f5d89a; } .rt3 { fill: #bfe5c8; } .rt4 { fill: #b9a2f2; }
.device[data-state="ready"] .ph, .device[data-state="poster"] .ph { opacity: 0; }
.clip-toggle { position: absolute; inset-block-end: 5%; inset-inline-end: 6%; z-index: 2; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 2px solid rgba(255, 255, 255, 0.85); border-radius: 50%; background: rgba(20, 16, 28, 0.78); cursor: pointer; }
.clip-toggle:hover { background: #14101c; }
.clip-toggle svg { width: 1.2rem; height: 1.2rem; fill: #fff; }
.clip-toggle .i-play { display: none; }
.clip-toggle[data-paused] .i-pause { display: none; }
.clip-toggle[data-paused] .i-play { display: block; }
.clip-toggle[hidden] { display: none; }

/* People. Hanin stands on the ground line of the art. */
.hanin, .nadia, .perch { position: absolute; display: block; pointer-events: none; }
.hanin { inset-inline-start: 0; bottom: 4.5%; width: 34%; z-index: 3; }
.hanin svg, .nadia svg, .perch svg { display: block; width: 100%; height: auto; overflow: visible; }
.perch svg { transform: none !important; }
.nadia { inset-inline-end: 2%; bottom: 4.5%; width: 36%; z-index: 3; }
.close-hanin { inset-inline-start: auto; left: 30%; bottom: 4.5%; width: 40%; z-index: 3; }
.perch { left: 55%; bottom: 57%; width: 12%; z-index: 4; }
html[data-live] .perch { display: none; }
.safe-hanin { inset-inline-start: 50%; margin-inline-start: -19%; bottom: 4.5%; width: 38%; z-index: 3; }

.sa-skin { fill: var(--skin); } .sa-hair { fill: #2b1b4a; } .sa-neck { fill: #c4905f; }
.sa-torso { fill: #7b55e0; } .sa-collar { fill: #eae0ff; } .sa-pack { fill: var(--gold-l); }
.sa-leg { fill: #3c1fb4; } .sa-shoe { fill: #f5f2eb; }
.sa-arm { fill: none; stroke: #6a43d4; stroke-width: 15; stroke-linecap: round; }
.sa-tab { fill: #1a1b22; } .sa-tabscr { fill: #eae0ff; } .sa-tabline { stroke: #7b55e0; stroke-width: 3; stroke-linecap: round; }
.sa-ink { fill: none; stroke: #5c33c7; stroke-width: 3; stroke-linecap: round; }
.sa-pencil { fill: #f5f2eb; stroke: #1a1b22; stroke-width: 1.5; } .sa-pencil-tip { fill: #1a1b22; }
.sa-spark { fill: #5c33c7; }
.sa-burst path { stroke: var(--gold-l); stroke-width: 6; stroke-linecap: round; fill: none; transform: translateY(14px); }
.na-hair { fill: #1b1226; } .na-skin { fill: var(--skin-n); } .na-blazer { fill: var(--gold-l); } .na-shirt { fill: #fbf9f4; }
.na-leg { fill: #eae0ff; } .na-shoe { fill: #14101c; } .na-arm { fill: none; stroke: #c9a54a; stroke-width: 15; stroke-linecap: round; }
.nb1 { fill: #fbf9f4; } .nb2 { fill: #f1dc9a; } .nb3 { fill: #3c1fb4; }

.ib-body, .ib-head, .ib-beak { fill: #fbf9f4; stroke: #3c1fb4; stroke-width: 3; stroke-linejoin: round; }
.ib-wing { fill: #7b55e0; } .ib-eye { fill: #1a1b22; }
.ib-leg { fill: none; stroke: #3c1fb4; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.ib-wingg { transform-box: fill-box; transform-origin: 80% 15%; transform: rotate(var(--wing, 0deg)); animation: var(--a-flap, none) var(--flap, 0.32s) ease-in-out infinite alternate; transition: transform 450ms cubic-bezier(0.3, 0.7, 0.2, 1); }
.ib-headg { transform-box: fill-box; transform-origin: 30% 90%; transform: rotate(var(--head, 0deg)); animation: var(--a-nod, none) 0.9s ease-in-out infinite alternate; transition: transform 450ms cubic-bezier(0.3, 0.7, 0.2, 1); }
.ib-legA { transform-box: fill-box; transform-origin: 50% 0; animation: var(--a-walk, none) 0.45s ease-in-out infinite alternate; }
.ib-legB { transform-box: fill-box; transform-origin: 50% 0; animation: var(--a-walk, none) 0.45s ease-in-out infinite alternate-reverse; }
.ib-legs { opacity: var(--legs, 1); }
@keyframes flap { from { transform: rotate(-6deg); } to { transform: rotate(38deg); } }
@keyframes nodh { from { transform: rotate(-4deg); } to { transform: rotate(14deg); } }
@keyframes stepper { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
.sa-wl, .sa-wr { transform-box: fill-box; transform-origin: 50% 0; }
.sa-wl, .sa-war { animation: var(--a-hanin, none) 0.7s ease-in-out infinite alternate; }
.sa-wr, .sa-wal { animation: var(--a-hanin, none) 0.7s ease-in-out infinite alternate-reverse; }
.sa-wal, .sa-war { transform-box: fill-box; transform-origin: 50% 0; }
html[data-live] .hanin { --a-hanin: stepper; }

/* The guide: one fixed ibis that flies between scenes and keeps its pose. */
.guide { position: fixed; inset: 0 auto auto 0; z-index: 12; width: clamp(5.25rem, 7vw, 8rem); pointer-events: none; opacity: 0; will-change: transform; transition: opacity 350ms ease-out; }
.guide-svg { transform: none !important; }
.nadia { inset-inline-end: 2%; bottom: 4.5%; width: 36%; z-index: 3; }
.close-hanin { inset-inline-start: auto; left: 30%; bottom: 4.5%; width: 40%; z-index: 3; }
.perch { left: 55%; bottom: 57%; width: 12%; z-index: 4; }
html[data-live] .perch { display: none; }
.safe-hanin { inset-inline-start: 50%; margin-inline-start: -19%; bottom: 4.5%; width: 38%; z-index: 3; }

.sa-skin { fill: var(--skin); } .sa-hair { fill: #2b1b4a; } .sa-neck { fill: #c4905f; }
.sa-torso { fill: #7b55e0; } .sa-collar { fill: #eae0ff; } .sa-pack { fill: var(--gold-l); }
.sa-leg { fill: #3c1fb4; } .sa-shoe { fill: #f5f2eb; }
.sa-arm { fill: none; stroke: #6a43d4; stroke-width: 15; stroke-linecap: round; }
.sa-tab { fill: #1a1b22; } .sa-tabscr { fill: #eae0ff; } .sa-tabline { stroke: #7b55e0; stroke-width: 3; stroke-linecap: round; }
.sa-ink { fill: none; stroke: #5c33c7; stroke-width: 3; stroke-linecap: round; }
.sa-pencil { fill: #f5f2eb; stroke: #1a1b22; stroke-width: 1.5; } .sa-pencil-tip { fill: #1a1b22; }
.sa-spark { fill: #5c33c7; }
.sa-burst path { stroke: var(--gold-l); stroke-width: 6; stroke-linecap: round; fill: none; transform: translateY(14px); }
.na-hair { fill: #1b1226; } .na-skin { fill: var(--skin-n); } .na-blazer { fill: var(--gold-l); } .na-shirt { fill: #fbf9f4; }
.na-leg { fill: #eae0ff; } .na-shoe { fill: #14101c; } .na-arm { fill: none; stroke: #c9a54a; stroke-width: 15; stroke-linecap: round; }
.nb1 { fill: #fbf9f4; } .nb2 { fill: #f1dc9a; } .nb3 { fill: #3c1fb4; }

.ib-body, .ib-head, .ib-beak { fill: #fbf9f4; stroke: #3c1fb4; stroke-width: 3; stroke-linejoin: round; }
.ib-wing { fill: #7b55e0; } .ib-eye { fill: #1a1b22; }
.ib-leg { fill: none; stroke: #3c1fb4; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.ib-wingg { transform-box: fill-box; transform-origin: 80% 15%; transform: rotate(var(--wing, 0deg)); animation: var(--a-flap, none) var(--flap, 0.32s) ease-in-out infinite alternate; transition: transform 450ms cubic-bezier(0.3, 0.7, 0.2, 1); }
.ib-headg { transform-box: fill-box; transform-origin: 30% 90%; transform: rotate(var(--head, 0deg)); animation: var(--a-nod, none) 0.9s ease-in-out infinite alternate; transition: transform 450ms cubic-bezier(0.3, 0.7, 0.2, 1); }
.ib-legA { transform-box: fill-box; transform-origin: 50% 0; animation: var(--a-walk, none) 0.45s ease-in-out infinite alternate; }
.ib-legB { transform-box: fill-box; transform-origin: 50% 0; animation: var(--a-walk, none) 0.45s ease-in-out infinite alternate-reverse; }
.ib-legs { opacity: var(--legs, 1); }
@keyframes flap { from { transform: rotate(-6deg); } to { transform: rotate(38deg); } }
@keyframes nodh { from { transform: rotate(-4deg); } to { transform: rotate(14deg); } }
@keyframes stepper { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
.sa-wl, .sa-wr { transform-box: fill-box; transform-origin: 50% 0; }
.sa-wl, .sa-war { animation: var(--a-hanin, none) 0.7s ease-in-out infinite alternate; }
.sa-wr, .sa-wal { animation: var(--a-hanin, none) 0.7s ease-in-out infinite alternate-reverse; }
.sa-wal, .sa-war { transform-box: fill-box; transform-origin: 50% 0; }
html[data-live] .hanin { --a-hanin: stepper; }

/* The guide: one fixed ibis that flies between scenes and keeps its pose. */
.guide { position: fixed; inset: 0 auto auto 0; z-index: 12; width: clamp(3.4rem, 7vw, 5.2rem); pointer-events: none; opacity: 0; transform: translate3d(var(--gx, 0px), var(--gy, 0px), 0); transition: transform 1100ms cubic-bezier(0.3, 0.85, 0.3, 1), opacity 400ms ease-out; }
.guide-svg { display: block; width: 100%; height: auto; overflow: visible; }
html[data-live] .guide { opacity: 1; }
html[data-live] .guide[data-off] { opacity: 0; }
html[data-live] .spot-ibis { display: none; }
.guide[data-pose="point"] { --wing: -64deg; --head: 6deg; }
.guide[data-pose="nod"] { --a-nod: nodh; --wing: -10deg; }
.guide[data-pose="fly"] { --a-flap: flap; --legs: 0; }
.guide[data-pose="walk"] { --a-walk: stepper; }
.guide[data-pose="stand"] { --wing: 0deg; }
.guide-svg { transform-origin: 50% 100%; transition: scale 220ms var(--ease-out); }
.guide[data-pose="crouch"] .guide-svg { scale: 1.05 0.86; }
.guide[data-landed] .guide-svg { animation: settle 520ms var(--ease-out); }
.guide[data-pose="fly"] .guide-svg { animation: hover 0.8s ease-in-out infinite alternate; }
@keyframes settle { 0% { scale: 1.06 0.9; } 55% { scale: 0.98 1.03; } 100% { scale: 1 1; } }
@keyframes hover { from { translate: 0 -4px; rotate: -4deg; } to { translate: 0 4px; rotate: 3deg; } }

/* Entrances: a short, eased rise (opacity and transform only), staggered by
   70 ms, and only with script. Without script everything is simply there. */
:root { --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1); }
html[data-live] .scene-copy > *, html[data-live] .scene-visual .device:not(.hero-device) { opacity: 0; transform: translateY(14px); transition: opacity 620ms var(--ease-out), transform 620ms var(--ease-out); transition-delay: calc(var(--n, 0) * 70ms); }
html[data-live] [data-in] .scene-copy > *, html[data-live] [data-in] .scene-visual .device:not(.hero-device) { opacity: 1; transform: none; }
html[data-live] .scene-copy > :nth-child(2) { --n: 1; } html[data-live] .scene-copy > :nth-child(3) { --n: 2; } html[data-live] .scene-copy > :nth-child(n + 4) { --n: 3; }
html[data-live] .scene-visual .device:not(.hero-device) { --n: 3; transform: translateY(18px); }
html[data-live] .scene-visual .art { translate: 0 calc((0.5 - var(--p)) * 2.4rem); }

/* Scene environments: three depth layers, transform only. Layers are static
   (centred) without script; with script each moves a different distance. */
.room { fill: #f8edd8; } .floor { fill: #e9d6b2; }
.room-violet { fill: #4a26ad; } .room-sun { fill: #f6e7ae; }
.art-library .room { fill: #f8edd8; } .art-library .floor { fill: #e4cfa6; }
.art-pencil .room { fill: #e4dbfa; } .art-pencil .floor { fill: #c9bcee; }
.art-studyhelp .room { fill: #eee6ff; } .art-studyhelp .floor { fill: #d6c9f4; }
.art-offline .room { fill: #2a2058; } .art-offline .floor { fill: #1b1340; }
.art-review .room { fill: #2a1760; } .art-review .floor { fill: #1c0e45; }
.art-safe .room { fill: #f4e4c8; } .art-safe .floor { fill: #dfc08f; }
.art-publishers .room { fill: #4a26ad; } .art-publishers .floor { fill: #3a1d8c; }
.art-close .room { fill: #f6e7ae; } .art-close .floor { fill: #ecd48a; }
html[data-live] .ly1 { translate: 0 calc((0.5 - var(--p)) * 14px); }
html[data-live] .ly2 { translate: 0 calc((0.5 - var(--p)) * 30px); }
html[data-live] .ly3 { translate: 0 calc((0.5 - var(--p)) * 54px); }
.win { fill: #e8defc; stroke: #c9a878; stroke-width: 8; }
.win-bar { stroke: #c9a878; stroke-width: 6; fill: none; }
.sun { fill: #f1dc9a; }
.shaft { fill: #fff3c4; opacity: 0.38; }
html[data-live] .sh1 { translate: calc((var(--p) - 0.5) * 50px) 0; }
html[data-live] .sh2 { translate: calc((0.5 - var(--p)) * 70px) 0; }
.shelf-board { fill: #b98f5c; }
.spine { fill: #7b55e0; }
.sp1, .sp4 { fill: #d8bc69; } .sp2, .sp5 { fill: #5c33c7; } .sp3, .sp6 { fill: #b9a2f2; }
.spines rect:nth-child(3n) { fill: #d8bc69; } .spines rect:nth-child(3n + 1) { fill: #5c33c7; } .spines rect:nth-child(3n + 2) { fill: #b9a2f2; }
/* The library shelf empties into the device as you scroll (script only). */
.sp1 { --i: 0; --dx: 236; --dy: 168; } .sp2 { --i: 1; --dx: 212; --dy: 154; } .sp3 { --i: 2; --dx: 190; --dy: 176; } .sp4 { --i: 3; --dx: 164; --dy: 150; } .sp5 { --i: 4; --dx: 138; --dy: 170; }
html[data-live] .art-library .spine { --l: clamp(0, calc(var(--p) * 2.2 - var(--i) * 0.12 - 0.3), 1); transform-box: fill-box; transform-origin: center; transform: translate(calc(var(--l) * var(--dx) * 1px), calc(var(--l) * var(--dy) * 1px)) rotate(calc(var(--l) * 18deg)) scale(calc(1 - var(--l) * 0.6)); opacity: calc(1 - clamp(0, calc((var(--l) - 0.7) * 3.4), 1)); }
.leaf { fill: #3f9a62; } .lf2 { fill: #2f7f4e; } .pot { fill: #c2704f; }
.board { fill: #2d2a5c; } .tray { fill: #a58a5e; }
.board-line { stroke: rgba(255, 255, 255, 0.55); stroke-width: 5; stroke-linecap: round; fill: none; }
.board-draw { fill: none; stroke: #f1dc9a; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - clamp(0, calc((var(--p) - 0.12) * 2.6), 1) * 100); }
.seat-far { fill: #b9a2f2; opacity: 0.7; } .seat-mid { fill: #9a82e6; } .seat-near { fill: #6a43d4; }
.beam { fill: #b9a2f2; } .cord { stroke: #7b6bb0; stroke-width: 3; fill: none; }
.bulb-off { fill: #d9d2e8; } .bulb-base { fill: #7b6535; }
.bulb-glass { fill: #f1dc9a; } .glow { fill: #f1dc9a; opacity: 0.4; } .bulb-ray { stroke: #a8893c; stroke-width: 6; stroke-linecap: round; fill: none; }
.bulb-on { opacity: clamp(0, calc((var(--p) - 0.5) * 10), 1); transform-box: fill-box; transform-origin: center; scale: calc(0.8 + 0.2 * clamp(0, calc((var(--p) - 0.5) * 10), 1)); }
.card { fill: #fffdf6; stroke: #d9cdf3; stroke-width: 2; } .card-top { fill: #7b55e0; }
.card-lines rect { fill: #d9d2c2; } .card-hl { fill: rgba(216, 188, 105, 0.6); }
.expl { transform-box: fill-box; transform-origin: 0 50%; scale: clamp(0, calc((var(--p) - 0.5) * 5), 1) 1; opacity: clamp(0, calc((var(--p) - 0.5) * 6), 1); }
.win-dark { fill: #0f0a21; stroke: #4a3a92; stroke-width: 6; }
.streak { fill: none; stroke: #9c86f0; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 16 34; }
.st-b { stroke: #f1dc9a; stroke-dasharray: 10 52; }
html[data-live] .streak { animation: streak 1.1s linear infinite; }
html[data-live] .st-b { animation-duration: 0.8s; }
@keyframes streak { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -50; } }
.rail { fill: #8f7bd0; } .strap-line { stroke: #8f7bd0; stroke-width: 3; fill: none; } .strap-loop { fill: none; stroke: #b9a2f2; stroke-width: 5; }
.strap { transform-box: fill-box; transform-origin: 50% 0; }
html[data-live] .strap { animation: sway 2.6s ease-in-out infinite alternate; }
html[data-live] .s1 { animation-duration: 3.1s; animation-direction: alternate-reverse; } html[data-live] .s2 { animation-duration: 3.6s; }
.bench { fill: #3c1fb4; } .bench-top { fill: #5c33c7; }
.panel { fill: #14102c; stroke: #4a3a92; stroke-width: 4; }
.bar { fill: #f1dc9a; transform-box: fill-box; transform-origin: 50% 100%; }
.b4 { --t: 0.3; } .b3 { --t: 0.38; } .b2 { --t: 0.46; } .b1 { --t: 0.54; }
.bar { --v: clamp(0, calc((var(--t) - var(--p)) * 12), 1); opacity: var(--v); translate: 0 calc((1 - var(--v)) * 16px); }
.bar-slash { stroke: #ff8a7a; stroke-width: 8; stroke-linecap: round; fill: none; stroke-dasharray: 100; stroke-dashoffset: calc(100 - clamp(0, calc((var(--p) - 0.5) * 8), 1) * 100); }
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.5rem 0 0; padding: 0; }
.chips span { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0.3rem 1rem; border-radius: 999px; font: 600 0.9375rem/1.2 var(--font); }
.chip-a { background: #4a2a26; color: #ffd8cf; } .chip-b { background: #1d4a33; color: #c4f2d4; }
html[data-live] .chip-a { opacity: clamp(0, calc((var(--p) - 0.45) * 8), 1); }
html[data-live] .chip-b { opacity: clamp(0, calc((var(--p) - 0.62) * 8), 1); }
.moon { fill: #f1dc9a; } .moon-bite { fill: #2a1760; }
.art-review .win { fill: #14102c; stroke: #6a43d4; }
.star { fill: #f1dc9a; transform-box: fill-box; transform-origin: center; }
html[data-live] .st1 { animation: twinkle 2.2s ease-in-out infinite alternate; } html[data-live] .st2 { animation: twinkle 3s ease-in-out infinite alternate-reverse; } html[data-live] .st3 { animation: twinkle 2.6s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: 0.35; scale: 0.8; } to { opacity: 1; scale: 1.1; } }
.lamp-arm { fill: none; stroke: #8f7bd0; stroke-width: 8; stroke-linecap: round; } .lamp-head { fill: #b9a2f2; }
.lamp-glow { fill: #f1dc9a; opacity: calc(0.1 + 0.16 * clamp(0, calc((var(--p) - 0.15) * 3), 1)); }
.desk { fill: #6a43d4; } .deskbook { fill: #d8bc69; }
.art-publishers .deskbook { fill: #f1dc9a; }
.fc { transform-box: fill-box; transform-origin: center; }
.fc-front { fill: #fffdf6; } .fc-ln { stroke: #c9bbf0; stroke-width: 4; stroke-linecap: round; fill: none; }
.fc-back { fill: #7b55e0; } .fc-tick { stroke: #fff; stroke-width: 4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fc0 { --t: 0.28; } .fc1 { --t: 0.42; } .fc2 { --t: 0.56; }
.fc { --f: clamp(0, calc((var(--p) - var(--t)) * 7), 1); }
.fc-fg { transform-box: fill-box; transform-origin: center; scale: clamp(0, calc(1 - 2 * var(--f)), 1) 1; }
.fc-back-g { transform-box: fill-box; transform-origin: center; scale: clamp(0, calc(2 * var(--f) - 1), 1) 1; }
.warm { fill: #f8d98a; opacity: 0.35; } .curtain { fill: #e8b9a0; } .frame { fill: #fffdf6; stroke: #b98f5c; stroke-width: 6; } .frame-dot { fill: #f1dc9a; } .frame-hill { fill: #b9a2f2; }
.rug { fill: #c9a878; }
.sunburst { fill: #f9edc0; }
.cf { fill: #5c33c7; opacity: 0.85; transform-box: fill-box; transform-origin: center; }
.cf1, .cf5, .cf9, .cf13 { fill: #3c1fb4; } .cf2, .cf6, .cf10, .cf14 { fill: #d1a73a; } .cf3, .cf7, .cf11, .cf15 { fill: #7b55e0; } .cf4, .cf8, .cf12 { fill: #e07a5f; }
/* Where each piece of confetti lands. */
.cf0 { --tx: -170px; --ty: -110px; --r: 220deg; } .cf1 { --tx: 150px; --ty: -150px; --r: -180deg; } .cf2 { --tx: -90px; --ty: -170px; --r: 140deg; } .cf3 { --tx: 210px; --ty: -40px; --r: 300deg; }
.cf4 { --tx: -220px; --ty: 10px; --r: -240deg; } .cf5 { --tx: 60px; --ty: -190px; --r: 200deg; } .cf6 { --tx: -30px; --ty: 70px; --r: -120deg; } .cf7 { --tx: 190px; --ty: 90px; --r: 260deg; }
.cf8 { --tx: -160px; --ty: 120px; --r: 180deg; } .cf9 { --tx: 100px; --ty: 130px; --r: -300deg; } .cf10 { --tx: -60px; --ty: -90px; --r: 100deg; } .cf11 { --tx: 240px; --ty: -100px; --r: -150deg; }
.cf12 { --tx: -250px; --ty: -60px; --r: 320deg; } .cf13 { --tx: 20px; --ty: 160px; --r: -200deg; } .cf14 { --tx: 130px; --ty: -70px; --r: 120deg; } .cf15 { --tx: -120px; --ty: 40px; --r: -80deg; }
.cf { translate: var(--tx, 0) var(--ty, 0); rotate: var(--r, 0deg); }
html[data-live] .close .cf { translate: 0 0; opacity: 0; }
html[data-live] .close[data-burst] .cf { animation: burst 3.2s cubic-bezier(0.15, 0.8, 0.3, 1) both; }
@keyframes burst { 0% { translate: 0 0; rotate: 0deg; opacity: 0; scale: 0.4; } 12% { opacity: 1; } 62% { translate: var(--tx) var(--ty); rotate: var(--r); opacity: 1; scale: 1; } 100% { translate: var(--tx) calc(var(--ty) + 90px); rotate: calc(var(--r) * 1.4); opacity: 0; } }
.on-violet .art-publishers .win { fill: #6a43d4; stroke: #8f7bd0; }
.art-publishers .shelf-board { fill: #8f7bd0; }
.art-publishers .spine, .art-publishers .sp1, .art-publishers .sp2, .art-publishers .sp3, .art-publishers .sp4, .art-publishers .sp5, .art-publishers .sp6 { fill: #eae0ff; }
.art-publishers .sp2, .art-publishers .sp5 { fill: #f1dc9a; } .art-publishers .sp3 { fill: #b9a2f2; }

/* Perches: where the ibis lands in each scene (anchor = its feet). */
.spot { position: absolute; width: 0; height: 0; pointer-events: none; }
/* With no script, or under reduced motion, the ibis simply stands on its perch. */
.spot-ibis { position: absolute; left: clamp(-2.6rem, -3.4vw, -2rem); bottom: -3px; display: block; width: clamp(4rem, 6vw, 5.2rem); height: auto; transform: none !important; overflow: visible; }
@media (max-width: 56rem) { .guide { width: clamp(3.8rem, 13vw, 4.6rem); } }
.spot-floor-library, .spot-floor-pencil, .spot-floor-review { inset-inline-start: 47%; top: 87%; }
.spot-floor-studyhelp { inset-inline-start: 41%; top: 87%; }
.spot-floor-offline { inset-inline-start: 74%; top: 87%; }
.spot-floor-safe { inset-inline-start: 82%; top: 87%; }
.spot-floor-publishers { inset-inline-start: 47%; top: 87%; }
.spot-floor-close { left: 14%; top: 87%; }
.spot-floor-hero { left: 22%; top: 98%; }
.spot-library { inset-inline-start: 28.6%; top: 21.7%; }
.spot-pencil { inset-inline-start: 89.3%; top: 20.9%; }
.spot-studyhelp { inset-inline-start: 89.3%; top: 17.4%; }
.spot-offline { inset-inline-start: 83.9%; top: 16.5%; }
.spot-review { inset-inline-start: 83.9%; top: 14.3%; }
.spot-safe { inset-inline-start: 89.3%; top: 57%; }
.spot-publishers { inset-inline-start: 41%; top: 32.6%; }
.spot-close { left: 61%; top: 43%; }
.spot-hero { left: 50%; top: 22%; }

/* Hanin has a little life: breathing, and arms that match the scene. */
html[data-live] .hanin svg { transform-origin: 50% 100%; animation: breathe 4.8s ease-in-out infinite alternate; }
html[data-live] .nadia svg { transform-origin: 50% 100%; animation: breathe 5.6s ease-in-out infinite alternate; }
@keyframes breathe { from { transform: scale(1, 1) rotate(-0.5deg); } to { transform: scale(1.006, 1.016) rotate(0.6deg); } }
.sa-pen, .sa-raise, .sa-cl, .sa-cr { transform-box: fill-box; }
.sa-pen { transform-origin: 0 0; } .sa-raise { transform-origin: 0 90%; } .sa-cl { transform-origin: 100% 100%; } .sa-cr { transform-origin: 0 100%; }
html[data-live] .sa-pen { animation: scribble 0.5s ease-in-out infinite alternate; }
html[data-live] .sa-raise { animation: wave 1.1s ease-in-out infinite alternate; }
html[data-live] .sa-cl { animation: cheerl 0.7s ease-in-out infinite alternate; } html[data-live] .sa-cr { animation: cheerr 0.7s ease-in-out infinite alternate; }
.sa-page { fill: #fffdf6; transform-box: fill-box; transform-origin: 0 50%; }
html[data-live] .sa-page { animation: turn 3.4s ease-in-out infinite; }
.sa-burst path { transform-box: fill-box; transform-origin: 50% 100%; }
html[data-live] .sa-burst { animation: pulse 0.9s ease-in-out infinite alternate; }
@keyframes scribble { from { transform: translate(-3px, 2px) rotate(-4deg); } to { transform: translate(4px, -1px) rotate(4deg); } }
@keyframes wave { from { transform: rotate(-10deg); } to { transform: rotate(8deg); } }
@keyframes cheerl { from { transform: rotate(-7deg); } to { transform: rotate(5deg); } }
@keyframes cheerr { from { transform: rotate(7deg); } to { transform: rotate(-5deg); } }
@keyframes turn { 0%, 55% { transform: scaleX(1); } 80%, 100% { transform: scaleX(0); } }
@keyframes pulse { from { opacity: 0.4; } to { opacity: 1; } }
@keyframes sway { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }


/* Safe scene: two plain statements, no icons. */
.plain { margin: 1.75rem 0 0; max-width: 32rem; border-top: 1px solid color-mix(in srgb, var(--fg) 22%, transparent); }
.plain div { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; padding: 1rem 0; border-bottom: 1px solid color-mix(in srgb, var(--fg) 22%, transparent); }
.plain dt { min-width: 6rem; font-weight: 600; color: var(--brand-ink); }
.plain dd { margin: 0; color: var(--fg); }

/* Publishers */
.price-card { margin-top: 1.75rem; max-width: 34rem; padding: clamp(1.25rem, 3vw, 2rem); border-radius: 14px; background: #2d1759; color: #fff; border: 1px solid rgba(255, 255, 255, 0.18); }
.facts { list-style: none; margin: 0; padding: 0; }
.fact { margin: 0; padding: 0.7rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.18); font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-weight: 600; line-height: 1.35; }
.fact:first-child { padding-top: 0; }
.apple { margin: 1rem 0 0; color: #ece6ff; line-height: 1.7; }
.plainlist { margin: 0.75rem 0 0; padding-inline-start: 1.1rem; color: #ece6ff; }
.price-card .actions { margin-top: 1.25rem; }
.mini { margin: 2rem 0 0 !important; font-size: 1.1rem !important; line-height: 1.3 !important; color: #f1dc9a; }
.page-hero .scene-visual { align-self: center; }

/* Steps (readers, publishers) */
.steps h2 { max-width: 20ch; }
.step-list { list-style: none; margin: 2.5rem 0 0; padding: 0; border-top: 1px solid var(--gutter); }
.step-list li { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 1rem; margin: 0; padding: 1.5rem 0; border-bottom: 1px solid var(--gutter); }
.num { color: #7b6535; font: 600 1.5rem/1.2 var(--font); font-variant-numeric: tabular-nums; }
.step-list h3 { margin: 0 0 0.4rem; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.3; }
.step-list p { margin: 0; max-width: 46rem; color: #4b4d56; }
.truth { margin: 2rem 0 0; max-width: 46rem; padding-inline-start: 1rem; border-inline-start: 3px solid var(--gold-l); color: #4b4d56; }

/* Close */
.close .scene-grid { min-height: 60svh; }
.close h2 { font-size: clamp(2.6rem, 6vw, 5rem); }

/* Footer */
.tale > footer { margin: 0; padding: 2rem max(1.25rem, calc((100vw - 78rem) / 2)); border: 0; background: var(--night); color: #d3cae6; }
.tale > footer a { color: #f1e8f6; }

/* Small screens */
@media (max-width: 56rem) {
  .scene-visual { max-width: 30rem; }
  .guide { width: 3.25rem; }
  .step-list li { grid-template-columns: 2.75rem minmax(0, 1fr); }
}

/* Forced colours: keep shapes legible and controls bordered. */
@media (forced-colors: active) {
  .tale .button, .clip-toggle, .chip { border: 1px solid ButtonText; }
  .bezel { border: 2px solid CanvasText; }
  .guide { display: none; }
}

/* Reduced motion: everything is visible and still. The ibis sits beside each
   heading (the static one), the fixed guide is gone, and the hero shows the
   result (one device) with the old stack beside it. */
@media (prefers-reduced-motion: reduce) {
  .guide { display: none; }
}


/* Support: a calm FAQ in the same type and colours. */
.support-top { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: end; }
.support-visual { position: relative; width: 100%; max-width: 18rem; aspect-ratio: 4 / 5; margin-inline: auto; }
.support-hanin { inset-inline-start: 10%; bottom: 0; width: 78%; }
.spot-support { inset-inline-start: 44%; top: 14%; }
.spot-floor-support { inset-inline-start: 6%; top: 98%; }
.stamp-line { margin: 1.5rem 0 0; color: var(--fg-soft); font: 500 0.875rem/1.5 var(--font); }
.faq-wrap { max-width: 52rem; }
.three { margin: 0 0 2.5rem; padding: 1.1rem 1.25rem; border-radius: 14px; background: var(--paper-raised); border: 1px solid var(--gutter); font-size: 1.0625rem; line-height: 1.75; }
.three strong { color: var(--brand-ink); }
.faq h2 { margin-bottom: 1.25rem; }
.faq-list { border-top: 1px solid var(--gutter); }
.faq-item { border-bottom: 1px solid var(--gutter); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; padding-block: 0.6rem; cursor: pointer; font: 600 clamp(1.05rem, 1.3vw + 0.7rem, 1.3rem)/1.4 var(--font); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; flex: none; width: 0.6rem; height: 0.6rem; margin-inline-end: 0.35rem; border-inline-end: 2.5px solid var(--brand-ink); border-block-end: 2.5px solid var(--brand-ink); transform: rotate(45deg); transition: transform 220ms var(--ease-out); }
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item summary:hover { color: var(--brand-ink); }
.faq-body { padding-block: 0 1.25rem; max-width: 44rem; color: #3d3f48; }
.faq-body p { margin: 0 0 0.8rem; }
.faq-body a { color: var(--brand-ink); }
@media (max-width: 40rem) { .support-top { grid-template-columns: minmax(0, 1fr); } .support-visual { max-width: 11rem; } }

/* Privacy: the policy in the story shell. Tables fold into cards on phones. */
.spot-legal { inset-inline-start: 104%; top: 58%; }
.spot-floor-legal { inset-inline-start: 98%; top: 100%; }
.glance { padding-block: clamp(2.5rem, 6vw, 4.5rem) 0; }
.glance-h { margin: 0 0 1.25rem; font-size: clamp(1.4rem, 2vw + 0.8rem, 2rem); }
.glance-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.glance-list li { padding: 1.25rem 1.35rem; border-radius: 16px; background: var(--paper-raised); border: 1px solid var(--gutter); }
.glance-list li:first-child { background: #f0e9ff; border-color: #ddd0fb; }
.glance-list h3 { margin: 0 0 0.45rem; color: var(--brand-ink); font-size: 1.125rem; }
.glance-list p { margin: 0; color: #3d3f48; line-height: 1.7; }
.policy { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(4rem, 9vw, 7rem); }
.policy-grid { display: grid; grid-template-columns: 15rem minmax(0, 46rem); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.policy-toc { position: sticky; top: 5rem; display: flex; flex-direction: column; gap: 0.1rem; }
.policy-toc strong { margin-bottom: 0.5rem; color: var(--fg-soft); font: 600 0.8125rem/1.4 var(--font); }
.policy-toc a { display: flex; align-items: center; min-height: 2.5rem; padding-inline: 0.75rem; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.policy-toc a:hover { background: #f0e9ff; color: var(--brand-ink); }
.policy-first { padding-top: clamp(3rem, 7vw, 5rem); }
.policy-section { scroll-margin-top: 5.5rem; padding-block: 0 2.25rem; margin-block-end: 2.25rem; border-block-end: 1px solid var(--gutter); }
.policy-section:last-child { border: 0; margin: 0; }
.policy-section h2 { margin: 0 0 1rem; font-size: clamp(1.4rem, 1.6vw + 0.9rem, 1.9rem); }
.policy-body p, .policy-body li { color: #3d3f48; font-size: 1.0625rem; line-height: 1.8; }
.policy-body p { margin: 0 0 0.9rem; }
.policy-body a { color: var(--brand-ink); overflow-wrap: anywhere; }
.policy-body code { font-size: 0.9em; overflow-wrap: anywhere; }
.data-table { width: 100%; margin: 0 0 1rem; border-collapse: collapse; font-size: 1rem; }
.data-table thead th { padding: 0 0.75rem 0.6rem; color: var(--fg-soft); font: 600 0.8125rem/1.4 var(--font); text-align: start; border-block-end: 1px solid var(--gutter); }
.data-table tbody th, .data-table td { padding: 0.9rem 0.75rem; vertical-align: top; text-align: start; line-height: 1.7; border-block-end: 1px solid var(--gutter); }
.data-table tbody th { width: 40%; font: 600 1rem/1.6 var(--font); letter-spacing: normal; text-transform: none; color: var(--ink); }
.data-table td { color: #3d3f48; }
.note-card { margin: 0 0 1rem; padding: 1.25rem 1.35rem; border-radius: 16px; background: #f0e9ff; border: 1px solid #ddd0fb; }
.note-card p:last-child { margin-bottom: 0; }
.who-list { margin: 0 0 1rem; padding-inline-start: 1.2rem; }
.who-list li { margin-bottom: 0.6rem; }
@media (max-width: 60rem) {
  .glance-list { grid-template-columns: minmax(0, 1fr); }
  .policy-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .policy-toc { position: static; flex-direction: row; flex-wrap: nowrap; gap: 0.5rem; margin-inline: -1.25rem; padding: 0.25rem 1.25rem 0.75rem; overflow-x: auto; scrollbar-width: none; }
  .policy-toc::-webkit-scrollbar { display: none; }
  .policy-toc strong { display: none; }
  .policy-toc a { flex: none; min-height: 2.75rem; padding-inline: 1rem; border: 1px solid var(--gutter); border-radius: 999px; background: var(--paper-raised); white-space: nowrap; }
}
@media (max-width: 40rem) {
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table, .data-table tbody, .data-table tr, .data-table tbody th, .data-table td { display: block; width: auto; }
  .data-table tr { margin: 0 0 0.75rem; padding: 1rem 1.1rem; border-radius: 14px; background: var(--paper-raised); border: 1px solid var(--gutter); }
  .data-table tbody th, .data-table td { padding: 0; border: 0; }
  .data-table tbody th { margin-bottom: 0.4rem; color: var(--brand-ink); }
  .policy-body p, .policy-body li { font-size: 1rem; }
  .legal-tale .support-visual { max-width: 9rem; margin-top: 2.5rem; }
}

/* Publishers: how the books are protected. */
.protect .lede { max-width: 40rem; }
.protect .plain { max-width: 40rem; }
.protect .plain dt { min-width: 9rem; }
