/* ==========================================================================
   Flow — marketing site stylesheet
   Source of truth: docs/design/visual-system.md (tokens, components, motion)
   Structure per docs/design/layouts.md; copy per docs/design/ia-copy.md.

   FONT NOTE: visual-system.md specifies self-hosted JetBrains Mono woff2
   files. The font files are not available offline at build time, so the mono
   stack falls back to system monospace fonts:
     'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace
   TODO: when /fonts/JetBrainsMono-{Regular,Medium}.woff2 are added, restore
   the @font-face blocks from visual-system.md §2.
   ========================================================================== */

/* ---------- Tokens (visual-system.md §1.1, §2, §3) ---------- */
:root {
  color-scheme: dark;

  /* Ground (page → raised) */
  --ground-0: #07090f;
  --ground-1: #0b0e16;
  --ground-2: #10141f;
  --ground-3: #161b29;

  /* Lines */
  --hairline:      #1e2536;
  --hairline-hi:   #2c3550;
  --hairline-glow: rgba(59,130,246,.35);

  /* Text */
  --text-hi:  #eef1f6;
  --text-md:  #a3adbf;
  --text-lo:  #77829a;

  /* Action accent — interactive only */
  --accent:        #3b82f6;
  --accent-hover:  #60a5fa;
  --accent-press:  #2563eb;
  --accent-ink:    #ffffff;
  --accent-dim:    rgba(59,130,246,.12);

  /* Signature accent — trace green, data/graph motif only */
  --trace:      #2fd19c;
  --trace-dim:  rgba(47,209,156,.14);
  --trace-glow: rgba(47,209,156,.45);

  /* Semantic */
  --ok:    #34d399;
  --warn:  #fbbf24;
  --error: #f87171;

  --selection-bg: rgba(59,130,246,.30);

  /* Fonts (see FONT NOTE above) */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  /* Type scale */
  --text-display: clamp(2.125rem, 1.1rem + 3.4vw, 3.375rem);
  --text-h2:      clamp(1.625rem, 1.1rem + 1.9vw, 2.375rem);
  --text-h3:      1.3125rem;
  --text-lead:    1.1875rem;
  --text-body:    1rem;
  --text-small:   0.875rem;
  --text-micro:   0.75rem;
  --text-stat:    clamp(2rem, 1.25rem + 2.5vw, 3.25rem);

  /* Radii, motion, focus */
  --radius-s: 6px;
  --radius-m: 10px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-med:  300ms;
  --focus-ring: 0 0 0 2px var(--ground-0), 0 0 0 4px var(--accent);
}

::selection { background: var(--selection-bg); color: var(--text-hi); }

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

html { scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground-0);
  color: var(--text-md);
  font: 400 var(--text-body)/1.65 var(--font-sans);
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { color: var(--text-hi); margin: 0; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; transition: color var(--dur-fast); }
a:hover { color: var(--accent-hover); }

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-s); }

.mono { font-family: var(--font-mono); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 200;
  padding: .5rem 1rem; background: var(--ground-2); color: var(--text-hi);
  border: 1px solid var(--hairline-hi); border-radius: var(--radius-s);
  transition: top var(--dur-fast);
}
.skip-link:focus { top: 1rem; }

/* ---------- Type roles ---------- */
.display {
  font-size: var(--text-display);
  font-weight: 650; line-height: 1.08; letter-spacing: -0.025em;
}
.h2 {
  font-size: var(--text-h2);
  font-weight: 650; line-height: 1.12; letter-spacing: -0.02em;
  text-wrap: balance;
}
.h3 {
  font-size: var(--text-h3);
  font-weight: 600; line-height: 1.3; letter-spacing: -0.01em;
}
.lead { font-size: var(--text-lead); line-height: 1.55; }
.small { font-size: var(--text-small); line-height: 1.5; }

.eyebrow {
  display: block;
  font: 500 var(--text-micro)/1 var(--font-mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--trace);
}

.prose p { max-width: 62ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 22px;
  font: 600 0.9375rem/1 var(--font-sans);
  border-radius: var(--radius-s);
  cursor: pointer; white-space: nowrap;
  text-decoration: none;
  transition: background var(--dur-fast), border-color var(--dur-fast),
              color var(--dur-fast), box-shadow var(--dur-fast);
}
.btn--small { height: 36px; padding: 0 16px; font-size: var(--text-small); }

.btn-primary { background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; }
.btn-primary:hover  { background: var(--accent-hover); color: var(--accent-ink); }
.btn-primary:active { background: var(--accent-press); }

.btn-secondary { background: transparent; color: var(--text-hi); border: 1px solid var(--hairline-hi); }
.btn-secondary:hover  { border-color: var(--accent); color: var(--text-hi); background: var(--accent-dim); }
.btn-secondary:active { background: rgba(59,130,246,.18); }

.btn-ghost { background: transparent; color: var(--text-md); border: 1px solid transparent; }
.btn-ghost:hover  { color: var(--text-hi); background: var(--ground-3); }
.btn-ghost:active { background: var(--hairline); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: 64px;
  display: flex; align-items: center; gap: 2rem;
  padding: 0 clamp(1rem, 4vw, 2rem);
  background: rgba(7, 9, 15, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav--static { position: static; }

.wordmark {
  display: inline-flex; align-items: center; gap: .55rem;
  font: 500 1.125rem/1 var(--font-mono);
  color: var(--text-hi); text-decoration: none;
}
.wordmark:hover { color: var(--text-hi); }
.wordmark .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--trace);
  box-shadow: 0 0 6px var(--trace-glow);
}
/* Beta tag beside the wordmark (2026-09-09): Supporter is free while Flow is in beta. */
.wordmark .beta {
  font-size: .5em; line-height: 1; padding: .25em .45em; border-radius: .35em;
  border: 1px solid var(--trace); color: var(--trace);
  letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
  transform: translateY(.05em);
}

.nav-links { display: flex; align-items: center; gap: 1.75rem; margin-left: auto; }
.nav-links a {
  font: 500 var(--text-small)/1 var(--font-sans);
  color: var(--text-md); text-decoration: none;
}
.nav-links a:hover { color: var(--text-hi); }
.nav-links a[aria-current="page"] { color: var(--text-hi); }

.nav-cta { margin-left: 0; }

/* Mobile nav: checkbox hack — works with JavaScript disabled. */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; }

@media (max-width: 899.98px) {
  .nav { height: 56px; gap: .75rem; }
  .nav-cta { margin-left: auto; height: 32px; padding: 0 12px; }

  .nav-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 7px;
    width: 40px; height: 40px; padding: 0 9px;
    cursor: pointer; border-radius: var(--radius-s);
  }
  .nav-burger span {
    display: block; height: 1.5px; width: 100%;
    background: var(--text-md);
    transition: background var(--dur-fast);
  }
  .nav-burger:hover span { background: var(--text-hi); }

  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    margin: 0; padding: .5rem 0 1rem;
    background: var(--ground-2);
    border-bottom: 1px solid var(--hairline);
  }
  .nav-toggle:checked ~ .nav-links { display: flex; }
  .nav-toggle:focus-visible ~ .nav-burger { box-shadow: var(--focus-ring); }
  .nav-links a {
    display: flex; align-items: center;
    min-height: 48px; padding: 0 clamp(1rem, 4vw, 2rem);
    font-size: var(--text-body);
  }
}

/* ---------- Sections & containers ---------- */
.section { padding-block: clamp(4rem, 6vw + 2rem, 7.5rem); }
.section--band { background: var(--ground-1); border-block: 1px solid var(--hairline); }
.section--slim { padding-block: clamp(3rem, 4vw + 1rem, 5rem); }

.container {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.container--prose { max-width: 46rem; }

.section-head { max-width: 46rem; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head .h2 { margin-top: .75rem; }
.section-head .lead { margin-top: 1rem; color: var(--text-md); max-width: 58ch; }
.section-head--center .lead { margin-inline: auto; }

.textlink {
  display: inline-block; margin-top: 1.25rem;
  font: 500 var(--text-small)/1 var(--font-sans);
}
.textlink::after { content: " →"; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(4rem, 8vw, 7rem); padding-bottom: 0; }
.hero-inner { max-width: 52rem; margin-inline: auto; text-align: center; position: relative; }
.hero .lead { margin-top: 1.5rem; }
.hero-note { margin-top: 1rem; font-size: var(--text-small); color: var(--text-lo); }
.hero-ctas {
  margin-top: 2rem;
  display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap;
}

.hero-shot {
  max-width: 62.5rem;
  margin: clamp(2.5rem, 5vw, 4rem) auto calc(-1 * var(--overlap, 72px));
  position: relative; z-index: 2;
}
@media (min-width: 1200px) { .hero-shot { max-width: 80rem; } }

.statband { background: var(--ground-1); border-block: 1px solid var(--hairline); }
.statband .container { padding-top: calc(var(--overlap, 72px) + 3rem); padding-bottom: 3rem; }
:root { --overlap: 72px; }
@media (max-width: 743.98px) { :root { --overlap: 32px; } }

/* ---------- Hash-field texture (visual-system §6.2) ---------- */
.hash-field { position: relative; }
.hash-field::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='520' height='96'><g font-family='JetBrains Mono,monospace' font-size='11' fill='%23a3adbf' fill-opacity='0.05'><text x='0' y='24'>a1075db5…4d90d980 → bc1qxy2k…5mdq</text><text x='96' y='56'>6f7cf9f8…21a4be29 → 3J98t1Wp…NLy4</text><text x='24' y='88'>4a5e1e4b…7fc2b673 → 1A1zP1eP…vfNa</text></g></svg>");
  background-size: 520px 96px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 75%);
}
.hash-field > * { position: relative; z-index: 1; }

/* ---------- Stat blocks (visual-system §3.5) ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat { min-width: 0; padding: 1.5rem 2rem; border-inline-start: 1px solid var(--hairline); }
.stat:first-child { border-inline-start: none; padding-inline-start: 0; }
.stat-value {
  font: 500 var(--text-stat)/1 var(--font-mono);
  letter-spacing: -0.03em;
  color: var(--text-hi);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat-value .unit { font-size: .5em; color: var(--text-lo); margin-left: .12em; letter-spacing: 0; }
.stat-label {
  margin-top: .7rem;
  font: 400 var(--text-micro)/1.5 var(--font-mono);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-md);
  max-width: 22ch;
}
@media (max-width: 899.98px) {
  .stats { grid-template-columns: 1fr 1fr; row-gap: 1.25rem; }
  .stat { padding: .75rem 1.25rem; }
  .stat:nth-child(odd) { border-inline-start: none; padding-inline-start: 0; }
}
@media (max-width: 379.98px) {
  .stats { grid-template-columns: 1fr; }
  .stat { border-inline-start: none; padding-inline: 0; }
}

/* ---------- Feature rows (layouts §1.3–1.5) ---------- */
.frow { display: grid; gap: 2.5rem; align-items: center; }
.frow + .frow { margin-top: clamp(4rem, 8vw, 7.5rem); }
.frow .h2 { margin-top: .75rem; }
.frow-copy p { margin-top: 1rem; }

@media (min-width: 900px) {
  .frow { grid-template-columns: 5fr 7fr; gap: 4rem; }
  .frow-copy  { grid-column: 1; grid-row: 1; }
  .frow-media { grid-column: 2; grid-row: 1; }
  .frow--flip { grid-template-columns: 7fr 5fr; }
  .frow--flip .frow-copy  { grid-column: 2; }
  .frow--flip .frow-media { grid-column: 1; }
}
/* Mobile/tablet: screenshot first, then text */
@media (max-width: 899.98px) {
  .frow-media { order: -1; }
}

/* ---------- Cards / slab (visual-system §3.4) ---------- */
.slab {
  display: grid; gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.slab--2 { grid-template-columns: repeat(2, 1fr); }
.slab--4 { grid-template-columns: repeat(4, 1fr); }
.slab--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 999.98px) { .slab--3 { grid-template-columns: 1fr; } }
@media (max-width: 999.98px) { .slab--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 639.98px) { .slab--2, .slab--4 { grid-template-columns: 1fr; } }
.slab-cell { background: var(--ground-2); padding: 1.5rem 1.75rem; }
.slab-cell h3 {
  font: 500 var(--text-small)/1 var(--font-mono);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-hi); margin: 0 0 .6rem;
}
.slab-cell p { font-size: var(--text-small); color: var(--text-md); line-height: 1.6; margin: 0; }

/* ---------- Screenshot frames (visual-system §3.6) ---------- */
.shot {
  border: 1px solid var(--hairline-hi);
  border-radius: var(--radius-m);
  background: var(--ground-2);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.4),
    0 24px 48px -12px rgba(0,0,0,.5),
    0 0 80px -20px var(--hairline-glow);
}
.shot-bar {
  display: flex; align-items: center; gap: .5rem;
  height: 38px; padding: 0 14px;
  background: var(--ground-3);
  border-bottom: 1px solid var(--hairline);
}
.shot-bar .dots { display: flex; gap: 6px; }
.shot-bar .dots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--hairline-hi);
}
.shot-title {
  margin-inline: auto;
  font: 400 var(--text-micro)/1 var(--font-mono);
  letter-spacing: .06em; color: var(--text-lo);
}
.shot img { display: block; width: 100%; height: auto; }
.shot-caption {
  margin-top: .75rem;
  font: 400 var(--text-micro)/1.4 var(--font-mono);
  color: var(--text-lo);
}
@media (max-width: 743.98px) {
  .shot--bleed {
    margin-inline: calc(-1 * clamp(1rem, 4vw, 2rem));
    border-radius: 0;
    border-inline: none;
  }
}

.shot-wide { max-width: 62.5rem; margin: 3rem auto 0; }

/* Portrait screenshots (e.g. the cluster inspector) hold a narrower frame. */
.frow-media--tall { max-width: 24rem; width: 100%; margin-inline: auto; }

/* ---------- Trace line (visual-system §6.1) ---------- */
.trace-fig {
  width: 100%;
  background:
    radial-gradient(circle at 1px 1px, var(--hairline) 1px, transparent 1.5px) 0 0 / 28px 28px,
    var(--ground-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 2.5vw, 2rem);
}
.trace-fig svg { display: block; width: 100%; height: auto; }
.trace-fig .lbl {
  font: 500 17px/1 var(--font-mono);
  letter-spacing: .04em;
}
.trace-path {
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.in .trace-path {
  animation: draw 1200ms var(--ease-out) 400ms forwards;
}
.no-js .trace-path { animation: none; stroke-dashoffset: 0; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Attribute figure: propose -> weigh -> review (three panes) ---------- */
.attr-fig {
  display: grid; gap: 1.75rem;
  max-width: 62.5rem; margin: 2.5rem auto 0;
  background:
    radial-gradient(circle at 1px 1px, var(--hairline) 1px, transparent 1.5px) 0 0 / 28px 28px,
    var(--ground-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  padding: clamp(1.25rem, 3vw, 2rem);
}
.attr-pane { display: flex; flex-direction: column; gap: 1.1rem; position: relative; }
.attr-card {
  flex: 0 0 auto; position: relative;
  background: var(--ground-2);
  border: 1px solid var(--hairline-hi);
  border-radius: var(--radius-m);
  padding: .9rem 1rem 1rem;
  box-shadow: 0 14px 34px -20px rgba(0,0,0,.85);
  font-size: var(--text-small);
  color: var(--text-md);
}
@media (min-width: 820px) {
  .attr-fig { grid-template-columns: repeat(3, 1fr); gap: 2.75rem; }
  .attr-pane + .attr-pane .attr-card::before {
    content: ""; position: absolute; left: -2.75rem; top: 6.2rem; width: 2.75rem; height: 0;
    border-top: 1.5px dashed var(--hairline-hi);
  }
  .attr-pane + .attr-pane .attr-card::after {
    content: ""; position: absolute; left: -9px; top: calc(6.2rem - 4.5px); width: 0; height: 0;
    border-left: 8px solid var(--trace); border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  }
}
@media (max-width: 819.98px) {
  .attr-pane + .attr-pane::before {
    content: ""; position: absolute; left: 50%; top: -1.75rem; height: 1.75rem;
    border-left: 1.5px dashed var(--hairline-hi);
  }
}
.attr-dhead {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  margin-bottom: .7rem;
  font: 600 var(--text-small)/1.2 var(--font-sans); color: var(--text-hi);
}
.attr-dhead i { font-style: normal; font-size: 1.1rem; line-height: 1; color: var(--text-lo); }
.attr-dhead em { font: 500 var(--text-micro)/1 var(--font-mono); letter-spacing: .04em; color: var(--text-lo); font-style: normal; }
.attr-dhead em.ok { color: var(--ok); }
.attr-input {
  background: var(--ground-1); border: 1px solid var(--hairline-hi); border-radius: var(--radius-s);
  padding: .45rem .6rem; margin-bottom: .5rem; color: var(--text-hi);
}
.attr-input--select { display: flex; justify-content: space-between; align-items: center; }
.attr-input--select i {
  width: 7px; height: 7px; margin-right: 3px;
  border-right: 1.5px solid var(--text-md); border-bottom: 1.5px solid var(--text-md);
  transform: rotate(45deg) translateY(-2px);
}
.attr-opt {
  display: grid; grid-template-columns: 14px 1fr; column-gap: .55rem; align-items: center;
  padding: .4rem .55rem; margin-bottom: .3rem;
  border: 1px solid transparent; border-radius: var(--radius-s);
}
.attr-opt i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--text-lo); }
.attr-opt small { grid-column: 2; font-size: var(--text-micro); color: var(--text-lo); line-height: 1.3; }
.attr-opt--on { border-color: var(--accent); background: var(--accent-dim); color: var(--text-hi); }
.attr-opt--on i { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 45%, transparent 52%); }
.attr-src {
  display: grid; grid-template-columns: 1fr auto; gap: .2rem .5rem; align-items: center;
  margin: .6rem 0 .75rem;
  font: 500 var(--text-micro)/1.3 var(--font-mono);
}
.attr-src .attr-v { grid-column: 1 / -1; }
.attr-src .attr-k { color: var(--text-lo); text-transform: uppercase; letter-spacing: .08em; }
.attr-src .attr-v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent-hover); }
.attr-src .attr-d { color: var(--text-lo); }
.attr-btn {
  background: var(--accent); color: var(--accent-ink); border-radius: var(--radius-s);
  padding: .5rem; text-align: center; font-weight: 600;
}
.attr-vote {
  display: grid; grid-template-columns: 16px 4.4rem minmax(0, 1fr) auto; gap: .6rem; align-items: center;
  padding: .45rem 0; border-top: 1px solid var(--hairline);
}
.attr-vote .av { width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(135deg, var(--trace), var(--accent)); }
.attr-vote .av-2 { background: linear-gradient(135deg, var(--warn), var(--accent)); }
.attr-vote .av-3 { background: linear-gradient(135deg, var(--text-lo), var(--hairline-hi)); }
.attr-vote .bar { height: 6px; border-radius: 3px; background: var(--ground-1); border: 1px solid var(--hairline); overflow: hidden; }
.attr-vote .bar b { display: block; height: 100%; background: var(--trace); }
.attr-vote .w { font: 500 var(--text-micro)/1 var(--font-mono); color: var(--text-hi); }
.attr-vote--no .who { color: var(--error); }
.attr-vote--no .bar b { background: var(--error); }
.attr-tally {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: baseline;
  margin-top: .5rem; padding-top: .65rem; border-top: 1px solid var(--hairline-hi);
  font: 500 var(--text-micro)/1.4 var(--font-mono); color: var(--text-lo);
}
.attr-tally b { color: var(--text-hi); font-weight: 600; }
.attr-tally .attr-note { margin-left: auto; color: var(--trace); }
.attr-next { margin-top: .6rem; font: 500 var(--text-micro)/1.4 var(--font-mono); color: var(--text-lo); }
.attr-map svg { display: block; width: 100%; height: auto; margin-top: .35rem; }
.attr-map .lbl { font: 600 15px/1 var(--font-mono); }
.attr-map .sub { font: 500 11px/1 var(--font-mono); letter-spacing: .04em; }
.attr-cap { display: flex; gap: .9rem; align-items: baseline; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--hairline-hi); }
.attr-cap .n { font: 500 var(--text-small)/1 var(--font-mono); color: var(--trace); }
.attr-cap h3 { font: 600 var(--text-body)/1.3 var(--font-sans); color: var(--text-hi); margin: 0 0 .35rem; }
.attr-cap p { font-size: var(--text-small); color: var(--text-md); margin: 0; line-height: 1.6; }

/* ---------- Steps 1-2-3 (layouts §1.7) ---------- */
.steps {
  display: grid; gap: 1.5rem;
  max-width: 62.5rem; margin: 2.5rem auto 0;
}
@media (min-width: 640px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.step {
  display: flex; gap: .9rem; align-items: baseline;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline-hi);
}
.step .n {
  font: 500 var(--text-small)/1 var(--font-mono);
  color: var(--trace);
}
.step h3 { font: 600 var(--text-body)/1.3 var(--font-sans); color: var(--text-hi); margin: 0 0 .35rem; }
.step p { font-size: var(--text-small); color: var(--text-md); margin: 0; line-height: 1.6; }

/* ---------- Terminal block (visual-system §6.3) ---------- */
.term {
  background: #05070b;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  padding: 1.25rem 1.5rem;
  font: 400 var(--text-small)/1.7 var(--font-mono);
  color: var(--text-md);
  overflow-x: auto;
  text-align: left;
}
.term .p  { color: var(--trace); user-select: none; }
.term .c  { color: var(--text-lo); }
.term .ok { color: var(--ok); }

/* ---------- Context strip / final CTA ---------- */
.cta-final { text-align: center; }
.cta-final .lead { margin-top: 1rem; }
.cta-final .btn { margin-top: 2rem; }
.cta-final .aside {
  margin-top: 1.5rem;
  font-size: var(--text-small); color: var(--text-lo);
}
.cta-final .term {
  max-width: 34rem; margin: 2.5rem auto 0;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--hairline);
  background: var(--ground-1);
  padding: 4rem 0 2.5rem;
  font-size: var(--text-small);
  color: var(--text-lo);
}
.footer-grid {
  display: grid; gap: 2.5rem;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
}
@media (max-width: 899.98px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 639.98px) { .footer-grid { grid-template-columns: 1fr; } }

.footer h3 {
  font: 500 var(--text-micro)/1 var(--font-mono);
  letter-spacing: .10em; text-transform: uppercase;
  color: var(--text-md);
  margin: 0 0 1rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: .6rem; }
.footer a { color: var(--text-lo); text-decoration: none; }
.footer a:hover { color: var(--text-md); text-decoration: underline; }
.footer .wordmark { margin-bottom: .75rem; }
.footer-id p { margin: 0 0 .5rem; max-width: 30ch; }

.footer-legal {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  font-size: var(--text-micro);
  line-height: 1.7;
  color: var(--text-lo);
}
.footer-legal p { max-width: none; margin: 0 0 .5rem; }
.footer-legal .mono { letter-spacing: .02em; }

/* ---------- Acquire page ---------- */
.acq { max-width: 45rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.acq .page-head { padding-top: clamp(3rem, 6vw, 5rem); }
.acq h1 { margin-top: .75rem; font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.5rem); font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; }
.acq .lede { margin-top: 1.25rem; font-size: var(--text-lead); line-height: 1.55; }
.acq h2 {
  font-size: 1.375rem; font-weight: 650; letter-spacing: -0.01em;
  margin: 3rem 0 1.25rem;
}
.acq hr {
  border: 0; border-top: 1px solid var(--hairline);
  margin: 3rem 0;
}
.acq .eyebrow { color: var(--text-lo); }

.dl { margin: 0; }
.dl > div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: .9rem 0; border-top: 1px solid var(--hairline); }
.dl > div:last-child { border-bottom: 1px solid var(--hairline); }
.dl dt { font: 500 var(--text-small)/1.5 var(--font-mono); color: var(--text-hi); }
.dl dd { margin: 0; font-size: var(--text-small); line-height: 1.6; }
@media (max-width: 639.98px) {
  .dl > div { grid-template-columns: 1fr; gap: .35rem; }
}

.spec-table { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: var(--text-small); }
.spec-table th, .spec-table td { text-align: left; padding: .7rem .25rem; border-top: 1px solid var(--hairline); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 1px solid var(--hairline); }
.spec-table th { font: 400 var(--text-micro)/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-lo); width: 11rem; font-weight: 400; }
.spec-table td { color: var(--text-md); }

.shot-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 2rem 0 .75rem; }
@media (max-width: 639.98px) { .shot-thumbs { grid-template-columns: 1fr; } }
.shot-thumbs .shot { box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.shot-thumbs .shot-bar { height: 26px; padding: 0 10px; }

.notice {
  border: 1px solid var(--hairline-hi);
  border-radius: var(--radius-m);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  color: var(--text-md);
}
.notice p { max-width: none; }

.process { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.process li {
  counter-increment: step;
  display: grid; grid-template-columns: 2.25rem 1fr; gap: .5rem;
  padding: .9rem 0; border-top: 1px solid var(--hairline);
}
.process li:last-child { border-bottom: 1px solid var(--hairline); }
.process li::before {
  content: counter(step);
  font: 500 var(--text-small)/1.6 var(--font-mono);
  color: var(--text-lo);
}

/* ---------- Forms (visual-system §3.7) ---------- */
.form-grid { display: grid; gap: 1.5rem; margin-top: 1.5rem; }

.field-label {
  font: 500 var(--text-micro)/1.3 var(--font-mono);
  letter-spacing: .10em; text-transform: uppercase;
  color: var(--text-md);
  margin-bottom: .5rem; display: block;
}
.field-hint {
  display: block;
  font-size: var(--text-micro); font-family: var(--font-sans);
  letter-spacing: 0; text-transform: none;
  color: var(--text-lo); margin-top: .4rem;
}

.input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font: 400 var(--text-body)/1.4 var(--font-sans);
  color: var(--text-hi);
  background: var(--ground-3);
  border: 1px solid var(--hairline-hi);
  border-radius: var(--radius-s);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.input::placeholder { color: var(--text-lo); }
.input:hover { border-color: #3a466a; }
.input:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.input[aria-invalid="true"] { border-color: var(--error); }

textarea.input { height: auto; min-height: 7.5rem; padding: .7rem 14px; resize: vertical; }
select.input { appearance: auto; }

.field-error {
  font: 400 var(--text-micro)/1.4 var(--font-mono);
  color: var(--error); margin-top: .5rem;
}

.form-foot { margin-top: 2rem; }
.form-microcopy {
  margin-top: 1.5rem;
  font-size: var(--text-micro); line-height: 1.7; color: var(--text-lo);
}
.form-microcopy p { max-width: none; }

.form-success {
  border: 1px solid var(--hairline-hi);
  border-radius: var(--radius-m);
  padding: 1.5rem;
  color: var(--text-hi);
}
[hidden] { display: none !important; }

/* Honeypot field (functions/_lib/inquiry.ts): off-screen, not display:none,
   so naive bots still "see" it while people and screen readers do not. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* No-JS path: the Pages Function redirects to /page/?sent=1#form-success or
   /page/?error=...#form-error, and :target reveals the matching message. */
.form-success:target, .field-error:target { display: block !important; }
body:has(.form-success:target) .form-grid { display: none; }


/* ---------- Manifesto page ---------- */
.doc { max-width: 45rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.doc .page-head { padding-top: clamp(3rem, 6vw, 5rem); }
.doc h1 { margin-top: .75rem; font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.5rem); font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; }
.doc .lede { margin-top: 1.25rem; font-size: var(--text-lead); line-height: 1.55; }
.doc h2 { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.01em; margin: 3.5rem 0 1.25rem; }
.doc h3 { font-size: 1.0625rem; font-weight: 600; margin: 2rem 0 .75rem; }
.doc ol, .doc ul { padding-left: 1.4rem; }
.doc li { margin-bottom: .9rem; }
.doc hr { border: 0; border-top: 1px solid var(--hairline); margin: 3rem 0; }
.doc .aside { font-size: var(--text-small); color: var(--text-lo); }

/* ==========================================================================
   Pricing page — /pricing/ (appended)
   Tier grid, doctrine callout, FAQ list. Reuses site tokens and the slab
   hairline-grid construction (visual-system §3.4).
   ========================================================================== */
.tiers {
  display: grid; gap: 1px;
  grid-template-columns: repeat(4, 1fr);
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  overflow: hidden;
  margin-top: clamp(2rem, 4vw, 3rem);
}
@media (max-width: 1099.98px) { .tiers { grid-template-columns: 1fr 1fr; } }
@media (max-width: 639.98px)  { .tiers { grid-template-columns: 1fr; } }

.tier {
  background: var(--ground-2);
  padding: 1.75rem 1.5rem;
  display: flex; flex-direction: column;
  position: relative; /* anchors .tier-badge on any card, not only .tier--soon */
}
.tier-name {
  font: 500 var(--text-small)/1 var(--font-mono);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--trace);
  margin: 0 0 1rem;
}
.tier-price {
  font: 500 1.625rem/1.1 var(--font-mono);
  letter-spacing: -0.02em;
  color: var(--text-hi);
  font-variant-numeric: tabular-nums;
}
.tier-price .per { font-size: .55em; color: var(--text-lo); }
.tier-note { margin: .5rem 0 0; font-size: var(--text-micro); color: var(--text-lo); }
.tier-features {
  list-style: none;
  margin: 1.25rem 0 1.5rem; padding: 0;
  font-size: var(--text-small); color: var(--text-md);
}
.tier-features li {
  position: relative;
  padding: .45rem 0 .45rem 1.2rem;
  border-top: 1px solid var(--hairline);
  line-height: 1.5;
}
.tier-features li::before {
  content: "→";
  position: absolute; left: 0; top: .55rem;
  font: 400 var(--text-micro)/1.5 var(--font-mono);
  color: var(--text-lo);
}
.tier-features li.tier-inherit { color: var(--text-lo); }
.tier-features li.tier-inherit::before { content: "+"; }
.tier-cta { margin-top: auto; }

.doctrine {
  max-width: 46rem; margin-inline: auto;
  background: var(--ground-2);
  border: 1px solid var(--hairline-hi);
  border-left: 3px solid var(--trace);
  border-radius: var(--radius-m);
  padding: 1.75rem 2rem;
}
.doctrine p { max-width: none; }
.doctrine-rule {
  font-size: var(--text-lead); line-height: 1.5;
  font-weight: 600; color: var(--text-hi);
  margin: 0;
}

.faq { margin-top: 2.5rem; }
.faq-item { padding: 1.5rem 0; border-top: 1px solid var(--hairline); }
.faq-item:last-child { border-bottom: 1px solid var(--hairline); }
.faq-item h3 {
  font: 600 var(--text-body)/1.4 var(--font-sans);
  color: var(--text-hi);
  margin: 0 0 .6rem;
}
.faq-item p { font-size: var(--text-small); line-height: 1.65; margin: 0; max-width: 62ch; }
.faq-item p + p { margin-top: .6rem; }
/* FAQ page: group index + grouped questions */
.faq-index { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.75rem; padding: 0; list-style: none; }
.faq-index a {
  display: inline-block; padding: .35rem .75rem; border: 1px solid var(--hairline-hi); border-radius: 999px;
  font: 500 var(--text-small)/1.2 var(--font-sans); color: var(--text-md); text-decoration: none;
}
.faq-index a:hover { color: var(--text-hi); border-color: var(--accent); }
.faq-group { scroll-margin-top: 5rem; }
.faq-group + .faq-group { margin-top: 3.5rem; }
.faq-group .h2 { font-size: var(--text-h3); margin: 0; }
.faq-group .faq { margin-top: 1rem; }

/* ---------- Motion: reveals, reduced motion, no-JS (visual-system §4) ---------- */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.in--instant { transition: none !important; transition-delay: 0ms !important; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .trace-path { animation: none !important; stroke-dashoffset: 0; }
}

/* Review fixes (frontend.md): wide feature-shot width parity + mobile stat-value wrap */
.shot-wide { max-width: none; }
@media (max-width: 640px) {
  .stat-value { white-space: normal; }
}

/* Pricing: "coming soon" tier treatment */
.tier--soon { position: relative; }
.tier--soon .tier-name, .tier--soon .tier-price, .tier--soon .tier-features { opacity: .62; }
.tier-badge {
  position: absolute; top: .9rem; right: .9rem;
  font: 600 var(--text-micro)/1 var(--font-mono); letter-spacing: .04em; text-transform: uppercase;
  color: var(--trace); background: var(--trace-dim);
  border: 1px solid var(--trace); border-radius: 999px; padding: .3rem .55rem;
}
.btn--disabled { opacity: .5; cursor: default; pointer-events: none; }

/* Supporter waitlist (pricing) */
.notify { margin-top: 1rem; display: grid; gap: .5rem; }
.notify-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.notify-row .input { flex: 1 1 12rem; min-width: 0; }
.notify-note, .notify-done, .notify-err { margin: 0; font-size: .8125rem; color: var(--text-lo); }
.notify-done { color: var(--trace, #2fd19c); }
.notify-err { color: var(--danger, #f87171); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.tier--soon .notify { opacity: 1; }

/* Compare table (pricing/#compare). Same hairline construction as .tiers;
   first column is the capability, the other four are the tiers. On narrow
   screens the table scrolls inside its wrapper — the page never does. */
.compare-wrap { overflow-x: auto; margin-top: clamp(1.5rem, 3vw, 2.25rem); border: 1px solid var(--hairline); border-radius: var(--radius-m); background: var(--ground-2); }
.compare { width: 100%; min-width: 46rem; border-collapse: collapse; font-size: var(--text-small); }
.compare th, .compare td { padding: .6rem .9rem; border-top: 1px solid var(--hairline); vertical-align: top; text-align: left; }
.compare thead th { font: 500 var(--text-micro)/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--trace); border-top: 0; background: var(--ground-3); position: sticky; top: 0; text-align: center; }
.compare thead th.compare-feature { color: var(--text-lo); text-align: left; }
.compare tbody th { font-weight: 400; color: var(--text-md); width: 44%; }
.compare tbody td { color: var(--text-md); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: center; }
.compare tr.compare-group th { font: 500 var(--text-micro)/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-lo); background: var(--ground-1); padding-top: .9rem; }
.compare .yes { color: var(--trace); font-weight: 600; }
.compare .no { color: var(--text-lo); }
.compare .soon { color: var(--warn); font: 500 var(--text-micro)/1.4 var(--font-mono); letter-spacing: .04em; }
.compare td.compare-span { white-space: normal; text-align: left; color: var(--text-lo); }
.compare td.compare-never { color: var(--text-md); }
.compare-notes { color: var(--text-lo); margin-top: .9rem; }
.compare-notes sup { color: var(--text-md); }
@media (max-width: 639.98px) {
  /* phones: pin the capability column, let the tier columns scroll under it */
  .compare tbody th, .compare thead th.compare-feature { position: sticky; left: 0; z-index: 1; background: var(--ground-2); min-width: 11rem; width: 11rem; box-shadow: 1px 0 0 var(--hairline); }
  .compare thead th.compare-feature { background: var(--ground-3); z-index: 2; }
  /* a colspan cell fills the row and cannot shift, so the LABEL sticks instead */
  .compare tr.compare-group th { position: static; width: auto; min-width: 0; background: var(--ground-1); }
  .compare tr.compare-group th > span { position: sticky; left: .9rem; display: inline-block; }
}


/* Tier comparison table (pricing): one row per capability, one column per
   tier. Reuses the slab hairline construction and the tier-name type; the
   check is the trace green, the dash sits in low text so absence never reads
   as an error. Scrolls horizontally below tablet width rather than wrapping. */
.compare { margin-top: clamp(2rem, 4vw, 3rem); overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--hairline); border-radius: var(--radius-m); background: var(--ground-2); }
.compare table { width: 100%; min-width: 46rem; border-collapse: collapse; font-size: var(--text-small); }
.compare th, .compare td { padding: .65rem .9rem; border-top: 1px solid var(--hairline); vertical-align: top; }
.compare thead th { border-top: 0; text-align: center; vertical-align: bottom; padding-top: 1rem; padding-bottom: .9rem;
  font: 500 var(--text-micro)/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--trace); }
.compare thead th:first-child { text-align: left; color: var(--text-lo); font-weight: 400; }
.compare thead .compare-price { display: block; margin-top: .35rem; font: 500 var(--text-small)/1.2 var(--font-mono);
  letter-spacing: 0; text-transform: none; color: var(--text-hi); font-variant-numeric: tabular-nums; }
.compare thead .compare-soon { display: block; margin-top: .3rem; font: 400 var(--text-micro)/1.2 var(--font-mono);
  letter-spacing: .04em; text-transform: none; color: var(--warn); }
.compare tbody th { text-align: left; font-weight: 400; color: var(--text-md); width: 40%; }
.compare tbody th small { display: block; font-size: var(--text-micro); color: var(--text-lo); margin-top: .15rem; line-height: 1.4; }
.compare tbody td { text-align: center; color: var(--text-md); font-variant-numeric: tabular-nums; }
.compare tr.compare-group th { padding-top: 1.1rem; padding-bottom: .4rem; border-top: 1px solid var(--hairline-hi);
  font: 400 var(--text-micro)/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-lo); }
.compare .yes { color: var(--trace); font-weight: 600; }
.compare .no  { color: var(--text-lo); }
.compare .soon { color: var(--warn); }
.compare tbody tr:hover td, .compare tbody tr:hover th { background: rgba(255,255,255,.02); }
@media (max-width: 639.98px) { .compare th, .compare td { padding: .55rem .6rem; } .compare tbody th { width: 36%; } }

/* Ordinals gallery (home): a strip of real inscriptions, one rounded panel. */
.gallery { margin: 0; }
.gallery img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line, #1e2536); }

/* Pricing sheet (2026-09-09): compact cards, the table carries the features. */
.tiers--compact .tier-note { flex: 1; }
.compare-sub { display: block; font-weight: 400; color: var(--text-lo); font-size: var(--text-small); margin-top: .2rem; line-height: 1.4; }
.compare thead th { position: sticky; top: 64px; background: var(--ground-0); z-index: 1; } /* clears the 64px sticky nav */
.compare-price { display: block; font: 400 var(--text-micro)/1.2 var(--font-mono); color: var(--text-lo); text-transform: none; letter-spacing: 0; margin-top: .25rem; }
