/* SPDX-License-Identifier: Apache-2.0 */

@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/instrument-serif.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/instrument-serif-italic.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/hanken-grotesk.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/fonts/jetbrains-mono.woff2") format("woff2"); }

:root {
  --paper: #f3f0e8;
  --paper-2: #ebe7dc;
  --card: #f8f6f0;
  --ink: #16140f;
  --ink-2: #3b372f;
  --muted: #6d675c;
  --line: #d8d1c2;
  --line-soft: #e3ddd0;
  --browser: #2f62f5;
  --server: #7a4cf2;
  --signal: #ff5a1f;
  --ok: #1d8f62;
  --night: #121110;
  --night-ink: #ece8df;
  --night-muted: #9b958a;
  --night-line: #2a2824;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --radius: 14px;
  --wrap: 1120px;
  color-scheme: light;
}
:root:not([data-theme="light"]) {
  --paper: #0f0e0c;
  --paper-2: #171613;
  --card: #141310;
  --ink: #eeeae1;
  --ink-2: #cfcabf;
  --muted: #9a948a;
  --line: #2c2a25;
  --line-soft: #22201c;
  --browser: #5b86ff;
  --server: #9b7bff;
  --night: #0a0908;
  color-scheme: dark;
}


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Paper grain: a faint noise texture so flat areas don't look rendered. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--signal); color: #fff; }

a { color: inherit; }
img, svg { display: block; max-width: 100%; }
code, pre, kbd { font-family: var(--mono); font-size: .88em; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px; z-index: 200; }
.skip:focus { left: 8px; }

.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.serif { font-family: var(--serif); font-weight: 400; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-color: var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; font-size: 18px; }
.brand svg { transition: transform .6s var(--ease-out); }
.brand:hover svg { transform: rotate(-8deg) scale(1.06); }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--ink-2); position: relative; }
.nav-links a:not(.gh)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out);
}
.nav-links a:not(.gh):hover::after { transform: scaleX(1); transform-origin: left; }
.theme-toggle {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer;
  transition: border-color .3s, color .3s, transform .5s var(--ease-out);
}
.theme-toggle:hover { border-color: var(--ink); color: var(--ink); transform: rotate(-20deg); }
.theme-toggle svg { grid-area: 1 / 1; transition: opacity .4s, transform .6s var(--ease-out); }
.theme-toggle .moon { opacity: 0; transform: rotate(-90deg) scale(.6); }
[data-theme="light"] .theme-toggle .sun { opacity: 0; transform: rotate(90deg) scale(.6); }
[data-theme="light"] .theme-toggle .moon { opacity: 1; transform: none; }
/* Smooth colour change when the visitor switches theme (not on first load). */
.theming, .theming * { transition: background-color .5s var(--ease-out), color .5s var(--ease-out), border-color .5s var(--ease-out) !important; }
.gh {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); transition: border-color .3s, background .3s;
}
.gh:hover { border-color: var(--ink); background: var(--card); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 76px 0 40px; }
.hero::before {
  /* Graph-paper grid, fading out toward the edges. */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); position: relative; }
.pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ok);
  animation: pulse 2.4s var(--ease-out) infinite;
}
@keyframes pulse { from { transform: scale(1); opacity: .6; } to { transform: scale(3.2); opacity: 0; } }

h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(46px, 8.2vw, 112px);
  line-height: .96; letter-spacing: -.025em;
  margin: 0 0 28px; max-width: 11.5em;
}
h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
h1 .line > span { display: inline-block; }
h1 em { color: var(--signal); }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); max-width: 36em; margin: 0 0 34px; }
.lede b { font-weight: 600; color: var(--ink); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; font-size: 16px;
  border: 1px solid var(--ink); overflow: hidden; isolation: isolate;
  transition: color .35s var(--ease-out), transform .35s var(--ease-out);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--signal);
  transform: translateY(101%); transition: transform .5s var(--ease-out);
}
.btn-primary:hover::before { transform: translateY(0); }
.btn-primary:hover { border-color: var(--signal); }
.btn .arrow { transition: transform .4s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }
.copy-chip {
  display: inline-flex; align-items: center; gap: 12px; padding: 13px 16px 13px 18px; border-radius: 999px;
  border: 1px dashed var(--line); background: color-mix(in srgb, var(--card) 70%, transparent);
  font-family: var(--mono); font-size: 14px; color: var(--ink-2); cursor: pointer;
  transition: border-color .3s, background .3s;
}
.copy-chip:hover { border-color: var(--ink); border-style: solid; }
.copy-chip .dollar { color: var(--muted); }
.copy-chip .state { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); min-width: 46px; text-align: right; }
.copy-chip.copied .state { color: var(--ok); }

/* ---------- Trace player ---------- */
.player {
  --T: 3.2s; /* time for the playhead to cross the trace */
  position: relative; margin: 64px 0 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 1px 0 var(--line-soft), 0 30px 60px -30px rgba(40, 30, 10, .25);
  overflow: hidden;
}
.player-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.player-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.player-title strong { font-weight: 600; }
.clock { font-family: var(--mono); font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.player-actions { display: flex; align-items: center; gap: 16px; }
.legend { display: flex; gap: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.replay {
  font: 500 12.5px var(--mono); text-transform: uppercase; letter-spacing: .06em;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2);
  padding: 6px 12px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  transition: border-color .3s, color .3s;
}
.replay:hover { border-color: var(--ink); color: var(--ink); }
.replay svg { transition: transform .6s var(--ease-out); }
.replay:hover svg { transform: rotate(-200deg); }

.trace { position: relative; padding: 8px 18px 18px; }
.ruler, .row { display: grid; grid-template-columns: minmax(150px, 36%) 1fr 64px; align-items: center; column-gap: 14px; }
.ruler { height: 30px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.ticks { position: relative; height: 100%; }
.ticks span { position: absolute; top: 8px; transform: translateX(-50%); white-space: nowrap; }
.ticks span:first-child { transform: none; }
.row { height: 34px; border-top: 1px solid var(--line-soft); font-size: 14px; }
.row .name { display: flex; align-items: center; gap: 8px; min-width: 0; padding-left: calc(var(--d, 0) * 16px); }
.row .label { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kind {
  flex: none; font: 500 10px var(--mono); letter-spacing: .05em; padding: 2px 5px; border-radius: 4px;
  color: var(--k); background: color-mix(in srgb, var(--k) 12%, transparent);
}
.row.b { --k: var(--browser); } .row.s { --k: var(--server); }
.track { position: relative; height: 12px; }
.track .bar {
  position: absolute; top: 0; bottom: 0; left: calc(var(--s) * 100%); width: calc(var(--w) * 100%); min-width: 3px;
  border-radius: 3px; background: var(--k); transform-origin: left center;
}
.row.hot .bar { background: var(--signal); }
.row.hot .bar::after {
  content: ""; position: absolute; inset: -4px; border-radius: 6px; border: 1.5px solid var(--signal); opacity: 0;
}
.dur { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row.hot .dur { color: var(--signal); font-weight: 600; }
.flag {
  flex: none; font: 600 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--signal);
  padding: 2px 6px; border-radius: 4px;
}
.playhead {
  position: absolute; top: 38px; bottom: 18px; width: 1px; background: var(--ink); opacity: 0;
  left: var(--track-left, 40%); pointer-events: none;
}
.playhead::before {
  content: ""; position: absolute; top: -5px; left: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink);
}
.insight {
  display: flex; gap: 12px; align-items: flex-start; margin: 4px 18px 18px; padding: 12px 14px;
  border-radius: 10px; border: 1px solid color-mix(in srgb, var(--signal) 40%, transparent);
  background: color-mix(in srgb, var(--signal) 8%, transparent); font-size: 14.5px;
}
.insight .mono { color: var(--signal); flex: none; padding-top: 2px; }

/* Playback. Without JavaScript, or with reduced motion, the finished trace is shown. */
.js .player:not(.done) .bar { transform: scaleX(0); }
.js .player:not(.done) .dur,
.js .player:not(.done) .flag,
.js .player:not(.done) .insight { opacity: 0; }
.player.play .bar { animation: grow calc(var(--w) * var(--T)) linear calc(var(--s) * var(--T)) both; }
.player.play .dur, .player.play .flag { animation: fade .4s var(--ease-out) calc((var(--s) + var(--w)) * var(--T)) both; }
.player.play .row.hot .bar::after { animation: ring 1.4s var(--ease-out) calc(var(--T) + .1s) 2 both; }
.player.play .insight { animation: rise .7s var(--ease-out) calc(var(--T) + .2s) both; }
.player.play .playhead { animation: sweep var(--T) linear both, hide .3s linear var(--T) forwards; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.12, 1.6); } }
@keyframes sweep {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 1; transform: translateX(var(--track-width, 400px)); }
}
@keyframes hide { to { opacity: 0; } }

/* ---------- Sections ---------- */
section { padding: 110px 0; }
.section-head { display: grid; grid-template-columns: 180px 1fr; gap: 24px; margin-bottom: 56px; }
.section-head .mono { padding-top: 14px; }
h2 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5.2vw, 64px);
  line-height: 1.02; letter-spacing: -.02em; margin: 0; max-width: 14em;
}
h2 em { color: var(--signal); }
.section-head p { color: var(--ink-2); max-width: 38em; margin: 18px 0 0; font-size: 18px; }

/* Before / after */
.contrast { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: var(--card); }
.panel h3 { margin: 0 0 18px; font-size: 15px; font-weight: 600; }
.tools { list-style: none; margin: 0; padding: 0; }
.tools li {
  position: relative; display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 0; border-top: 1px solid var(--line-soft); color: var(--ink-2);
}
.tools li small { color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.tools li::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: var(--signal);
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease-out);
  transition-delay: calc(var(--i) * 140ms + 200ms);
}
.tools.in li::after { transform: scaleX(1); }
.tools.in li { color: var(--muted); transition: color .4s calc(var(--i) * 140ms + 400ms); }
.panel.one { background: var(--night); color: var(--night-ink); border-color: var(--night); display: flex; flex-direction: column; }
.panel.one h3 { color: var(--night-ink); }
.panel.one p { color: var(--night-muted); margin: 0 0 22px; }
.mini { margin-top: auto; display: grid; gap: 7px; }
.mini span { height: 9px; border-radius: 3px; transform-origin: left; }
.mini span:nth-child(odd) { background: #5b86ff; } .mini span:nth-child(even) { background: #9b7bff; }
.mini span.h { background: var(--signal); }
.reveal-bars .mini span { transform: scaleX(0); transition: transform .9s var(--ease-out); transition-delay: calc(var(--i) * 90ms + 900ms); }
.reveal-bars.in .mini span { transform: scaleX(1); }

/* Features */
.features { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.feature {
  display: grid; grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: start;
  padding: 34px 0; border-top: 1px solid var(--line); position: relative;
}
.feature::before {
  content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 100%; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease-out);
}
.feature:hover::before { transform: scaleX(1); }
.feature .num { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 10px; transition: color .3s; }
.feature:hover .num { color: var(--signal); }
.feature h3 { font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
.feature p { margin: 6px 0 0; color: var(--ink-2); }
.feature .note { display: block; margin-top: 12px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

/* How it works */
.flow { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.flow-line { position: absolute; left: 0; right: 0; top: 54px; height: 40px; pointer-events: none; z-index: 0; }
.flow-line path { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 4 6; opacity: .45; }
.flow-line .draw { stroke-dasharray: 1200; stroke-dashoffset: 1200; opacity: 1; stroke: var(--signal); stroke-width: 1.6; }
.flow.in .flow-line .draw { animation: draw 2.4s var(--ease-out) .3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.packet { opacity: 0; }
.flow.in .packet { opacity: 1; transition: opacity .3s 2.4s; }
.node { position: relative; z-index: 1; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.node .icon { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px; border: 1px solid var(--line); background: var(--paper); }
.node h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.node p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.node code { background: var(--paper-2); padding: 1px 6px; border-radius: 5px; }
.header-demo {
  margin-top: 28px; padding: 16px 18px; border-radius: 12px; border: 1px dashed var(--line);
  font-family: var(--mono); font-size: 13.5px; overflow-wrap: anywhere; color: var(--ink-2);
}
.header-demo b { color: var(--ink); font-weight: 600; }
.header-demo .mono { display: block; margin-top: 8px; }
.header-demo .t { color: var(--browser); } .header-demo .p { color: var(--server); } .header-demo .f { color: var(--signal); }

/* Local-first band */
.night { background: var(--night); color: var(--night-ink); border-block: 1px solid var(--night-line); }
.night .mono { color: var(--night-muted); }
.night h2 { color: var(--night-ink); }
.night .section-head p { color: var(--night-muted); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--night-line); }
.fact { padding: 28px 24px 8px 0; border-right: 1px solid var(--night-line); }
.fact + .fact { padding-left: 24px; }
.fact:last-child { border-right: 0; }
.fact strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1; margin-bottom: 12px; color: var(--night-ink); }
.fact span { color: var(--night-muted); font-size: 15px; }

/* Install */
.install { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.code-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--night); overflow: hidden; }
.tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--night-line); }
.tab {
  font: 500 12.5px var(--mono); color: var(--night-muted); background: transparent; border: 0; cursor: pointer;
  padding: 9px 12px 11px; position: relative;
}
.tab[aria-selected="true"] { color: var(--night-ink); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--signal); }
.code-body { position: relative; }
pre { margin: 0; padding: 20px; overflow-x: auto; color: #e6e1d6; font-size: 13.5px; line-height: 1.65; }
pre .c { color: #7d776c; } pre .k { color: #c8b2ff; } pre .s { color: #8fb4ff; } pre .v { color: #ffb08a; }
.copy {
  position: absolute; top: 10px; right: 10px; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--night-muted); background: #1d1c19; border: 1px solid var(--night-line); border-radius: 7px; padding: 6px 9px; cursor: pointer;
  transition: color .3s, border-color .3s;
}
.copy:hover { color: var(--night-ink); border-color: #4a463e; }
.copy.copied { color: #5fd3a0; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 3px; }
.steps h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.steps p { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* FAQ */
.faq { border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 24px 0; font-size: 21px; font-weight: 500; letter-spacing: -.005em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); position: relative; transition: transform .45s var(--ease-out), border-color .3s; }
.faq summary .pm::before, .faq summary .pm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; background: var(--ink); transform: translate(-50%, -50%); }
.faq summary .pm::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .45s var(--ease-out); }
.faq details[open] summary .pm { transform: rotate(180deg); border-color: var(--ink); }
.faq details[open] summary .pm::after { transform: translate(-50%, -50%) rotate(0); }
.faq summary:hover { color: var(--signal); }
.faq .answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease-out); }
.faq details[open] .answer { grid-template-rows: 1fr; }
.faq .answer > div { overflow: hidden; }
.faq .answer p { margin: 0 0 24px; color: var(--ink-2); max-width: 46em; }

/* Maker */
.maker {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 40px; align-items: start;
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); background: var(--card); padding: 40px;
  position: relative; overflow: hidden;
}
.maker::after {
  /* A soft accent glow drifting slowly behind the card. */
  content: ""; position: absolute; width: 380px; height: 380px; right: -140px; top: -160px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--signal) 16%, transparent), transparent 70%);
  animation: drift 14s ease-in-out infinite alternate; pointer-events: none;
}
@keyframes drift { to { transform: translate(-80px, 60px); } }
.maker-id { display: flex; align-items: center; gap: 22px; position: relative; z-index: 1; }
.monogram { position: relative; flex: none; width: 112px; height: 112px; display: grid; place-items: center; }
.monogram span {
  width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--paper); font-family: var(--serif); font-size: 40px; letter-spacing: -.02em;
  transition: transform .6s var(--ease-out);
}
.maker:hover .monogram span { transform: scale(1.05) rotate(-6deg); }
.orbit { position: absolute; inset: 0; animation: spin 18s linear infinite; }
.orbit circle { fill: none; stroke: var(--signal); stroke-width: 1.2; stroke-dasharray: 3 9; }
@keyframes spin { to { transform: rotate(360deg); } }
.maker h3 { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1; margin: 0 0 8px; letter-spacing: -.01em; }
.role { margin: 0; color: var(--muted); font-size: 15px; }
.maker-body { position: relative; z-index: 1; }
.maker-body > p:first-child { margin: 0 0 22px; color: var(--ink-2); font-size: 17.5px; }
.maker-body b { color: var(--ink); font-weight: 600; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; padding: 0; }
.chips li { font-family: var(--mono); font-size: 12.5px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); }
.js .maker .chips li { opacity: 0; transform: translateY(8px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out), border-color .3s; transition-delay: calc(var(--i) * 70ms + 400ms); }
.js .maker.in .chips li { opacity: 1; transform: none; }
.chips li:hover { border-color: var(--signal); }
.maker-links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line); font-weight: 500; font-size: 15px; transition: border-color .3s, background .3s, transform .4s var(--ease-out);
}
.pill:hover { border-color: var(--ink); background: var(--paper-2); transform: translateY(-2px); }
.maker-note { margin: 0; color: var(--muted); font-size: 15px; }
.maker-note a { color: var(--ink-2); text-underline-offset: 3px; }
.maker-note a:hover { color: var(--signal); }
.foot > span a { color: var(--ink-2); }

/* Closing + footer */
.closing { text-align: center; padding: 130px 0 120px; }
.closing h2 { margin: 0 auto 30px; max-width: 12em; font-size: clamp(42px, 7vw, 88px); }
.closing .cta { justify-content: center; }
footer { border-top: 1px solid var(--line); padding: 34px 0 0; overflow: hidden; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; font-size: 14.5px; color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 22px; }
.foot a { text-decoration: none; color: var(--ink-2); }
.foot a:hover { color: var(--signal); }
.wordmark {
  font-family: var(--serif); font-size: clamp(90px, 21vw, 300px); line-height: .78; letter-spacing: -.045em;
  color: transparent; -webkit-text-stroke: 1px var(--line); margin: 40px 0 -.06em; white-space: nowrap; user-select: none;
  transition: color 1.2s var(--ease-out);
}
footer:hover .wordmark { color: var(--paper-2); }

/* ---------- Scroll reveals ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js h1 .line > span { transform: translateY(105%); transition: transform 1.1s var(--ease-out); transition-delay: calc(var(--i) * 110ms + 100ms); }
.js .loaded h1 .line > span { transform: none; }
.js .hero .fade { opacity: 0; transform: translateY(14px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); transition-delay: calc(var(--i) * 100ms + 450ms); }
.js .loaded .fade { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; gap: 6px; margin-bottom: 40px; }
  .feature { grid-template-columns: 56px 1fr; }
  .feature p { grid-column: 2; }
  .contrast, .install, .maker { grid-template-columns: 1fr; }
  .maker { padding: 28px; gap: 26px; }
  .flow { grid-template-columns: 1fr; }
  .flow-line { display: none; }
  .row .kind { display: none; }
  .row .name { padding-left: calc(var(--d, 0) * 10px); }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(2) { border-right: 0; }
  .fact:nth-child(3) { padding-left: 0; }
  section { padding: 80px 0; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .nav-links a.opt { display: none; }
  .nav-links { gap: 10px; }
  .hero { padding-top: 48px; }
  .ruler, .row { grid-template-columns: minmax(0, 44%) 1fr 54px; column-gap: 8px; }
  .trace { padding: 8px 12px 14px; }
  .player-bar { padding: 12px; }
  .player-title .mono, .row .flag { display: none; }
  .ticks span:not(:first-child):not(:last-child) { display: none; }
  .insight { margin: 4px 12px 14px; font-size: 14px; }
  .row .kind { display: none; }
  .row .name { padding-left: calc(var(--d, 0) * 8px); font-size: 13px; }
  .legend { display: none; }
  .facts { grid-template-columns: 1fr; }
  .fact, .fact + .fact { padding: 22px 0 6px; border-right: 0; border-bottom: 1px solid var(--night-line); }
  .faq summary { font-size: 18px; }
  .maker { padding: 22px; }
  .monogram { width: 84px; height: 84px; }
  .monogram span { width: 66px; height: 66px; font-size: 30px; }
  .maker h3 { font-size: 32px; }
  .copy-chip { font-size: 13px; }
}

@media (max-width: 380px) {
  .gh-label { display: none; }
  .gh { width: 38px; height: 38px; padding: 0; justify-content: center; }
  h1 { font-size: 42px; }
}

/* Touch screens: every control at least 44px tall, without changing the desktop look. */
@media (pointer: coarse) {
  .theme-toggle, .gh { min-width: 44px; min-height: 44px; }
  .replay, .copy, .tab { min-height: 44px; }
  .copy { top: 6px; right: 6px; }
  .brand { min-height: 44px; }
  .foot nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .copy-chip { min-height: 48px; }
  .pill { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal, .js .hero .fade, .js h1 .line > span { opacity: 1; transform: none; }
  .js .player:not(.done) .bar { transform: none; }
  .js .player:not(.done) .dur, .js .player:not(.done) .flag, .js .player:not(.done) .insight { opacity: 1; }
  .tools li::after { transform: scaleX(1); }
  .reveal-bars .mini span { transform: none; }
  .js .maker .chips li { opacity: 1; transform: none; }
  .flow-line .draw { stroke-dashoffset: 0; }
}
