/* ============================================================
   Design tokens
   ------------------------------------------------------------
   Palette is a graphite/ink control-room base with two accents
   that are not decoration — they are the product's own signal
   colors: teal is what the agent calls "tier-1" (safe, resolved
   automatically), amber is "tier-2" (paused for a human). Both
   colors recur everywhere in this site with that exact meaning,
   including the live demo output.
   ============================================================ */
:root {
  --bg: #0b0e13;
  --panel: #12161d;
  --panel-2: #171c25;
  --border: #232a35;
  --border-strong: #303a48;
  --text: #e7eaee;
  --text-dim: #8a93a3;
  --text-faint: #5b6472;
  --teal: #37c9a0;
  --teal-dim: #1f4d40;
  --amber: #e8a33d;
  --amber-dim: #5a3f18;
  --red: #e5626b;
  --red-dim: #4a2226;

  --font-display: "Space Grotesk", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius-sm: 4px;
  --radius-md: 6px;
  --content-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------------- Nav ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 14, 19, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 28px;
  max-width: var(--content-max);
  margin: 0 auto;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  flex-shrink: 0;
}
.nav__brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: inline-block;
  object-fit: contain;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links li { white-space: nowrap; }
.nav__links a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 14.5px;
  transition: color 0.15s ease;
}
.nav__links a:hover { color: var(--text); }
.nav__cta {
  border: 1px solid var(--border-strong);
  background: var(--panel-2);
  color: var(--text);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.nav__cta:hover { border-color: var(--amber); }
.nav__right { display: flex; align-items: center; gap: 12px; }
.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--panel-2);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 8px 28px 16px;
  }
  .nav__links.is-open { display: flex; }
  .nav__links li { width: 100%; }
  .nav__links a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav { position: sticky; }
  .nav__row { position: relative; flex-wrap: wrap; }
  .nav__cta { display: none; }
  .nav__toggle { display: inline-flex; }
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--amber);
  color: #1a1204;
}
.btn--primary:hover { background: #f0ae4d; }
.btn--ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn--sm { padding: 8px 14px; font-size: 13.5px; }

/* ---------------- Hero ---------------- */
.hero {
  padding: 88px 0 96px;
  border-bottom: 1px solid var(--border);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 940px) {
  .hero__grid { grid-template-columns: 1fr; }
}
.hero__kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
  max-width: 16ch;
}
.hero__sub {
  color: var(--text-dim);
  font-size: 1.1rem;
  max-width: 46ch;
  margin: 0 0 32px;
}
.hero__ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.hero__strip {
  font-size: 14.5px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 20px;
  max-width: 50ch;
}
.hero__strip b { color: var(--text); font-weight: 500; }
.hero__strip .dot-teal, .hero__strip .dot-amber {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 6px;
}
.dot-teal { background: var(--teal); }
.dot-amber { background: var(--amber); }

/* ---------------- Terminal panel ---------------- */
.term {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6);
}
.term__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}
.term__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.term__title {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}
.term__body {
  padding: 18px 20px 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-dim);
  overflow-x: auto;
}
.term__body .k { color: #7fb2c9; }
.term__body .s { color: var(--text); }
.term__body .n { color: var(--teal); }
.term__body .amber-v { color: var(--amber); }
.term__body .punc { color: var(--text-faint); }
.term__body .c { color: var(--text-faint); }
.term__line { white-space: pre; opacity: 0; animation: term-in 0.35s ease forwards; }

@keyframes term-in {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- Section shell ---------------- */
.section {
  padding: 88px 0;
  border-bottom: 1px solid var(--border);
}
.section--tight { padding: 64px 0; }
.section__head {
  max-width: 62ch;
  margin-bottom: 48px;
}
.section__head h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.section__head p {
  color: var(--text-dim);
  font-size: 1.03rem;
  margin: 0;
}

/* ---------------- Pipeline (numbered, real sequence) ---------------- */
.pipeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
@media (max-width: 940px) {
  .pipeline { grid-template-columns: 1fr; }
}
.pipeline__step {
  padding: 22px 20px;
  border-right: 1px solid var(--border);
  background: var(--panel);
}
.pipeline__step:last-child { border-right: none; }
@media (max-width: 940px) {
  .pipeline__step { border-right: none; border-bottom: 1px solid var(--border); }
  .pipeline__step:last-child { border-bottom: none; }
}
.pipeline__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.pipeline__step h3 {
  font-size: 15px;
  margin: 0 0 8px;
}
.pipeline__step p {
  font-size: 13.5px;
  color: var(--text-dim);
  margin: 0;
}
.pipeline__step--amber { background: linear-gradient(180deg, rgba(232,163,61,0.07), transparent 60%); }
.pipeline__step--amber .pipeline__num { color: var(--amber); }
.pipeline__stat {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.pipeline__stat small { font-size: 14px; font-weight: 400; color: var(--text-faint); }
.bench-note { font-size: 13px; color: var(--text-faint); margin: 18px 0 16px; max-width: 70ch; }
.bench-note code { font-family: var(--font-mono); background: var(--panel-2); padding: 1px 6px; border-radius: 3px; color: var(--text-dim); }

/* ---------------- Watch it decide (public, no-login replay) ---------------- */
.wid-note {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  border: 1px solid var(--border);
  background: var(--panel-2);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  margin-bottom: 22px;
  display: inline-block;
}

.wid-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
@media (max-width: 780px) { .wid-picker { grid-template-columns: 1fr; } }
.wid-picker__btn {
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  font-family: var(--font-display);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.wid-picker__btn:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.wid-picker__btn.is-active { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal-glow); }
.wid-picker__q { font-family: var(--font-mono); font-size: 13px; color: var(--text); }
.wid-picker__btn .pill { align-self: flex-start; }

.pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill--pass { background: var(--teal-dim); color: var(--teal); }
.pill--wait { background: var(--amber-dim); color: var(--amber); }

.wid-stage { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px 26px; }

.wid-progress { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.wid-dot {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.wid-dot b { font-weight: 500; }
.wid-dot.is-done { color: var(--teal); border-color: var(--teal-dim); }
.wid-dot.is-active { color: var(--text); border-color: var(--border-strong); background: var(--panel-2); }

.wid-step__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.wid-step__n { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.wid-step__head h3 { font-size: 17px; margin: 0; }
.wid-step__body {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-dim);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  white-space: pre-wrap;
  overflow-x: auto;
  margin: 0;
}
.wid-step__body .k { color: #7fb2c9; }
.wid-step__body .s { color: var(--text); }
.wid-step__body .n { color: var(--teal); }
.wid-step__body .amber-v { color: var(--amber); }
.wid-step__body .punc { color: var(--text-faint); }
.wid-step__body .c { color: var(--text-faint); }

.wid-result {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wid-result::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.wid-result--pass { background: var(--teal-dim); color: var(--teal); }
.wid-result--wait { background: var(--amber-dim); color: var(--amber); }

.wid-controls { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.wid-controls button:disabled { opacity: 0.4; cursor: not-allowed; }

.wid-cta { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-dim); }
.wid-cta p { margin: 0; max-width: 60ch; }
.pipeline--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 780px) { .pipeline--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .pipeline--4 { grid-template-columns: 1fr; } }

/* ---------------- Pricing section ---------------- */
.subsection-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 10px;
}
.subsection-label:not(:first-child) { margin-top: 44px; }

.pkg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }
@media (max-width: 720px) { .pkg-grid { grid-template-columns: 1fr; } }
.pkg-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.pkg-card:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: 0 18px 40px -24px var(--teal-glow); }
.pkg-card__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 14px;
}
.pkg-card__tag--free { background: var(--teal-dim); color: var(--teal); }
.pkg-card__tag--paid { background: var(--amber-dim); color: var(--amber); }
.pkg-card h3 { font-size: 17px; margin: 0 0 8px; }
.pkg-card p { font-size: 14px; color: var(--text-dim); margin: 0 0 14px; }
.pkg-card ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--text-dim); }
.pkg-card li { margin-bottom: 6px; }

.price-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 14px;
}
@media (max-width: 860px) { .price-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .price-grid { grid-template-columns: 1fr; } }
.price-card { background: var(--panel); padding: 24px 22px; display: flex; flex-direction: column; }
.price-card--featured { background: var(--panel-2); position: relative; padding-top: 42px; }
.price-card--featured::before {
  content: "MOST COMMON";
  position: absolute; top: 0; left: 0; right: 0;
  background: var(--amber); color: #1a1204;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.06em;
  text-align: center; padding: 4px 0;
}
.price-card__name { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 10px; }
.price-card__price { font-family: var(--font-mono); font-size: 28px; font-weight: 600; letter-spacing: -0.01em; }
.price-card__price small { font-size: 13px; font-weight: 400; color: var(--text-faint); }
.price-card__scope { font-size: 12.5px; color: var(--text-dim); margin: 6px 0 16px; }
.price-card ul { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--text-dim); flex: 1; }
.price-card li { padding: 7px 0; border-top: 1px solid var(--border); }
.price-card li:first-child { border-top: none; }
.price-note { font-size: 12.5px; color: var(--text-faint); margin-top: 6px; max-width: 76ch; }
.price-note a { color: var(--text-dim); text-decoration: underline; text-decoration-color: var(--border-strong); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } }
.split-col { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 22px 24px; }
.split-col h4 { font-size: 13px; font-family: var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.split-col h4 .dot { width: 6px; height: 6px; border-radius: 50%; }
.split-col--today h4 .dot { background: var(--teal); }
.split-col--roadmap h4 .dot { background: var(--amber); }
.split-col ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--text-dim); }
.split-col li { margin-bottom: 9px; }
.split-col li:last-child { margin-bottom: 0; }

/* ---------------- Spec grid (capabilities) ---------------- */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
@media (max-width: 860px) {
  .spec-grid { grid-template-columns: 1fr; }
}
.spec-grid__cell {
  padding: 28px 26px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.spec-grid__cell:nth-child(3n) { border-right: none; }
@media (max-width: 860px) {
  .spec-grid__cell { border-right: none; }
}
.spec-grid__cell h3 {
  font-size: 16px;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.spec-grid__cell p {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0;
}

/* ---------------- Comparison table ---------------- */
.comp-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: 14.5px;
}
.comp-table th, .comp-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.comp-table th {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12.5px;
  color: var(--text-faint);
  background: var(--panel-2);
}
.comp-table tr:last-child td { border-bottom: none; }
.comp-table td:first-child { color: var(--text-dim); width: 26%; }
.comp-table td.old { color: var(--text-faint); }
.comp-table td.new { color: var(--teal); }

/* ---------------- Code panels ---------------- */
.code-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 860px) {
  .code-grid { grid-template-columns: 1fr; }
}
.code-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.code-panel__tab {
  padding: 10px 16px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
}
.code-panel pre {
  margin: 0;
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
  overflow-x: auto;
}
.code-panel .c { color: var(--text-faint); }
.code-panel .kw { color: #7fb2c9; }
.code-panel .st { color: var(--teal); }

/* ---------------- Demo ---------------- */
.demo {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 26px 28px;
}
.demo__row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.demo__url {
  flex: 1 1 320px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13.5px;
}
.demo__url:focus { border-color: var(--teal); outline: none; }
.demo__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.demo__query-row {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.demo__query-row input,
.demo__query-row textarea {
  flex: 1 1 260px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
}
.demo__query-row textarea {
  font-family: var(--font-mono);
  font-size: 13px;
  resize: vertical;
  min-height: 60px;
}
.demo__query-row input:focus,
.demo__query-row textarea:focus { border-color: var(--teal); outline: none; }
.demo__status {
  font-family: var(--font-mono);
  font-size: 12.5px;
  margin-bottom: 10px;
  min-height: 18px;
}
.demo__status--ok { color: var(--teal); }
.demo__status--err { color: var(--red); }
.demo__status--pending { color: var(--amber); }
.demo__output {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 12.8px;
  line-height: 1.6;
  color: var(--text-dim);
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.demo__hint {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.demo__hint code {
  font-family: var(--font-mono);
  background: var(--panel-2);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--text-dim);
}
.demo__divider {
  border-top: 1px solid var(--border);
  margin: 28px 0 22px;
}
.demo__summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
}
.demo__summary-tile {
  background: var(--panel-2);
  padding: 12px 14px;
}
.demo__summary-tile .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.demo__summary-tile .v {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  margin-top: 4px;
}
.demo__summary-tile .v--ok { color: var(--teal); }
.demo__summary-tile .v--warn { color: var(--red); }

/* ---------------- Manual page ---------------- */
.manual-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 900px) {
  .manual-layout { grid-template-columns: 1fr; }
}
.manual-nav {
  position: sticky;
  top: 90px;
  border-left: 1px solid var(--border);
  padding-left: 18px;
}
.manual-nav a {
  display: block;
  font-size: 13.5px;
  color: var(--text-dim);
  text-decoration: none;
  padding: 6px 0;
}
.manual-nav a:hover { color: var(--teal); }
.manual h2 {
  font-size: 1.4rem;
  margin: 0 0 14px;
  scroll-margin-top: 90px;
}
.manual section { margin-bottom: 52px; }
.manual p { color: var(--text-dim); font-size: 15px; max-width: 68ch; }
.manual ol, .manual ul { color: var(--text-dim); font-size: 15px; max-width: 68ch; }
.manual code {
  font-family: var(--font-mono);
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.9em;
  color: var(--text);
}
.manual pre {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}
.env-table, .route-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.env-table th, .env-table td, .route-table th, .route-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.env-table th, .route-table th {
  background: var(--panel-2);
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-faint);
  font-size: 12px;
}
.env-table td:first-child, .route-table td:first-child {
  font-family: var(--font-mono);
  color: var(--teal);
  white-space: nowrap;
}
.route-table td:nth-child(2) {
  font-family: var(--font-mono);
  color: var(--amber);
  white-space: nowrap;
}

/* ---------------- Contact ---------------- */
.contact-card {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 34px;
  background: var(--panel);
}
.contact-card__field { min-width: 180px; }
.contact-card__label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.contact-card__value {
  font-size: 17px;
}
.contact-card__value a { text-decoration: none; color: var(--teal); }
.contact-card__value a:hover { text-decoration: underline; }

/* ---------------- Footer ---------------- */
.footer {
  padding: 40px 0;
}
.footer__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--text-faint);
  font-size: 13.5px;
}
.footer__row a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  cursor: pointer;
}
.footer__row a:hover { color: var(--teal); text-decoration-color: var(--teal); }
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; }

/* ============================================================
   Futuristic upgrade layer
   ------------------------------------------------------------
   Adds: a 3D-toggle nav control, a fixed Three.js canvas mount,
   a static cyber-grid/vignette fallback background, neon glow on
   key surfaces, glassmorphism panels, and a subtle scanline pass.
   Everything here is additive — it doesn't change layout, only
   surface treatment — and respects prefers-reduced-motion.
   ============================================================ */
:root {
  --teal-glow: rgba(55, 201, 160, 0.35);
  --amber-glow: rgba(232, 163, 61, 0.32);
}

/* Static cyber-grid + vignette, always present as a cheap ambient
   backdrop whether or not the 3D toggle is on. */
body {
  position: relative;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(55, 201, 160, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 10%, rgba(232, 163, 61, 0.05), transparent 60%),
    var(--bg);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(55, 201, 160, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 201, 160, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 78%);
  opacity: 0.55;
}
/* Everything that should sit above the ambient grid / 3D canvas. */
.nav, .hero, .section, .footer { position: relative; z-index: 1; }

/* ---------------- 3D background canvas ---------------- */
#bg3d-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
#bg3d-canvas canvas { display: block; width: 100%; height: 100%; }
#bg3d-canvas.is-on { opacity: 1; }
body.bg3d-on::before { opacity: 0.15; }

/* ---------------- 3D toggle control ---------------- */
.toggle-3d {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--panel-2);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.2s ease;
}
.toggle-3d__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  box-shadow: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.toggle-3d:hover { border-color: var(--teal); color: var(--text); }
.toggle-3d.is-active {
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal-glow), 0 0 18px -4px var(--teal-glow);
}
.toggle-3d.is-active .toggle-3d__dot {
  background: var(--teal);
  box-shadow: 0 0 8px 1px var(--teal-glow);
}

/* ---------------- Neon glass surfaces ---------------- */
.term, .demo, .code-panel, .contact-card {
  background: linear-gradient(180deg, rgba(23, 28, 37, 0.82), rgba(18, 22, 29, 0.9));
  backdrop-filter: blur(10px);
  position: relative;
}
.term::after, .demo::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--teal-glow), transparent 40%, transparent 60%, var(--amber-glow));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.6;
}
.term {
  box-shadow: 0 30px 70px -30px rgba(0,0,0,0.7), 0 0 40px -20px var(--teal-glow);
}

.pipeline__step, .spec-grid__cell {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.pipeline__step:hover, .spec-grid__cell:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 18px 40px -24px var(--teal-glow);
}
.pipeline__step--amber:hover, .spec-grid__cell:hover {
  box-shadow: 0 18px 40px -24px var(--teal-glow);
}

.nav__brand-mark {
  box-shadow: 0 0 10px 1px var(--teal-glow);
}
.btn--primary {
  box-shadow: 0 8px 26px -10px var(--amber-glow);
}
.btn--primary:hover {
  box-shadow: 0 10px 30px -8px var(--amber-glow);
}
.btn--ghost:hover {
  box-shadow: 0 0 0 1px var(--teal-glow);
}

/* Faint animated scan pass across the hero terminal, cosmetic only. */
.term__body { position: relative; }
.term__body::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, rgba(55, 201, 160, 0.05), transparent);
  animation: scan-pass 7s linear infinite;
  pointer-events: none;
}
@keyframes scan-pass {
  0% { top: -40%; }
  100% { top: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .term__body::after { display: none; }
  #bg3d-canvas { display: none !important; }
}

/* ============================================================
   Auth pages (login / register)
   ============================================================ */
.auth-section { padding-top: 40px; }
.auth-wrap { display: flex; justify-content: center; }
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px 30px 28px;
}
.auth-form { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.auth-form__row { display: flex; gap: 14px; }
.auth-form__row .auth-form__field { flex: 1 1 0; }
.auth-form__field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--text-dim); }
.auth-form__field em { color: var(--text-faint); font-style: normal; }
.auth-form__field input {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
}
.auth-form__field input:focus { border-color: var(--teal); outline: none; }
.auth-form__status { font-family: var(--font-mono); font-size: 12.5px; min-height: 16px; }
.auth-form__status--ok { color: var(--teal); }
.auth-form__status--err { color: var(--red); }
.auth-form__status--pending { color: var(--amber); }
.auth-card__switch { margin: 18px 0 0; font-size: 13.5px; color: var(--text-dim); }
.auth-card__switch a { color: var(--teal); text-decoration: none; }
.auth-card__switch a:hover { text-decoration: underline; }
@media (max-width: 560px) {
  .auth-form__row { flex-direction: column; }
}

/* ============================================================
   Dashboard chrome (the gated /app page)
   ============================================================ */
.dash-whoami { font-size: 13px; color: var(--text-dim); font-family: var(--font-mono); }
@media (max-width: 860px) { .dash-whoami { display: none; } }

/* ============================================================
   Public feedback section
   ============================================================ */
.feedback-form { display: flex; flex-direction: column; gap: 14px; max-width: 620px; }
.feedback-form__row { display: flex; gap: 14px; flex-wrap: wrap; }
.feedback-form__row input { flex: 1 1 220px; }
.feedback-form input,
.feedback-form textarea,
.feedback-form select {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
}
.feedback-form textarea { font-family: var(--font-mono); font-size: 13px; resize: vertical; min-height: 90px; }
.feedback-form input:focus,
.feedback-form textarea:focus,
.feedback-form select:focus { border-color: var(--teal); outline: none; }
.feedback-form__status { font-family: var(--font-mono); font-size: 12.5px; min-height: 16px; }
.feedback-form__status--ok { color: var(--teal); }
.feedback-form__status--err { color: var(--red); }
.feedback-form__status--pending { color: var(--amber); }

/* ============================================================
   Misc additions: nav ghost CTA, scrollable wide tables, demo CTA block
   ============================================================ */
.nav__cta--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-dim);
}
.nav__cta--ghost:hover { color: var(--teal); border-color: transparent; }

.table-scroll { overflow-x: auto; }
.table-scroll .comp-table { min-width: 640px; }

.demo-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.demo-cta__list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.9;
}
