@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('assets/fonts/plus-jakarta-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* Instrument Serif italic (OFL 1.1, assets/fonts/OFL-InstrumentSerif.txt): the hook phrases only. */
@font-face {
  font-family: 'Instrument Serif';
  src: url('assets/fonts/instrument-serif-italic-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --velvet: #090512;
  --velvet-2: #120b20;
  --plum: #2b1b4d;
  --porcelain: #f7f6fa;
  --paper: #ffffff;
  --ink: #120d1b;
  --ink-2: #2e2740;
  --muted: #5d566b;
  --line: rgba(18, 13, 27, 0.09);
  --line-strong: rgba(18, 13, 27, 0.18);
  --line-dark: rgba(255, 255, 255, 0.14);

  --lilac: #c9b6f3;
  --lilac-bright: #dcd0fa;
  --lilac-soft: #efe9fd;
  --lilac-card: #e4dafa;
  --lilac-ink: #52378c;
  --peach: #f4c69a;
  --peach-card: #fbe1cc;

  --tomato: #cf3f24;
  --tomato-hover: #b6351e;

  --gain: #10b981;
  --gain-ink: #0a7d47;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.5, 0.64, 1);
  --t-fast: 160ms;
  --t-med: 300ms;

  --container: 1160px;
  --gutter: clamp(18px, 4vw, 40px);

  --rim: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 2px 4px rgba(18, 13, 27, 0.05), 0 28px 60px -24px rgba(18, 13, 27, 0.22);
  --shadow-card-dark: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 40px 80px -28px rgba(0, 0, 0, 0.85), 0 14px 30px rgba(3, 1, 8, 0.35);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.05' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

html {
  background: var(--velvet);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--velvet);
  color: var(--ink);
}

h1, h2, h3, p, blockquote, ul, ol {
  margin: 0;
}

p, li {
  text-wrap: pretty;
}

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

button,
input,
textarea,
output {
  font: inherit;
  color: inherit;
}

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

::selection {
  background: var(--lilac-soft);
  color: var(--ink);
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

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

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
}

.skip-link:focus {
  top: 14px;
}

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

.container {
  width: min(100%, calc(var(--container) + var(--gutter) * 2));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- TYPE ---------- */

/* Display sans: tight letters, open words, so phrases never run together. */
.hero h1,
.baskets h2,
.agents h2,
.control h2,
.finale h2,
.faq-title {
  font-weight: 800;
  letter-spacing: -0.042em;
  word-spacing: 0.05em;
}

.h-line {
  display: block;
}

/* The hook phrases: warm editorial italic beside the sans. */
.serif {
  font-family: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.006em;
  word-spacing: 0.02em;
}

.h-line.serif {
  font-size: 1.14em;
  line-height: 0.9;
}

/* Optical kerning: Plus Jakarta's period carries a wide left bearing at display sizes. */
.dot {
  margin-left: -0.045em;
}

.section-sub {
  max-width: 36ch;
  margin-top: 18px;
  text-wrap: balance;
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  line-height: 1.5;
  color: var(--muted);
}

.section-head {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.section-head .section-sub {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- BUTTONS ---------- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--tomato);
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.24) inset, 0 10px 24px -12px rgba(0, 0, 0, 0.6);
  transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.btn-primary:hover {
  background: var(--tomato-hover);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.24) inset, 0 14px 28px -12px rgba(0, 0, 0, 0.7);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-ink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset;
  transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.btn-ink:hover {
  background: #2c2340;
}

.btn-ink:active {
  transform: scale(0.96);
}

.btn-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.btn-quiet:hover {
  background: var(--lilac-soft);
  border-color: rgba(82, 55, 140, 0.36);
}

.btn-quiet svg {
  width: 16px;
  height: 16px;
  transition: transform var(--t-fast) var(--ease);
}

.btn-quiet:hover svg {
  transform: translateX(2px);
}

/* ---------- HEADER ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  color: #ffffff;
  background: rgba(9, 5, 18, 0);
  border-bottom: 1px solid rgba(255, 255, 255, 0);
  transition: background-color var(--t-med) var(--ease), border-color var(--t-med) var(--ease), color var(--t-med) var(--ease);
}

.site-header.is-scrolled {
  background: rgba(9, 5, 18, 0.6);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  backdrop-filter: saturate(140%) blur(16px);
}

.site-header.is-light {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(18, 13, 27, 0.06);
  color: var(--ink);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
  align-self: center;
}

.brand-wordmark {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  font-weight: 700;
  opacity: 0.78;
  transition: background-color var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}

.header-nav a:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.site-header.is-light .header-nav a:hover {
  background: rgba(18, 13, 27, 0.06);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--rim);
  font-size: 0.875rem;
  font-weight: 800;
  white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), opacity var(--t-med) var(--ease), visibility 0s linear 0s;
}

/* Only one "Get early access" in view: the header button fades out while the closing form shows. */
.site-header.cta-off .header-cta {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--t-med) var(--ease), visibility 0s linear var(--t-med);
}

.header-cta:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.44);
}

.site-header.is-light .header-cta {
  background: transparent;
  border-color: var(--line-strong);
  box-shadow: none;
}

.site-header.is-light .header-cta:hover {
  background: rgba(18, 13, 27, 0.06);
}

/* ---------- EARLY ACCESS FORM (on velvet) ---------- */

.waitlist-form {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 6px 6px 6px 20px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: var(--rim), 0 18px 44px -18px rgba(0, 0, 0, 0.7);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.waitlist-form:focus-within {
  border-color: var(--lilac);
  box-shadow: var(--rim), 0 0 0 4px rgba(201, 182, 243, 0.22), 0 18px 44px -18px rgba(0, 0, 0, 0.7);
}

.waitlist-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  border: 0;
  background: transparent;
  padding: 0 4px;
  font-size: 1rem;
  color: #ffffff;
}

.waitlist-input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.waitlist-input:focus {
  outline: none;
}

.finale-copy {
  position: relative;
}

/* The status line floats under the form, so a message never pushes the crew down. */
.waitlist-status {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--lilac-bright);
}

/* ---------- 1. HERO ---------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  padding: 104px 0 56px;
  background: var(--velvet);
  color: #ffffff;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.hero-backdrop::after,
.workflows::after,
.control::after,
.finale-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  background-size: 140px 140px;
  opacity: 0.085;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero-backdrop-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 5, 18, 0.74) 0%, rgba(9, 5, 18, 0.2) 34%, rgba(9, 5, 18, 0.06) 60%, rgba(9, 5, 18, 0.42) 100%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(244, 198, 154, 0.14), transparent 70%);
}

/* Skyline: two planes of candlestick towers under a violet haze. */
.skyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: clamp(170px, 31vh, 300px);
}

.sky-back {
  fill: #2a1a4f;
}

.sky-front {
  fill: #06030d;
}

.sky-glow {
  fill: #c9b6f3;
  opacity: 0.13;
}

.sky-l {
  opacity: 0.85;
}

.sky-l.is-amber {
  fill: #ffcb8e;
}

.sky-l.is-lilac {
  fill: #c9b6f3;
  opacity: 0.6;
}

.sky-l.is-emerald {
  fill: #4ade9f;
  opacity: 0.75;
}

.sky-back .sky-l,
.sky-l.is-far {
  opacity: 0.34;
}

.sky-l.is-twinkle {
  animation: twinkle 8s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.18; }
  45% { opacity: 0.95; }
  60% { opacity: 0.8; }
}

/* Spotlight behind the active agent. It lives in the clipped backdrop, never around a cat. */
.stage-glow {
  position: absolute;
  left: 0;
  top: 0;
  width: 210px;
  height: 210px;
  margin: -105px 0 0 -105px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 244, 236, 0.42), rgba(236, 222, 255, 0.2) 42%, rgba(201, 182, 243, 0) 100%);
  opacity: 0;
  transition: transform 700ms var(--ease), opacity 600ms var(--ease);
}

.stage-glow.is-on {
  opacity: 1;
}

.hero-copy {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.75rem, 6.2vw, 5.5rem);
  line-height: 0.96;
  color: #ffffff;
}

.hero h1 .serif {
  color: var(--lilac);
}

.hero-sub {
  max-width: 46ch;
  margin: 16px auto 0;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}

/* The stage: cats perch on the live notification. */
.stage {
  --cast-h: 124px;
  --cast-lead-h: 152px;
  position: relative;
  width: min(100%, 880px);
  margin: clamp(34px, 5vh, 48px) auto 0;
}

.cast {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(2px, 0.6vw, 8px);
  padding: 0 3%;
}

/* Feet land 2px onto the card: the transparent foot margin of each pose is cancelled exactly. */
.cast-cat {
  --h: var(--cast-h);
  position: relative;
  flex: 0 0 auto;
  margin: 0 0 calc(var(--h) * var(--foot, 0.04) * -1 - 2px);
  transform-origin: 50% 100%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 520ms var(--spring), scale 520ms var(--spring), filter 420ms var(--ease);
}

.cast-cat--lead {
  --h: var(--cast-lead-h);
}

.cast-cat img {
  width: auto;
  height: var(--h);
  max-width: none;
  transform-origin: 50% 96%;
  animation: breathe 4.4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.cast-cat--mirror img {
  scale: -1 1;
}

.cast-cat.is-active {
  z-index: 2;
  scale: 1.06;
  animation: hop 620ms var(--ease);
}

.cast-cat.is-cheering {
  animation: cheer 760ms var(--ease);
}

@media (hover: hover) {
  .cast-cat:hover {
    transform: translateY(-7px);
  }

  .cast-cat:hover .cast-tag {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes hop {
  0% { translate: 0 0; }
  35% { translate: 0 -14px; }
  70% { translate: 0 0; }
  84% { translate: 0 -3px; }
  100% { translate: 0 0; }
}

@keyframes cheer {
  0% { translate: 0 0; }
  28% { translate: 0 -20px; }
  56% { translate: 0 0; }
  74% { translate: 0 -7px; }
  100% { translate: 0 0; }
}

/* Role tag floats over the active cat, and over any cat on hover. */
.cast-tag {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  z-index: 1;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: rgba(18, 11, 32, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--rim), 0 8px 18px -10px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity 240ms var(--ease), transform 380ms var(--spring);
}

.cast-cat.is-active .cast-tag {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* First load: the stack slides up, then the crew lands on it, lead first. */
.stage.is-entering .note-stack {
  animation: note-in 620ms var(--ease) both;
}

.stage.is-entering .cast-cat {
  animation: land 680ms var(--spring) both;
  animation-delay: calc(260ms + var(--n, 0) * 110ms);
}

@keyframes note-in {
  from { opacity: 0; translate: 0 26px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes land {
  0% { opacity: 0; translate: 0 -46px; }
  55% { opacity: 1; translate: 0 3px; }
  100% { opacity: 1; translate: 0 0; }
}

.cast.has-active .cast-cat:not(.is-active) {
  filter: brightness(0.58) saturate(0.7);
}

.cast.has-active .cast-cat:not(.is-active):hover {
  filter: brightness(0.86) saturate(0.92);
}

@keyframes breathe {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.008, 0.99); }
}

/* A crisp iOS-style stack: two cards peek 6px and 12px under the live one. */
.note-stack {
  position: relative;
  z-index: 2;
}

.note-back {
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  transform-origin: 50% 100%;
  pointer-events: none;
}

.note-back--1 {
  z-index: 1;
  background: #e7e0fa;
  transform: translateY(6px) scale(0.965);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 12px 24px -14px rgba(0, 0, 0, 0.7);
}

.note-back--2 {
  z-index: 0;
  background: #b7a5e8;
  transform: translateY(12px) scale(0.93);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 18px 30px -16px rgba(0, 0, 0, 0.75);
}

.note-stack.is-shuffling .note-back--1 {
  animation: fan-1 540ms var(--ease);
}

.note-stack.is-shuffling .note-back--2 {
  animation: fan-2 540ms var(--ease);
}

@keyframes fan-1 {
  0%, 100% { transform: translateY(6px) scale(0.965); }
  42% { transform: translateY(15px) scale(0.955); }
}

@keyframes fan-2 {
  0%, 100% { transform: translateY(12px) scale(0.93); }
  42% { transform: translateY(26px) scale(0.905); }
}

.note {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 30px;
  min-height: 142px;
  padding: 24px 26px 24px 30px;
  border-radius: var(--r-lg);
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-card-dark);
}

/* Completion: one green shine sweeps the card. */
.note.is-complete::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, rgba(16, 185, 129, 0) 34%, rgba(16, 185, 129, 0.16) 44%, rgba(255, 255, 255, 0.55) 50%, rgba(16, 185, 129, 0.16) 56%, rgba(16, 185, 129, 0) 66%);
  background-size: 260% 100%;
  background-position: 130% 0;
  pointer-events: none;
  animation: shine 950ms var(--ease) 80ms both;
}

@keyframes shine {
  from { background-position: 130% 0; }
  to { background-position: -30% 0; }
}

.note-main,
.note-side {
  transition: opacity 200ms var(--ease), transform 260ms var(--ease);
}

.note.is-swapping .note-main,
.note.is-swapping .note-side {
  opacity: 0;
  transform: translateY(-6px);
}

.note-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

.note-kicker strong {
  font-weight: 800;
  color: var(--ink);
}

.avatar {
  width: 32px;
  height: 30px;
  flex: none;
  align-self: center;
}

.note-title {
  margin-top: 10px;
  font-size: clamp(1.2rem, 1.9vw, 1.55rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.026em;
  word-spacing: 0.03em;
}

.note-sub {
  margin-top: 4px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.note-side {
  display: flex;
  align-items: center;
  gap: 22px;
}

.note-vis {
  width: 156px;
  height: 64px;
  flex: none;
}

.note-vis svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.vis-draw {
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: draw 900ms var(--ease) 120ms forwards;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

.vis-crew {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
}

.vis-crew span {
  position: relative;
  display: block;
}

.vis-crew img {
  width: 34px;
  height: 32px;
}

.vis-crew span::after {
  content: '';
  position: absolute;
  right: -1px;
  bottom: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gain);
  box-shadow: 0 0 0 2px var(--paper);
}

.vis-crew .needs-you::after {
  background: var(--tomato);
}

.paw {
  width: 17px;
  height: 17px;
  flex: none;
  fill: var(--gain-ink);
  animation: stamp 560ms var(--spring) both;
}

@keyframes stamp {
  0% { opacity: 0; transform: scale(2.1) rotate(-22deg); }
  60% { opacity: 1; transform: scale(0.86) rotate(-6deg); }
  100% { opacity: 1; transform: scale(1) rotate(-8deg); }
}

.note-kicker .is-filled {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 4px;
  font-weight: 800;
  color: var(--gain-ink);
}

.vis-bars {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  height: 100%;
  padding: 0 14px;
}

.vis-bars i {
  display: block;
  width: 18px;
  height: calc(var(--v) * 100%);
  border-radius: 5px 5px 2px 2px;
  background: var(--lilac);
}

.vis-bars i:nth-child(even) {
  background: var(--lilac-ink);
}

.vis-bars b {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 62%;
  border-top: 1.5px dashed rgba(82, 55, 140, 0.5);
}

.vis-bars.is-even i {
  animation: settle 700ms var(--spring) both;
}

@keyframes settle {
  from { height: calc(var(--from, var(--v)) * 100%); }
}

/* Crew tabs: a dark glass pill over the skyline; the active tab's line fills as the crew rotates. */
.crew-tabs {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 30px auto 0;
  padding: 4px;
  border-radius: 999px;
  background: rgba(17, 11, 31, 0.7);
  box-shadow: var(--rim), 0 0 0 1px rgba(255, 255, 255, 0.07), 0 14px 34px rgba(6, 3, 14, 0.5);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
}

.crew-tab {
  position: relative;
  min-width: 44px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

.crew-tab:hover {
  color: rgba(255, 255, 255, 0.92);
}

.crew-tab[aria-selected="true"] {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
}

.crew-tab::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 7px;
  height: 2px;
  border-radius: 2px;
  background: var(--lilac);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.crew-tab[aria-selected="true"]::after {
  transform: scaleX(1);
}

.crew-tabs.is-cycling .crew-tab[aria-selected="true"]::after {
  animation: progress 5200ms linear both;
}

.crew-tabs.is-paused .crew-tab::after {
  animation-play-state: paused;
}

@keyframes progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ---------- SHARED PIECES ---------- */

/* Perch: a cat standing on the top edge of the card below it. */
.perch {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  padding: 0 40px;
}

.perch img {
  flex: none;
  align-self: flex-end;
  width: auto;
  max-width: none;
}

.ac-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--gain-ink);
}

.ac-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gain);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

.ac-status.is-building {
  color: var(--lilac-ink);
}

.ac-status.is-building::before {
  background: var(--lilac-ink);
  box-shadow: 0 0 0 4px rgba(82, 55, 140, 0.14);
  animation: blink 900ms ease-in-out infinite;
}

@keyframes blink {
  50% { opacity: 0.25; }
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

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

.chips,
.scenarios {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.scenario {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.chip:hover,
.scenario:hover {
  border-color: rgba(82, 55, 140, 0.45);
  color: var(--lilac-ink);
}

.chip[aria-pressed="true"],
.scenario[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset;
}

/* ---------- 2. BASKETS ---------- */

.baskets {
  padding: clamp(96px, 13vh, 150px) 0;
  background: var(--porcelain);
  color: var(--ink);
}

.baskets h2,
.agents h2 {
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 0.98;
}

.baskets h2 .serif,
.agents h2 .serif {
  color: var(--lilac-ink);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.belief {
  margin-top: 34px;
}

.field {
  display: flex;
  align-items: center;
  padding: 0 22px;
  border-radius: 20px;
  background: var(--paper);
  border: 1px solid rgba(82, 55, 140, 0.16);
  box-shadow: var(--shadow-card);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.field:focus-within {
  border-color: rgba(82, 55, 140, 0.55);
  box-shadow: 0 0 0 4px rgba(82, 55, 140, 0.12), var(--shadow-card);
}

.field-input {
  --row: 64px;
  display: block;
  width: 100%;
  min-height: var(--row);
  padding: calc((var(--row) - 1.35em) / 2) 0;
  border: 0;
  background: transparent;
  resize: none;
  overflow: hidden;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.016em;
  text-wrap: pretty;
  color: var(--ink);
  caret-color: var(--lilac-ink);
}

.field-input:focus {
  outline: none;
}

.belief .chips {
  margin-top: 14px;
}

.split-demo {
  position: relative;
  width: min(100%, 500px);
  justify-self: end;
}

.perch--basket {
  justify-content: flex-end;
}

.perch--basket img {
  height: 150px;
  margin-bottom: calc(150px * -0.035 - 2px);
}

.basket-card {
  position: relative;
  z-index: 1;
  min-height: 404px;
  padding: 20px 26px 22px;
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

/* Task types: one colour per kind of task, wherever a task shows up. */
.task-pill {
  --tc: var(--ink);
  --tb: rgba(18, 13, 27, 0.06);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 10px 4px 8px;
  border-radius: var(--r-pill);
  background: var(--tb);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink-2);
  white-space: nowrap;
}

.task-pill::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tc);
}

.task-pill--baskets { --tc: #e39a3b; --tb: #fbefdc; }
.task-pill--workflows { --tc: #10b981; --tb: #dcf6ea; }
.task-pill--research { --tc: #8d6be8; --tb: #ece5fd; }
.task-pill--trades { --tc: #120d1b; --tb: #ebe8f1; }
.task-pill--odds { --tc: #3b82f6; --tb: #e2ecfd; }
.task-pill--any::before {
  background: conic-gradient(#e39a3b 0 25%, #10b981 0 50%, #8d6be8 0 75%, #3b82f6 0);
}

.bc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.bc-head strong {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.012em;
}

.bc-who {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.bc-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  margin-top: 18px;
}

.bc-title h3 {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.028em;
  word-spacing: 0.04em;
}

.bc-meta {
  flex: none;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
}

.bc-bar {
  display: flex;
  gap: 3px;
  height: 12px;
  margin-top: 14px;
}

.bc-bar i {
  flex: 0 0 calc(var(--w) - 2.25px);
  border-radius: 4px;
  transform-origin: 0 50%;
  animation: grow 620ms var(--ease) both;
  animation-delay: calc(var(--i) * 70ms);
}

.bc-bar i:first-child {
  border-radius: 6px 4px 4px 6px;
}

.bc-bar i:last-child {
  border-radius: 4px 6px 6px 4px;
}

@keyframes grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.c1 { background: var(--ink); }
.c2 { background: var(--lilac-ink); }
.c3 { background: #a38be6; }
.c4 { background: #f0b07a; }

.bc-rows {
  list-style: none;
  margin-top: 10px;
  padding: 0;
}

.bc-rows li {
  display: grid;
  grid-template-columns: 10px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  animation: rise-in 440ms var(--ease) both;
  animation-delay: calc(120ms + var(--i) * 70ms);
}

.bc-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.bc-rows strong {
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.bc-rows span:not(.bc-dot) {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.9375rem;
  color: var(--muted);
}

.bc-rows em {
  font-style: normal;
  font-size: 0.9375rem;
  font-weight: 800;
}

.bc-tasks {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 0 0 0 22px;
  list-style: none;
}

.bc-task {
  position: relative;
  display: grid;
  gap: 2px;
}

/* Each spawned task hangs off one trunk that drops from the basket. */
.bc-task::before,
.bc-task:not(:last-child)::after {
  content: '';
  position: absolute;
  left: -16px;
  border-left: 1.5px solid var(--line-strong);
}

.bc-task::before {
  top: -12px;
  width: 11px;
  height: 21px;
  border-bottom: 1.5px solid var(--line-strong);
  border-bottom-left-radius: 7px;
}

.bc-task:not(:last-child)::after {
  top: 9px;
  bottom: -12px;
}

.bc-task strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 18px;
  color: var(--ink);
}

.bc-task strong::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tc);
}

.bc-task--workflows { --tc: #10b981; }
.bc-task--research { --tc: #8d6be8; }

.bc-task span {
  padding-left: 15px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.bc-ghost {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.bc-ghost i {
  display: block;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, #f0edf6, #e6e0f3, #f0edf6);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

.bc-ghost i:nth-child(1) { width: 54%; height: 20px; }
.bc-ghost i:nth-child(2) { width: 100%; height: 12px; }
.bc-ghost i:nth-child(3) { width: 82%; }
.bc-ghost i:nth-child(4) { width: 74%; }
.bc-ghost i:nth-child(5) { width: 88%; }
.bc-ghost i:nth-child(6) { width: 66%; }

.bc-hint {
  padding: 24px 0 8px;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ---------- 3. WORKFLOWS: the canvas ---------- */

.workflows {
  position: relative;
  isolation: isolate;
  padding: clamp(96px, 13vh, 150px) 0 clamp(96px, 12vh, 140px);
  background: var(--velvet);
  color: #ffffff;
}

.workflows::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 60% 46% at 50% 62%, rgba(124, 92, 214, 0.22), transparent 72%);
  pointer-events: none;
}

.workflows::after {
  z-index: -1;
}

.workflows h2 {
  font-size: clamp(3.2rem, 7vw, 6rem);
  line-height: 0.95;
  color: #ffffff;
}

.workflows .section-sub {
  color: rgba(255, 255, 255, 0.72);
}

.canvas {
  --row-gap: 26px;
  --cat-h: 124px;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    "cat bar bar"
    "sig ca aa"
    "sig cb ab";
  column-gap: clamp(56px, 6.4vw, 92px);
  row-gap: var(--row-gap);
  margin-top: 48px;
  padding: 28px clamp(24px, 3vw, 40px) 40px;
  border-radius: 32px;
  background-color: #f6f4fb;
  background-image: radial-gradient(circle, rgba(82, 55, 140, 0.2) 1px, transparent 1.5px);
  background-size: 22px 22px;
  background-position: 11px 11px;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 50px 100px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.canvas.is-single {
  grid-template-areas:
    "cat bar bar"
    "sig ca aa";
}

.canvas.is-single #node-cb,
.canvas.is-single #node-ab {
  display: none;
}

.wires {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.canvas-bar {
  grid-area: bar;
  align-self: start;
  position: relative;
  z-index: 2;
}

/* The task label and the agent that owns it sit together over the signal node. */
.canvas-perch {
  grid-area: cat;
  align-self: end;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.canvas-task {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-height: 60px;
}

.ask {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 7px 7px 7px 14px;
  border-radius: 20px;
  background: var(--paper);
  border: 1px solid rgba(82, 55, 140, 0.18);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 16px 34px -22px rgba(18, 13, 27, 0.4);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.ask:focus-within {
  border-color: rgba(82, 55, 140, 0.55);
  box-shadow: 0 0 0 4px rgba(82, 55, 140, 0.12), 0 16px 34px -22px rgba(18, 13, 27, 0.4);
}

.ask .avatar {
  width: 30px;
  height: 28px;
  align-self: flex-end;
  margin-bottom: 8px;
}

/* One row that grows with the sentence; the avatar and send button stay on the last line. */
.ask-input {
  --row: 44px;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--row);
  padding: calc((var(--row) - 1.35em) / 2) 0;
  border: 0;
  background: transparent;
  resize: none;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-wrap: pretty;
  color: var(--ink);
  caret-color: var(--lilac-ink);
}

.ask-input::placeholder {
  color: #6c6580;
  font-weight: 600;
}

.ask-input:focus {
  outline: none;
}

.ask-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset;
  transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.ask-send:hover {
  background: var(--lilac-ink);
}

.ask-send:active {
  transform: scale(0.94);
}

.ask-send svg {
  width: 20px;
  height: 20px;
}

.ask-hint {
  padding: 10px 4px 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--lilac-ink);
}

.ask-hint:empty {
  display: none;
}

.canvas .scenarios {
  margin-top: 12px;
}

.canvas .scenario {
  background: var(--paper);
}

.canvas .scenario[aria-pressed="true"] {
  background: var(--ink);
}

/* The agent that runs the workflow stands on its signal node. */
.node-cat {
  position: relative;
  margin: 0 0 calc(var(--cat-h) * var(--foot, 0.037) * -1 - 2px - var(--row-gap)) 18px;
  transition: opacity 200ms var(--ease), translate 380ms var(--spring);
}

.node-cat img {
  width: auto;
  height: var(--cat-h);
  max-width: none;
}

.node-cat.is-swapping {
  opacity: 0;
  translate: 0 -10px;
}

.node {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: 16px 20px 18px;
  border-radius: 20px;
  background: var(--paper);
  border: 1px solid rgba(18, 13, 27, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 1px 2px rgba(18, 13, 27, 0.05), 0 18px 38px -24px rgba(18, 13, 27, 0.32);
  transition: border-color 260ms var(--ease), box-shadow 260ms var(--ease), opacity 260ms var(--ease);
}

#node-sig { grid-area: sig; align-self: start; }
#node-ca { grid-area: ca; }
#node-aa { grid-area: aa; }
#node-cb { grid-area: cb; }
#node-ab { grid-area: ab; }

.node-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 26px;
}

.node-kind {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--lilac-ink);
}

.node-kind::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: currentColor;
}

.node--cond .node-kind::before {
  transform: rotate(45deg);
}

.node--act .node-kind::before {
  border-radius: 50%;
}

.node-agent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--ink-2);
}

.node-agent .avatar {
  width: 22px;
  height: 21px;
}

.node-title {
  margin-top: 8px;
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  word-spacing: 0.03em;
}

.node-sub {
  margin-top: 2px;
  font-size: 0.875rem;
  color: var(--muted);
}

.sig-read {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.sig-value {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.sig-cue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--lilac-ink);
  transition: opacity 300ms var(--ease);
}

.sig-cue svg {
  width: 18px;
  height: 18px;
}

.sig-cue.is-done {
  opacity: 0;
}

.sig-slider {
  position: relative;
  margin-top: 4px;
}

.sig-range {
  --p: 50%;
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 44px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.sig-range:focus {
  outline: none;
}

.sig-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--lilac) 0%, var(--lilac-ink) var(--p), #ebe6f4 var(--p), #ebe6f4 100%);
}

.sig-range::-webkit-slider-thumb {
  width: 26px;
  height: 26px;
  margin-top: -9px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(18, 13, 27, 0.25);
  cursor: grab;
  -webkit-appearance: none;
  appearance: none;
  transition: transform var(--t-fast) var(--ease);
}

.sig-range:active::-webkit-slider-thumb {
  cursor: grabbing;
  transform: scale(1.1);
}

.sig-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(201, 182, 243, 0.7), 0 2px 8px rgba(18, 13, 27, 0.25);
}

.sig-range::-moz-range-track {
  height: 8px;
  border-radius: var(--r-pill);
  background: #ebe6f4;
}

.sig-range::-moz-range-progress {
  height: 8px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--lilac), var(--lilac-ink));
}

.sig-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(18, 13, 27, 0.25);
}

/* Threshold ticks, placed on the thumb's travel so they line up with the value. */
.sig-tick {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 2px;
  height: 16px;
  margin: -8px 0 0 -1px;
  border-radius: 1px;
  left: calc(13px + (100% - 26px) * var(--at));
  background: var(--ink-2);
  opacity: 0.4;
  pointer-events: none;
}

.sig-tick.is-up {
  background: var(--gain-ink);
  opacity: 0.7;
}

.sig-days {
  display: flex;
  gap: 6px;
  margin-top: 14px;
}

.sig-days span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f0edf6;
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--muted);
}

.sig-days span.is-on {
  background: var(--ink);
  color: #ffffff;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: var(--r-pill);
  background: #efecf5;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
  transition: background-color 220ms var(--ease), color 220ms var(--ease);
}

.pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b9b2c7;
  transition: background-color 220ms var(--ease), box-shadow 220ms var(--ease);
}

.pill.is-met {
  background: rgba(16, 185, 129, 0.14);
  color: var(--gain-ink);
  animation: pop 360ms var(--spring);
}

.pill.is-met::before {
  background: var(--gain);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

@keyframes pop {
  0% { transform: scale(0.86); }
  100% { transform: scale(1); }
}

.node-state {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--muted);
}

.node--cond.is-met,
.node--act.is-armed {
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12), 0 18px 38px -24px rgba(10, 125, 71, 0.5);
}

.node--act.is-armed .node-state {
  color: var(--gain-ink);
}

.node--act.is-idle,
.node--cond:not(.is-met) {
  opacity: 0.72;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  padding: 4px 9px;
  border-radius: 8px;
  background: #f2eff8;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ink-2);
}

/* Wires: dashed when idle, glowing emerald with a flowing current when the branch is live. */
.wire-base {
  fill: none;
  stroke: #cdc4dd;
  stroke-width: 2;
  stroke-dasharray: 5 6;
  stroke-linecap: round;
}

.wire-glow,
.wire-core,
.wire-flow {
  fill: none;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 280ms var(--ease);
}

.wire-glow {
  stroke: rgba(16, 185, 129, 0.2);
  stroke-width: 12;
}

.wire-core {
  stroke: var(--gain);
  stroke-width: 3;
}

.wire-flow {
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 1.4;
  stroke-dasharray: 6 20;
  animation: flow 1.5s linear infinite;
}

.wire.is-on .wire-glow,
.wire.is-on .wire-core,
.wire.is-on .wire-flow {
  opacity: 1;
}

.wire.is-on .wire-base {
  opacity: 0;
}

@keyframes flow {
  to { stroke-dashoffset: -52; }
}

.port {
  fill: #ffffff;
  stroke: #cdc4dd;
  stroke-width: 2;
  transition: stroke 280ms var(--ease);
}

.wire.is-on .port {
  stroke: var(--gain);
}

.canvas.is-entering .node {
  animation: node-in 520ms var(--spring) both;
}

.canvas.is-entering #node-ca,
.canvas.is-entering #node-cb {
  animation-delay: 90ms;
}

.canvas.is-entering #node-aa,
.canvas.is-entering #node-ab {
  animation-delay: 180ms;
}

.canvas.is-entering .wires {
  animation: fade-in 520ms var(--ease) 160ms both;
}

@keyframes node-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.canvas.is-building .node > * {
  opacity: 0.18;
}

.canvas.is-building .node::after {
  content: '';
  position: absolute;
  inset: 16px 20px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(240, 237, 246, 0), rgba(220, 208, 250, 0.8), rgba(240, 237, 246, 0));
  background-size: 200% 100%;
  animation: shimmer 1s linear infinite;
}

/* ---------- 4. AGENTS ---------- */

.agents {
  padding: clamp(96px, 13vh, 150px) 0;
  background: var(--porcelain);
  color: var(--ink);
}

.specialists {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
  margin-top: 40px;
  padding: 0;
  list-style: none;
}

.spec {
  display: flex;
  flex-direction: column;
}

.spec-cat {
  --h: 116px;
  position: relative;
  z-index: 2;
  flex: none;
  align-self: flex-start;
  width: auto;
  height: var(--h);
  max-width: calc(100% - 36px);
  object-fit: contain;
  object-position: left bottom;
  margin: 0 0 calc(var(--h) * var(--foot, 0.037) * -1 - 2px) 18px;
}

.spec-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 22px 22px 22px;
  border-radius: 26px;
}

.spec-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.024em;
  word-spacing: 0.04em;
}

.spec-card p {
  margin-top: 6px;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.spec-ui {
  position: relative;
  margin-top: auto;
  padding-top: 20px;
}

.spec-card .spec-tasks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.spec--research .task-pill,
.spec--portfolio .task-pill {
  background: rgba(255, 255, 255, 0.7);
}

.spec--trading .task-pill,
.spec--custom .task-pill {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: var(--rim);
  color: rgba(255, 255, 255, 0.92);
}

.spec--trading .task-pill--trades::before {
  background: #ffffff;
}

.spec--trading .spec-card {
  background: var(--velvet-2);
  color: #ffffff;
  box-shadow: var(--rim), 0 28px 50px -30px rgba(9, 5, 18, 0.7);
}

.spec--trading p,
.spec--custom p {
  color: rgba(255, 255, 255, 0.72);
}

.spec--research .spec-card {
  background: var(--lilac-card);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.spec--portfolio .spec-card {
  background: var(--peach-card);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.spec--custom .spec-card {
  background: var(--plum);
  color: #ffffff;
  box-shadow: var(--rim), 0 28px 50px -30px rgba(43, 27, 77, 0.7);
}

.spec--research p,
.spec--portfolio p {
  color: var(--ink-2);
}

.spec-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--ink);
}

.spec--trading .spec-chip {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--rim);
  color: #ffffff;
}

.spec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gain);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}

.spec-candles {
  display: block;
  width: 100%;
  height: 76px;
  overflow: visible;
}

.cdl-level {
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1.5;
  stroke-dasharray: 3 4;
}

.cdl-up rect,
.cdl-hot rect {
  fill: #34d399;
}

.cdl-up line,
.cdl-hot line {
  stroke: #34d399;
  stroke-width: 1.5;
}

.cdl-dn rect {
  fill: #8f7cc4;
}

.cdl-dn line {
  stroke: #8f7cc4;
  stroke-width: 1.5;
}

.cdl-hot {
  filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.8));
}

.spec-quote {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 8px;
  align-items: start;
  margin: 0;
}

.quote-mark {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 3.25rem;
  line-height: 0.8;
  color: var(--lilac-ink);
}

.spec-card .quote-text p {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.quote-text mark {
  padding: 0 2px;
  background: linear-gradient(transparent 58%, rgba(141, 107, 232, 0.34) 58%);
  color: inherit;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.spec-quote .spec-chip {
  grid-column: 1 / -1;
  justify-self: start;
}

.spec-drift {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.drift-bars {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 72px;
}

.drift-bars i {
  flex: 0 0 26px;
  height: 62%;
  border-radius: 6px 6px 2px 2px;
  background: var(--ink);
}

.reveal.is-visible .drift-bars i {
  animation: drift-settle 1100ms var(--spring) 520ms both;
}

.reveal.is-visible .drift-bars i:nth-child(2) { animation-delay: 600ms; }
.reveal.is-visible .drift-bars i:nth-child(3) { animation-delay: 680ms; }
.reveal.is-visible .drift-bars i:nth-child(4) { animation-delay: 760ms; }

@keyframes drift-settle {
  from { height: calc(var(--from) * 100%); }
}

.drift-bars i:nth-child(even) {
  background: var(--lilac-ink);
}

.drift-bars b {
  position: absolute;
  left: -8px;
  right: -8px;
  bottom: 62%;
  border-top: 1.5px dashed rgba(18, 13, 27, 0.45);
}

.spec-odds {
  display: grid;
  gap: 14px;
  margin-top: auto;
  padding: 20px 0 0;
  list-style: none;
}

.spec-odds li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 6px 10px;
}

.spec-odds span {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
}

.spec-odds b {
  font-size: 0.9375rem;
  font-weight: 800;
}

.spec-odds i {
  grid-column: 1 / -1;
  position: relative;
  height: 6px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.14);
}

.spec-odds i::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--p);
  border-radius: inherit;
  background: var(--lilac);
}

/* ---------- 5. CONTROL ---------- */

.control {
  position: relative;
  isolation: isolate;
  padding: clamp(96px, 13vh, 150px) 0;
  background: var(--velvet);
  color: #ffffff;
}

.control::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 46% 60% at 28% 58%, rgba(124, 92, 214, 0.26), transparent 70%);
  pointer-events: none;
}

.control::after {
  z-index: -1;
}

.control h2 {
  font-size: clamp(2.6rem, 5.2vw, 4.6rem);
  line-height: 0.98;
}

.control h2 .serif {
  color: var(--lilac);
}

.control-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.control-demo {
  order: -1;
  width: min(100%, 470px);
  justify-self: center;
}

.perch--control {
  justify-content: flex-start;
  min-height: 150px;
  margin-bottom: -6px;
}

.perch--control img {
  height: 150px;
  transition: opacity 220ms var(--ease), transform 420ms var(--spring);
}

/* The sleeping pose is wide and low; this height keeps its head the same size as the sitting pose. */
.perch--control img.is-lounging {
  height: 108px;
}

.perch--control img.is-swapping {
  opacity: 0;
  transform: translateY(6px);
}

.control-card {
  position: relative;
  z-index: 1;
  padding: 22px 24px 24px;
  border-radius: var(--r-lg);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-card-dark);
}

.cc-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.cc-name {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.cc-name strong {
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.cc-sub {
  font-size: 0.8125rem;
  font-weight: 800;
}

#cc-status {
  color: var(--gain-ink);
  transition: color var(--t-fast) var(--ease);
}

.cc-tasks {
  color: var(--muted);
}

.switch {
  position: relative;
  flex: none;
  width: 60px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  cursor: pointer;
}

.switch::before {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  top: 8px;
  bottom: 8px;
  border-radius: var(--r-pill);
  background: var(--gain);
  transition: background-color 220ms var(--ease);
}

.switch-knob {
  position: absolute;
  top: 11px;
  left: 31px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(18, 13, 27, 0.25);
  transition: transform 300ms var(--spring);
}

.switch[aria-checked="false"]::before {
  background: #d3cfdc;
}

.switch[aria-checked="false"] .switch-knob {
  transform: translateX(-24px);
}

.cc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 4px;
  font-size: 0.9375rem;
}

.cc-row > span,
.cc-row > label {
  font-weight: 600;
  color: var(--muted);
}

.cc-row output {
  font-weight: 800;
}

/* The budget: spent is fixed, the cap is yours to drag. */
.cap {
  position: relative;
  height: 44px;
}

.cap-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 8px;
  margin-top: -4px;
  border-radius: var(--r-pill);
  background: #ece8f5;
}

.cap-room,
.cap-spent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: var(--r-pill);
}

.cap-room {
  width: var(--cap, 50%);
  background: #dcd0fa;
  transition: opacity var(--t-med) var(--ease);
}

.cap-spent {
  width: 18%;
  background: linear-gradient(90deg, var(--lilac), var(--lilac-ink));
  transition: opacity var(--t-med) var(--ease);
}

.cap-range {
  position: absolute;
  top: 0;
  left: calc(30% - 14px);
  width: calc(70% + 28px);
  height: 44px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.cap-range:focus {
  outline: none;
}

.cap-range::-webkit-slider-runnable-track {
  height: 44px;
  background: transparent;
}

.cap-range::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  margin-top: 8px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(18, 13, 27, 0.25);
  cursor: grab;
  -webkit-appearance: none;
  appearance: none;
}

.cap-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(201, 182, 243, 0.7), 0 2px 8px rgba(18, 13, 27, 0.25);
}

.cap-range::-moz-range-track {
  height: 44px;
  background: transparent;
}

.cap-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #ffffff;
}

.cap-range:disabled {
  cursor: default;
}

.cc-row--moves {
  margin-top: 14px;
  padding-top: 16px;
  padding-bottom: 0;
  border-top: 1px solid var(--line);
}

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--r-pill);
  background: #f0edf6;
  transition: opacity var(--t-med) var(--ease);
}

.seg-opt {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.seg-opt[aria-checked="true"] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(18, 13, 27, 0.16);
}

.control-card.is-off #cc-status {
  color: var(--muted);
}

.control-card.is-off .cap-room,
.control-card.is-off .cap-spent,
.control-card.is-off .cap-range {
  opacity: 0.35;
}

.control-card.is-off .seg {
  opacity: 0.45;
  pointer-events: none;
}

.facts {
  list-style: none;
  margin-top: 36px;
  padding: 0;
  border-top: 1px solid var(--line-dark);
}

.facts li {
  padding: 19px 0;
  border-bottom: 1px solid var(--line-dark);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}

.facts strong {
  font-weight: 800;
  color: #ffffff;
}

/* ---------- 6. FAQ ---------- */

.faq {
  padding: clamp(84px, 11vh, 128px) 0;
  background: var(--porcelain);
  color: var(--ink);
}

.faq-wrap {
  max-width: calc(780px + var(--gutter) * 2);
}

.faq-title {
  margin-bottom: 26px;
  font-size: clamp(2.25rem, 4.2vw, 3.5rem);
  line-height: 1;
}

.faq-list {
  border-top: 1px solid var(--line-strong);
}

.faq-item {
  border-bottom: 1px solid var(--line-strong);
}

.faq-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 66px;
  padding: 16px 2px;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.012em;
  color: var(--ink);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease);
}

.faq-trigger:hover {
  color: var(--lilac-ink);
}

.faq-plus {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
}

.faq-plus::before,
.faq-plus::after {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  top: 10px;
  height: 2px;
  border-radius: 2px;
  background: var(--lilac-ink);
  transition: transform 280ms var(--ease);
}

.faq-plus::after {
  transform: rotate(90deg);
}

.faq-trigger[aria-expanded="true"] .faq-plus::after {
  transform: rotate(0deg);
}

.faq-panel {
  padding: 0 2px 20px;
}

.faq-panel[hidden] {
  display: none;
}

.faq-panel p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
}

.faq-link {
  display: flex;
  align-items: center;
  width: fit-content;
  min-height: 44px;
  font-weight: 800;
  color: var(--lilac-ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

/* ---------- 7. FINALE ---------- */

.finale {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(112px, 15vh, 168px) 0 26px;
  background: var(--velvet);
  color: #ffffff;
  text-align: center;
}

.finale-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.finale-backdrop-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 80%;
}

.finale-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--velvet) 0%, rgba(9, 5, 18, 0.62) 32%, rgba(9, 5, 18, 0.28) 62%, rgba(9, 5, 18, 0.72) 88%, rgba(9, 5, 18, 0.92) 100%);
}

.finale-inner {
  display: flex;
  flex-direction: column;
}

.finale h2 {
  font-size: clamp(3rem, 7.4vw, 6.5rem);
  line-height: 0.95;
}

.finale h2 .serif {
  color: var(--lilac);
}

.finale .waitlist-form {
  margin-top: 40px;
}

.crew-line {
  --crew-h: clamp(64px, 9.5vw, 138px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(6px, 2vw, 28px);
  margin-top: auto;
  padding: clamp(64px, 10vh, 104px) 8px 0;
}

.crew-cat {
  --h: var(--crew-h);
  flex: none;
  align-self: flex-end;
  width: auto;
  height: var(--h);
  max-width: none;
  margin-bottom: calc(var(--h) * var(--foot, 0.036) * -1 - 1px);
}

.crew-cat--lead {
  --h: calc(var(--crew-h) * 1.2);
}

html.has-reveal .crew-line .crew-cat {
  opacity: 0;
  transform: translateY(22px);
}

html.has-reveal .crew-line.is-in .crew-cat {
  animation: rise 760ms var(--spring) both;
  animation-delay: calc(var(--i) * 85ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.site-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px 64px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  text-align: left;
}

.footer-brand {
  display: grid;
  gap: 12px;
  max-width: 50ch;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.footer-wordmark {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.footer-cols {
  display: flex;
  gap: clamp(48px, 7vw, 96px);
}

.footer-col-title {
  margin-bottom: 4px;
  font-size: 0.8125rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.6);
}

.footer-col ul {
  padding: 0;
  list-style: none;
}

.footer-col a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.84);
  transition: color var(--t-fast) var(--ease);
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-disclosure,
.footer-copy {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.64);
}

/* ---------- LEGAL PAGES (privacy.html, terms.html) ---------- */

.legal-page,
.legal-page body {
  background: var(--porcelain);
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(18, 13, 27, 0.06);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  backdrop-filter: saturate(140%) blur(16px);
}

.legal-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  font-weight: 800;
  white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease);
}

.legal-back:hover {
  background: rgba(18, 13, 27, 0.06);
}

.legal {
  padding: clamp(56px, 9vh, 96px) 0 clamp(64px, 10vh, 112px);
  color: var(--ink);
}

.legal-wrap {
  max-width: calc(720px + var(--gutter) * 2);
}

.legal h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.4rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.042em;
  word-spacing: 0.05em;
}

.legal h1 .serif {
  color: var(--lilac-ink);
}

.legal-updated {
  margin-top: 24px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.legal-lede {
  margin-top: 28px;
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  line-height: 1.6;
  color: var(--ink-2);
}

.legal section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line-strong);
}

.legal h2 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.legal section p,
.legal section li {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
}

.legal section p {
  margin-top: 10px;
}

.legal section ul {
  margin-top: 10px;
  padding-left: 1.2em;
}

.legal section li + li {
  margin-top: 6px;
}

.legal strong {
  color: var(--ink);
}

.legal-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 20px 0 32px;
  border-top: 1px solid var(--line-strong);
  font-size: 0.875rem;
  color: var(--muted);
}

.legal-foot nav {
  display: flex;
  gap: 4px;
}

.legal-foot a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  font-weight: 700;
  color: var(--ink);
}

.legal-foot a:hover,
.legal-foot a[aria-current="page"] {
  color: var(--lilac-ink);
}

/* ---------- SCROLL REVEAL ---------- */

.reveal {
  transition: opacity 640ms var(--ease), transform 640ms var(--ease);
}

html.has-reveal .reveal {
  opacity: 0;
  transform: translateY(22px);
}

html.has-reveal .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

html.has-reveal .specialists .reveal:nth-child(2) { transition-delay: 70ms; }
html.has-reveal .specialists .reveal:nth-child(3) { transition-delay: 140ms; }
html.has-reveal .specialists .reveal:nth-child(4) { transition-delay: 210ms; }

/* ---------- RESPONSIVE ---------- */

@media (max-width: 1080px) {
  .header-nav {
    display: none;
  }

  .specialists {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 26px;
  }
}

@media (max-width: 980px) {
  .split,
  .control-inner {
    grid-template-columns: 1fr;
  }

  .split-demo,
  .control-demo {
    order: 0;
    width: min(100%, 560px);
    justify-self: center;
  }

  .stage {
    --cast-h: 100px;
    --cast-lead-h: 122px;
  }
}

/* The canvas turns into one connected column: a rail runs down the left, each branch taps off it. */
@media (max-width: 900px) {
  .canvas {
    --row-gap: 20px;
    --cat-h: 104px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "bar" "cat" "sig" "ca" "aa" "cb" "ab";
    margin-top: 36px;
    padding: 18px 16px 24px;
    border-radius: 26px;
  }

  .canvas.is-single {
    grid-template-areas: "bar" "cat" "sig" "ca" "aa";
  }

  .canvas-bar {
    margin-bottom: 10px;
  }

  .canvas-task {
    min-height: 0;
  }

  .node--cond,
  .node--act {
    margin-left: 38px;
  }

  #node-cb {
    margin-top: 12px;
  }

  #node-sig {
    align-self: stretch;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: 62px;
  }

  .header-cta {
    min-height: 44px;
    padding: 0 15px;
  }

  .hero {
    padding: 84px 0 28px;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 9.3vw, 2.6rem);
  }

  .hero-sub {
    margin-top: 12px;
  }

  .waitlist-form {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
  }

  .waitlist-form:focus-within {
    box-shadow: none;
  }

  .waitlist-input {
    min-height: 50px;
    padding: 0 20px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--rim);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  .waitlist-input:focus {
    border-color: var(--lilac);
    box-shadow: var(--rim), 0 0 0 3px rgba(201, 182, 243, 0.26);
  }

  .btn-primary {
    min-height: 50px;
  }

  /* Bigger crew on phones: they huddle, and the active cat steps forward. */
  .stage {
    --cast-h: min(76px, calc((100vw - 40px) / 5.1));
    --cast-lead-h: calc(var(--cast-h) * 1.08);
    margin-top: 30px;
  }

  .cast {
    gap: 0;
    padding: 0 2px;
  }

  .cast-cat {
    margin-left: calc(var(--h) * -0.085);
    margin-right: calc(var(--h) * -0.085);
  }

  .cast-cat.is-active {
    scale: 1.14;
  }

  .cast-tag {
    display: none;
  }

  /* Stacked: text pinned to the top, the action pinned to the bottom, so it never moves under a thumb. */
  .note {
    grid-template-columns: 1fr;
    align-content: space-between;
    gap: 14px;
    min-height: 0;
    padding: 18px;
    border-radius: 22px;
  }

  .note-back {
    border-radius: 22px;
  }

  .note-title {
    margin-top: 8px;
  }

  .note-side {
    justify-content: space-between;
    gap: 14px;
  }

  .note-vis {
    width: 120px;
    height: 48px;
  }

  .crew-tabs {
    width: 100%;
    justify-content: space-between;
    margin-top: 24px;
  }

  .crew-tab {
    padding: 0 8px;
    font-size: 0.8125rem;
  }

  .crew-tab::after {
    left: 8px;
    right: 8px;
  }

  .baskets h2,
  .agents h2 {
    font-size: clamp(2.1rem, 10vw, 2.8rem);
  }

  .control h2 {
    font-size: clamp(2.2rem, 10.5vw, 2.9rem);
  }

  .workflows h2 {
    font-size: clamp(2.9rem, 15vw, 3.8rem);
  }

  .belief {
    margin-top: 26px;
  }

  .field {
    padding: 0 18px;
  }

  .field-input {
    --row: 58px;
    font-size: 1rem;
  }

  /* Two by two, so no chip is left alone on a row. */
  .chips,
  .scenarios {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chip,
  .scenario {
    min-height: 44px;
    padding: 0 10px;
  }

  .perch {
    padding: 0 24px;
  }

  .perch--basket img {
    height: 118px;
    margin-bottom: calc(118px * -0.035 - 2px);
  }

  .basket-card {
    min-height: 0;
    padding: 18px 18px 20px;
  }

  .bc-rows li {
    grid-template-columns: 10px 50px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .ask {
    gap: 8px;
    padding: 6px 6px 6px 12px;
  }

  .ask .avatar {
    width: 26px;
    height: 24px;
    margin-bottom: 10px;
  }

  .ask-input {
    font-size: 1rem;
  }

  .sig-value {
    font-size: 2.25rem;
  }

  .specialists {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .spec-card {
    min-height: 0;
  }

  .spec-cat {
    --h: 100px;
  }

  .perch--control {
    min-height: 120px;
  }

  .perch--control img {
    height: 120px;
  }

  .perch--control img.is-lounging {
    height: 86px;
  }

  .control-card {
    padding: 18px 18px 20px;
  }

  .cc-row--moves {
    flex-direction: column;
    align-items: stretch;
  }

  .seg {
    display: flex;
  }

  .seg-opt {
    flex: 1 1 0;
    min-height: 44px;
  }

  .facts li {
    padding: 16px 0;
    font-size: 1rem;
  }

  .faq-trigger {
    font-size: 1.0625rem;
  }

  .finale {
    min-height: 0;
    padding-top: 96px;
  }

  .finale h2 {
    font-size: clamp(2.25rem, 12.4vw, 3rem);
  }

  /* All five on one floor line down to 320px: the transparent pose margins tuck in. */
  .crew-line {
    --crew-h: min(80px, calc((100vw - 64px) / 4.6));
    gap: 4px;
    margin-top: 0;
    padding: 72px 0 0;
  }

  .crew-cat {
    margin-inline: calc(var(--h) * -0.03);
  }

  /* Phones: lockup, links, then the fine print. */
  .site-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .footer-brand {
    display: contents;
  }

  .footer-cols {
    order: 1;
    gap: 56px;
  }

  .footer-disclosure,
  .footer-copy {
    order: 2;
  }
}

@media (max-width: 360px) {
  .note-vis {
    width: 96px;
  }

  .crew-tab {
    padding: 0 5px;
    font-size: 0.71875rem;
  }

  .crew-tab::after {
    left: 5px;
    right: 5px;
  }

  .chip,
  .scenario {
    padding: 0 6px;
    font-size: 0.8125rem;
  }

  .field {
    padding: 0 14px;
  }

  .canvas {
    padding: 16px 12px 22px;
  }

  .node {
    padding: 14px 16px 16px;
  }

  .node--cond,
  .node--act {
    margin-left: 32px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }

  .wire-flow {
    display: none;
  }

  html.has-reveal .reveal,
  html.has-reveal .crew-line .crew-cat {
    opacity: 1 !important;
    transform: none !important;
  }
}
