/* fontsketch site: a typography atelier. Paper, ink, nibs and type cases.
   Monsoon 0.2.0 provides the reset, buttons and tokens; this file adds the
   atelier palette, layout and the studio, story and gallery components. */

@font-face { font-family: 'Quill Hand'; src: url('../fonts/quill-hand.woff2') format('woff2'), url('../fonts/quill-hand.ttf') format('truetype'); font-display: swap; }

:root {
  --seed: #4440B0;
  --paper: #FBF4E4;
  --paper-2: #F4E7CA;
  --card: #FFFDF6;
  --ink: #24216A;
  --ink-soft: #46428C;
  --soft-ink: #59558F;
  --rule: #D7D0EF;
  --line: #E6D9BC;
  --ver: #BE3418;
  --ver-bright: #E4472B;
  --gold: #E2A93B;
  --wood: #C98B4E;
  --wood-d: #9C6633;
  --wet: #4A43D6;
  --code-bg: #EFE5CF;
  --shadow: 0 1px 0 rgb(36 33 106 / .05), 0 18px 40px -22px rgb(36 33 106 / .45);
  --ic-line: #2A2770; --ic-fill: #F6E7C8; --ic-acc: #E4472B; --ic-paper: #FFFDF6; --ic-soft: #B9B4E6;
  --ed-bg: #ffffff; --ed-bar: #f3f3f3; --ed-border: #e1e3e8; --ed-text: #1f2328; --ed-muted: #6e7781;
  --hand: 'Quill Hand', 'Segoe Print', 'Bradley Hand', cursive;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace;
  --wrap: 72rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121132; --paper-2: #18173F; --card: #1E1C50; --ink: #F3E9D3; --ink-soft: #D6D3FF; --soft-ink: #B3AFEA;
    --rule: #34318A; --line: #2C2A6A; --ver: #FF8F74; --ver-bright: #FF7A5C; --gold: #F0BE5C; --wood: #8A5A32; --wood-d: #5E3B1F; --wet: #B8B4FF; --code-bg: #26245E;
    --shadow: 0 1px 0 rgb(0 0 0 / .2), 0 18px 40px -20px rgb(0 0 0 / .7);
    --ic-line: #D4D1FF; --ic-fill: #2E2B6E; --ic-acc: #FF7A5C; --ic-paper: #3A3780; --ic-soft: #6D69C9;
    --ed-bg: #1e1e1e; --ed-bar: #252526; --ed-border: #33363d; --ed-text: #d4d4d4; --ed-muted: #9da5b4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121132; --paper-2: #18173F; --card: #1E1C50; --ink: #F3E9D3; --ink-soft: #D6D3FF; --soft-ink: #B3AFEA;
  --rule: #34318A; --line: #2C2A6A; --ver: #FF8F74; --ver-bright: #FF7A5C; --gold: #F0BE5C; --wood: #8A5A32; --wood-d: #5E3B1F; --wet: #B8B4FF; --code-bg: #26245E;
  --shadow: 0 1px 0 rgb(0 0 0 / .2), 0 18px 40px -20px rgb(0 0 0 / .7);
  --ic-line: #D4D1FF; --ic-fill: #2E2B6E; --ic-acc: #FF7A5C; --ic-paper: #3A3780; --ic-soft: #6D69C9;
  --ed-bg: #1e1e1e; --ed-bar: #252526; --ed-border: #33363d; --ed-text: #d4d4d4; --ed-muted: #9da5b4;
  color-scheme: dark;
}

/* Light and dark art pairs follow the page theme, not only the OS. */
.art { display: block; }
.art img { display: block; width: 100%; height: auto; }
.art .art-d { display: none; }
:root[data-theme="dark"] .art .art-l { display: none; }
:root[data-theme="dark"] .art .art-d { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .art .art-l { display: none; }
  :root:not([data-theme="light"]) .art .art-d { display: block; }
}

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration-color: color-mix(in oklab, var(--ver-bright) 70%, transparent); text-underline-offset: .18em; text-decoration-thickness: .09em; }
a:hover { color: var(--ver); }
:focus-visible { outline: 3px solid var(--ver-bright); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); letter-spacing: -.01em; }
code { font-family: var(--mono); font-size: .9em; color: var(--ink); background: var(--code-bg); padding: .1em .35em; border-radius: 5px; }
.ic { width: 1.15rem; height: 1.15rem; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: 8px; }
.skip:focus { top: 1rem; color: var(--paper); }
.kicker { font: 600 .78rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ver); margin: 0 0 .7rem; }
.lede { font-size: 1.12rem; color: var(--soft-ink); max-width: 44rem; }
.btn .ic { margin-right: .1rem; }
.btn-primary { background: var(--seed); color: #fff; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in oklab, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 80rem; margin: 0 auto; display: flex; align-items: center; gap: 1rem; padding: .55rem 1rem; min-height: 3.6rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand-word { font: 400 1.7rem/1 var(--hand); letter-spacing: .01em; }
.brand-ver { color: var(--ver-bright); }
.topnav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.topnav a { padding: .45rem .7rem; border-radius: 8px; text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--ink-soft); }
.topnav a:hover, .topnav a[aria-current="page"] { background: color-mix(in oklab, var(--rule) 50%, transparent); color: var(--ink); }
.topnav .topnav-cta { margin-left: .4rem; color: #fff; display: inline-flex; gap: .35rem; }
.topnav .topnav-cta:hover { color: #fff; background: color-mix(in oklab, var(--seed) 85%, black); }
.topbar-tools { display: flex; align-items: center; gap: .2rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: .25rem; min-width: 2.5rem; height: 2.5rem; padding: 0 .45rem; border-radius: 10px; border: 0; background: none; color: var(--ink-soft); cursor: pointer; text-decoration: none; font: 600 .78rem/1 var(--sans); }
.icon-btn:hover { background: color-mix(in oklab, var(--rule) 50%, transparent); color: var(--ink); }
.theme-btn .ic { display: none; }
.theme-btn[data-voodoo-theme-mode="system"] .ti-system, .theme-btn[data-voodoo-theme-mode="light"] .ti-light, .theme-btn[data-voodoo-theme-mode="dark"] .ti-dark, .theme-btn:not([data-voodoo-theme-mode]) .ti-system { display: block; }
.nav-btn { display: none; }
@media (max-width: 860px) {
  .nav-btn { display: inline-flex; }
  .topnav { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; padding: .6rem 1rem 1rem; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .topnav.is-open { display: flex; }
  .topnav .topnav-cta { margin: .4rem 0 0; justify-content: center; }
  .topbar-tools { margin-left: auto; }
}

/* ---------- Hero and studio ---------- */
.hero { position: relative; padding: 1.6rem 1rem 3.5rem; overflow: hidden; }
.hero-paper { position: absolute; inset: 0; z-index: -1; background:
  repeating-linear-gradient(to bottom, transparent 0 31px, color-mix(in oklab, var(--rule) 55%, transparent) 31px 32px),
  linear-gradient(to right, transparent 0 calc(50% - 38rem), color-mix(in oklab, var(--ver-bright) 30%, transparent) calc(50% - 38rem) calc(50% - 38rem + 2px), transparent 0); }
.hero-head { max-width: var(--wrap); margin: 0 auto 1.4rem; text-align: center; }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); line-height: 1.02; margin: 0 0 .8rem; font-weight: 800; }
.hero h1 .h1-b { display: block; font: 400 1.18em/1.05 var(--hand); color: var(--ver-bright); letter-spacing: 0; }
.hero .lede { margin: 0 auto; }
.studio { max-width: 80rem; margin: 0 auto; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1.2rem; align-items: stretch; }
@media (max-width: 960px) { .studio-grid { grid-template-columns: minmax(0, 1fr); } }
/* name field and the three steps */
.name-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .7rem 1rem; align-items: end; max-width: 52rem; margin: 0 auto 1.3rem; }
.name-field { display: grid; gap: .45rem; min-width: 0; }
.name-label { display: inline-flex; align-items: center; gap: .4rem; font: 700 .82rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ver); }
.name-field input { width: 100%; box-sizing: border-box; font: 400 clamp(1.6rem, 3vw, 2.2rem)/1.2 var(--live-font, var(--hand)); padding: .55rem 1rem .5rem; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink); box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
.name-field input::placeholder { color: color-mix(in oklab, var(--ink) 35%, transparent); }
.name-field input:focus { outline: none; border-color: var(--ver-bright); box-shadow: 0 0 0 4px color-mix(in oklab, var(--ver-bright) 22%, transparent), var(--shadow); }
.name-go { display: inline-flex; align-items: center; gap: .4rem; height: 3.6rem; padding-inline: 1.3rem; font-size: 1.02rem; border-radius: 14px; }
.name-go .ic { transition: transform .25s ease; }
.name-go:hover .ic { transform: translateX(3px); }
.steps3 { grid-column: 1 / -1; list-style: none; margin: .1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; font: 600 .9rem/1.2 var(--sans); color: var(--soft-ink); }
.steps3 li { display: inline-flex; align-items: center; gap: .45rem; transition: color .3s; }
.steps3 li + li::before { content: ""; width: 1.6rem; height: 2px; margin-right: .9rem; border-radius: 1px; background: var(--rule); }
.sn { position: relative; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--rule); color: var(--soft-ink); font: 700 .8rem/1 var(--sans); transition: background-color .3s, border-color .3s, color .3s, transform .3s; }
.sn .ic { position: absolute; width: .9rem; height: .9rem; opacity: 0; transform: scale(.4); transition: opacity .25s, transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.steps3 li[aria-current="step"] { color: var(--ink); }
.steps3 li[aria-current="step"] .sn { border-color: var(--ver-bright); background: var(--ver-bright); color: #fff; transform: scale(1.08); }
.steps3 li.is-done .sn { border-color: var(--ink); background: var(--ink); color: transparent; }
.steps3 li.is-done .sn b { opacity: 0; }
.steps3 li.is-done .sn .ic { opacity: 1; transform: none; color: var(--paper); }
.studio[data-step="3"] .dl summary { animation: nudge 1.8s ease-in-out 2; }
@keyframes nudge { 0%, 60%, 100% { transform: none; } 20% { transform: translateY(-3px); } 40% { transform: translateY(1px); } }
@media (max-width: 640px) {
  .name-bar { grid-template-columns: minmax(0, 1fr); }
  .name-go { width: 100%; justify-content: center; height: 3.1rem; }
  .steps3 { justify-content: flex-start; gap: .5rem 1rem; font-size: .85rem; }
  .steps3 li + li::before { display: none; }
}
.specimen.is-name { font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1.1; }
.specimen span.c.is-new { display: inline-block; animation: write .42s cubic-bezier(.3, .7, .3, 1) var(--d, 0s) both; }
@keyframes write { from { clip-path: inset(-20% 100% -30% 0); transform: translateY(.06em); } to { clip-path: inset(-20% -10% -30% 0); transform: none; } }
.stage-card, .spec-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.stage-card { padding: .7rem; }
.stage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .1rem .1rem .6rem; }
.seg { display: inline-flex; background: color-mix(in oklab, var(--rule) 35%, transparent); border-radius: 12px; padding: .2rem; gap: .15rem; }
.tool { display: inline-flex; align-items: center; gap: .3rem; height: 2.3rem; min-width: 2.3rem; justify-content: center; padding: 0 .6rem; border: 0; border-radius: 9px; background: none; color: var(--ink-soft); font: 600 .85rem/1 var(--sans); cursor: pointer; }
.tool:hover { color: var(--ink); background: color-mix(in oklab, var(--card) 70%, transparent); }
.tool.is-on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.weight { display: inline-flex; align-items: center; gap: .5rem; margin-left: auto; font: 600 .8rem/1 var(--sans); color: var(--soft-ink); }
.weight input { width: 7.5rem; accent-color: var(--ver-bright); }
.stage { position: relative; aspect-ratio: 1; max-height: calc(100vh - 12rem); min-height: 18rem; margin: 0 auto; border-radius: 14px; background:
  radial-gradient(120% 90% at 20% 10%, color-mix(in oklab, var(--card) 100%, transparent), color-mix(in oklab, var(--paper-2) 60%, var(--card))); border: 1px solid var(--line); overflow: hidden; touch-action: none; cursor: crosshair; }
.stage:focus-visible { outline-offset: -3px; }
.stage-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-char { position: absolute; top: .6rem; left: .8rem; font: 700 .8rem/1 var(--mono); color: var(--soft-ink); background: color-mix(in oklab, var(--rule) 40%, transparent); padding: .3rem .5rem; border-radius: 6px; }
.next-btn { position: absolute; right: .7rem; bottom: .7rem; display: none; background: var(--ink); color: var(--paper); gap: .3rem; }
.studio[data-mode="new"] .next-btn { display: inline-flex; }
.stage-hint { margin: .6rem .3rem .1rem; font-size: .85rem; color: var(--soft-ink); }
.guides line, .guides path { vector-effect: non-scaling-stroke; }
.ink path.glyph { fill: var(--ink); transition: fill 1.4s ease; }
.ink path.glyph.wet { fill: var(--wet); }
.ink path.ghost { fill: color-mix(in oklab, var(--ink) 9%, transparent); }
.ink .reveal { animation: reveal var(--dur, .55s) cubic-bezier(.6, .1, .3, 1) var(--delay, 0s) both; }
@keyframes reveal { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.sheen { animation: sheen 1.6s ease-out var(--delay, 0s) both; }
@keyframes sheen { from { transform: translateX(-700px); } to { transform: translateX(900px); } }
.live path { fill: none; stroke: var(--wet); stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.handles circle { fill: var(--card); stroke: var(--ver-bright); stroke-width: 6; cursor: grab; }
.handles circle:hover, .handles circle.is-drag { fill: var(--ver-bright); }
.handles path { fill: none; stroke: var(--ver-bright); stroke-width: 3; stroke-dasharray: 10 10; vector-effect: non-scaling-stroke; opacity: .6; }
.studio[data-tool="erase"] .ink path.glyph:hover { fill: var(--ver-bright); cursor: pointer; }
.spec-card { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .9rem; min-width: 0; }
.spec-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.font-badge { font: 700 .78rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; background: var(--ink); color: var(--paper); padding: .35rem .6rem; border-radius: 6px; }
.spec-status { font-size: .85rem; color: var(--soft-ink); }
.specimen { margin: 0; min-height: 7.2rem; font: 400 clamp(1.9rem, 3.6vw, 3rem)/1.2 var(--live-font, var(--hand)); color: var(--ink); overflow-wrap: anywhere; }
.specimen span.c { cursor: pointer; border-radius: 4px; transition: background-color .2s; }
.specimen span.c:hover { background: color-mix(in oklab, var(--gold) 30%, transparent); }
.specimen span.c.is-sel { background: color-mix(in oklab, var(--ver-bright) 22%, transparent); }
.specimen span.c.is-writing { background: color-mix(in oklab, var(--wet) 14%, transparent); }
.specimen span.fallback { color: color-mix(in oklab, var(--ink) 38%, transparent); text-decoration: underline dotted color-mix(in oklab, var(--ver-bright) 70%, transparent); text-decoration-thickness: 2px; text-underline-offset: .12em; }
.strip-label { margin: 0 0 .4rem; font: 600 .8rem/1 var(--sans); color: var(--soft-ink); }
.strip { position: relative; display: flex; gap: .3rem; overflow-x: auto; padding: .2rem .1rem .5rem; scrollbar-width: thin; }
.strip .g { flex: none; width: 2.6rem; height: 3rem; border-radius: 9px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 400 1.6rem/1 var(--live-font, var(--hand)); cursor: pointer; position: relative; }
.strip .g[aria-pressed="true"] { border-color: var(--ver-bright); box-shadow: 0 0 0 2px var(--ver-bright) inset; }
.strip .g.is-missing { color: color-mix(in oklab, var(--ink) 30%, transparent); border-style: dashed; }
.strip .g.is-drawn::after { content: ""; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--ver-bright); }
.studio-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.studio-actions .btn { display: inline-flex; gap: .35rem; align-items: center; }
.dl { position: relative; }
.dl summary { list-style: none; cursor: pointer; display: inline-flex; gap: .35rem; align-items: center; }
.dl summary::-webkit-details-marker { display: none; }
.dl-menu { position: absolute; bottom: calc(100% + .4rem); left: 0; z-index: 5; min-width: 15rem; display: grid; padding: .35rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.dl-menu button { text-align: left; padding: .55rem .7rem; border: 0; border-radius: 8px; background: none; color: var(--ink); font: 500 .9rem/1.2 var(--sans); cursor: pointer; }
.dl-menu button:hover, .dl-menu button:focus-visible { background: color-mix(in oklab, var(--rule) 45%, transparent); }
.dl-menu button[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Bands ---------- */
.band { padding: 5rem 1rem; }
.band-alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.band-in { max-width: var(--wrap); margin: 0 auto; }
.band-in.narrow { max-width: 50rem; }
.band h2, .story-intro h2 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.1; margin: 0 0 1rem; font-weight: 700; }
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin-top: 2rem; }
@media (max-width: 900px) { .ways { grid-template-columns: minmax(0, 1fr); } }
.way { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 1rem 1rem 1.3rem; box-shadow: var(--shadow); }
.way .art { border-radius: 12px; overflow: hidden; margin-bottom: 1rem; }
.way h3 { font-size: 1.35rem; margin: 0 0 .4rem; }
.way p { margin: 0; color: var(--soft-ink); }
.way-n { position: absolute; top: -.9rem; left: 1rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--ver); color: var(--paper); font: 400 1.4rem/1 var(--hand); box-shadow: 0 4px 10px -4px rgb(0 0 0 / .4); }

/* ---------- Story ---------- */
.story { padding-top: 5rem; }
.story-intro { padding: 0 1rem; max-width: 78rem; }
.scene { height: 230vh; position: relative; }
.scene-sticky { position: sticky; top: 3.6rem; height: calc(100vh - 3.6rem); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 2rem; align-items: center; max-width: 80rem; margin: 0 auto; padding: 1rem; box-sizing: border-box; }
.scene-text h3 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.12; margin: .2rem 0 .8rem; }
.scene-text p { color: var(--soft-ink); font-size: 1.05rem; }
.scene-n { display: flex; align-items: baseline; gap: .6rem; font: 700 .85rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ver) !important; }
.scene-n span { font: 400 2.6rem/1 var(--hand); color: var(--ver-bright); letter-spacing: 0; }
.scene-steps { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .4rem; }
.scene-steps li { --on: clamp(0, calc((var(--p) * 4.6 - var(--j)) * 3), 1); display: flex; align-items: center; gap: .6rem; font-weight: 600; color: color-mix(in oklab, var(--ink) calc(35% + var(--on) * 65%), transparent); }
.scene-steps li::before { content: ""; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--ver-bright); background: color-mix(in oklab, var(--ver-bright) calc(var(--on) * 100%), transparent); flex: none; }
.scene-vis { position: relative; height: min(68vh, 36rem); }
@media (max-width: 860px) {
  .scene { height: 200vh; }
  .scene-sticky { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-content: start; gap: .6rem; }
  .scene-text p { font-size: .95rem; margin: 0; }
  .scene-text h3 { margin-bottom: .4rem; }
  .scene-steps { display: none; }
  .scene-vis { height: auto; min-height: 0; }
}

/* scene 1: the photo to font loop (plays by itself, see story.js) */
.scan-loop { padding: 2.5rem 1rem 4rem; }
.loop-grid { max-width: 80rem; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 2rem; align-items: center; }
@media (max-width: 860px) { .loop-grid { grid-template-columns: minmax(0, 1fr); } }
.scan-loop .scene-text h3 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.12; margin: .2rem 0 .8rem; }
.loop-steps { list-style: none; padding: 0; margin: 1rem 0 1.4rem; display: grid; gap: .4rem; counter-reset: ls; }
.loop-steps li { display: flex; align-items: center; gap: .6rem; font-weight: 600; color: color-mix(in oklab, var(--ink) 40%, transparent); transition: color .35s; }
.loop-steps li::before { content: ""; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--ver-bright); flex: none; transition: background-color .35s, transform .35s; }
.loop-steps li.is-on { color: var(--ink); }
.loop-steps li.is-on::before { background: var(--ver-bright); }
.loop-steps li.is-now::before { transform: scale(1.25); }
.loop-cta { margin: 0; }
.loop-cta .btn { display: inline-flex; align-items: center; gap: .4rem; }
.loop-vis { position: relative; display: flex; flex-direction: column; }
.lv-art { display: grid; grid-template-columns: minmax(0, 1.15fr) auto minmax(0, 1fr); gap: 1rem; align-items: center; padding: 1.4rem; border-radius: 24px; background: color-mix(in oklab, var(--paper-2) 70%, var(--card)); border: 1px solid var(--line); transition: opacity .4s; }
.scan-loop.is-resetting .lv-art { opacity: 0; }
@media (max-width: 640px) { .lv-art { grid-template-columns: minmax(0, 1fr); padding: .9rem; } .lv-arrow { transform: rotate(90deg); justify-self: center; } }
.lv-pause { margin-top: .5rem; margin-left: auto; display: flex; background: var(--card); border: 1px solid var(--line); }
.lv-pause .i-play, .lv-pause[aria-pressed="true"] .i-pause { display: none; }
.lv-pause[aria-pressed="true"] .i-play { display: block; }
.scan-loop.is-static .lv-pause { display: none; }

.lv-phone { padding: 4%; border-radius: 22px; background: #1C1A4A; box-shadow: 0 24px 40px -24px rgb(0 0 0 / .6); }
.lv-screen { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #3A3428; perspective: 700px; }
.lv-photo { position: absolute; inset: 0; transform-origin: 50% 60%; transform: rotateX(26deg) rotateZ(-8deg) rotateY(9deg) scale(.84); transition: transform 1.1s cubic-bezier(.5, 0, .2, 1); will-change: transform; }
.lv-photo .sheet-svg { display: block; width: 100%; height: 100%; }
.lv-light { position: absolute; inset: 0; background: radial-gradient(80% 70% at 85% 90%, rgb(40 30 10 / .55), transparent 70%), linear-gradient(120deg, rgb(255 226 160 / .45), transparent 55%); transition: opacity .9s ease .2s; }
.lv-boxes span { position: absolute; left: calc((40 + var(--c) * 82) / 400 * 100%); top: calc((40 + var(--r) * 76) / 300 * 100%); width: 18%; height: 22%; border-radius: 4px; border: 2.5px solid #E4472B; opacity: 0; transform: scale(1.15); transition: opacity .25s, transform .35s cubic-bezier(.3, 1.5, .5, 1); transition-delay: calc(var(--i) * 70ms); }
.lv-sweep { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, rgb(228 71 43 / .28) 50%, transparent 60%); opacity: 0; transform: translateY(-60%); }
.lv-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.scan-loop.p0 .lv-flash { animation: flash .55s ease-out .7s both; }
@keyframes flash { 0% { opacity: 0; } 15% { opacity: .9; } 100% { opacity: 0; } }
.scan-loop.p1 .lv-photo { transform: none; }
.scan-loop.p1 .lv-light { opacity: 0; }
.scan-loop.p2 .lv-sweep { animation: sweep 1.3s ease-in-out both; }
@keyframes sweep { 0% { opacity: 0; transform: translateY(-60%); } 15%, 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(60%); } }
.scan-loop.p2 .lv-boxes span { opacity: 1; transform: none; }
.scan-loop.p3 .lv-boxes span { opacity: .25; transition-delay: 0s; }
.scan-loop.is-static .lv-sweep { animation: none; }

.lv-arrow { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--ver-bright); }
.scan-loop.p3 .lv-arrow .ic { animation: nudge-x .8s ease-in-out 2; }
@keyframes nudge-x { 50% { transform: translateX(4px); } }

.lv-font { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: .8rem; box-shadow: var(--shadow); display: grid; gap: .6rem; min-width: 0; }
.lv-head { margin: 0; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.lv-head small { font: 600 .75rem/1 var(--mono); color: var(--soft-ink); }
.lv-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; }
.lv-tile { aspect-ratio: 1; border-radius: 8px; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; opacity: 0; transform: translateX(-24px) scale(.7); transition: opacity .3s, transform .45s cubic-bezier(.3, 1.4, .5, 1); transition-delay: calc(var(--i) * 85ms); }
.lv-tile svg { width: 100%; height: 100%; }
.lv-tile path { fill: transparent; stroke: var(--ink); stroke-width: 1.4; stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset .6s ease, fill .4s ease; transition-delay: calc(var(--i) * 85ms + .15s), calc(var(--i) * 85ms + .6s); }
.scan-loop.p3 .lv-tile { opacity: 1; transform: none; }
.scan-loop.p3 .lv-tile path { stroke-dashoffset: 0; fill: var(--ink); }
.lv-type { margin: 0; min-height: 1.3em; padding: .3rem .5rem; border-radius: 8px; background: var(--paper); font: 400 clamp(1.4rem, 2.4vw, 2rem)/1.2 var(--hand); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -.12em; background: var(--ver-bright); opacity: 0; }
.scan-loop.p4 .lv-caret { opacity: 1; animation: blink 1s steps(1) infinite; }
.scan-loop.is-static .lv-caret { display: none; }
@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .lv-photo, .lv-light, .lv-boxes span, .lv-tile, .lv-tile path { transition: none !important; }
  .scan-loop .lv-flash, .scan-loop .lv-sweep { animation: none !important; }
}

/* scene 2: weight */
.weight-stage { position: absolute; inset: 0; display: grid; align-content: center; gap: 2rem; }
.weight-svg { width: 100%; height: auto; overflow: visible; }
.weight-word path { fill: var(--ink); }
.axis { display: grid; gap: .6rem; }
.axis-track { position: relative; height: 6px; border-radius: 3px; background: linear-gradient(to right, color-mix(in oklab, var(--ink) 25%, transparent), var(--ink)); }
.axis-knob { position: absolute; top: 50%; left: calc(var(--p) * 100%); width: 26px; height: 26px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--ver-bright); border: 3px solid var(--ink); }
.axis-labels { display: flex; justify-content: space-between; font: 600 .8rem/1 var(--sans); color: var(--soft-ink); }
.axis-val { font: 400 1.6rem/1 var(--hand); color: var(--ver-bright); }
@media (max-width: 860px) { .weight-stage { position: relative; inset: auto; padding-top: 2rem; } }

/* scene 3: hinting */
.hint-stage { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 1rem; }
.hint-canvas { width: min(100%, 560px); height: auto; aspect-ratio: 4 / 3; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hint-read { display: flex; gap: 1rem; margin: 0; font: 600 .9rem/1 var(--sans); }
.hint-read span { color: var(--soft-ink); padding: .2rem .5rem; border-radius: 6px; }
.hint-read span.is-on { color: var(--ver); background: color-mix(in oklab, var(--ver-bright) 14%, transparent); }
@media (max-width: 860px) { .hint-stage { position: relative; inset: auto; } }

/* scene 4: kerning */
.kern-stage { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; align-content: center; }
.kern-pair { font-kerning: none; position: relative; display: flex; justify-content: center; align-items: baseline; padding: 1.2rem 1rem 2.2rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; font: 400 clamp(4rem, 9vw, 7.5rem)/1 var(--hand); color: var(--ink); box-shadow: var(--shadow); --kp: clamp(0, calc(var(--p) * 2.4 - var(--k) * .3), 1); }
.kern-pair span { display: inline-block; outline: 1.5px dashed color-mix(in oklab, var(--rule) 100%, transparent); outline-offset: -1px; }
.kern-pair .kp-b { transform: translateX(calc(var(--kp) * var(--kern, -.12em))); outline-color: color-mix(in oklab, var(--ver-bright) calc(var(--kp) * 100%), var(--rule)); }
.kp-val { position: absolute; bottom: .6rem; right: .9rem; font: 600 .85rem/1 var(--mono); color: var(--ver); }
@media (max-width: 860px) { .kern-stage { position: relative; inset: auto; gap: .6rem; } .kern-pair { font-size: 3.6rem; padding: .8rem .6rem 1.8rem; } }

/* scene 5: export */
.export-stage { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; gap: 1.2rem; perspective: 1200px; }
.xcard { --f: clamp(0, calc(var(--p) * 3.2 - var(--i) * .7), 1); position: relative; width: min(30%, 13rem); aspect-ratio: 3 / 4.2; transform-style: preserve-3d; transform: rotateY(calc((1 - var(--f)) * 180deg)) translateY(calc((1 - var(--f)) * 30px)); }
.xface { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 16px; display: grid; place-items: center; align-content: center; gap: .3rem; border: 1px solid var(--line); box-shadow: var(--shadow); }
.xback { transform: rotateY(180deg); background: repeating-linear-gradient(45deg, var(--paper-2) 0 10px, var(--card) 10px 20px); font: 400 4rem/1 var(--hand); color: color-mix(in oklab, var(--ink) 30%, transparent); }
.xback::after { content: "Aa"; }
.xfront { background: var(--card); }
.xaa { font: 400 clamp(3rem, 6vw, 4.6rem)/1 var(--hand); color: var(--ink); }
.xfront strong { font: 700 1.3rem/1 var(--sans); background: var(--ink); color: var(--paper); padding: .4rem .8rem; border-radius: 999px; }
.xcard:nth-child(3) .xfront strong { background: var(--ver); color: var(--paper); }
.xfront small { color: var(--soft-ink); font-weight: 600; }
@media (max-width: 860px) { .export-stage { position: relative; inset: auto; padding: 2rem 0; gap: .6rem; } }

@media (prefers-reduced-motion: reduce) {
  .scene { height: auto; }
  .scene-sticky { position: relative; top: 0; height: auto; padding-block: 3rem; }
  .scene { --p: 1 !important; }
}

/* ---------- Gallery ---------- */
.fonts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin-top: 2rem; }
@media (max-width: 860px) { .fonts { grid-template-columns: minmax(0, 1fr); } }
.font-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 1.2rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .8rem; min-width: 0; }
.fc-head h2, .fc-head h3 { margin: 0; font-size: 1.35rem; }
.fc-kind { margin: .2rem 0 0; color: var(--soft-ink); font-size: .88rem; }
.tester { margin: 0; min-height: 1.3em; line-height: 1.15; padding: .6rem .7rem; border-radius: 12px; background: var(--paper); border: 1px dashed var(--line); color: var(--ink); overflow-wrap: anywhere; outline: none; }
.tester:focus { border-color: var(--ver-bright); border-style: solid; }
.fc-controls { display: flex; flex-wrap: wrap; gap: 1rem; }
.fc-controls label { display: grid; gap: .3rem; font: 600 .78rem/1 var(--sans); color: var(--soft-ink); flex: 1 1 10rem; }
.fc-controls input { accent-color: var(--ver-bright); }
.fc-made { margin: 0; color: var(--soft-ink); font-size: .92rem; }
.fc-dl { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.dl-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .4rem .65rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; font: 700 .78rem/1 var(--sans); color: var(--ink); }
.dl-chip small { font-weight: 500; color: var(--soft-ink); }
.dl-chip:hover { border-color: var(--ver-bright); }
.icon-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(5.6rem, 1fr)); gap: .5rem; }
.icon-grid li { display: grid; justify-items: center; gap: .2rem; padding: .6rem .3rem; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.icon-glyph { font: 2.2rem/1 'Atelier Icons'; color: var(--ink); }
.icon-grid code { font-size: .68rem; background: none; padding: 0; }
.icon-grid small { font: 600 .65rem/1 var(--mono); color: var(--soft-ink); }
.glyph-wall { font-size: 2.2rem; line-height: 1.3; letter-spacing: .08em; overflow-wrap: anywhere; margin: .6rem 0 0; }
.fc-all summary { cursor: pointer; font-weight: 600; color: var(--ink-soft); }
.more-link { margin: 2rem 0 0; text-align: center; }
.more-link .btn { display: inline-flex; gap: .35rem; align-items: center; }

/* ---------- Features ---------- */
.features { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1000px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .features { grid-template-columns: minmax(0, 1fr); } }
.features li { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem; }
.fic { width: 3rem; height: 3rem; display: block; margin-bottom: .6rem; }
.features h3 { font-size: 1.1rem; margin: 0 0 .3rem; }
.features p { margin: 0; color: var(--soft-ink); font-size: .93rem; }

/* ---------- Developers ---------- */
.band-ink { background: #17163A; color: #F3E9D3; --ink: #F3E9D3; --soft-ink: #C3BFEF; --line: #2C2A6A; }
.band-ink h2, .band-ink h3 { color: #F3E9D3; }
.band-ink .kicker { color: #FF8F74; }
.dev { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.5rem; align-items: start; }
@media (max-width: 900px) { .dev { grid-template-columns: minmax(0, 1fr); } }
.dev-links { display: flex; flex-wrap: wrap; gap: .6rem; }
.dev-links .btn { display: inline-flex; gap: .4rem; align-items: center; }
.band-ink .btn-ghost { color: #F3E9D3; border: 1px solid #4A47A0; }
.code-h { font: 600 .9rem/1.2 var(--sans); margin: 0 0 .5rem; color: #C3BFEF !important; }
.dev-code .frame + .code-h { margin-top: 1.4rem; }
.band-ink .frame { --ed-bg: #1e1e1e; --ed-bar: #252526; --ed-border: #33363d; --ed-text: #d4d4d4; --ed-muted: #9da5b4; }
.band-ink .shiki span { color: var(--shiki-dark) !important; }

/* ---------- Code frames ---------- */
.frame { margin: 1.3rem 0; border: 1px solid var(--ed-border); border-radius: 12px; overflow: hidden; background: var(--ed-bg); min-width: 0; box-shadow: 0 14px 32px -20px rgb(0 0 0 / .35); }
.frame-bar { display: flex; align-items: stretch; min-height: 2.35rem; background: var(--ed-bar); border-bottom: 1px solid var(--ed-border); font-size: .8rem; }
.dots { display: inline-flex; align-items: center; gap: .35rem; padding: 0 .8rem; }
.dots i { width: .62rem; height: .62rem; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.frame-tab { display: inline-flex; align-items: center; gap: .45rem; padding: 0 .9rem; background: var(--ed-bg); color: var(--ed-text); border-inline: 1px solid var(--ed-border); margin-bottom: -1px; box-shadow: inset 0 2px 0 var(--ver-bright); min-width: 0; }
.frame-tab > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-ic { flex: none; }
.frame-copy { align-self: center; display: inline-flex; align-items: center; gap: .35rem; margin: 0 .5rem 0 auto; padding: .3rem .55rem; border: 1px solid var(--ed-border); border-radius: 6px; background: var(--ed-bg); color: var(--ed-muted); font: 500 .75rem/1 var(--sans); cursor: pointer; flex: none; }
.frame-copy:hover { color: var(--ed-text); border-color: var(--ver-bright); }
.frame-copy .ic { width: .9rem; height: .9rem; }
.frame pre { margin: 0; padding: .9rem 1.1rem 1rem; overflow-x: auto; font: 13px/1.65 var(--mono); font-variant-ligatures: none; tab-size: 2; background: var(--ed-bg); color: var(--ed-text); }
.frame code { display: block; min-width: max-content; font: inherit; padding: 0; border: 0; background: none; }
.shiki span { color: var(--shiki-light); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .shiki span { color: var(--shiki-dark); } }
:root[data-theme="dark"] .shiki span { color: var(--shiki-dark); }
@media (max-width: 640px) { .frame pre { font-size: 12px; } .frame-copy span { display: none; } }

/* ---------- Cards, FAQ, CTA ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; margin-top: 2rem; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cards { grid-template-columns: minmax(0, 1fr); } }
.gcard { display: flex; flex-direction: column; gap: .35rem; padding: .8rem .8rem 1.1rem; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s ease, border-color .2s; }
.gcard:hover { transform: translateY(-3px); border-color: var(--ver-bright); color: var(--ink); }
.gcard .art { border-radius: 10px; overflow: hidden; margin-bottom: .4rem; }
.gcard-k { font: 600 .72rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ver); }
.gcard-t { font: 600 1.12rem/1.3 var(--serif); }
.gcard-more { margin-top: auto; padding-top: .3rem; display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; font-size: .9rem; color: var(--ink-soft); }
.faq { display: grid; gap: .6rem; margin-top: 1.5rem; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 1.1rem; }
.faq summary { cursor: pointer; padding: 1rem 0; font: 600 1.05rem/1.4 var(--serif); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::after { content: "+"; font: 400 1.6rem/1 var(--hand); color: var(--ver-bright); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 0 0 1rem; color: var(--soft-ink); }
.cta { padding: 4rem 1rem 5rem; }
.cta-in { max-width: 62rem; margin: 0 auto; display: grid; grid-template-columns: 16rem 1fr; gap: 2rem; align-items: center; }
.cta h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.1; margin: 0 0 .6rem; }
.cta p { color: var(--soft-ink); font-size: 1.1rem; }
.cta-btns { display: flex; flex-wrap: wrap; gap: .6rem; }
@media (max-width: 700px) { .cta-in { grid-template-columns: minmax(0, 1fr); text-align: center; } .cta-art { max-width: 12rem; margin: 0 auto; } .cta-btns { justify-content: center; } }

/* ---------- Guides ---------- */
.guide-wrap { max-width: 76rem; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0 0 1.4rem; font-size: .88rem; color: var(--soft-ink); }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--rule); }
.crumbs a { color: var(--ink-soft); }
.guide-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 2rem; align-items: center; margin-bottom: 2.4rem; }
@media (max-width: 860px) { .guide-head { grid-template-columns: minmax(0, 1fr); } }
.guide-head h1, .index-head h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.08; margin: 0 0 1rem; font-weight: 800; }
.guide-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; color: var(--soft-ink); font-size: .9rem; margin: 0; }
.guide-art { margin: 0; }
.guide-art .art { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.guide-grid { display: grid; grid-template-columns: 16rem minmax(0, 1fr); gap: 3rem; align-items: start; }
@media (max-width: 960px) { .guide-grid { grid-template-columns: minmax(0, 1fr); } .guide-side { order: 2; } }
.guide-side { position: sticky; top: 5rem; display: grid; gap: 1rem; }
@media (max-width: 960px) { .guide-side { position: static; } }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; }
.toc-h { font: 700 .75rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--soft-ink); margin: 0 0 .6rem; }
.toc ol { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; font-size: .9rem; }
.toc a { text-decoration: none; color: var(--ink-soft); }
.toc a:hover { color: var(--ver); }
.try-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; display: grid; gap: .5rem; justify-items: start; }
.try-card img { width: 4.2rem; height: auto; }
.try-card p { margin: 0; font-size: .9rem; color: var(--soft-ink); }
.try-card .try-h { font: 700 1.05rem/1.2 var(--serif); color: var(--ink); }
.prose { max-width: 46rem; font-size: 1.06rem; line-height: 1.75; min-width: 0; }
.prose > p:first-child { font-size: 1.18rem; color: var(--ink-soft); }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; margin: 2.6rem 0 .8rem; }
.prose h3 { font-size: 1.25rem; margin: 1.8rem 0 .5rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .3rem 0; }
.prose li::marker { color: var(--ver-bright); }
.table-wrap { overflow-x: auto; margin: 1.4rem 0; border: 1px solid var(--line); border-radius: 12px; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; background: var(--card); }
.prose th, .prose td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--paper-2); font-weight: 700; }
.tip { margin: 1.4rem 0; padding: .9rem 1.1rem; border-left: 4px solid var(--ver-bright); background: var(--paper-2); border-radius: 0 12px 12px 0; }
.tip p { margin: 0; }
.steps { list-style: none; padding: 0 !important; display: grid; gap: .8rem; }
.steps li { display: grid; grid-template-columns: 2.6rem 1fr; gap: .8rem; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; margin: 0; }
.steps h3 { margin: .1rem 0 .3rem; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--soft-ink); }
.step-n { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font: 400 1.5rem/1 var(--hand); }
.related { margin-top: 4rem; }
.related h2 { font-size: 1.8rem; margin: 0; }
.index-head { max-width: 50rem; margin-bottom: 1rem; }
.gallery-how { margin: 4rem auto 0; }

/* ---------- 404 ---------- */
.notfound { max-width: 60rem; margin: 0 auto; padding: 4rem 1rem 6rem; display: grid; grid-template-columns: 18rem 1fr; gap: 2rem; align-items: center; }
.notfound h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.08; margin: 0 0 1rem; }
@media (max-width: 700px) { .notfound { grid-template-columns: minmax(0, 1fr); text-align: center; } .nf-art { max-width: 12rem; margin: 0 auto; } .notfound .cta-btns { justify-content: center; } }

/* ---------- Footer ---------- */
.foot { background: var(--paper-2); border-top: 1px solid var(--line); padding: 3.5rem 1rem 2rem; }
.foot-in { max-width: 80rem; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 900px) { .foot-in { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .foot-in { grid-template-columns: minmax(0, 1fr); } }
.foot p { color: var(--soft-ink); font-size: .92rem; }
.foot-h { font: 700 .78rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin: .4rem 0 .9rem; }
.foot-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: .92rem; }
.foot-list a { text-decoration: none; color: var(--ink); }
.foot-list a:hover { color: var(--ver); text-decoration: underline; }
.foot-more small { display: block; color: var(--soft-ink); font-size: .78rem; }
.foot-legal { max-width: 80rem; margin: 2.5rem auto 0; padding-top: 1.2rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .85rem; color: var(--soft-ink); }
.prose p { margin: 0 0 1.1rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem; }
.toc { max-height: calc(100vh - 16rem); overflow-y: auto; }
.lede, .scene-text p, .way p, .features p, .faq details p, .foot p { margin-top: 0; }
@media (max-width: 480px) {
  .topbar-in { gap: .4rem; padding-inline: .6rem; }
  .brand-word { font-size: 1.45rem; }
  .brand img { width: 30px; height: 30px; }
  .topbar-tools .icon-btn { min-width: 2.2rem; padding: 0 .3rem; }
  .topbar-tools a[href*="github.com"] { display: none; }
}
.tester { font-family: inherit; }
.spec-card .specimen { flex: 1 1 auto; align-content: center; }

/* ---------- Motion: sections rise in as they enter the viewport (site.js) ---------- */
.js-motion .rv { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--rd, 0s); }
.js-motion .rv.is-in { opacity: 1; transform: none; }
.way, .features li, .gcard, .font-card { transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.way:hover, .features li:hover { transform: translateY(-3px); border-color: color-mix(in oklab, var(--ver-bright) 45%, var(--line)); }
@media (prefers-reduced-motion: reduce) {
  .js-motion .rv { opacity: 1; transform: none; transition: none; }
  .way:hover, .features li:hover { transform: none; }
}

/* ---------- Special dates (seasons.js sets data-season on <html>) ---------- */
.season-accent { display: none; position: absolute; top: 0; left: 0; right: 0; height: clamp(64px, 9vw, 120px); background: var(--season-accent) top center / auto 100% repeat-x; pointer-events: none; z-index: 0; }
:root[data-season] .season-accent { display: block; animation: season-in .8s ease both; }
:root[data-season] .season-host { position: relative; }
:root[data-season] .hero.season-host { padding-top: clamp(4.4rem, 8.5vw, 7rem); }
:root[data-season] main.season-host { padding-top: clamp(3.4rem, 7vw, 5.6rem); }
.season-quill { display: none; position: absolute; z-index: 1; right: max(1rem, calc(50% - 40rem)); top: clamp(5rem, 9vw, 7.5rem); width: 150px; aspect-ratio: 360 / 384; background: var(--season-quill) center / contain no-repeat; pointer-events: none; }
@media (min-width: 1180px) { :root[data-season] .season-quill { display: block; animation: season-in .8s ease .2s both, season-bob 6s ease-in-out 1s infinite; } }
.season-chip { position: fixed; left: 1rem; bottom: 1rem; z-index: 60; display: flex; align-items: center; gap: .5rem; padding: .35rem .45rem .35rem .55rem; border-radius: 999px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); font: 600 .82rem/1 var(--sans); color: var(--ink); animation: season-in .6s ease .4s both; }
.season-chip img { display: block; }
.season-chip .sc-d { display: none; }
.season-chip button { position: relative; width: 2.3rem; height: 1.35rem; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in oklab, var(--rule) 70%, transparent); cursor: pointer; padding: 0; }
.season-chip button i { position: absolute; top: 50%; left: .15rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--card); box-shadow: 0 1px 3px rgb(0 0 0 / .25); transform: translateY(-50%); transition: transform .25s ease; }
.season-chip button[aria-checked="true"] { background: var(--seed); border-color: var(--seed); }
.season-chip button[aria-checked="true"] i { transform: translate(.95rem, -50%); }
.season-chip:not(:has([aria-checked="true"])) > span { color: var(--soft-ink); }
.season-fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }
@keyframes season-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes season-bob { 50% { transform: translateY(-6px) rotate(-2deg); } }
:root[data-theme="dark"] .season-accent { background-image: var(--season-accent-dark); }
:root[data-theme="dark"] .season-quill { background-image: var(--season-quill-dark); }
:root[data-theme="dark"] .season-chip .sc-l { display: none; }
:root[data-theme="dark"] .season-chip .sc-d { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .season-accent { background-image: var(--season-accent-dark); }
  :root:not([data-theme="light"]) .season-quill { background-image: var(--season-quill-dark); }
  :root:not([data-theme="light"]) .season-chip .sc-l { display: none; }
  :root:not([data-theme="light"]) .season-chip .sc-d { display: block; }
}
@media (max-width: 640px) { .season-chip { left: .6rem; bottom: .6rem; font-size: .76rem; } }
@media (prefers-reduced-motion: reduce) { .season-accent, .season-quill, .season-chip { animation: none !important; } }
