/* ==========================================================
   SEAL
   Black space, one object made of light, thin type.
   ========================================================== */

:root {
  --bg: #0a0a0a;
  --paper: #ecebe7;
  --ink: #141412;
  --fg: #f4f5f7;
  --mute: #7d828c;
  --dim: #a9adb6;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #2f6bff;
  --accent-2: #4f84ff;

  --sans: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --g: clamp(20px, 3vw, 48px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
h1, h2, p, ol { margin: 0; padding: 0; }

/* ---------------- nav ---------------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 24px var(--g); }
.logo { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.logo svg { width: 22px; height: 22px; }
.menu { display: flex; gap: 6px; }
.menu a {
  display: inline-flex; align-items: center; height: 34px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 6px; background: rgba(10, 10, 10, 0.4);
  font-size: 13px; font-weight: 500; color: #d5d8de; letter-spacing: -0.01em;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}
.menu a:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.24); color: #fff; }
.nav .btn { justify-self: end; }

/* phones: the menu moves into a sheet behind a Menu button (nav.js) */
.nav-toggle { display: none; align-items: center; height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; background: rgba(10, 10, 10, 0.4); color: #e4e6ea; font: 500 13px var(--sans); letter-spacing: -0.01em; cursor: pointer; }
.nav.on-light .nav-toggle { color: #2a2926; border-color: rgba(20, 20, 18, 0.16); background: rgba(236, 235, 231, 0.6); }
.nav-sheet { position: fixed; z-index: 19; top: 76px; left: var(--g); right: var(--g); display: grid; gap: 2px; padding: 8px; border-radius: 14px; background: #0d0e10; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); opacity: 0; transform: translateY(-8px); visibility: hidden; transition: opacity 0.25s ease, transform 0.35s var(--ease), visibility 0s 0.35s; }
.nav-sheet.open { opacity: 1; transform: none; visibility: visible; transition: opacity 0.25s ease, transform 0.35s var(--ease); }
.nav-sheet a { display: flex; align-items: center; height: 48px; padding: 0 16px; border-radius: 9px; font-size: 16px; font-weight: 500; letter-spacing: -0.02em; color: #c9ccd3; }
.nav-sheet a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.nav-sheet a[aria-current] { background: #17181c; color: #fff; }
.dx-site { display: none; }

.btn { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 500; letter-spacing: -0.01em; transition: background 0.25s; }
.btn:hover { background: var(--accent-2); }
.btn--sm { height: 34px; padding: 0 14px; font-size: 13px; }

/* ---------------- stage ---------------- */
.stage-wrap { position: relative; height: 880vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; background: var(--bg); }
#field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fade { position: absolute; left: 0; right: 0; bottom: 0; height: 18%; pointer-events: none; background: linear-gradient(rgba(10, 10, 10, 0), var(--bg)); }

/* hero copy */
.copy { position: absolute; z-index: 2; left: 50%; top: 15vh; transform: translateX(-50%); width: min(1040px, calc(100vw - 2 * var(--g))); text-align: center; display: flex; flex-direction: column; align-items: center; will-change: opacity, transform; }
.copy h1 { font-size: clamp(38px, 4.3vw, 70px); font-weight: 600; line-height: 1.04; letter-spacing: -0.05em; }
.copy .mute { color: var(--mute); }
.copy p { margin: 22px 0 28px; max-width: 30em; font-size: 15px; line-height: 1.6; color: var(--dim); }
.copy > * { opacity: 0; transform: translateY(16px); transition: opacity 1.2s ease, transform 1.4s var(--ease); }
body.ready .copy > * { opacity: 1; transform: none; }
body.ready .copy p { transition-delay: 0.15s; }
body.ready .copy .btn { transition-delay: 0.3s; }
.copy.gone { pointer-events: none; }

/* ---------------- panel 2: only one is real ---------------- */
.cine { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.cine-intro { position: absolute; left: 0; right: 0; top: 17vh; text-align: center; font-size: clamp(22px, 2vw, 32px); font-weight: 500; letter-spacing: -0.035em; color: #d5d8de; opacity: 0; transform: translateY(14px); transition: opacity 0.8s ease, transform 1s var(--ease); }
.cine-intro.on { opacity: 1; transform: none; }
.toks { position: absolute; inset: 0; }
.tok { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; white-space: nowrap; opacity: 0; transition: opacity 0.6s ease; will-change: transform; }
.tok.on { opacity: 1; }
.tok b { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.02em; color: #e6e8ec; transition: color 0.5s; }
.tok span { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); opacity: 0; transition: opacity 0.5s, color 0.5s; }
.tok.scanned span { opacity: 1; }
.tok.scanned:not(.tok--real) b { color: #5d6169; text-decoration: line-through; text-decoration-thickness: 1px; }
.tok--real.scanned span { color: var(--accent-2); }
.cine-final { position: absolute; left: 0; right: 0; top: 73vh; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 var(--g); }
.cine-final > * { opacity: 0; transform: translateY(16px); transition: opacity 0.9s ease, transform 1.1s var(--ease); }
.cine-final.on > * { opacity: 1; transform: none; }
.cine-final.on p { transition-delay: 0.12s; }
.cine-final h2 { font-size: clamp(40px, 4.6vw, 76px); font-weight: 600; letter-spacing: -0.05em; line-height: 1.02; }
.cine-final p { margin-top: 16px; font-size: 15px; line-height: 1.6; color: var(--dim); max-width: 32em; }


.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); margin: 0 0 20px; }

/* ---------------- panel 3: the paper wipe ---------------- */
.wipe { position: absolute; inset: 0; background: var(--paper); clip-path: circle(0px at 50% 50%); will-change: clip-path; }
.p3x { position: absolute; left: 0; right: 0; bottom: 9vh; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 var(--g); color: var(--ink); pointer-events: none; }
.p3x > * { opacity: 0; transform: translateY(16px); transition: opacity 0.9s ease, transform 1.1s var(--ease); }
.p3x.on > * { opacity: 1; transform: none; }
.p3x.on p { transition-delay: 0.12s; }
.p3x h2 { margin: 0; font-size: clamp(36px, 4vw, 66px); font-weight: 600; letter-spacing: -0.05em; line-height: 1.02; }
.p3x p { margin: 14px 0 0; font-size: 15px; line-height: 1.6; color: #5b5853; }

/* ---------------- panel 4: how it works ---------------- */
.ht { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.p4x { position: absolute; left: 0; right: 0; bottom: 9vh; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 var(--g); pointer-events: none; }
.p4x > * { opacity: 0; transform: translateY(16px); transition: opacity 0.9s ease, transform 1.1s var(--ease); }
.p4x.on > * { opacity: 1; transform: none; }
.p4x.on .p4d { transition-delay: 0.12s; }
.p4x h2 { font-size: clamp(40px, 4.6vw, 76px); font-weight: 600; letter-spacing: -0.05em; line-height: 1.02; }
.p4x h2 .mute { display: block; color: var(--mute); }
.p4x .w { color: #2e3136; transition: color 0.6s ease; }
.p4x .w.on { color: var(--fg); }
.p4d { display: grid; margin-top: 16px; }
.p4d p { grid-area: 1 / 1; font-size: 15px; line-height: 1.6; color: var(--dim); opacity: 0; transform: translateY(8px); transition: opacity 0.5s ease, transform 0.7s var(--ease); }
.p4d p.on { opacity: 1; transform: none; }

/* nav over the light section */
.nav { transition: color 0.35s ease; }
.nav.on-light { color: var(--ink); }
.nav.on-light .menu a { color: #2a2926; border-color: rgba(20, 20, 18, 0.16); background: rgba(236, 235, 231, 0.6); }
.nav.on-light .menu a:hover { background: rgba(20, 20, 18, 0.06); border-color: rgba(20, 20, 18, 0.3); }


/* ---------------- footer ---------------- */
.ft { position: relative; background: var(--bg); color: var(--fg); }
.ft-in { padding: clamp(64px, 11vh, 132px) var(--g) 0; }

.ft-cta { padding-bottom: clamp(64px, 10vh, 112px); border-bottom: 1px solid var(--line); }
.ft-cta h2 { font-size: clamp(40px, 4.6vw, 76px); font-weight: 600; letter-spacing: -0.05em; line-height: 1.02; }
.ft-cta h2 .mute { display: block; color: var(--mute); }

.ft-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 32px; padding: 56px 0 clamp(64px, 11vh, 120px); }
.ft-brand > p { margin: 0; max-width: 22em; font-size: 14px; line-height: 1.6; color: var(--dim); }
.ft-col h3 { margin: 0 0 18px; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
.ft-col ul { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.ft-col a { font-size: 14px; letter-spacing: -0.01em; color: #c9ccd3; transition: color 0.25s; }
.ft-col a:hover { color: #fff; }


.ft-base { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 26px 0 30px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--mute); }
.ft-base nav { display: flex; gap: 22px; }
.ft-sign { display: flex; align-items: center; gap: 16px; }
.ft-sign .logo { color: var(--fg); font-family: var(--sans); font-size: 15px; letter-spacing: -0.02em; gap: 8px; }
.ft-sign .logo svg { width: 18px; height: 18px; }
.ft-base a { transition: color 0.25s; }
.ft-base a:hover { color: var(--fg); }

/* ---------------- inner pages (Method, …) ---------------- */
body.page { -webkit-user-select: text; user-select: text; }
.edge { display: block; width: 100%; height: 112px; }
.menu a[aria-current] { border-color: rgba(255, 255, 255, 0.42); color: #fff; }
.nav.on-light .menu a[aria-current] { border-color: rgba(20, 20, 18, 0.5); color: var(--ink); }
body.page .nav { padding-top: 18px; padding-bottom: 18px; background: rgba(10, 10, 10, 0.94); transition: color 0.35s ease, background 0.35s ease; }
body.page .nav.on-light { background: rgba(236, 235, 231, 0.94); }

.m-hero { padding: clamp(150px, 25vh, 250px) var(--g) clamp(48px, 8vh, 88px); background: var(--bg); }
.m-kicker { margin-bottom: 28px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
.m-hero h1 { max-width: 10.5em; font-size: clamp(48px, 7.2vw, 124px); font-weight: 600; letter-spacing: -0.055em; line-height: 0.95; }
.m-lede { margin-top: 36px; max-width: 34em; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.6; color: var(--dim); }
.m-meta { margin-top: 44px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--mute); }
.m-hero > * { opacity: 0; transform: translateY(16px); transition: opacity 1s ease, transform 1.2s var(--ease); }
body.ready .m-hero > * { opacity: 1; transform: none; }
body.ready .m-hero h1 { transition-delay: 0.08s; }
body.ready .m-hero .m-lede { transition-delay: 0.18s; }
body.ready .m-hero .m-meta { transition-delay: 0.26s; }

.m-doc { display: grid; grid-template-columns: 180px minmax(0, 780px); justify-content: center; gap: clamp(40px, 8vw, 150px); padding: clamp(40px, 7vh, 88px) var(--g) clamp(96px, 16vh, 180px); background: var(--paper); color: var(--ink); }
.m-toc { position: sticky; top: 112px; align-self: start; display: flex; flex-direction: column; gap: 11px; }
.m-toc a { font-size: 13px; letter-spacing: -0.01em; color: #9a968d; transition: color 0.3s; }
.m-toc a:hover, .m-toc a.on { color: var(--ink); }

.m-body section { padding: clamp(44px, 7vh, 76px) 0; border-top: 1px solid rgba(20, 20, 18, 0.12); scroll-margin-top: 110px; }
.m-body section:first-child { padding-top: 0; border-top: 0; }
.m-body h2 { margin: 0 0 26px; font-size: clamp(32px, 3.2vw, 52px); font-weight: 600; letter-spacing: -0.045em; line-height: 1.02; }
.m-body p, .m-body li { font-size: 17px; line-height: 1.7; color: #3b3934; }
.m-body p { margin: 0 0 18px; max-width: 40em; }
.m-body p:last-child { margin-bottom: 0; }
.m-body p.m-big { margin-bottom: 24px; font-size: clamp(22px, 2vw, 30px); font-weight: 500; line-height: 1.35; letter-spacing: -0.03em; color: var(--ink); }
.m-body ul { margin: 0 0 18px; padding-left: 1.15em; }
.m-body li { margin-bottom: 8px; padding-left: 0.3em; }
.m-body li::marker { color: #a8a49b; }
.m-code { font-family: var(--mono); font-size: 0.86em; padding: 1px 6px; border-radius: 4px; background: rgba(20, 20, 18, 0.06); color: var(--ink); white-space: nowrap; }

.m-terms { margin: 10px 0 26px; }
.m-terms > div { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; padding: 18px 0; border-top: 1px solid rgba(20, 20, 18, 0.1); }
.m-terms > div:last-child { border-bottom: 1px solid rgba(20, 20, 18, 0.1); }
.m-terms dt { padding-top: 4px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.m-terms dd { margin: 0; font-size: 16px; line-height: 1.65; color: #3b3934; }

.m-table { width: 100%; margin: 36px 0 30px; border-collapse: collapse; }
.m-table th { padding: 0 0 12px; border-bottom: 1px solid rgba(20, 20, 18, 0.22); text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: #8a867e; }
.m-table td { padding: 16px 0; border-bottom: 1px solid rgba(20, 20, 18, 0.1); vertical-align: top; font-size: 16px; line-height: 1.6; color: #3b3934; }
.m-table td:first-child { width: 218px; padding-right: 24px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.m-table tr:first-child td:first-child { color: var(--accent); }

/* ---------------- docs: one continuous page, dark by default ---------------- */
html[data-theme="dark"] body.dx { --x-bg: #0a0a0a; --x-panel: #121212; --x-solid: #151515; --x-text: #e9e9e6; --x-body: #b2b5bc; --x-mute: #7d828c; --x-line: rgba(255, 255, 255, 0.09); --x-hi: rgba(255, 255, 255, 0.06); --x-strong: #ffffff; --x-red: #ff6a55; --x-warn: #f0a24a; --x-code: #121212; }
html[data-theme="light"] body.dx { --x-bg: #ecebe7; --x-panel: #e4e3de; --x-solid: #f4f3ef; --x-text: #141412; --x-body: #3b3934; --x-mute: #8a867e; --x-line: rgba(20, 20, 18, 0.11); --x-hi: rgba(20, 20, 18, 0.055); --x-strong: #141412; --x-red: #b23a2a; --x-warn: #b86a12; --x-code: #141413; }
body.dx { background: var(--x-bg); color: var(--x-text); transition: background 0.3s ease, color 0.3s ease; }
body.dx.dx-locked { overflow: hidden; }
.dx-ico { width: 18px; height: 18px; flex: none; display: block; }

.dx-top { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; height: 64px; padding: 0 var(--g); background: color-mix(in srgb, var(--x-bg) 92%, transparent); border-bottom: 1px solid var(--x-line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.dx-brand { display: flex; align-items: center; gap: 14px; }
.dx-brand .logo { color: var(--x-strong); }
.dx-tag { padding-left: 14px; border-left: 1px solid var(--x-line); font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--x-mute); }
.dx-menu { display: none; padding: 6px; margin-left: -6px; border: 0; background: none; color: var(--x-strong); }
.dx-search { display: flex; align-items: center; gap: 10px; width: min(440px, 36vw); height: 38px; padding: 0 8px 0 12px; border: 1px solid var(--x-line); border-radius: 8px; background: var(--x-panel); color: var(--x-mute); font: 400 14px var(--sans); letter-spacing: -0.01em; text-align: left; transition: border-color 0.25s; }
.dx-search:hover { border-color: color-mix(in srgb, var(--x-strong) 25%, transparent); }
.dx-search span { flex: 1; }
.dx kbd { padding: 2px 6px; border: 1px solid var(--x-line); border-radius: 5px; font-family: var(--mono); font-size: 11px; color: var(--x-mute); background: var(--x-hi); }
.dx-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.dx-home { font-size: 14px; color: var(--x-body); transition: color 0.25s; }
.dx-home:hover { color: var(--x-strong); }

.dx-wrap { display: grid; grid-template-columns: 250px minmax(0, 760px) 210px; justify-content: center; gap: clamp(32px, 4vw, 72px); padding: 64px var(--g) 0; }
.dx-side { position: sticky; top: 64px; align-self: start; height: calc(100vh - 64px); overflow-y: auto; padding: 36px 8px 48px 0; scrollbar-width: thin; }
.dx-group { margin-bottom: 30px; }
.dx-ghead { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding-left: 12px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--x-strong); }
.dx-ghead .dx-ico { width: 17px; height: 17px; }
.dx-group a { display: block; padding: 7px 12px; border-radius: 6px; font-size: 14px; letter-spacing: -0.01em; color: var(--x-body); transition: color 0.2s, background 0.2s; }
.dx-group a:hover { color: var(--x-strong); }
.dx-group a.on { background: var(--x-hi); color: var(--x-strong); font-weight: 500; }

.dx-main { min-width: 0; padding: 0 0 160px; }
.dx-ch { padding-top: 64px; scroll-margin-top: 64px; }
.dx-ch + .dx-ch { margin-top: 72px; border-top: 1px solid var(--x-line); }
.dx-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--x-strong); }
.dx-head h2 { margin: 0; font-size: clamp(40px, 4.4vw, 68px); font-weight: 600; letter-spacing: -0.05em; line-height: 1.02; color: var(--x-strong); }
.dx-lede { margin: 22px 0 0; max-width: 36em; font-size: 18px; line-height: 1.6; color: var(--x-body); }
.dx-main section { padding-top: 48px; scroll-margin-top: 88px; }
.dx-main h3 { margin: 0 0 18px; font-size: clamp(24px, 2.2vw, 32px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; color: var(--x-strong); }
.dx-main p { margin: 0 0 16px; max-width: 42em; font-size: 16.5px; line-height: 1.75; color: var(--x-body); }
.dx-main p.m-big { margin-bottom: 20px; font-size: clamp(20px, 1.8vw, 26px); font-weight: 500; line-height: 1.4; letter-spacing: -0.025em; color: var(--x-strong); }
.dx-main ul { margin: 0 0 16px; padding-left: 1.15em; }
.dx-main li { margin-bottom: 8px; padding-left: 0.3em; font-size: 16.5px; line-height: 1.7; color: var(--x-body); }
.dx-main li::marker { color: var(--x-mute); }
.dx-main a { color: var(--x-strong); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--x-strong) 30%, transparent); text-underline-offset: 3px; }
.dx-main a:hover { text-decoration-color: var(--x-strong); }
.dx .m-code { background: var(--x-hi); color: var(--x-strong); }
.dx .m-terms > div { border-color: var(--x-line); }
.dx .m-terms dt { color: var(--x-strong); }
.dx .m-terms dd { color: var(--x-body); }
.dx .m-table th { border-color: var(--x-line); color: var(--x-mute); }
.dx .m-table td { border-color: var(--x-line); color: var(--x-body); }
.dx .m-table td:first-child { color: var(--x-strong); }
.dx .m-table tr:first-child td:first-child { color: var(--accent-2); }

.d-code { margin: 6px 0 22px; padding: 18px 20px; border: 1px solid var(--x-line, transparent); border-radius: 8px; background: var(--x-code, #121211); color: #e4e4df; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.7; -webkit-user-select: text; user-select: text; }
.d-code code { font: inherit; white-space: pre; }
.d-labels { display: grid; margin: 4px 0 18px; border-top: 1px solid var(--x-line); }
.d-label { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 20px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--x-line); }
.d-label h4 { margin: 2px 0 6px; font-size: 19px; font-weight: 600; letter-spacing: -0.03em; color: var(--x-strong); }
.dx-main .d-label p { margin: 0; font-size: 15.5px; }
.d-label h4.d-copy { color: var(--x-red); }
.d-mark { display: block; width: 36px; height: 36px; }
.d-mark--orig { color: var(--accent-2); }
.d-mark--likely { color: var(--x-mute); }
.d-mark--likely .seal-outline { stroke-dasharray: 5.5 4.5; }

.dx-note { display: flex; gap: 12px; align-items: flex-start; margin: 10px 0 18px; padding: 14px 16px; border: 1px solid var(--x-line); border-radius: 8px; background: var(--x-panel); }
.dx-note .dx-ico { margin-top: 3px; color: var(--accent-2); }
.dx-main .dx-note p { margin: 0; font-size: 15px; line-height: 1.6; }
.dx-note--warn { border-color: color-mix(in srgb, var(--x-warn) 35%, transparent); background: color-mix(in srgb, var(--x-warn) 8%, var(--x-bg)); }
.dx-note--warn .dx-ico { color: var(--x-warn); }

.dx-end { margin-top: 56px; }
.dx-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dx-main .dx-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--x-line); border-radius: 10px; text-decoration: none; color: var(--x-strong); transition: border-color 0.25s, background 0.25s; }
.dx-main .dx-card:hover { border-color: color-mix(in srgb, var(--x-strong) 30%, transparent); background: var(--x-hi); }
.dx-card span { display: flex; flex-direction: column; gap: 3px; flex: 1; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.dx-card small { font-family: var(--mono); font-size: 10.5px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: var(--x-mute); }
.dx-card .dx-ico { color: var(--x-mute); }
.dx-next { grid-column: 2; text-align: right; }
.dx-main .dx-updated { margin: 18px 0 0; font-size: 13px; color: var(--x-mute); }

.dx-rail { position: sticky; top: 64px; align-self: start; padding: 40px 0; }
.dx-rhead { margin: 0 0 12px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--x-strong); }
.dx-toc { display: flex; flex-direction: column; gap: 2px; }
.dx-toc a { padding: 5px 10px; border-radius: 6px; font-size: 13px; color: var(--x-mute); transition: color 0.2s, background 0.2s; }
.dx-toc a:hover { color: var(--x-strong); }
.dx-toc a.on { background: var(--x-hi); color: var(--x-strong); }
.dx-help { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--x-line); }
.dx-help > p { margin: 0 0 10px; font-size: 13px; color: var(--x-body); }
.dx-faces { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--x-line); border-radius: 999px; }
.dx-faces button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--x-mute); transition: color 0.2s, background 0.2s; }
.dx-faces button:hover { color: var(--x-strong); }
.dx-faces button.on { background: var(--x-hi); color: var(--x-strong); }
.dx-help .dx-thanks { margin: 10px 0 0; font-size: 12.5px; color: var(--x-mute); }

.dx-theme { position: fixed; right: var(--g); bottom: 22px; z-index: 25; display: flex; gap: 2px; padding: 3px; border: 1px solid var(--x-line); border-radius: 9px; background: var(--x-panel); }
.dx-theme button { display: grid; place-items: center; width: 30px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--x-mute); transition: color 0.2s, background 0.2s; }
.dx-theme button .dx-ico { width: 16px; height: 16px; }
.dx-theme button:hover { color: var(--x-strong); }
.dx-theme button.on { background: var(--x-hi); color: var(--x-strong); }

.dx-modal { position: fixed; inset: 0; z-index: 60; padding: 12vh 16px 0; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.dx-modal[hidden] { display: none; }
.dx-dialog { width: min(640px, 100%); margin: 0 auto; border: 1px solid var(--x-line); border-radius: 12px; background: var(--x-solid); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); overflow: hidden; }
.dx-q { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--x-line); color: var(--x-mute); }
.dx-q input { flex: 1; height: 56px; border: 0; outline: 0; background: none; color: var(--x-strong); font: 400 16px var(--sans); letter-spacing: -0.01em; }
.dx-q input::-webkit-search-cancel-button { display: none; }
.dx-results { max-height: min(60vh, 520px); overflow-y: auto; padding: 8px; }
.dx-hit { display: flex; flex-direction: column; gap: 3px; padding: 11px 12px; border-radius: 8px; color: var(--x-body); }
.dx-hit small { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--x-mute); }
.dx-hit strong { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; color: var(--x-strong); }
.dx-hit span { font-size: 13px; line-height: 1.5; }
.dx-hit.on, .dx-hit:hover { background: var(--x-hi); }
.dx-hit mark { padding: 0 1px; border-radius: 2px; background: rgba(47, 107, 255, 0.28); color: inherit; }
.dx-none { margin: 0; padding: 22px 12px; font-size: 14px; color: var(--x-mute); }

@media (max-width: 1200px) {
  .dx-wrap { grid-template-columns: 230px minmax(0, 1fr); }
  .dx-rail { display: none; }
}

/* ---------------- about: dark and clean, like the docs ---------------- */
body.about { background: var(--bg); }
.ab { width: min(760px, calc(100% - 2 * var(--g))); margin: 0 auto; padding: clamp(132px, 18vh, 176px) 0 clamp(96px, 14vh, 150px); }
.ab-head h1 { font-size: clamp(40px, 4.4vw, 68px); font-weight: 600; letter-spacing: -0.05em; line-height: 1.02; color: #fff; }
.ab-lede { margin: 22px 0 0; max-width: 36em; font-size: 18px; line-height: 1.6; color: #b2b5bc; }
.ab-head > * { opacity: 0; transform: translateY(14px); transition: opacity 0.9s ease, transform 1.1s var(--ease); }
body.ready .ab-head > * { opacity: 1; transform: none; }
body.ready .ab-head .ab-lede { transition-delay: 0.1s; }
.ab-sec { padding-top: clamp(64px, 10vh, 96px); }
.ab-sec h2 { margin: 0 0 18px; font-size: clamp(24px, 2.2vw, 32px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; color: #fff; }
.ab-sec p { margin: 0 0 16px; max-width: 42em; font-size: 16.5px; line-height: 1.75; color: #b2b5bc; }
.ab-sec p:last-child { margin-bottom: 0; }
.ab-sec p.ab-big { margin-bottom: 20px; font-size: clamp(20px, 1.8vw, 26px); font-weight: 500; line-height: 1.4; letter-spacing: -0.025em; color: #fff; }
.ab-sec a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.3); text-underline-offset: 3px; transition: text-decoration-color 0.25s; }
.ab-sec a:hover { text-decoration-color: #fff; }
.ab-points { display: grid; gap: 26px; }
.ab-points h3 { margin: 0 0 6px; font-size: 19px; font-weight: 600; letter-spacing: -0.03em; color: #fff; }
.ab-points p { margin: 0; }

.ab-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: clamp(64px, 10vh, 96px); }
.ab-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 10px; color: #fff; transition: border-color 0.25s, background 0.25s; }
.ab-card:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.05); }
.ab-card span { display: flex; flex-direction: column; gap: 4px; flex: 1; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.ab-card small { font-size: 13px; font-weight: 400; letter-spacing: -0.01em; color: #7d828c; }
.ab-card svg { width: 18px; height: 18px; flex: none; color: #7d828c; transition: transform 0.3s var(--ease), color 0.25s; }
.ab-card:hover svg { transform: translateX(3px); color: #fff; }

/* ---------------- cursor ---------------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 100; width: 10px; height: 10px; margin: -5px 0 0 -5px; pointer-events: none; mix-blend-mode: difference; opacity: 0; transition: opacity 0.3s; will-change: transform; }
.cursor.on { opacity: 1; }
.cursor i { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: transform 0.35s var(--ease); }
.cursor.hover i { transform: scale(3.6); }
.cursor.down i { transform: scale(0.7); }
.cursor.hover.down i { transform: scale(3); }
@media (hover: hover) and (pointer: fine) {
  html.has-cursor, html.has-cursor * { cursor: none !important; }
}

@media (max-width: 900px) {
  .p3x h2 { font-size: 30px; }
  .menu { display: none; }
  .nav { grid-template-columns: 1fr auto auto; gap: 8px; }
  .nav-toggle { display: inline-flex; }
  .dx-site { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; }
  .dx-site a { padding: 8px 12px; border-radius: 8px; background: color-mix(in srgb, var(--x-strong) 7%, transparent); font-size: 14px; color: var(--x-strong); }
  .cine-final { top: 70vh; }
  .cine-final h2 { font-size: 34px; }
  .p4x h2 { font-size: 34px; }
  .p4d p { font-size: 13.5px; }
  .tok b { font-size: 10px; }
  .tok span { font-size: 9px; }
  .ft-cta h2 { font-size: 38px; }
  .m-doc { grid-template-columns: minmax(0, 1fr); }
  .dx-top { grid-template-columns: auto 1fr auto; gap: 12px; }
  .dx-menu { display: block; }
  .dx-tag, .dx-home, .dx-search span, .dx-search kbd { display: none; }
  .dx-search { justify-self: end; width: 38px; padding: 0; justify-content: center; }
  .dx-actions { gap: 10px; }
  .dx-wrap { grid-template-columns: minmax(0, 1fr); }
  .dx-side { position: fixed; z-index: 28; top: 64px; left: 0; right: 0; bottom: auto; height: calc(100vh - 64px); height: calc(100dvh - 64px); padding: 24px var(--g) 80px; background: var(--x-bg); transform: translateX(-100%); visibility: hidden; transition: transform 0.35s var(--ease), visibility 0s 0.35s; }
  body.dx-menu-open .dx-side { transform: none; visibility: visible; transition: transform 0.35s var(--ease); }
  body.dx-menu-open { overflow: hidden; }
  .dx-ch { padding-top: 44px; }
  .dx-ch + .dx-ch { margin-top: 48px; }
  .dx-lede { font-size: 16.5px; }
  .dx-main p, .dx-main li { font-size: 16px; }
  .dx-pager { grid-template-columns: 1fr; }
  .dx-next { grid-column: 1; }
  .dx-theme { bottom: 14px; }
  .d-code { font-size: 12px; padding: 16px; }
  .ab-next { grid-template-columns: minmax(0, 1fr); }
  .m-code { white-space: normal; overflow-wrap: anywhere; }
  .m-toc { display: none; }
  .m-terms > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .m-table td:first-child { width: 40%; }
  .m-body p, .m-body li { font-size: 16px; }
  .edge { height: 72px; }
  .ft-grid { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .ft-brand { grid-column: 1 / -1; }
  .ft-base { flex-direction: column; align-items: flex-start; gap: 12px; }
  .ft-disc { order: 3; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001ms !important; transition-delay: 0s !important; }
}

/* ---------------- page transitions: a quiet fade in (site.js fades out on leaving) ---------------- */
@keyframes pt-in { from { opacity: 0; } }
@keyframes pt-rise { from { opacity: 0; transform: translateY(10px); } }
body { animation: pt-in 0.55s ease; }
main.px, main.ax { animation: pt-rise 0.8s var(--ease); }
html.pt-out body { opacity: 0; transition: opacity 0.22s ease; }
@media (prefers-reduced-motion: reduce) { body, main.px, main.ax { animation: none; } }
