/* ui/website/styles.css — The Agentic Corporation public website.
 *
 * Zero-build, zero external requests: system font stack only, no url() asset
 * references, no imports. Custom properties echo the spaceport token names
 * (ui/DESIGN-SYSTEM.md §2.4) so the public site carries the same dark
 * instrument identity as the control surfaces — without importing their code
 * (the spaceport/portal design systems stay tier-separated by design).
 *
 * Accessibility (WCAG 2.2 AA): body text >= 4.5:1 on its surface, visible
 * :focus-visible ring, prefers-reduced-motion respected, keyboard-first nav.
 * Trap red (#ff0033) is reserved platform-wide for honeypot alarms and is
 * deliberately NOT used anywhere on this site.
 */

:root {
  /* Spaceport-echo palette (ui/DESIGN-SYSTEM.md §2.4 primitives) */
  --bg: #0b0f1a;
  --bg-2: #111726;
  --bg-3: #161d2e;
  --fg: #c9d1d9;       /* ~12:1 on --bg */
  --fg-dim: #8a93a6;   /* ~5.8:1 on --bg-2 */
  --line: #243049;
  --accent: #2bd1e0;   /* ~10:1 on --bg */
  --ok: #4bd16a;
  --warn: #ffb020;
  --crit: #ff5252;

  /* Site-local tokens */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    monospace;
  --maxw: 66rem;
  --radius: 10px;
  --motion-fast: 120ms;
  --motion-standard: 180ms;

  /* Spacing scale (L1) — snap all component padding/margins to these so the
   * marketing pages + first-hire.html + the demo PDF read as one system. */
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-section: 4rem;   /* key-section rhythm, replaces the flat 3.5rem */

  /* Type scale (L3) — clamp() for fluid mobile -> desktop. The system-font
   * stacks above stay the type source (a real speed/privacy selling point). */
  --text-xs: 0.8rem;
  --text-sm: 0.9rem;
  --text-base: 1rem;
  --text-lg: 1.15rem;
  --text-h3: clamp(1.1rem, 1rem + 0.6vw, 1.35rem);
  --text-h2: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
  --text-h1: clamp(2rem, 1.5rem + 3vw, 3.25rem);
  --leading-tight: 1.2;
  --leading-body: 1.6;

  color-scheme: dark;
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

/* Mobile-overflow guard: no element may exceed the viewport width. A single
 * wide element (a full-page screenshot, a non-wrapping line) used to expand the
 * layout past device-width and squeeze the copy into a narrow left column. */
html, body { overflow-x: hidden; max-width: 100%; }
img { max-width: 100%; height: auto; }
/* Grid/flex children default to min-width:auto and refuse to shrink below their
 * content's intrinsic width — that is what forced the horizontal overflow. Let
 * them shrink so columns collapse cleanly on small screens. */
.hero-grid > *, .showcase-row > *, .grid-3 > *, .grid-2 > *, .foot-grid > * { min-width: 0; }

h1, h2, h3 {
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  color: var(--fg);
}

h1 { font-size: var(--text-h1); margin: 0 0 var(--space-2); }
h2 { font-size: var(--text-h2); margin: 0 0 var(--space-2); }
h3 { font-size: var(--text-h3); margin: 0 0 var(--space-1); }

p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.4rem; }
li { margin-bottom: 0.4rem; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

code {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.08em 0.35em;
}

.dim { color: var(--fg-dim); }
.small { font-size: 0.875rem; }
.mt-md { margin-top: 1.2rem; }
.mt-lg { margin-top: 1.4rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Section rhythm (L2): alternating surfaces + a larger section-padding token
 * so hero -> pillars -> how -> security -> pricing -> CTA read as distinct
 * "chapters" instead of one undifferentiated dark slab. */
section { padding: var(--space-section) 0; }
section + section { border-top: 1px solid var(--line); }

/* Alternate the surface of odd content sections inside <main> for a subtle
 * banded rhythm. The hero, .cta-band, and .arena-hero set their own surface,
 * so they opt out. Contrast is unchanged: --fg/--fg-dim clear AA on --bg-2. */
main > section:nth-of-type(even):not(.hero):not(.cta-band) {
  background: var(--bg-2);
}
/* On a banded (--bg-2) section, lift surfaces that default to --bg-2 to --bg-3
 * so cards/steps/notes stay visually distinct from the section behind them. */
main > section:nth-of-type(even):not(.hero):not(.cta-band) :is(.card, .steps > li, .inv, .status-note, .term, .pledges li, .shot-frame, .diagram) {
  background: var(--bg-3);
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.lede {
  font-size: var(--text-lg);
  line-height: var(--leading-body);
  color: var(--fg-dim);
  max-width: 46rem;
}

/* ---------- focus & motion (WCAG 2.2) ---------- */

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- header / nav ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--fg);
  margin-right: auto;
}
.brand svg { color: var(--accent); flex: none; }
.brand-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg-dim);
  border-left: 1px solid var(--line);
  padding-left: 0.55rem;
}

.nav-toggle {
  display: none;
  font: inherit;
  font-family: var(--font-mono);
  color: var(--fg);
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}

.site-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.site-menu a {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.25rem 0.1rem;
}
.site-menu a:hover { color: var(--accent); }
.site-menu a[aria-current="page"] {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

/* Mobile: collapse only when JS is present (no-JS keeps links visible). */
@media (max-width: 720px) {
  html.js .site-nav { width: 100%; }
  html.js .nav-toggle { display: inline-flex; }
  html.js .site-menu { display: none; width: 100%; }
  html.js .site-menu.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: var(--space-2) 0 var(--space-1);
    border-top: 1px solid var(--line);
  }
  /* S9: each stacked menu row is a >=44px tap target (WCAG 2.5.8 / Apple HIG).
   * Full-width rows so the whole row is tappable, not just the text glyphs. */
  html.js .site-menu.open li { width: 100%; }
  html.js .site-menu.open a {
    display: flex;
    align-items: center;
    min-height: 44px;
    width: 100%;
    padding: var(--space-2) var(--space-1);
  }
}

/* ---------- buttons / chips / badges ---------- */

/* Button hierarchy (S2 / Design-System Components): widen the primary-vs-
 * secondary delta so the ONE click that matters pops. Primary = solid --accent,
 * heavier weight. Secondary/ghost = muted NEUTRAL border (not cyan) on
 * transparent — clearly subordinate. Every button clears a >=44px tap target. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--line);
  transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease,
    border-color var(--motion-fast) ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(43, 209, 224, 0.35), 0 6px 18px rgba(43, 209, 224, 0.16);
}
.btn-primary:hover { background: #57dde9; border-color: #57dde9; }
/* Secondary / ghost: neutral border, NOT cyan — visually subordinate to primary.
 * Text stays --fg (~12:1 on --bg) for AA; --accent is reserved for the dominant
 * primary CTA and inline links. */
.btn-ghost {
  color: var(--fg);
  background: transparent;
  border-color: var(--line);
  font-weight: 600;
}
.btn-ghost:hover { background: var(--bg-3); border-color: var(--fg-dim); color: var(--fg); }
.nav-cta { min-height: 0; padding: var(--space-1) var(--space-3); font-size: var(--text-sm); }

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  border: 1px solid var(--line);
  background: var(--bg-3);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  letter-spacing: 0.04em;
}

.badge-warn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--warn);
  border: 1px solid var(--warn);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  letter-spacing: 0.04em;
}

/* ---------- hero ---------- */

.hero {
  padding: 4.5rem 0 3.5rem;
  background:
    radial-gradient(60rem 28rem at 70% -10%, rgba(43, 209, 224, 0.10), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(36, 48, 73, 0.45) 47px 48px),
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(36, 48, 73, 0.45) 47px 48px),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero .lede { font-size: 1.2rem; }
.hero-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin: var(--space-4) 0 var(--space-3);
}
.hero-chips { margin-bottom: var(--space-4); display: flex; gap: var(--space-1); flex-wrap: wrap; }

/* ---------- terminal ---------- */

.term {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.55;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 1.8rem 0 0;
  max-width: 46rem;
  overflow-x: auto;
}
.term-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0.9rem;
  border-bottom: 1px solid var(--line);
  color: var(--fg-dim);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}
.term pre {
  margin: 0;
  padding: 0.9rem 1rem 1rem;
  white-space: pre;
}
.term .t-cmd { color: var(--fg); font-weight: 600; }
.term .t-ok { color: var(--ok); }
.term .t-warn { color: var(--warn); }
.term .t-dim { color: var(--fg-dim); }

/* S3: on narrow phones the hero terminal is the first "visual" under the H1.
 * Shrink the mono a touch and let the long lines wrap instead of forcing a
 * cramped sideways scroll, so the proof element is legible at a glance. */
@media (max-width: 720px) {
  /* On phones/small tablets the CLI block wraps instead of forcing a tiny
   * horizontal scroll — keeps the homepage hero clean down to 320px. */
  .term { font-size: clamp(0.72rem, 0.6rem + 1.6vw, 0.88rem); }
  .term pre { white-space: pre-wrap; word-break: break-word; }
}

/* ---------- cards & grids ---------- */

/* INTRINSIC RESPONSIVE GRIDS (architecture). Cards reflow fluidly at EVERY width
 * — 3-up -> 2-up -> 1-up by available space, no breakpoint cliffs, no
 * transition-zone breakage. minmax(min(100%, basis), 1fr) guarantees a single
 * column can never be wider than the container, so nothing can overflow on any
 * device, in any orientation, at any zoom. This replaces the old fixed
 * repeat(N,1fr) + media-query collapse that broke between mobile and desktop. */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1.1rem;
  margin-top: 1.6rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1.1rem;
  margin-top: 1.6rem;
}

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.card h3 { display: flex; align-items: center; gap: 0.55rem; }
.card h3 svg { color: var(--accent); flex: none; }
.card .card-kicker {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-dim);
  margin: 0 0 0.6rem;
}
.card p:last-child { margin-bottom: 0; }

/* ---------- how-it-works steps ---------- */

.steps {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  display: grid;
  gap: 0.9rem;
  counter-reset: step;
}
.steps > li {
  counter-increment: step;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4) var(--space-3) 3.5rem;
  position: relative;
}
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: var(--space-3);
  top: var(--space-3);
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
}
.steps h3 { margin-bottom: 0.3rem; }
.steps p { margin: 0; color: var(--fg-dim); }
.steps code { color: var(--fg); }

/* ---------- invariants / mechanism blocks ---------- */

.inv {
  border-left: 3px solid var(--accent);
  background: var(--bg-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.3rem 0.9rem;
  margin-top: 1.1rem;
}
.inv h3 { color: var(--fg); }
.inv p { color: var(--fg-dim); margin-bottom: 0.6rem; }

.mech {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--fg);
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.5rem 0.8rem;
  margin: 0 0 0.4rem;
  overflow-wrap: anywhere;
}
.mech .m-label {
  color: var(--ok);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
  margin-right: 0.5rem;
}

/* ---------- pricing ---------- */

.price-cards { align-items: stretch; }
.price-card { display: flex; flex-direction: column; }
.price-card .price {
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0.3rem 0 0.1rem;
}
.price-card .price-sub {
  color: var(--fg-dim);
  font-size: 0.86rem;
  min-height: 2.4em;
  margin-bottom: 0.8rem;
}
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.1rem;
  flex: 1;
}
.price-card li {
  padding-left: 1.3rem;
  position: relative;
  font-size: 0.93rem;
  margin-bottom: 0.45rem;
}
.price-card li::before {
  content: "+";
  position: absolute;
  left: 0.1rem;
  color: var(--ok);
  font-family: var(--font-mono);
  font-weight: 700;
}
.price-card.featured { border-color: var(--accent); }
.price-card .price-badge {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  margin: 0 0 0.5rem;
}

/* ---------- status / honesty notes ---------- */

.status-note {
  border: 1px solid var(--warn);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 0.9rem 1.2rem;
  margin-top: 1.4rem;
}
.status-note p { margin: 0; color: var(--fg); font-size: 0.92rem; }
.status-note .m-label {
  font-family: var(--font-mono);
  color: var(--warn);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  margin-right: 0.5rem;
}

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; margin-top: 1.4rem; }
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
}
caption {
  text-align: left;
  color: var(--fg-dim);
  font-size: 0.85rem;
  padding-bottom: 0.5rem;
}
th, td {
  border: 1px solid var(--line);
  padding: 0.6rem 0.8rem;
  text-align: left;
  vertical-align: top;
}
th { background: var(--bg-3); font-family: var(--font-mono); font-size: 0.82rem; }
td .mono { color: var(--accent); }

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

.cta-band {
  text-align: center;
  background:
    radial-gradient(40rem 16rem at 50% 120%, rgba(43, 209, 224, 0.12), transparent 70%),
    var(--bg-2);
  border-top: 1px solid var(--line);
}
.cta-band .hero-actions { justify-content: center; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 2.2rem 0 1.6rem;
  margin-top: 0;
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}
@media (max-width: 720px) {
  .foot-grid { grid-template-columns: 1fr; }
}
.site-footer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer nav li { margin-bottom: 0.35rem; }
.site-footer a { color: var(--fg); }
.site-footer a:hover { color: var(--accent); }
.foot-meta {
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.foot-meta p { margin: 0; }

/* ---------- arena page ("THE ROYALE") ---------- */
/* Rarity-tinted accents for the reward track, extending the existing
 * custom-prop system. WCAG 2.x AA — measured contrast ratios (relative
 * luminance) for every token against every surface it can render on:
 *
 *   token                  on --bg #0b0f1a   on --bg-2 #111726   on --bg-3 #161d2e
 *   --rar-bronze #e8b08a   10.03 : 1          9.37 : 1            8.81 : 1
 *   --rar-silver #ccd6e4   13.04 : 1         12.18 : 1           11.45 : 1
 *   --rar-gold   #f2c94c   12.06 : 1         11.27 : 1           10.59 : 1
 *   --rar-plat   #8ef0e2   14.32 : 1         13.38 : 1           12.58 : 1
 *   --crit       #ff5252    6.00 : 1          5.60 : 1            5.27 : 1  (law display)
 *
 * Worst case is 5.27:1 — every text use clears AA (>= 4.5:1 normal text) on
 * its darkest-case surface. Rarity tints also serve as decorative borders
 * (non-text). The reserved honeypot-alarm trap red #ff0033 is NOT used here
 * or anywhere on this site (see the header comment rule; test-enforced). */
:root {
  --rar-bronze: #e8b08a;
  --rar-silver: #ccd6e4;
  --rar-gold: #f2c94c;
  --rar-plat: #8ef0e2;
}

.arena-hero {
  background:
    radial-gradient(56rem 26rem at 75% -12%, rgba(43, 209, 224, 0.14), transparent 60%),
    radial-gradient(42rem 22rem at 10% 110%, rgba(242, 201, 76, 0.07), transparent 65%),
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(36, 48, 73, 0.45) 47px 48px),
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(36, 48, 73, 0.45) 47px 48px),
    var(--bg);
}
.arena-hero h1 {
  font-size: clamp(2.6rem, 7.5vw, 4.4rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.arena-hero .royale-word { color: var(--accent); }

/* The five worlds — inert chips naming the real scene skins. */
.worlds {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: 1.4rem 0 0.6rem;
}
.worlds .world {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--fg);
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
}
.worlds .w-glyph { display: inline-block; }
/* Decorative per-world border tints (non-text), drawn from the prop system. */
.world-spaceport { border-color: var(--accent); }
.world-dungeon { border-color: var(--rar-bronze); }
.world-abyss { border-color: var(--rar-silver); }
.world-hive { border-color: var(--rar-gold); }
.world-grid { border-color: var(--rar-plat); }
.worlds-note { color: var(--fg-dim); font-size: 0.92rem; max-width: 46rem; }

/* Season-loop strip (Drop Pools -> Bracket -> Crown). */
.royale-step .step-glyph {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 0.6rem;
}
.royale-step .step-sub {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-dim);
  border-top: 1px dashed var(--line);
  padding-top: 0.6rem;
  margin: 0.8rem 0 0;
}

/* The safety law — disqualification block (uses --crit, never trap red). */
.law-claim {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--crit);
}
.inv-law { border-left-color: var(--crit); }
.dq-triggers {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.5rem;
}
.dq-triggers li {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--fg);
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.5rem 0.8rem;
  margin: 0;
}
.dq-triggers .dq-mark {
  color: var(--crit);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-right: 0.6rem;
}

/* Reward track — rarity-tinted placement tiers. */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 1.1rem;
  margin-top: 1.6rem;
}
.tier { border-top: 3px solid var(--line); }
.tier .tier-name {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 0.45rem;
}
.tier p:last-child { color: var(--fg-dim); font-size: 0.92rem; }
.tier-bronze { border-top-color: var(--rar-bronze); }
.tier-bronze .tier-name { color: var(--rar-bronze); }
.tier-silver { border-top-color: var(--rar-silver); }
.tier-silver .tier-name { color: var(--rar-silver); }
.tier-gold { border-top-color: var(--rar-gold); }
.tier-gold .tier-name { color: var(--rar-gold); }
.tier-plat { border-top-color: var(--rar-plat); }
.tier-plat .tier-name { color: var(--rar-plat); }

/* Spectator-shop pledges. */
.pledges {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  display: grid;
  gap: 0.6rem;
}
.pledges li {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin: 0;
  color: var(--fg-dim);
}
.pledges .p-rule {
  font-family: var(--font-mono);
  color: var(--fg);
  letter-spacing: 0.02em;
  margin-right: 0.35rem;
}

/* Motion: strictly opt-in (and the global reduced-motion kill-switch above
 * still applies). Transform-only, slow, decorative — the world glyphs drift
 * a few pixels; nothing flashes, nothing loops fast, nothing conveys data. */
@media (prefers-reduced-motion: no-preference) {
  .worlds .w-glyph {
    animation: world-drift 6s ease-in-out infinite;
  }
  .worlds .world:nth-child(2) .w-glyph { animation-delay: 0.7s; }
  .worlds .world:nth-child(3) .w-glyph { animation-delay: 1.4s; }
  .worlds .world:nth-child(4) .w-glyph { animation-delay: 2.1s; }
  .worlds .world:nth-child(5) .w-glyph { animation-delay: 2.8s; }
}
@keyframes world-drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ==================================================================
 * VISUAL-UPGRADE COMPONENTS (DESIGN-SPEC §1) — additive, token-reusing.
 * No new color primitives; all surfaces are --bg/--bg-2/--bg-3/--line/
 * --accent/--fg/--fg-dim/--ok. The reserved honeypot trap red #ff0033 is
 * NOT used here (the .shot-dot frame dots are neutral --line, not traffic
 * lights). WCAG 2.2 AA: contrast unchanged; focus ring + reduced-motion
 * kill-switch (above) apply to these for free; mobile-first responsive.
 * ================================================================== */

/* ---------- product screenshot showcase (.shot) — DESIGN-SPEC §1.1/§1.2 ---------- */
/* A framed, captioned screenshot rendered as a faux browser/app window: the
 * trust device that signals "real product, not a mockup." position:relative
 * anchors the optional .shot-callout pins. */
.shot {
  position: relative;
  margin: var(--space-5) 0 0;
  max-width: 60rem;
}
/* In the single-column hero the product shot is centred so it reads as a
 * deliberate hero preview, not a left-stranded image. */
.hero .shot { margin-left: auto; margin-right: auto; }
.shot-frame {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(43, 209, 224, 0.06), 0 18px 50px rgba(0, 0, 0, 0.45);
}
.shot-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  background: var(--bg-3);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--fg-dim);
}
/* Neutral grey dots — deliberately NOT red/yellow/green traffic lights, to stay
 * on-palette and clear of any #ff0033-adjacent red. */
.shot-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
  flex: none;
}
.shot-url {
  margin-left: 0.6rem;
  padding: 0.1rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}
/* width/height attrs are mandatory in markup to reserve aspect ratio (no CLS). */
.shot-img {
  display: block;
  width: 100%;
  /* Full-page captures are TALL portraits (e.g. 1280x1987). Framing every shot
   * to a uniform 16:10 window and cropping from the TOP (object-fit:cover, never
   * the default 'fill') shows a clean preview without squishing — this is the
   * fix for the distortion the old fixed 1440x900 box caused. */
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
  object-position: top center;
  background: var(--bg);
}
.shot-cap {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--fg-dim);
  line-height: var(--leading-body);
}
/* The honesty tag rides INSIDE every caption — mono, dim, always visible, never
 * color-only: it reads as literal text, so it survives for screen-reader +
 * colorblind users. */
.shot-tag {
  display: inline-block;
  margin-right: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--fg-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  letter-spacing: 0.04em;
}

/* Optional annotation pin over a shot. Benefit-focused, < ~5 words. Positions
 * are set per-instance with utility classes (.is-tr/.is-bl …), NOT inline
 * style (test-enforced). --fg on --bg-3 clears AA. */
.shot-callout {
  position: absolute;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--fg);
  background: var(--bg-3);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  max-width: 14rem;
  z-index: 1;
}
.shot-callout.is-tr { top: 8%; right: 4%; }
.shot-callout.is-tl { top: 8%; left: 4%; }
.shot-callout.is-br { bottom: 14%; right: 4%; }
.shot-callout.is-bl { bottom: 14%; left: 4%; }
/* On phones the callouts must never cover the UI: a per-instance .shot-pins
 * <ul> (rendered below the image) is shown and the overlay pins are hidden. The
 * .shot-pins list is hidden on desktop where the overlay pins are used. */
.shot-pins {
  list-style: none;
  padding: 0;
  margin: var(--space-2) 0 0;
  display: none;
  gap: 0.4rem;
}
.shot-pins li {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--fg);
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  margin: 0;
}
@media (max-width: 720px) {
  .shot-callout { display: none; }
  .shot-pins { display: grid; }
}

/* ---------- screenshot gallery + CSS-only lightbox (zero-JS; works at ALL widths) ---------- */
/* Thumbnails reflow with the same intrinsic auto-fit grid (never overflow). Tapping
 * a thumbnail opens a pure-CSS :target lightbox that shows the FULL screenshot,
 * scrollable for tall full-page captures. Identical on phone + desktop, no script,
 * no layout risk — the product visuals can't break the page. */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1.2rem;
  margin-top: 1.8rem;
}
.gallery figure { margin: 0; min-width: 0; }
.gallery .shot { margin: 0; max-width: none; }
.shot-link { display: block; text-decoration: none; color: inherit; }
.shot-link .shot-frame { transition: border-color var(--motion-fast) ease; }
.shot-link:hover .shot-frame,
.shot-link:focus-visible .shot-frame { border-color: var(--accent); }
.shot-zoom {
  float: right;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: 0.04em;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  background: rgba(5, 8, 15, 0.94);
  overflow: auto;
  padding: clamp(0.8rem, 3vw, 2.4rem);
}
.lightbox:target { display: block; }
.lightbox-inner { max-width: 72rem; margin: 0 auto; }
.lightbox-bar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 0 0.8rem;
  color: var(--fg-dim);
  font-size: var(--text-sm);
}
.lightbox img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

/* ---------- alternating image / text showcase (.showcase) — DESIGN-SPEC §1.3 ---------- */
.showcase {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-5);
}
.showcase-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-5);
  align-items: center;
}
.showcase-row:nth-child(even) .showcase-media { order: 2; }   /* zig-zag */
.showcase-media .shot { margin-top: 0; }
.showcase-copy h3 { margin-bottom: var(--space-2); }
.showcase-copy p { color: var(--fg-dim); }
@media (max-width: 860px) {
  .showcase-row { grid-template-columns: 1fr; }
  /* Stack: image ALWAYS first so the product is seen immediately. */
  .showcase-row:nth-child(even) .showcase-media { order: 0; }
}

/* ---------- hero with product shot (.hero-grid) — DESIGN-SPEC §1.4 ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--space-5);
  align-items: center;
}
.hero-grid .shot { margin-top: 0; }
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }   /* copy first, shot below */
}

/* ---------- inline-SVG flow / boundary diagrams (.diagram) — DESIGN-SPEC §1.5 ---------- */
/* Inline <svg> only (no url(), no external file). currentColor + token fills. */
.diagram {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-top: var(--space-5);
}
.diagram svg {
  display: block;
  width: 100%;
  height: auto;
  color: var(--accent);
}
.diagram figcaption {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--fg-dim);
}

/* ---------- section-feature escape hatch — DESIGN-SPEC §1.6 ---------- */
/* Opts a section OUT of the even-band so a screenshot showcase is a full-bleed
 * --bg "breath" between two banded text sections. */
main > section.section-feature { background: var(--bg); }
main > section.section-feature :is(.shot-frame, .card) { background: var(--bg-2); }

/* ---------- governance reserved slot (.governance-slot) — DESIGN-SPEC §1.7 ---------- */
/* A clearly-labeled, honest placeholder for the OPTIONAL dark operator shots
 * (Command Bridge / SOC / hash-chained audit ledger / honeypot trap). Renders
 * as a reserved "coming" area, never a fake image. When filled, drop a .shot in
 * here — no layout change. */
.governance-slot {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: var(--space-5);
  text-align: center;
  color: var(--fg-dim);
  margin-top: var(--space-5);
}
.governance-slot .gs-kicker {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  display: block;
  margin-bottom: var(--space-1);
}
.governance-slot p { margin: 0; }

/* ---------- tier ladder ("what scales") — DESIGN-SPEC §1.8 / §3.1 ---------- */
/* Constant "Same at every tier" band over five rising dials. No animated fills
 * (reduced-motion safe by construction); static ramps. No new colors. */
.tier-ladder { margin-top: var(--space-5); }
/* The constant floor: --accent-bordered bar read as "guaranteed at every tier." */
.tier-constant {
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background:
    linear-gradient(0deg, rgba(43, 209, 224, 0.06), rgba(43, 209, 224, 0.06)),
    var(--bg-2);
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.9rem;
}
.tier-constant .tc-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.tier-constant .tc-item { color: var(--fg); font-weight: 600; }
.tier-constant .tc-item + .tc-item::before {
  content: "·";
  color: var(--fg-dim);
  margin-right: 0.6rem;
  font-weight: 400;
}
/* The five dials: each a labeled start → end ramp. */
.tier-dials {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0 0;
  display: grid;
  gap: 0.7rem;
}
.tier-dial {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: var(--space-2) var(--space-4);
  align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  margin: 0;
}
.tier-dial .td-name {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--fg-dim);
}
.tier-dial .td-ramp {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
/* The visual ramp: a thin track that thickens accent→ low to high. Static. */
.tier-dial .td-track {
  flex: 1;
  height: 6px;
  min-width: 3rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--line), var(--accent));
}
.tier-dial .td-from { color: var(--fg-dim); font-family: var(--font-mono); font-size: var(--text-sm); white-space: nowrap; }
.tier-dial .td-to { color: var(--fg); font-family: var(--font-mono); font-weight: 700; white-space: nowrap; }
.tier-dial .td-arrow { color: var(--fg-dim); flex: none; }
@media (max-width: 640px) {
  .tier-dial { grid-template-columns: 1fr; gap: var(--space-1); }
}

/* ---------- capability-by-tier matrix — DESIGN-SPEC §3.2 ---------- */
/* Reuses the base table/.table-wrap styling; adds labeled category row-group
 * bands + alternating row shading for cross-row scanning. Checkmarks pair the
 * glyph with visually-hidden "included" text (.matrix-yes .sr-only) — never
 * color-only. --ok for checks (never trap red). The Security-baseline group is
 * an intentional wall of identical checks; do NOT hide it on mobile. */
.matrix th[scope="row"] { font-family: var(--font-sans); font-weight: 600; background: var(--bg-2); }
.matrix tbody tr:nth-child(even) td,
.matrix tbody tr:nth-child(even) th[scope="row"] { background: var(--bg-3); }
.matrix .matrix-group th {
  background: var(--bg-2);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.matrix .matrix-yes { color: var(--ok); font-weight: 700; }
.matrix .matrix-num { font-family: var(--font-mono); color: var(--accent); }
/* Visually-hidden "included" text companion for the check glyph (a11y; not
 * color-only). Standard sr-only clip pattern. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- early-access waitlist form (theme-agnostic gray alphas; no url(), no @import) ---- */
.wl-form { margin-top: 1.5rem; max-width: 760px; }
.wl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem 1.25rem; }
.wl-field { display: flex; flex-direction: column; gap: .35rem; font-size: .93rem; }
.wl-field > span { font-weight: 600; }
.wl-field em { color: #d06; font-style: normal; }
.wl-span-2 { grid-column: 1 / -1; }
.wl-form input, .wl-form select, .wl-form textarea {
  font: inherit; padding: .6rem .7rem; border-radius: 8px;
  border: 1px solid #8886; background: #8881; color: inherit; width: 100%; box-sizing: border-box;
}
.wl-form textarea { resize: vertical; min-height: 6.5rem; }
.wl-form input:focus, .wl-form select:focus, .wl-form textarea:focus { outline: 2px solid #69f; outline-offset: 1px; }
