/* kagi.sh. One stylesheet, no build step, no remote assets. Tokens follow the console (docs/design.md). */
@font-face {
  font-family: "Kagi Inter";
  src: url("/fonts/inter-v4.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Kagi Mono";
  src: url("/fonts/jetbrains-mono-v2.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0a0b;
  --rail: #0e0f11;
  --panel: #121417;
  --raised: #17191c;
  --hover: #1c1f23;
  --line: #1f2227;
  --border: #2b2f35;
  --border-strong: #3a3f47;
  --text: #f1f3f5;
  --muted: #a2aab5;
  --faint: #7d8590;
  --pale: #ededef;
  --green: #46a758;
  --focus: #4c8dff;
  --sans: "Kagi Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "Kagi Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --pad: 40px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
body { min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: #2b3a55; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0; }
.faint { color: var(--faint); }
.sep { margin: 0 6px; color: #4a5059; }
.wrap { width: 100%; max-width: calc(1120px + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 20;
  padding: 8px 12px; border-radius: 7px; background: var(--pale); color: var(--bg); font-size: 14px; font-weight: 500;
}
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 7px;
  color: var(--text); font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap;
  transition: background-color .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--hover); border-color: var(--border-strong); }
.btn.lg { height: 44px; padding: 0 20px; border-radius: 8px; font-size: 15px; }
.btn.primary { background: var(--pale); border-color: var(--pale); color: var(--bg); }
.btn.primary:hover { background: #fff; border-color: #fff; }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: transparent; color: var(--text); }
.btn.ghost .i { transition: transform .2s var(--ease); }
.btn.ghost:hover .i { transform: translateX(3px); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 10, 11, .82);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; height: 64px; gap: 32px; }
.top-logo { display: block; color: var(--pale); padding: 6px 0; }
.top-logo svg { height: 16.5px; width: auto; fill: currentColor; } /* 16 px cap height */
.top-nav { display: flex; gap: 28px; margin-left: auto; font-size: 14px; color: var(--muted); }
.top-nav a { transition: color .12s; }
.top-nav a:hover { color: var(--text); }

/* ---------- hero ---------- */
.hero { padding: 104px 0 0; }
.masthead { display: flex; align-items: flex-start; gap: 28px; --lh: 49.5px; }
.mast-logo { height: var(--lh); width: auto; flex: none; fill: var(--pale); } /* 48 px cap height, cut wordmark */
/* The shear line continues past the mark, through the middle of the gap. */
.masthead::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
  margin-top: calc(var(--lh) * 42.6 / 103.2 - .5px);
  transform-origin: left;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; margin-top: 64px; }
.hero h1 {
  font-size: 72px; line-height: 1.02; font-weight: 560; letter-spacing: -.038em;
  text-wrap: balance;
}
.lede { max-width: 440px; font-size: 18px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.ctas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.ctas .ghost { padding-left: 16px; }
.ctas.center { justify-content: center; }

/* ---------- demo ---------- */
.demo {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0 56px;
  margin-top: 104px;
}
.steps { display: flex; flex-direction: column; padding-top: 4px; }
.step {
  position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 6px 0;
  padding: 22px 0 24px; border: 0; border-top: 1px solid var(--line);
  background: none; color: var(--faint); font: inherit; text-align: left; cursor: pointer;
  transition: color .2s;
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step-n { font-family: var(--mono); font-size: 12.5px; line-height: 24px; }
.step-t { font-size: 17px; line-height: 24px; font-weight: 500; letter-spacing: -.01em; color: var(--muted); transition: color .2s; }
.step-d { grid-column: 2; font-size: 14px; line-height: 1.55; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .35s var(--ease), opacity .25s; }
.step:hover .step-t { color: var(--text); }
.step[aria-selected="true"] { color: var(--muted); }
.step[aria-selected="true"] .step-n { color: var(--pale); }
.step[aria-selected="true"] .step-t { color: var(--text); }
.step[aria-selected="true"] .step-d { max-height: 80px; opacity: 1; }
.step-bar { position: absolute; left: 0; right: 0; top: -1px; height: 1px; overflow: hidden; }
.step[aria-selected="true"] .step-bar { background: var(--border-strong); }
.step-bar::after { content: ""; position: absolute; inset: 0; background: var(--pale); transform: scaleX(0); transform-origin: left; }
.demo.auto .step[aria-selected="true"] .step-bar::after { animation: fill 7s linear forwards; }
.demo.paused .step-bar::after { animation-play-state: paused !important; }
@keyframes fill { to { transform: scaleX(1); } }

.demo figcaption { grid-column: 2; margin-top: 14px; font-size: 12.5px; color: var(--faint); }

.win {
  min-width: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--rail);
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8);
}
.win-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 52px; padding: 0 20px; border-bottom: 1px solid var(--line); font-size: 13px;
}
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who b { font-weight: 600; font-size: 14px; }
.idn { width: 20px; height: 20px; flex: none; }
.win-meta { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.srv { display: inline-flex; align-items: center; gap: 8px; padding: 0 10px; height: 24px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 12px; }
.srv-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pale); }

.stages { display: grid; padding: 28px 28px 32px; }
.stage { grid-area: 1 / 1; min-width: 0; transition: opacity .3s, visibility 0s .3s; }
.stage[hidden] { display: block; visibility: hidden; opacity: 0; }
.stage.is-on { transition: opacity .35s .12s, visibility 0s; }

.st-head { margin-bottom: 20px; }
.st-title { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -.015em; }
.st-sub { margin-top: 2px; font-size: 13px; color: var(--faint); }
.prov { display: flex; align-items: center; flex-wrap: wrap; margin-top: 4px; font-size: 12.5px; color: var(--faint); }
.prov .i { width: 13px; height: 13px; margin-right: 6px; }

.grp { margin: 22px 0 10px; font-size: 13px; font-weight: 600; }
.grp span { margin-left: 6px; color: var(--faint); font-weight: 500; }
.rows { border: 1px solid var(--border); border-radius: 12px; background: var(--panel); overflow: hidden; }
.row {
  display: grid; grid-template-columns: 88px 64px minmax(0, 1fr) 104px 36px; align-items: center; gap: 12px;
  padding: 14px 16px; font-size: 14px;
}
.row + .row { border-top: 1px solid var(--line); }
.chip {
  display: inline-flex; align-items: center; gap: 5px; justify-self: start;
  height: 22px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px;
  color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap;
}
.chip .i { width: 11px; height: 11px; }
.chip-lock { color: var(--text); border-color: var(--border-strong); }
.nonce { font-weight: 500; font-variant-numeric: tabular-nums; line-height: 20px; }
.nonce small, .intent small, .sig small { display: flex; align-items: center; gap: 0; font-size: 12.5px; color: var(--faint); font-weight: 400; line-height: 20px; }
.intent { min-width: 0; }
.intent b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 22px; }
.intent small { margin-top: 2px; gap: 8px; white-space: nowrap; }
.intent small .sep { margin: 0 -2px; }
.intent .chip { height: 20px; }
.sig { display: flex; flex-direction: column; gap: 6px; }
.bar { display: inline-flex; gap: 3px; }
.bar i { width: 14px; height: 3px; border-radius: 2px; background: #2e3238; }
.bar i.on { background: var(--pale); }
.age { text-align: right; font-size: 12.5px; color: var(--faint); }

.kv { display: grid; grid-template-columns: 56px 1fr; gap: 4px 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); font-size: 14px; }
.kv dt { color: var(--faint); font-size: 13px; line-height: 22px; }
.kv dd b { display: block; font-weight: 500; line-height: 22px; }
.kv .hash { display: block; margin-top: 2px; color: var(--muted); word-spacing: 2px; }

.checks { margin-top: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); }
.checks li { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 50px; padding: 9px 16px; font-size: 14px; }
.checks li + li { border-top: 1px solid var(--line); }
.ck-l small { display: block; font-size: 12.5px; color: var(--faint); line-height: 18px; }
.ck-s { display: grid; justify-items: end; flex: none; font-size: 13px; }
.ck-s > * { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.ck-s .pend { color: var(--faint); visibility: hidden; }
.ck-s .pend::before { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--faint); }
.ck-s i, .st i, .ready i { width: 6px; height: 6px; border-radius: 50%; background: var(--pale); flex: none; }
.st i.ring { background: none; border: 1.5px solid var(--pale); }

.sign { display: grid; grid-template-columns: minmax(0, 1fr) 304px; gap: 20px; }
.sign-note { margin-top: 16px; font-size: 12.5px; color: var(--faint); }
.total { white-space: nowrap; }
.sigs { display: flex; flex-direction: column; }
.sigs .sign-btn { margin-top: auto; }
.sigs .sign-foot { margin-bottom: 16px; }
.device, .sigs { padding: 18px 20px 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); }
.device .st-title, .sigs .st-title { font-size: 15px; line-height: 22px; }
.nw { white-space: nowrap; }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fields dt { font-size: 12.5px; color: var(--faint); }
.fields dd { margin-top: 2px; font-size: 14px; font-weight: 500; }
.hashes { margin-top: 16px; }
.hashes dt { font-size: 12.5px; color: var(--faint); margin-top: 14px; }
.hashes dt:first-child { margin-top: 0; }
.hashes dd { margin-top: 6px; font-size: 13px; line-height: 1.7; word-spacing: 2px; color: var(--text); }
.hashes dd span { white-space: nowrap; }
.hashes dd span:nth-child(2)::after { content: "\A"; white-space: pre; }
.owners { margin-top: 14px; }
.owners li { display: flex; align-items: center; gap: 10px; height: 36px; font-size: 14px; }
.owners li > span:nth-child(2) { flex: 1; min-width: 0; white-space: nowrap; }
.st { display: inline-grid; justify-items: end; font-size: 13px; }
.st, .st > span { align-items: center; }
.st > span, .st { white-space: nowrap; }
.owners .st:not(.swap) { display: inline-flex; gap: 8px; }
.swap { display: inline-grid; }
.swap > * { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 8px; }
.sign-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.total > span { gap: 10px; }
.ready { display: inline-flex; align-items: center; gap: 8px; color: var(--text); white-space: nowrap; }
.ready i { background: var(--green); }
.sign-btn {
  display: grid; place-items: center; width: 100%; height: 40px; flex: none;
  border: 1px solid var(--border); border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 500;
}
.sign-btn > * { justify-content: center; }

/* Final states are the default; motion plays from the first state to the final one. */
.a-out { visibility: hidden; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .stage.is-on .row-new { animation: rowIn .6s var(--ease) .35s both, glow 2.4s ease .35s both; }
  .stage.is-on .a-lock { animation: in .4s ease 1.2s both; }

  .stage.is-on .checks .pend { animation: out .2s ease both; }
  .stage.is-on .checks .done { animation: in .3s ease both; }
  .stage.is-on .checks li:nth-child(1) > .ck-s > * { animation-delay: .6s; }
  .stage.is-on .checks li:nth-child(2) > .ck-s > * { animation-delay: 1.1s; }
  .stage.is-on .checks li:nth-child(3) > .ck-s > * { animation-delay: 1.9s; }
  .stage.is-on .checks li:nth-child(4) > .ck-s > * { animation-delay: 2.4s; }
  .stage.is-on .checks li:nth-child(5) > .ck-s > * { animation-delay: 2.8s; }
  .stage.is-on .checks li:nth-child(6) > .ck-s > * { animation-delay: 3.2s; }
  .stage.is-on .checks li { animation: in .35s ease both; }
  .stage.is-on .checks li:nth-child(2) { animation-delay: .08s; }
  .stage.is-on .checks li:nth-child(3) { animation-delay: .16s; }
  .stage.is-on .checks li:nth-child(4) { animation-delay: .24s; }
  .stage.is-on .checks li:nth-child(5) { animation-delay: .32s; }
  .stage.is-on .checks li:nth-child(6) { animation-delay: .4s; }

  .stage.is-on .a-cta { animation: out .15s ease 1.1s both; }
  .stage.is-on .a-busy { animation: busy 2.6s linear both; }
  .stage.is-on .a-done { animation: in .25s ease 2.6s both; }
  .stage.is-on .sign-btn { animation: btn .3s ease 2.6s both; }
  .stage.is-on .a-turn { animation: out .2s ease 2.7s both; }
  .stage.is-on .a-signed { animation: in .3s ease 2.7s both; }
  .stage.is-on .a-two { animation: out .2s ease 2.9s both; }
  .stage.is-on .a-three { animation: in .3s ease 2.9s both; }
  .stage.is-on .a-three .bar i:last-child { animation: barIn .5s var(--ease) 2.9s both; }
  .stage.is-on .a-ready { animation: in .4s ease 3.3s both; }
}
@keyframes in { from { opacity: 0; } to { opacity: 1; } }
@keyframes out { from { opacity: 1; visibility: visible; } to { opacity: 0; visibility: hidden; } }
@keyframes busy {
  0%, 42% { opacity: 0; visibility: hidden; }
  43%, 97% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}
@keyframes btn {
  from { background: var(--pale); border-color: var(--pale); color: var(--bg); }
  to { background: transparent; border-color: var(--border); color: var(--muted); }
}
@keyframes rowIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes glow { from { background: #1d2025; } to { background: transparent; } }
@keyframes barIn { from { transform: scaleX(0); } to { transform: none; } }
.a-three .bar i:last-child { transform-origin: left; }
/* The fake button reads as primary until it is signed. */
@media (prefers-reduced-motion: no-preference) {
  .a-cta, .a-busy { color: var(--bg); }
}

/* ---------- compatibility strip ---------- */
.facts { margin-top: 120px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; font-size: 14px; color: var(--muted); }
.facts b { color: var(--text); font-weight: 500; }
.facts ul { display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--faint); font-size: 14px; }

/* ---------- sections ---------- */
.sec { padding: 160px 0 0; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0 64px; align-items: end; }
.sec-head .label { grid-column: 1 / -1; }
.sec-head .sec-lede { margin: 0 0 6px; max-width: 440px; }
.sec-split .sec-head { display: block; }
.sec-split .sec-head .sec-lede { margin-top: 24px; max-width: 620px; }
.label { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; color: var(--faint); }
.label::before { content: ""; width: 8px; height: 8px; background: var(--border-strong); }
h2 { margin-top: 20px; max-width: 16ch; font-size: 48px; line-height: 1.06; font-weight: 560; letter-spacing: -.032em; text-wrap: balance; }
.sec-lede { max-width: 620px; margin-top: 24px; font-size: 17px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
h3 { font-size: 17px; line-height: 24px; font-weight: 600; letter-spacing: -.01em; }
.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin-left: 8px; vertical-align: 2px;
  border: 1px solid var(--border); border-radius: 6px; font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--muted);
}
.fi { width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 48px; margin-top: 72px; }
.features article { padding: 32px 0 48px; border-top: 1px solid var(--line); }
.features h3 { margin-top: 24px; }
.features p { margin-top: 10px; font-size: 15px; line-height: 1.65; color: var(--muted); }

.how { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; margin-top: 80px; }
.how::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 1px; background: var(--border); }
.how li { position: relative; padding-top: 44px; }
.node { position: absolute; left: 0; top: 0; width: 9px; height: 9px; background: var(--pale); }
.how h3 { margin-top: 20px; }
.how p { margin-top: 10px; font-size: 15px; line-height: 1.65; color: var(--muted); }
.how-note { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--faint); }
.how-note .tag { margin: 0; }

.sec-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 80px; align-items: start; }
.sticky { position: sticky; top: 112px; }
.principles { counter-reset: p; }
.principles li { display: grid; grid-template-columns: 48px 1fr; padding: 28px 0 30px; border-top: 1px solid var(--line); }
.principles li:last-child { border-bottom: 1px solid var(--line); }
.pn { color: var(--faint); line-height: 24px; }
.principles p { margin-top: 8px; font-size: 15px; line-height: 1.65; color: var(--muted); }

.teams { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 72px; }
.teams article { padding: 24px 24px 32px; border: 1px solid var(--line); border-radius: 14px; background: var(--rail); }
.mini {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--panel); font-size: 13px;
}
.mini-t { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-n { color: var(--faint); }
.teams h3 { margin-top: 28px; }
.teams p { margin-top: 10px; font-size: 15px; line-height: 1.65; color: var(--muted); }

/* ---------- closing ---------- */
.cta { margin-top: 176px; padding: 0 0 152px; text-align: center; }
.cta-line { position: relative; display: flex; justify-content: center; margin-bottom: 64px; }
.cta-line::before {
  content: ""; position: absolute; left: 0; right: 0; top: calc(56px * 41 / 100 - .5px); height: 1px; background: var(--line);
}
.cta-line svg { position: relative; width: 56px; height: 56px; fill: var(--pale); }
.cta h2 { margin: 0 auto; max-width: 16ch; font-size: 56px; letter-spacing: -.035em; }
.cta .sec-lede { margin: 20px auto 0; max-width: 520px; }
.cta .ctas { margin-top: 36px; }

.foot { border-top: 1px solid var(--line); }
.foot-in { display: grid; grid-template-columns: 1fr auto; gap: 20px 40px; padding-top: 40px; padding-bottom: 48px; font-size: 13px; color: var(--faint); }
.foot-brand { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.foot-logo { height: 14.5px; width: auto; fill: var(--muted); }
.kanji { display: flex; align-items: center; gap: 10px; }
.kanji svg { width: 18px; height: 18px; fill: var(--muted); }
.foot-note { grid-column: 1; max-width: 520px; }
.foot-copy { grid-column: 2; grid-row: 1; align-self: center; text-align: right; }
.foot-copy a:hover, .foot a:hover { color: var(--text); }

/* ---------- 1024 ---------- */
@media (max-width: 1180px) {
  :root { --pad: 32px; }
  .hero h1 { font-size: 64px; }
  .demo { grid-template-columns: minmax(0, 1fr); margin-top: 96px; }
  .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-bottom: 28px; padding: 0; }
  .step { grid-template-columns: 1fr; padding: 18px 0 0; align-content: start; }
  .step:last-child { border-bottom: 0; }
  .step-d { grid-column: 1; max-height: none; opacity: 1; }
  .step-t { font-size: 16px; }
  .demo figcaption { grid-column: 1; }
  .row { grid-template-columns: 80px 56px minmax(0, 1fr) 96px; }
  .row .age { display: none; }
  .features { gap: 0 32px; }
  .how { gap: 32px; }
  .sec-split { gap: 56px; }
  h2 { font-size: 44px; }
}

/* ---------- 760 and below ---------- */
@media (max-width: 760px) {
  :root { --pad: 20px; }
  html { scroll-padding-top: 72px; }
  .top-in { height: 56px; }
  .top-nav { display: none; }
  .top .btn { margin-left: auto; height: 36px; }
  .hero { padding-top: 64px; }
  .masthead { --lh: 33px; gap: 20px; } /* 32 px cap: the cut's minimum */
  .hero-grid { grid-template-columns: 1fr; gap: 20px; margin-top: 40px; }
  .sec-head { grid-template-columns: 1fr; }
  .sec-head .sec-lede { margin: 18px 0 0; }
  .hero h1 { font-size: 42px; line-height: 1.04; letter-spacing: -.035em; }
  .lede { font-size: 17px; }
  .ctas { margin-top: 32px; }
  .ctas .btn { flex: 1 1 auto; }

  .demo { grid-template-columns: minmax(0, 1fr); margin-top: 72px; }
  .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; padding: 0; }
  .step { grid-template-columns: 1fr; padding: 14px 0 0; min-height: 44px; align-content: start; }
  .step:last-child { border-bottom: 0; }
  .step-n { line-height: 18px; }
  .step-t { font-size: 13.5px; line-height: 18px; margin-top: 2px; }
  .step-d { display: none; }
  .step-t { font-size: 13.5px; }
  .demo figcaption { grid-column: 1; }

  .win { border-radius: 12px; }
  .win-head { height: auto; padding: 14px 16px; }
  .who .mono, .win-meta .faint { display: none; }
  .stages { padding: 20px 16px 22px; }
  .st-title { font-size: 18px; line-height: 26px; }
  .row {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "chip nonce" "intent intent" "sig sig";
    gap: 10px 12px; padding: 14px;
  }
  .row .chip:first-child { grid-area: chip; }
  .row .nonce { grid-area: nonce; display: flex; align-items: baseline; gap: 6px; }
  .row .intent { grid-area: intent; }
  .row .sig { grid-area: sig; flex-direction: row; align-items: center; gap: 10px; white-space: nowrap; }
  .intent b { white-space: normal; }
  .intent small { flex-wrap: wrap; white-space: normal; }
  .kv { grid-template-columns: 1fr; }
  .kv .hash { word-spacing: 1px; }
  .checks li { padding: 10px 14px; align-items: flex-start; }
  .ck-s { padding-top: 1px; }
  .ck-l { min-width: 0; }
  .sign { gap: 14px; }
  .sign { grid-template-columns: 1fr; }
  .sigs .sign-foot { flex-direction: row; align-items: center; justify-content: space-between; }
  .device, .sigs { padding: 16px; }
  .hashes dd { font-size: 12.5px; word-spacing: 0; }
  .hashes dd span { display: block; }
  .hashes dd span:nth-child(2)::after { content: none; }
  .d-only { display: none; }

  .facts { margin-top: 88px; }
  .facts-in { flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 22px; padding-bottom: 22px; }
  .facts ul { gap: 6px 18px; }

  .sec { padding-top: 112px; }
  h2 { font-size: 34px; line-height: 1.1; letter-spacing: -.028em; margin-top: 16px; }
  .sec-lede { font-size: 17px; margin-top: 18px; }
  .features { grid-template-columns: 1fr; margin-top: 48px; }
  .features article { padding: 28px 0 32px; }
  .features h3 { margin-top: 18px; }
  .how { grid-template-columns: 1fr; gap: 40px; margin-top: 56px; padding-left: 32px; }
  .how::before { left: 4px; right: auto; top: 4px; bottom: 4px; width: 1px; height: auto; }
  .how li { padding-top: 0; }
  .node { left: -32px; }
  .how h3 { margin-top: 14px; }
  .how-note { margin-top: 44px; }
  .sec-split { grid-template-columns: 1fr; gap: 40px; }
  .sticky { position: static; }
  .principles li { grid-template-columns: 40px 1fr; padding: 24px 0 26px; }
  .teams { grid-template-columns: 1fr; gap: 14px; margin-top: 48px; }
  .teams article { padding: 20px 20px 26px; }
  .teams h3 { margin-top: 22px; }
  .cta { margin-top: 128px; padding-bottom: 104px; }
  .cta-line { margin-bottom: 48px; }
  .cta-line::before { top: calc(48px * 41 / 100 - .5px); }
  .cta-line svg { width: 48px; height: 48px; }
  .cta h2 { font-size: 38px; }
  .foot-in { grid-template-columns: 1fr; padding-top: 32px; padding-bottom: 40px; }
  .foot-copy { grid-column: 1; grid-row: auto; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}

/* ---------- 404 ---------- */
.nf-main { display: flex; flex-direction: column; justify-content: center; min-height: 100vh; padding-top: 64px; padding-bottom: 64px; }
.nf-logo { display: block; width: 40px; margin-bottom: 72px; }
.nf-logo svg { width: 40px; height: 40px; fill: var(--pale); }
.nf h1 { margin-top: 20px; font-size: 48px; line-height: 1.06; font-weight: 560; letter-spacing: -.032em; }
@media (max-width: 760px) { .nf h1 { font-size: 34px; } }
