/* statice — one stylesheet for the landing page and the reference.
   One family, four faces, each with one job: Geist Serif speaks, Geist
   explains, Geist Mono is whatever you would type or be handed, and Geist
   Pixel labels things. */

@font-face { font-family: "Geist Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/geist-serif.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/geist.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/geist-mono.woff2") format("woff2"); }
@font-face { font-family: "Geist Pixel"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/geist-pixel.woff2") format("woff2"); }

/* ─── tokens ─────────────────────────────────────────────────────────── */
/* Every colour is taken off the dried bunch in fig. 3: the dark it hangs in,
   the cream and straw of the stems and palest florets, and the three colours
   that survive drying. There is one scheme; it does not follow the system. */
:root {
  color-scheme: dark;

  --paper:   #14121a;
  --ink:     #efe6d4;
  --muted:   #ac9f8a;
  --faint:   #8a7f70;
  --straw:   #b5a07c;
  --rule:    rgba(181, 160, 124, 0.24);
  --wash:    rgba(239, 230, 212, 0.055);
  --violet:  #9d8cf0;
  --rose:    #dc8ea6;
  --apricot: #eaa480;

  /* A slightly lifted surface, for the terminal, notes and the dried room. */
  --night:        #1b1822;
  --night-ink:    var(--ink);
  --night-muted:  var(--muted);
  --night-rule:   var(--rule);
  --night-violet: var(--violet);

  --serif: "Geist Serif", Georgia, serif;
  --sans:  "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:  "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --pixel: "Geist Pixel", "Geist Mono", ui-monospace, monospace;

  --gut:  clamp(1.25rem, 5vw, 4rem);
  --max:  74rem;
  --edge: max(var(--gut), calc((100vw - var(--max)) / 2 + var(--gut)));
  --air:  clamp(5.5rem, 12vw, 10.5rem);
}

/* ─── base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 2rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  font-synthesis: none; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility; overflow-x: hidden;
}
h1, h2, h3, p, ol, ul, figure, pre { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule);
  text-decoration-thickness: 1px; text-underline-offset: 0.22em; transition: text-decoration-color 0.2s; }
a:hover { text-decoration-color: currentColor; }
code, kbd { font: 0.9em/1 var(--mono); }
strong { font-weight: 600; }
::selection { background: var(--violet); color: var(--paper); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 2px; }

.wrap { padding-inline: var(--edge); }

.display { font: 400 clamp(2.5rem, 6vw, 5rem)/1.02 var(--serif); letter-spacing: -0.02em; text-wrap: balance; }
.title   { font: 400 clamp(2rem, 4.4vw, 3.3rem)/1.06 var(--serif); letter-spacing: -0.015em; text-wrap: balance; }
.display em, .title em { font-style: normal; color: var(--violet); }
#how .title em, #questions .title em { color: var(--apricot); }
#fingerprint .title em, .keep .title em { color: var(--rose); }
.lede { font-size: clamp(1.1rem, 1.5vw, 1.25rem); line-height: 1.55; color: var(--muted); max-width: 34rem; text-wrap: pretty; }
.lede strong { color: var(--ink); font-weight: 500; }
.eyebrow { font: 400 0.8125rem/1 var(--pixel); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.small { font-size: 0.875rem; line-height: 1.55; color: var(--faint); }

.skip { position: absolute; left: -9999px; z-index: 99; background: var(--ink); color: var(--paper); padding: 0.7rem 1.1rem; border-radius: 999px; }
.skip:focus { left: var(--gut); top: 1rem; }

/* ─── masthead ───────────────────────────────────────────────────────── */
.mast { position: relative; z-index: 5; display: flex; align-items: center; gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.1rem, 2.4vw, 1.75rem) var(--edge); font-size: 0.9375rem; }
.mark { display: inline-flex; align-items: center; gap: 0.55em; margin-right: auto; text-decoration: none;
  font: 400 1.4rem/1 var(--serif); letter-spacing: -0.01em; }
.mark svg { width: 1.05em; height: 1.05em; color: var(--violet); }
.mast nav { display: flex; align-items: center; gap: clamp(1rem, 2.6vw, 1.9rem); }
.mast nav a { text-decoration: none; color: var(--muted); transition: color 0.2s; }
.mast nav a:hover { color: var(--ink); }
@media (max-width: 34rem) { .mast .opt { display: none; } }

/* ─── buttons, commands ──────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 0.5em; padding: 0.8em 1.35em; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  font: 500 0.9375rem/1 var(--sans); text-decoration: none; white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s; }
.btn:hover { background: var(--violet); border-color: var(--violet); }
.btn--quiet { background: none; color: var(--ink); border-color: var(--rule); }
.btn--quiet:hover { background: none; border-color: var(--ink); }
.mast nav .btn { padding: 0.62em 1.05em; color: var(--paper); }
.mast nav .btn:hover { color: var(--paper); }
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* A command you can take with you. */
.cmd { display: flex; align-items: center; gap: 0.75rem; max-width: 100%;
  padding: 0.5rem 0.5rem 0.5rem 1.15rem; border: 1px solid var(--rule); border-radius: 999px;
  background: var(--wash); font: 400 0.9375rem/1.4 var(--mono); }
.cmd code { font: inherit; overflow-x: auto; white-space: nowrap; scrollbar-width: none; flex: 1; }
.cmd code::-webkit-scrollbar { display: none; }
.cmd code::before { content: "$ "; color: var(--faint); }
.cmd button { flex: none; font: 500 0.8125rem/1 var(--sans); padding: 0.6em 0.95em; border-radius: 999px;
  border: 0; background: var(--ink); color: var(--paper); cursor: pointer; transition: background 0.2s; min-width: 4.4em; }
.cmd button:hover { background: var(--violet); }
.cmd--inline { display: inline-flex; }

/* ─── figures: the grown ones ────────────────────────────────────────── */
.fig { position: relative; display: flex; flex-direction: column; min-width: 0; }
.fig__stage { position: relative; flex: 1; min-height: 20rem; cursor: grab; touch-action: pan-y; }
.fig__stage.is-held { cursor: grabbing; }
.fig__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fig figcaption { display: flex; gap: 0.9em; align-items: baseline; padding-top: 0.9rem; border-top: 1px solid var(--rule);
  font: 400 0.75rem/1.5 var(--mono); color: var(--faint); }
.fig figcaption > i { font: normal 400 0.8125rem/1.4 var(--pixel); color: var(--straw); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.06em; }
.fig figcaption > span:last-child { margin-left: auto; white-space: nowrap; }
@media (max-width: 30rem) { .fig figcaption > span:last-child { display: none; } }

/* ─── hero ───────────────────────────────────────────────────────────── */
.hero { display: grid; gap: clamp(2rem, 5vw, 4rem); padding: clamp(2rem, 6vw, 4.5rem) var(--edge) clamp(3.5rem, 7vw, 6rem); }
.hero__type { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: clamp(1.4rem, 2.6vw, 2rem); min-width: 0; }
.hero .cmd { width: min(100%, 23rem); }
.hero .fig__stage { min-height: clamp(22rem, 62svh, 40rem); }
@media (min-width: 60rem) {
  .hero { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); align-items: stretch;
    min-height: calc(100svh - 5rem); padding-top: clamp(1rem, 3vw, 2.5rem); }
  .hero .fig { margin-top: -3.5rem; }
}

/* ─── sections ───────────────────────────────────────────────────────── */
.sec { padding-block: var(--air); }
.sec + .sec { padding-top: 0; }
.sec__head { display: grid; align-content: start; gap: 1.2rem; max-width: 46rem; margin-bottom: clamp(2.6rem, 6vw, 4.5rem); }

/* three steps */
.steps { display: grid; gap: clamp(2rem, 4vw, 3rem); counter-reset: step; }
.step { counter-increment: step; display: flex; flex-direction: column; gap: 0.85rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); min-width: 0; }
.step::before { content: "0" counter(step); font: 400 2rem/1 var(--pixel); color: var(--apricot); }
.step h3 { font: 500 1.1875rem/1.3 var(--sans); letter-spacing: -0.01em; }
.step p { color: var(--muted); }
.step p { flex: 1; }
.step .url { margin: 0; flex: none; color: var(--violet); }
.url { font: 400 0.9375rem/1.4 var(--mono); color: var(--violet); padding: 0.85rem 1.15rem; border: 1px dashed var(--rule); border-radius: 999px; overflow-wrap: anywhere; }
@media (min-width: 56rem) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* terminal */
.term { margin-top: clamp(2.5rem, 6vw, 4.5rem); background: var(--night); color: var(--night-ink); border-radius: 14px;
  padding: clamp(1.2rem, 3vw, 2rem) clamp(1.2rem, 3.4vw, 2.4rem); font: 400 0.875rem/1.85 var(--mono);
  white-space: pre-wrap; overflow-wrap: anywhere; }
.term .dim { color: var(--night-muted); }
.term .out { color: var(--apricot); }
.term__cap { margin-top: 0.9rem; }

/* a prompt to hand to an agent */
.agent { margin-top: clamp(2.5rem, 6vw, 4.5rem); display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); padding-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--rule); }
.agent__head { display: grid; gap: 0.9rem; align-content: start; }
.agent__head h3 { font: 400 clamp(1.5rem, 2.6vw, 2rem)/1.15 var(--serif); letter-spacing: -0.01em; }
.agent__head p:last-child { color: var(--muted); max-width: 30rem; }
.agent__prompt { display: grid; gap: 1.2rem; justify-items: start; padding: clamp(1.2rem, 3vw, 1.8rem); border: 1px dashed var(--rule); border-radius: 14px; }
.agent__prompt p { font: 400 0.9375rem/1.7 var(--mono); color: var(--ink); }
.agent__prompt p code { font: inherit; color: var(--apricot); }
.agent__prompt button { font: 500 0.8125rem/1 var(--sans); padding: 0.7em 1.1em; border-radius: 999px; border: 0; background: var(--ink); color: var(--paper); cursor: pointer; transition: background 0.2s; }
.agent__prompt button:hover { background: var(--violet); }
@media (min-width: 60rem) { .agent { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); } }

/* fingerprint: type, hash, grow */
.print { display: grid; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.print .fig__stage { min-height: clamp(21rem, 56svh, 34rem); }
.print__body { display: grid; gap: 1.4rem; min-width: 0; }
.print__body p { color: var(--muted); max-width: 33rem; }
.field { display: grid; gap: 0.55rem; margin-top: 0.6rem; }
.field label { font: 400 0.8125rem/1 var(--pixel); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.field input { width: 100%; font: 400 clamp(1.5rem, 3vw, 2.1rem)/1.2 var(--serif); letter-spacing: -0.01em; color: var(--ink);
  background: none; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; padding: 0.25rem 0 0.55rem; outline: none;
  transition: border-color 0.2s; }
.field input:focus { border-color: var(--rose); box-shadow: 0 1px 0 var(--rose); }
.addr { font: 400 0.9375rem/1.5 var(--pixel); color: var(--rose); overflow-wrap: anywhere; min-height: 3.2em; }
.addr span { color: var(--faint); }
.tries { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.tries button { font: 400 0.8125rem/1 var(--sans); color: var(--muted); background: none; border: 1px solid var(--rule);
  border-radius: 999px; padding: 0.55em 0.95em; cursor: pointer; transition: color 0.2s, border-color 0.2s; }
.tries button:hover { color: var(--ink); border-color: var(--ink); }
@media (min-width: 60rem) { .print { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }

/* names */
.rows { border-top: 1px solid var(--rule); }
.row { display: grid; gap: 0.4rem 2.5rem; padding-block: clamp(1.15rem, 2.4vw, 1.6rem); border-bottom: 1px solid var(--rule); }
.row code { font: 400 0.9375rem/1.5 var(--mono); overflow-wrap: anywhere; }
.row code::before { content: "$ "; color: var(--faint); }
.row p { color: var(--muted); }
.row p b { color: var(--ink); font-weight: 500; }
@media (min-width: 56rem) { .row { grid-template-columns: minmax(0, 23rem) minmax(0, 1fr); align-items: baseline; } }

/* ─── the dark room ──────────────────────────────────────────────────── */
.keep { background: var(--night); color: var(--night-ink); margin-block: var(--air); }
.keep__in { display: grid; gap: clamp(2rem, 5vw, 5rem); padding: 0 var(--edge) var(--air); }
.keep .fig__stage { min-height: clamp(24rem, 70svh, 44rem); }
.keep .fig figcaption { border-color: var(--night-rule); color: var(--night-muted); }
.keep__body { display: grid; gap: 1.5rem; align-content: center; min-width: 0; padding-top: clamp(1rem, 4vw, 3rem); }
.keep .lede { color: var(--night-muted); }
.keep .lede strong { color: var(--night-ink); }
.facts { display: grid; gap: 0; margin-top: 0.8rem; border-top: 1px solid var(--night-rule); }
.facts li { padding-block: 1.15rem; border-bottom: 1px solid var(--night-rule); color: var(--night-muted); }
.facts b { display: block; margin-bottom: 0.3rem; color: var(--night-ink); font-weight: 500; }
.facts code { color: var(--night-ink); }
@media (min-width: 60rem) {
  .keep__in { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); padding-top: 0; }
  .keep__body { padding-block: var(--air) 0; }
}

/* ─── questions ──────────────────────────────────────────────────────── */
.faq { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.faq__list { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { display: flex; align-items: baseline; gap: 1rem; padding-block: 1.2rem; cursor: pointer; list-style: none;
  font: 500 1.0625rem/1.4 var(--sans); letter-spacing: -0.005em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; font: 400 1.25rem/1 var(--pixel); color: var(--apricot); transition: transform 0.25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); max-width: 40rem; padding-bottom: 1.4rem; }
.faq details p + p { margin-top: -0.6rem; }
@media (min-width: 60rem) { .faq { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); } }

/* ─── the last word, and the foot ────────────────────────────────────── */
.last { text-align: center; display: grid; justify-items: center; gap: 1.8rem; padding-block: var(--air); border-top: 1px solid var(--rule); }
.last .cmd { width: min(100%, 23rem); text-align: left; }
.last p { color: var(--muted); max-width: 30rem; }

.foot { padding: 1.6rem var(--edge) 2.4rem; border-top: 1px solid var(--rule); font-size: 0.875rem; color: var(--faint); }
.foot__links { display: flex; flex-wrap: wrap; gap: 0.7rem clamp(1.1rem, 3vw, 2rem); align-items: baseline; }
.foot__links span { margin-right: auto; }
.foot__links a { color: var(--muted); text-decoration: none; }
.foot__links a:hover { color: var(--ink); }

/* ─── arrival ────────────────────────────────────────────────────────── */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .rise { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 16%; }
    @keyframes rise { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: none; } }
  }
}

/* ─── the reference ──────────────────────────────────────────────────── */
.doc__head { padding: clamp(2.5rem, 7vw, 5.5rem) var(--edge) clamp(2.5rem, 6vw, 4.5rem); display: grid; gap: 1.2rem; }
.doc { display: grid; gap: clamp(2rem, 5vw, 5rem); padding: 0 var(--edge) var(--air); }
.doc__toc { font-size: 0.9375rem; }
.doc__toc ol { display: grid; gap: 0.55rem; }
.doc__toc a { color: var(--muted); text-decoration: none; }
.doc__toc a:hover { color: var(--violet); }
.doc__body { min-width: 0; max-width: 46rem; }
.doc__body h2 { font: 400 1.75rem/1.15 var(--serif); letter-spacing: -0.01em; margin: clamp(3rem, 6vw, 4.5rem) 0 1.1rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); }
.doc__body > h2:first-child { margin-top: 0; }
.doc__body p { margin-bottom: 1.1rem; color: var(--muted); }
.doc__body p strong, .doc__body td strong { color: var(--ink); }
.doc__body code { color: var(--ink); background: var(--wash); padding: 0.18em 0.4em; border-radius: 5px; font-size: 0.84em; line-height: 1.4; overflow-wrap: anywhere; }
.doc__body .scroll { overflow-x: auto; margin-bottom: 1.6rem; }
.doc__body table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
.doc__body th, .doc__body td { text-align: left; vertical-align: top; padding: 0.8rem 1.4rem 0.8rem 0; border-bottom: 1px solid var(--rule); color: var(--muted); }
.doc__body thead th { font: 400 0.8125rem/1 var(--pixel); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.doc__body td:first-child { font: 400 0.84rem/1.7 var(--mono); color: var(--ink); white-space: nowrap; }
.doc__body td:first-child code, .doc__body td code:only-child { background: none; padding: 0; }
.doc__body .note { margin-top: 2.4rem; padding: clamp(1.3rem, 3vw, 1.9rem); border-radius: 14px; background: var(--night); }
.doc__body .note p { margin: 0; color: var(--night-muted); }
.doc__body .note code { color: var(--night-ink); background: var(--wash); }
@media (max-width: 46rem) {
  .doc__body table, .doc__body tbody, .doc__body tr, .doc__body td { display: block; width: 100%; }
  .doc__body thead { display: none; }
  .doc__body tr { border-bottom: 1px solid var(--rule); padding-block: 0.9rem; }
  .doc__body td { border: 0; padding: 0; }
  .doc__body td:first-child { white-space: normal; margin-bottom: 0.25rem; }
}
@media (min-width: 60rem) {
  .doc { grid-template-columns: 13rem minmax(0, 1fr); }
  .doc__toc { position: sticky; top: 2rem; align-self: start; }
}
.doc__date { font: 400 0.8125rem/1 var(--pixel); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.doc__body ul { display: grid; gap: 0.6rem; margin-bottom: 1.1rem; color: var(--muted); }
.doc__body li { position: relative; padding-left: 1.2rem; }
.doc__body li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 0.4rem; height: 1px; background: var(--straw); }
.doc__body a { color: var(--violet); text-decoration-color: color-mix(in srgb, var(--violet) 35%, transparent); }
.doc__body .note a { color: var(--night-violet); }
