/* ALPHA-Memory landing page - one stylesheet, no framework, no third-party requests.
   Layout and component kinds follow https://www.agent-memory.dev (measured 2026-10-01 in Chrome at 1440x900:
   canvas #0a0a0a, card #191919, hairline #212327, mute #7d8187, Inter prose + JetBrains Mono eyebrows 12px with
   1.4px tracking, h1 118px / h2 56px weight 400, a centred 56px / 400 stat strip, hairline-separated section bands
   of 96-112px, 8px card radius, pill buttons). The colours, brand colour and type below are ALPHA-Memory's own.
   Tune the knobs in :root: colours, type, shape and rhythm, the brand colour once (--brand). A few
   one-off greys (the terminal and sample backgrounds, the wordmark grey, the tag blue) stay local to their rule. */

:root {
  /* Surfaces - darkest to lightest. */
  --canvas: #0a0b0d;
  --canvas-raised: #111317;
  --canvas-card: #15171c;
  --canvas-card-hover: #191c22;
  --hairline: #23262d;
  --hairline-strong: #353943;

  /* Ink. --mute on --canvas is 6.2:1, --body 13.9:1 (WCAG AA needs 4.5:1; computed from the hex values). */
  --ink: #ffffff;
  --body: #d6d9df;
  --mute: #8b919b;

  /* THE brand colour - the one knob for buttons, links, focus rings, highlights, tints and the logo dot. Set
     2026-10-01 to ALPHA-ERP's NOA-Labs / Smart-Prototyping logo blue (its themes.scss 'noa' / 'smart-prototyping'
     500; owner). Swap it with `bun run site:brand -- '#rrggbb'`: that rewrites this value and the favicon, which
     cannot read CSS, and prints the contrasts. Allowed: a 6-digit hex (the script parses it), written only here,
     whose contrast as text is >= 4.5:1 on every --canvas* surface above; site:check (rule `brand`) enforces all
     three. */
  --brand: #0089e6;
  /* Text on a brand fill (the primary buttons). Allowed: >= 3:1 on --brand (site:check). White on the 2026-10-01
     blue is 3.67:1, below AA for body text, kept by ALPHA-ERP's owner ruling of 2026-09-30 (primary buttons wear
     the brand as is). A light brand (gold, yellow) needs a near-black ink here instead. */
  --brand-ink: #ffffff;
  /* Derived from --brand, never a second literal. Hover darkens toward the canvas - a state, not a second button
     colour: at rest the button wears --brand as is (memory feedback_primary_buttons_wear_brand_primary). Tunable. */
  --brand-hover: color-mix(in srgb, var(--brand) 80%, var(--canvas));
  --brand-wash: color-mix(in srgb, var(--brand) 8%, transparent);
  --warn: #f2c46d;
  --no: #ff7d7d;

  /* Type. System stacks: no font download, no third-party request (owner decision pending on self-hosted fonts).
     Segoe UI Variable first: Chrome on Windows maps system-ui to the older static Segoe UI (no 500 weight). */
  --font-sans: "Segoe UI Variable Text", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --display-weight: 400;              /* the reference's wordmark and section titles are 400 */
  --title-weight: 500;                /* card, step and invariant titles */
  --eyebrow-size: 0.75rem;            /* 12px, as the reference */
  --eyebrow-tracking: 0.12em;         /* 1.44px at 12px; the reference uses 1.4px */

  /* The wordmark hyphen: Segoe's hyphen sits low and reads as a minus beside caps. Measured 2026-10-01 at 132px,
     weight 400, with canvas measureText on Segoe UI Variable Display (re-measure after any weight or font change):
     unshifted, the ink gaps A|-|M are 8.3px and 17.5px, so +0.035em (+4.6px) makes both 12.9px; the hyphen's ink
     centre sits 10.0px below the cap centre, so -0.076em lifts it there. */
  --wm-dash-x: 0.035em;
  --wm-dash-y: -0.076em;

  /* Shape and rhythm. */
  --radius-card: 8px;
  --radius-pill: 9999px;
  --gutter: clamp(16px, 4vw, 40px);  /* side padding: 16px on a phone, 40px from 1000px wide */
  --container: 1440px;                /* the reference's grid width */
  --head-indent: clamp(0px, 8vw, 112px); /* section heads sit indented from the card grid, as the reference */
  --section-pad-top: clamp(72px, 7.8vw, 112px);    /* the reference's bands: 96-112px above, */
  --section-pad-bottom: clamp(64px, 6.7vw, 96px);  /* 80-96px below, a hairline between */
  --nav-height: 64px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3 { color: var(--ink); margin: 0; font-family: var(--font-display); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
b, strong { color: var(--ink); font-weight: 600; }
pre { margin: 0; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

/* Keeps a hyphenated brand name on one line in prose ("ALPHA-" / "Memory" broke at 1440px in the compare lead). */
.nb { white-space: nowrap; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -48px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--canvas);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  border-bottom: 1px solid var(--hairline);
}
/* The frosted bar lives on a pseudo-element: a backdrop-filter on .nav itself let the hero show through the
   opened mobile menu (measured 2026-10-01 at 390px, panel background 0.97 alpha and still see-through). */
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(10 11 13 / 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
}

.nav-inner {
  height: 100%;
  padding-inline: clamp(16px, 2.2vw, 32px);
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-name { font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark rect { fill: var(--canvas-card); stroke: var(--hairline-strong); stroke-width: 1; }
.brand-mark path { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark circle { fill: var(--brand); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 32px);
  margin-inline: auto;
}
.nav-links a { color: var(--body); font-size: 0.9375rem; white-space: nowrap; transition: color 0.15s; }
.nav-links a:hover { color: var(--ink); }
.nav-links .nav-cta { display: none; }   /* the menu's own contact link, shown only in the phone menu */

.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 12px; right: 12px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s;
}
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 22px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

/* ---------- Buttons, chips, tags ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 1rem;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-small { min-height: 40px; padding: 0 18px; font-size: 0.9375rem; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-ghost { border: 1px solid rgb(255 255 255 / 0.25); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--eyebrow-size);
  letter-spacing: var(--eyebrow-tracking);
  text-transform: uppercase;
  color: var(--mute);
}
.eyebrow-center { text-align: center; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  white-space: nowrap;
}
.chip b { color: var(--ink); font-weight: 600; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}
.tag::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--hairline-strong);
}
.tag-brand { color: var(--brand); }
.tag-brand::before { background: var(--brand); }
.tag-live::before { animation: pulse 2.4s ease-out infinite; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(64px, 9vw, 96px) clamp(56px, 8vw, 96px);
  background:
    radial-gradient(60% 55% at 50% 0%, var(--brand-wash), transparent 70%),
    radial-gradient(90% 70% at 50% 40%, #121419 0%, var(--canvas) 70%);
  border-bottom: 1px solid var(--hairline);
}
/* A faint dot field, masked to the centre, like the reference's star field (CSS only, no image request). */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgb(255 255 255 / 0.07) 1px, transparent 1.5px);
  background-size: 22px 22px;
  mask-image: radial-gradient(70% 60% at 50% 40%, #000 25%, transparent 80%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 25%, transparent 80%);
}
.hero > .container { position: relative; z-index: 1; }

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: var(--eyebrow-size);
  letter-spacing: var(--eyebrow-tracking);
  text-transform: uppercase;
  color: var(--body);
}

.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 55%, transparent); }
  70% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 0%, transparent); }
}

.wordmark {
  margin-top: clamp(28px, 4vw, 48px);
  font-size: clamp(3rem, 10.5vw, 8.25rem);   /* 132px at 1257px+; the reference's 118px wordmark is 11 letters, ours 12 */
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-weight: var(--display-weight);
  white-space: nowrap;
}
.wm-light { font-weight: var(--display-weight); color: #b9bdc6; } /* contrast by colour only, as the reference */
.wm-dash { display: inline-block; transform: translate(var(--wm-dash-x), var(--wm-dash-y)); }

.hero-lead {
  margin-top: clamp(20px, 3vw, 32px);
  max-width: 42rem;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--body);
  text-wrap: pretty;   /* no lone word at a line end ("It" stranded at 1440px) */
}

.hero-ctas {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hero-note { margin-top: 20px; font-size: 0.875rem; color: var(--mute); }
.hero-note a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.hero .eyebrow-center {
  margin-top: clamp(56px, 8vw, 88px);
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
}
.hero .eyebrow-center::before,
.hero .eyebrow-center::after {
  content: "";
  width: min(80px, 12vw);
  height: 1px;
  background: var(--hairline-strong);
}

.designed-for {
  margin: 24px auto 0;
  max-width: 1040px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.designed-for li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 104px;
  padding: 20px 16px;
  background: var(--canvas-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  text-align: center;
}
.designed-for strong { font-size: 1.0625rem; font-weight: var(--title-weight); }
.designed-for span {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}

/* ---------- Stat strip: a centred, full-width band ---------- */

.stats { border-bottom: 1px solid var(--hairline); }
.stats .container { padding-inline: 0; }

.stat-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  border-left: 1px solid var(--hairline);
  text-align: center;
}
.stat:first-child { border-left: 0; }
.stat-value {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.375rem, 4.6vw, 3.5rem);   /* 56px max, as the reference's numbers */
  font-weight: var(--display-weight);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  line-height: 1.5;
}
.stats-note {
  max-width: 64rem;
  margin-inline: auto;
  padding: 16px var(--gutter) 20px;
  font-size: 0.8125rem;
  color: var(--mute);
  text-align: center;
}

/* ---------- Sections: hairline-separated bands ---------- */

.section { padding-block: var(--section-pad-top) var(--section-pad-bottom); }
.section + .section { border-top: 1px solid var(--hairline); }
.section-last { padding-bottom: var(--section-pad-top); }

.section-head {
  max-width: calc(52rem + var(--head-indent));
  padding-left: var(--head-indent);
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section-head h2,
.callout h2,
.cta h2 {
  margin-top: 16px;
  font-size: clamp(2.25rem, 5vw, 3.5rem);     /* 56px max, as the reference h2 */
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: var(--display-weight);
  text-wrap: balance;
}
.lead {
  margin-top: 20px;
  max-width: 46rem;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  background: var(--canvas-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  transition: background-color 0.2s, border-color 0.2s;
}
.card:hover { background: var(--canvas-card-hover); border-color: var(--hairline-strong); }
.card h3 { font-size: 1.125rem; font-weight: var(--title-weight); letter-spacing: -0.01em; line-height: 1.3; text-wrap: balance; }
.card p { font-size: 0.9375rem; line-height: 1.6; }
.features .chip { align-self: flex-start; }

.card-tall { padding: 32px; gap: 18px; min-height: 270px; }
.card-tall h3 {
  margin-top: 28px;
  font-size: clamp(1.625rem, 2.4vw, 2rem);
  font-weight: var(--display-weight);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.card-num { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--mute); letter-spacing: 0.06em; }

/* Invariants: a check-mark list, two columns. */
.invariants { column-gap: 48px; row-gap: 0; padding-left: var(--head-indent); }
.invariant {
  position: relative;
  padding: 24px 0 24px 40px;
  border-top: 1px solid var(--hairline);
}
.invariant::before {
  content: "";
  position: absolute;
  left: 0; top: 28px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--brand-wash);
  border: 1px solid color-mix(in srgb, var(--brand) 45%, transparent);
}
.invariant::after {
  /* the check: an L rotated -45deg; 9x5px inside the 20px dot */
  content: "";
  position: absolute;
  left: 6px; top: 34px;
  width: 9px; height: 5px;
  border-left: 1.75px solid var(--brand);
  border-bottom: 1.75px solid var(--brand);
  transform: rotate(-45deg);
}
.invariant h3 { font-size: 1.125rem; font-weight: var(--title-weight); }
.invariant p { margin-top: 6px; font-size: 0.9375rem; color: var(--body); }

/* ---------- Terminal ---------- */

.terminal {
  max-width: 980px;
  margin-inline: auto;
  background: #0c0e11;
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  box-shadow: 0 40px 120px -40px color-mix(in srgb, var(--brand) 18%, transparent);
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--canvas-raised);
  border-bottom: 1px solid var(--hairline);
  flex-wrap: wrap;
}
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--hairline-strong); }
.terminal-title { font-family: var(--font-mono); font-size: 0.75rem; color: var(--mute); }
.terminal-tabs { margin-left: auto; display: flex; gap: 4px; }
.tab {
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.tab:hover { color: var(--ink); }
/* Selected = text colour AND a brand border (WCAG 1.4.11 needs 3:1 against --canvas-raised / --canvas-card; the
   brand's 4.5:1 text floor in site:check covers it), never colour of the text alone. */
.tab[aria-selected="true"] { color: var(--ink); border-color: var(--brand); background: var(--canvas-card); }

.terminal-body { padding: 24px clamp(16px, 3vw, 28px) 28px; min-height: 22rem; overflow-x: auto; }
.scene {
  font-family: var(--font-mono);
  font-size: clamp(0.8125rem, 1.2vw, 0.9375rem);
  line-height: 1.85;
  color: var(--body);
  white-space: pre;
}
.t-prompt { color: var(--brand); }
.t-dim { color: var(--mute); }
.t-ok { color: var(--brand); }
.t-no { color: var(--no); }
.t-warn { color: var(--warn); }
.t-tag { color: #9cc7f0; }

/* Typed reveal, driven by site.js; without JS or with reduced motion every line shows at once. */
.terminal.is-animating .t-line { opacity: 0; transition: opacity 0.18s ease-out; }
.terminal.is-animating .t-line.is-shown { opacity: 1; }

/* ---------- Compare table ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--canvas-card);
}
.compare { width: 100%; border-collapse: collapse; table-layout: fixed; }
.compare th,
.compare td {
  padding: 18px 20px;
  text-align: left;
  vertical-align: baseline;
  border-top: 1px solid var(--hairline);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.compare th:first-child { width: 20%; }
.compare thead th {
  border-top: 0;
  background: var(--canvas-raised);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}
.compare tbody th {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}
.compare td { color: var(--body); }
.compare .col-us { color: var(--ink); background: color-mix(in srgb, var(--brand) 4%, transparent); }
.compare thead .col-us { color: var(--brand); box-shadow: inset 0 2px 0 var(--brand); }

/* ---------- Callout ---------- */

.callout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(28px, 5vw, 56px);
  background:
    linear-gradient(135deg, var(--brand-wash), transparent 55%),
    var(--canvas-card);
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
}
.callout-body { display: flex; flex-direction: column; gap: 16px; font-size: 1.0625rem; line-height: 1.65; }

/* ---------- Agents: compact head-row cards, Claude Code spanning two columns ---------- */

.agents { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.agent { padding: 24px; gap: 18px; }
.agent-first { grid-column: span 2; border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.agent-head { display: flex; align-items: center; gap: 14px; }
.agent-mono {
  width: 52px; height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--canvas);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink);
}
.agent-meta { display: flex; flex-direction: column; gap: 2px; }
.agent h3 { margin-top: 4px; font-size: 1.125rem; }
.agent-from {
  font-family: var(--font-mono);
  font-size: 0.6875rem !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}
.fineprint { margin-top: 20px; font-size: 0.8125rem; color: var(--mute); }

/* ---------- Roadmap ---------- */

.roadmap {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.step {
  position: relative;
  padding: 28px 24px 24px 0;   /* text flush with its bar */
  border-top: 2px solid var(--hairline-strong);
}
.step-done,
.step-now { border-top-color: var(--brand); }
.step h3 {
  margin-top: 14px;
  min-height: calc(2em * 1.3);   /* two title lines at line-height 1.3, so every paragraph starts level */
  font-size: 1.125rem;
  font-weight: var(--title-weight);
  line-height: 1.3;
  text-wrap: balance;
}
.step p { margin-top: 8px; font-size: 0.9375rem; }

/* ---------- CTA ---------- */

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(40px, 7vw, 88px) var(--gutter);
  border: 1px solid var(--hairline-strong);
  border-radius: 16px;
  background:
    radial-gradient(70% 90% at 50% 0%, var(--brand-wash), transparent 70%),
    var(--canvas-raised);
}
.cta .lead { max-width: 42rem; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--hairline); }
.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 28px;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 20px; margin-left: auto; }
.footer-links a, .footer-copy { font-size: 0.875rem; color: var(--mute); }
.footer-links a:hover { color: var(--ink); }

/* ---------- Hero value line (P1 of docs/research/2026-10-01-competitor-websites.md) ---------- */

.wm-tagline {
  display: block;
  margin-top: clamp(14px, 1.6vw, 22px);
  font-size: clamp(1.25rem, 2.6vw, 2rem);   /* about a quarter of the wordmark, so the name still leads */
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: var(--display-weight);
  color: var(--body);
  white-space: normal;
}

/* ---------- Injected-memory sample ---------- */

.sample { max-width: 980px; margin: 32px auto 0; }
.sample-card {
  margin-top: 12px;
  padding: 18px 20px;
  background: #0c0e11;
  border: 1px solid var(--hairline-strong);
  border-left: 2px solid var(--brand);
  border-radius: var(--radius-card);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sample-note { margin-top: 10px; font-size: 0.875rem; color: var(--mute); }

/* ---------- Data path ---------- */

.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.flow-step {
  position: relative;
  padding: 24px;
  background: var(--canvas-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
}
.flow-step h3 { margin-top: 12px; font-size: 1.125rem; font-weight: var(--title-weight); line-height: 1.3; }
.flow-step p:not(.eyebrow) { margin-top: 8px; font-size: 0.9375rem; }
/* The arrow between steps: a chevron in the 16px gap, drawn with borders (no glyph, no image). */
.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -12px; top: 50%;
  width: 8px; height: 8px;
  border-top: 1.5px solid var(--mute);
  border-right: 1.5px solid var(--mute);
  transform: translateY(-50%) rotate(45deg);
}
.flow-out { border-style: dashed; border-color: var(--hairline-strong); }

.layers { margin-top: 40px; padding-left: var(--head-indent); }
.layers-title, .limits-title { font-size: 1.125rem; font-weight: var(--title-weight); }
.layers-list { margin-top: 16px; counter-reset: layer; }
.layers-list li {
  counter-increment: layer;
  display: grid;
  grid-template-columns: 2.5rem 13rem minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
  font-size: 0.9375rem;
}
.layers-list li::before { content: counter(layer, decimal-leading-zero); font-family: var(--font-mono); font-size: 0.8125rem; color: var(--brand); }
.layers-list b { font-weight: var(--title-weight); }
.layers-list code, .faq code { font-family: var(--font-mono); font-size: 0.875em; color: var(--ink); }
.layers .fineprint { margin-top: 16px; }

/* ---------- Limits table ---------- */

.limits { margin-top: 48px; padding-left: var(--head-indent); max-width: calc(46rem + var(--head-indent)); }
.limits .fineprint { margin-top: 6px; }
.limits .table-wrap { margin-top: 16px; }
.limits-table { width: 100%; border-collapse: collapse; }
.limits-table th,
.limits-table td { padding: 12px 18px; text-align: left; border-top: 1px solid var(--hairline); font-size: 0.9375rem; }
.limits-table thead th {
  border-top: 0;
  background: var(--canvas-raised);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}
.limits-table tbody th { width: 45%; font-weight: var(--title-weight); color: var(--ink); }
.limits-table td { font-variant-numeric: tabular-nums; color: var(--body); }

/* ---------- FAQ (no JS: native details / summary) ---------- */

.faq { padding-left: var(--head-indent); max-width: calc(52rem + var(--head-indent)); }
.faq details { border-top: 1px solid var(--hairline); }
.faq details:last-child { border-bottom: 1px solid var(--hairline); }
.faq summary {
  position: relative;
  padding: 20px 40px 20px 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: var(--title-weight);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  /* a plus that turns into a minus; two 12px bars */
  content: "";
  position: absolute;
  right: 6px; top: 50%;
  width: 12px; height: 1.5px;
  background: var(--mute);
  box-shadow: none;
}
.faq summary::before {
  content: "";
  position: absolute;
  right: 11.25px; top: calc(50% - 5.25px);
  width: 1.5px; height: 12px;
  background: var(--mute);
  transition: transform 0.2s;
}
.faq details[open] summary::before { transform: scaleY(0); }
.faq details p { padding: 0 40px 22px 0; font-size: 1rem; line-height: 1.7; }
.faq a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

.footer-note { flex-basis: 100%; font-size: 0.8125rem; color: var(--mute); }
.footer-links code { font-family: var(--font-mono); font-size: 0.8125rem; }

/* ---------- Legal and error pages ---------- */

.doc { padding-block: clamp(56px, 8vw, 96px) var(--section-pad-top); }
.doc .container { max-width: 52rem; }
.doc h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); letter-spacing: -0.03em; font-weight: var(--display-weight); line-height: 1.1; }
.doc h2 { margin-top: 40px; font-size: 1.375rem; font-weight: var(--title-weight); }
.doc p, .doc li { margin-top: 12px; line-height: 1.7; }
.doc ul { padding-left: 1.25rem; list-style: disc; }
.doc a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--hairline); }
  .roadmap { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* The 8 section links need about 600px beside the brand and the button: below 1000px they move into the menu. */
@media (max-width: 1000px) {
  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
  }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--hairline); font-size: 1rem; }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links .nav-cta { display: block; color: var(--brand); }
  .nav.is-open .nav-links { display: flex; }
  /* DOM order is brand, toggle, links, actions (so Tab goes from the toggle into the open menu); show the toggle last. */
  .nav-actions { margin-left: auto; order: 2; }
  .nav-toggle { display: inline-block; order: 3; }
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .designed-for { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .callout { grid-template-columns: minmax(0, 1fr); }
  .card-tall { min-height: 0; }
  .card-tall h3 { margin-top: 12px; }
  .roadmap { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .step { padding: 22px 0; border-top-width: 1px; }
  .step h3 { min-height: 0; }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow-step:not(:last-child)::after { right: auto; left: 50%; top: auto; bottom: -12px; transform: translateX(-50%) rotate(135deg); }
}

@media (max-width: 760px) {
  /* Compare table: each row becomes a block; every value carries its column's name. */
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; }
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .compare tr { display: grid; gap: 10px; padding: 18px 16px; border-top: 1px solid var(--hairline); }
  .compare tbody tr:first-child { border-top: 0; }
  .compare th:first-child { width: auto; }
  .compare tbody th, .compare td { width: auto; padding: 0; border-top: 0; }
  .compare td.col-us { padding: 10px 12px; border-radius: 6px; }
  .compare td::before {
    content: attr(data-label);
    content: attr(data-label) / "";
    display: block;
    margin-bottom: 2px;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mute);
  }
  .compare td.col-us::before { color: var(--brand); }

  /* Terminal: wrap instead of a sideways scroll; continuation rows hang under their description column. */
  .scene { white-space: pre-wrap; overflow-wrap: anywhere; }
  .scene .t-line { display: inline-block; width: 100%; padding-left: 2ch; text-indent: -2ch; }
  .scene .t-line:has(.t-ok, .t-no, .t-warn) { padding-left: 13ch; text-indent: -13ch; }
  .scene .t-line:has(.t-tag) { padding-left: 10ch; text-indent: -10ch; }
  #scene-failopen .t-line:has(.t-warn) { padding-left: 14ch; text-indent: -14ch; }
  .terminal-body { min-height: 0; }
}

@media (max-width: 600px) {
  :root { --head-indent: 0px; }
  .scene { font-size: 0.75rem; line-height: 1.7; }
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .agents { grid-template-columns: minmax(0, 1fr); }
  .agent-first { grid-column: 1 / -1; }
  .agent-mono { display: none; }
  /* Features on a phone: a compact hairline list instead of twelve tall cards. */
  .features { gap: 0; }
  .features .card { padding: 18px 0; gap: 6px; background: none; border: 0; border-top: 1px solid var(--hairline); border-radius: 0; }
  .features .chip { display: none; }
  .stat { padding: 32px 12px; }
  .stat-value { font-size: 2.125rem; }
  .designed-for { grid-template-columns: minmax(0, 1fr); }
  .designed-for li { min-height: 0; }
  .terminal-tabs { margin-left: 0; width: 100%; }
  .terminal-title { display: none; }
  .tab { flex: 1; min-height: 44px; }
  .btn-small { display: none; }
  .footer-links { margin-left: 0; }
  .badge { font-size: 0.6875rem; letter-spacing: 0.06em; padding: 7px 12px; }
  .layers-list li { grid-template-columns: 2rem minmax(0, 1fr); row-gap: 4px; }
  .layers-list li span { grid-column: 2; }
  .limits-table th, .limits-table td { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse, .tag-live::before { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
