/* Aura introduction page — plain CSS, no build step.
   Every chapter is a full-width "scene", dark and light in turn. Some scenes are pinned while you scroll: js/main.js writes the scroll
   progress of a pinned scene into --p (0 → 1) and marks the current step, and the CSS below turns that into motion.

   FONTS: change the --f-* variables. "Aura Display" and "Aura Mono" are cut-down web fonts made by tools/make_fonts.py from fonts/fonts.json;
   Chinese headings and all body text use the reader's own system fonts. */
:root {
  --f-display: "Aura Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --f-body: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
  --f-mono: "Aura Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1120px;
  --hl: #ffd75e; --hl-ink: #1b1600;
}
/* one theme for the whole page: dark unless the reader picks light with the button in the top bar (saved as aura-theme) */
:root {
  --bg: #0a0a0c; --fg: #f5f5f7; --mut: #9c9ca5; --line: rgba(255, 255, 255, .12);
  --card: #151519; --card-2: #1d1d23; --acc: #ffb35c; --acc-2: #ff7a59; --g: #3fd6ae; --g-soft: rgba(63, 214, 174, .14);
  --nav-bg: rgba(10, 10, 12, .72); --nav-line: rgba(255, 255, 255, .06); --soft: rgba(255, 255, 255, .08); --soft-2: rgba(255, 255, 255, .15);
  --edge: rgba(255, 255, 255, .22); --hover: #2a2a31; --sh: rgba(0, 0, 0, .85);
  --plane: rgba(30, 30, 38, .72); --plane-core: rgba(20, 52, 46, .72); --plane-on: rgba(70, 46, 20, .78);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f5f7; --fg: #1d1d1f; --mut: #6e6e73; --line: rgba(0, 0, 0, .1);
  --card: #ffffff; --card-2: #e8e8ed; --acc: #d9770f; --acc-2: #e2512f; --g: #0d9b77; --g-soft: rgba(13, 155, 119, .1);
  --nav-bg: rgba(245, 245, 247, .76); --nav-line: rgba(0, 0, 0, .08); --soft: rgba(0, 0, 0, .05); --soft-2: rgba(0, 0, 0, .12);
  --edge: rgba(0, 0, 0, .16); --hover: #dcdce2; --sh: rgba(0, 0, 0, .22);
  --plane: rgba(255, 255, 255, .86); --plane-core: rgba(222, 246, 238, .9); --plane-on: rgba(255, 238, 218, .94);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); transition: background .4s, color .4s; font: 400 1.0625rem/1.65 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
code { font-family: var(--f-mono); font-size: .88em; padding: .1em .4em; border-radius: 5px; background: var(--card-2); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 8px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.scene { position: relative; background: var(--bg); color: var(--fg); }
/* chapters are told apart by a hairline only, so a new chapter never looks like the end of the page */
.scene + .scene::before { content: ""; position: absolute; z-index: 1; top: 0; left: 50%; width: min(var(--wrap), calc(100% - 44px)); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent); pointer-events: none; }
h1, h2, .big, .caps span, .stackcap span { font-family: var(--f-display); font-weight: 700; letter-spacing: -.035em; text-wrap: balance; }
html[data-lang="zh"] h1, html[data-lang="zh"] h2, html[data-lang="zh"] .big, html[data-lang="zh"] .caps span, html[data-lang="zh"] .stackcap span { letter-spacing: -.01em; }
p { text-wrap: pretty; }
.grad { background: linear-gradient(100deg, var(--acc) 15%, var(--acc-2) 85%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ───── reveal on scroll ───── */
.js .rv { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js .rv.in { opacity: 1; transform: none; }
/* time-based animations run only while their stage is on screen */
.js [data-stage]:not(.vis), .js [data-stage]:not(.vis) *, .js [data-stage]:not(.vis) *::before, .js [data-stage]:not(.vis) *::after { animation-play-state: paused !important; }

/* ───── nav ───── */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #ffb35c, #ff7a59); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(22px, calc((100vw - var(--wrap)) / 2 + 22px)); color: var(--fg); background: var(--nav-bg); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid var(--nav-line); transition: background .4s, color .4s; }
.brand { font-family: var(--f-display); font-weight: 650; font-size: 1.15rem; letter-spacing: -.02em; text-decoration: none; }
.navr { display: flex; align-items: center; gap: 10px; }
.themebtn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--soft); color: var(--mut); transition: background .25s, color .25s; }
.themebtn:hover { color: var(--fg); }
.themebtn svg { grid-area: 1 / 1; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease), opacity .3s; }
.themebtn .i-moon { fill: currentColor; stroke: none; }
:root[data-theme="light"] .themebtn .i-sun, :root:not([data-theme="light"]) .themebtn .i-moon { opacity: 0; transform: rotate(-90deg) scale(.5); }
html:not(.js) .themebtn { display: none; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--soft); }
.seg button { padding: 4px 13px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--mut); transition: background .25s, color .25s; }
.seg button:hover { color: var(--fg); }
html[data-lang="en"] .seg [data-set-lang="en"], html[data-lang="zh"] .seg [data-set-lang="zh"] { background: var(--fg); color: var(--bg); }

/* ───── pinned scenes ───── */
.pin { --p: 0; position: relative; }
.js .pin { height: var(--h); }
.js .pin-in { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: center; }
.nopin .pin { height: auto !important; }
.nopin .pin-in { position: relative; height: auto; padding: 3rem 0; }
.stackcap { display: grid; }
.stackcap > * { grid-area: 1 / 1; opacity: 0; transform: translateY(14px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.stackcap > .on { opacity: 1; transform: none; }
html:not(.js) .stackcap > *, .nopin .stackcap > * { grid-area: auto; opacity: 1; transform: none; margin-bottom: 1.2rem; }

/* ───── intro of a chapter ───── */
.intro { padding-top: clamp(6rem, 16vh, 10rem); padding-bottom: 1rem; text-align: center; }
.eyebrow { font-weight: 600; font-size: 1.1rem; color: var(--acc); letter-spacing: -.01em; }
.intro h2 { font-size: clamp(2.5rem, 6.6vw, 5.2rem); line-height: 1.04; max-width: 13em; margin: .35rem auto 0; }
.sub { color: var(--mut); font-size: clamp(1.1rem, 1.9vw, 1.45rem); font-weight: 500; line-height: 1.45; max-width: 30em; margin: 1.2rem auto 0; }

/* ───── under the hood (the spec list under a chapter) ───── */
.spec { padding-top: 2.5rem; padding-bottom: clamp(5rem, 12vh, 8rem); }
.spec-h { font: 600 .74rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mut); padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.spec dl div { display: grid; grid-template-columns: 15rem 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.spec dt { font-weight: 600; }
.spec dd { color: var(--mut); }

/* ───── hero ───── */
#hero .pin-in { justify-content: center; }
.hero-in { --q: clamp(0, (var(--p) - .22) / .42, 1); --fade: clamp(0, (var(--p) - .06) / .34, 1); }
.hero-title { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 52px 22px 0; opacity: calc(1 - var(--fade)); transform: translateY(calc(var(--p) * -10vh)) scale(calc(1 - var(--p) * .1)); }
.hero-title .eyebrow { font-size: 1.25rem; }
h1 { font-size: clamp(3.8rem, 14vw, 10.5rem); line-height: .96; letter-spacing: -.05em; margin: .2em 0 .25em; }
.hero-lead { color: var(--mut); font-size: clamp(1.1rem, 1.9vw, 1.4rem); font-weight: 500; line-height: 1.5; max-width: 32em; }
.hero-lead b { color: var(--fg); font-weight: 600; }
.cue { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 3rem; color: var(--mut); font-size: .85rem; text-decoration: none; }
.cue i { width: 1px; height: 38px; background: linear-gradient(var(--acc), transparent); transform-origin: 50% 0; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { opacity: 0; } }
.dcard { position: absolute; left: 50%; top: 50%; width: min(640px, calc(100vw - 32px)); padding: 22px 22px 16px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 40px 80px -40px var(--sh); opacity: var(--q); transform: translate(-50%, calc(-50% + (1 - var(--q)) * 55vh)) scale(calc(.94 + var(--q) * .06)); }
html:not(.js) .hero-title, .nopin .hero-title, html:not(.js) .dcard, .nopin .dcard { position: relative; inset: auto; left: auto; top: auto; opacity: 1; transform: none; margin: 0 auto; }
html:not(.js) #hero .pin-in, .nopin #hero .pin-in { flex-direction: column; gap: 2rem; padding: 5rem 16px 4rem; }
.dhead { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; font-size: .86rem; color: var(--mut); }
.dhead b { color: var(--fg); font-weight: 600; }
.dhead > span { display: inline-flex; gap: 7px; align-items: center; }
.dhead u { width: 12px; height: 12px; border-radius: 3px; background: var(--hl); }
.dscenes { display: grid; min-height: 236px; }
.dscene { --d: calc(var(--k) * 5s); grid-area: 1 / 1; opacity: 0; animation: dscene 15s linear var(--d) infinite; }
@keyframes dscene { 0% { opacity: 0; transform: translateY(10px); } 2.5% { opacity: 1; transform: none; } 30.5% { opacity: 1; transform: none; } 33.3% { opacity: 0; transform: translateY(-6px); } 100% { opacity: 0; } }
.ctx { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ctx small { font: 600 .7rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mut); }
.ctxchip { padding: .3em .9em; border-radius: 11px; background: var(--card-2); font-size: 1.05rem; }
.opts { display: grid; gap: 4px; }
.opt { display: grid; grid-template-columns: 9em 1fr 3em; align-items: center; gap: 14px; padding: 8px 12px; border-radius: 12px; color: var(--fg); }
.opt.pick { animation: pick 15s linear var(--d) infinite; }
@keyframes pick { 0%, 14% { background: transparent; color: var(--fg); } 16%, 31% { background: var(--hl); color: var(--hl-ink); } 33.4%, 100% { background: transparent; color: var(--fg); } }
.opt b { font-weight: 600; }
.opt em { font: 400 .78rem var(--f-mono); font-style: normal; text-align: right; opacity: .75; }
.bar { display: block; height: 8px; border-radius: 4px; background: var(--card-2); overflow: hidden; }
.bar s { display: block; height: 100%; border-radius: 4px; background: var(--g); transform-origin: 0 50%; transform: scaleX(0); animation: grow 15s ease-out var(--d) infinite; }
@keyframes grow { 0%, 3% { transform: scaleX(0); } 11%, 31% { transform: scaleX(var(--v)); } 33.4%, 100% { transform: scaleX(0); } }
.dnote { margin-top: 10px; font-size: .74rem; color: var(--mut); text-align: right; }

/* ───── 1 heartbeat ───── */
.heart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(32px, 7vw, 110px); align-items: center; }
.ring { --size: min(42vw, 62vh, 440px); position: relative; width: var(--size); height: var(--size); }
.ring::before { content: ""; position: absolute; inset: 28px; border-radius: 50%; border: 1.5px dashed var(--line); }
.node { position: absolute; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--line); font: 600 1rem var(--f-mono); transition: background .35s, border-color .35s, color .35s, transform .35s var(--ease); }
.node[data-at="0"] { left: calc(50% - 28px); top: 0; } .node[data-at="1"] { right: 0; top: calc(50% - 28px); }
.node[data-at="2"] { left: calc(50% - 28px); bottom: 0; } .node[data-at="3"] { left: 0; top: calc(50% - 28px); }
.node.past { border-color: var(--g); color: var(--g); }
.node.on { background: var(--hl); border-color: var(--hl); color: var(--hl-ink); transform: scale(1.15); }
.spoke { position: absolute; inset: 0; transform: rotate(calc(var(--p) * 360deg - 45deg)); }
.spoke i { position: absolute; left: calc(50% - 1px); top: 62px; width: 2px; height: calc(50% - 62px); background: linear-gradient(var(--g), transparent); }
.spoke i::before { content: ""; position: absolute; left: -4px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--g); box-shadow: 0 0 0 6px var(--g-soft); }
.core-dot, .beat { position: absolute; left: calc(50% - 50px); top: calc(50% - 50px); width: 100px; height: 100px; border-radius: 50%; }
.core-dot { display: grid; place-items: center; background: var(--g-soft); color: var(--g); font-family: var(--f-display); font-weight: 650; font-size: 1.3rem; letter-spacing: -.02em; }
.beat { border: 2px solid var(--g); opacity: 0; animation: beat 2s ease-out infinite; }
.beat.b2 { animation-delay: .3s; }
@keyframes beat { 0% { transform: scale(.8); opacity: .6; } 100% { transform: scale(2); opacity: 0; } }
.caps { display: grid; gap: clamp(14px, 3vh, 28px); }
.caps li { opacity: .22; transition: opacity .45s var(--ease), transform .45s var(--ease); }
.caps li.on { opacity: 1; transform: translateX(8px); }
.caps small { display: block; font: 600 .74rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--acc); }
.caps span { display: block; font-size: clamp(1.45rem, 2.8vw, 2.3rem); line-height: 1.15; }
html:not(.js) .caps li, .nopin .caps li { opacity: 1; transform: none; }

/* ───── 2 architecture: an exploded 3D stack ───── */
.arch { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(20px, 4vw, 64px); align-items: center; }
.acap .stackcap p small { display: block; font: 600 .74rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--acc); margin-bottom: .4rem; }
.acap .stackcap p span { display: block; font-size: clamp(1.5rem, 2.9vw, 2.4rem); line-height: 1.15; }
.adetail { min-height: 3.2em; margin-top: 1.4rem; color: var(--fg); font-size: 1.02rem; opacity: .9; }
.ahint { font: 500 .72rem var(--f-mono); letter-spacing: .08em; color: var(--mut); text-transform: uppercase; }
.view3d { height: min(72vh, 600px); display: grid; place-items: center; perspective: 1700px; }
.planes { --gap: calc(12px + var(--p) * 64px); position: relative; width: min(500px, 44vw); height: 210px; transform-style: preserve-3d; transform: translateY(calc(var(--p) * 90px)) rotateX(57deg) rotateZ(-34deg); }
.plane { --lift: 0px; position: absolute; left: 0; right: 0; top: 50%; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--edge); background: var(--plane); transform: translateY(-50%) translateZ(calc(var(--z) * var(--gap) + var(--lift))); transition: transform .5s var(--ease), border-color .4s, background .4s, box-shadow .4s, opacity .4s; box-shadow: 0 18px 30px -18px var(--sh); }
.plane.thin { padding: 10px 16px; }
.plane.core { border-color: color-mix(in srgb, var(--g) 50%, transparent); background: var(--plane-core); }
.plane.on { --lift: 26px; border-color: var(--acc); background: var(--plane-on); box-shadow: 0 0 0 1px var(--acc), 0 30px 60px -20px rgba(255, 140, 60, .45); }
.ptag { display: block; font: 600 .66rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mut); margin-bottom: 8px; }
.plane.on .ptag { color: var(--acc); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: .2em .8em; border-radius: 999px; border: 1px solid var(--edge); background: var(--soft); font-size: .82rem; transition: background .2s, border-color .2s, color .2s; }
.chip:hover, .chip.on { background: var(--hl); border-color: var(--hl); color: var(--hl-ink); }
.chips.five { display: grid; grid-template-columns: repeat(5, 1fr); }
.chips.five .chip { border-radius: 9px; padding: .45em .2em; text-align: center; }
.wire { display: block; height: 3px; border-radius: 2px; background: var(--soft-2); font-size: 0; }
.plane.thin .wire { margin-top: 4px; }
.wire.flow { background: linear-gradient(90deg, transparent, var(--acc), transparent) 0 0 / 40% 100% no-repeat, var(--soft-2); animation: wire 2.4s linear infinite; }
@keyframes wire { from { background-position: -40% 0, 0 0; } to { background-position: 140% 0, 0 0; } }
html:not(.js) .planes, .nopin .planes { --gap: 70px; }

/* ───── 3 one sentence, seven steps ───── */
.journey { position: relative; }
.track { display: flex; justify-content: space-between; position: relative; z-index: 1; }
.track li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--mut); transition: color .35s; }
.track i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--line); font: 600 .85rem var(--f-mono); font-style: normal; transition: background .35s, border-color .35s, color .35s, transform .35s var(--ease); }
.track li.past i { background: var(--g); border-color: var(--g); color: #fff; }
.track li.on { color: var(--fg); }
.track li.on i { background: var(--hl); border-color: var(--hl); color: var(--hl-ink); transform: scale(1.18); }
.track span { font-weight: 600; font-size: .95rem; }
.tline { position: absolute; top: 19px; left: calc(22px + (100% - 44px) / 14); right: calc(22px + (100% - 44px) / 14); height: 2px; background: var(--line); }
.tline b { position: absolute; inset: 0; background: var(--g); transform-origin: 0 50%; transform: scaleX(var(--p)); }
.tline u { position: absolute; top: -5px; left: calc(var(--p) * 100% - 6px); width: 12px; height: 12px; border-radius: 50%; background: var(--g); box-shadow: 0 0 0 6px var(--g-soft); }
.jcaps { margin-top: clamp(40px, 9vh, 90px); text-align: center; }
.jcaps .big { font-size: clamp(3.2rem, 9vw, 7rem); line-height: 1; }
.jcaps .small { color: var(--mut); font-size: clamp(1.1rem, 2vw, 1.45rem); font-weight: 500; max-width: 28em; margin: 1.2rem auto 0; }

/* ───── 4 memory ───── */
.memory { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.mcaps p { font-family: var(--f-display); font-weight: 700; letter-spacing: -.03em; font-size: clamp(1.7rem, 3.4vw, 2.8rem); line-height: 1.12; }
.mem { --row: 92px; position: relative; isolation: isolate; height: 300px; border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #fbf7ee, #efe9dc); }
.shelf { position: absolute; left: 16px; right: 16px; height: 76px; border-radius: 14px; border: 1.5px dashed rgba(0, 0, 0, .14); background: rgba(255, 255, 255, .55); }
.shelf b { position: absolute; z-index: 4; left: 12px; top: 9px; padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, .9); font: 600 .68rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: #5d584e; }
.r1 { top: 16px; } .r2 { top: 108px; } .r3 { top: 200px; border-style: solid; border-color: rgba(13, 155, 119, .6); }
.tok { --keep: 1; --dimat: 9; position: absolute; z-index: 3; top: 36px; width: 38px; height: 38px; border-radius: 10px;
  --ap: clamp(0, (var(--p) - var(--a)) / .04, 1); --y1: clamp(0, (var(--p) - var(--b)) / .08, 1); --y2: clamp(0, (var(--p) - var(--c)) / .1, 1); --dm: clamp(0, (var(--p) - var(--dimat)) / .1, 1);
  opacity: calc(var(--ap) * (1 - var(--dm) * .75)); transform: translateY(calc(var(--y1) * var(--row) + var(--y2) * var(--row) * var(--keep))) scale(calc(.6 + var(--ap) * .4)); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .35); }
.t1 { left: 32%; background: #ffbf80; --a: .04; --b: .14; --c: .56; }
.t2 { left: 44%; background: #9fd89a; --a: .08; --b: .18; --c: .60; }
.t3 { left: 56%; background: #9cc3f2; --a: .12; --b: .22; --keep: 0; --c: 9; --dimat: .62; }
.t4 { left: 68%; background: #f3a8cf; --a: .16; --b: .26; --keep: 0; --c: 9; --dimat: .66; }
.t5 { left: 80%; background: #ffe17a; --a: .28; --b: .36; --c: .68; }
.sky { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: clamp(0, (var(--p) - .44) / .1, 1); background: linear-gradient(180deg, rgba(18, 24, 44, .95), rgba(8, 10, 20, .97)); }
.moon { position: absolute; right: 26px; top: 18px; width: 34px; height: 34px; border-radius: 50%; box-shadow: inset -10px -4px 0 0 #efe4c4; }
.stars { position: absolute; inset: 0; animation: twinkle 3.4s ease-in-out infinite;
  background-image: radial-gradient(1.5px 1.5px at 8% 22%, #fff 60%, transparent), radial-gradient(1.2px 1.2px at 22% 70%, #fff 60%, transparent), radial-gradient(1.6px 1.6px at 41% 12%, #fff 60%, transparent), radial-gradient(1.2px 1.2px at 58% 84%, #fff 60%, transparent), radial-gradient(1.4px 1.4px at 71% 28%, #fff 60%, transparent), radial-gradient(1.2px 1.2px at 88% 64%, #fff 60%, transparent), radial-gradient(1.4px 1.4px at 33% 46%, #fff 60%, transparent), radial-gradient(1.2px 1.2px at 63% 52%, #fff 60%, transparent); }
@keyframes twinkle { 50% { opacity: .35; } }
html:not(.js) .mem, .nopin .mem { --p: 1; }

/* ───── 5 emotion ───── */

/* ───── 6 games: a rail of cards ───── */
.carousel { margin-top: 3rem; }
.rail { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 max(22px, calc((100vw - var(--wrap)) / 2 + 22px)); padding: 10px max(22px, calc((100vw - var(--wrap)) / 2 + 22px)) 30px; scrollbar-width: none; counter-reset: card; }
.rail::-webkit-scrollbar { display: none; }
.gcard { --rx: 0deg; color: #f5f5f7; --ry: 0deg; counter-increment: card; position: relative; flex: 0 0 min(78vw, 340px); height: min(440px, 62vh); scroll-snap-align: start; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 28px; border-radius: 28px; overflow: hidden; border: 1px solid var(--line);
  background: #151519; background: radial-gradient(130% 80% at 15% 0%, color-mix(in srgb, var(--tint) 62%, transparent), transparent 62%), linear-gradient(180deg, #17171c, #101013);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s var(--ease); }
.gcard.tilt { transition: transform .08s linear; }
.gcard::before { content: counter(card, decimal-leading-zero); position: absolute; top: 22px; left: 28px; font: 600 .8rem var(--f-mono); color: rgba(255, 255, 255, .6); }
.gtag { font: 600 .72rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.gcard h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.035em; font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1; }
.gcard p { color: rgba(245, 245, 247, .78); font-size: .98rem; }
.rail-nav { display: flex; justify-content: flex-end; gap: 10px; }
.arrow { width: 44px; height: 44px; border-radius: 50%; background: var(--card-2); color: var(--fg); font-size: 1.1rem; transition: background .2s, opacity .2s; }
.arrow:hover { background: var(--hover); }
.arrow[disabled] { opacity: .35; cursor: default; }

/* ───── 7 safety: the rest button ───── */
.rest { text-align: center; }
.ents { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; min-height: 48px; }
.ent { padding: .35em 1.1em; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 600; transition: opacity .5s, filter .5s; }
.pin[data-step="1"] .ent, .pin[data-step="2"] .ent { opacity: .28; filter: grayscale(1); }
.bubble { position: absolute; left: calc(50% + 150px); top: -36px; padding: .35em .95em; border-radius: 14px 14px 14px 4px; background: var(--hl); color: var(--hl-ink); font-size: .92rem; font-weight: 600; white-space: nowrap; opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s var(--ease); }
.pin[data-step="2"] .bubble { opacity: 1; transform: none; }
.rbar { height: 4px; max-width: 560px; margin: 28px auto 0; border-radius: 2px; background: var(--card-2); overflow: hidden; }
.rbar b { display: block; height: 100%; background: linear-gradient(90deg, var(--g), var(--acc)); transform-origin: 0 50%; transform: scaleX(var(--p)); }
.rcaps { margin-top: clamp(36px, 8vh, 72px); }
.rcaps .big { font-size: clamp(2rem, 5vw, 3.8rem); line-height: 1.08; max-width: 16em; margin: 0 auto; }
.rcaps .small { color: var(--mut); font-size: clamp(1.05rem, 1.8vw, 1.35rem); font-weight: 500; margin-top: 1rem; }

/* ───── 8 deployment: machines as small 3D boxes ───── */
.setups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 3rem; }
.setups article { padding: 26px 24px 28px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); }
.setups h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.03em; font-size: 1.5rem; margin-top: 1rem; }
.setups p { color: var(--mut); margin-top: .4rem; }
.iso { height: 170px; display: flex; align-items: center; justify-content: center; gap: 30px; perspective: 900px; }
.cube { position: relative; width: var(--w); height: var(--h); transform-style: preserve-3d; transform: rotateX(-22deg) rotateY(-36deg); animation: bob 5s ease-in-out infinite; }
.cube i { position: absolute; border: 1px solid var(--edge); }
.f-front { inset: 0; transform: translateZ(calc(var(--d) / 2)); }
.f-side { top: 0; height: var(--h); width: var(--d); left: calc((var(--w) - var(--d)) / 2); transform: rotateY(90deg) translateZ(calc(var(--w) / 2)); }
.f-top { left: 0; width: var(--w); height: var(--d); top: calc((var(--h) - var(--d)) / 2); transform: rotateX(90deg) translateZ(calc(var(--h) / 2)); }
.c-main .f-front { background: linear-gradient(180deg, rgba(255, 179, 92, .5), rgba(255, 122, 89, .35)); } .c-main .f-side { background: rgba(200, 110, 50, .45); } .c-main .f-top { background: rgba(255, 210, 150, .65); }
.c-game .f-front { background: rgba(63, 214, 174, .38); } .c-game .f-side { background: rgba(40, 150, 120, .42); } .c-game .f-top { background: rgba(140, 240, 210, .55); }
.c-server .f-front { background: linear-gradient(180deg, rgba(255, 179, 92, .45), rgba(255, 122, 89, .3)); } .c-server .f-side { background: rgba(190, 100, 45, .42); } .c-server .f-top { background: rgba(255, 210, 150, .6); }
.c-mini .f-front { background: rgba(160, 170, 255, .34); } .c-mini .f-side { background: rgba(110, 120, 220, .38); } .c-mini .f-top { background: rgba(200, 205, 255, .5); }
.c-server .f-front::after { content: ""; position: absolute; inset: 14px 10px auto; height: 50%; background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .55) 0 2px, transparent 2px 9px); opacity: .6; }
@keyframes bob { 50% { translate: 0 -7px; } }
.two .cube:last-child, .minis .cube:nth-child(2) { animation-delay: -1.6s; } .minis .cube:nth-child(3) { animation-delay: -3.2s; }
.minis { display: flex; flex-direction: column; gap: 14px; }
.link-dash { width: 34px; height: 2px; background: repeating-linear-gradient(90deg, var(--g) 0 5px, transparent 5px 10px); background-size: 10px 2px; animation: dash 1s linear infinite; }
@keyframes dash { to { background-position: 10px 0; } }

/* ───── end ───── */
#end .intro { padding-top: clamp(6rem, 14vh, 9rem); }
.status { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 3rem; }
.status > div { padding: 24px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); }
.status > div:first-child { box-shadow: inset 0 3px 0 var(--g); }
.status h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; font-size: 1.25rem; margin-bottom: .5rem; }
.status p { color: var(--mut); font-size: .98rem; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 2.4rem; }
.links:empty { display: none; }
.links a { padding: .55em 1.3em; border-radius: 999px; background: var(--fg); color: var(--bg); font-weight: 600; text-decoration: none; }
#end footer { display: flex; justify-content: space-between; gap: 14px; margin-top: clamp(4rem, 10vh, 7rem); padding-top: 22px; padding-bottom: 34px; border-top: 1px solid var(--line); color: var(--mut); font-size: .86rem; }
#end footer a { text-decoration: none; }
#end footer a:hover { color: var(--fg); }

/* ───── shared bits ───── */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .6em 1.25em; border-radius: 999px; background: var(--fg); color: var(--bg); font-weight: 600; font-size: .95rem; transition: transform .2s var(--ease), opacity .2s; }
.btn:hover { transform: scale(1.03); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--card-2); color: var(--fg); }
.btn.stop { background: linear-gradient(90deg, var(--acc), var(--acc-2)); color: #1a0d00; }
.btn[disabled] { opacity: .4; cursor: default; transform: none; }
.note { color: var(--mut); font-size: .92rem; }
.tiny { margin-top: 10px; font-size: .74rem; color: var(--mut); text-align: right; }
.pillbtn { padding: .45em 1.05em; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: .92rem; transition: background .2s, border-color .2s, color .2s, transform .2s var(--ease); }
.pillbtn:hover { transform: translateY(-1px); }
.pillbtn.on { background: var(--hl); border-color: var(--hl); color: var(--hl-ink); }
.pillbtn.ghost[aria-pressed="true"] { background: #ff9a9a; border-color: #ff9a9a; color: #3a0b0b; }

/* ───── chapter dots ───── */
.dots { position: fixed; right: 16px; top: 50%; z-index: 45; display: none; flex-direction: column; gap: 10px; padding: 12px 8px; border-radius: 999px; background: color-mix(in srgb, var(--card-2) 70%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transform: translateY(-50%); }
.dots a { position: relative; display: block; width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--fg) 32%, transparent); transition: background .3s, transform .3s var(--ease); }
.dots a:hover { background: var(--fg); }
.dots a.on { background: var(--acc); transform: scale(1.45); }
.dots span { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); padding: 3px 10px; border-radius: 999px; background: rgba(20, 20, 24, .85); color: #f5f5f7; font-size: .76rem; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s; }
.dots a:hover span, .dots a:focus-visible span { opacity: 1; }
@media (min-width: 1180px) { .dots { display: flex; } }

/* ───── voice: speaking while writing ───── */
.vdemo { margin-top: 3rem; }
.vcard { max-width: 780px; margin: 0 auto; padding: 24px 26px 18px; border-radius: 28px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 40px 80px -50px var(--sh); }
.vrow { display: grid; grid-template-columns: 4.6em 1fr; gap: 14px; align-items: baseline; padding: 8px 0; }
.vrow small { font: 600 .7rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mut); }
.vrow.you p { color: var(--mut); font-size: 1.1rem; }
.vtext { font-size: clamp(1.1rem, 2.1vw, 1.35rem); line-height: 1.55; min-height: 5.4em; }
.vtext .w { opacity: 0; transition: opacity .25s, color .25s; }
.vtext .w.on { opacity: .42; }
.vtext .w.said { opacity: 1; color: var(--fg); }
.vtext .w.lost { opacity: .22; text-decoration: line-through; text-decoration-color: var(--acc-2); }
.vmeters { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.vm > span { display: block; margin-bottom: 8px; font: 600 .68rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mut); }
.vline { height: 6px; margin-top: 15px; border-radius: 3px; background: var(--card-2); overflow: hidden; }
.vline b { display: block; height: 100%; width: 0; background: var(--g); transition: width .12s linear; }
.wave-bars { display: flex; align-items: center; gap: 3px; height: 34px; }
.wave-bars i { flex: 1; height: 12%; border-radius: 2px; background: var(--acc); opacity: .5; transition: height .3s, opacity .3s; }
.wave-bars.on i { opacity: 1; animation: wb .8s ease-in-out infinite; }
.wave-bars.on i:nth-child(3n) { animation-duration: .62s; } .wave-bars.on i:nth-child(4n+1) { animation-duration: .95s; } .wave-bars.on i:nth-child(5n+2) { animation-duration: .7s; }
.wave-bars.on i:nth-child(odd) { animation-delay: -.3s; } .wave-bars.on i:nth-child(7n) { animation-delay: -.5s; }
@keyframes wb { 0%, 100% { height: 14%; } 50% { height: 92%; } }
.vfoot { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.vstate { color: var(--acc); font-weight: 600; min-height: 1.5em; }
.vbtns { display: flex; gap: 10px; }
.cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 2.2rem; }
.cards4 article { padding: 22px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); }
.cards4 h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; font-size: 1.2rem; margin-bottom: .45rem; }
.cards4 p { color: var(--mut); font-size: .95rem; }

/* ───── turn-taking: sort a line ───── */
.sorter { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 48px); align-items: start; margin-top: 3rem; }
.tlines { display: grid; gap: 9px; }
.tlines small { font: 600 .7rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mut); }
.tline-btn { text-align: left; padding: .8em 1.1em; border-radius: 18px 18px 18px 6px; background: var(--card); border: 1px solid var(--line); font-size: 1.02rem; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.tline-btn:hover { transform: translateX(4px); }
.tline-btn.on { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }
.bins { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.bin { min-height: 92px; display: flex; align-items: flex-end; padding: 10px; border-radius: 16px; border: 1.5px dashed var(--line); font-weight: 600; font-size: .86rem; line-height: 1.25; transition: border-color .3s, background .3s, transform .3s var(--ease); }
.bin.hit { border-style: solid; border-color: var(--acc); background: color-mix(in srgb, var(--acc) 12%, transparent); transform: translateY(-4px); }
.tresult { margin-top: 22px; min-height: 2.6em; font-family: var(--f-display); font-weight: 700; letter-spacing: -.025em; font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.2; }
.tresult + .note { margin-top: 10px; }
.fly { position: fixed; z-index: 70; left: 0; top: 0; padding: .55em 1em; border-radius: 16px; background: var(--hl); color: var(--hl-ink); font-weight: 600; font-size: .95rem; pointer-events: none; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .4); transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .3s .55s; }

/* ───── memory, more ───── */
.memx { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 2.6rem; }
.memx > div { padding: 22px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); }
.memx h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; font-size: 1.15rem; margin-bottom: .8rem; }
.ladder ol { display: grid; gap: 8px; }
.ladder li { position: relative; padding: .55em .9em; border-radius: 12px; background: var(--card-2); font-weight: 600; animation: lad 8s linear infinite; }
.ladder li:nth-child(2) { margin-left: 14px; animation-delay: 2s; } .ladder li:nth-child(3) { margin-left: 28px; animation-delay: 4s; } .ladder li:nth-child(4) { margin-left: 42px; animation-delay: 6s; }
@keyframes lad { 0%, 22% { background: var(--hl); color: var(--hl-ink); } 25%, 100% { background: var(--card-2); color: var(--fg); } }
.fade-row { display: grid; gap: 10px; margin: 4px 0 16px; }
.fade-item { font-weight: 600; }
.fade-bar { height: 12px; border-radius: 6px; background: var(--card-2); overflow: hidden; }
.fade-bar b { display: block; height: 100%; width: calc(var(--s, 1) * 100%); border-radius: 6px; background: linear-gradient(90deg, var(--g), var(--acc)); opacity: calc(.35 + var(--s, 1) * .65); }
.fade-foot { display: flex; align-items: center; gap: 14px; }
.fade-foot span { color: var(--mut); font-size: .9rem; }
.self svg { color: var(--acc); margin-bottom: .6rem; }
.self p { color: var(--mut); font-size: .95rem; }

/* ───── inner life ───── */
.inner3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 3rem; }
.ic { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); }
.ic h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; font-size: 1.3rem; }
.ic .btn { align-self: flex-start; }
.dreambox { position: relative; min-height: 8.2em; padding: 36px 18px 18px; border-radius: 18px; background: linear-gradient(135deg, rgba(255, 215, 94, .28), rgba(255, 122, 89, .14)); font-family: var(--f-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; line-height: 1.4; }
.dtag { position: absolute; top: 12px; left: 14px; padding: 1px 8px; border-radius: 999px; background: rgba(0, 0, 0, .75); color: #fff; font: 600 .64rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
#dreamText::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -.15em; background: currentColor; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.wcycle { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: w; }
.wcycle li { position: relative; padding: .6em .2em; text-align: center; border-radius: 12px; background: var(--card-2); font-weight: 600; font-size: .9rem; animation: wlit 8s linear infinite; animation-delay: calc(var(--i) * 2s); }
.wcycle li:last-child { animation-name: wfade; }
@keyframes wlit { 0%, 23% { background: var(--hl); color: var(--hl-ink); transform: translateY(-3px); } 26%, 100% { background: var(--card-2); color: var(--fg); transform: none; } }
@keyframes wfade { 0%, 23% { background: var(--card-2); opacity: .25; } 26%, 100% { background: var(--card-2); opacity: 1; } }
.schat { display: grid; gap: 8px; min-height: 11.5em; align-content: start; }
.sb { max-width: 88%; padding: .55em .9em; border-radius: 16px; font-size: .95rem; opacity: 0; }
.sb.you { justify-self: end; background: var(--card-2); border-radius: 16px 16px 4px 16px; animation: sb0 10s linear infinite; }
.sb.her { justify-self: start; background: var(--g); color: #fff; border-radius: 16px 16px 16px 4px; }
.sb.s1 { animation: sb1 10s linear infinite; } .sb.s2 { animation: sb3 10s linear infinite; }
.sq { display: flex; align-items: center; gap: 8px; padding: .45em .8em; border-radius: 12px; border: 1px dashed var(--line); color: var(--mut); font-size: .85rem; opacity: 0; animation: sb2 10s linear infinite; }
.sq .typing { flex: 1; height: 4px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--g), transparent) 0 0 / 40% 100% no-repeat, var(--card-2); animation: wire 1.2s linear infinite; }
@keyframes sb0 { 0% { opacity: 0; transform: translateY(6px); } 4%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes sb1 { 0%, 14% { opacity: 0; transform: translateY(6px); } 18%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes sb2 { 0%, 26% { opacity: 0; } 30%, 56% { opacity: 1; } 60%, 100% { opacity: 0; } }
@keyframes sb3 { 0%, 58% { opacity: 0; transform: translateY(6px); } 62%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }

/* ───── persona: one file ───── */
.pdemo { max-width: 780px; margin: 3rem auto 0; }
.pname { display: flex; align-items: center; gap: 14px; font-weight: 600; color: var(--mut); }
.pname input { width: 8.5em; padding: .25em .6em; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--fg); font: 700 1.6rem var(--f-display); letter-spacing: -.03em; }
.pname input:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 30%, transparent); }
.pfile { margin-top: 18px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: #0e0e11; }
.pbar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: #19191e; border-bottom: 1px solid var(--line); }
.pbar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3a42; }
.pbar span { margin-left: 8px; font: 500 .78rem var(--f-mono); color: var(--mut); }
.pbody { padding: 18px 20px 20px; font: 400 .92rem/1.8 var(--f-mono); color: #d8d8de; }
.ph { color: var(--acc); }
.pn, .pbody mark { padding: 0 .3em; border-radius: 5px; background: var(--hl); color: var(--hl-ink); font-weight: 600; }
.pn.flash, .pbody mark.flash { animation: flash .6s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(255, 215, 94, .8); } 100% { box-shadow: 0 0 0 10px rgba(255, 215, 94, 0); } }
.psec { margin: 10px 0; }
.psec b { color: var(--g); font-weight: 600; }
.pl.code { color: #b9b9c2; }
.pdemo > .note { margin-top: 14px; }

/* ───── feelings: a face, ten bars, the words the model reads ───── */
.emo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 22px; margin-top: 2.5rem; }
.emo-face { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: clamp(22px, 4vw, 36px); border-radius: 28px; background: var(--card); border: 1px solid var(--line); }
.bot { --ec: #eef4ff; position: relative; width: min(340px, 100%); aspect-ratio: 24 / 17; border-radius: 22% / 31%; background: #0c0c10; }
:root[data-theme="light"] .bot { background: #16161a; }
.bot svg { display: block; width: 100%; height: 100%; }
.feat { transform-box: view-box; transform-origin: 120px 90px; }
.feat path { fill: none; stroke: var(--ec); stroke-linecap: round; transition: stroke .8s; }
.blush { opacity: 0; transition: opacity .6s; }
.blush ellipse { fill: #ff7d9a; }
.emo-read { display: flex; align-items: baseline; gap: 10px; font-size: .95rem; color: var(--mut); }
.emo-read b { font-family: var(--f-display); font-size: 1.5rem; letter-spacing: -.02em; color: var(--fg); }
.emo-voice { display: flex; gap: 8px; align-items: baseline; font: 500 .76rem var(--f-mono); color: var(--mut); text-transform: uppercase; letter-spacing: .08em; }
.emo-voice b { color: var(--fg); font-weight: 600; margin-right: 10px; }
.emo-side { display: flex; flex-direction: column; gap: 22px; }
.emo-bars { display: grid; gap: 7px; padding: 22px 24px; border-radius: 28px; background: var(--card); border: 1px solid var(--line); }
.emo-bars li { display: grid; grid-template-columns: 6.6rem 1fr; align-items: center; gap: 12px; font-size: .86rem; color: var(--mut); }
.emo-bars i { position: relative; height: 6px; border-radius: 3px; background: var(--soft); }
.emo-bars b { position: absolute; inset: 0; border-radius: 3px; background: color-mix(in srgb, var(--fg) 45%, transparent); transform-origin: 0 50%; transform: scaleX(var(--v)); transition: background .4s; }
.emo-bars li.up b { background: linear-gradient(90deg, var(--acc), var(--acc-2)); }
.emo-bars li.up span { color: var(--fg); }
.emo-bars s { position: absolute; top: -4px; left: calc(var(--b) * 100%); width: 2px; height: 14px; border-radius: 1px; background: var(--g); opacity: .8; }
.emo-words { flex: 1; padding: 20px 24px; border-radius: 28px; background: #0f0f12; color: #d8d8de; border: 1px solid var(--line); }
.emo-words h3 { font: 600 .72rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: #8a8a94; margin-bottom: 10px; }
.emo-words h3::before { content: "## "; color: #ffb35c; }
.emo-words li { position: relative; padding-left: 16px; font: 400 .9rem/1.6 var(--f-mono); }
.emo-words li::before { content: "-"; position: absolute; left: 0; color: #6c6c74; }
.emo-words li.new { animation: wordin .6s var(--ease); color: #ffd79a; }
@keyframes wordin { from { opacity: 0; transform: translateX(-8px); } }
.emo-try { grid-column: 1 / -1; }
.emo-try h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; font-size: 1.35rem; margin-bottom: .8rem; }
.emo-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: .9rem; }
.pillbtn.hit { animation: hit .45s var(--ease); }
@keyframes hit { 40% { transform: scale(.93); background: var(--hl); color: var(--hl-ink); border-color: var(--hl); } }
.bounds { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 2.2rem; }
.bd { padding: 18px 22px; border-radius: 20px; border: 1px solid var(--line); }
.bd h3 { font: 600 .72rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.bd.in { background: var(--g-soft); } .bd.in h3 { color: var(--g); }
.bd.out { background: color-mix(in srgb, #ff5a5a 9%, transparent); } .bd.out h3 { color: #ff6b6b; }
.bd.out p { text-decoration: line-through; text-decoration-color: color-mix(in srgb, #ff6b6b 70%, transparent); text-decoration-thickness: 1.5px; }
.bnote { grid-column: 1 / -1; color: var(--mut); font-size: .95rem; }
.facenote { margin-top: 1rem; color: var(--mut); font-size: .92rem; }

/* ───── what she must not say ───── */
.filt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; margin-top: 2.5rem; }
.filt-in, .filt-out { padding: clamp(22px, 3.5vw, 32px); border-radius: 28px; background: var(--card); border: 1px solid var(--line); }
.filt-in h3, .resth { font-family: var(--f-display); font-weight: 700; letter-spacing: -.025em; font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.15; }
.filt-sub { color: var(--mut); margin: .5rem 0 1.1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.filt-box input { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--edge); background: var(--bg); color: var(--fg); font: inherit; font-size: 1rem; outline: none; transition: border-color .2s, box-shadow .2s; }
.filt-box input:focus { border-color: var(--acc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 22%, transparent); }
.exls { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.exl { padding: .35em .8em; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); font-size: .82rem; text-align: left; color: var(--mut); transition: color .2s, border-color .2s, background .2s; }
.exl:hover, .exl.on { color: var(--fg); border-color: var(--edge); }
.exl.on { background: var(--card-2); }
.filt-out { --vc: var(--g); position: relative; display: flex; flex-direction: column; gap: 14px; border-color: color-mix(in srgb, var(--vc) 45%, var(--line)); box-shadow: 0 30px 70px -45px var(--vc); transition: border-color .4s, box-shadow .4s; }
.filt-out[data-v="soft"], .filt-out[data-v="cut"] { --vc: var(--acc); }
.filt-out[data-v="block"] { --vc: #ff5f5f; }
.filt-out[data-v="leak"] { --vc: #8f8cff; }
.verdict { align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: var(--vc); color: #0b0b0d; font: 700 .74rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; transition: background .4s; }
.filt-said small { display: block; font: 600 .7rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mut); margin-bottom: 6px; }
.filt-said span { display: block; font-family: var(--f-display); font-weight: 600; font-size: clamp(1.25rem, 2.4vw, 1.6rem); letter-spacing: -.02em; line-height: 1.3; overflow-wrap: anywhere; }
.filt-why { color: var(--mut); }
.filt-out.flip .filt-said span, .filt-out.flip .verdict { animation: flipin .5s var(--ease); }
@keyframes flipin { from { opacity: 0; transform: translateY(8px); } }
.filt-gauge { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: auto; }
.filt-gauge i { height: 5px; border-radius: 3px; background: var(--soft-2); transition: background .4s; }
.filt-out[data-v="pass"] .g-pass { background: var(--g); }
.filt-out[data-v="soft"] .g-soft, .filt-out[data-v="cut"] .g-soft { background: var(--acc); }
.filt-out[data-v="block"] .g-block { background: #ff5f5f; }
.filt-out[data-v="leak"] .g-block { background: #8f8cff; }
.filt-io { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.filt-io li { padding: 14px 18px 14px 44px; border-radius: 18px; position: relative; font-size: .95rem; }
.filt-io li::before { position: absolute; left: 16px; top: 13px; font-weight: 700; }
.filt-io .in { background: var(--g-soft); } .filt-io .in::before { content: "✓"; color: var(--g); }
.filt-io .out { background: color-mix(in srgb, #ff5a5a 9%, transparent); } .filt-io .out::before { content: "✕"; color: #ff6b6b; }
.filt-note { grid-column: 1 / -1; color: var(--mut); font-size: .95rem; }
.resth { margin-top: clamp(4rem, 10vh, 6rem); }

/* ───── interfaces: a switchboard ───── */
.sw { position: relative; display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 17rem) minmax(0, 1fr); column-gap: clamp(40px, 7vw, 96px); row-gap: 26px; align-items: center; margin-top: 2.5rem; }
.sw-cl { display: flex; flex-direction: column; gap: 6px; }
.sw-h { font: 600 .72rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mut); margin-bottom: 6px; }
.dcl { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 14px; border-radius: 14px; border: 1px solid transparent; text-align: left; transition: background .25s, border-color .25s, transform .3s var(--ease); }
.dcl b { font-weight: 600; font-size: .95rem; }
.dcl small { color: var(--mut); font-size: .78rem; }
.dcl:hover { background: var(--soft); }
.dcl.on { background: var(--card); border-color: color-mix(in srgb, var(--acc) 60%, transparent); transform: translateX(4px); }
.sw-doors { display: flex; flex-direction: column; gap: 10px; }
.door { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); opacity: .55; transition: opacity .35s, border-color .35s, box-shadow .35s, transform .4s var(--ease); }
.door .dnum { grid-row: span 2; font: 600 .72rem var(--f-mono); color: var(--mut); padding-top: 3px; }
.door b { font-weight: 650; }
.door small { color: var(--mut); font: 500 .74rem var(--f-mono); }
.door.on { opacity: 1; border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc), 0 20px 50px -24px var(--acc); transform: scale(1.03); }
.door.on .dnum { color: var(--acc); }
.sw-core { position: relative; z-index: 1; display: grid; justify-items: center; gap: 12px; }
.orb { width: clamp(96px, 11vw, 132px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe0b0, var(--acc) 45%, var(--acc-2) 100%); box-shadow: 0 0 0 10px color-mix(in srgb, var(--acc) 12%, transparent), 0 0 60px -6px var(--acc); animation: orb 3.2s ease-in-out infinite; }
@keyframes orb { 50% { box-shadow: 0 0 0 18px color-mix(in srgb, var(--acc) 6%, transparent), 0 0 80px 0 var(--acc); } }
.sw-core b { font-family: var(--f-display); font-size: 1.3rem; letter-spacing: -.02em; }
.sw-wire { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.sw-wire path { fill: none; stroke: var(--acc); stroke-width: 2; stroke-linecap: round; opacity: .8; stroke-dasharray: 1; stroke-dashoffset: 0; }
.sw-wire path.draw { animation: draw .9s var(--ease); }
@keyframes draw { from { stroke-dashoffset: 1; } }
.sw-pkt { position: absolute; left: 0; top: 0; z-index: 2; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--acc), 0 0 18px 4px var(--acc); offset-rotate: 0deg; opacity: 0; pointer-events: none; }
.sw-pkt.go { animation: pkt 2.2s var(--ease) .5s infinite; }
@keyframes pkt { 0% { offset-distance: 0%; opacity: 0; } 10% { opacity: 1; } 85% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
.sw-msg { grid-column: 1 / -1; border-radius: 22px; background: #0f0f12; color: #d8d8de; border: 1px solid var(--line); overflow: hidden; }
.sw-msg-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 12px 18px; background: #18181d; }
.sw-msg-h b { color: #fff; }
.sw-msg-h code { font: 500 .78rem var(--f-mono); color: #ffb35c; }
.sw-msg pre { margin: 0; padding: 16px 18px 6px; font: 400 .84rem/1.7 var(--f-mono); white-space: pre-wrap; overflow-wrap: anywhere; color: #c9c9d1; min-height: 9.5em; }
.sw-msg p { padding: 4px 18px 18px; color: #9c9ca5; font-size: .92rem; }
.sw-msg.flip pre, .sw-msg.flip p { animation: flipin .45s var(--ease); }
@media (max-width: 900px) {
  .emo { grid-template-columns: 1fr; }
  .filt, .filt-io, .bounds { grid-template-columns: 1fr; }
  .sw { grid-template-columns: 1fr; }
  .sw-cl { flex-direction: row; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .sw-cl .sw-h { display: none; }
  .dcl { flex: 0 0 auto; border-color: var(--line); }
  .dcl.on { transform: none; }
  .sw-doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .door.on { transform: none; }
  .sw-core, .sw-wire, .sw-pkt { display: none; }
}
@media (prefers-reduced-motion: reduce) { .orb, .sw-pkt.go { animation: none; } }

/* ───── terminal ───── */
.term { width: calc(100% - 44px); max-width: 780px; padding: 0; margin: 3rem auto 0; border-radius: 20px; overflow: hidden; background: #0f0f12; border: 1px solid var(--line); box-shadow: 0 40px 80px -50px rgba(0, 0, 0, .55); }
.tbar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: #1a1a1f; }
.tbar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3a42; }
.tbar i:nth-child(1) { background: #ff5f57; } .tbar i:nth-child(2) { background: #febc2e; } .tbar i:nth-child(3) { background: #28c840; }
.tbar span { margin-left: 8px; font: 500 .78rem var(--f-mono); color: #9c9ca5; }
.tbar em { margin-left: auto; font: 500 .7rem var(--f-mono); font-style: normal; color: #6c6c74; }
.tbody { min-height: 15.5em; padding: 18px 20px; font: 400 .95rem/1.75 var(--f-mono); color: #d8d8de; }
.tbody .cmd { color: #ffb35c; }
.tbody .cmd::before { content: "› "; color: #6c6c74; }
.tbody .out { color: #9c9ca5; margin-bottom: .6em; }
.tbody .cur::after { content: ""; display: inline-block; width: .55em; height: 1.05em; margin-left: 2px; vertical-align: -.18em; background: #ffb35c; animation: caret 1s steps(1) infinite; }

/* ───── quality ───── */
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 3rem; }
.counters > div { padding: 26px 22px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); }
.counters b { display: block; font-family: var(--f-display); font-weight: 800; letter-spacing: -.05em; font-size: clamp(2.8rem, 6vw, 4.6rem); line-height: 1; background: linear-gradient(100deg, var(--acc), var(--acc-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.counters span { display: block; margin-top: .6rem; color: var(--mut); }
.qpad { height: clamp(5rem, 12vh, 8rem); }

/* ───── smaller screens ───── */
@media (max-width: 900px) {
  .arch, .memory { grid-template-columns: 1fr; gap: 18px; }
  .view3d { height: 46vh; perspective: 1200px; }
  .planes { width: min(440px, 78vw); transform: translateY(calc(var(--p) * 70px)) rotateX(56deg) rotateZ(-30deg) scale(.86); }
  .adetail { min-height: 2.6em; margin-top: .6rem; font-size: .95rem; }
  .setups, .status, .memx, .inner3 { grid-template-columns: 1fr; }
  .cards4, .counters { grid-template-columns: repeat(2, 1fr); }
  .sorter { grid-template-columns: 1fr; }
  .spec dl div { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 720px) {
  .js .pin { height: calc(var(--h) * .85); }
  .heart { grid-template-columns: 1fr; justify-items: center; gap: 28px; }
  .ring { --size: min(72vw, 36vh); }
  .node { width: 44px; height: 44px; font-size: .85rem; }
  .node[data-at="0"], .node[data-at="2"] { left: calc(50% - 22px); } .node[data-at="1"], .node[data-at="3"] { top: calc(50% - 22px); }
  .ring::before { inset: 22px; }
  .spoke i { top: 50px; height: calc(50% - 50px); }
  .core-dot, .beat { left: calc(50% - 38px); top: calc(50% - 38px); width: 76px; height: 76px; font-size: 1.05rem; }
  .js:not(.nopin) .caps li:not(.on) { display: none; }
  .caps li.on { transform: none; text-align: center; }
  .track span { display: none; }
  .track li.on span { display: block; position: absolute; top: 52px; white-space: nowrap; font-size: .82rem; }
  .track li { position: relative; }
  .track i { width: 34px; height: 34px; font-size: .78rem; }
  .tline { top: 16px; }
  .opt { grid-template-columns: 6.8em 1fr 2.6em; gap: 8px; padding: 7px 8px; }
  .dcard { padding: 18px 14px 12px; }
  .mem { --row: 78px; height: 258px; }
  .shelf { height: 64px; } .r2 { top: 94px; } .r3 { top: 172px; } .tok { top: 30px; width: 32px; height: 32px; }
  .bins { grid-template-columns: repeat(3, 1fr); }
  .cards4, .counters { grid-template-columns: 1fr; }
  .vmeters { grid-template-columns: 1fr; gap: 12px; }
  .vrow { grid-template-columns: 1fr; gap: 2px; }
  .bubble { position: static; transform: none; flex-basis: 100%; max-width: max-content; margin: 6px auto 0; }
}

/* ───── people who asked for less movement ───── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .001s !important; transition-delay: 0s !important; }
  .js .rv { opacity: 1; transform: none; }
  .dscene:not(:first-child) { display: none; }
  .dscene { opacity: 1; }
  .bar s { transform: scaleX(var(--v)); }
  .opt.pick { background: var(--hl); color: var(--hl-ink); }
}

/* the release tag above the hero title */
.rel { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 1.4rem; padding: 5px 14px 5px 5px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); font-size: .88rem; font-weight: 500; color: var(--fg); }
.rel b { padding: 2px 9px; border-radius: 999px; background: linear-gradient(90deg, #ffb35c, #ff7a59); color: #1a0d00; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

/* the roadmap at the end */
.road { margin-top: clamp(3.5rem, 9vh, 6rem); }
.road-h { font-family: var(--f-display); font-weight: 700; letter-spacing: -.035em; font-size: clamp(1.9rem, 4.4vw, 3rem); text-align: center; }
.principle { max-width: 760px; margin: 1.6rem auto 2.4rem; padding: 22px 26px; border-radius: 22px; text-align: center; background: linear-gradient(135deg, color-mix(in srgb, var(--acc) 14%, var(--card)), var(--card)); border: 1px solid var(--line); }
.principle b { display: block; font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; font-size: 1.35rem; margin-bottom: .4rem; }
.principle p { color: var(--mut); }
.road-sub { text-align: center; color: var(--mut); margin-top: .5rem; }
.rtabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 10px; justify-content: center; flex-wrap: wrap; }
.rtabs::-webkit-scrollbar { display: none; }
.rtab { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: .5em 1.1em; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: .93rem; transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease); }
.rtab:hover { transform: translateY(-1px); }
.rtab.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.rtab i { width: 8px; height: 8px; border-radius: 50%; }
.dot-next { background: var(--acc); } .dot-plan { background: var(--g); } .dot-later { background: var(--mut); }
.rpanels { display: grid; margin-top: 14px; }
.rpanel { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px; padding: 28px 30px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s .35s; }
.rpanel.on { opacity: 1; visibility: visible; transform: none; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.rhead h4 { margin-top: .8rem; font-family: var(--f-display); font-weight: 700; letter-spacing: -.03em; font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.12; }
.rstat { display: inline-block; padding: .2em .8em; border-radius: 999px; font: 600 .72rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.st-next { background: color-mix(in srgb, var(--acc) 18%, transparent); color: var(--acc); }
.st-plan { background: var(--g-soft); color: var(--g); }
.st-later { background: var(--card-2); color: var(--mut); }
.rpanel ol { display: grid; gap: 10px; counter-reset: r; }
.rpanel li { position: relative; padding: 12px 14px 12px 46px; border-radius: 14px; background: var(--card-2); counter-increment: r; }
.rpanel li::before { content: counter(r); position: absolute; left: 14px; top: 12px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--fg); color: var(--bg); font: 700 .72rem var(--f-mono); }
.rpanel.on li { animation: rin .45s var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes rin { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
html:not(.js) .rpanel, .nopin .rpanel { grid-area: auto; opacity: 1; visibility: visible; transform: none; margin-bottom: 14px; }
html:not(.js) .rtabs, .nopin .rtabs { display: none; }
@media (max-width: 900px) { .rpanel { grid-template-columns: 1fr; gap: 16px; padding: 22px 20px; } .rtabs { justify-content: flex-start; flex-wrap: nowrap; } }

/* ───── the "+" on a game card, and the sheet it opens ───── */
.gcard { cursor: pointer; }
.plus { position: absolute; right: 20px; bottom: 20px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .25s, transform .35s var(--ease); }
.plus i::before, .plus i::after, .sh-x i::before, .sh-x i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px; border-radius: 1px; background: #fff; }
.plus i::after { transform: rotate(90deg); }
.gcard:hover .plus, .plus:focus-visible { background: rgba(255, 255, 255, .28); transform: rotate(90deg); }
.gcard p { padding-right: 34px; }
html.sheet-open { overflow: hidden; }
.sheet { width: min(720px, calc(100vw - 32px)); max-height: min(86vh, 820px); padding: 0; border: 0; border-radius: 28px; background: var(--card); color: var(--fg); box-shadow: 0 50px 120px -40px rgba(0, 0, 0, .7); overflow: hidden; }
.sheet::backdrop { background: rgba(0, 0, 0, .5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.sheet[open] { animation: shin .45s var(--ease); }
.sheet[open]::backdrop { animation: fadein .35s ease; }
.sheet.closing { animation: shout .22s ease forwards; }
.sheet.closing::backdrop { animation: fadeout .22s ease forwards; }
@keyframes shin { from { opacity: 0; transform: translateY(30px) scale(.97); } }
@keyframes shout { to { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes fadein { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; } }
.sh-in { max-height: inherit; overflow-y: auto; overscroll-behavior: contain; }
.sh-head { position: relative; padding: 34px 32px 26px; color: #f5f5f7; background: radial-gradient(120% 140% at 10% 0%, color-mix(in srgb, var(--tint, #888) 70%, transparent), transparent 70%), #141418; }
.sh-head h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.035em; font-size: clamp(2.2rem, 6vw, 3.2rem); line-height: 1; margin-top: 8px; }
.sh-x { position: absolute; right: 18px; top: 18px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .14); transition: background .2s; }
.sh-x:hover { background: rgba(255, 255, 255, .26); }
.sh-x i::before { transform: rotate(45deg); } .sh-x i::after { transform: rotate(-45deg); }
.sh-body { padding: 26px 32px 32px; }
.sh-lead { font-size: 1.12rem; line-height: 1.6; margin-bottom: 1.6rem; }
.sh-body h4 { font: 600 .7rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mut); margin-bottom: 10px; }
.sh-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 1.8rem; }
.sh-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-chips li { padding: .28em .75em; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); font-size: .86rem; }
.sh-chips.code li { font: 500 .78rem var(--f-mono); border-radius: 8px; background: color-mix(in srgb, var(--tint, #888) 16%, transparent); }
.sh-how { counter-reset: how; display: grid; gap: 12px; margin-bottom: 1.6rem; }
.sh-how li { counter-increment: how; position: relative; padding-left: 38px; color: var(--mut); }
.sh-how li::before { content: counter(how, decimal-leading-zero); position: absolute; left: 0; top: 2px; font: 600 .78rem var(--f-mono); color: var(--fg); }
.sh-state { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; padding: 14px 16px; border-radius: 14px; background: var(--soft); font-size: .92rem; }
.sh-state b { font: 600 .7rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--acc); }
@media (max-width: 720px) {
  .sheet { width: 100vw; max-width: none; max-height: 88vh; margin: auto 0 0; border-radius: 26px 26px 0 0; }
  .sheet[open] { animation: shup .45s var(--ease); }
  @keyframes shup { from { transform: translateY(100%); } }
  .sh-cols { grid-template-columns: 1fr; }
  .sh-head, .sh-body { padding-left: 22px; padding-right: 22px; }
}
@media (prefers-reduced-motion: reduce) { .sheet[open], .sheet[open]::backdrop, .sheet.closing { animation: none; } }

/* ───── some chapters set their title on the left, some lay "under the hood" out as tiles or columns ───── */
.intro.left { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "eye eye" "h2 sub"; column-gap: clamp(24px, 5vw, 64px); align-items: end; text-align: left; }
.intro.left .eyebrow { grid-area: eye; }
.intro.left h2 { grid-area: h2; margin: .35rem 0 0; max-width: none; font-size: clamp(2.4rem, 5.2vw, 4.4rem); }
.intro.left .sub { grid-area: sub; margin: 0 0 .5rem; max-width: none; font-size: clamp(1.05rem, 1.6vw, 1.3rem); }
.spec.bento dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; padding-top: 1rem; }
.spec.bento dl div { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); transition: transform .4s var(--ease), border-color .3s; }
.spec.bento dl div:hover { transform: translateY(-3px); border-color: var(--edge); }
.spec.bento dt { font: 600 .72rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--acc); }
.spec.bento dd { color: var(--fg); font-size: 1rem; line-height: 1.55; }
.spec.bento .spec-h { border: 0; padding-bottom: 0; }
.spec.cols dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px 28px; padding-top: 1rem; }
.spec.cols dl div { display: block; padding: 18px 0 0; border-bottom: 0; border-top: 2px solid var(--fg); }
.spec.cols dt { font-family: var(--f-display); font-size: 1.15rem; letter-spacing: -.02em; margin-bottom: 8px; }
.spec.cols .spec-h { border: 0; }
@media (max-width: 720px) {
  .intro.left { grid-template-columns: 1fr; grid-template-areas: "eye" "h2" "sub"; }
  .intro.left .sub { margin-top: 1rem; }
}

/* ───── the statement: words light up as you scroll ───── */
.idea-in { justify-content: center; }
.idea { font-family: var(--f-display); font-weight: 650; font-size: clamp(1.75rem, 4.3vw, 3.5rem); line-height: 1.16; letter-spacing: -.032em; max-width: 21em; text-wrap: pretty; }
html[data-lang="zh"] .idea { letter-spacing: -.01em; line-height: 1.35; }
.idea span { opacity: clamp(.14, calc(var(--p, 0) * (var(--n) + 10) - var(--i) - 2), 1); transition: opacity .2s linear; }
.pin .idea span { --p: inherit; }
html:not(.js) .idea span, .nopin .idea span { opacity: 1; }
.idea-in .idea { padding-top: 6vh; }

/* ───── a day with her ───── */
.day-in { flex-direction: column; justify-content: center; }
.daysky { --day: 1; --dusk: 0; --night: 0; --sun: .1; --moon: 0; --pos: 0; --sp: 360px; position: relative; width: calc(100% - 44px); height: min(560px, 76svh); border-radius: 32px; overflow: hidden; isolation: isolate; background: linear-gradient(180deg, #0a1030 0%, #1d2350 70%, #2b2a5a 100%); }
.daysky > i { position: absolute; inset: 0; z-index: -1; }
.l-day { background: linear-gradient(180deg, #6fb4f5 0%, #a9d4fb 55%, #e7f3ff 100%); opacity: var(--day); }
.l-dusk { background: linear-gradient(180deg, #4a3d8f 0%, #c76b8c 55%, #ffb36b 100%); opacity: calc(var(--dusk) * (1 - var(--day) * .7)); }
.l-stars { opacity: var(--night); background-image: radial-gradient(1.5px 1.5px at 8% 18%, #fff 60%, transparent), radial-gradient(1.2px 1.2px at 23% 34%, #fff 60%, transparent), radial-gradient(1.6px 1.6px at 41% 12%, #fff 60%, transparent), radial-gradient(1.2px 1.2px at 57% 28%, #fff 60%, transparent), radial-gradient(1.4px 1.4px at 72% 9%, #fff 60%, transparent), radial-gradient(1.1px 1.1px at 86% 24%, #fff 60%, transparent), radial-gradient(1.3px 1.3px at 93% 40%, #fff 60%, transparent), radial-gradient(1.2px 1.2px at 33% 8%, #fff 60%, transparent); }
.sun, .mn { position: absolute; z-index: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; pointer-events: none; }
.sun { left: calc(6% + var(--sun) * 88%); top: calc(74% - sin(var(--sun) * 180deg) * 58%); background: radial-gradient(circle, #fff7d6 0 40%, #ffd36e 62%, rgba(255, 200, 90, 0) 72%); opacity: calc((1 - var(--night)) * min(1, sin(var(--sun) * 180deg) * 4)); }
.mn { left: calc(10% + var(--moon) * 80%); top: calc(60% - sin(var(--moon) * 180deg) * 42%); width: 44px; height: 44px; margin: -22px 0 0 -22px; box-shadow: inset -12px -5px 0 0 #f1e7c8; opacity: var(--night); }
.clock { position: absolute; left: 26px; top: 22px; z-index: 2; padding: 6px 14px; border-radius: 999px; background: rgba(10, 10, 20, .32); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; }
.clock b { font: 600 1.35rem var(--f-mono); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.dtrack { position: absolute; left: 50%; bottom: 34px; z-index: 1; display: flex; gap: 40px; margin-left: calc(var(--sp) / -2 + 20px); transform: translateX(calc(var(--pos, 0) * var(--sp) * -1)); will-change: transform; }
.moment { flex: 0 0 calc(var(--sp) - 40px); display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 20px; border-radius: 24px; background: rgba(255, 255, 255, .86); color: #16161a; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .45); opacity: .42; transform: scale(.92) translateY(10px); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.daysky.dark .moment { background: rgba(28, 28, 40, .78); color: #f2f2f6; }
.moment.on { opacity: 1; transform: none; }
.moment time { font: 600 .78rem var(--f-mono); letter-spacing: .08em; color: #d9770f; }
.daysky.dark .moment time { color: #ffb35c; }
.moment h3 { font-family: var(--f-display); font-weight: 700; font-size: 1.45rem; letter-spacing: -.025em; line-height: 1.15; }
.moment p { font-size: .95rem; line-height: 1.5; opacity: .82; }
.mtag { align-self: flex-start; margin-top: 4px; padding: 2px 9px; border-radius: 999px; font: 600 .66rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; background: rgba(13, 155, 119, .14); color: #0d7a5f; }
.daysky.dark .mtag { background: rgba(63, 214, 174, .16); color: #6fe3c2; }
@media (max-width: 720px) {
  .daysky { --sp: calc(84vw - 8px); width: calc(100% - 24px); height: min(600px, 80svh); border-radius: 26px; }
  .dtrack { gap: 16px; margin-left: calc(var(--sp) / -2 + 8px); }
  .moment { flex-basis: calc(var(--sp) - 16px); }
}
html:not(.js) .daysky, .nopin .daysky { height: auto; padding: 80px 16px 24px; }
html:not(.js) .dtrack, .nopin .dtrack { position: static; margin: 0; transform: none; flex-direction: column; gap: 14px; }
html:not(.js) .moment, .nopin .moment { opacity: 1; transform: none; flex-basis: auto; }

/* ───── the site around the story: the portal's links in the top bar, and a footer under it ───── */
.topnav { display: flex; align-items: center; gap: 20px; font-size: .93rem; font-weight: 550; }
.topnav a { color: var(--mut); text-decoration: none; transition: color .2s; }
.topnav a:hover { color: var(--fg); }
.navgh { padding: 6px 11px; border-radius: 999px; color: var(--mut); text-decoration: none; font-size: .85rem; font-weight: 600; transition: color .2s, background .2s; }
.navgh:hover { color: var(--fg); background: var(--soft); }
.navbeta { padding: 7px 15px; border-radius: 999px; background: var(--fg); color: var(--bg); text-decoration: none; font-size: .85rem; font-weight: 650; white-space: nowrap; transition: background .2s, color .2s; }
.navbeta:hover { background: var(--acc); color: var(--hl-ink); }
@media (max-width: 800px) { .nav .topnav { display: none; } }
@media (max-width: 800px) { .nav .navgh { display: none; } }

.foot { border-top: 1px solid var(--line); padding: clamp(2.6rem, 6vw, 4rem) 0 1.4rem; }
.foot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; }
.foot-col h4 { font: 600 .76rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mut); margin-bottom: 1rem; }
.foot-col ul { display: grid; gap: .6rem; }
.foot-col a { color: var(--fg); text-decoration: none; font-size: .95rem; transition: color .2s; }
.foot-col a:hover { color: var(--acc); }
.foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 22px; margin-top: clamp(2rem, 4vw, 3rem); padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--mut); font-size: .85rem; }
.foot-bottom a { color: var(--fg); text-decoration: none; }
.foot-bottom a:hover { color: var(--acc); }
@media (max-width: 720px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 340px) { .foot-grid { grid-template-columns: 1fr; } }
.navbeta .b-short { display: none; }
@media (max-width: 700px) {
  .navbeta { padding: 6px 12px; }
  .navbeta .b-long { display: none; }
  .navbeta .b-short { display: inline; }
  .navr { gap: 7px; }
  .seg button { padding: 4px 10px; }
}
/* the preview call-to-action at the top of the footer */
.foot-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 0 2rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line); }
.foot-cta h4 { font: 600 1.15rem/1.3 var(--f-display); letter-spacing: -.01em; margin-bottom: .4rem; }
.foot-cta p { color: var(--mut); font-size: .95rem; line-height: 1.55; max-width: 46em; }
.foot-cta .navbeta { flex: none; }
@media (max-width: 640px) { .foot-cta { flex-direction: column; align-items: flex-start; gap: 14px; } }

/* ───── the pages beside the introduction (join-preview) ───── */
.doc { padding-top: clamp(7rem, 14vh, 9rem); padding-bottom: 4.5rem; }
.doc h1 { font: 650 clamp(2.2rem, 5vw, 3.6rem)/1.06 var(--f-display); letter-spacing: -.02em; margin: .35rem 0 1.1rem; }
.doc .lede { color: var(--mut); font-size: clamp(1.02rem, 1.6vw, 1.25rem); line-height: 1.6; max-width: 36em; }
.doc section { margin-top: clamp(2.2rem, 5vw, 3.4rem); }
.doc .spec { padding: 0; }
.doc .spec dl div { grid-template-columns: 13rem 1fr; }
.doc .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 1.8rem; }
.doc .cta .btn { padding: .7em 1.45em; border-radius: 999px; background: var(--fg); color: var(--bg); text-decoration: none; font-weight: 650; }
.doc .cta .btn:hover { background: var(--acc); color: var(--hl-ink); }
.doc .back { color: var(--mut); text-decoration: none; font-size: .95rem; }
.doc .back:hover { color: var(--fg); }
@media (max-width: 640px) { .doc .spec dl div { grid-template-columns: 1fr; gap: 4px; } }

/* ───────── Apple HIG pass on the chrome (top bar, footer, the pages beside) ─────────
   44pt touch targets, safe areas, a text-safe accent in light mode, visible focus,
   no motion for people who asked for less of it, and anchors that do not hide under the bar. */
:root { --acc-text: var(--acc); }
:root[data-theme="light"] { --acc-text: #a85a00; }   /* 4.67:1 on --bg, was 2.92:1 */

a, button, .seg button { -webkit-tap-highlight-color: transparent; }

.nav {
  height: calc(52px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: max(22px, calc((100vw - var(--wrap)) / 2 + 22px), env(safe-area-inset-left, 0px));
  padding-right: max(22px, calc((100vw - var(--wrap)) / 2 + 22px), env(safe-area-inset-right, 0px));
}
.nav a, .nav button { min-height: 44px; }
.nav .topnav a, .nav .navbeta { display: inline-flex; align-items: center; }
.topnav a { padding: 0 2px; }
.navbeta { min-height: 44px; }
.seg { padding: 3px; }
.seg button { min-height: 38px; }
.themebtn { min-height: 44px; min-width: 44px; }

.eyebrow { color: var(--acc-text); }
.foot-col a:hover, .foot-bottom a:hover, .doc .back:hover { color: var(--acc-text); }
.foot { padding-bottom: max(1.4rem, env(safe-area-inset-bottom, 0px)); }
.doc .cta .btn { display: inline-flex; align-items: center; min-height: 44px; }

/* touch: rows in the footer get a full 44pt target; mouse keeps the tighter rhythm */
@media (hover: none) {
  .foot-col a, .foot-bottom a { display: inline-flex; align-items: center; min-height: 44px; }
  .foot-col ul { gap: 0; }
}

/* anchors land below the fixed bar instead of under it */
[id] { scroll-margin-top: calc(64px + env(safe-area-inset-top, 0px)); }

@media (prefers-reduced-motion: reduce) {
  .topnav a, .navgh, .navbeta, .foot-col a, .foot-bottom a, .doc .cta .btn, .doc .back, .seg button, .themebtn { transition: none !important; }
}

/* keyboard: a skip link that stays out of the way until it is focused */
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 10px 16px; border-radius: 0 0 12px 0; background: var(--fg); color: var(--bg); text-decoration: none; font-weight: 600; }
.skip:focus { left: 0; }

/* pressed states, so a tap or a click answers immediately */
.navbeta:active, .doc .cta .btn:active { transform: scale(.98); }
.topnav a:active, .foot-col a:active, .foot-bottom a:active { opacity: .7; }

/* HIG: honor "Reduce transparency" and "Increase contrast" */
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .nav { background: var(--bg); border-bottom-color: var(--fg); }
  .topnav a, .foot-col a, .foot-bottom a { text-decoration: underline; text-underline-offset: 3px; }
  .navbeta { outline: 2px solid currentColor; }
}

/* the reference pages: three-column footer, notes under a section */
.foot-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .foot-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.doc .note { color: var(--mut); font-size: .9rem; line-height: 1.55; margin-top: 1rem; }
.doc .spec dt a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.doc code { font-size: .85em; }
.doc .spec dt { overflow-wrap: anywhere; }   /* long option names wrap inside their column */

/* ───── HIG alignment pass ─────
   one column width for every spec table on every page; nav links sit with the brand instead of
   floating in the middle; doc pages get real section headings; spacing on an 8pt rhythm. */
.doc .spec dl div { grid-template-columns: 15rem 1fr; }   /* same 240px as the introduction */

.nav { justify-content: flex-start; }
.topnav { margin-left: 28px; }
.navr { margin-left: auto; }

.doc .spec-h {
  font: 600 1.3rem/1.35 var(--f-display);
  letter-spacing: -.01em;
  text-transform: none;
  color: var(--fg);
  padding: 0 0 12px;
  margin: 0;
}
.doc section { margin-top: clamp(40px, 5vw, 56px); }
.doc h1 { font: 650 clamp(2.5rem, 5.4vw, 4rem)/1.06 var(--f-display); letter-spacing: -.02em; }
.doc .spec { margin-top: 8px; }
.foot-col ul { gap: 8px; }

/* ───── docs area: a list on the left, the document itself on the right ───── */
.docs { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 104px 22px 80px; display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 64px; align-items: start; }
.docs-side { position: sticky; top: calc(52px + env(safe-area-inset-top, 0px) + 24px); }
.docs-side h2 { font: 600 .72rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mut); margin-bottom: 12px; }
.docs-side ul { display: grid; gap: 2px; }
.docs-side a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 10px; color: var(--mut); text-decoration: none; font-size: .95rem; transition: color .2s, background .2s; }
.docs-side a:hover { color: var(--fg); background: var(--soft); }
.docs-side a[aria-current="page"] { color: var(--bg); background: var(--fg); font-weight: 600; }

.docs-main { max-width: 70ch; }
.docs-main > h1 { font: 650 clamp(2.1rem, 4vw, 3rem)/1.08 var(--f-display); letter-spacing: -.02em; margin: .3rem 0 1rem; }
.docs-main .lede { color: var(--mut); font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.6; }
.docs-main section { margin-top: 40px; }
.docs-main h2 { font: 600 1.25rem/1.35 var(--f-display); letter-spacing: -.01em; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 0; }
.docs-main .spec { margin-top: 8px; }
.docs-main .spec dl div { grid-template-columns: 15rem 1fr; padding: 14px 0; }
.docs-main .spec dt { overflow-wrap: anywhere; }
.docs-main .note { color: var(--mut); font-size: .9rem; line-height: 1.55; margin-top: 12px; }
.docs-main p + p { margin-top: .8rem; }

@media (max-width: 860px) {
  .docs { grid-template-columns: 1fr; gap: 28px; padding-top: 88px; }
  .docs-side { position: static; }
  .docs-side ul { display: flex; flex-wrap: wrap; gap: 8px; }
  .docs-side a { border: 1px solid var(--line); padding: 8px 14px; }
  .docs-main { max-width: none; }
  .docs-main .spec dl div { grid-template-columns: 1fr; gap: 4px; }
}
.docs-main .spec { padding: 0; margin-top: 8px; }
.docs-main .spec dl div:first-child { padding-top: 12px; }
