/* ============================================================
   COMMONS — Marketing site ("Big Board" direction)
   Tokens derived from the Commons design system foundations.
   Light + dark themes; WCAG 2.2 AA contrast throughout.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  /* Brand */
  --navy:   #0D1B2A;
  --indigo: #1F3A78;
  --teal:   #0FA296;
  --blue:   #4F7BFF;
  --violet: #6B5BDB;
  --coral:  #FF7A59;
  --amber:  #F6C452;

  /* Surfaces + text */
  --bg-app:      #F2F4F7;
  --bg-surface:  #FFFFFF;
  --bg-sunken:   #F7F9FB;
  --bg-inset:    #F2F4F7;
  --bg-inverse:  #0D1B2A;

  --fg-1:     #0D1B2A;
  --fg-2:     #42505F;
  --fg-muted: #5B6675;   /* smallest text — 5.9:1 on white */
  --fg-on-dark:      #FFFFFF;
  --fg-on-dark-soft: #C7D2E0;
  --fg-on-dark-mute: #9FB0C4;

  --border:        #E4E8EE;
  --border-soft:   #EEF1F4;
  --border-strong: #D8DEE7;
  --divider:       #C9D3DF;

  /* Accent text — all ≥4.5:1 on their tinted backgrounds */
  --teal-text:   #0A7A70;
  --coral-text:  #B23D1B;
  --violet-text: #5B45C8;
  --amber-text:  #8A5110;
  --blue-text:   #2A46A8;

  /* Tinted chips / wells */
  --teal-soft:   #DDF3F0;
  --coral-soft:  #FFE7DE;
  --violet-soft: #EDEAFF;
  --amber-soft:  #FFF0DC;
  --blue-soft:   #E3EAFF;

  --amber-well:  #FFFBF2;
  --teal-well:   #F0FBF9;
  --blue-well:   #F5F7FE;
  --amber-line:  #F2D9AC;
  --teal-line:   #B5E2DC;
  --blue-line:   #C9D6FF;
  --amber-line-soft: #EEE3C8;
  --teal-line-soft:  #CBE9E4;
  --blue-line-soft:  #D5DEF7;

  --link:       #2C53D8;
  --link-hover: #1F3A78;

  /* Badge fills — deep enough for 4.5:1 white text in both themes */
  --badge-blue:  #3D63E0;
  --badge-coral: #C0431F;
  --badge-teal:  #0A7A70;
  --badge-amber: #8A5110;

  --grad-primary: linear-gradient(120deg, #4F7BFF, #1F3A78);
  --grad-band-glow: radial-gradient(90% 120% at 100% 0, rgba(107,91,219,.4), transparent 55%),
                    radial-gradient(80% 120% at 0 100%, rgba(255,122,89,.28), transparent 50%);

  --shadow-card: 0 12px 34px rgba(13,27,42,.07);
  --shadow-step: 0 8px 24px rgba(13,27,42,.07);
  --shadow-btn:  0 12px 28px rgba(31,58,120,.28);
  --shadow-toggle: 0 4px 14px rgba(13,27,42,.08);

  --focus-ring: #2C53D8;

  --font-sans: 'Satoshi', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;

  --ease: cubic-bezier(.22,.61,.36,1);
  --measure: 1200px;
}

/* Dark tokens — the pre-paint script in index.html always stamps data-theme
   (saved preference or system preference), so this single block covers both.
   Without JS the site renders light. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-app:      #0B1724;
  --bg-surface:  #152539;
  --bg-sunken:   #101E30;
  --bg-inset:    #1D2F46;
  --bg-inverse:  #060E18;

  --fg-1:     #E8EDF4;
  --fg-2:     #B4C0D0;
  --fg-muted: #A7B4C6;
  --fg-on-dark:      #FFFFFF;
  --fg-on-dark-soft: #C7D2E0;
  --fg-on-dark-mute: #9FB0C4;

  --border:        #2A3B52;
  --border-soft:   #24344A;
  --border-strong: #354862;
  --divider:       #3A4E69;

  --teal-text:   #5EEAD4;
  --coral-text:  #FFB39E;
  --violet-text: #BFB0FF;
  --amber-text:  #F6C452;
  --blue-text:   #A9BDFF;

  --teal-soft:   rgba(15,162,150,.2);
  --coral-soft:  rgba(255,122,89,.2);
  --violet-soft: rgba(107,91,219,.28);
  --amber-soft:  rgba(246,196,82,.18);
  --blue-soft:   rgba(79,123,255,.24);

  --amber-well:  rgba(246,196,82,.08);
  --teal-well:   rgba(15,162,150,.09);
  --blue-well:   rgba(79,123,255,.1);
  --amber-line:  rgba(246,196,82,.32);
  --teal-line:   rgba(94,234,212,.28);
  --blue-line:   rgba(143,166,255,.34);
  --amber-line-soft: rgba(246,196,82,.22);
  --teal-line-soft:  rgba(94,234,212,.18);
  --blue-line-soft:  rgba(143,166,255,.22);

  --link:       #A9BDFF;
  --link-hover: #CBD7FF;

  --shadow-card: 0 12px 34px rgba(0,0,0,.35);
  --shadow-step: 0 8px 24px rgba(0,0,0,.3);
  --shadow-btn:  0 12px 28px rgba(0,0,0,.4);
  --shadow-toggle: 0 4px 14px rgba(0,0,0,.35);

  --focus-ring: #8FA6FF;
}

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

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

body {
  margin: 0;
  background: var(--bg-app);
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { letter-spacing: -.025em; margin: 0; color: var(--fg-1); }
p { margin: 0; }

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

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

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

.mono { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }

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

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 12px; top: 12px;
  z-index: 99;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: none; color: #fff; }

/* ---------- Header / brand ---------- */
.site-header {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 64px 32px 0;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
a.brand-lockup { color: inherit; }
.brand-mark { height: 44px; width: auto; display: block; }
.brand-wordmark { height: 28px; width: auto; display: block; }
.brand-divider { width: 1.5px; height: 32px; background: var(--divider); }
.brand-tagline {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg-2);
  letter-spacing: .02em;
}

.wordmark-dark { display: none; }
:root[data-theme="dark"] .wordmark-light { display: none; }
:root[data-theme="dark"] .wordmark-dark { display: block; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  position: fixed;
  top: 18px; right: 22px;
  z-index: 60;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-2);
  box-shadow: var(--shadow-toggle);
  transition: transform .18s var(--ease);
}
.theme-toggle:hover { transform: translateY(-1px); }

.icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }

/* ---------- Shared section chrome ---------- */
main > section {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 30px 32px;
}

.section-connector {
  width: 2px; height: 64px;
  margin-left: 17px;
}
.connector-1 { background: linear-gradient(180deg, var(--blue), var(--violet)); }
.connector-2 { background: linear-gradient(180deg, var(--violet), var(--coral)); }
.connector-3 { background: linear-gradient(180deg, var(--coral), var(--amber)); }
.connector-4 { background: linear-gradient(180deg, var(--amber), var(--teal)); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 10px 0 12px;
}
.eyebrow-dot { width: 9px; height: 9px; border-radius: 50%; margin-left: 13px; flex: none; }
.eyebrow-violet { color: var(--violet-text); }
.eyebrow-coral  { color: var(--coral-text); }
.eyebrow-amber  { color: var(--amber-text); }
.eyebrow-teal   { color: var(--teal-text); }

.dot-violet { background: var(--violet); }
.dot-coral  { background: var(--coral); }
.dot-amber  { background: var(--amber); }
.dot-teal   { background: var(--teal); }

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 30px;
  box-shadow: var(--shadow-card);
}
.card-footnote { margin-top: 16px; font-size: .8125rem; color: var(--fg-muted); }
.card-footnote.centered { text-align: center; margin-top: 24px; }

/* ---------- Hero ---------- */
.hero { padding: 40px 32px; }
.hero h1 {
  font-size: clamp(2.375rem, 4.6vw, 3.625rem);
  line-height: 1.28;
  font-weight: 900;
  max-width: 980px;
}
.pill {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 900;
  padding: 8px 22px;
  border-radius: var(--r-pill);
}
.pill-teal   { background: var(--teal-soft);   color: var(--teal-text); }
.pill-coral  { background: var(--coral-soft);  color: var(--coral-text); }
.pill-violet { background: var(--violet-soft); color: var(--violet-text); }

.hero-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.hero-note { font-size: 1rem; color: var(--fg-2); max-width: 420px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--r-pill);
  transition: transform .18s var(--ease), filter .18s var(--ease);
}
.btn-primary {
  padding: 15px 28px;
  color: #fff;
  background: var(--grad-primary);
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-2px); color: #fff; }
.btn-light {
  padding: 15px 30px;
  color: var(--navy);
  background: #fff;
}
.btn-light:hover { transform: translateY(-2px); color: var(--navy); }
.demo-arrow { display: inline-block; transition: transform .22s var(--ease); }
.btn-light:hover .demo-arrow { transform: translateY(4px); }

.btn-chip {
  font-family: inherit;
  border: none;
  cursor: pointer;
  display: inline-flex;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  color: var(--fg-2);
  background: var(--bg-inset);
  white-space: nowrap;
  transition: background .16s var(--ease);
}
.btn-chip:hover { background: var(--border); }

/* ---------- 01 · Board ---------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.section-head h2 { font-size: clamp(1.625rem, 3.4vw, 2.375rem); font-weight: 900; }
.section-aside { font-size: .875rem; color: var(--fg-2); max-width: 320px; line-height: 1.5; }

.pulse-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.stat-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; }
.stat-number { font-size: 2.5rem; font-weight: 900; line-height: 1; color: var(--fg-1); }
.stat-teal  { color: var(--teal-text); }
.stat-coral { color: var(--coral-text); }
.stat-label { font-size: .8125rem; color: var(--fg-muted); margin-top: 2px; }
.pulse-aside {
  text-align: right;
  font-size: .8125rem;
  color: var(--fg-muted);
  max-width: 240px;
  line-height: 1.5;
}

.queue-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.queue-row {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
}
.queue-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.queue-text { flex: 1; font-size: .90625rem; }

.status-card { margin-top: 22px; }
.status-title { font-size: 1rem; font-weight: 900; margin-bottom: 20px; letter-spacing: -.01em; }
.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.status-col {
  position: relative;
  border-radius: var(--r-md);
  padding: 16px;
  border: 1px solid;
  display: flex;
  flex-direction: column;
}
.col-amber { background: var(--amber-well); border-color: var(--amber-line); }
.col-teal  { background: var(--teal-well);  border-color: var(--teal-line); }
.col-blue  { background: var(--blue-well);  border-color: var(--blue-line); }

.status-col-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.status-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1875rem;
  color: #fff;
  flex: none;
}
.status-num-amber { background: var(--badge-amber); }
.status-num-teal  { background: var(--badge-teal); }
.status-num-blue  { background: var(--badge-blue); }

.col-label {
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.label-amber { color: var(--amber-text); }
.label-teal  { color: var(--teal-text); }
.label-blue  { color: var(--blue-text); }

.col-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-rows: repeat(3, 1fr); /* max card count — keeps cards equal across all columns */
  gap: 8px;
  flex: 1;
}
.mini-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.col-amber .mini-card { border-color: var(--amber-line-soft); }
.col-teal  .mini-card { border-color: var(--teal-line-soft); }
.col-blue  .mini-card { border-color: var(--blue-line-soft); }
.mini-title { font-size: .875rem; font-weight: 900; }
.mini-meta { font-size: .75rem; color: var(--fg-muted); margin-top: 2px; }
.mini-progress { font-size: .71875rem; color: var(--amber-text); margin-top: 8px; }

/* ---------- 02 · Anatomy ---------- */
.anatomy-card { padding: 44px; text-align: center; }
.anatomy-card h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); font-weight: 900; }
.anatomy-lead {
  font-size: .96875rem;
  color: var(--fg-2);
  margin: 8px auto 30px;
  max-width: 520px;
  line-height: 1.5;
}
.anatomy-root {
  display: inline-block;
  background: var(--bg-inverse);
  color: var(--fg-on-dark);
  border-radius: var(--r-md);
  padding: 16px 28px;
}
.anatomy-event-title { font-size: 1rem; font-weight: 900; }
.anatomy-event-meta { font-size: .75rem; color: var(--fg-on-dark-mute); margin-top: 2px; }
.anatomy-stem { width: 2px; height: 26px; background: var(--blue-line); margin: 0 auto; }
.anatomy-rail {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue-line) 12%, var(--blue-line) 88%, transparent);
  max-width: 820px;
  margin: 0 auto;
}
.anatomy-pieces {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 16px;
  max-width: 920px;
  flex-wrap: wrap;
}
.piece { flex: 1 1 140px; max-width: 172px; min-width: 140px; }
.piece-stem { display: block; width: 2px; height: 22px; background: var(--blue-line); margin: 0 auto; }
.piece-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 12px;
  background: var(--bg-sunken);
  height: calc(100% - 22px);
}
.piece-name { font-size: .875rem; font-weight: 900; }
.name-blue   { color: var(--blue-text); }
.name-teal   { color: var(--teal-text); }
.name-coral  { color: var(--coral-text); }
.name-amber  { color: var(--amber-text); }
.name-violet { color: var(--violet-text); }
.piece-detail { font-size: .75rem; color: var(--fg-muted); margin-top: 3px; line-height: 1.4; }

/* ---------- 03 · How ---------- */
.how-title {
  font-size: clamp(1.625rem, 3.4vw, 2.5rem);
  font-weight: 900;
  max-width: 680px;
  margin-bottom: 34px;
}
.steps-wrap { position: relative; }
.steps-rail {
  position: absolute;
  left: 16%; right: 16%; top: 78px;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--violet) 50%, var(--coral));
  border-radius: 3px;
  opacity: .5;
}
.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.step { position: relative; }
.step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.step-num {
  width: 34px; height: 34px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: .9375rem;
  flex: none;
}
.num-blue   { background: var(--badge-blue); color: #fff; }
.num-violet { background: var(--violet); color: #fff; }
.num-coral  { background: var(--badge-coral); color: #fff; }
.step-title { font-size: 1.1875rem; font-weight: 900; letter-spacing: -.02em; }
.step-tag {
  margin-left: auto;
  font-size: .6875rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.tag-blue   { background: var(--blue-soft);   color: var(--blue-text); }
.tag-violet { background: var(--violet-soft); color: var(--violet-text); }
.tag-teal   { background: var(--teal-soft);   color: var(--teal-text); }

.step-demo {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 15px;
  box-shadow: var(--shadow-step);
  min-height: 132px;
}
.step-copy { font-size: .90625rem; color: var(--fg-2); line-height: 1.55; margin-top: 14px; }

.demo-search {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--fg-muted);
  font-size: .8125rem;
}
.demo-result {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-inset);
}
.demo-swatch { width: 28px; height: 28px; border-radius: 8px; background: var(--teal-soft); flex: none; }
.demo-room { flex: 1; font-size: .8125rem; font-weight: 700; }
.demo-open {
  font-size: .6875rem;
  font-weight: 900;
  color: var(--teal-text);
  background: var(--teal-soft);
  padding: 3px 8px;
  border-radius: var(--r-pill);
}

.demo-note { font-size: .75rem; color: var(--fg-muted); margin-bottom: 10px; }
.demo-approver {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-inset);
  margin-bottom: 9px;
}
.demo-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .6875rem;
  font-weight: 900;
  flex: none;
}
.demo-name { flex: 1; font-size: .8125rem; font-weight: 700; }
.demo-switch {
  width: 40px; height: 23px;
  border-radius: var(--r-pill);
  background: var(--teal);
  position: relative;
  flex: none;
}
.demo-knob {
  position: absolute;
  top: 3px; right: 3px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: #fff;
}
.demo-approved {
  font-size: .6875rem;
  font-weight: 900;
  color: var(--teal-text);
  background: var(--teal-soft);
  display: inline-block;
  padding: 4px 9px;
  border-radius: var(--r-pill);
}

.demo-live {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .6875rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--teal-text);
  margin-bottom: 10px;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.demo-slot { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.slot-divided { border-top: 1px solid var(--border-soft); }
.slot-time { font-size: .75rem; font-weight: 700; width: 44px; }
.time-blue  { color: var(--blue-text); }
.time-coral { color: var(--coral-text); }
.slot-name { font-size: .8125rem; font-weight: 700; }

/* ---------- 04 · Both sides ---------- */
.sides-title { font-size: clamp(1.625rem, 3.4vw, 2.5rem); font-weight: 900; margin-bottom: 28px; }
.sides-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.side-card { padding: 28px; box-shadow: var(--shadow-step); }
.side-label {
  font-size: .8125rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.label-blue-strong { color: var(--blue-text); }
.label-teal-strong { color: var(--teal-text); }

.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  margin-bottom: 18px;
}
.chat-bubble { padding: 10px 16px; font-size: .875rem; }
.bubble-them {
  align-self: flex-start;
  background: var(--bg-inset);
  border-radius: 14px 14px 14px 4px;
}
.bubble-commons {
  align-self: flex-end;
  background: var(--blue-soft);
  color: var(--blue-text);
  border-radius: 14px 14px 4px 14px;
  font-weight: 700;
}
.side-copy { font-size: .90625rem; color: var(--fg-2); line-height: 1.55; }

.quiet-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-sunken);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-bottom: 18px;
  max-width: 380px;
}
.quiet-number { font-size: 1.875rem; font-weight: 900; color: var(--fg-1); line-height: 1; }
.quiet-copy { font-size: .84375rem; color: var(--fg-2); line-height: 1.4; }

/* ---------- Early access band ---------- */
.access-section { padding-top: 44px; }
.access-band {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  border-radius: var(--r-xl);
  padding: 52px 46px;
  color: var(--fg-on-dark);
}
:root[data-theme="dark"] .access-band { background: #0A1622; border: 1px solid var(--border); }
.access-glow { position: absolute; inset: 0; background: var(--grad-band-glow); }
.access-content { position: relative; max-width: 600px; }
.access-eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: #A9BDFF;
  margin-bottom: 14px;
}
.access-band h2 {
  font-size: clamp(1.625rem, 3.4vw, 2.5rem);
  font-weight: 900;
  line-height: 1.16;
  color: var(--fg-on-dark);
}
.access-copy {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--fg-on-dark-soft);
  margin: 16px 0 28px;
}

/* ---------- Demo / contact ---------- */
.demo-section { padding-top: 60px; }
.demo-card { padding: 48px 44px; }
.demo-card h2 {
  font-size: clamp(1.625rem, 3.4vw, 2.25rem);
  font-weight: 900;
  text-align: center;
}
.demo-lead {
  font-size: .96875rem;
  color: var(--fg-2);
  text-align: center;
  margin: 10px auto 36px;
  max-width: 440px;
  line-height: 1.5;
}
.route-wrap { position: relative; max-width: 880px; margin: 0 auto; }
.route-rail {
  position: absolute;
  left: 20%; right: 14%; top: 24px;
  height: 2.5px;
  background: linear-gradient(90deg, var(--blue), var(--violet), var(--teal));
  border-radius: 3px;
  opacity: .5;
}
.route-steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0;
}
.route-step { position: relative; padding-right: 28px; }
.route-step:last-child { padding-right: 0; }
.route-num {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: .875rem;
  margin-bottom: 14px;
}
.route-filled { background: var(--badge-blue); color: #fff; border: 4px solid var(--bg-surface); }
.route-violet { background: var(--bg-surface); border: 3px solid var(--violet); color: var(--violet-text); }
.route-teal   { background: var(--bg-surface); border: 3px solid var(--teal);   color: var(--teal-text); }
.route-title { font-size: .90625rem; font-weight: 900; margin-bottom: 10px; letter-spacing: -.01em; }
.route-copy { font-size: .8125rem; color: var(--fg-muted); line-height: 1.5; }

/* ---------- Route animation (after a demo request sends) ---------- */
.route-check { display: none; }
.route-step.is-done .route-digit { display: none; }
.route-step.is-done .route-check { display: block; }
.route-step.is-done .route-num {
  background: var(--teal);
  color: #fff;
  transition: background .3s var(--ease);
}
.route-step.is-done .route-check path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: check-draw .4s var(--ease) .1s forwards;
}
@keyframes check-draw { to { stroke-dashoffset: 0; } }

.route-step.is-live .route-num {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
  animation: route-pulse 1.8s var(--ease) 4;
}
@keyframes route-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(107,91,219,.45); }
  70%  { box-shadow: 0 0 0 14px rgba(107,91,219,0); }
  100% { box-shadow: 0 0 0 0 rgba(107,91,219,0); }
}
.route-step.is-next .route-num {
  background: var(--teal-soft);
  transition: background .3s var(--ease);
}

/* The fill and spark ride the rail from step 1 to step 2 */
.route-fill {
  position: absolute;
  left: 20%; right: 14%; top: 24px;
  height: 2.5px;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .8s var(--ease) .15s;
}
.route-wrap.is-routing .route-fill { transform: scaleX(.36); }
.route-spark {
  position: absolute;
  top: 25px; left: 20%;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft), 0 0 18px var(--blue);
  transform: translate(-50%, -50%) scale(0);
  transition: left .8s var(--ease) .15s, transform .2s var(--ease), opacity .3s var(--ease);
}
.route-wrap.is-routing .route-spark { left: 44%; transform: translate(-50%, -50%) scale(1); }
.route-wrap.is-arrived .route-spark { opacity: 0; }

.route-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  margin-bottom: 10px;
  animation: state-pop .32s var(--ease);
}
@keyframes state-pop {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.state-teal   { background: var(--teal-soft);   color: var(--teal-text); }
.state-violet { background: var(--violet-soft); color: var(--violet-text); }
.state-blue   { background: var(--blue-soft);   color: var(--blue-text); }
.state-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.state-violet .state-dot { animation: state-blink 1.4s var(--ease) infinite; }
@keyframes state-blink { 50% { opacity: .25; } }

/* Sent ticket that replaces the form */
.demo-ticket {
  border: 1px solid var(--teal-line);
  background: var(--teal-well);
  border-radius: 12px;
  padding: 14px 16px;
  animation: ticket-in .45s var(--ease);
}
@keyframes ticket-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.ticket-row { display: flex; align-items: center; gap: 10px; }
.ticket-badge {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.ticket-email {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--fg-1);
}
.ticket-tag {
  font-size: .6875rem;
  font-weight: 900;
  color: var(--teal-text);
  background: var(--teal-soft);
  padding: 3px 9px;
  border-radius: var(--r-pill);
}
.ticket-note { margin-top: 9px; font-size: .8125rem; color: var(--fg-2); line-height: 1.5; }
.ticket-edit {
  font-family: inherit;
  background: none;
  border: none;
  padding: 0;
  margin-top: 9px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--fg-2);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.ticket-edit:hover { color: var(--fg-1); }

.demo-form { display: flex; gap: 8px; }
.demo-form input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 9px;
  border: 1.5px solid var(--border-strong);
  font-size: .84375rem;
  font-family: inherit;
  color: var(--fg-1);
  background: var(--bg-surface);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.demo-form input::placeholder { color: var(--fg-muted); }
.demo-form input:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.demo-form input[aria-invalid="true"] { border-color: #C43535; }
:root[data-theme="dark"] .demo-form input[aria-invalid="true"] { border-color: #FF9C9C; }

.btn-send {
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  font-size: .8125rem;
  font-weight: 900;
  padding: 0 18px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  color: #fff;
  background: var(--grad-primary);
  transition: filter .18s var(--ease);
}
.btn-send:hover { filter: brightness(1.08); }
.btn-send[disabled] { cursor: default; filter: none; }

.form-status { margin-top: 10px; font-size: .8125rem; font-weight: 700; min-height: 1.2em; }
.form-status.is-error { color: #B32E2E; }
.form-status.is-ok { color: var(--teal-text); }
:root[data-theme="dark"] .form-status.is-error { color: #FFB3B3; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 26px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-note { font-size: .8125rem; color: var(--fg-muted); }

/* ---------- Toast (demo actions) ---------- */
.toast-region { position: fixed; inset: 0; pointer-events: none; z-index: 999; }
.toast {
  position: fixed;
  transform: translate(-50%, -100%);
  max-width: 340px;
  background: var(--navy);
  color: #fff;
  font-size: .84375rem;
  line-height: 1.45;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(13,27,42,.3);
}
:root[data-theme="dark"] .toast { background: #223650; }

/* ---------- Footer legal ---------- */
.footer-legal {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 32px 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
  font-size: .8125rem;
  color: var(--fg-muted);
}
.footer-legal a { color: var(--fg-2); text-decoration: underline; text-underline-offset: 2px; }
.footer-legal a:hover { color: var(--fg-1); }
.footer-links {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.footer-link-btn {
  font-family: inherit;
  font-size: .8125rem;
  color: var(--fg-2);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-link-btn:hover { color: var(--fg-1); }

/* ---------- Policy pages ---------- */
.policy-hero { padding-bottom: 10px; }
.policy-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  font-weight: 900;
  margin: 6px 0 10px;
}
.policy-lead { font-size: 1.0625rem; color: var(--fg-2); max-width: 620px; line-height: 1.55; }
.policy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .75rem;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  color: var(--fg-2);
}
.btn-pill-small {
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8125rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: none;
  cursor: pointer;
  color: #fff;
  background: var(--grad-primary);
  transition: filter .18s var(--ease);
}
.btn-pill-small:hover { filter: brightness(1.08); }

.policy-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  align-items: start;
}
.policy-aside {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.policy-toc h2 { font-size: 1rem; font-weight: 900; margin-bottom: 12px; }
.policy-toc ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.policy-toc a {
  font-size: .875rem;
  color: var(--fg-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.policy-toc a:hover { color: var(--link); }

.callout {
  border-radius: var(--r-md);
  border: 1px solid var(--teal-line);
  background: var(--teal-well);
  padding: 18px 20px;
}
.callout h3 { font-size: .9375rem; font-weight: 900; margin-bottom: 8px; }
.callout ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.callout li, .callout p { font-size: .875rem; color: var(--fg-2); line-height: 1.5; }
.callout a { text-decoration: underline; text-underline-offset: 2px; font-weight: 700; }
.callout-blue { border-color: var(--blue-line); background: var(--blue-well); }

.policy-article { padding: 32px 36px; }
.policy-article section { scroll-margin-top: 24px; }
.policy-article section + section {
  border-top: 1px solid var(--border-soft);
  margin-top: 30px;
  padding-top: 30px;
}
.policy-article h2 { font-size: 1.375rem; font-weight: 900; margin-bottom: 10px; }
.policy-article h3 { font-size: 1rem; font-weight: 900; margin-bottom: 6px; }
.policy-article p, .policy-article li {
  font-size: .9375rem;
  color: var(--fg-2);
  line-height: 1.65;
}
.policy-article p + p { margin-top: 12px; }
.policy-article ul { margin: 12px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 7px; }
.policy-article a { text-decoration: underline; text-underline-offset: 2px; }
.policy-article b, .policy-article strong { color: var(--fg-1); }
.policy-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
.policy-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-sunken);
  padding: 16px 18px;
}
.policy-card ul { margin-top: 8px; }
.policy-card.tint-teal { border-color: var(--teal-line); background: var(--teal-well); }
.policy-card.tint-blue { border-color: var(--blue-line); background: var(--blue-well); }
.policy-footnote {
  margin-top: 18px;
  font-size: .8125rem;
  color: var(--fg-muted);
}

/* ---------- Cookie consent banner ---------- */
[hidden] { display: none !important; }

.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 80;
  padding: 16px;
}
.cookie-card {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 -8px 44px rgba(13,27,42,.22);
  padding: 22px 56px 22px 26px;
}
.cookie-body {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.cookie-copy { flex: 1 1 380px; max-width: 640px; }
.cookie-copy h2 { font-size: 1.125rem; font-weight: 900; margin-bottom: 8px; }
.cookie-copy p { font-size: .875rem; color: var(--fg-2); line-height: 1.55; }
.cookie-more { margin-top: 8px; font-size: .8125rem; }
.cookie-more a { text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
}
.btn-cookie {
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: filter .18s var(--ease), background .16s var(--ease);
}
.btn-cookie-primary { border: none; color: #fff; background: var(--grad-primary); }
.btn-cookie-primary:hover { filter: brightness(1.08); }
.btn-cookie-secondary {
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--fg-1);
}
.btn-cookie-secondary:hover { background: var(--bg-inset); }
.btn-cookie-ghost {
  border: none;
  background: none;
  color: var(--fg-2);
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 8px 12px;
}
.btn-cookie-ghost:hover { color: var(--fg-1); }
.cookie-dismiss {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--fg-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cookie-dismiss:hover { background: var(--bg-inset); color: var(--fg-1); }
.cookie-prefs {
  border-top: 1px solid var(--border-soft);
  margin-top: 18px;
  padding-top: 16px;
}
.cookie-prefs fieldset { border: none; margin: 0; padding: 0; }
.cookie-pref {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  font-size: .875rem;
  color: var(--fg-1);
}
.cookie-pref input {
  width: 18px; height: 18px;
  margin: 2px 0 0;
  accent-color: var(--badge-blue);
  flex: none;
}
.cookie-pref-desc {
  display: block;
  font-weight: 400;
  color: var(--fg-muted);
  margin-top: 2px;
}
.cookie-prefs-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding-top: 6px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .steps-rail, .route-rail, .route-fill, .route-spark { display: none; }
  .policy-layout { grid-template-columns: 1fr; }
  .policy-aside { position: static; }
  .policy-article { padding: 26px 22px; }
  .policy-cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .route-steps { grid-template-columns: 1fr; gap: 28px; }
  .route-step { padding-right: 0; }
  .anatomy-card { padding: 32px 24px; }
}

@media (max-width: 820px) {
  .status-grid { grid-template-columns: 1fr; gap: 34px; }
  .status-col:not(:last-child)::after {
    content: "↓";
    position: absolute;
    left: 50%;
    bottom: -26px;
    transform: translateX(-50%);
    font-size: 1.125rem;
    font-weight: 900;
    line-height: 1;
    color: var(--fg-muted);
  }
  .col-list { grid-template-rows: none; grid-auto-rows: auto; }
  .sides-grid { grid-template-columns: 1fr; }
  .pulse-aside { text-align: left; max-width: none; }
}

@media (max-width: 640px) {
  .site-header { padding: 48px 20px 0; }
  .brand-lockup { justify-content: center; text-align: center; }
  .brand-divider { display: none; }
  .brand-tagline { flex-basis: 100%; }
  main > section { padding-left: 20px; padding-right: 20px; }
  .hero { padding: 32px 20px; }
  .card { padding: 22px 18px; }
  .anatomy-card { padding: 28px 18px; }
  .demo-card { padding: 32px 20px; }
  .access-band { padding: 36px 24px; }
  .queue-row { flex-wrap: wrap; }
  .queue-text { flex-basis: calc(100% - 22px); }
  .btn-chip { margin-left: 22px; }
  .stat-list { gap: 24px; }
  .anatomy-rail, .anatomy-stem, .piece-stem { display: none; }
  .anatomy-pieces { margin-top: 20px; }
  .piece { flex-basis: 100%; max-width: none; }
  .piece-card { height: auto; }
  .footer-inner { padding: 22px 20px; }
  .footer-legal { padding: 0 20px 22px; }
  .cookie-card { padding: 18px 48px 18px 18px; }
  .cookie-actions { min-width: 100%; }
  .theme-toggle { display: none; }
  .demo-form { flex-wrap: wrap; }
  .btn-send { padding: 11px 18px; }
}

/* ---------- Forced colors (Windows High Contrast) ---------- */
@media (forced-colors: active) {
  .card, .mini-card, .step-demo, .queue-row, .status-col, .piece-card, .cookie-card, .callout, .policy-card, .demo-ticket { border: 1px solid CanvasText; }
  .btn, .btn-chip, .btn-send, .btn-cookie, .btn-pill-small, .ticket-edit { border: 1px solid ButtonText; }
  .steps-rail, .route-rail, .route-fill, .route-spark, .section-connector, .anatomy-rail, .anatomy-stem, .piece-stem { forced-color-adjust: none; }
}
