/* Perceptlayer design system: the site's styles. Tokens (light and dark) are in tokens.css, loaded first. */

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-height) + var(--space-6)); }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--signal-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-xs); }
:where(button, input, select, textarea) { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-sans); color: var(--ink); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(36px, 4.6vw, 48px); line-height: 1.08; font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(28px, 3.4vw, 36px); line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 20px; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: 20px; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--font-mono); font-size: 13.5px; }
:not(pre) > code { background: var(--surface-3); color: var(--ink); padding: 1px 6px; border-radius: var(--radius-xs); }
strong { font-weight: 600; color: var(--ink); }

/* Doto, the dot-matrix readout: only for the big moments, never below 24px, at most two per viewport */
.display-xl, .display, .moment, .rotor {
  font-family: var(--font-display); font-variation-settings: "ROND" 60; font-weight: 800;
  letter-spacing: 0.01em; line-height: 1.05; color: var(--ink);
}
.display-xl { font-size: clamp(40px, 6.4vw, 72px); }
.display { font-size: clamp(36px, 5vw, 56px); }
.moment { font-size: clamp(32px, 4vw, 44px); line-height: 1.1; }
.rotor { font-size: 24px; line-height: 1.3; font-weight: 700; }
.lead { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.5; color: var(--ink-2); max-width: 60ch; margin: 0; }
.small { font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.caption { font-size: 13px; line-height: 1.45; font-weight: 500; color: var(--ink-muted); }
.muted { color: var(--ink-muted); }
.mono { font-family: var(--font-mono); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html:not(.js) .js-only { display: none !important; }

/* Eyebrow and the signal dot */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font: 500 12px/1.2 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--signal-text); margin: 0 0 var(--space-4);
}
.eyebrow.quiet { color: var(--ink-muted); }
.dot {
  display: inline-block; flex: none; width: 8px; height: 8px; border-radius: var(--radius-full);
  background: var(--signal); animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* Layout */
.wrap { max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--container-narrow); color: var(--ink-2); }
.prose p, .prose ul, .prose ol { margin: 0 0 var(--space-6); }
.prose h2 { margin: var(--space-12) 0 var(--space-4); font-size: clamp(26px, 2.8vw, 30px); }
.prose h3 { margin: var(--space-8) 0 var(--space-3); }
.prose > h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: var(--space-1); }
.prose p > code { overflow-wrap: anywhere; }
.prose .code, .prose .scroll { margin: 0 0 var(--space-6); }
.band { padding: var(--space-16) 0; }
.band.tint { background: var(--surface-2); }
.band.ruled { border-top: 1px solid var(--line); }
@media (min-width: 1024px) { .band { padding: var(--space-24) 0; } }
.band-head { max-width: 760px; margin-bottom: var(--space-12); }
.band-head p:not(.eyebrow) { color: var(--ink-2); font-size: 18px; margin: var(--space-4) 0 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: var(--space-8); height: var(--nav-height); }
.logo { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink); text-decoration: none; flex: none; }
.logo svg { width: 24px; height: 24px; flex: none; }
.logo .frame { stroke: currentColor; }
.logo .pupil { fill: var(--signal); }
.logo-word { font: 700 20px/1 var(--font-sans); letter-spacing: -0.03em; }
.nav { display: flex; gap: var(--space-1); align-items: center; margin-right: auto; }
.nav a {
  height: 36px; display: inline-flex; align-items: center; padding: 0 var(--space-3); border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; color: var(--ink-2); text-decoration: none;
  transition: background-color 120ms var(--ease), color 120ms var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--surface-3); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav-end { display: flex; gap: var(--space-2); align-items: center; }
.menu { display: none; margin-left: auto; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] .menu-panel { display: grid; }
.menu-panel {
  display: none; position: absolute; left: 0; right: 0; top: var(--nav-height); gap: var(--space-1);
  background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  padding: var(--space-3) var(--gutter) var(--space-6);
}
.menu-panel a:not(.button) { padding: var(--space-3) 0; text-decoration: none; font-weight: 600; font-size: 18px; color: var(--ink); }
.menu-panel .button { margin-top: var(--space-3); }
@media (max-width: 860px) {
  .nav, .nav-end { display: none; }
  .menu { display: block; }
}

/* Footer */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--line); padding: var(--space-16) 0 var(--space-8); }
.footer-grid { display: grid; gap: var(--space-10); grid-template-columns: repeat(5, minmax(0, 1fr)); }
.footer-grid h2 {
  font: 500 12px/1.2 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-muted); margin: 0 0 var(--space-4);
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.footer-grid a { font-size: 14px; color: var(--ink-2); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.footer-base {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3) var(--space-6);
  margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-muted);
}
.footer-base p { margin: 0; }
.footer-base a { color: var(--ink-2); }
.footer-base .theme-toggle { margin-left: auto; }
@media (max-width: 1023px) { .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 639px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-8) var(--space-6); } }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: var(--control-md); padding: 0 var(--space-4); border-radius: var(--radius-sm);
  border: 1px solid var(--signal); background: var(--signal); color: var(--on-signal);
  font: 600 15px/1 var(--font-sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 120ms var(--ease), border-color 120ms var(--ease), color 120ms var(--ease);
}
.button:hover { background: var(--signal-hover); border-color: var(--signal-hover); }
.button.secondary { background: var(--surface-raised); border-color: var(--line-strong); color: var(--ink); }
.button.secondary:hover { background: var(--surface-3); }
.button.ghost { background: transparent; border-color: transparent; color: var(--ink); }
.button.ghost:hover { background: var(--surface-3); }
.button.danger { background: transparent; border-color: var(--line-strong); color: var(--danger); }
.button.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.button.small { height: var(--control-sm); padding: 0 var(--space-3); font-size: 14px; }
.button.large { height: var(--control-lg); padding: 0 var(--space-6); font-size: 16px; }
.button svg { width: 20px; height: 20px; flex: none; }
.button.small svg { width: 16px; height: 16px; }
.button[disabled], .button[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.actions { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; margin-top: var(--space-8); }
.fineprint { font-size: 14px; color: var(--ink-muted); margin: var(--space-4) 0 0; }

/* Forms */
label { display: block; font-size: 14px; line-height: 1.5; font-weight: 600; color: var(--ink); margin-bottom: var(--space-2); }
label .muted { font-weight: 400; }
input, select, textarea {
  width: 100%; height: var(--control-md); padding: 0 var(--space-3);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface-raised); color: var(--ink); font: 15px var(--font-sans);
  transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
}
textarea { height: auto; min-height: 96px; padding: var(--space-3); }
select {
  appearance: none; padding-right: var(--space-8);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat;
}
input::placeholder, textarea::placeholder { color: var(--ink-muted); }
input:hover, select:hover, textarea:hover { border-color: var(--ink-muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--focus); box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
input[type="checkbox"] { width: 18px; height: 18px; padding: 0; accent-color: var(--signal); flex: none; }
input.mono { font: 13.5px var(--font-mono); letter-spacing: 0.01em; }
.field { margin-bottom: var(--space-5); }
.help { font-size: 13px; line-height: 1.45; color: var(--ink-muted); margin-top: var(--space-2); }
.check { display: flex; gap: var(--space-3); align-items: flex-start; font-weight: 400; font-size: 15px; color: var(--ink-2); }
.check input { margin-top: 3px; }

/* Notices: always a word, never colour alone */
.notice {
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: var(--space-4); margin: var(--space-4) 0; border-radius: var(--radius-md);
  background: var(--info-soft); color: var(--ink-2); font-size: 15px; line-height: 1.55;
}
.notice > :last-child { margin-bottom: 0; }
.notice-kind {
  flex: none; font: 500 12px/23px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--info);
}
.notice-body { min-width: 0; flex: 1; }
.notice-body p { margin: 0 0 var(--space-2); }
.notice-body > :last-child { margin-bottom: 0; }
.notice.ok { background: var(--success-soft); }
.notice.ok .notice-kind { color: var(--success); }
.notice.warn { background: var(--warning-soft); }
.notice.warn .notice-kind { color: var(--warning); }
.notice.bad { background: var(--danger-soft); }
.notice.bad .notice-kind { color: var(--danger); }

/* Badges and chips */
.badge {
  display: inline-flex; align-items: center; gap: var(--space-1); height: 22px; padding: 0 var(--space-2);
  border-radius: var(--radius-xs); background: var(--surface-3); color: var(--ink-2);
  font: 500 12px/1 var(--font-mono); letter-spacing: 0.02em; white-space: nowrap; vertical-align: middle;
}
.badge.get, .badge.ok { background: var(--success-soft); color: var(--success); }
.badge.post, .badge.signal { background: var(--signal-soft); color: var(--signal-text); }
.badge.warn { background: var(--warning-soft); color: var(--warning); }
.badge.bad { background: var(--danger-soft); color: var(--danger); }
.chip, .chips button {
  display: inline-flex; align-items: center; gap: var(--space-2); height: var(--control-sm); padding: 0 var(--space-4);
  border-radius: var(--radius-full); border: 1px solid var(--line-strong); background: var(--surface-raised); color: var(--ink);
  font: 500 13px/1 var(--font-mono); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease);
}
.chip:hover, .chips button:hover { background: var(--surface-3); }
.chips button[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.chips .count { color: var(--ink-muted); font-weight: 400; }
.chips button[aria-pressed="true"] .count { color: var(--on-signal); opacity: 0.7; }
.pill {
  display: inline-flex; align-items: center; padding: var(--space-1) var(--space-3); border-radius: var(--radius-full);
  border: 1px solid var(--line); font: 500 13px/1.4 var(--font-mono); color: var(--ink-2);
}

/* The viewfinder: four corner brackets. The element needs a .vf child for the bottom pair. */
.viewfinder { position: relative; }
.viewfinder::before, .viewfinder::after, .viewfinder > .vf::before, .viewfinder > .vf::after {
  content: ""; position: absolute; z-index: 2; width: 12px; height: 12px;
  border: 0 solid var(--line-console); pointer-events: none;
}
.viewfinder::before { top: var(--space-3); left: var(--space-3); border-top-width: 1.5px; border-left-width: 1.5px; }
.viewfinder::after { top: var(--space-3); right: var(--space-3); border-top-width: 1.5px; border-right-width: 1.5px; }
.viewfinder > .vf::before { bottom: var(--space-3); left: var(--space-3); border-bottom-width: 1.5px; border-left-width: 1.5px; }
.viewfinder > .vf::after { bottom: var(--space-3); right: var(--space-3); border-bottom-width: 1.5px; border-right-width: 1.5px; }

/* Console: request, recorded response and the outcome. Dark in both themes. */
.console {
  background: var(--console); color: var(--ink-console); border: 1px solid var(--line-console);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-console);
  font: 13.5px/1.65 var(--font-mono);
}
.console.compact { border-radius: var(--radius-md); box-shadow: none; }
.console-tabs {
  display: flex; align-items: center; gap: var(--space-1); padding: var(--space-2) var(--space-8);
  overflow-x: auto; scrollbar-width: none; background: var(--console-raised); border-bottom: 1px solid var(--line-console);
}
.console-tabs button, .console-tabs .label {
  flex: none; height: 28px; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-xs);
  background: transparent; color: var(--ink-console-muted); font: 500 12px/28px var(--font-mono); cursor: pointer;
}
.console-tabs .label { cursor: default; color: var(--ink-console); padding-left: 0; }
.console-tabs button:hover { color: var(--ink-console); }
.console-tabs button[aria-selected="true"] { color: var(--ink-console); background: var(--console); }
.console-tabs button:focus-visible { box-shadow: 0 0 0 2px var(--console-raised), 0 0 0 4px var(--focus); }
.console-req {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--line-console); white-space: nowrap;
}
.console-req .verb { font-weight: 500; color: var(--code-key); flex: none; }
.console-req .url { overflow-x: auto; scrollbar-width: thin; flex: 1; min-width: 0; color: var(--ink-console); }
.console pre { margin: 0; padding: var(--space-5); overflow: auto; max-height: 420px; color: var(--ink-console); font-size: 13px; line-height: 1.65; }
.console pre.tall { max-height: 560px; }
.console pre.json { color: var(--code-punct); }
.console-status {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-4); padding: var(--space-3) var(--space-8);
  background: var(--console-raised); border-top: 1px solid var(--line-console); font-size: 12px; color: var(--ink-console-muted);
}
.console-status .ok { color: #2dd4bf; font-weight: 500; }
.console-status .bad { color: #f87171; font-weight: 500; }
.console-foot { padding: 0 var(--space-8) var(--space-3); margin-top: calc(-1 * var(--space-1)); background: var(--console-raised); font: 13px/1.5 var(--font-sans); color: var(--ink-console-muted); }
.console-foot a { color: var(--ink-console); }
.console [role="tabpanel"][hidden] { display: none; }
.console :focus-visible { box-shadow: 0 0 0 2px var(--console), 0 0 0 4px var(--focus); }
.copy {
  margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: var(--space-1); height: 24px; padding: 0 var(--space-2);
  border-radius: var(--radius-xs); border: 1px solid var(--line-console); background: transparent; color: var(--ink-console-muted);
  font: 500 12px/1 var(--font-mono); cursor: pointer;
}
.copy:hover { color: var(--ink-console); border-color: var(--ink-console-muted); }
.copy svg { width: 14px; height: 14px; }
.j-key { color: var(--code-key); }
.j-str { color: var(--code-string); }
.j-num, .j-lit { color: var(--code-number); }

/* Code panels: the console in its compact form */
.code { background: var(--console); color: var(--ink-console); border: 1px solid var(--line-console); border-radius: var(--radius-md); overflow: hidden; }
.code header {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-4);
  background: var(--console-raised); border-bottom: 1px solid var(--line-console);
  font: 500 12px/24px var(--font-mono); color: var(--ink-console-muted);
}
.code header .lang { margin-left: auto; }
.code header .lang + .copy { margin-left: 0; }
.code pre { margin: 0; padding: var(--space-4) var(--space-5); overflow-x: auto; line-height: 1.65; font-size: 13px; color: var(--ink-console); }
.code :focus-visible { box-shadow: 0 0 0 2px var(--console), 0 0 0 4px var(--focus); }
.code + .code { margin-top: var(--space-4); }

/* Stat tiles: numbers are mono and never animated */
.stats { display: grid; gap: var(--space-5); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat {
  display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5) var(--space-6);
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised);
}
.stat b { font: 500 clamp(30px, 3.4vw, 40px)/1 var(--font-mono); letter-spacing: -0.02em; color: var(--ink); }
.stat b small { font-size: 0.5em; color: var(--ink-muted); margin-left: 4px; letter-spacing: 0; }
.stat span { font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.stats.bare { gap: var(--space-8); grid-template-columns: repeat(3, max-content); margin-top: var(--space-8); }
.stats.bare .stat { border: 0; padding: 0; background: transparent; }
.stats.bare .stat b { font-size: 28px; }
@media (max-width: 1023px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .stats.bare { grid-template-columns: repeat(2, max-content); gap: var(--space-5) var(--space-8); } }
.works { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-10); }
.works .eyebrow { margin: 0 var(--space-2) 0 0; }

/* Hero */
.hero { padding: var(--space-16) 0; }
@media (min-width: 1024px) { .hero { padding: var(--space-24) 0 var(--space-16); } }
.hero-grid { display: grid; gap: var(--space-10); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); } }
.hero .lead { margin-top: var(--space-6); }
.page-hero { padding: var(--space-12) 0 var(--space-16); }
.page-hero h1:not(.display) { max-width: 20ch; }
.page-hero .lead { margin-top: var(--space-5); }

/* The index of sources: every name, filter and search highlight matches */
.finder { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; margin-bottom: var(--space-8); }
.finder input { max-width: 360px; }
.chips { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.index {
  margin: 0; font: 600 clamp(20px, 2.2vw, 28px)/1.45 var(--font-sans); letter-spacing: -0.02em;
 
}
.index a { color: var(--ink); text-decoration: none; padding: 0 3px; border-radius: var(--radius-xs); transition: background-color 200ms var(--ease), color 200ms var(--ease); }
.index a:hover { text-decoration: underline; }
.index .sep { color: var(--line-strong); font: 400 0.8em var(--font-mono); padding: 0 0.15em; }
.index[data-active] a { color: color-mix(in srgb, var(--ink) 28%, var(--surface)); }
.index[data-active] a.on { color: var(--ink); background: var(--signal-soft); box-shadow: inset 0 -2px 0 var(--signal); }

/* Steps */
.steps { display: grid; gap: var(--space-6); grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; margin: 0; list-style: none; }
.steps li { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--line-strong); min-width: 0; }
.steps .n { font: 500 12px/1.2 var(--font-mono); letter-spacing: 0.08em; color: var(--signal-text); }
.steps p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.steps pre {
  margin: var(--space-1) 0 0; padding: var(--space-2) var(--space-3); border: 1px solid var(--line-console); border-radius: var(--radius-sm);
  background: var(--console); color: var(--ink-console); font-size: 12.5px; line-height: 1.6; overflow-x: auto;
}
@media (max-width: 1023px) { .steps { grid-template-columns: 1fr; } }

/* Agents */
.agents-grid { display: grid; gap: var(--space-10); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) { .agents-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.tools { list-style: none; padding: 0; margin: var(--space-6) 0 0; }
.tools li { padding: var(--space-4) 0; border-top: 1px solid var(--line); }
.tools li:last-child { border-bottom: 1px solid var(--line); }
.tools code { background: transparent !important; padding: 0 !important; color: var(--signal-text) !important; font-weight: 500; }
.tools p { margin: var(--space-1) 0 0; color: var(--ink-2); font-size: 15px; }
.links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-top: var(--space-5); font: 500 13px/1.5 var(--font-mono); }

/* Pricing cards */
.packs { display: grid; gap: var(--space-6); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pack {
  display: flex; flex-direction: column; gap: var(--space-5); padding: var(--space-8);
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised);
}
.pack h3 { font-size: 26px; line-height: 1.25; letter-spacing: -0.015em; }
.pack .price { font: 500 40px/1 var(--font-mono); letter-spacing: -0.02em; margin: 0; color: var(--ink); }
.pack .price small { font: 400 14px var(--font-mono); letter-spacing: 0; color: var(--ink-muted); margin-left: var(--space-1); }
.pack .per { color: var(--ink-2); margin: calc(-1 * var(--space-3)) 0 0; font-size: 15px; }
.pack ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); font-size: 15px; color: var(--ink-2); }
.pack li { display: flex; gap: var(--space-2); align-items: flex-start; }
.pack li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 9px; border-radius: var(--radius-full); background: var(--signal); }
.pack .button { margin-top: auto; width: 100%; }
.pricing-note { font-weight: 600; color: var(--ink); margin: 0 0 var(--space-8); }
@media (max-width: 1100px) { .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .packs { grid-template-columns: 1fr; } }

/* FAQ */
.split { display: grid; gap: var(--space-6) var(--space-12); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
.faq-list { border-top: 1px solid var(--line); max-width: 820px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  cursor: pointer; list-style: none; padding: var(--space-5) var(--space-10) var(--space-5) 0; position: relative;
  font: 600 20px/1.35 var(--font-sans); letter-spacing: -0.01em; color: var(--ink);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 4px; top: var(--space-5); font: 400 22px/1.2 var(--font-mono); color: var(--ink-muted); }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: calc(-1 * var(--space-2)) 0 var(--space-5); color: var(--ink-2); max-width: 68ch; }

/* Closing call to action */
.closing { background: var(--surface-2); border-top: 1px solid var(--line); text-align: center; }
.closing h2 { max-width: 20ch; margin: 0 auto; }
.closing p:not(.eyebrow) { color: var(--ink-2); font-size: 18px; margin: var(--space-4) auto 0; max-width: 52ch; }
.closing .actions { justify-content: center; }

/* Catalogue pages */
.crumbs { font: 500 13px/1.5 var(--font-mono); color: var(--ink-muted); margin: 0 0 var(--space-5); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
  display: flex; flex-direction: column; gap: var(--space-2); height: 100%; padding: var(--space-6);
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised);
  color: var(--ink); text-decoration: none; transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
}
  display: flex; justify-content: space-between; gap: var(--space-3); margin-top: auto; padding-top: var(--space-3);
  border-top: 1px solid var(--line); font: 12px/1.5 var(--font-mono); color: var(--ink-muted);
}
.vertical-group + .vertical-group { margin-top: var(--space-16); }
.vertical-group h2 { font-size: 26px; margin-bottom: var(--space-6); display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-3); }
.vertical-group h2 a { color: var(--ink); text-decoration: none; }
.vertical-group h2 a:hover { text-decoration: underline; }
.vertical-group h2 span { font: 500 13px var(--font-mono); color: var(--ink-muted); letter-spacing: 0; }
.empty { padding: var(--space-6) 0; color: var(--ink-muted); }
.endpoint-line { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-5) 0 0; }
.endpoint-table td:first-child { width: 45%; }
.endpoint-table td:first-child a { display: inline-flex; align-items: center; gap: var(--space-2); text-decoration: none; }
.endpoint-table td:first-child a:hover code { text-decoration: underline; }
.grid-2 { display: grid; gap: var(--space-12); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .grid-2 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.grid-2 h2.sub { font-size: 26px; margin-bottom: var(--space-4); }
.related { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* Tables */
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised); }
table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
th, td { text-align: left; vertical-align: top; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th {
  font: 500 12px/1.5 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-muted); background: var(--surface-2); white-space: nowrap;
}
td code { white-space: nowrap; }
td.num, th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
td .muted { font-size: 13px; }

/* Docs */
.docs-grid { display: grid; gap: var(--space-12); grid-template-columns: minmax(0, 1fr); padding-bottom: var(--space-24); }
@media (min-width: 960px) { .docs-grid { grid-template-columns: 240px minmax(0, 1fr); } }
.toc {
  position: sticky; top: calc(var(--nav-height) + var(--space-6)); align-self: start;
  padding: var(--space-5); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-md);
}
.toc .eyebrow { margin-bottom: var(--space-3); }
.toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 6px var(--space-3); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink-2); font-size: 15px; }
.toc a:hover { color: var(--ink); background: var(--surface-3); }
.docs-body .scroll { max-width: 900px; margin-bottom: var(--space-6); }
@media (max-width: 959px) {
  .toc { position: static; }
  .toc ul { display: flex; flex-wrap: wrap; gap: var(--space-2); }
  .toc a { border: 1px solid var(--line); background: var(--surface-raised); }
}

/* Accounts */
.auth-grid { display: grid; gap: var(--space-10); grid-template-columns: minmax(0, 1fr); padding-top: var(--space-16); padding-bottom: var(--space-24); align-items: start; }
@media (min-width: 900px) { .auth-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-16); } }
.auth-form { max-width: 440px; }
.auth-form form { margin: var(--space-8) 0; }
.auth-form .button { width: 100%; }
.auth-aside { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-8); }
.auth-aside ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-3); color: var(--ink-2); }
.auth-aside li { display: flex; gap: var(--space-3); align-items: flex-start; }
.auth-aside li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 10px; border-radius: var(--radius-full); background: var(--signal); }

/* Dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: var(--space-4); padding: var(--space-10) 0 var(--space-6); }
.dash-head .eyebrow { margin-bottom: var(--space-2); }
.dash-head .who { display: flex; align-items: center; gap: var(--space-3); font-size: 14px; color: var(--ink-muted); }
.dash { display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1fr); padding: var(--space-6) 0 var(--space-6); }
@media (min-width: 1000px) { .dash { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); } }
.panel { border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-6); background: var(--surface-raised); }
.panel + .panel { margin-top: var(--space-6); }
.panel h2 { font-size: 20px; line-height: 1.35; letter-spacing: -0.01em; margin-bottom: var(--space-2); }
.panel > p.muted { font-size: 15px; }
.panel .scroll { margin-top: var(--space-4); }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; margin-top: var(--space-4); border-bottom: 1px solid var(--line-strong); }
.chart span { flex: 1; background: var(--signal); min-height: 1px; border-radius: 2px 2px 0 0; }
.keyfield { display: flex; gap: var(--space-2); margin: var(--space-2) 0 0; }
.keyfield input { flex: 1; min-width: 0; }
.key-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: flex-end; }
.inline-form { display: flex; gap: var(--space-3); align-items: flex-end; flex-wrap: wrap; margin-top: var(--space-5); }
.inline-form > div { flex: 1; min-width: 200px; }
.pack-rows { list-style: none; margin: var(--space-5) 0 0; padding: 0; border-top: 1px solid var(--line); }
.pack-rows li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.pack-rows b { display: block; font-weight: 600; color: var(--ink); }
.pack-rows span { font: 12px/1.5 var(--font-mono); color: var(--ink-muted); }
.endpoint-list { list-style: none; margin: 0 0 var(--space-6); padding: 0; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.endpoint-list li + li { border-top: 1px solid var(--line); }
.endpoint-list button {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: var(--space-3) var(--space-4);
  border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font-size: 15px;
}
.endpoint-list button:hover { background: var(--surface-3); }
.endpoint-list button[aria-pressed="true"] { background: var(--signal-soft); }
.endpoint-list button:focus-visible { border-radius: 0; }
.request-head { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-5); }
.request-head h3 { font: 500 14px/1.5 var(--font-mono); letter-spacing: 0; }
@media (max-width: 520px) { .wide-only { display: none; } }

/* Theme switches: the header icon on every page, and the labelled one in the footer */
.theme-icon {
  display: grid; place-items: center; flex: none; width: var(--control-sm); height: var(--control-sm); padding: 0;
  border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background-color 120ms var(--ease), color 120ms var(--ease);
}
.theme-icon:hover { background: var(--surface-3); color: var(--ink); }
.theme-icon svg { width: 18px; height: 18px; }
.theme-icon .sun { display: none; }
:root[data-theme="dark"] .theme-icon .sun { display: block; }
:root[data-theme="dark"] .theme-icon .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon .sun { display: block; }
  :root:not([data-theme="light"]) .theme-icon .moon { display: none; }
}
@media (max-width: 860px) {
  .site-header .theme-icon { margin-left: auto; }
  .site-header .menu { margin-left: 0; }
}

.theme-toggle {
  display: inline-flex; align-items: center; gap: var(--space-2); height: var(--control-sm); padding: 0 var(--space-3);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--ink);
  font: 500 12px/1 var(--font-mono); cursor: pointer;
}
.theme-toggle:hover { background: var(--surface-3); }
.theme-toggle::before { content: ""; width: 10px; height: 10px; border-radius: var(--radius-full); border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }

/* ---------- Home: gateway, catalogue drum, benefits, moment, close ---------- */

/* Scroll progress and reveals. Reveals only hide content once scripts run. */
.progress {
  position: fixed; top: 0; left: 0; z-index: 50; width: 100%; height: 2px;
  background: var(--signal); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
}
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
html.js .reveal.is-in { opacity: 1; transform: none; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* Gateway: badge, readout headline, rotor, agent → lens → the live web, install bar */
.gateway {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: var(--space-5);
  max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: var(--space-16) var(--gutter); text-align: center;
}
.gateway::before {
  content: ""; position: absolute; left: 50%; top: 52%; z-index: 0; width: 720px; height: 420px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, var(--glow), transparent 70%); opacity: 0.85; pointer-events: none;
}
.gateway > * { position: relative; z-index: 1; }
.gateway .display-xl { max-width: 820px; }
.gateway .fineprint { margin: 0; }
.gateway-badge {
  display: inline-flex; align-items: center; gap: var(--space-2); height: 28px; padding: 0 var(--space-3);
  border: 1px solid var(--line-strong); border-radius: var(--radius-full); background: var(--surface-raised);
  font: 500 12px/1 var(--font-mono); letter-spacing: 0.04em; color: var(--ink-2); text-decoration: none;
}
.gateway-badge:hover { border-color: var(--ink-muted); }
.rotor-line { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 0.35em; color: var(--ink-2); margin: 0; }
.rotor-window { display: inline-block; height: 1.3em; overflow: hidden; vertical-align: bottom; text-align: left; }
.rotor-list { display: block; animation: rotor 13s var(--ease) infinite; }
.rotor-list > span { display: block; height: 1.3em; line-height: 1.3; color: var(--signal-text); white-space: nowrap; }
@keyframes rotor {
  0%, 18% { transform: translateY(0); }
  20%, 38% { transform: translateY(-1.3em); }
  40%, 58% { transform: translateY(-2.6em); }
  60%, 78% { transform: translateY(-3.9em); }
  80%, 98% { transform: translateY(-5.2em); }
  100% { transform: translateY(-6.5em); }
}
.diagram {
  display: grid; grid-template-columns: 280px 104px minmax(280px, 1fr) 104px 320px; align-items: center;
  width: 100%; margin-top: var(--space-6); text-align: left;
}
.diagram-label { font: 500 11px/1.2 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 var(--space-3); }

.agent { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised); padding: var(--space-4); box-shadow: var(--shadow-sm); }
.agent-head { display: flex; align-items: center; gap: var(--space-3); padding-bottom: var(--space-3); margin-bottom: var(--space-3); border-bottom: 1px solid var(--line); }
.agent-avatar {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--signal-soft); color: var(--signal-text); font: 500 12px var(--font-mono);
}
.agent-name { font-weight: 600; font-size: 15px; line-height: 1.3; color: var(--ink); }
.agent-role { font: 11px/1.4 var(--font-mono); color: var(--ink-muted); }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.task { display: flex; align-items: center; gap: var(--space-2); font: 12.5px/1.4 var(--font-mono); color: var(--ink-2); }
.task-ico { position: relative; flex: none; width: 16px; height: 16px; }
.task-ico span, .task-ico svg { position: absolute; inset: 0; width: 16px; height: 16px; }
.task-spin { color: var(--ink-muted); animation: task-spinner 8s linear infinite; }
.task-spin svg { animation: spin 1s linear infinite; }
.task-done { color: var(--success); animation: task-check 8s linear infinite; }
.task:nth-child(1) .task-ico span { animation-delay: -7s; }
.task:nth-child(2) .task-ico span { animation-delay: -5s; }
.task:nth-child(3) .task-ico span { animation-delay: -3s; }
.task:nth-child(4) .task-ico span { animation-delay: -1s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes task-spinner { 0%, 30% { opacity: 1; } 40%, 100% { opacity: 0; } }
@keyframes task-check { 0%, 30% { opacity: 0; transform: scale(0.6); } 40%, 100% { opacity: 1; transform: none; } }

.routes { display: block; width: 100%; height: 220px; overflow: visible; }
.routes path { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 2 5; stroke-linecap: round; }
.routes path.beam { stroke: var(--signal); stroke-width: 2; stroke-dasharray: 14 106; animation: beam 3s linear infinite; }
.routes path.beam:nth-of-type(5) { animation-delay: -1s; }
.routes path.beam:nth-of-type(6) { animation-delay: -2s; }
@keyframes beam { to { stroke-dashoffset: -120; } }

.lens { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.lens svg { display: block; width: 300px; height: 300px; overflow: visible; }
.lens .glow { fill: var(--glow); opacity: 0.8; filter: url(#lens-blur24); }
.lens .shadow { fill: var(--ground); filter: url(#lens-blur8); }
.lens .plate-side { fill: var(--line-strong); opacity: 0.55; }
.lens .plate { fill: var(--surface-raised); stroke: var(--line-strong); stroke-width: 1.25; }
.lens .plate-hi { fill: none; stroke: var(--surface); stroke-width: 1.5; opacity: 0.9; }
.lens .focus-1 { fill: var(--signal); opacity: 0.16; filter: url(#lens-blur6); }
.lens .iris-ring { fill: var(--surface-3); stroke: var(--line-strong); stroke-width: 1.25; }
.lens .iris-ring-2 { fill: var(--console); }
.lens .blade { fill: var(--surface-3); stroke: var(--line-strong); stroke-width: 1; }
.lens .pupil { fill: url(#lens-pupil); }
.lens .glint { fill: #ffffff; opacity: 0.85; }
.lens .orbit { fill: none; stroke: var(--signal); stroke-width: 1.5; stroke-dasharray: 3 9; opacity: 0.7; animation: orbit 14s linear infinite; }
.lens .stack { animation: float 6s ease-in-out infinite; }
.lens .blades { transform-origin: 0 0; animation: breathe 5s ease-in-out infinite; }
.lens .brackets { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes orbit { to { stroke-dashoffset: -120; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.86); } }
.terminal {
  display: inline-flex; align-items: center; gap: var(--space-2); height: 32px; padding: 0 var(--space-3);
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-raised);
  font: 12px var(--font-mono); color: var(--ink-2); white-space: nowrap;
}
.terminal .ok { color: var(--success); font-weight: 500; }
.terminal .prompt { color: var(--ink-muted); }

.web { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.web a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); height: 72px;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised);
  font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none;
}
.web a:hover { border-color: var(--line-strong); }
.glyph {
  display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: var(--radius-xs);
  background: var(--surface-3); color: var(--ink-2); font: 500 10px var(--font-mono);
}
/* A real logo in the glyph's place: a white chip so transparent icons read in both themes */
span.glyph.logo-glyph { overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
span.glyph.logo-glyph img { display: block; width: 100%; height: 100%; object-fit: contain; }
.title-logo {
  display: inline-block; width: 0.9em; height: 0.9em; margin-right: 0.3em; vertical-align: -0.1em;
  box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; object-fit: contain;
}
.web-foot { display: flex; flex-direction: column; gap: 2px; margin-top: var(--space-3); font: 11px/1.4 var(--font-mono); color: var(--ink-muted); }
.web-foot b { color: var(--ink-2); font-weight: 500; }

/* Install bar: the MCP line on the console ground */
.givebox {
  width: 640px; max-width: 100%; margin-top: var(--space-6); padding: var(--space-4) var(--space-5) var(--space-5);
  border-radius: var(--radius-lg); background: var(--console); color: var(--ink-console); text-align: left; box-shadow: var(--shadow-console);
}
.givebox-head { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); font-size: 13px; font-weight: 600; }
.givebox-head span span {
  margin-left: var(--space-1); padding: 2px 6px; border: 1px solid var(--line-console); border-radius: var(--radius-xs);
  font: 500 10px var(--font-mono); color: var(--ink-console-muted);
}
.givebox-cmd {
  display: flex; align-items: center; gap: var(--space-3); height: 44px; padding: 0 var(--space-2) 0 var(--space-4);
  border: 1px solid var(--line-console); border-radius: var(--radius-sm); background: var(--console-raised); font: 13px var(--font-mono);
}
.givebox-cmd .prompt { color: var(--ink-console-muted); }
.givebox-cmd code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-console); background: none !important; padding: 0 !important; }
.givebox-cmd .copy { height: var(--control-sm); padding: 0 var(--space-3); border-radius: var(--radius-sm); font-size: 13px; background: var(--console); }
.givebox-cmd .copy svg { width: 16px; height: 16px; }

/* Catalogue drum: pinned while the rows scroll inside a faded window (scripts add .pinned on wide screens) */
.drum-pin { display: flex; flex-direction: column; align-items: center; padding: var(--space-16) var(--gutter); }
.drum-caption { font: 500 11px/1.2 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 var(--space-6); }
.drum-window { position: relative; width: 100%; max-width: var(--container); }
.drum-list { display: flex; flex-direction: column; gap: var(--space-8); }
.drum-end { display: flex; justify-content: center; margin-top: var(--space-8); }
.drum.pinned { height: 300vh; }
.drum.pinned .drum-pin { position: sticky; top: 0; height: 100vh; padding-top: calc(var(--nav-height) + var(--space-8)); padding-bottom: 0; }
.drum.pinned .drum-window {
  flex: 1; min-height: 0; overflow: clip;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent);
}
.drum.pinned .drum-list { padding: var(--space-6) 0 30vh; will-change: transform; }
.category-head { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-3); }
.category-head h3 { white-space: nowrap; }
.category-head h3 a { color: inherit; text-decoration: none; }
.category-head h3 a:hover { text-decoration: underline; }
.category-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.category-head span { font: 11px var(--font-mono); color: var(--ink-muted); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
.tile {
  display: flex; align-items: center; gap: var(--space-3); min-height: 60px; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised); color: var(--ink); text-decoration: none;
  transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease), transform 120ms var(--ease);
}
.tile:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.tile .glyph { width: 32px; height: 32px; font-size: 11px; background: var(--signal-soft); color: var(--signal-text); }
.tile-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; line-height: 1.3; }
.tile-meta { font: 11px var(--font-mono); color: var(--ink-muted); white-space: nowrap; }
.tile-meta b { color: var(--signal-text); font-weight: 500; }

/* Benefits: alternating text and card, one per screen */
.benefit {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: center; min-height: 70vh;
  max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: var(--space-24) var(--gutter); border-top: 1px solid var(--line);
}
.benefit.flip .benefit-text { order: 2; }
.benefit-text { display: flex; flex-direction: column; gap: var(--space-5); max-width: 520px; }
.benefit-n { font: 500 12px/1.2 var(--font-mono); letter-spacing: 0.1em; color: var(--signal-text); }
.benefit-text p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin: 0; padding: 0; list-style: none; }
.tags li { font: 11.5px/1.5 var(--font-mono); letter-spacing: 0.02em; color: var(--ink-muted); }
.tags li::before { content: "› "; color: var(--signal-text); }
.benefit-card { overflow: hidden; padding: var(--space-6); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-raised); box-shadow: var(--shadow-sm); }
.benefit-card .console { box-shadow: none; }
.benefit-card .keyfield { margin: 0 0 var(--space-5); }
.fields { color: var(--ink-console); }
.fields .f-type { color: var(--code-punct); }
.fields .f-cmt { color: var(--code-comment); font-style: italic; }

.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee + .marquee { margin-top: var(--space-2); }
.marquee-track { display: flex; gap: var(--space-2); width: max-content; animation: marquee 32s linear infinite; }
.marquee.reverse .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee .pill { white-space: nowrap; background: var(--surface-raised); }
@keyframes marquee { to { transform: translateX(-50%); } }

.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ledger li:last-child { border-bottom: 0; }
.ledger .ledger-head { justify-content: space-between; padding-top: 0; font: 11px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.ledger-name { flex: 1; font-weight: 600; color: var(--ink); }
.ledger-what { font: 12px var(--font-mono); color: var(--ink-muted); }
.ledger-now { min-width: 72px; text-align: right; font: 500 12px var(--font-mono); color: var(--signal-text); }

/* Moment: the one centred statement */
.moment-block { display: flex; flex-direction: column; align-items: center; gap: var(--space-5); padding: var(--space-32) var(--gutter); border-top: 1px solid var(--line); text-align: center; }
.moment-block .terminal { height: 40px; font-size: 13px; background: var(--console); color: var(--ink-console); border-color: var(--line-console); }
.moment-block .terminal .prompt { color: var(--ink-console-muted); }
.moment-block .tags { justify-content: center; }

/* Close: the dark band the home page ends on */
.close, .site-footer.console-footer { position: relative; background: var(--console); color: var(--ink-console); }
.close::before, .site-footer.console-footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(var(--line-console) 1px, transparent 1.2px); background-size: 20px 20px; opacity: 0.55;
}
.close > *, .site-footer.console-footer > * { position: relative; }
.close { overflow: hidden; padding: var(--space-24) var(--gutter); border-top: 1px solid var(--line-console); text-align: center; }
.close-inner { display: flex; flex-direction: column; align-items: center; gap: var(--space-6); max-width: 720px; margin: 0 auto; }
.close .display { color: var(--ink-console); }
.close .lead { color: var(--ink-console-muted); }
.close .givebox { margin-top: 0; border: 1px solid var(--line-console); box-shadow: none; }
.close-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-8); margin: var(--space-4) 0 0; font: 12px var(--font-mono); color: var(--ink-console-muted); }
.close-stats b { color: var(--ink-console); font-weight: 500; }
.close a { color: var(--ink-console); }
.site-footer.console-footer { border-top-color: var(--line-console); }
.site-footer.console-footer::before { opacity: 0.4; }
.console-footer .footer-grid h2 { color: var(--ink-console-muted); }
.console-footer .footer-grid a, .console-footer .footer-base a { color: var(--ink-console); opacity: 0.85; }
.console-footer .footer-grid a:hover { opacity: 1; }
.console-footer .footer-base { border-top-color: var(--line-console); color: var(--ink-console-muted); }
.console-footer .logo { color: var(--ink-console); }
.console-footer .theme-toggle { background: var(--console-raised); border-color: var(--line-console); color: var(--ink-console); }

@media (max-width: 1023px) {
  .diagram { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); justify-items: center; }
  .diagram > div { width: 100%; max-width: 360px; }
  .routes { display: none; }
  .benefit { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: var(--space-16) var(--gutter); }
  .benefit.flip .benefit-text { order: 0; }
  .tiles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 639px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tiles .tile:nth-child(n + 5) { display: none; }
  .gateway-badge { height: auto; min-height: 28px; padding: var(--space-1) var(--space-3); line-height: 1.5; text-wrap: balance; }
  .terminal { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .lens svg { width: 220px; height: 220px; }
  .rotor { font-size: 24px; }
  .moment-block { padding: var(--space-24) var(--gutter); }
}


/* ---------- Catalogue search page: source rain, search pill, results ---------- */
.search-hero {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: var(--space-5);
  min-height: min(760px, calc(100vh - var(--nav-height))); padding: var(--space-16) var(--gutter) 200px; text-align: center;
}
.search-hero > *:not(.rain) { position: relative; z-index: 1; }
.search-hero h1 { max-width: 760px; }
.search-hero h1 .dim { color: var(--ink-muted); }
.search-hero.busy h1 { opacity: 0.35; filter: blur(1px); transition: opacity 300ms, filter 300ms; }
.rain { --tile: 30px; position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
@media (max-width: 640px) { .rain { --tile: 26px; } }
.rain span {
  position: absolute; left: 0; bottom: 0; display: grid; place-items: center; width: var(--tile); height: var(--tile); border-radius: 24%;
  border: 1px solid var(--line); background: var(--surface-raised); box-shadow: var(--shadow-sm);
  font: 500 9px var(--font-mono); color: var(--ink-2); will-change: transform;
  transform: translate(var(--x), var(--y0)) rotate(var(--r0));
  animation: fall 1.3s cubic-bezier(0.3, 1.45, 0.5, 1) var(--d) both; transition: opacity 400ms, filter 400ms;
}
@keyframes fall { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); } }
/* A logo tile: a white chip with the icon inset, so full-bleed and transparent icons both read in either theme */
.rain span.logo { padding: 3px; background: #fff; }
.rain span.logo img { display: block; width: 100%; height: 100%; border-radius: 18%; object-fit: contain; }
.rain.dim span { opacity: 0.35; filter: grayscale(1); }
.rain.dim span.hit { opacity: 1; filter: none; border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); color: var(--signal-text); }
.search {
  display: flex; align-items: center; gap: var(--space-2); width: 680px; max-width: 100%; height: 56px; padding: 0 var(--space-2) 0 var(--space-6);
  border: 1px solid var(--line-strong); border-radius: var(--radius-full); background: var(--surface-raised); box-shadow: var(--shadow-md);
}
.search:focus-within { border-color: var(--focus); box-shadow: var(--focus-ring), var(--shadow-md); }
.search input { flex: 1; min-width: 0; height: auto; padding: 0; border: 0; background: transparent; font-size: 16px; }
.search input:focus-visible { box-shadow: none; }
.search button {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: var(--radius-full);
  background: var(--ink); color: var(--surface); cursor: pointer;
}
.search button:hover { background: var(--ink-2); }
.search button svg { width: 18px; height: 18px; }
.search-status { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 18px; margin: 0; font: 12px var(--font-mono); color: var(--ink-muted); }
.search-status::before { content: ""; width: 6px; height: 6px; border-radius: var(--radius-full); background: var(--signal); }
.search-status:empty { visibility: hidden; }
.examples { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); max-width: 760px; }
.examples button {
  height: 36px; padding: 0 var(--space-4); border: 1px solid var(--line-strong); border-radius: var(--radius-full);
  background: var(--surface-raised); color: var(--ink); font-size: 13px; cursor: pointer;
}
.examples button:hover { border-color: var(--ink-muted); background: var(--surface-2); }
.results { width: 100%; max-width: var(--container); text-align: left; }
.results[hidden] { display: none; }
.results-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-4); font-size: 14px; color: var(--ink-muted); }
.results-head strong { color: var(--ink); }
.results-head .copy { margin: 0; height: var(--control-sm); padding: 0 var(--space-3); background: var(--console); color: var(--ink-console); border-color: var(--console); font-size: 13px; }
.results-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.result {
  display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface-raised); box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none;
}
.result:hover { border-color: var(--line-strong); }
.result-head { display: flex; align-items: center; gap: var(--space-3); }
.result-head .glyph { width: 32px; height: 32px; font-size: 11px; background: var(--signal-soft); color: var(--signal-text); }
.result-name { display: block; font-weight: 600; font-size: 16px; line-height: 1.3; }
.result-area { display: block; font: 11px var(--font-mono); color: var(--ink-muted); }
.result-match {
  display: inline-flex; align-items: center; height: 22px; margin-left: auto; padding: 0 var(--space-2); border-radius: var(--radius-full);
  background: var(--ink); color: var(--surface); font: 500 11px var(--font-mono); white-space: nowrap;
}
.result ul { list-style: none; margin: 0; padding: 0; }
.result li { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.result li:first-child { border-top: 0; }
.result li span:last-child { font: 12px var(--font-mono); color: var(--ink-muted); white-space: nowrap; }
.catalogue-list .tiles, .catalogue-tiles { margin: 0; padding: 0; list-style: none; }
.catalogue-list .tiles li, .catalogue-tiles li { display: contents; }
.catalogue-list .tiles li[hidden] { display: none; }

/* ---------- API page: facts, hero, sections, data sheet, datapoints, playground, use cases ---------- */
.facts-row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-4); }
.fact {
  display: inline-flex; align-items: center; height: 26px; padding: 0 var(--space-3); border-radius: var(--radius-full);
  background: var(--signal-soft); color: var(--signal-text); font: 500 12px var(--font-mono);
}
.fact.neutral { background: var(--surface-3); color: var(--ink-2); }
.brand { color: var(--signal-text); }
.api-hero { padding: var(--space-12) 0 var(--space-16); }
@media (min-width: 1024px) { .api-hero .hero-grid { grid-template-columns: minmax(0, 520px) minmax(0, 1fr); } }
.section { padding: var(--space-16) 0; border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: var(--space-6); margin-bottom: var(--space-6); }
.section-head h2 { margin-top: var(--space-2); }
.section-head p { max-width: 640px; margin: var(--space-2) 0 0; color: var(--ink-2); }
.section-head .eyebrow { margin: 0; }
.toggle { display: inline-flex; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.toggle button {
  height: 32px; padding: 0 var(--space-3); border: 0; background: var(--surface-raised); color: var(--ink-muted);
  font: 500 12px var(--font-mono); cursor: pointer;
}
.toggle button + button { border-left: 1px solid var(--line-strong); }
.toggle button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.sheet { max-height: 480px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised); }
.sheet[hidden] { display: none; }
.sheet table { min-width: 100%; border-collapse: separate; border-spacing: 0; font: 12px/1.4 var(--font-mono); color: var(--ink-2); }
.sheet th {
  position: sticky; top: 0; z-index: 2; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--line-strong); border-right: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); font: 500 12px/1.4 var(--font-mono); letter-spacing: 0.02em; text-transform: none; white-space: nowrap;
}
.sheet th small { display: block; color: var(--ink-muted); font-weight: 400; letter-spacing: 0; }
.sheet td { max-width: 260px; overflow: hidden; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-overflow: ellipsis; white-space: nowrap; }
.sheet th:first-child, .sheet td:first-child { position: sticky; left: 0; z-index: 1; width: 40px; background: var(--surface-2); color: var(--ink-muted); text-align: right; }
.sheet th:first-child { z-index: 3; }
.sheet td.n { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.sheet td.u { color: var(--signal-text); }
.sheet td.b, .sheet td.z { color: var(--ink-muted); }
.sheet .nested { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: var(--radius-xs); background: var(--surface-3); color: var(--ink-muted); font-size: 11px; }
.sheet pre { margin: 0; padding: var(--space-4); font-size: 12px; color: var(--ink-2); }
.sheet-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin: var(--space-3) 0 0; font: 12px var(--font-mono); color: var(--ink-muted); }
.datapoints { display: grid; gap: var(--space-4); margin-top: var(--space-4); }
.datapoints > div { display: grid; grid-template-columns: 160px 1fr; gap: var(--space-4); align-items: start; }
.datapoints h3 { padding-top: 4px; font: 500 12px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.datapoints ul { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.datapoints li {
  display: inline-flex; align-items: center; gap: var(--space-1); height: 26px; padding: 0 var(--space-2) 0 var(--space-3);
  border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--surface-raised); font: 12px var(--font-mono); color: var(--ink);
}
.datapoints li small { margin-left: 2px; padding-left: var(--space-1); border-left: 1px solid var(--line); color: var(--ink-muted); font-size: 10px; }
.playground { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-6); padding: var(--space-6); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-raised); }
.playground form { display: flex; flex-direction: column; gap: var(--space-4); }
.playground .field { margin: 0; }
.playground label { font: 600 13px var(--font-mono); }
.playground label small { font-weight: 400; color: var(--ink-muted); }
.playground .help { margin-top: var(--space-1); }
.playground-meta { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font-size: 13px; color: var(--ink-muted); }
.playground-meta b { font: 500 13px var(--font-mono); color: var(--signal-text); }
.playground-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.playground details { padding-top: var(--space-3); border-top: 1px solid var(--line); }
.playground summary { cursor: pointer; font: 12px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-muted); }
.playground details .playground-row { margin-top: var(--space-3); }
.playground .console { display: flex; flex-direction: column; min-height: 360px; box-shadow: none; }
.playground .console pre { flex: 1; max-height: 520px; }
.playground .live { margin-left: auto; display: inline-flex; align-items: center; gap: var(--space-1); padding: 0 var(--space-2); border: 1px solid var(--line-console); border-radius: var(--radius-xs); font: 500 11px/22px var(--font-mono); color: var(--ink-console-muted); }
.playground .live .dot { width: 6px; height: 6px; }
.usecases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.usecase { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised); }
.usecase h3 { font-size: 16px; }
.usecase-prompt {
  display: flex; align-items: center; gap: var(--space-2); margin-top: auto; padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); font: 12.5px var(--font-mono); color: var(--ink-2);
}
.usecase-prompt::before { content: "›"; color: var(--signal-text); }
.usecase-prompt code { flex: 1; min-width: 0; overflow: hidden; padding: 0 !important; background: none !important; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2) !important; }
.usecase-prompt .copy { margin: 0; height: 28px; border-color: var(--line-strong); color: var(--ink); background: var(--surface-raised); }
.tagrow { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-5); }
.tagrow .badge { height: 26px; }
.overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-12); }
.overview .prose h2 { margin-top: var(--space-2); }
.start-band { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-6); padding: var(--space-10); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-2); }
.start-band h2 { font-size: clamp(26px, 3vw, 32px); }
.start-band p { margin: var(--space-2) 0 0; color: var(--ink-2); }
.start-band .actions { margin: 0; }

/* Credit calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-4) var(--space-10); margin-top: var(--space-8); padding: var(--space-8); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised); }
.calc label { margin: 0 0 var(--space-3); }
.calc input[type="range"] { height: auto; padding: 0; border: 0; background: none; accent-color: var(--signal); }
.calc output { display: block; font: 500 clamp(30px, 3.4vw, 40px)/1 var(--font-mono); letter-spacing: -0.02em; color: var(--ink); text-align: right; }
.calc .calc-calls { font: 500 15px var(--font-mono); color: var(--ink); }
.calc p { margin: var(--space-2) 0 0; font-size: 14px; color: var(--ink-muted); text-align: right; }

@media (max-width: 1023px) {
  .results-grid { grid-template-columns: 1fr 1fr; }
  .playground, .overview { grid-template-columns: minmax(0, 1fr); }
  .datapoints > div { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
}
@media (max-width: 639px) {
  .results-grid, .usecases, .calc { grid-template-columns: minmax(0, 1fr); }
  .search { height: 48px; padding-left: var(--space-4); }
  .playground { padding: var(--space-4); }
  .playground-row { grid-template-columns: minmax(0, 1fr); }
  .start-band { padding: var(--space-6); }
  .calc output, .calc p { text-align: left; }
}

/* Motion: with reduced motion, reveals show at once and nothing loops */
@media (prefers-reduced-motion: reduce) {
  .dot, .routes path.beam, .marquee-track, .rotor-list, .lens .orbit, .lens .stack, .lens .blades, .task-spin svg { animation: none !important; }
  .rain span { animation: none; transform: translate(var(--x), var(--y)) rotate(var(--r)); }
  .task-done { animation: none; opacity: 1; }
  .task-spin { animation: none; opacity: 0; }
  html.js .reveal { opacity: 1; transform: none; }
  *, *::before, *::after { transition: none !important; }
}
