/* soft.systems: minimal and technical. A light page that breathes, the menu in a rail on the right,
   Geist for text and Geist Mono for anything measured (prices, indices, ranges, specs).
   Plugins keep their own warm graphite and accent wherever they are shown. Flat: no gradients. */

/* ---------- fonts ---------- */
/* One file per weight, each declaring exactly that weight (a weight range on a single-weight file breaks matching). */

@font-face { font-family: "Geist"; src: url("/assets/fonts/geist-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/assets/fonts/geist-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/assets/fonts/geist-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/geist-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/geist-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

/* ---------- tokens ---------- */

:root {
  --bg: #fafaf9;
  --rail: #f3f3f1;
  --card: #ffffff;
  --sunk: #efeeeb;
  --ink: #111110;
  --ink2: #4a4945;
  --mute: #87867f;
  --faint: #b9b8b1;
  --line: rgba(17, 17, 16, 0.09);
  --line2: rgba(17, 17, 16, 0.17);
  --wave: #cfcdc6;
  --soft: #9b998f;

  --acc-cumulus: #4a7048;
  --acc-inertia: #2c7a72;
  --acc-tide: #3e5c8c;
  --acc-afterecho: #8e4a66;
  --acc-vortex: #9a4f2e;

  --st-released: #2f9e5a;
  --st-beta: #d08a12;
  --st-dev: #a3a29b;

  --ok-bg: #e6f0e4;
  --ok: #2f6b3e;
  --err-bg: #f6e4de;
  --err: #9c3a22;

  --acc: var(--ink);

  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --rail-w: 272px;
  --pad: 56px;
  --wide: 1040px;
  --r: 12px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

/* The plugins' own warm graphite, for anything that shows a plugin. */
.dark {
  --bg: #141310;
  --card: #1d1b17;
  --sunk: #2a2823;
  --ink: #ede8dd;
  --ink2: #b9b3a6;
  --mute: #8b8578;
  --faint: #585349;
  --soft: #8b8578;
  --line: rgba(237, 232, 221, 0.1);
  --line2: rgba(237, 232, 221, 0.2);
  --wave: #3a372f;
  --acc-cumulus: #9ac096;
  --acc-inertia: #57b7af;
  --acc-tide: #88a6d4;
  --acc-afterecho: #d08caa;
  --acc-vortex: #d6885e;
  background: var(--bg);
  color: var(--ink);
  color-scheme: dark;
}

/* Each plugin's accent, resolved per element so dark surfaces get the dark variant. */
.p-cumulus { --acc: var(--acc-cumulus); }
.p-inertia { --acc: var(--acc-inertia); }
.p-tide { --acc: var(--acc-tide); }
.p-afterecho { --acc: var(--acc-afterecho); }
.p-vortex { --acc: var(--acc-vortex); }

/* ---------- base ---------- */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--f-sans); letter-spacing: -0.011em; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--acc) 22%, transparent); }
h1, h2, h3 { font-weight: 500; }
.n { font: 400 11px/1 var(--f-mono); letter-spacing: 0; color: var(--mute); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wordmark { font-weight: 600; font-size: 17px; letter-spacing: -0.035em; white-space: nowrap; }
.wordmark b { font-weight: 600; color: var(--acc); }

/* ---------- shell: content on the left, the rail on the right ---------- */

.main { margin-right: var(--rail-w); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; padding: 0 var(--pad); }
.mbar { display: none; }

.rail { position: fixed; top: 0; right: 0; bottom: 0; width: var(--rail-w); z-index: 30; display: flex; flex-direction: column; padding: 26px 32px 24px 36px; background: var(--rail); border-left: 1px solid var(--line); }
.rail-top { display: flex; justify-content: space-between; align-items: center; }
.rail-close { display: none; }
.rail-mid { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; justify-content: center; margin: 20px -32px 20px -36px; padding: 12px 32px 12px 36px; }
.rail-mid::-webkit-scrollbar { display: none; }
.rail-mid:has(.toc) { justify-content: flex-start; }
.rail-foot { display: grid; gap: 2px; font: 400 11px/1.5 var(--f-mono); color: var(--mute); }

.menu { display: grid; gap: 30px; margin-top: -40px; }
.menu-group { display: grid; justify-items: start; }
.menu-label { font: 400 11.5px/1 var(--f-mono); color: var(--mute); margin-bottom: 12px; }
.menu-item { position: relative; font-size: 25px; line-height: 1.32; letter-spacing: -0.035em; color: var(--mute); text-transform: lowercase; transition: color 0.3s var(--ease), transform 0.3s var(--ease); }
.menu-item:hover { color: var(--ink); transform: translateX(4px); }
.menu-item[aria-current] { color: var(--ink); }
.menu-item[aria-current]::before { content: ""; position: absolute; left: -16px; top: 50%; width: 6px; height: 6px; margin-top: -2px; border-radius: 1.5px; background: var(--acc); }
.menu-item sup { font: 400 10.5px/0 var(--f-mono); letter-spacing: 0; margin-left: 6px; color: var(--mute); }
.menu-item[aria-current] sup { color: var(--acc); }
.menu-item-sm { font-size: 19px; }
.menu-sub { font-size: 13.5px; color: var(--mute); padding: 1px 0 6px 2px; transition: color 0.3s var(--ease), transform 0.3s var(--ease); }
.menu-sub:hover, .menu-sub[aria-current] { color: var(--ink); transform: translateX(3px); }
.menu-small { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; color: var(--mute); }
.menu-small a:hover { color: var(--ink); }

/* ---------- shared pieces ---------- */

.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 18px; font: 400 12px/1.4 var(--f-mono); color: var(--mute); text-transform: lowercase; }
.name { margin: 0; font-size: clamp(56px, 7.2vw, 108px); font-weight: 500; line-height: 0.9; letter-spacing: -0.058em; text-transform: lowercase; }
.status { display: inline-flex; align-items: center; gap: 7px; font: 400 12px/1 var(--f-mono); color: var(--ink2); white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--st); }
.st-released { --st: var(--st-released); }
.st-beta { --st: var(--st-beta); }
.st-dev { --st: var(--st-dev); }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font-size: 15px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: var(--ink2); }
body[class^="p-"] .btn-ink:hover, .feature .btn-ink:hover { background: var(--acc); }
.btn-line { border-color: var(--line2); color: var(--ink); background: transparent; }
.btn-line:hover { border-color: var(--ink); }
.btn-sm { height: 34px; padding: 0 16px; font-size: 14px; }

.seg { display: inline-flex; padding: 2px; border: 1px solid var(--line2); border-radius: 999px; }
.seg button { border: 0; background: none; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; color: var(--mute); }
.seg button:hover { color: var(--ink); }
.seg button.is-active { background: var(--ink); color: var(--bg); }

.specs { margin: 0; border-top: 1px solid var(--line); }
.specs div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.specs dt { font: 400 11.5px/1.7 var(--f-mono); color: var(--mute); }
.specs dd { margin: 0; }

.window { display: block; position: relative; overflow: hidden; border-radius: var(--r); border: 1px solid var(--line); background: #141310; box-shadow: 0 50px 90px -60px rgba(17, 17, 16, 0.55); }
.window img { width: 100%; height: 100%; object-fit: cover; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s var(--ease); }
.slide.is-active { opacity: 1; }
.caption { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--mute); }

/* section headings in the shop pages */
.pin-head h2, .notes-head h2, .teaser h2, .closing h2, .faq h2, .how h2, .feature .name { margin: 0; font-size: clamp(30px, 3.2vw, 40px); line-height: 1.04; letter-spacing: -0.045em; }

/* ---------- pinned rows: the page scrolls down, the row slides sideways (site.js) ---------- */

.pin { position: relative; margin: 0 calc(-1 * var(--pad)); }
.pin-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; width: 100%; max-width: calc(var(--wide) + 2 * var(--pad)); margin: 0 auto 36px; padding: 0 var(--pad); }
.pin-head p { margin: 0; max-width: 30em; font-size: 15px; color: var(--mute); }
.pin-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px max(var(--pad), calc((100% - var(--wide)) / 2)) 28px; }
.pin-track::-webkit-scrollbar { display: none; }
.pin.is-pinned .pin-sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.pin.is-pinned .pin-track { overflow-x: hidden; scroll-snap-type: none; }

/* ---------- home ---------- */

.intro { max-width: var(--wide); margin: 0 auto; padding: 128px 0 88px; }
.intro h1 { margin: 0 0 28px; font-size: clamp(48px, 6.6vw, 100px); line-height: 0.94; letter-spacing: -0.058em; }
.intro .lede { max-width: 33em; margin: 0; font-size: 20px; line-height: 1.45; letter-spacing: -0.02em; color: var(--ink2); }

.feature { max-width: var(--wide); margin: 0 auto 160px; }
.feature .window { transition: transform 0.6s var(--ease); }
.feature .window:hover { transform: translateY(-4px); }
.feature-row { display: grid; grid-template-columns: 1fr 1.15fr auto; gap: 40px; align-items: end; padding-top: 28px; }
.feature-row .kicker { margin-bottom: 12px; }
.feature-row .name { text-transform: lowercase; }
.feature-row > p { margin: 0; font-size: 15.5px; color: var(--ink2); }
.feature-buy { display: flex; align-items: center; gap: 10px; }
.feature-buy .buy-price { margin: 0 10px 0 0; font-size: 28px; }

.unit { flex: 0 0 380px; scroll-snap-align: start; }
.unit-stage { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: var(--r); padding: 14px; transition: transform 0.5s var(--ease); }
.unit-stage img { width: 100%; height: 100%; object-fit: contain; }
.unit-stage .fig { width: 100%; height: 100%; }
.unit:hover .unit-stage { transform: translateY(-4px); }
.unit-head { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 6px; }
.unit-name { font-size: 26px; font-weight: 500; letter-spacing: -0.04em; text-transform: lowercase; }
.unit-price { margin-left: auto; font: 400 13px var(--f-mono); }
.unit p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.45; color: var(--ink2); }
.unit-foot { display: flex; gap: 14px; align-items: center; font: 400 12px var(--f-mono); color: var(--mute); }

.how { max-width: var(--wide); margin: 0 auto; padding: 120px 0 160px; }
.steps-row { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin: 40px 0 0; padding: 0; }
.steps-row li { border-top: 1px solid var(--ink); padding-top: 16px; }
.steps-row b { display: block; margin: 16px 0 8px; font-size: 19px; font-weight: 500; letter-spacing: -0.025em; }
.steps-row p { margin: 0; font-size: 15px; color: var(--ink2); }

/* ---------- product ---------- */

.visual { max-width: var(--wide); margin: 0 auto; padding-top: 64px; }
.views { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-top: 16px; }
.views .caption { text-align: right; max-width: 46ch; margin-left: auto; }
.visual > .caption { margin-top: 16px; }
.tabs { display: flex; gap: 22px; }
.tabs button { border: 0; background: none; padding: 0; font-size: 14px; color: var(--mute); text-transform: lowercase; transition: color 0.3s var(--ease); }
.tabs button:hover, .tabs button.is-active { color: var(--ink); }
.tabs .n { margin-right: 7px; }
.tabs .is-active .n { color: var(--acc); }
.figcard { position: relative; border-radius: var(--r); padding: 48px 40px 36px; }
.figcard .fig { width: 100%; height: auto; }
.fig-title { position: absolute; top: 16px; left: 20px; font: 400 11.5px var(--f-mono); color: var(--mute); text-transform: lowercase; }

.head { max-width: var(--wide); margin: 0 auto; padding-top: 80px; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.head .lede { margin: 0 0 32px; font-size: 21px; line-height: 1.42; letter-spacing: -0.022em; }

.buy { position: relative; padding-top: 20px; border-top: 1px solid var(--ink); }
.buy > .seg { position: absolute; top: 18px; right: 0; }
.buy-price { margin-bottom: 20px; font-size: 44px; font-weight: 500; line-height: 1; letter-spacing: -0.045em; }
.buy-price.soon { font-size: 30px; color: var(--mute); }
.buy-actions { display: flex; gap: 10px; margin-bottom: 24px; }
.buy-note { margin: 10px 0 20px; font-size: 13.5px; color: var(--mute); }
.waitlist { display: flex; gap: 8px; }
.waitlist .input { flex: 1; min-width: 0; height: 44px; border-radius: 999px; padding: 0 18px; }

.statement { max-width: var(--wide); margin: 0 auto; padding: 176px 0 128px; font-size: clamp(32px, 4.2vw, 56px); font-weight: 500; line-height: 1.06; letter-spacing: -0.045em; }
.statement em { font-style: normal; color: var(--acc); }

.prose { max-width: var(--wide); margin: 0 auto; padding-bottom: 168px; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.prose p { max-width: 29em; margin: 0; font-size: 19px; line-height: 1.5; letter-spacing: -0.018em; color: var(--ink2); }
.prose p:nth-child(2) { margin-top: 136px; }

.face { flex: 0 0 340px; scroll-snap-align: start; padding: 22px 22px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.face h3 { display: flex; gap: 10px; align-items: baseline; margin: 0 0 16px; font-size: 16px; letter-spacing: -0.02em; }
.ctl { display: grid; grid-template-columns: 104px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.4; }
.ctl b { font-weight: 500; }
.ctl span { color: var(--ink2); }
.face-link { display: flex; flex-direction: column; gap: 12px; flex-basis: 240px; background: transparent; border-style: dashed; border-color: var(--line2); font-size: 18px; letter-spacing: -0.02em; transition: border-color 0.3s var(--ease); }
.face-link .arrow { margin-top: auto; font-size: 28px; transition: transform 0.3s var(--ease); }
.face-link:hover { border-color: var(--ink); }
.face-link:hover .arrow { transform: translateX(6px); }

.notes { max-width: var(--wide); margin: 120px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.note { padding-top: 16px; border-top: 1px solid var(--ink); }
.note h3 { margin: 16px 0 8px; font-size: 19px; letter-spacing: -0.025em; }
.note p { margin: 0; font-size: 15px; color: var(--ink2); }

.teaser { max-width: var(--wide); margin: 168px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding: 40px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.teaser p { margin: 14px 0 28px; max-width: 26em; font-size: 15.5px; color: var(--ink2); }
.teaser-toc { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.teaser-toc a { display: flex; gap: 14px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); transition: color 0.3s var(--ease), padding 0.3s var(--ease); }
.teaser-toc a:hover { padding-left: 6px; color: var(--acc); }
.teaser-toc .more { padding: 9px 0; font-size: 13.5px; color: var(--mute); }

.closing { max-width: var(--wide); margin: 184px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.closing h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.04; }
.included { list-style: none; margin: 32px 0 0; padding: 0; font-size: 14.5px; color: var(--ink2); }
.included li { padding: 9px 0; border-top: 1px solid var(--line); }
.included li::before { content: "+"; margin-right: 12px; font-family: var(--f-mono); color: var(--acc); }

.faq { max-width: var(--wide); margin: 168px auto 0; padding-bottom: 168px; display: grid; grid-template-columns: 1fr 2fr; gap: 56px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; font-size: 17px; letter-spacing: -0.015em; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-mono); color: var(--mute); transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { max-width: 60ch; margin: 0 0 22px; font-size: 15.5px; color: var(--ink2); }

/* the buy bar: slides up once the main buy block has scrolled away */
.buybar { position: fixed; left: 0; right: var(--rail-w); bottom: 0; z-index: 20; display: flex; align-items: center; gap: 20px; padding: 12px var(--pad); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); transform: translateY(101%); transition: transform 0.5s var(--ease); }
.buybar.is-shown { transform: none; }
.buybar-name { font-size: 14px; color: var(--mute); text-transform: lowercase; }
.buybar-name b { margin-right: 4px; font-weight: 500; color: var(--ink); }
.buybar-price { margin-left: auto; font: 400 14px var(--f-mono); }

.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- manual ---------- */

.manual { max-width: 760px; margin: 0 auto; padding-bottom: 120px; }
.manual-hero { padding: 104px 0 48px; border-bottom: 1px solid var(--line); }
.manual-hero .name { font-size: clamp(56px, 6.4vw, 92px); }
.manual-hero .sub { margin: 20px 0 0; max-width: 30em; font-size: 21px; line-height: 1.35; letter-spacing: -0.022em; color: var(--mute); }
.manual-hero .lede { margin: 28px 0 0; max-width: 34em; font-size: 18px; line-height: 1.5; }
.credit { margin: 28px 0 0; font: 400 12px/1.6 var(--f-mono); color: var(--mute); }

.chapter { padding-top: 80px; scroll-margin-top: 16px; }
.eyebrow { display: flex; gap: 12px; align-items: baseline; margin: 0 0 12px; font: 400 12px/1 var(--f-mono); color: var(--acc); text-transform: lowercase; }
.chapter > h2 { margin: 0 0 8px; font-size: 42px; line-height: 1.02; letter-spacing: -0.048em; }

.md { font-size: 16.5px; }
.md h3 { margin: 52px 0 6px; font-size: 23px; letter-spacing: -0.032em; scroll-margin-top: 16px; }
.md h4 { margin: 30px 0 0; font-size: 17px; font-weight: 600; letter-spacing: -0.018em; scroll-margin-top: 16px; }
.md h4 + p { margin-top: 6px; }
.md p, .md ul, .md ol { max-width: 64ch; }
.md p { margin: 14px 0; }
.md ol, .md ul { margin: 14px 0; padding-left: 1.4em; }
.md li { margin: 6px 0; padding-left: 0.2em; }
.md ol li::marker { font: 400 12.5px var(--f-mono); color: var(--mute); }
.md ul li::marker { color: var(--faint); }
.md strong { font-weight: 600; }
.md em { font-style: italic; }
.md a { text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; transition: text-decoration-color 0.2s; }
.md a:hover { text-decoration-color: var(--acc); }
.md code { padding: 1px 5px; border-radius: 5px; background: var(--sunk); font: 500 0.8em var(--f-mono); letter-spacing: 0; white-space: nowrap; }
.md pre { overflow-x: auto; padding: 14px 16px; border-radius: 8px; background: var(--sunk); font: 400 13px/1.55 var(--f-mono); }
.md pre code { padding: 0; background: none; font: inherit; white-space: pre; }
.md blockquote { margin: 22px 0; padding: 12px 16px; border-left: 2px solid var(--acc); border-radius: 0 8px 8px 0; background: var(--card); font-size: 15px; color: var(--ink2); }
.md blockquote p { margin: 0; }
.md hr { margin: 48px 0; border: 0; border-top: 1px solid var(--line); }
.tbl { margin: 18px 0 22px; overflow-x: auto; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.45; }
.tbl th { padding: 0 16px 8px 0; border-bottom: 1px solid var(--ink); text-align: left; font: 400 11.5px var(--f-mono); color: var(--mute); text-transform: lowercase; }
.tbl td { padding: 10px 16px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td:first-child { padding-right: 24px; font-weight: 500; white-space: nowrap; }

.manual-end { margin-top: 112px; padding: 44px; border-radius: 16px; }
.manual-end h2 { margin: 0 0 12px; font-size: 32px; letter-spacing: -0.04em; }
.manual-end p { max-width: 34em; margin: 0 0 24px; color: var(--ink2); }
.manual-end p a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* the manual's contents, in the rail */
.toc { display: grid; gap: 24px; padding-bottom: 12px; }
.toc-back { font-size: 14px; color: var(--mute); transition: color 0.3s var(--ease), transform 0.3s var(--ease); justify-self: start; }
.toc-back:hover { color: var(--ink); transform: translateX(-3px); }
.toc-group { display: grid; }
.toc-group a { padding: 3px 0 3px 12px; border-left: 1.5px solid var(--line); font-size: 14px; line-height: 1.35; color: var(--mute); transition: color 0.2s, border-color 0.2s; }
.toc-group a:hover { color: var(--ink); }
.toc-group a.on { color: var(--ink); border-left-color: var(--acc); }
.toc-buy { justify-self: start; }

/* ---------- figures (each plugin's own visualization) ---------- */
/* Every keyframe's 0% equals the static drawing, so paused == static. */

.fig [class*="a-"] { animation-play-state: var(--viz-play, paused); transform-box: view-box; }
.fig.animated { --viz-play: running; }
.a-head { animation: vzDrift 7s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes vzDrift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
.a-grain { animation: vzGrain var(--dur, 4s) linear infinite; animation-delay: var(--d, 0s); }
@keyframes vzGrain {
  0% { opacity: var(--o, 0.5); transform: translate(0, 0); }
  38% { opacity: calc(var(--o, 0.5) * 0.85); }
  52% { opacity: 0; transform: translate(var(--dx, 24px), var(--dy, 0px)); }
  52.01% { opacity: 0; transform: translate(calc(var(--dx, 24px) * -0.6), calc(var(--dy, 0px) * -0.6)); }
  66% { opacity: calc(var(--o, 0.5) * 0.9); }
  100% { opacity: var(--o, 0.5); transform: translate(0, 0); }
}
.a-spin { animation: vzSpin 9s linear infinite; }
@keyframes vzSpin { to { transform: rotate(360deg); } }
.a-notch { animation: vzNotch 7s ease-in-out infinite; }
@keyframes vzNotch { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(var(--namp, -12px)); } }
.a-ext { animation: vzExt 4.4s ease-in-out infinite; }
@keyframes vzExt { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(var(--ext, 0px)); } }
.a-echo { animation: vzEcho var(--edur, 4.2s) linear infinite; animation-delay: var(--d, 0s); }
@keyframes vzEcho { 0%, 100% { opacity: var(--o, 0.6); transform: scale(1); } 3% { opacity: 1; transform: scale(1.35); } 14% { opacity: var(--o, 0.6); transform: scale(1); } }
.a-orbit { animation: vzSpin 10s linear infinite; }
.a-sig { animation: vzSig var(--sdur, 2.4s) linear infinite; animation-delay: var(--sd, 0s); }
@keyframes vzSig { 0% { opacity: 0.95; } 12% { opacity: 0.3; } 82% { opacity: 0.06; } 100% { opacity: 0.95; } }
.a-sigdot { animation: vzSigDot var(--sdur, 2.4s) linear infinite; }
@keyframes vzSigDot { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@supports not (offset-path: path("M 0 0 L 1 1")) { .a-sigdot { display: none; } }

/* ---------- footer ---------- */

.foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 28px; padding: 28px var(--pad) 40px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--mute); }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot nav a:hover { color: var(--ink); }
.foot-note { margin-left: auto; font: 400 11.5px var(--f-mono); }
.foot .wordmark { color: var(--ink); font-size: 15px; }

/* ---------- pages, forms, account ---------- */

.page { max-width: 760px; margin: 0 auto; padding: 96px 0 140px; }
.narrow { max-width: 400px; margin: 0 auto; padding: 120px 0 160px; }
.page-title { margin: 0 0 8px; font-size: 34px; font-weight: 500; line-height: 1.1; letter-spacing: -0.045em; }
.lead { margin: 0 0 28px; font-size: 15.5px; color: var(--ink2); }

.acct { display: grid; grid-template-columns: 140px 1fr; gap: 48px; }
.acct-nav { position: sticky; top: 96px; align-self: start; display: grid; gap: 8px; font-size: 14px; }
.acct-nav a { color: var(--mute); transition: color 0.2s; }
.acct-nav a:hover { color: var(--ink); }
.acct section { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.acct section:last-child { border-bottom: 0; }
.acct h1 { margin: 0 0 24px; font-size: 34px; font-weight: 500; letter-spacing: -0.045em; }
.acct h2 { margin: 0 0 8px; font-size: 16px; font-weight: 500; }
.hint { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--ink2); }

.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 500; }
.input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 10px; background: var(--card); font-size: 15px; }
.input:focus { outline: 2px solid var(--acc); outline-offset: -1px; border-color: transparent; }
.input[readonly] { color: var(--mute); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row .input { flex: 1; min-width: 180px; }

.pill { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background 0.2s; }
.pill:hover { background: var(--ink2); }
.pill-ghost { background: var(--sunk); color: var(--ink); }
.pill-ghost:hover { background: color-mix(in oklab, var(--sunk) 85%, var(--ink)); }
.pill-wide { width: 100%; height: 44px; }
.pill:disabled { opacity: 0.5; cursor: default; }
.textbtn { padding: 0; border: 0; background: none; font-size: 13.5px; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; }
.textbtn:hover { color: var(--ink); }
.link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line2); }

.social { display: grid; gap: 8px; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px; border: 1px solid var(--line2); border-radius: 999px; background: var(--card); font-size: 15px; font-weight: 500; }
.social-btn:hover { border-color: var(--ink); }
.social-btn:disabled { opacity: 0.55; cursor: default; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; font: 400 12px var(--f-mono); color: var(--faint); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.switch { margin-top: 22px; text-align: center; font-size: 14px; color: var(--mute); }
.switch button { color: var(--ink); }

.msg { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.45; }
.msg:empty { display: none; }
.msg-ok { background: var(--ok-bg); color: var(--ok); }
.msg-err { background: var(--err-bg); color: var(--err); }

.lic { margin-bottom: 16px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.lic-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.lic-head b { font-size: 24px; font-weight: 500; letter-spacing: -0.04em; text-transform: lowercase; }
.meta { font: 400 12px var(--f-mono); color: var(--mute); }
.lic-sub { margin: 4px 0 14px; font-size: 14px; color: var(--ink2); }
.lic-dl { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.machines { list-style: none; margin: 0 0 4px; padding: 0; border-top: 1px solid var(--line); }
.machines li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.machines .meta { display: block; }
.lic details { margin-top: 14px; }
.lic summary { font-size: 13.5px; color: var(--mute); cursor: pointer; }
.lic summary:hover { color: var(--ink); }
.lic details[open] summary { margin-bottom: 12px; }
.revoked { opacity: 0.55; }
.tag { padding: 1px 7px; border-radius: 6px; background: var(--err-bg); color: var(--err); font-size: 12px; }

.connected { list-style: none; margin: 0; padding: 0; }
.connected li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.connected li > span { display: flex; align-items: center; gap: 10px; }

.devbox { padding: 14px; border: 1px dashed var(--line2); border-radius: 14px; font-size: 13.5px; color: var(--mute); }
.devbox .row { margin-top: 10px; }

.code { margin: 0 0 20px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); text-align: center; font: 500 28px var(--f-mono); letter-spacing: 0.08em; }
.summary-box { margin-bottom: 18px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); font-size: 14px; }
.summary-box div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.summary-box span { color: var(--mute); }
.stack { display: grid; gap: 8px; }

/* ---------- phone and narrow widths: the rail becomes a sheet ---------- */

@media (max-width: 980px) {
  :root { --pad: 20px; }
  html { scroll-padding-top: 72px; }
  .main { margin-right: 0; }
  .mbar { position: sticky; top: 0; z-index: 25; display: flex; justify-content: space-between; align-items: center; height: 56px; padding: 0 var(--pad); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .mbar-btn { padding: 6px 14px; border: 1px solid var(--line2); border-radius: 999px; font: 400 12.5px var(--f-mono); }
  .rail { width: min(360px, 88vw); transform: translateX(101%); transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
  .rail.is-open, .rail:target { transform: none; box-shadow: -40px 0 80px -40px rgba(17, 17, 16, 0.45); }
  .rail-close { display: inline; font: 400 12.5px var(--f-mono); color: var(--mute); }
  .menu { margin-top: 0; }
  .chapter, .md h3, .md h4 { scroll-margin-top: 72px; }

  .intro { padding: 64px 0 56px; }
  .feature { margin-bottom: 96px; }
  .feature-row, .head, .prose, .notes, .teaser, .closing, .faq, .steps-row { grid-template-columns: 1fr; }
  .feature-row { gap: 20px; }
  .feature-buy { flex-wrap: wrap; }
  .visual { padding-top: 24px; }
  .views { flex-direction: column; gap: 10px; }
  .views .caption { text-align: left; margin-left: 0; }
  .figcard { padding: 40px 16px 20px; }
  .head { padding-top: 40px; gap: 28px; }
  .head .lede { font-size: 18px; }
  .statement { padding: 104px 0 72px; }
  .prose { gap: 28px; padding-bottom: 96px; }
  .prose p:nth-child(2) { margin-top: 0; }
  .pin-head { flex-direction: column; gap: 8px; margin-bottom: 24px; }
  .face { flex-basis: 84vw; }
  .unit { flex-basis: 80vw; }
  .notes { margin-top: 72px; gap: 28px; }
  .teaser { margin-top: 104px; padding: 24px; gap: 28px; }
  .closing, .faq { margin-top: 112px; gap: 28px; }
  .faq { padding-bottom: 112px; }
  .how { padding: 72px 0 104px; }
  .buybar { right: 0; padding: 10px var(--pad); }
  .buybar-name { display: none; }
  .manual-hero { padding-top: 48px; }
  .chapter { padding-top: 64px; }
  .chapter > h2 { font-size: 32px; }
  .md { font-size: 16px; }
  .manual-end { padding: 28px 22px; }
  .acct { grid-template-columns: 1fr; gap: 24px; }
  .acct-nav { position: static; display: flex; flex-wrap: wrap; gap: 14px; }
  .page { padding-top: 48px; }
  .narrow { padding-top: 64px; }
  .foot-note { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .fig [class*="a-"] { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
