/* OneAgent public home — warm editorial, paper-and-ink.
   Brand tokens copied verbatim from docs/design/one-agent/DESIGN.md */
:root {
  --ink: #0e1116;
  --ink-2: #1f2329;
  --paper: #f7f6f2;
  --paper-2: #efede7;
  --warm: #c04f30;
  --cool: #1f4e7a;
  --rule: #e2dfd7;
  --muted: #6b6356;
  --signal: oklch(58% 0.14 155);
  --review: oklch(58% 0.14 70);
  --risk: oklch(56% 0.18 28);

  --display: "Fraunces", Georgia, "Noto Serif TC", "Songti TC", "PingFang TC", serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "PingFang TC", "Noto Sans TC", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 1200px; margin: 0 auto; padding-inline: 24px; }
@media (min-width: 768px) { .container { padding-inline: 40px; } }

.display {
  font-family: var(--display);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
}
h1.display { font-size: clamp(2.75rem, 5vw, 4.25rem); }
.display.sm { font-size: 2.25rem; letter-spacing: -0.01em; }
@media (min-width: 768px) { .display.sm { font-size: 3rem; } }
/* Chinese: modern sans-serif headings (the editorial serif is for Latin only) */
html.lang-zh .display {
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.18;
}
/* CJK glyphs are wider — ease the hero size so lines don't orphan a character */
html.lang-zh h1.display { font-size: clamp(2.25rem, 4.4vw, 3.5rem); }
html.lang-zh .cta h2.display { font-size: clamp(2rem, 4vw, 3.25rem); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0 0 20px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 0.875rem; font-weight: 600;
  padding: 10px 20px; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-warm { background: var(--warm); color: #fff; }
.btn-ink { background: var(--ink); color: var(--paper); font-weight: 500; padding: 7px 14px; border-radius: 6px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(14,17,22,0.15); font-weight: 500; }
.btn-ghost:hover { background: var(--paper-2); transform: none; }
.btn-ghost-dark { background: transparent; color: var(--paper); border-color: rgba(245,241,234,0.25); font-weight: 500; }
.btn-ghost-dark:hover { background: rgba(255,255,255,0.05); transform: none; }
.btn.full { width: 100%; margin-top: 18px; }

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

/* ---- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
@media (min-width: 768px) { .nav-inner { padding: 12px 40px; } }
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand-dot { width: 10px; height: 10px; border-radius: 2px; background: var(--warm); display: inline-block; }
.brand-word { font-weight: 600; letter-spacing: -0.01em; }
.nav-links { display: none; gap: 32px; }
.nav-links a { font-size: 0.875rem; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-login { font-size: 0.875rem; color: var(--cool); }
.nav-login:hover { color: var(--ink); }
@media (max-width: 520px) { .nav-login { display: none; } }
.lang-toggle {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.02em;
  color: var(--muted); background: transparent; border: 1px solid var(--rule);
  border-radius: 6px; padding: 5px 9px; cursor: pointer; line-height: 1;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.lang-toggle:hover { color: var(--ink); border-color: var(--muted); }

/* ---- hero ---- */
.hero { position: relative; overflow: hidden; }
.hero-grid-bg {
  position: absolute; inset: 0; opacity: 0.28; pointer-events: none;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at top, #000, transparent 75%);
  mask-image: radial-gradient(ellipse at top, #000, transparent 75%);
}
.hero-inner {
  position: relative;
  padding-block: 56px 64px;
}
@media (min-width: 768px) { .hero-inner { padding-block: 80px 88px; } }
/* split header — big title left, lede + CTA right (panxo-style) */
.hero-copy { min-width: 0; display: grid; gap: 28px; align-items: end; }
@media (min-width: 960px) {
  .hero-copy { grid-template-columns: 1.2fr 0.8fr; gap: 56px; }
  .hero-copy > .eyebrow { grid-column: 1 / -1; }
}
.hero-copy > .eyebrow { margin-bottom: 0; }
.hero-side { min-width: 0; }
.lede {
  font-size: 1.125rem; line-height: 1.6; color: var(--ink-2);
  max-width: 44ch; margin: 0;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-cta.center { justify-content: center; }
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  max-width: 28rem; margin: 48px 0 0; padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.stat dt { font-family: var(--mono); font-size: 1.75rem; font-variant-numeric: tabular-nums; margin: 0; }
.stat dd { margin: 4px 0 0; font-size: 0.8125rem; color: var(--muted); }
.stats-hero { max-width: 34rem; margin-inline: auto; text-align: center; }

/* ---- orchestration demo card (hero) ---- */
.demo-card {
  position: relative; margin: 48px 0 0;
  background: linear-gradient(180deg, #fcfaf6, #f5f1e9);
  border: 1px solid var(--rule); border-radius: 24px; overflow: hidden;
  padding: 18px 20px 26px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 40px 90px -50px rgba(14,17,22,0.4);
}
@media (min-width: 768px) { .demo-card { padding: 22px 32px 34px; } }

/* aurora backdrop — four soft blobs drifting behind the demo */
.aurora { position: absolute; inset: 0; pointer-events: none; }
.aurora .au { position: absolute; border-radius: 50%; filter: blur(64px); }
.au-1 { width: 55%; height: 75%; top: -25%; left: -12%; background: radial-gradient(circle, rgba(244,177,120,0.5), transparent 70%); animation: au-drift-1 21s ease-in-out infinite alternate; }
.au-2 { width: 48%; height: 70%; top: -18%; right: -10%; background: radial-gradient(circle, rgba(233,150,116,0.4), transparent 70%); animation: au-drift-2 17s ease-in-out infinite alternate; }
.au-3 { width: 50%; height: 80%; bottom: -30%; left: 18%; background: radial-gradient(circle, rgba(151,180,214,0.38), transparent 70%); animation: au-drift-3 25s ease-in-out infinite alternate; }
.au-4 { width: 40%; height: 60%; bottom: -15%; right: 6%; background: radial-gradient(circle, rgba(252,238,214,0.65), transparent 70%); animation: au-drift-1 19s ease-in-out infinite alternate-reverse; }
@keyframes au-drift-1 { from { transform: translate(0,0) scale(1); } to { transform: translate(9%,7%) scale(1.14); } }
@keyframes au-drift-2 { from { transform: translate(0,0) scale(1.1); } to { transform: translate(-8%,10%) scale(0.94); } }
@keyframes au-drift-3 { from { transform: translate(0,0) scale(1); } to { transform: translate(11%,-9%) scale(1.18); } }

/* routing beams overlay — paths are computed by demo.js */
.route-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.route-svg .wire { fill: none; stroke: color-mix(in srgb, var(--cool) 38%, #fff); stroke-width: 1.2; stroke-dasharray: 2 5; stroke-linecap: round; opacity: 0.6; }
.route-svg .beam { fill: none; stroke: var(--warm); stroke-width: 1.8; stroke-linecap: round; opacity: 0; filter: drop-shadow(0 1px 4px rgba(217,97,63,0.4)); }
.route-svg .spark { fill: var(--warm); opacity: 0; }

.demo-top { position: relative; display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.demo-label { font-family: var(--mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted); }
.demo-dots { display: inline-flex; gap: 6px; }
.demo-dots i { width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 35%, transparent); transition: background-color 0.3s ease, transform 0.3s ease; cursor: pointer; }
.demo-dots i.on { background: var(--warm); transform: scale(1.25); }

/* prompt bar */
.prompt-bar {
  position: relative; display: flex; align-items: center; gap: 10px;
  max-width: 640px; margin: 0 auto;
  background: #fff; border: 1px solid var(--rule); border-radius: 16px;
  padding: 8px 8px 8px 18px;
  box-shadow: 0 14px 40px -18px rgba(14,17,22,0.28);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.prompt-bar:focus-within { border-color: color-mix(in srgb, var(--cool) 45%, var(--rule)); box-shadow: 0 14px 40px -14px rgba(31,78,122,0.35); }
.prompt-input {
  flex: 1; min-width: 0; border: none; background: transparent;
  font: inherit; font-size: 0.9375rem; color: var(--ink); padding: 6px 0;
}
.prompt-input::placeholder { color: var(--muted); }
.prompt-input:focus { outline: none; }
.prompt-send {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px; border: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--paper); cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.prompt-send:hover { background: var(--warm); transform: translateY(-1px); }
.prompt-send.firing { background: var(--warm); animation: send-pulse 0.5s ease; }
@keyframes send-pulse {
  0% { box-shadow: 0 0 0 0 rgba(217,97,63,0.5); }
  100% { box-shadow: 0 0 0 14px rgba(217,97,63,0); }
}

/* routing stage — supervisor pill + department agent cards */
.route-stage { position: relative; margin-top: 40px; }
.route-orch {
  position: relative; width: max-content; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--paper);
  border-radius: 14px; padding: 11px 18px;
  box-shadow: 0 18px 44px -20px rgba(14,17,22,0.55);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.route-orch.busy { transform: scale(1.04); box-shadow: 0 18px 50px -18px rgba(217,97,63,0.5); }
.ro-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warm); }
.route-orch.busy .ro-dot { animation: live-pulse 1.1s ease-out infinite; }
.ro-name { font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; }
.ro-div { width: 1px; height: 16px; background: rgba(245,241,234,0.25); }
.ro-status { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.04em; color: rgba(245,241,234,0.65); white-space: nowrap; }

.route-depts {
  list-style: none; margin: 48px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
}
@media (max-width: 900px) { .route-depts { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .route-depts { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 40px; } }
.rd {
  position: relative; display: flex; flex-direction: column; gap: 7px; align-items: flex-start;
  background: rgba(255,255,255,0.82); backdrop-filter: blur(5px);
  border: 1px solid var(--rule); border-radius: 14px; padding: 12px 13px;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), border-color 0.35s ease, box-shadow 0.35s ease;
}
.rd-icon { width: 18px; height: 18px; fill: none; stroke: var(--cool); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rd b { font-size: 0.8125rem; font-weight: 600; color: var(--ink); }
.rd .rd-status { font-family: var(--mono); font-size: 0.6563rem; color: var(--muted); min-height: 1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rd.active {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--warm) 45%, var(--rule));
  box-shadow: 0 18px 36px -20px rgba(217,97,63,0.5);
}
.rd.active .rd-icon { stroke: var(--warm); }
.rd.active .rd-status { color: var(--review); }
.rd.done { border-color: color-mix(in srgb, var(--signal) 40%, var(--rule)); }
.rd.done .rd-status { color: var(--signal); }
.rd.done .rd-icon { stroke: var(--signal); }

/* runtime band — one panel: copy + kv list beside the live workbench */
.rt-panel { padding: 0; display: grid; }
@media (min-width: 1024px) { .rt-panel { grid-template-columns: 0.72fr 1.28fr; } }
.rt-copy { padding: 24px; border-bottom: 1px solid var(--rule); }
@media (min-width: 768px) { .rt-copy { padding: 32px; } }
@media (min-width: 1024px) { .rt-copy { border-bottom: none; border-right: 1px solid var(--rule); } }
.rt-copy h3 { margin: 0; font-size: 1.125rem; font-weight: 600; color: var(--ink); }
.rt-copy p { margin: 10px 0 0; font-size: 0.9375rem; line-height: 1.6; color: var(--muted); }
.rt-kv { list-style: none; margin: 22px 0 0; padding: 0; }
.rt-kv li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--rule); }
.rt-kv span { font-family: var(--mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); white-space: nowrap; }
.rt-kv b { font-size: 0.875rem; font-weight: 500; color: var(--ink-2); text-align: right; }
.rt-figure { min-width: 0; }
.wb-flat { border: none; border-radius: 0; box-shadow: none; }

/* workbench rows cascade in when the panel reveals (and ripple on live refresh) */
html.rv .rt-panel.in .wb-row,
html.rv .rt-panel.in .rt-kv li { animation: row-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
html.rv .rt-panel.in .wb-row:nth-child(1) { animation-delay: 0.10s; }
html.rv .rt-panel.in .wb-row:nth-child(2) { animation-delay: 0.18s; }
html.rv .rt-panel.in .wb-row:nth-child(3) { animation-delay: 0.26s; }
html.rv .rt-panel.in .wb-row:nth-child(4) { animation-delay: 0.34s; }
html.rv .rt-panel.in .wb-row:nth-child(5) { animation-delay: 0.42s; }
html.rv .rt-panel.in .wb-row:nth-child(n+6) { animation-delay: 0.5s; }
html.rv .rt-panel.in .rt-kv li:nth-child(1) { animation-delay: 0.15s; }
html.rv .rt-panel.in .rt-kv li:nth-child(2) { animation-delay: 0.27s; }
html.rv .rt-panel.in .rt-kv li:nth-child(3) { animation-delay: 0.39s; }
@keyframes row-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
.wb-scroll { min-width: 0; overflow-x: auto; }
@media (min-width: 1024px) { .wb-scroll { overflow: visible; } }
.wb-scroll > .workbench { min-width: 440px; }
@media (min-width: 1024px) { .wb-scroll > .workbench { min-width: 0; } }

/* ---- workbench ---- */
.workbench {
  margin: 0; background: #fff; border: 1px solid var(--rule); border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 24px 60px -30px rgba(14,17,22,0.35);
}
.wb-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper-2) 60%, transparent);
}
.wb-bar-left { display: inline-flex; align-items: center; gap: 8px; }
.wb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rule); display: inline-block; }
.wb-dot.on { background: var(--signal); }
.wb-title { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); }
.wb-tenant { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.wb-tenant .live { color: var(--signal); }
.wb-updated { font-family: var(--mono); font-size: 0.6875rem; color: var(--muted); opacity: 0.85; }
.wb-dot.on {
  background: var(--signal);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 55%, transparent);
  animation: live-pulse 2.4s ease-out infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 55%, transparent); }
  70%  { box-shadow: 0 0 0 6px color-mix(in srgb, var(--signal) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 0%, transparent); }
}

/* mobile-only hint that the dense workbench table scrolls sideways */
.scroll-hint {
  display: none; margin: 10px 2px 0; font-family: var(--mono);
  font-size: 0.6875rem; letter-spacing: 0.04em; color: var(--muted);
}
@media (max-width: 1023px) { .scroll-hint { display: block; } }

/* trust strip — the agent domains, styled as a logo wall */
.trust { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: color-mix(in srgb, var(--paper-2) 35%, transparent); }
.trust-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding-block: 22px; }
.trust-label { margin: 0; flex-shrink: 0; font-family: var(--mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); }
.marquee {
  flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.trust-marks { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; width: max-content; }
.marquee-track { animation: marquee-slide 26s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-slide { to { transform: translateX(-50%); } }
.trust-marks li { flex-shrink: 0; margin-right: 56px; font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.01em; color: var(--ink); opacity: 0.5; transition: opacity 0.2s ease; }
.trust-marks li:hover { opacity: 0.9; }
.wb-head, .wb-row {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 0;
  align-items: stretch; padding: 0;
}
/* even, evenly-spaced columns (no vertical rules) */
.wb-head > *, .wb-row > * {
  display: flex; align-items: center; min-width: 0;
  padding: 0 13px;
}
.wb-head > *:first-child, .wb-row > *:first-child { padding-left: 16px; }
.wb-head > *:last-child, .wb-row > *:last-child {
  padding-right: 16px; justify-content: flex-end;
}
.wb-head > * { padding-top: 9px; padding-bottom: 9px; }
.wb-row > * { padding-top: 12px; padding-bottom: 12px; }
.wb-head { border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.wb-rows { list-style: none; margin: 0; padding: 0; }
.wb-row { border-top: 1px solid var(--rule); }
.wb-row:first-child { border-top: none; }
.wb-name { flex-direction: column; align-items: flex-start; justify-content: center; }
.wb-name b { display: block; font-size: 0.875rem; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wb-name small { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.wb-owner { font-family: var(--mono); font-size: 0.8125rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-status { gap: 6px; font-size: 0.8125rem; font-weight: 500; }
.wb-status i { font-style: normal; font-size: 0.7em; display: inline-block; width: 0.9em; text-align: center; flex-shrink: 0; }
.wb-signal { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-skel { height: 12px; border-radius: 4px; background: color-mix(in srgb, var(--rule) 70%, transparent); }

.st-signal, .text-signal { color: var(--signal); }
.st-review, .text-review { color: var(--review); }
.st-warm, .text-warm, .warm { color: var(--warm); }
.st-risk, .text-risk, .risk { color: var(--risk); }
.st-muted, .text-muted { color: var(--muted); }

.wb-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-top: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper-2) 40%, transparent);
}
.wb-foot-copy { min-width: 0; }
.wb-foot-label { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--warm); }
.wb-foot-text { font-size: 0.875rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-foot-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-mini { border: 1px solid var(--rule); background: transparent; color: var(--ink-2); border-radius: 6px; padding: 6px 12px; font-size: 0.75rem; font-weight: 500; cursor: pointer; }
.btn-mini:hover { background: var(--paper); }
.btn-mini-warm { background: var(--warm); color: #fff; border-color: var(--warm); }

/* ---- bands ---- */
.band { border-top: 1px solid var(--rule); padding-block: 80px; }
@media (min-width: 768px) { .band { padding-block: 112px; } }
.band-2 { background: color-mix(in srgb, var(--paper-2) 50%, transparent); }
.band-head { max-width: 42rem; margin-bottom: 48px; }
.band-head .eyebrow { margin-bottom: 12px; }

.panel { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 24px; overflow: hidden; }
@media (min-width: 768px) { .panel { padding: 40px; } }

/* architecture — full-bleed isometric platform stack */
.arch-band { overflow-x: clip; }
.arch-band .band-head { margin-bottom: 28px; }
.arch-fullbleed { position: relative; width: 100vw; margin-left: calc(50% - 50vw); }
.arch-scroll { overflow: visible; }
.arch-svg { display: block; width: 100%; height: auto; overflow: visible; }
@media (max-width: 1023px) {
  .arch-scroll { overflow-x: auto; overflow-y: hidden; }
  .arch-scroll > .arch-svg { min-width: 1180px; }
}
.mono { font-family: var(--mono); }
.hide-label { display: none; }

/* isometric planes — top face light, extruded sides darker for depth */
.iso-top { fill: #ffffff; stroke: var(--rule); stroke-width: 1.2; }
.iso-side { fill: #e9e2d3; stroke: var(--rule); stroke-width: 1.2; }
.agent-plane .iso-top { fill: #fbf9f5; }
.plane-label { font-family: var(--mono); font-size: 13px; letter-spacing: 0.16em; fill: var(--muted); }
.plane-label.strong { fill: var(--ink); font-size: 13px; letter-spacing: 0.12em; }

/* edge-to-edge connectors between the three planes + delegation lines */
.link { fill: none; stroke: color-mix(in srgb, var(--cool) 55%, #fff); stroke-width: 1.3; stroke-dasharray: 2 6; stroke-linecap: round; opacity: 0.5; }
.rel { fill: none; stroke: color-mix(in srgb, var(--cool) 68%, #fff); stroke-width: 1.3; stroke-dasharray: 2 6; stroke-linecap: round; opacity: 0.55; }
.task { fill: var(--signal); opacity: 0; }

/* realistic UI cards (web platform + api/database) */
.ui-card .card-body { fill: #fff; stroke: color-mix(in srgb, var(--cool) 20%, var(--rule)); stroke-width: 1.3; filter: url(#chipShadow); }
.win-dot { fill: var(--rule); }
.addr { fill: var(--paper-2); }
.ui-div { stroke: var(--rule); stroke-width: 1; }
.ui-divv { stroke: var(--rule); stroke-width: 1; }
.ui-nav-hl { fill: color-mix(in srgb, var(--cool) 14%, #fff); }
.ui-line { fill: color-mix(in srgb, var(--muted) 45%, #fff); }
.ui-hd { fill: color-mix(in srgb, var(--ink) 55%, #fff); }
.ui-bar { fill: color-mix(in srgb, var(--cool) 35%, #fff); }
.ui-bar.tall { fill: var(--cool); }
.ui-chip-ok { fill: none; stroke: color-mix(in srgb, var(--signal) 42%, var(--rule)); stroke-width: 1; }
.ui-check { fill: none; stroke: var(--signal); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ui-title { font-family: var(--sans); font-size: 11px; font-weight: 600; fill: var(--ink); }
.ui-ver { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.04em; fill: var(--muted); }
.ep-m { font-family: var(--mono); font-size: 7.5px; font-weight: 600; letter-spacing: 0.04em; fill: var(--ink-2); }
.ep-dot { stroke: var(--cool); stroke-width: 1.3; }
.ep-dot.get { fill: none; }
.ep-dot.post { fill: var(--cool); }
.ep-path { fill: color-mix(in srgb, var(--muted) 36%, #fff); }
.db-mini { fill: none; stroke: var(--cool); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ui-dbt { font-family: var(--mono); font-size: 9px; fill: var(--ink-2); }
.ui-dbm { font-family: var(--mono); font-size: 8px; fill: var(--muted); }

/* department subagent cards (each carries workflows + skills) */
.dept-base { fill: rgba(14, 17, 22, 0.10); }
.dept-stem { stroke: var(--rule); stroke-width: 1.4; }
.card-body { fill: #fff; stroke: color-mix(in srgb, var(--cool) 22%, var(--rule)); stroke-width: 1.3; filter: url(#chipShadow); }
.dept-icon { fill: none; stroke: var(--cool); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dept-dot { stroke: #fff; stroke-width: 1.2; }
.dept-dot.ok { fill: var(--signal); }
.dept-dot.warm { fill: var(--warm); }
.dept-name { font-family: var(--sans); font-size: 13px; font-weight: 600; fill: var(--ink); }
.dept-role { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.08em; fill: var(--muted); }
.card-div { stroke: var(--rule); stroke-width: 1; }
.m-tag { font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--muted); }
.m-val { font-family: var(--mono); font-size: 9px; fill: var(--ink-2); }

/* supervisor orchestrator — refined */
.orch-body { fill: var(--ink); }
.orch-eyebrow { font-family: var(--mono); font-size: 8px; letter-spacing: 0.18em; fill: rgba(245, 241, 234, 0.5); }
.orch-dot { fill: var(--warm); }
.orch-name { fill: var(--paper); font-family: var(--sans); font-size: 17px; font-weight: 600; }
.orch-sub { fill: rgba(245, 241, 234, 0.6); font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; }
.orch-div { stroke: rgba(245, 241, 234, 0.16); stroke-width: 1; }
.orch-cap { fill: rgba(245, 241, 234, 0.5); font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.03em; }
.hub-glow { opacity: 0; }

/* motion — runs only when in view + motion allowed; static state is legible */
.arch-animate .link { animation: link-in 0.6s ease 1.15s both, flow-move 1.7s linear infinite; }
.arch-animate .rel { animation: rel-in 0.6s ease 1.15s both, flow-move 1.9s linear infinite; }
.arch-animate .task { animation: task-move 2.8s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
.arch-animate .hub-glow { animation: arch-hub 3s ease-in-out 1.2s infinite; }

/* entrance — the stack builds itself when scrolled into view:
   planes rise, the supervisor lights up, dept cards pop in, wires connect */
.arch-svg .iso-plane, .arch-svg .dept { transform-box: fill-box; }
.arch-animate .iso-plane { animation: arch-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
.arch-animate .plane-label { animation: arch-fade 0.5s ease 0.3s both; }
.arch-animate .ui-card { animation: arch-fade 0.6s ease 0.3s both; }
.arch-animate .orch,
.arch-animate .arch-stage > .dept-base { animation: arch-fade 0.55s ease 0.35s both; }
.arch-animate .dept { animation: arch-pop 0.6s cubic-bezier(0.34, 1.4, 0.5, 1) both; }
.arch-animate .dept:nth-of-type(1) { animation-delay: 0.55s; }
.arch-animate .dept:nth-of-type(2) { animation-delay: 0.67s; }
.arch-animate .dept:nth-of-type(3) { animation-delay: 0.79s; }
.arch-animate .dept:nth-of-type(4) { animation-delay: 0.91s; }
.arch-animate .dept:nth-of-type(5) { animation-delay: 1.03s; }
.arch-animate .dept:nth-of-type(6) { animation-delay: 1.15s; }
@keyframes arch-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes arch-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes arch-pop { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes link-in { from { opacity: 0; } to { opacity: 0.5; } }
@keyframes rel-in { from { opacity: 0; } to { opacity: 0.55; } }
@keyframes flow-move { to { stroke-dashoffset: -8; } }
@keyframes task-move {
  0%   { transform: translate(0, 0); opacity: 0; }
  12%  { opacity: 1; }
  82%  { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)); opacity: 0; }
}
@keyframes arch-hub {
  0%, 100% { opacity: 0.4; r: 64; }
  50%      { opacity: 0.9; r: 84; }
}
.arch-notes {
  display: grid; gap: 24px; margin-top: 32px; padding-top: 24px;
  border-top: 1px solid var(--rule);
}
@media (min-width: 640px) { .arch-notes { grid-template-columns: repeat(3, 1fr); } }
.arch-notes h3 { font-size: 0.875rem; font-weight: 600; margin: 0; color: var(--ink); }
.arch-notes p { font-size: 0.875rem; line-height: 1.55; color: var(--muted); margin: 6px 0 0; }

/* lifecycle */
.life-wrap { position: relative; }
.life-rail { display: none; }
@media (min-width: 768px) {
  .life-rail {
    display: block; position: relative; height: 2px; margin: 0 0 22px;
    background: var(--rule); border-radius: 2px;
  }
  .life-rail-fill {
    position: absolute; inset: 0 auto 0 0; width: 100%;
    background: linear-gradient(90deg, var(--warm), var(--cool));
    border-radius: 2px;
  }
  .life-animate .life-rail-fill { animation: life-grow 1.6s cubic-bezier(0.16, 1, 0.3, 1); }
}
.life {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1px; background: var(--rule);
  border: 1px solid var(--rule); border-radius: 12px; overflow: hidden;
}
@media (min-width: 768px) { .life { grid-template-columns: repeat(5, 1fr); } }
.life li { background: #fff; padding: 20px; }
.life-animate .life li { animation: rise 0.65s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--si, 0) * 0.13s); }
.life-n { font-family: var(--mono); font-size: 0.8125rem; font-variant-numeric: tabular-nums; color: var(--warm); }
.life h3 { font-size: 1rem; font-weight: 600; margin: 12px 0 0; color: var(--ink); }
.life p { font-size: 0.875rem; line-height: 1.55; color: var(--muted); margin: 6px 0 0; }
@keyframes life-grow { from { width: 0; } to { width: 100%; } }

/* cta + footer */
.cta { border-top: 1px solid var(--rule); background: var(--ink); color: var(--paper); }
.cta-inner { padding-block: 96px; text-align: center; }
@media (min-width: 768px) { .cta-inner { padding-block: 128px; } }
.cta h2 { font-size: 2.25rem; line-height: 1.05; }
@media (min-width: 768px) { .cta h2 { font-size: clamp(2.75rem, 5vw, 4.25rem); } }
.cta p { max-width: 36rem; margin: 20px auto 0; font-size: 1.125rem; color: rgba(245,241,234,0.7); }
.cta .hero-cta { margin-top: 36px; }
.foot { background: var(--ink); color: rgba(245,241,234,0.6); }
.foot-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-block: 40px; border-top: 1px solid rgba(255,255,255,0.1); }
@media (min-width: 768px) { .foot-inner { flex-direction: row; align-items: center; justify-content: space-between; } }
.foot .brand-word { color: var(--paper); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 32px; font-size: 0.875rem; }
.foot-links a:hover { color: var(--paper); }
.foot-copy { font-family: var(--mono); font-size: 0.75rem; color: rgba(245,241,234,0.4); }

/* motion */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.rise { animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero-copy.rise { animation-duration: 0.8s; }
.demo-card.rise { animation-delay: 0.15s; }
.stats-hero.rise { animation-delay: 0.3s; }

/* scroll reveal — armed by app.js (html.rv) only when IO exists and motion is allowed */
html.rv [data-reveal] { opacity: 0; transform: translateY(18px); }
html.rv [data-reveal].in {
  opacity: 1; transform: none;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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