:root {
  --night: #0b0e17;
  --night-soft: #121827;
  --ink: #12151d;
  --ink-soft: #5e6676;
  --paper: #f5f5f2;
  --paper-warm: #f0ede5;
  --surface: #fff;
  --line: rgba(18, 21, 29, .14);
  --line-night: rgba(238, 242, 255, .14);
  --accent: #6671ff;
  --accent-bright: #8d94ff;
  --accent-fog: #d9dcff;
  --amber: #f4bd62;
  --serif: "EB Garamond", Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --content: min(1160px, calc(100vw - 48px));
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--night); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--serif); overflow-x: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: fixed; z-index: 999; left: 1rem; top: 1rem; padding: .7rem 1rem; background: white; color: #111; transform: translateY(-160%); border-radius: .5rem; font: 600 .8rem var(--sans); }
.skip:focus { transform: none; }
:where(a, button, summary):focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 4px; border-radius: 3px; }

.topbar {
  position: fixed; z-index: 100; inset: 0 0 auto; height: 64px; display: grid;
  grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; padding: 0 max(24px, calc((100vw - 1160px) / 2));
  color: #eef1fb; transition: background .35s, color .35s, border-color .35s;
  border-bottom: 1px solid transparent;
}
.topbar.is-solid { color: var(--ink); background: rgba(245, 245, 242, .88); border-color: var(--line); backdrop-filter: blur(16px); }
.brand { display: inline-flex; justify-self: start; align-items: center; gap: .55rem; text-decoration: none; font: 500 1rem var(--sans); letter-spacing: .02em; }
.brand-mark, .footer svg { width: 17px; height: 22px; fill: none; stroke: currentColor; stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark .ruban, .footer .ruban, .machine-brand .ruban { fill: var(--accent); stroke: none; }
.site-nav { justify-self: center; display: flex; align-items: center; gap: 13px; color: currentColor; font: 500 .68rem var(--sans); letter-spacing: .04em; }
.site-nav a { color: currentColor; opacity: .68; text-decoration: none; transition: opacity .2s; }
.site-nav a:hover { opacity: 1; }
.site-nav .language-current { color: currentColor; opacity: 1; }
.nav-separator { width: 1px; height: 13px; margin: 0 3px; background: currentColor; opacity: .2; }
.account-link { justify-self: end; display: inline-flex; gap: .42rem; align-items: center; text-decoration: none; font: 500 .72rem var(--sans); white-space: nowrap; }
.account-link > span { opacity: .35; }
.account-link svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; transition: transform .2s; }
.account-link:hover svg { transform: translateX(3px); }
.mobile-menu { display: none; }

.hero { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; isolation: isolate; color: #f4f5fa; background: var(--night); }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 55% 0 0; background: linear-gradient(transparent, rgba(4, 6, 12, .65)); pointer-events: none; }
.hero-sky { position: absolute; z-index: -2; inset: 0; overflow: hidden; perspective: 800px; }
.aurora { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .43; will-change: transform; }
.aurora-a { width: 50vw; height: 40vw; left: -12vw; top: 12vh; background: radial-gradient(circle, #5968e8, transparent 68%); animation: breatheA 11s ease-in-out infinite; }
.aurora-b { width: 42vw; height: 42vw; right: -8vw; bottom: -8vw; background: radial-gradient(circle, #1b765f, transparent 70%); opacity: .22; animation: breatheB 14s ease-in-out infinite; }
.stars { position: absolute; inset: 0; opacity: .35; background-image: radial-gradient(circle at 12% 20%, white 0 1px, transparent 1.4px), radial-gradient(circle at 66% 22%, white 0 .8px, transparent 1.2px), radial-gradient(circle at 82% 66%, white 0 .7px, transparent 1.1px), radial-gradient(circle at 35% 78%, white 0 .8px, transparent 1.2px), radial-gradient(circle at 52% 45%, white 0 .6px, transparent 1px); background-size: 260px 240px, 330px 300px, 290px 270px, 370px 340px, 230px 210px; animation: drift 45s linear infinite; }
.hero-thread { position: absolute; width: 110%; height: 88%; left: -5%; top: 8%; overflow: visible; filter: drop-shadow(0 0 14px rgba(128, 137, 255, .55)); }
.hero-thread path { fill: none; stroke-linecap: round; }
.thread-shadow { stroke: rgba(132, 142, 255, .1); stroke-width: 10; }
.thread-line { stroke: url(#none); stroke: var(--accent-bright); stroke-width: 1.8; stroke-dasharray: 1; stroke-dashoffset: 1; animation: drawThread 4.2s var(--ease) .25s forwards; }

.hero-copy { width: min(760px, calc(100vw - 42px)); text-align: center; padding: 90px 0 120px; }
.eyebrow { margin: 0 0 1.2rem; color: var(--accent); font: 650 .7rem var(--sans); letter-spacing: .17em; text-transform: uppercase; }
.hero-eyebrow { color: var(--accent-fog); animation: riseIn .8s var(--ease) .15s both; }
.hero h1 { margin: 0; font-size: clamp(5rem, 11vw, 9.5rem); line-height: .72; font-weight: 400; letter-spacing: -.045em; }
.hero-title-line { display: inline-block; opacity: 0; filter: blur(18px); transform: translateY(6px); }
.hero-title-first { animation: dryInk 1.7s var(--ease) .35s forwards; }
.hero-title-second { animation: dryInk 1.7s var(--ease) .68s forwards; }
.hero h1 em { display: inline-block; color: #e9eaff; font-weight: 400; padding-left: .34em; text-shadow: 0 0 80px rgba(114, 124, 255, .36); }
.hero-lede { max-width: 610px; margin: 3rem auto 0; color: rgba(238, 241, 250, .76); font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.55; animation: riseIn 1.1s var(--ease) 1.05s both; }
.hero-actions { display: flex; justify-content: center; align-items: center; gap: 1.7rem; margin-top: 2.2rem; animation: riseIn 1.1s var(--ease) 1.05s both; }
.beta-note { max-width: 480px; margin: 1.3rem auto 0; color: rgba(240,243,250,.55); font: 500 .72rem/1.6 var(--sans); animation: riseIn 1.1s var(--ease) 1.05s both; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .85rem; min-height: 48px; border: 0; border-radius: 12px; padding: .8rem 1.25rem; text-decoration: none; cursor: pointer; font: 600 .88rem var(--sans); transition: transform .2s, box-shadow .25s, background .25s; }
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.button-primary { color: #fff; background: var(--accent); box-shadow: 0 18px 50px -22px rgba(102, 113, 255, .9); }
.button-primary:hover { transform: translateY(-2px); background: #7781ff; box-shadow: 0 24px 56px -22px rgba(102, 113, 255, 1); }
.text-link { display: inline-flex; gap: .6rem; align-items: center; color: rgba(244, 246, 253, .75); text-decoration: none; font: 500 .84rem var(--sans); }
.text-link svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.text-link:hover { color: #fff; }
.scroll-cue { position: absolute; left: 50%; bottom: 24px; display: flex; flex-direction: column; align-items: center; gap: .6rem; color: rgba(245, 247, 255, .43); text-decoration: none; transform: translateX(-50%); font: 600 .58rem var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.scroll-cue::before { content: ""; position: absolute; left: 50%; top: -17px; width: 36px; height: 36px; border: 1px solid rgba(151,160,255,.4); border-radius: 50%; opacity: 0; transform: translate(-50%,-50%) scale(.2); animation: cueArrival 2.8s ease-out 4.6s infinite; }
.scroll-cue i { width: 1px; height: 30px; background: linear-gradient(var(--accent-bright), transparent); animation: cue 2s ease-in-out infinite; }

.paper-scene { background: var(--paper); }
.workshop { padding: clamp(100px, 12vw, 170px) 0; }
.section-intro { width: min(680px, var(--content)); margin: 0 auto clamp(50px, 7vw, 82px); text-align: center; }
.section-intro h2, .memory-copy h2, .life-copy h2, .final-copy h2 { margin: 0; font-weight: 400; font-size: clamp(2.8rem, 5.6vw, 5rem); line-height: .98; letter-spacing: -.035em; }
.section-intro > p:last-child { max-width: 540px; margin: 1.25rem auto 0; color: var(--ink-soft); font-size: 1.15rem; line-height: 1.55; }
.workshop-shell { width: var(--content); margin: auto; display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 28px; align-items: start; }
.workshop-controls { display: grid; gap: 22px; }
.choice-group { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.choice-group legend { width: 100%; margin: 0 0 10px; color: var(--ink-soft); font: 650 .72rem var(--sans); text-transform: uppercase; letter-spacing: .1em; }
.choice-group legend span { display: inline-grid; place-items: center; width: 23px; height: 23px; margin-right: .55rem; border-radius: 50%; color: #fff; background: var(--ink); font-size: .62rem; }
.choice-group button { position: relative; width: 100%; padding: 14px 15px 14px 17px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: rgba(255,255,255,.65); text-align: left; cursor: pointer; transition: border-color .22s, background .22s, transform .22s, box-shadow .22s; }
.choice-group button::before { content: ""; position: absolute; left: -1px; top: 16px; bottom: 16px; width: 2px; border-radius: 2px; background: var(--accent); transform: scaleY(0); transition: transform .25s var(--ease); }
.choice-group button:hover { transform: translateX(3px); border-color: rgba(102,113,255,.35); }
.choice-group button.is-active { border-color: rgba(102,113,255,.58); background: #fff; box-shadow: 0 14px 35px -28px rgba(20,25,45,.8); }
.choice-group button.is-active::before { transform: scaleY(1); }
.choice-group b { display: block; font: 600 .84rem var(--sans); }
.choice-group small { display: block; margin-top: .24rem; color: var(--ink-soft); font: 400 .72rem var(--sans); }

.story-machine { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.8); box-shadow: 0 30px 80px -48px rgba(15,20,35,.55); }
.machine-bar { height: 48px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--ink-soft); font: 500 .69rem var(--sans); }
.machine-brand { display: inline-flex; align-items: center; gap: .4rem; color: var(--ink); }
.machine-brand svg { width: 12px; height: 16px; fill: none; stroke: currentColor; stroke-width: 4.3; }
.status-dot { justify-self: end; width: 7px; height: 7px; border-radius: 50%; background: #74b890; box-shadow: 0 0 0 4px rgba(116,184,144,.12); }
.machine-body { position: relative; min-height: 580px; padding: clamp(28px, 4vw, 52px); background: radial-gradient(circle at 52% 27%, rgba(102,113,255,.11), transparent 38%), linear-gradient(#fbfbfa, #f4f4f0); }
.source-card { position: relative; z-index: 2; width: min(520px, 90%); margin: 0 auto; padding: 20px 22px; border: 1px solid rgba(102,113,255,.23); border-radius: 14px; background: rgba(255,255,255,.88); box-shadow: 0 18px 50px -35px rgba(42,51,145,.8); }
.source-kicker { margin: 0 0 .45rem; color: var(--accent); font: 650 .64rem var(--sans); text-transform: uppercase; letter-spacing: .12em; }
.source-text { min-height: 48px; margin: 0; font-size: 1.05rem; line-height: 1.45; }
.source-caret { display: inline-block; width: 1px; height: 1.1em; margin-left: 2px; background: var(--accent); animation: blink 1s steps(1) infinite; vertical-align: -.16em; }
.numa-working { position: relative; display: flex; width: min(570px, 95%); height: 86px; margin: 9px auto -6px; flex-direction: column; align-items: center; justify-content: center; color: var(--accent); transition: opacity .25s; }
.numa-working svg { width: 100%; height: 38px; overflow: visible; }
.numa-working path { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; filter: drop-shadow(0 0 7px rgba(102,113,255,.42)); }
.numa-working span:last-child { position: relative; z-index: 2; font: 600 .64rem var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.working-glow { position: absolute; left: 50%; top: 35%; width: 170px; height: 80px; transform: translate(-50%,-50%); border-radius: 50%; background: rgba(102,113,255,.2); filter: blur(24px); animation: working 2.4s ease-in-out infinite; }
.story-machine.is-running .numa-working path { animation: redraw 1.05s var(--ease) both; }
.story-machine.is-running .story-result { opacity: .12; transform: translateY(7px); filter: blur(2px); }
.story-result { transition: opacity .45s, transform .45s var(--ease), filter .45s; }
.draft { position: relative; max-width: 620px; margin: auto; padding: 30px clamp(24px, 4vw, 42px); border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 20px 50px -40px rgba(20,25,40,.5); }
.draft::before, .draft::after { content: ""; position: absolute; z-index: -1; inset: 0; border: 1px solid var(--line); border-radius: inherit; background: white; }
.draft::before { transform: rotate(-.7deg) translateY(5px); }
.draft::after { transform: rotate(.55deg) translateY(9px); }
.draft-meta { margin: 0 0 .65rem; color: var(--accent); font: 650 .65rem var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.draft h3 { margin: 0 0 .75rem; font-size: 1.65rem; font-weight: 400; }
.draft > p:nth-of-type(2) { margin: 0; font-size: 1.03rem; line-height: 1.55; }
.draft-note { margin: 1.15rem 0 0; padding-top: .8rem; border-top: 1px solid var(--line); color: var(--ink-soft); font: 500 .69rem var(--sans); }
.replay { display: block; margin: 0 auto 19px; padding: .55rem .8rem; border: 0; color: var(--ink-soft); background: transparent; cursor: pointer; font: 500 .7rem var(--sans); }
.replay span { display: inline-block; margin-right: .3rem; transition: transform .35s; }
.replay:hover span { transform: rotate(-180deg); }

.memory-scene { position: relative; min-height: 900px; display: grid; grid-template-columns: minmax(0, .85fr) minmax(520px, 1.15fr); gap: clamp(40px, 7vw, 100px); align-items: center; padding: 120px max(24px, calc((100vw - 1160px) / 2)); overflow: hidden; color: #edf0f8; background: #0d111b; isolation: isolate; }
.memory-scene::before { content: ""; position: absolute; z-index: -2; inset: 0; opacity: .17; background: radial-gradient(circle at 80% 20%, #5968e8, transparent 32%), linear-gradient(115deg, transparent 0 52%, rgba(255,255,255,.04) 52% 52.1%, transparent 52.1%); }
.memory-aura { position: absolute; z-index: -1; right: 18%; top: 50%; width: 420px; height: 420px; border-radius: 50%; transform: translate(50%,-50%); background: radial-gradient(circle, rgba(102,113,255,.42), rgba(102,113,255,.08) 38%, transparent 70%); filter: blur(25px); animation: working 5s ease-in-out infinite; }
.memory-copy h2 { max-width: 570px; }
.memory-copy > p:nth-of-type(2) { max-width: 480px; color: rgba(236,240,250,.65); font-size: 1.15rem; line-height: 1.6; }
.button-light { margin-top: 1rem; color: var(--ink); background: #f1f3fa; }
.button-light:hover { transform: translateY(-2px); background: #fff; }
.memory-confirm { max-height: 0; margin: 1.1rem 0 0; color: var(--accent-bright); opacity: 0; overflow: hidden; font: 600 .73rem var(--sans); transition: max-height .4s, opacity .4s; }
.memory-scene.is-corrected .memory-confirm { max-height: 40px; opacity: 1; }
.memory-proof { position: relative; min-height: 630px; }
.notebook { position: absolute; z-index: 2; left: 0; top: 0; width: min(470px, 80%); padding: 18px; border: 1px solid var(--line-night); border-radius: 19px; background: rgba(244,246,252,.075); backdrop-filter: blur(18px); box-shadow: 0 40px 90px -50px #000; }
.notebook-top { display: flex; justify-content: space-between; padding: 2px 4px 16px; color: rgba(240,243,251,.65); font: 500 .69rem var(--sans); }
.notebook-top small { font-size: .62rem; }
.note-card { border: 1px solid rgba(255,255,255,.11); border-radius: 13px; background: rgba(247,248,252,.94); color: var(--ink); }
.note-main { padding: 21px 22px; }
.note-kind, .note-source { color: var(--accent); font: 650 .59rem var(--sans); text-transform: uppercase; letter-spacing: .1em; }
.note-main h3 { margin: .5rem 0 .55rem; font-size: 1.35rem; font-weight: 400; }
.note-main > p:nth-of-type(2) { margin: 0 0 1rem; color: #444b58; line-height: 1.45; }
mark { padding: 0 .12em; color: inherit; background: linear-gradient(transparent 60%, rgba(102,113,255,.22) 60%); transition: color .25s, background .25s; }
.memory-scene.is-corrected mark { color: #795116; background: linear-gradient(transparent 60%, rgba(244,189,98,.38) 60%); animation: corrected .65s var(--ease); }
.note-small { display: flex; justify-content: space-between; gap: 1rem; margin-top: 8px; padding: 14px 16px; font-family: var(--sans); }
.note-small span { color: var(--ink-soft); font-size: .63rem; text-transform: uppercase; letter-spacing: .08em; }
.note-small b { font-size: .73rem; }
.later-page { position: absolute; right: 0; bottom: 0; width: min(440px, 78%); padding: 42px 36px 34px; border-radius: 17px; background: #f9f8f3; color: var(--ink); transform: rotate(2.5deg); box-shadow: 0 32px 90px -45px #000; }
.later-page > p { margin: 0; color: var(--ink-soft); font: 600 .61rem var(--sans); text-transform: uppercase; letter-spacing: .1em; }
.later-page h3 { margin: .6rem 0 1.5rem; font-size: 1.8rem; font-weight: 400; }
.later-page blockquote { margin: 0; font-size: 1.12rem; line-height: 1.65; }
.proof-link { display: block; margin-top: 1.5rem; padding-top: .75rem; border-top: 1px solid var(--line); color: var(--accent); font: 600 .63rem var(--sans); }

.reading-scene { padding: clamp(100px, 11vw, 160px) 0 130px; background: var(--paper-warm); overflow: hidden; }
.reading-intro { width: min(900px, var(--content)); }
.reading-stage { width: var(--content); margin: auto; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(35px, 6vw, 72px); align-items: center; }
.book-wrap { position: relative; min-height: 690px; display: grid; place-items: center; perspective: 1200px; }
.book-shadow { position: absolute; width: 75%; height: 12%; left: 13%; bottom: 4%; border-radius: 50%; background: rgba(30,34,45,.22); filter: blur(28px); }
.book-page { position: relative; width: min(590px, 92%); min-height: 640px; overflow: hidden; border: 1px solid rgba(25,28,35,.12); border-radius: 5px 16px 16px 5px; background: #fdfcf8; box-shadow: -8px 8px 0 #e6e3da, -15px 15px 0 #d9d6ce, 0 35px 80px -45px rgba(20,24,34,.7); transform: rotateY(-3deg) rotateZ(-.6deg); transition: transform .7s var(--ease), box-shadow .7s; }
.book-page::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 18px; background: linear-gradient(90deg, rgba(30,35,45,.13), transparent); pointer-events: none; }
.chapter-art { position: relative; height: 330px; overflow: hidden; transition: height .65s var(--ease), opacity .45s; }
.chapter-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; transform: scale(1.02); transition: transform 5s ease-out, filter .45s; }
.chapter-art::after { content: ""; position: absolute; inset: auto 0 0; height: 25%; background: linear-gradient(transparent, #fdfcf8); }
.chapter-art span { position: absolute; z-index: 2; right: 16px; bottom: 12px; color: rgba(255,255,255,.75); font: 600 .57rem var(--sans); text-transform: uppercase; letter-spacing: .12em; }
.page-copy { padding: 22px 40px 28px; transition: opacity .4s, transform .5s var(--ease); }
.page-meta { margin: 0; color: var(--accent); font: 650 .61rem var(--sans); text-transform: uppercase; letter-spacing: .12em; }
.page-copy h3 { margin: .45rem 0 1rem; font-size: 2rem; font-weight: 400; }
.page-copy > p:nth-of-type(2) { margin: 0; font-size: 1.12rem; line-height: 1.65; }
.spoken { transition: color .25s, background .25s; }
.page-number { margin: 1.4rem 0 0; padding-top: .7rem; border-top: 1px solid var(--line); color: var(--ink-soft); text-align: center; font: 500 .65rem var(--sans); }
.export-layer { position: absolute; z-index: 3; inset: 0; display: grid; place-items: center; align-content: center; gap: 1.3rem; color: white; background: rgba(11,14,23,.93); opacity: 0; pointer-events: none; transform: scale(.98); transition: opacity .45s, transform .6s var(--ease); }
.mini-cover { width: 190px; aspect-ratio: 2 / 3; display: flex; flex-direction: column; justify-content: space-between; padding: 25px 22px; border: 1px solid rgba(255,255,255,.3); border-radius: 3px 11px 11px 3px; background: linear-gradient(rgba(12,16,28,.25), rgba(12,16,28,.72)), url("/public-assets/la-gardienne.webp") center/cover; box-shadow: -5px 6px 0 #202638, 0 28px 50px -25px #000; font-size: 1.55rem; }
.mini-cover small { color: rgba(255,255,255,.65); font: 500 .58rem var(--sans); text-transform: uppercase; letter-spacing: .15em; }
.export-layer > p { margin: 0; font-size: 1.45rem; }
.export-layer > div:last-child { display: flex; gap: .45rem; }
.export-layer i { padding: .4rem .7rem; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; font: normal 600 .58rem var(--sans); }
.reading-controls { display: grid; gap: 12px; }
.reading-controls button { position: relative; padding: 20px 18px 20px 54px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: rgba(255,255,255,.38); text-align: left; cursor: pointer; transition: transform .25s, border-color .25s, background .25s; }
.reading-controls button:hover { transform: translateX(-4px); border-color: rgba(102,113,255,.35); }
.reading-controls button.is-active { border-color: var(--accent); background: #fff; box-shadow: 0 18px 45px -35px rgba(30,35,50,.7); }
.reading-controls span { position: absolute; left: 18px; top: 21px; color: var(--accent); font: 600 .62rem var(--sans); }
.reading-controls b { display: block; font: 600 .84rem var(--sans); }
.reading-controls small { display: block; margin-top: .35rem; color: var(--ink-soft); font: 400 .7rem var(--sans); }
.reading-stage[data-reading="voice"] .chapter-art { height: 150px; opacity: .68; }
.reading-stage[data-reading="voice"] .chapter-art img { filter: grayscale(.45); }
.reading-stage[data-reading="voice"] .spoken { border-radius: 2px; animation: speak 6s linear infinite; }
.reading-stage[data-reading="voice"] .spoken:nth-child(2) { animation-delay: 2s; }
.reading-stage[data-reading="voice"] .spoken:nth-child(3) { animation-delay: 4s; }
.reading-stage[data-reading="art"] .chapter-art img { transform: scale(1.08); }
.reading-stage[data-reading="export"] .export-layer { opacity: 1; transform: none; }
.reading-stage[data-reading="export"] .book-page { transform: rotateY(-8deg) rotateZ(-1deg) scale(.94); box-shadow: -11px 10px 0 #353b4d, -18px 18px 0 #252b3c, 0 45px 90px -45px #111; }

.life-scene { position: relative; padding: 140px max(24px, calc((100vw - 1160px) / 2)); overflow: hidden; color: #f2efe8; background: #121724; isolation: isolate; }
.life-scene::before { content: ""; position: absolute; z-index: -2; inset: 0; background: radial-gradient(circle at 18% 24%, rgba(184,118,73,.24), transparent 28%), radial-gradient(circle at 72% 55%, rgba(77,94,173,.2), transparent 35%), linear-gradient(145deg, #171724, #0c111c); }
.life-sky { position: absolute; z-index: -1; inset: 0; opacity: .38; }
.life-sky span { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: white; box-shadow: 90px 160px white, 260px 70px white, 480px 220px white, 700px 80px white, 920px 190px white, 1100px 60px white, 1250px 280px white; }
.life-sky span:nth-child(1) { left: 6%; top: 7%; }
.life-sky span:nth-child(2) { left: 18%; top: 40%; transform: scale(.7); }
.life-sky span:nth-child(3) { left: 2%; top: 73%; transform: scale(.45); }
.life-copy { max-width: 740px; }
.life-copy .eyebrow { color: var(--amber); }
.life-copy h2 em { color: #f0c980; font-weight: 400; }
.life-copy > p:last-child { max-width: 570px; color: rgba(240,240,244,.62); font-size: 1.15rem; line-height: 1.6; }
.life-ritual { margin-top: 85px; display: grid; grid-template-columns: minmax(300px, .8fr) 90px minmax(380px, 1fr); gap: 30px; align-items: center; }
.ritual-phone { padding: 24px; border: 1px solid rgba(255,255,255,.12); border-radius: 26px; background: rgba(255,255,255,.07); backdrop-filter: blur(14px); box-shadow: 0 38px 80px -50px #000; }
.ritual-head { display: flex; justify-content: space-between; margin-bottom: 24px; font: 500 .69rem var(--sans); }
.ritual-head small { color: rgba(255,255,255,.45); }
.question { position: relative; margin-top: 10px; padding: 17px 18px 17px 48px; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: rgba(5,7,13,.24); }
.question small { position: absolute; left: 18px; top: 19px; color: var(--amber); font: 600 .59rem var(--sans); }
.question p { margin: 0; font-size: 1rem; }
.question blockquote { margin: .55rem 0 0; color: rgba(255,255,255,.56); font-size: .9rem; font-style: italic; }
.question.is-filled { border-color: rgba(244,189,98,.23); }
.question.is-pending { min-height: 74px; }
.life-caret { display: inline-block; width: 1px; height: 1em; margin-top: .7rem; background: var(--amber); animation: blink 1s steps(1) infinite; }
.night-process { position: relative; height: 360px; display: grid; place-items: center; }
.night-process svg { position: absolute; left: 50%; top: 0; width: 90px; height: 100%; transform: translateX(-50%); }
.night-process path { fill: none; stroke: rgba(244,189,98,.65); stroke-width: 1.3; stroke-dasharray: 1; stroke-dashoffset: 1; }
.life-scene.is-visible .night-process path { animation: drawThread 2.4s var(--ease) .4s forwards; }
.night-process > span { position: absolute; width: 120px; left: 50%; bottom: -1.6rem; color: rgba(255,255,255,.43); transform: translateX(-50%); text-align: center; font: 500 .58rem var(--sans); text-transform: uppercase; letter-spacing: .12em; }
.moon { position: relative; z-index: 2; width: 27px; height: 27px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 30px rgba(244,189,98,.42); }
.moon i { position: absolute; width: 24px; height: 24px; left: 7px; top: -3px; border-radius: 50%; background: #151a28; }
.life-chapter { padding: clamp(32px, 5vw, 54px); color: var(--ink); background: #f6f2e9; box-shadow: 0 35px 90px -50px #000; transform: rotate(.5deg); }
.life-chapter > p { margin: 0; color: #8b7760; font: 600 .59rem var(--sans); text-transform: uppercase; letter-spacing: .11em; }
.life-chapter h3 { margin: .75rem 0 1.5rem; font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 400; }
.life-chapter blockquote { margin: 0; font-size: 1.15rem; line-height: 1.7; }
.life-chapter footer { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.7rem; padding-top: 1rem; border-top: 1px solid rgba(80,65,45,.15); }
.life-chapter footer span { padding: .35rem .55rem; border: 1px solid rgba(80,65,45,.15); border-radius: 999px; color: #796b5d; font: 500 .58rem var(--sans); }
.life-years { height: 250px; margin-top: 130px; display: flex; gap: 7px; align-items: end; padding-left: 28%; border-bottom: 1px solid rgba(255,255,255,.13); }
.life-years > span { position: relative; width: 45px; height: var(--h); border: 1px solid rgba(255,255,255,.14); border-bottom: 0; border-radius: 2px 5px 0 0; background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.025)); transform-origin: bottom; transform: scaleY(.05); transition: transform 1s var(--ease); }
.life-years > span:nth-child(2) { transition-delay: .1s; }.life-years > span:nth-child(3) { transition-delay: .2s; }.life-years > span:nth-child(4) { transition-delay: .3s; }.life-years > span:nth-child(5) { transition-delay: .4s; }
.life-scene.is-visible .life-years > span { transform: scaleY(1); }
.life-years span i { position: absolute; left: 50%; bottom: 13px; transform: translateX(-50%) rotate(-90deg); color: rgba(255,255,255,.5); font: normal 500 .57rem var(--sans); }
.life-years .year-now { border-color: rgba(244,189,98,.38); background: linear-gradient(90deg, rgba(244,189,98,.17), rgba(244,189,98,.04)); }
.life-years p { margin: 0 0 25px 32px; color: rgba(255,255,255,.75); font-size: 1.25rem; line-height: 1.45; }

.future-scene { padding: 140px 0 160px; background: #f5f5f2; }
.future-grid { width: var(--content); margin: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.future-card { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 25px 65px -50px rgba(25,30,45,.6); }
.future-visual { height: 330px; position: relative; overflow: hidden; background: #111622; }
.future-copy { padding: 28px 30px 32px; }
.future-copy small { color: var(--accent); font: 650 .61rem var(--sans); text-transform: uppercase; letter-spacing: .12em; }
.future-copy h3 { margin: .55rem 0 .6rem; font-size: 1.75rem; font-weight: 400; }
.future-copy p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.branches svg { position: absolute; inset: 24px; width: calc(100% - 48px); height: calc(100% - 48px); overflow: visible; }
.branches path { fill: none; stroke-linecap: round; }
.branch-main { stroke: rgba(231,235,249,.18); stroke-width: 2; }
.branch-accent { stroke: var(--accent-bright); stroke-width: 2.5; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 7px rgba(102,113,255,.7)); }
.future-card:hover .branch-accent { animation: drawThread 1.5s var(--ease) forwards; }
.branches circle { fill: #111622; stroke: rgba(231,235,249,.42); stroke-width: 2; }
.branches circle:first-of-type, .branches circle:nth-of-type(3), .branches circle:nth-of-type(5) { fill: var(--accent); stroke: var(--accent-bright); }
.branch-choice { position: absolute; padding: .45rem .7rem; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; color: rgba(255,255,255,.7); background: rgba(255,255,255,.05); font: 500 .63rem var(--sans); }
.choice-a { right: 8%; top: 16%; }.choice-b { right: 8%; bottom: 16%; }
.biface { display: flex; align-items: center; justify-content: center; perspective: 900px; background: radial-gradient(circle at 50% 45%, rgba(102,113,255,.2), transparent 45%), #111622; }
.face { position: relative; width: 36%; height: 72%; display: flex; flex-direction: column; justify-content: space-between; padding: 24px 20px; color: white; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); box-shadow: 0 25px 50px -30px #000; transition: transform .7s var(--ease); }
.face-a { transform: rotateY(14deg); transform-origin: right; background: linear-gradient(145deg, rgba(102,113,255,.18), rgba(255,255,255,.04)); }
.face-b { transform: rotateY(-14deg); transform-origin: left; background: linear-gradient(215deg, rgba(244,189,98,.13), rgba(255,255,255,.04)); }
.biface-card:hover .face-a { transform: rotateY(32deg) translateX(-6px); }.biface-card:hover .face-b { transform: rotateY(-32deg) translateX(6px); }
.face span { font-size: 1.3rem; }.face i { color: rgba(255,255,255,.55); font-size: .9rem; }
.spine { position: absolute; width: 1px; height: 72%; background: linear-gradient(transparent, rgba(255,255,255,.6), transparent); box-shadow: 0 0 20px var(--accent); }

.final-scene { position: relative; min-height: 850px; display: grid; grid-template-columns: .85fr 1fr; gap: clamp(45px, 9vw, 130px); align-items: center; padding: 120px max(24px, calc((100vw - 1050px) / 2)); overflow: hidden; color: #f4f5fa; background: #0a0d15; isolation: isolate; }
.final-glow { position: absolute; z-index: -1; left: 33%; top: 50%; width: 700px; height: 700px; border-radius: 50%; transform: translate(-50%,-50%); background: radial-gradient(circle, rgba(102,113,255,.32), rgba(102,113,255,.07) 40%, transparent 70%); filter: blur(20px); }
.final-book { position: relative; justify-self: end; width: min(350px, 80vw); aspect-ratio: 2 / 3; overflow: hidden; border: 1px solid rgba(255,255,255,.22); border-radius: 4px 15px 15px 4px; box-shadow: -10px 9px 0 #262c3f, -16px 15px 0 #171c2b, 0 50px 100px -45px #000; transform: rotate(-5deg); transition: transform .8s var(--ease); }
.final-scene.is-visible .final-book { transform: rotate(-2deg) translateY(-10px); }
.final-book::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,8,14,.15), rgba(5,8,14,.78)); }
.final-book img { width: 100%; height: 100%; object-fit: cover; }
.final-book div { position: absolute; z-index: 2; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 37px 30px; }
.final-book span { font-size: 2.2rem; }.final-book small { color: rgba(255,255,255,.6); font: 500 .61rem var(--sans); text-transform: uppercase; letter-spacing: .14em; }
.final-copy .eyebrow { color: var(--accent-bright); }
.final-copy h2 em { color: #cfd3ff; font-weight: 400; }
.button-large { margin-top: 2.3rem; min-height: 56px; padding: 1rem 1.5rem; font-size: .93rem; }
.final-copy > p:not(.eyebrow) { max-width: 440px; margin-top: 1rem; color: rgba(240,243,250,.48); font: 500 .68rem/1.6 var(--sans); }

.footer { position: relative; min-height: 310px; display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: clamp(35px, 6vw, 80px); align-items: start; padding: 68px max(24px, calc((100vw - 1160px) / 2)); color: rgba(244,246,252,.52); background: #070910; border-top: 1px solid rgba(255,255,255,.08); font: 500 .65rem var(--sans); }
.footer p { margin: 0; }
.footer-brand p { display: flex; align-items: center; gap: .55rem; color: rgba(244,246,252,.9); font-size: .92rem; }
.footer-brand svg { width: 15px; height: 20px; }
.footer-brand > span { display: block; margin-top: 1.2rem; color: rgba(244,246,252,.4); font: italic 1.05rem/1.45 var(--serif); }
.footer-group { display: flex; flex-direction: column; align-items: flex-start; gap: .72rem; }
.footer-group p { margin-bottom: .45rem; color: rgba(244,246,252,.85); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; }
.footer-group a { color: rgba(244,246,252,.52); text-decoration: none; transition: color .2s; }
.footer-group a:hover { color: #fff; }
.footer-group span[aria-current="page"] { color: rgba(244,246,252,.82); }
.footer-top { position: absolute; right: max(24px, calc((100vw - 1160px) / 2)); bottom: 35px; color: rgba(244,246,252,.4); text-decoration: none; }

.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease), transform 1.1s var(--ease); }
.js .reveal.is-visible, [data-state="frozen"] .reveal { opacity: 1; transform: none; }

@keyframes drawThread { to { stroke-dashoffset: 0; } }
@keyframes dryInk { 0% { filter: blur(18px); opacity: 0; transform: translateY(6px); } 60% { opacity: 1; } 100% { filter: blur(0); opacity: 1; transform: none; } }
@keyframes riseIn { from { transform: translateY(22px); } to { transform: none; } }
@keyframes breatheA { 0%,100% { transform: translate3d(0,0,0) scale(.94); } 50% { transform: translate3d(8vw,3vh,0) scale(1.1); } }
@keyframes breatheB { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(-5vw,-4vh,0) scale(1.12); } }
@keyframes drift { to { background-position: 260px 240px, -330px 300px, 290px -270px, -370px -340px, 230px 210px; } }
@keyframes cueArrival { 0% { opacity: .7; transform: translate(-50%,-50%) scale(.2); } 65%,100% { opacity: 0; transform: translate(-50%,-50%) scale(1.5); } }
@keyframes cue { 0%,100% { opacity: .3; transform: scaleY(.55); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes working { 0%,100% { transform: translate(-50%,-50%) scale(.8); opacity: .45; } 50% { transform: translate(-50%,-50%) scale(1.2); opacity: 1; } }
@keyframes redraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes corrected { 0% { filter: blur(3px); transform: translateY(-3px); } 100% { filter: none; transform: none; } }
@keyframes speak { 0%,30%,100% { color: inherit; background: transparent; } 5%,25% { color: #20265c; background: rgba(102,113,255,.2); } }

@media (max-width: 980px) {
  :root { --content: min(760px, calc(100vw - 40px)); }
  .workshop-shell { grid-template-columns: 1fr; }
  .workshop-controls { grid-template-columns: 1fr 1fr; }
  .machine-body { min-height: 560px; }
  .memory-scene { grid-template-columns: 1fr; padding-top: 110px; padding-bottom: 110px; }
  .memory-copy { max-width: 680px; }
  .memory-proof { width: min(680px, 100%); margin: auto; }
  .reading-stage { grid-template-columns: 1fr; }
  .reading-controls { grid-template-columns: repeat(3, 1fr); }
  .reading-controls button { padding: 42px 14px 16px; }
  .reading-controls span { left: 14px; top: 14px; }
  .life-ritual { grid-template-columns: 1fr; }
  .night-process { height: 150px; }
  .night-process svg { width: 220px; transform: translateX(-50%) rotate(-90deg); }
  .night-process > span { bottom: -1rem; }
  .life-years { padding-left: 8%; }
}

@media (max-width: 700px) {
  :root { --content: calc(100vw - 30px); }
  .topbar { height: 56px; grid-template-columns: 1fr 1fr; padding: 0 16px; }
  .site-nav, .account-link { display: none; }
  .mobile-menu { position: relative; display: block; justify-self: end; font: 600 .65rem var(--sans); }
  .mobile-menu summary { display: flex; align-items: center; gap: .45rem; padding: .45rem 0; cursor: pointer; list-style: none; text-transform: uppercase; letter-spacing: .1em; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .menu-icon { position: relative; width: 10px; height: 10px; transition: transform .2s; }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; top: 4px; width: 10px; height: 1px; background: var(--accent-bright); }
  .menu-icon::after { transform: rotate(90deg); }
  .mobile-menu[open] .menu-icon { transform: rotate(45deg); }
  .mobile-panel { position: fixed; z-index: 101; left: 12px; right: 12px; top: 62px; display: grid; gap: 0; padding: 8px 18px; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(10,13,22,.97); box-shadow: 0 25px 60px -35px #000; backdrop-filter: blur(18px); }
  .topbar.is-solid .mobile-panel { color: var(--ink); border-color: var(--line); background: rgba(250,250,247,.98); }
  .mobile-panel > a { display: flex; justify-content: space-between; padding: 15px 2px; border-bottom: 1px solid currentColor; color: inherit; text-decoration: none; opacity: .82; }
  .mobile-panel > a span { color: var(--accent); }
  .mobile-panel p { display: flex; gap: 8px; margin: 0; padding: 14px 0; }
  .mobile-panel p span, .mobile-panel p a { padding: .4rem .7rem; border: 1px solid currentColor; border-radius: 999px; color: inherit; text-decoration: none; }
  .mobile-panel p span { border-color: var(--accent); color: var(--accent-bright); }
  .hero-copy { padding-top: 95px; }
  .hero h1 { font-size: clamp(4.6rem, 24vw, 7rem); }
  .hero-lede { margin-top: 2.5rem; font-size: 1.05rem; }
  .hero-actions { flex-direction: column; gap: 1.1rem; }
  .workshop { padding: 95px 0; }
  .section-intro h2, .memory-copy h2, .life-copy h2, .final-copy h2 { font-size: clamp(2.65rem, 14vw, 4rem); }
  .workshop-controls { grid-template-columns: 1fr; }
  .machine-bar { grid-template-columns: 1fr auto; }
  .machine-bar > span:nth-child(2) { display: none; }
  .machine-body { min-height: 600px; padding: 24px 14px 35px; }
  .source-card { width: 96%; }
  .draft { padding: 25px 20px; }
  .memory-scene { display: block; min-height: 0; padding: 95px 15px 110px; }
  .memory-proof { min-height: 650px; margin-top: 55px; }
  .notebook { width: 92%; }
  .later-page { width: 87%; padding: 32px 25px; }
  .reading-scene { padding: 95px 0; }
  .book-wrap { min-height: 590px; }
  .book-page { width: 94%; min-height: 560px; }
  .chapter-art { height: 270px; }
  .page-copy { padding: 19px 25px 24px; }
  .page-copy > p:nth-of-type(2) { font-size: 1rem; }
  .reading-controls { grid-template-columns: 1fr; }
  .reading-controls button { padding: 17px 15px 17px 51px; }
  .reading-controls span { top: 19px; }
  .life-scene { padding: 95px 15px; }
  .life-ritual { margin-top: 55px; }
  .life-chapter { padding: 32px 25px; }
  .life-years { height: 200px; margin-top: 90px; padding-left: 0; }
  .life-years > span { width: 29px; }
  .life-years p { margin-left: 16px; margin-bottom: 18px; font-size: .9rem; }
  .future-scene { padding: 95px 0; }
  .future-grid { grid-template-columns: 1fr; }
  .future-visual { height: 270px; }
  .final-scene { min-height: 950px; grid-template-columns: 1fr; gap: 60px; padding: 100px 20px; text-align: center; }
  .final-book { justify-self: center; width: min(280px, 72vw); }
  .final-copy .eyebrow { text-align: center; }
  .final-copy > p:not(.eyebrow) { margin-left: auto; margin-right: auto; }
  .footer { min-height: 0; grid-template-columns: 1fr 1fr; gap: 42px 25px; padding: 55px 25px 100px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-group:first-of-type { grid-column: 1 / -1; }
  .footer-top { left: 25px; right: auto; bottom: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .thread-line, .branch-accent, .night-process path { stroke-dashoffset: 0; }
  .hero-title-line { opacity: 1; filter: none; transform: none; }
  .reveal { opacity: 1; transform: none; }
}

[data-state="frozen"] *, [data-state="frozen"] *::before, [data-state="frozen"] *::after { animation-delay: 0s !important; animation-duration: .01ms !important; }
[data-state="frozen"] .thread-line, [data-state="frozen"] .branch-accent, [data-state="frozen"] .night-process path { stroke-dashoffset: 0; }
[data-state="frozen"] .hero-title-line { opacity: 1; filter: none; transform: none; }

[data-scene] main > section { display: none !important; }
[data-scene="hero"] #hero { display: grid !important; }
[data-scene="atelier"] #atelier, [data-scene="lire"] #lire, [data-scene="demain"] #demain { display: block !important; min-height: 100vh; }
[data-scene="memoire"] #memoire, [data-scene="commencer"] #commencer { display: grid !important; min-height: 100vh; }
[data-scene="vie"] #vie { display: block !important; min-height: 100vh; }
[data-scene] .footer { display: none; }
