/* ========================================================================
   AgentX — design system
   Editorial dark theme. Inspired by the NVIDIA Inception 2026 deck:
   serif display, sans body, mono meta. Lime accent on near-black.
   ====================================================================== */

/* -- Fonts (self-hosted woff2 under /static/fonts/) -------------------- */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/static/fonts/cormorant-garamond-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/static/fonts/cormorant-garamond-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/static/fonts/cormorant-garamond-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/static/fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/static/fonts/ibm-plex-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/static/fonts/ibm-plex-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/static/fonts/jetbrains-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/static/fonts/jetbrains-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* -- Tokens ------------------------------------------------------------ */

:root {
  /* surfaces — near-black with cool tint */
  --bg:           #0a0e12;
  --bg-soft:      #0d1218;
  --bg-card:      #11171f;
  --bg-elev:      #161d27;

  /* hairlines */
  --rule:         #1c232e;
  --rule-soft:    #141a23;
  --rule-strong:  #28303d;

  /* ink */
  --ink:          #ecedf0;
  --ink-soft:     #c4c8d1;
  --ink-body:     #a4aab5;
  --ink-dim:      #7a8290;
  --ink-meta:     #50596a;
  --ink-faint:    #353c48;

  /* accent — lime on near-black, single sharp note */
  --lime:         #a3e635;
  --lime-hot:     #bef264;
  --lime-deep:    #65a30d;
  --lime-glow:    rgba(163, 230, 53, 0.18);

  /* status */
  --error:        #ff6f6f;
  --error-soft:   rgba(255, 111, 111, 0.10);
  --error-rule:   rgba(255, 111, 111, 0.28);
  --success:      #a3e635;
  --success-soft: rgba(163, 230, 53, 0.10);
  --success-rule: rgba(163, 230, 53, 0.28);

  /* type families */
  --font-serif:   "Cormorant Garamond", "Cormorant", "EB Garamond", Garamond, "Times New Roman", serif;
  --font-sans:    "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* rhythm */
  --gutter:       clamp(1.25rem, 4vw, 4rem);
  --page-max:     1240px;
  --section-y:    clamp(4rem, 10vw, 8rem);

  /* misc */
  --radius:       2px;
  --radius-md:    4px;
  --ease:         cubic-bezier(0.22, 1, 0.36, 1);
}

/* -- Reset ------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink-body);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* faint top-right radial glow — atmosphere, not decoration */
  background-image:
    radial-gradient(ellipse 80rem 50rem at 90% -10%, rgba(163, 230, 53, 0.045), transparent 60%),
    radial-gradient(ellipse 60rem 40rem at 10% 110%, rgba(163, 230, 53, 0.025), transparent 70%);
  background-attachment: fixed;
}

img, svg { display: block; max-width: 100%; }

::selection { background: var(--lime); color: #0a0e12; }

/* -- Page chrome (top bar + bottom meta) ------------------------------- */

.chrome-top {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem var(--gutter) 0;
  max-width: var(--page-max);
  margin: 0 auto;
  width: 100%;
}

.chrome-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 200ms var(--ease);
}
.chrome-brand:hover { color: var(--ink); }

.chrome-brand .dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px var(--lime-glow);
  transition: background 600ms var(--ease), box-shadow 600ms var(--ease);
}

/* Live-state dot — mirrors the terminalx palette so it reads as the
   same indicator family. Only positive states; never error/suspended. */
.chrome-brand .dot[data-state="idle"]     { background: #3fb950; box-shadow: 0 0 0 4px rgba(63,185,80,0.18); }
.chrome-brand .dot[data-state="starting"] { background: #d29922; box-shadow: 0 0 0 4px rgba(210,153,34,0.18); animation: chrome-dot-pulse 1.5s ease-in-out infinite; }
.chrome-brand .dot[data-state="busy"]     { background: #58a6ff; box-shadow: 0 0 0 4px rgba(88,166,255,0.18); animation: chrome-dot-pulse 1.5s ease-in-out infinite; }
.chrome-brand .dot[data-state="waiting"]  { background: #a371f7; box-shadow: 0 0 0 4px rgba(163,113,247,0.18); }

@keyframes chrome-dot-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

.chrome-nav {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.chrome-nav a {
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 200ms var(--ease);
}
.chrome-nav a:hover { color: var(--ink); }
.chrome-nav a.is-active { color: var(--lime); }

/* App-shell chrome: brand on the left, nav centered, user chip on the
   right. The marketing variant uses 1fr auto; the app variant adds a
   center column for primary nav. */
.chrome-top--app {
  grid-template-columns: auto 1fr auto;
}
.chrome-top--app .chrome-nav {
  justify-self: center;
}
.chrome-user {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.chrome-user-name {
  color: var(--ink-soft);
}
.chrome-user-form { display: inline; margin: 0; padding: 0; }
.chrome-user-signout {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--ink-dim);
  cursor: pointer;
  transition: color 200ms var(--ease);
}
.chrome-user-signout:hover { color: var(--lime); }

.chrome-rule {
  max-width: var(--page-max);
  margin: 1rem auto 0;
  padding: 0 var(--gutter);
}
.chrome-rule::after {
  content: "";
  display: block;
  border-top: 1px solid var(--rule);
}

/* Bottom page-number / section-label meta strip — printed on each page */
.chrome-foot {
  margin-top: auto;
  padding-top: 4rem;
}
.chrome-foot-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 1.25rem var(--gutter) 1.75rem;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-meta);
}
.chrome-foot-inner .tilde { color: var(--lime); margin-right: 0.5rem; }

/* -- Main + sections --------------------------------------------------- */

main {
  flex: 1;
  width: 100%;
}

.section {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
  position: relative;
}

.section + .section { border-top: 1px solid var(--rule-soft); }

/* App-shell pages (logged-in: /dashboard, /settings/*, /admin/*) collapse
   the hero-style top padding — the chrome already provides visual
   separation, and these pages prioritise information density. The
   marketing/landing variant keeps the original generous breathing room. */
body.app .section { padding-top: 1.75rem; padding-bottom: 2.5rem; }
body.app .section-head { margin-bottom: 1.5rem; }

.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lime);
  margin: 0 0 1rem;
}
.eyebrow .num { color: var(--ink-dim); margin-right: 0.45rem; }
.eyebrow .sep { color: var(--ink-faint); margin: 0 0.5rem; }

/* Global tilde glyph: lime, with breathing room from whatever follows */
.tilde {
  color: var(--lime);
  margin-right: 0.45em;
  display: inline-block;
}

.section-page-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-meta);
}

/* -- Typography -------------------------------------------------------- */

h1, h2, h3, h4 { margin: 0; color: var(--ink); }

.h-display {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.h-display em {
  font-style: italic;
  color: var(--ink-soft);
}
/* Lime accent dot after the headline — same big-bullet feel as the deck */
.h-display .accent-dot {
  color: var(--lime);
  display: inline-block;
  transform: translateY(-0.05em);
  margin-left: 0.05em;
  font-size: 1.15em;
  line-height: 1;
}

.h-section {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.h-section em { font-style: italic; color: var(--ink-soft); }

.h-card {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.lede {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 1.7vw, 1.5rem);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 52ch;
}

.text-body {
  color: var(--ink-body);
  font-size: 0.97rem;
  line-height: 1.65;
}
.text-body strong { color: var(--ink); font-weight: 500; }

.text-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.accent       { color: var(--lime); }
.accent-soft  { color: var(--ink-soft); }
.accent-link  {
  color: var(--lime);
  text-decoration: none;
  border-bottom: 1px solid var(--lime-deep);
  padding-bottom: 1px;
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}
.accent-link:hover { color: var(--lime-hot); border-bottom-color: var(--lime); }

a { color: var(--lime); text-decoration: none; }
a:hover { color: var(--lime-hot); }

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

.hero {
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(4rem, 9vw, 7rem);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}
.hero-headline {
  max-width: 22ch;
}
.hero-sub {
  display: grid;
  grid-template-columns: minmax(0, 32ch) 1fr;
  gap: 3rem;
  align-items: start;
  margin-top: 2rem;
}
@media (max-width: 720px) {
  .hero-sub { grid-template-columns: 1fr; gap: 1.5rem; }
}
.hero-meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-body);
}
.hero-meta dt { color: var(--ink-meta); }
.hero-meta dd { margin: 0; color: var(--ink-soft); }
.hero-meta dd a { color: var(--ink-soft); border-bottom: 1px solid var(--rule); }
.hero-meta dd a:hover { color: var(--lime); border-bottom-color: var(--lime); }

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

/* -- Buttons / CTAs ---------------------------------------------------- */

.cta, .cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.95rem 1.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 220ms var(--ease);
}
.cta {
  background: var(--lime);
  color: #0a0e12;
  border-color: var(--lime);
}
.cta:hover { background: var(--lime-hot); border-color: var(--lime-hot); color: #0a0e12; }
.cta:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.cta .arrow { transition: transform 220ms var(--ease); }
.cta:hover .arrow { transform: translateX(3px); }

.cta-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--rule-strong);
}
.cta-ghost:hover { color: var(--ink); border-color: var(--ink-dim); }

/* -- Grids ------------------------------------------------------------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}
/* Symmetric internal padding so every cell breathes — including
   outer cells which would otherwise hug the section gutters. */
.grid-3 > * { padding: 0.25rem 2rem 0; }
.grid-3 > * + * { border-left: 1px solid var(--rule); }
@media (max-width: 880px) {
  .grid-3 { grid-template-columns: 1fr; gap: 2rem; }
  .grid-3 > * { padding: 0; }
  .grid-3 > * + * { border-left: 0; border-top: 1px solid var(--rule); padding-top: 2rem; }
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}
.grid-2 > .feat { padding: 2rem 2rem 0; }
.grid-2 > .feat:nth-child(n+3) {
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
}
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-2 > .feat { padding-left: 0; padding-right: 0; }
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}
.grid-4 > * { padding: 2rem 1.5rem; border-top: 1px solid var(--rule); }
.grid-4 > *:nth-child(n+5) { border-top: 1px solid var(--rule); }
.grid-4 > * + * { border-left: 1px solid var(--rule); }
@media (max-width: 880px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 > *:nth-child(2n+1) { border-left: 0; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .grid-4 > * { border-left: 0 !important; }
}

/* -- Feature cards (deck style: numbered eyebrow + h-card + body) ------ */

/* .feat has no inherent padding — its parent grid (.grid-2 / .grid-3)
   sets cell padding. This avoids equal-specificity collisions where
   `.feat { padding: 0 }` was nuking the grid's cell rhythm. */
.feat-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lime);
  display: block;
  margin-bottom: 1rem;
}
.feat-num .num { color: var(--ink-dim); margin-right: 0.5rem; }
.feat-num .dot { color: var(--ink-faint); margin: 0 0.5rem; }
.feat .h-card { margin-bottom: 0.85rem; }
.feat-body { font-size: 0.95rem; color: var(--ink-body); line-height: 1.65; }
.feat-body a { color: var(--lime); border-bottom: 1px solid var(--lime-deep); padding-bottom: 1px; }
.feat-body a:hover { color: var(--lime-hot); border-bottom-color: var(--lime); }

/* -- Pull-quote / aside ------------------------------------------------ */

.pull {
  padding: 1.5rem 0 1.5rem 1.75rem;
  border-left: 1px solid var(--rule-strong);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 50ch;
}
.pull strong { color: var(--ink); font-style: normal; font-weight: 600; }

/* -- "Live proof" terminal capture ------------------------------------- */

.terminal {
  background: #06090d;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--ink-body);
  overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-soft);
}
.terminal-bar .lights {
  display: inline-flex;
  gap: 0.4rem;
}
.terminal-bar .lights span {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: var(--rule-strong);
}
.terminal-bar .title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-meta);
  margin-left: 0.5rem;
}
.terminal-bar .meta-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.terminal-bar .live-dot {
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px var(--lime-glow);
  animation: pulse 2.4s ease-in-out infinite;
  transition: background 600ms var(--ease), box-shadow 600ms var(--ease);
}
/* Live-state overrides — same palette as the brand + fleet dots. */
.terminal-bar .live-dot[data-state="idle"]     { background: #3fb950; box-shadow: 0 0 0 4px rgba(63,185,80,0.18);   animation: chrome-dot-pulse 2.4s ease-in-out infinite; }
.terminal-bar .live-dot[data-state="starting"] { background: #d29922; box-shadow: 0 0 0 4px rgba(210,153,34,0.18);  animation: chrome-dot-pulse 1.5s ease-in-out infinite; }
.terminal-bar .live-dot[data-state="busy"]     { background: #58a6ff; box-shadow: 0 0 0 4px rgba(88,166,255,0.18);  animation: chrome-dot-pulse 1.5s ease-in-out infinite; }
.terminal-bar .live-dot[data-state="waiting"]  { background: #a371f7; box-shadow: 0 0 0 4px rgba(163,113,247,0.18); animation: chrome-dot-pulse 2.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--lime-glow); }
  50%      { box-shadow: 0 0 0 8px rgba(163, 230, 53, 0.04); }
}
.terminal-body {
  padding: 1.25rem 1.4rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-body .prompt { color: var(--lime); }
.terminal-body .tool   { color: var(--ink); font-weight: 500; }
.terminal-body .arg    { color: var(--ink-soft); }
.terminal-body .ok     { color: var(--lime); }
.terminal-body .dim    { color: var(--ink-meta); }
.terminal-body .agent  { color: #8ec8ff; }
.terminal-body .cursor {
  display: inline-block;
  width: 0.55rem;
  height: 1rem;
  background: var(--lime);
  vertical-align: -2px;
  animation: blink 1.05s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

/* -- Network diagram (CSS-only ambient motion) ------------------------- */

.netdiag {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 2.5rem 0 1rem;
}
.netdiag .node {
  text-align: center;
  position: relative;
  z-index: 1;
}
.netdiag .node-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-meta);
  margin-bottom: 0.6rem;
}
.netdiag .node-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--ink);
  font-weight: 500;
}
.netdiag .node-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 0.4rem;
}
.netdiag .wire {
  position: absolute;
  top: 50%;
  left: 12%;
  right: 12%;
  height: 1px;
  background: var(--rule-strong);
  z-index: 0;
}
.netdiag .pulse {
  position: absolute;
  top: 50%;
  left: 12%;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: -0.27rem;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
  animation: pulse-x 4s linear infinite;
  z-index: 1;
}
@keyframes pulse-x {
  0%   { left: 12%;  opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 88%;  opacity: 0; }
}
.netdiag .pulse.r { animation: pulse-x-r 4s linear infinite; animation-delay: 2s; }
@keyframes pulse-x-r {
  0%   { left: 88%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 12%; opacity: 0; }
}

/* -- Backend strip ----------------------------------------------------- */

.backends {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.backends .b {
  padding: 1.5rem 1.25rem;
  text-align: center;
  border-right: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: color 220ms var(--ease), background 220ms var(--ease);
}
.backends .b:last-child { border-right: 0; }
.backends .b:hover { color: var(--lime); background: rgba(163, 230, 53, 0.03); }
.backends .b .marker {
  display: block;
  width: 0.35rem; height: 0.35rem;
  background: var(--rule-strong);
  border-radius: 50%;
  margin: 0 auto 0.6rem;
  transition: background 220ms var(--ease), box-shadow 220ms var(--ease);
}
.backends .b:hover .marker { background: var(--lime); box-shadow: 0 0 0 3px var(--lime-glow); }

/* -- Operator card ----------------------------------------------------- */

.operator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 3rem;
  align-items: start;
}
@media (max-width: 880px) { .operator { grid-template-columns: 1fr; gap: 2rem; } }

.operator-card .h-card { font-size: 2.2rem; line-height: 1.05; font-weight: 600; }
.operator-card .h-card span { display: block; }
.operator-role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lime);
  margin-top: 0.5rem;
}

.cv-list { margin: 1.5rem 0 0; padding: 0; list-style: none; }
.cv-list li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--rule);
}
.cv-list li:last-child { border-bottom: 1px solid var(--rule); }
.cv-list .when {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
}

/* -- Agent fleet grid (4×2, hairline-ruled cells) --------------------- */

.agent-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.agent {
  background: var(--bg);
  padding: 1.4rem 1.25rem;
  display: flex;
  flex-direction: column;
  transition: background 240ms var(--ease);
}
.agent:hover { background: var(--bg-soft); }
.agent-role {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lime);
  margin: 0 0 0.55rem;
}
.agent-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink);
  margin: 0 0 0.7rem;
  letter-spacing: -0.005em;
}
.agent-body {
  font-size: 0.85rem;
  color: var(--ink-body);
  line-height: 1.55;
  margin: 0;
}
@media (max-width: 1080px) {
  .agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .agent-grid { grid-template-columns: 1fr; }
}

/* -- Fleet section (promoted social proof, just below hero) ----------- */

.fleet-section .section-head { align-items: start; }

.fleet-section .h-section { max-width: 22ch; }

/* On the lead fleet grid each cell carries a live-dot — these agents
   committed work this week and we want that to land instantly. */
.fleet-grid .agent { position: relative; }
.fleet-grid .agent-live {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px var(--lime-glow);
  animation: pulse 2.8s ease-in-out infinite;
  transition: background 600ms var(--ease), box-shadow 600ms var(--ease);
}
/* Live-state overrides — same palette as the chrome-brand dot. */
.fleet-grid .agent-live[data-state="idle"]     { background: #3fb950; box-shadow: 0 0 0 3px rgba(63,185,80,0.18);   animation: chrome-dot-pulse 2.8s ease-in-out infinite; }
.fleet-grid .agent-live[data-state="starting"] { background: #d29922; box-shadow: 0 0 0 3px rgba(210,153,34,0.18);  animation: chrome-dot-pulse 1.5s ease-in-out infinite; }
.fleet-grid .agent-live[data-state="busy"]     { background: #58a6ff; box-shadow: 0 0 0 3px rgba(88,166,255,0.18);  animation: chrome-dot-pulse 1.5s ease-in-out infinite; }
.fleet-grid .agent-live[data-state="waiting"]  { background: #a371f7; box-shadow: 0 0 0 3px rgba(163,113,247,0.18); animation: chrome-dot-pulse 2.8s ease-in-out infinite; }
/* stagger the dots so they don't all pulse on the same frame */
.fleet-grid .agent:nth-child(1) .agent-live { animation-delay: 0s; }
.fleet-grid .agent:nth-child(2) .agent-live { animation-delay: 0.35s; }
.fleet-grid .agent:nth-child(3) .agent-live { animation-delay: 0.70s; }
.fleet-grid .agent:nth-child(4) .agent-live { animation-delay: 1.05s; }
.fleet-grid .agent:nth-child(5) .agent-live { animation-delay: 1.40s; }
.fleet-grid .agent:nth-child(6) .agent-live { animation-delay: 1.75s; }
.fleet-grid .agent:nth-child(7) .agent-live { animation-delay: 2.10s; }
.fleet-grid .agent:nth-child(8) .agent-live { animation-delay: 2.45s; }

/* On the fleet grid the names get a touch more breathing room, so the
   eight agents read as a real roster, not a list of cards. */
.fleet-grid .agent { padding: 1.6rem 1.35rem 1.5rem; }
.fleet-grid .agent-name { font-size: 1.6rem; }
.fleet-grid .agent-role { padding-right: 1.5rem; }

@media (prefers-reduced-motion: reduce) {
  .fleet-grid .agent-live { animation: none !important; }
}

/* -- Operator aside (pull quote replaces the duplicate fleet column) -- */

.operator-aside {
  display: flex;
  flex-direction: column;
}

.operator-quote {
  margin: 0;
  padding: 0 0 0 1.75rem;
  border-left: 2px solid var(--lime);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 38ch;
}
.operator-quote p { margin: 0 0 1rem; }
.operator-quote p:last-child { margin-bottom: 0; }
.operator-quote strong {
  color: var(--ink);
  font-weight: 500;
  font-style: normal;
}

/* -- Beta signup section ---------------------------------------------- */

.beta-section {
  background: var(--bg-soft);
  border-top: 1px solid var(--rule) !important;
  border-bottom: 1px solid var(--rule);
}
.beta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 4rem;
  align-items: start;
}
@media (max-width: 880px) { .beta-inner { grid-template-columns: 1fr; gap: 2.5rem; } }

.beta-promise {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
}
.beta-promise li {
  position: relative;
  padding: 0.65rem 0 0.65rem 1.75rem;
  font-size: 0.95rem;
  color: var(--ink-body);
}
.beta-promise li + li { border-top: 1px solid var(--rule); }
.beta-promise li::before {
  content: "▹";
  position: absolute;
  left: 0;
  top: 0.55rem;
  color: var(--lime);
  font-family: var(--font-mono);
}

/* -- Forms ------------------------------------------------------------- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 2.25rem;
}

.form { display: flex; flex-direction: column; gap: 1.25rem; }
.form label { display: block; }
.form label > span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 0.55rem;
}
.form input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
}
.form input::placeholder { color: var(--ink-meta); }
.form input:focus {
  outline: none;
  border-color: var(--lime);
  background: var(--bg-soft);
  box-shadow: 0 0 0 3px var(--lime-glow);
}
.form .hint {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--ink-meta);
}
.form button {
  background: var(--lime);
  color: #0a0e12;
  border: 0;
  padding: 1rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 220ms var(--ease);
}
.form button:hover { background: var(--lime-hot); }
.form button:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.error {
  color: var(--error);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  margin: 0.45rem 0 0;
}
.form-error {
  background: var(--error-soft);
  border: 1px solid var(--error-rule);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  color: var(--error);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  margin: 0 0 0.5rem;
  letter-spacing: 0;
  text-transform: none;
}
.form-success {
  background: var(--success-soft);
  border: 1px solid var(--success-rule);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  color: var(--success);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  margin: 0 0 0.5rem;
  letter-spacing: 0;
  text-transform: none;
}
.form-success strong { color: var(--lime-hot); font-weight: 500; }

/* -- Pending screen ---------------------------------------------------- */

.pending {
  text-align: center;
  padding: 2rem 0 1rem;
}
.pending .h-section { margin-bottom: 1.25rem; }
.pending p { color: var(--ink-soft); max-width: 50ch; margin: 0 auto 1rem; }
.pending strong { color: var(--lime); font-weight: 500; }

/* -- Reveal-on-scroll (CSS-only, prefers-reduced-motion safe) ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  animation: rise 900ms var(--ease) both;
}
.reveal-d1 { animation-delay: 80ms; }
.reveal-d2 { animation-delay: 180ms; }
.reveal-d3 { animation-delay: 280ms; }
.reveal-d4 { animation-delay: 380ms; }
.reveal-d5 { animation-delay: 480ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-d1, .reveal-d2, .reveal-d3, .reveal-d4, .reveal-d5 {
    animation: none;
  }
  .terminal-bar .live-dot, .netdiag .pulse, .terminal-body .cursor {
    animation: none !important;
  }
}

/* -- Utilities --------------------------------------------------------- */

.stack > * + *      { margin-top: 1rem; }
.stack-lg > * + *   { margin-top: 1.75rem; }
.stack-xl > * + *   { margin-top: 2.5rem; }

.muted              { color: var(--ink-dim); }
.faint              { color: var(--ink-meta); }
.center             { text-align: center; }
.divider {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

/* (tilde literals live in markup; .tilde just colors them) */

/* -- Mobile polish ---------------------------------------------------- */

/* Keep punctuation glued to the last word so it never orphans alone on
   a new line (e.g. the lime accent-dot after "production"). */
.nowrap { white-space: nowrap; }

@media (max-width: 640px) {
  /* Stack the chrome top into two rows: brand on top, nav wrapping
     below — mirrors the platform-demo-app navbar pattern. Without
     this, three nav links plus the brand overflow at ≤420px. */
  .chrome-top,
  .chrome-top--app {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding-top: 1rem;
  }
  .chrome-top--app .chrome-nav { justify-self: flex-start; }
  .chrome-user { gap: 1rem; }
  .chrome-brand {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
  }
  .chrome-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1.1rem;
  }
}

@media (max-width: 540px) {
  /* Hero meta stacks dt above dd so values get the full row width
     instead of being squeezed into a max-content column. */
  .hero-meta {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .hero-meta dt { margin-top: 0.85rem; }
  .hero-meta dt:first-of-type { margin-top: 0; }
  .hero-meta dd { margin-top: 0.2rem; }

  /* Signup form card breathes more at narrow widths. */
  .card { padding: 1.5rem; }

  /* Footer rows stack centered so the brand line and version chip
     don't fight over the same row. */
  .chrome-foot-inner {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    text-align: center;
  }

  /* Section-head page numbers drop below the headline so they don't
     compete with the section title for horizontal space. */
  .section-head {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

/* -- Inline code (used in prose inside feat-body) --------------------- */

.code-inline {
  font-family: var(--font-mono);
  color: var(--ink);
  font-size: 0.85em;
  letter-spacing: 0.02em;
}

/* -- CLI-native promise list (mirrors .beta-promise but no top margin) */

.cli-native-promise {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}
.cli-native-promise li {
  position: relative;
  padding: 1rem 1.25rem 1rem 2rem;
  font-size: 0.95rem;
  color: var(--ink-body);
  border-top: 1px solid var(--rule);
}
.cli-native-promise li:nth-child(odd) {
  border-right: 1px solid var(--rule);
}
.cli-native-promise li::before {
  content: "▹";
  position: absolute;
  left: 0.5rem;
  top: 0.95rem;
  color: var(--lime);
  font-family: var(--font-mono);
}
.cli-native-promise li strong { color: var(--ink); }
@media (max-width: 700px) {
  .cli-native-promise { grid-template-columns: 1fr; }
  .cli-native-promise li:nth-child(odd) { border-right: 0; }
}

/* -- Pricing rail ----------------------------------------------------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 2rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.pricing-grid > .price + .price { border-left: 1px solid var(--rule); }
@media (max-width: 980px) {
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-grid > .price:nth-child(3) { border-left: 0; border-top: 1px solid var(--rule); }
  .pricing-grid > .price:nth-child(4) { border-top: 1px solid var(--rule); }
}
@media (max-width: 600px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-grid > .price + .price { border-left: 0; border-top: 1px solid var(--rule); }
}

.price {
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: transparent;
  position: relative;
}
.price-featured {
  background: var(--bg-card);
}
.price-featured::before {
  content: "FOUNDING FAVORITE";
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--lime);
}
.price-tier {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.price-amount {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  color: var(--ink);
}
.price-amount .amount {
  font-family: var(--font-display, "Cormorant Garamond", serif);
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1;
}
.price-amount .period {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-meta);
  letter-spacing: 0.06em;
}
.price-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--ink-body);
}
.price-list li {
  position: relative;
  padding-left: 1.25rem;
}
.price-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  top: -0.1rem;
  color: var(--lime);
  font-size: 1.2rem;
  line-height: 1;
}
.price-foot {
  margin: auto 0 0;
  padding-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--ink-meta);
}
