/* ==========================================================================
   FamRelay — marketing & pilot site
   Palette and type follow the FamRelay website strategy brief (p.21).
   ========================================================================== */

:root {
  /* Brand */
  --navy: #10223D;        /* Relay Navy — text, hero, footer */
  --navy-2: #172C4C;
  --navy-3: #22395E;
  --teal: #14877E;        /* Consent Teal — decorative / large */
  --teal-ink: #0F766E;    /* Consent Teal, AA-safe for text & buttons */
  --teal-deep: #0B5F58;
  --teal-bright: #3FC1B3; /* teal on navy */
  --mint: #DFF2EB;        /* Soft Mint — calm explanatory surfaces */
  --mint-2: #EEF8F4;
  --coral: #E56D5F;       /* Signal Coral — attention, not destruction */
  --coral-ink: #AE4336;
  --coral-soft: #FCEBE7;
  --amber: #8A5A12;
  --amber-soft: #FFF3D9;
  --paper: #FBFAF6;       /* Warm Paper — primary background */
  --paper-2: #F4F1E8;
  --white: #FFFFFF;

  /* Roles */
  --ink: var(--navy);
  --ink-2: #2B3C55;
  --muted: #4F5E73;
  --line: #E6E1D6;
  --line-2: #D5CFC0;
  --focus: #0F766E;

  --radius-s: 8px;
  --radius: 14px;
  --radius-l: 22px;
  --shadow-s: 0 1px 2px rgba(16, 34, 61, .06), 0 1px 1px rgba(16, 34, 61, .04);
  --shadow: 0 14px 34px -16px rgba(16, 34, 61, .22), 0 2px 6px rgba(16, 34, 61, .05);
  --shadow-l: 0 40px 80px -30px rgba(16, 34, 61, .35), 0 6px 18px rgba(16, 34, 61, .06);

  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1200px;
  --gutter: 16px;
  --header-h: 68px;
}

@media (min-width: 720px) { :root { --gutter: 28px; } }
@media (min-width: 1100px) { :root { --gutter: 40px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
a { color: var(--teal-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--teal-deep); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
strong { font-weight: 650; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible, .on-dark:focus-visible { outline-color: var(--teal-bright); }

::selection { background: var(--mint); color: var(--navy); }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-s);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--white); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { margin: 0; color: var(--ink); }

.display, h1, h2 {
  font-family: var(--serif);
  font-weight: 520;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 60, "WONK" 0;
  letter-spacing: -.018em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 1.5rem + 4.2vw, 4.4rem); line-height: 1.03; }
h2 { font-size: clamp(2rem, 1.35rem + 2.4vw, 3.1rem); line-height: 1.08; }
h3 { font-family: var(--sans); font-size: 1.2rem; font-weight: 700; line-height: 1.3; letter-spacing: -.005em; }
h4 { font-family: var(--sans); font-size: 1rem; font-weight: 700; }

h1 em, h2 em {
  font-style: italic;
  font-weight: 460;
  color: var(--teal-ink);
  font-variation-settings: "SOFT" 100, "WONK" 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--teal-ink);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--coral);
}
.eyebrow.no-rule::before { display: none; }

.lede {
  font-size: clamp(1.13rem, 1.02rem + .45vw, 1.35rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 40em;
}
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.tiny { font-size: .8rem; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container.narrow { max-width: calc(820px + var(--gutter) * 2); }

.section { padding-block: clamp(72px, 9vw, 128px); position: relative; }
.section.tight { padding-block: clamp(56px, 6vw, 88px); }
.section.paper-2 { background: var(--paper-2); }
.section.white { background: var(--white); }
.section.mint { background: var(--mint-2); }
.section.navy { background: var(--navy); color: #D7E0EC; }
.section.navy h2, .section.navy h3 { color: var(--white); }
.section.navy .eyebrow { color: var(--teal-bright); }
.section.navy h2 em { color: var(--teal-bright); }
.section.navy .lede { color: #C9D4E3; }

.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2 + .lede, .section-head h2 + p { margin-top: 20px; }

.grid { display: grid; gap: 20px; }
@media (min-width: 720px) {
  .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 720px) and (max-width: 999px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.split { display: grid; gap: clamp(40px, 6vw, 80px); align-items: center; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split.wide-left { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
  .split.wide-right { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .split.top { align-items: start; }
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--teal-ink);
  --btn-fg: var(--white);
  --btn-bd: var(--teal-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 24px;
  border: 1.5px solid var(--btn-bd);
  border-radius: 12px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 8px 20px -10px rgba(15, 118, 110, .7);
}
.btn:hover { --btn-bg: var(--teal-deep); --btn-bd: var(--teal-deep); color: var(--white); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; transition: transform .18s ease; }
.btn:hover svg.arrow { transform: translateX(3px); }

.btn.secondary {
  --btn-bg: transparent;
  --btn-fg: var(--navy);
  --btn-bd: var(--line-2);
  box-shadow: none;
}
.btn.secondary:hover { --btn-bg: var(--white); --btn-bd: var(--navy); color: var(--navy); }

.btn.on-dark.secondary { --btn-fg: var(--white); --btn-bd: rgba(255, 255, 255, .35); }
.btn.on-dark.secondary:hover { --btn-bg: rgba(255, 255, 255, .08); --btn-bd: var(--white); color: var(--white); }
.btn.light { --btn-bg: var(--white); --btn-fg: var(--navy); --btn-bd: var(--white); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .5); }
.btn.light:hover { --btn-bg: var(--mint); --btn-bd: var(--mint); color: var(--navy); }
.btn.small { min-height: 42px; padding: 8px 16px; font-size: .95rem; border-radius: 10px; }
.btn.block { width: 100%; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--teal-ink);
  text-decoration: none;
}
.text-link svg { width: 18px; height: 18px; transition: transform .18s ease; }
.text-link:hover { color: var(--teal-deep); text-decoration: underline; }
.text-link:hover svg { transform: translateX(3px); }
.on-dark .text-link, .text-link.on-dark { color: var(--teal-bright); }
.on-dark .text-link:hover, .text-link.on-dark:hover { color: var(--white); }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 246, .86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -18px rgba(16, 34, 61, .5); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -.01em;
}
.brand:hover { color: var(--navy); }
.brand-mark { width: 34px; height: 34px; }
.brand-name span { color: var(--teal-ink); }

.primary-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.primary-nav ul { list-style: none; display: flex; gap: 4px; }
.primary-nav a:not(.btn) {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
}
.primary-nav a:not(.btn):hover { background: var(--paper-2); color: var(--navy); }
.primary-nav a[aria-current="page"] { color: var(--navy); background: var(--mint); }
.primary-nav .btn { margin-left: 10px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--white);
  color: var(--navy);
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .close { display: none; }
.nav-toggle[aria-expanded="true"] .open { display: none; }
.nav-toggle[aria-expanded="true"] .close { display: block; }

@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px var(--gutter) 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(16, 34, 61, .35);
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav ul { flex-direction: column; gap: 2px; }
  .primary-nav a:not(.btn) { display: block; padding: 14px 12px; font-size: 1.1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .primary-nav a[aria-current="page"] { background: transparent; color: var(--teal-ink); }
  .primary-nav .btn { margin: 12px 0 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(28px, 4vw, 56px) clamp(72px, 8vw, 112px);
  overflow: hidden;
}
.hero-grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 64px; align-items: start; }
  .hero-grid > div:first-child { padding-top: clamp(12px, 3vw, 48px); }
}
.relay-visual .rv-link { height: 22px; }
.relay-visual .rv-card { padding: 14px 16px; }
.relay-visual .rv-chat { gap: 7px; margin-top: 10px; }
.relay-visual .bubble { font-size: .9rem; padding: 8px 12px; }

.hero-rings {
  position: absolute;
  right: -220px;
  top: -200px;
  width: 760px;
  height: 760px;
  pointer-events: none;
  opacity: .9;
}
@media (max-width: 999px) { .hero-rings { right: -360px; top: auto; bottom: -260px; } }
.hero > .container, .page-hero > .container { position: relative; z-index: 1; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
  color: var(--ink-2);
  font-size: .92rem;
  font-weight: 600;
}
.pill .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--mint);
}
.hero .pill { margin-bottom: 26px; }
.hero h1 { max-width: 12ch; }
.hero .lede { margin-top: 26px; max-width: 34em; }
.hero .cta-row { margin-top: 34px; }
.cta-note { margin: 16px 0 0; color: var(--muted); font-size: .95rem; max-width: 34em; }

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  list-style: none;
}
.hero-points li { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 600; font-size: .98rem; }
.hero-points svg { width: 18px; height: 18px; color: var(--teal-ink); }

/* ---------- Relay visual (hero concept illustration) ---------- */
.relay-visual {
  position: relative;
  padding: 26px clamp(18px, 3vw, 30px) 24px;
  border-radius: 28px;
  background:
    radial-gradient(120% 70% at 100% 0%, rgba(63, 193, 179, .16), transparent 60%),
    linear-gradient(180deg, #F2FAF6 0%, #E7F4EE 100%);
  border: 1px solid #D3EAE0;
  box-shadow: var(--shadow-l);
  isolation: isolate;
}
.rv-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; }
.concept-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .8);
  border: 1px dashed #A9CFC2;
  color: var(--teal-deep);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.concept-tag svg { width: 14px; height: 14px; }
.replay {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--teal-deep);
  font-size: .85rem;
  font-weight: 700;
}
.replay:hover { background: rgba(255, 255, 255, .7); }
.replay svg { width: 15px; height: 15px; }
.no-js .replay { display: none; }

.rv-card {
  position: relative;
  z-index: 1;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
}
.rv-source { width: min(100%, 440px); }
.rv-recipient { width: min(100%, 440px); margin-left: auto; }

.rv-head { display: flex; align-items: center; gap: 11px; }
.avatar {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: .95rem;
  flex: none;
}
.avatar.teal { background: var(--teal-ink); }
.avatar.coral { background: var(--coral-ink); }
.avatar.amber { background: #9A6A1F; }
.avatar.sm { width: 28px; height: 28px; border-radius: 9px; font-size: .78rem; }
.rv-head strong { display: block; font-size: .98rem; line-height: 1.2; }
.rv-head > div > span { display: block; color: var(--muted); font-size: .82rem; line-height: 1.3; }
.rv-head .src { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 8px; background: var(--paper-2); color: var(--ink-2); font-size: .78rem; font-weight: 600; }
.rv-head .src svg { width: 14px; height: 14px; }

.rv-title { margin: 14px 0 8px; font-family: var(--serif); font-size: 1.22rem; font-weight: 560; }
.rv-fields { list-style: none; display: grid; gap: 6px; }
.rv-field {
  display: grid;
  grid-template-columns: 20px 74px 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 9px;
  font-size: .92rem;
  background: var(--mint-2);
}
.rv-field .k { color: var(--muted); font-size: .8rem; font-weight: 600; }
.rv-field .v { font-weight: 600; color: var(--navy); }
.rv-field .tick {
  display: grid; place-items: center;
  width: 18px; height: 18px;
  border-radius: 5px;
  background: var(--teal-ink);
  color: var(--white);
}
.rv-field .tick svg { width: 12px; height: 12px; }
.rv-field.off { background: transparent; border: 1px dashed var(--line-2); }
.rv-field.off .tick { background: var(--white); border: 1.5px solid var(--line-2); }
.rv-field.off .v { color: var(--muted); font-weight: 500; text-decoration: line-through; text-decoration-color: rgba(79, 94, 115, .5); }

.rv-link {
  position: relative;
  height: 34px;
  width: 2px;
  margin-inline: auto;
  background-image: linear-gradient(var(--teal) 50%, transparent 0);
  background-size: 2px 8px;
  opacity: .7;
}
.rv-link::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(229, 109, 95, .2);
  opacity: 0;
}

.rv-gate {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-inline: auto;
  width: fit-content;
  max-width: 100%;
  padding: 10px 16px 10px 10px;
  border-radius: 16px;
  background: var(--navy);
  color: #D9E3EF;
  box-shadow: 0 16px 30px -16px rgba(16, 34, 61, .7);
  font-size: .9rem;
}
.rv-gate .gate-icon {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 11px;
  background: var(--teal-ink);
  color: var(--white);
  flex: none;
}
.rv-gate .gate-icon svg { width: 20px; height: 20px; }
.rv-gate strong { color: var(--white); display: block; font-size: .95rem; }
.rv-gate span { display: block; line-height: 1.35; }

.rv-chat { display: grid; gap: 8px; margin-top: 14px; }
.bubble {
  max-width: 88%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: .92rem;
  line-height: 1.45;
}
.bubble.me { justify-self: end; background: var(--navy); color: var(--white); border-bottom-right-radius: 5px; }
.bubble.ai { justify-self: start; background: var(--paper-2); color: var(--navy); border-bottom-left-radius: 5px; }
.bubble.ai.good { background: var(--mint); }
.bubble.ai.bad { background: var(--coral-soft); }
.bubble .from { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .7; margin-bottom: 2px; }
.bubble mark { background: rgba(20, 135, 126, .16); color: inherit; padding: 0 3px; border-radius: 4px; }

.rv-recipient .bubble.me { background: var(--teal-ink); }
.bubble .att {
  display: flex; align-items: center; gap: 6px;
  margin: -2px -4px 8px;
  padding: 6px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .12);
  font-size: .8rem;
  font-weight: 600;
}
.bubble .att svg { width: 14px; height: 14px; }
.mini-share { list-style: none; display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 6px; }
.mini-share li {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px 3px 6px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--teal-deep);
  font-size: .8rem;
  font-weight: 700;
}
.mini-share svg { width: 12px; height: 12px; }
.mini-out { display: block; margin-bottom: 6px; font-size: .78rem; color: var(--coral-ink); font-weight: 600; }

.rv-received {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: auto;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--mint);
  color: var(--teal-deep);
  font-size: .76rem;
  font-weight: 700;
}
.rv-received svg { width: 13px; height: 13px; }
.rv-caption { margin: 16px 2px 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }

/* Relay animation — only with JS and when motion is OK. Final state is the default. */
@media (prefers-reduced-motion: no-preference) {
  .relay-visual.play .anim { animation: rv-rise .55s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0s); }
  .relay-visual.play .rv-link::after { animation: rv-travel 1s ease-in-out both; animation-delay: var(--d, 0s); }
  .relay-visual.play .rv-gate .gate-icon { animation: rv-stamp .5s cubic-bezier(.2, .9, .3, 1.4) both; animation-delay: var(--d2, 0s); }
}
@keyframes rv-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rv-travel {
  0% { top: 0; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
@keyframes rv-stamp { 0% { transform: scale(.6); background: var(--navy-3); } 100% { transform: none; } }

.compat {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  color: var(--muted);
  font-size: .93rem;
}
.compat .nodes { display: flex; }
.compat .nodes span {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--paper);
  display: grid; place-items: center;
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
}
.compat .nodes span + span { margin-left: -8px; }

/* ---------- Gap section (islands) ---------- */
.islands { display: grid; gap: 18px; align-items: stretch; }
@media (min-width: 1000px) { .islands { grid-template-columns: 1fr 1.02fr 1fr; gap: 22px; } }

.island {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 20px;
  box-shadow: var(--shadow-s);
}
.island-label {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.island-label .sw { width: 8px; height: 8px; border-radius: 50%; }
.island .rv-chat { margin-top: 16px; }
.island .knows { list-style: none; margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line-2); display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--teal-deep);
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.4;
}
.chip.neutral { background: var(--paper-2); color: var(--ink-2); }
.chip.coral { background: var(--coral-soft); color: var(--coral-ink); }
.chip.outline { background: transparent; border: 1px solid var(--line-2); color: var(--ink-2); }
.chip svg { width: 13px; height: 13px; }

.island.workaround {
  background: var(--paper-2);
  border-style: dashed;
  border-color: var(--line-2);
  box-shadow: none;
}
.thread { display: grid; gap: 8px; }
.thread .bubble { font-size: .9rem; }
.thread .bubble.me { background: var(--teal-ink); }
.thread .bubble.them { justify-self: start; background: var(--white); color: var(--navy); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.thread .meta { justify-self: center; font-size: .75rem; color: var(--muted); font-weight: 600; }
.thread .attach { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.thread .attach svg { width: 14px; height: 14px; }

.gap-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 40px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.gap-foot p { margin: 0; max-width: 46em; color: var(--ink-2); }
.gap-foot .quote { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); color: var(--coral-ink); font-variation-settings: "SOFT" 100, "WONK" 1; }

/* ---------- Steps (Capture / Choose / Relay) ---------- */
.steps { position: relative; display: grid; gap: 20px; counter-reset: step; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  .steps::before {
    content: "";
    position: absolute;
    top: 38px;
    left: 12%;
    right: 12%;
    height: 2px;
    background-image: linear-gradient(90deg, var(--teal) 50%, transparent 0);
    background-size: 10px 2px;
    opacity: .45;
  }
}
.step {
  position: relative;
  padding: 26px 24px 28px;
  border-radius: var(--radius-l);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
}
.step.is-gate { background: var(--navy); border-color: var(--navy); color: #CAD5E4; box-shadow: var(--shadow); }
.step.is-gate h3 { color: var(--white); }
.step-icon {
  position: relative;
  z-index: 1;
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--mint);
  color: var(--teal-deep);
  margin-bottom: 20px;
}
.step.is-gate .step-icon { background: var(--teal-ink); color: var(--white); }
.step-icon svg { width: 26px; height: 26px; }
.step-num {
  position: absolute;
  top: 26px; right: 24px;
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--line-2);
  font-weight: 400;
}
.step.is-gate .step-num { color: rgba(255, 255, 255, .18); }
.step h3 { margin-bottom: 8px; font-size: 1.3rem; }
.step p { margin: 0; color: var(--muted); }
.step.is-gate p { color: #C3CFE0; }
.step .you-approve {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(63, 193, 179, .16);
  color: var(--teal-bright);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.step .you-approve svg { width: 14px; height: 14px; }

/* ---------- Controls + activity log ---------- */
.control-list { list-style: none; display: grid; gap: 4px; }
.control-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.control-list li:last-child { border-bottom: 0; }
.control-list .ic {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 13px;
  background: var(--mint);
  color: var(--teal-deep);
}
.control-list .ic svg { width: 22px; height: 22px; }
.control-list h3 { font-size: 1.08rem; margin-bottom: 2px; }
.control-list p { margin: 0; color: var(--muted); font-size: 1rem; }

.log {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-l);
  overflow: hidden;
}
.log-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.log-head h3 { font-size: 1.05rem; }
.log-head p { margin: 0; font-size: .85rem; color: var(--muted); }
.log-list { list-style: none; }
.log.chat-a .chat-head { border-radius: 0; }
.log-convo { padding: 18px 16px 20px; background: var(--paper); gap: 10px; }
.log-convo .bubble { font-size: .95rem; }
.log-convo .bubble.ai.has-list { max-width: 100%; width: 100%; padding: 12px 12px 4px; box-shadow: var(--shadow-s); }
.log-convo .log-list { margin: 10px -12px 0; border-top: 1px solid var(--line); }
.log-convo .log-item { padding: 12px 14px; gap: 12px; grid-template-columns: 36px minmax(0, 1fr) auto; }
.log-convo .log-item .ico { width: 36px; height: 36px; border-radius: 10px; }
.log-convo .log-item .what { font-size: .95rem; }
@media (max-width: 520px) {
  .log-convo .log-item { grid-template-columns: 32px minmax(0, 1fr); }
}
.log-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.log-item:last-child { border-bottom: 0; }
.log-item .what { font-weight: 700; color: var(--navy); line-height: 1.3; }
.log-item .who { color: var(--muted); font-size: .88rem; line-height: 1.35; }
.log-item .ico {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--paper-2);
  color: var(--ink-2);
}
.log-item .ico svg { width: 20px; height: 20px; }
@media (max-width: 520px) {
  .log-item { grid-template-columns: 36px minmax(0, 1fr); padding: 14px 16px; }
  .log-item .status { grid-column: 2; justify-self: start; }
  .log-head { padding: 16px; }
}

/* Status chips: color never works alone — always icon + text */
.status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
}
.status svg { width: 14px; height: 14px; }
.status.proposed { background: #EEF1F6; color: #34455E; border-color: #D9DFE9; }
.status.approved { background: #E3F0FA; color: #1F5A86; border-color: #C8DFF0; }
.status.delivered { background: var(--mint); color: var(--teal-deep); border-color: #BFE3D5; }
.status.expired { background: var(--paper-2); color: #5E5A4F; border-color: var(--line-2); }
.status.revoked { background: var(--coral-soft); color: var(--coral-ink); border-color: #F4CEC7; }
.status.attention { background: var(--amber-soft); color: var(--amber); border-color: #F1DDAE; }

.shared-split { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 640px) { .shared-split { grid-template-columns: 1fr 1fr; } }
.shared-box { border-radius: var(--radius); padding: 20px 22px; border: 1px solid var(--line); background: var(--white); }
.shared-box.yes { background: var(--mint-2); border-color: #CDE8DD; }
.shared-box h3 { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; margin-bottom: 10px; }
.shared-box h3 svg { width: 18px; height: 18px; }
.shared-box.yes h3 { color: var(--teal-deep); }
.shared-box.no h3 { color: var(--coral-ink); }
.shared-box ul { list-style: none; display: grid; gap: 8px; }
.shared-box li { position: relative; padding-left: 18px; font-size: .97rem; color: var(--ink-2); line-height: 1.45; }
.shared-box li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 2px; background: var(--teal); }
.shared-box.no li::before { background: var(--coral); border-radius: 50%; }

.honest-note {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--amber-soft);
  border: 1px solid #F1DDAE;
  color: #4F3A10;
  font-size: .98rem;
}
.honest-note svg { width: 24px; height: 24px; color: var(--amber); }
.honest-note p { margin: 0; }
.honest-note strong { color: #3D2C08; }

/* ---------- Use-case cards ---------- */
.case-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 24px;
  border-radius: var(--radius-l);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.case-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #CFE5DC; }
.case-card .ic {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--mint);
  color: var(--teal-deep);
}
.case-card .ic svg { width: 24px; height: 24px; }
.case-card.team .ic { background: #E6ECF6; color: var(--navy-3); }
.case-card h3 { font-size: 1.18rem; }
.case-card p { margin: 0; color: var(--muted); font-size: 1rem; }
.case-card .relays { display: flex; flex-wrap: wrap; gap: 6px; }
.ask {
  justify-self: end;
  align-self: flex-end;
  max-width: 92%;
  margin: 0;
  padding: 8px 13px;
  border-radius: 16px 16px 5px 16px;
  background: var(--navy);
  color: var(--white);
  font-size: .92rem;
  line-height: 1.4;
}
.case-card .ask { color: var(--white); font-size: .92rem; }
.case-card.team .ask { background: var(--navy-3); }
.case-card .boundary {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line-2);
  display: flex; gap: 8px; align-items: flex-start;
  color: var(--ink-2);
  font-size: .9rem;
  line-height: 1.45;
}
.case-card .boundary svg { width: 16px; height: 16px; margin-top: 3px; color: var(--coral-ink); }
.case-card .tag {
  align-self: flex-start;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--navy-3);
}

/* ---------- Hub (cross-assistant) ---------- */
.hub {
  position: relative;
  aspect-ratio: 1 / 1;
  width: min(100%, 500px);
  margin-inline: auto;
}
.hub svg.hub-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.hub-center {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: grid; place-items: center; text-align: center;
  width: 34%; aspect-ratio: 1;
  border-radius: 50%;
  background: var(--navy-2);
  border: 1px solid rgba(63, 193, 179, .5);
  box-shadow: 0 0 0 12px rgba(63, 193, 179, .08), 0 0 0 26px rgba(63, 193, 179, .04);
  color: var(--white);
  padding: 10px;
}
.hub-center svg { width: 40px; height: 40px; margin: 0 auto 6px; }
.hub-center strong { display: block; font-size: 1rem; }
.hub-center span { display: block; font-size: .78rem; color: #A9B8CC; line-height: 1.3; }
.hub-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px 8px 8px;
  border-radius: 14px;
  background: var(--white);
  color: var(--navy);
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .6);
}
.hub-node small { display: block; font-weight: 600; color: var(--muted); font-size: .72rem; }
@media (max-width: 480px) {
  .hub-node { font-size: .74rem; padding: 6px 9px 6px 6px; gap: 6px; }
  .hub-node small { font-size: .66rem; }
  .hub-node .avatar.sm { width: 22px; height: 22px; font-size: .66rem; border-radius: 7px; }
  .hub-center strong { font-size: .85rem; }
  .hub-center span { display: none; }
  .hub-center svg { width: 30px; height: 30px; }
}

.legend { list-style: none; display: grid; gap: 2px; margin-top: 28px; }
.legend li {
  display: grid;
  grid-template-columns: 138px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  color: #BFCBDC;
  font-size: .96rem;
}
.legend li:last-child { border-bottom: 0; }
@media (max-width: 480px) { .legend li { grid-template-columns: 1fr; gap: 6px; } }
.status.dark { background: rgba(255, 255, 255, .06); color: var(--white); border-color: rgba(255, 255, 255, .16); justify-self: start; }
.status.dark .sw { width: 8px; height: 8px; border-radius: 50%; }

/* ---------- Pilot block ---------- */
.pilot-card {
  display: grid;
  gap: 0;
  border-radius: 28px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-l);
}
@media (min-width: 960px) { .pilot-card { grid-template-columns: 1.05fr .95fr; } }
.pilot-card .pc-main { padding: clamp(28px, 5vw, 56px); }
.pilot-card .pc-side { padding: clamp(28px, 5vw, 56px); background: var(--mint-2); border-top: 1px solid #D5ECE2; }
@media (min-width: 960px) { .pilot-card .pc-side { border-top: 0; border-left: 1px solid #D5ECE2; } }
.pilot-card h2 { margin-bottom: 18px; }
.check-list { list-style: none; display: grid; gap: 12px; }
.check-list li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; color: var(--ink-2); line-height: 1.5; }
.check-list li svg { width: 22px; height: 22px; color: var(--teal-ink); margin-top: 1px; }
.check-list.dots li svg { color: var(--muted); }
.pc-side h3 { margin-bottom: 16px; }
.pc-side .check-list + h3 { margin-top: 30px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.faq details[open] { border-color: #BFE0D3; box-shadow: var(--shadow-s); }
.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm {
  flex: none;
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--paper-2);
  color: var(--teal-ink);
  transition: transform .2s ease, background-color .2s ease;
}
.faq summary .pm svg { width: 16px; height: 16px; }
.faq details[open] summary .pm { transform: rotate(45deg); background: var(--mint); }
.faq .answer { padding: 0 22px 22px; color: var(--ink-2); max-width: 62em; }
.faq .answer p:last-child { margin-bottom: 0; }
.faq .answer .lead { font-weight: 700; color: var(--navy); }

/* ---------- Final CTA ---------- */
.final-cta {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: var(--navy);
  color: #CCD7E6;
  padding: clamp(40px, 7vw, 88px) clamp(24px, 6vw, 80px);
  text-align: center;
}
.final-cta h2 { color: var(--white); max-width: 16ch; margin-inline: auto; }
.final-cta h2 em { color: var(--teal-bright); }
.final-cta .lede { color: #C3CFDF; margin: 22px auto 0; }
.final-cta .cta-row { justify-content: center; margin-top: 34px; }
.final-cta .fc-rings { position: absolute; width: 620px; height: 620px; left: -240px; bottom: -330px; opacity: .8; pointer-events: none; }
.final-cta .fc-rings.r { left: auto; right: -260px; top: -340px; bottom: auto; }
.final-cta > *:not(.fc-rings) { position: relative; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 7vw, 96px) clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { max-width: 17ch; }
.page-hero .lede { margin-top: 24px; }
.page-hero .cta-row { margin-top: 30px; }
.page-hero .hero-rings { top: -300px; right: -300px; }

.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
  list-style: none;
}
.anchor-nav a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
}
.anchor-nav a:hover { border-color: var(--teal-ink); color: var(--teal-ink); }
.anchor-nav svg { width: 16px; height: 16px; }

/* ---------- Detailed flow (How it works) ---------- */
.flow { list-style: none; position: relative; display: grid; gap: 0; }
.flow > li {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 20px;
  padding-bottom: 44px;
}
.flow > li:last-child { padding-bottom: 0; }
.flow > li::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 58px;
  bottom: 4px;
  width: 2px;
  background-image: linear-gradient(var(--line-2) 50%, transparent 0);
  background-size: 2px 8px;
}
.flow > li:last-child::before { display: none; }
.flow .n {
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--teal-deep);
  box-shadow: var(--shadow-s);
}
.flow .n svg { width: 26px; height: 26px; }
.flow li.gate .n { background: var(--navy); color: var(--white); border-color: var(--navy); }
.flow .step-label { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-ink); margin: 4px 0 6px; }
.flow h3 { font-family: var(--serif); font-weight: 540; font-size: clamp(1.45rem, 1.2rem + .8vw, 1.9rem); letter-spacing: -.01em; margin-bottom: 10px; }
.flow .body { max-width: 640px; }
.flow .body p { color: var(--ink-2); }
.flow .detail {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  font-size: .96rem;
}
.flow .detail.convo { background: var(--paper); gap: 8px; }
.flow .detail.convo .bubble.me { max-width: 85%; }
.flow .detail .row {display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.flow .detail .row > b { font-size: .8rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-right: 6px; }

.disclosure {
  margin-top: 30px;
  border-radius: var(--radius-l);
  background: var(--navy);
  color: #CBD6E5;
  overflow: hidden;
}
.disclosure summary {
  list-style: none;
  display: flex; align-items: center; gap: 14px;
  padding: 22px 26px;
  cursor: pointer;
  color: var(--white);
  font-weight: 700;
  font-size: 1.08rem;
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary .code-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(63, 193, 179, .16); color: var(--teal-bright); }
.disclosure summary .code-ic svg { width: 20px; height: 20px; }
.disclosure summary small { display: block; font-weight: 500; color: #9FB0C6; font-size: .9rem; }
.disclosure summary .pm { margin-left: auto; color: var(--teal-bright); transition: transform .2s ease; }
.disclosure summary .pm svg { width: 20px; height: 20px; }
.disclosure[open] summary .pm { transform: rotate(45deg); }
.disclosure .inner { padding: 0 26px 28px; }
.disclosure .inner p { color: #C3CFDF; }
.delivery-diagram { display: grid; gap: 10px; margin: 22px 0; }
@media (min-width: 820px) { .delivery-diagram { grid-template-columns: 1fr auto 1.2fr auto 1fr; align-items: stretch; } }
.dd-node { border-radius: 14px; background: var(--navy-2); border: 1px solid rgba(255, 255, 255, .1); padding: 16px; }
.dd-node.vault { border-color: rgba(63, 193, 179, .45); background: rgba(63, 193, 179, .08); }
.dd-node small { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-bright); margin-bottom: 6px; }
.dd-node strong { color: var(--white); display: block; margin-bottom: 4px; }
.dd-node p { margin: 0; font-size: .9rem; }
.dd-arrow { display: grid; place-items: center; color: var(--teal-bright); font-size: .78rem; font-weight: 700; text-align: center; letter-spacing: .04em; text-transform: uppercase; }
.dd-arrow svg { width: 22px; height: 22px; margin: 0 auto; }
@media (max-width: 819px) { .dd-arrow svg { transform: rotate(90deg); } .dd-arrow { padding: 2px 0; } }
.mono-list { list-style: none; display: grid; gap: 10px; margin: 0; }
.mono-list li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: .96rem; }
.mono-list li svg { width: 18px; height: 18px; color: var(--teal-bright); margin-top: 3px; }
.stage-note { margin-top: 18px; font-size: .88rem; color: #9FB0C6; }

/* ---------- Concept demo (conversational) ---------- */
.demo {
  border-radius: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-l);
  overflow: hidden;
}
.demo-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 12px 18px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.demo-tools { display: flex; gap: 6px; margin-left: auto; }
.tool-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink-2);
  font-size: .85rem;
  font-weight: 700;
}
.tool-btn:hover:not(:disabled) { border-color: var(--line-2); background: var(--paper); }
.tool-btn:disabled { opacity: .4; cursor: default; }
.tool-btn svg { width: 15px; height: 15px; }
.demo-bar details { font-size: .9rem; width: 100%; }
.demo-bar details summary { cursor: pointer; color: var(--teal-ink); font-weight: 700; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.demo-bar details summary::-webkit-details-marker { display: none; }
.demo-bar details summary svg { width: 16px; height: 16px; }
.demo-bar details p { margin: 8px 0 2px; max-width: 640px; color: var(--ink-2); }
@media (min-width: 900px) { .demo-bar details { width: auto; } }

.demo-body { display: grid; }
@media (min-width: 960px) { .demo-body { grid-template-columns: minmax(0, 1.08fr) 72px minmax(0, .92fr); } }

/* Chat windows */
.chat { display: flex; flex-direction: column; min-width: 0; background: var(--paper); }
.chat-b { background: #F4FAF7; }
.chat-head {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.chat-head strong { display: block; font-size: 1rem; line-height: 1.2; }
.chat-head small { display: block; font-size: .8rem; line-height: 1.3; }
.chat-a .chat-head { background: var(--navy); color: var(--white); border-color: var(--navy); }
.chat-a .chat-head strong { color: var(--white); }
.chat-a .chat-head small { color: #AFC0D6; }
.chat-a .chat-head .avatar { background: var(--white); color: var(--navy); }
.chat-b .chat-head { background: var(--mint); color: var(--navy); border-color: #CDE8DD; }
.chat-b .chat-head small { color: var(--teal-deep); }
.app-tag {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: .7;
}

.chat-thread {
  display: grid;
  align-content: start;
  gap: 10px;
  height: 540px;
  padding: 18px 16px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
@media (max-width: 959px) {
  .chat-thread { height: 460px; }
  .chat-b .chat-thread { height: 400px; }
}
.chat-thread .bubble { max-width: 86%; font-size: .96rem; line-height: 1.5; padding: 10px 14px; border-radius: 18px; }
.chat-thread .bubble.me { justify-self: end; border-bottom-right-radius: 6px; }
.chat-thread .bubble.ai { justify-self: start; background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 6px; box-shadow: var(--shadow-s); }
.chat-b .chat-thread .bubble.me { background: var(--teal-ink); }
.chat-thread .bubble.ai.has-card { max-width: 94%; width: 100%; padding: 12px; }
.chat-thread .bubble mark { background: rgba(20, 135, 126, .15); color: inherit; padding: 0 3px; border-radius: 4px; }

.msg-new { animation: msg-in .38s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

.typing {
  justify-self: start;
  display: inline-flex; gap: 5px;
  padding: 13px 15px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 6px;
}
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .35; animation: typing 1s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: .9; transform: translateY(-3px); } }

.sys {
  justify-self: center;
  display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px;
  margin: 4px 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--teal-deep);
  font-size: .8rem;
  font-weight: 700;
  text-align: center;
}
.sys svg { width: 14px; height: 14px; }
.sys.muted { background: transparent; color: var(--muted); font-weight: 600; }
.sys.rev { background: var(--coral-soft); color: var(--coral-ink); }
.see-sam {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 0 0 0 6px;
  border: 0;
  border-left: 1px solid rgba(11, 95, 88, .25);
  background: none;
  color: inherit;
  font-weight: 700;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (min-width: 960px) { .see-sam { display: none; } }

.attach-card {
  justify-self: end;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px 8px 8px;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
}
.attach-card strong { display: block; font-size: .9rem; line-height: 1.2; }
.attach-card small { display: block; font-size: .78rem; color: var(--muted); }
.mini-flyer {
  display: grid; place-content: center; gap: 2px;
  width: 50px; height: 64px;
  border-radius: 7px;
  background: linear-gradient(160deg, #FFF8EE 0%, #F4E3CF 100%);
  border: 1px solid #EEDCC6;
  text-align: center;
  color: #5A4228;
  line-height: 1.05;
}
.mini-flyer { overflow: hidden; padding: 0 3px; }
.mini-flyer i { font-size: .36rem; font-style: normal; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }
.mini-flyer b { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: .66rem; }

.chat-empty {
  align-self: center;
  display: grid; justify-items: center; gap: 6px;
  margin: auto;
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
}
.chat-empty .mark { width: 40px; height: 40px; opacity: .5; }
.chat-empty p { margin: 6px 0 0; font-weight: 700; color: var(--ink-2); }
.chat-empty small { max-width: 26ch; line-height: 1.45; }
.chat-thread:has(.chat-empty) { align-content: center; }

.chat-foot {
  display: flex; align-items: center; gap: 8px;
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid #D5ECE2;
  color: var(--teal-deep);
  font-size: .85rem;
  font-weight: 600;
}
.chat-foot svg { width: 16px; height: 16px; }

/* FamRelay cards inside assistant messages */
.fr-card {
  margin-top: 10px;
  border: 1px solid #CFE7DD;
  border-radius: 14px;
  background: var(--white);
  overflow: hidden;
}
.fr-card-head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  background: var(--mint-2);
  border-bottom: 1px solid #D5ECE2;
  font-size: .85rem;
  font-weight: 700;
  color: var(--navy);
}
.fr-card-head .mark { width: 20px; height: 20px; }
.fr-card-head .to { margin-left: auto; color: var(--teal-deep); font-size: .8rem; }
.fr-card-head .status { font-size: .74rem; padding: 3px 8px; }
.fr-fields { list-style: none; display: grid; gap: 6px; padding: 10px 12px; }
.fr-field {
  width: 100%;
  display: grid;
  grid-template-columns: 20px 76px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid #CDE8DD;
  background: var(--mint-2);
  color: var(--navy);
  font-size: .9rem;
  line-height: 1.35;
  text-align: left;
}
button.fr-field { cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
button.fr-field:hover { border-color: var(--teal); }
.fr-field .k { color: var(--muted); font-size: .78rem; font-weight: 700; }
.fr-field .v { font-weight: 600; overflow-wrap: anywhere; }
.fr-field .tick { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: var(--teal-ink); color: var(--white); }
.fr-field .tick svg { width: 12px; height: 12px; stroke-width: 3; }
.fr-field[aria-pressed="false"] { background: var(--white); border-style: dashed; border-color: var(--line-2); }
.fr-field[aria-pressed="false"] .tick { background: var(--white); border: 1.5px solid var(--line-2); color: transparent; }
.fr-field[aria-pressed="false"] .v { color: var(--muted); font-weight: 500; }
.fr-field .sens { grid-column: 2 / -1; font-size: .74rem; font-weight: 700; color: var(--amber); }
.fr-empty { padding: 4px 2px; color: var(--muted); font-style: italic; font-size: .9rem; }
.fr-out {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 0;
  padding: 9px 12px;
  border-top: 1px dashed var(--line-2);
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.45;
}
.fr-out b { color: var(--coral-ink); }
.fr-out svg { width: 14px; height: 14px; }
.fr-hint { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0 12px 10px; font-size: .8rem; color: var(--teal-deep); font-weight: 600; }
.fr-hint svg { width: 14px; height: 14px; }
.fr-rows { display: grid; gap: 0; margin: 0; padding: 4px 12px; }
.fr-rows > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.fr-rows > div:last-child { border-bottom: 0; }
.fr-rows dt { color: var(--muted); font-size: .78rem; font-weight: 700; padding-top: 1px; }
.fr-rows dd { margin: 0; font-weight: 600; color: var(--navy); }
.fr-timeline { list-style: none; display: grid; gap: 10px; padding: 12px; }
.fr-timeline li { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: start; font-size: .88rem; }
.fr-timeline svg { width: 16px; height: 16px; color: var(--teal-ink); margin-top: 2px; }
.fr-timeline time { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Reply bar */
.reply-bar { padding: 12px 14px 14px; background: var(--white); border-top: 1px solid var(--line); outline: none; }
.reply-label { margin: 0 0 8px; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.replies { display: flex; flex-wrap: wrap; gap: 8px; min-height: 42px; }
.reply {
  padding: 9px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--teal-ink);
  background: var(--white);
  color: var(--teal-deep);
  font-weight: 700;
  font-size: .94rem;
  line-height: 1.2;
  transition: background-color .15s ease, transform .15s ease;
}
.reply:hover:not(:disabled) { background: var(--mint-2); transform: translateY(-1px); }
.reply:disabled { opacity: .4; cursor: not-allowed; }
.composer {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: #8A95A5;
  font-size: .9rem;
}
.composer-note { font-size: .74rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
@media (max-width: 480px) { .composer-note { display: none; } }

/* Relay rail between the two assistants */
.relay-rail {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 64px;
  background: linear-gradient(90deg, var(--paper), #F4FAF7);
  overflow: hidden;
}
.relay-rail::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  background-image: linear-gradient(90deg, var(--teal) 50%, transparent 0);
  background-size: 8px 2px;
  opacity: .45;
}
@media (min-width: 960px) {
  .relay-rail::before { left: 50%; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background-image: linear-gradient(var(--teal) 50%, transparent 0); background-size: 2px 8px; }
}
.rail-badge {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
  color: var(--navy);
  font-size: .76rem;
  font-weight: 700;
}
.rail-badge .mark { width: 20px; height: 20px; }
@media (min-width: 960px) {
  .rail-badge { flex-direction: column; padding: 10px 6px; border-radius: 16px; font-size: .62rem; letter-spacing: .04em; }
  .rail-badge .mark { width: 26px; height: 26px; }
}
.rail-packet {
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(229, 109, 95, .2);
  left: 50%; top: 0;
  margin-left: -6px;
  opacity: 0;
}
.relay-rail.sending .rail-packet { animation: packet-down 1.1s ease-in-out both; }
@media (min-width: 960px) {
  .rail-packet { left: 0; top: 50%; margin: -6px 0 0; }
  .relay-rail.sending .rail-packet { animation-name: packet-across; }
}
@keyframes packet-down { 0% { top: 0; opacity: 0; } 20%, 80% { opacity: 1; } 100% { top: calc(100% - 12px); opacity: 0; } }
@keyframes packet-across { 0% { left: 0; opacity: 0; } 20%, 80% { opacity: 1; } 100% { left: calc(100% - 12px); opacity: 0; } }

.btn.ghost { --btn-bg: transparent; --btn-fg: var(--ink-2); --btn-bd: transparent; box-shadow: none; padding-inline: 12px; }
.btn.ghost:hover { --btn-bg: var(--paper-2); --btn-bd: var(--paper-2); color: var(--navy); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }

.inline-note {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: .92rem;
  line-height: 1.5;
}
.inline-note svg { width: 18px; height: 18px; color: var(--teal-ink); margin-top: 2px; }

/* Static conversation snippets used around the site */
.convo { display: grid; gap: 8px; }
.convo .bubble { max-width: 92%; font-size: .92rem; line-height: 1.45; padding: 9px 13px; border-radius: 16px; }
.convo .bubble.me { justify-self: end; border-bottom-right-radius: 5px; }
.convo .bubble.ai { justify-self: start; background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.convo .bubble.ai.tint { background: var(--mint-2); border-color: #CDE8DD; }
.convo .who-line { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.convo .who-line .avatar { width: 22px; height: 22px; border-radius: 7px; font-size: .66rem; }
.convo .sys { font-size: .74rem; margin: 0; }
.convo .quick { display: flex; flex-wrap: wrap; gap: 6px; justify-self: start; }
.convo .quick span { padding: 5px 12px; border-radius: 999px; border: 1.5px solid var(--teal-ink); color: var(--teal-deep); font-weight: 700; font-size: .82rem; background: var(--white); }
.step .convo { margin-top: 20px; padding: 14px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.step.is-gate .convo { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
.step.is-gate .convo .bubble.ai { background: var(--white); color: var(--navy); }
.step.is-gate .convo .quick span { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .5); }

/* noscript fallback */
.demo-fallback { padding: 24px; }

/* ---------- Tables / trust matrix ---------- */
.matrix { display: grid; gap: 14px; }
.matrix-row {
  display: grid;
  gap: 12px 24px;
  padding: 22px 24px;
  border-radius: var(--radius-l);
  background: var(--white);
  border: 1px solid var(--line);
}
@media (min-width: 900px) { .matrix-row { grid-template-columns: 200px minmax(0, 1fr) 240px; align-items: start; } }
.matrix-row h3 { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; }
.matrix-row h3 svg { width: 22px; height: 22px; color: var(--teal-ink); }
.matrix-row p { margin: 0; color: var(--ink-2); }
.matrix-row .q { font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.matrix-row .st { display: grid; gap: 6px; justify-items: start; font-size: .88rem; color: var(--muted); }

.principles { display: grid; gap: 16px; }
@media (min-width: 720px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .principles { grid-template-columns: repeat(3, 1fr); } }
.principle {
  padding: 24px;
  border-radius: var(--radius-l);
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
}
.principle h3 { margin: 14px 0 6px; font-size: 1.15rem; }
.principle p { margin: 0; color: var(--muted); }
.principle .ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--mint); color: var(--teal-deep); }
.principle .ic svg { width: 22px; height: 22px; }

.shield-path { list-style: none; position: relative; display: grid; gap: 16px; counter-reset: sp; }
@media (min-width: 720px) { .shield-path { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .shield-path { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
  .shield-path::before {
    content: "";
    position: absolute;
    top: 50px; left: 8%; right: 8%;
    height: 2px;
    background-image: linear-gradient(90deg, var(--teal) 50%, transparent 0);
    background-size: 10px 2px;
    opacity: .4;
  }
}
.shield-path li {
  position: relative;
  padding: 24px 20px 22px;
  border-radius: var(--radius-l);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
}
.shield-path li:nth-child(2) { background: var(--navy); border-color: var(--navy); }
.shield-path li:nth-child(2) h3 { color: var(--white); }
.shield-path li:nth-child(2) p { color: #C3CFE0; }
.shield-path li:nth-child(2) .sp-ic { background: var(--teal-ink); color: var(--white); }
.shield-path li:nth-child(2) .sp-num { color: rgba(255, 255, 255, .2); }
.sp-ic {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--mint);
  color: var(--teal-deep);
  margin-bottom: 18px;
}
.sp-ic svg { width: 26px; height: 26px; }
.sp-num { position: absolute; top: 22px; right: 20px; font-family: var(--serif); font-size: 1.9rem; line-height: 1; color: var(--line-2); }
.shield-path h3 { font-size: 1.1rem; margin-bottom: 8px; }
.shield-path p { margin: 0; color: var(--muted); font-size: .96rem; }

.word-list {display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-top: 18px; }
.word-list li {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2);
  color: #D4DDEA;
  font-weight: 600;
  text-decoration: line-through;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 2px;
}

.stage-cols { display: grid; gap: 16px; }
@media (min-width: 900px) { .stage-cols { grid-template-columns: repeat(3, 1fr); } }
.stage-col { border-radius: var(--radius-l); padding: 24px; border: 1px solid var(--line); background: var(--white); }
.stage-col h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.stage-col .sd { width: 12px; height: 12px; border-radius: 4px; }
.stage-col > p { color: var(--muted); font-size: .96rem; }
.stage-col ul { list-style: none; display: grid; gap: 8px; margin-top: 12px; }
.stage-col li { font-size: .96rem; color: var(--ink-2); padding-left: 16px; position: relative; line-height: 1.45; }
.stage-col li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }

/* ---------- Use-case detail rows ---------- */
.story {
  display: grid;
  gap: 24px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
}
@media (min-width: 960px) { .story { grid-template-columns: 300px minmax(0, 1fr); gap: 48px; } }
.story + .story { margin-top: 20px; }
.story-intro .ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--mint); color: var(--teal-deep); margin-bottom: 18px; }
.story-intro .ic svg { width: 26px; height: 26px; }
.story-intro h3 { font-family: var(--serif); font-weight: 540; font-size: 1.7rem; letter-spacing: -.01em; margin-bottom: 8px; }
.story-intro p { color: var(--muted); margin: 0; }
.bra { display: grid; gap: 12px; }
@media (min-width: 720px) { .bra { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bra > div { border-radius: 16px; padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); }
.bra > div.relay { background: var(--mint-2); border-color: #CDE8DD; }
.bra > div.after { background: #F1F5FB; border-color: #DCE4EF; }
.bra b { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.bra .relay b { color: var(--teal-deep); }
.bra p { margin: 0; color: var(--ink-2); font-size: .98rem; line-height: 1.5; }
.bra .ask { display: inline-block; max-width: 100%; color: var(--white); font-size: .92rem; }
.bra .relay .chips {display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.story .boundary {
  grid-column: 1 / -1;
  display: flex; gap: 10px; align-items: flex-start;
  padding-top: 18px;
  border-top: 1px dashed var(--line-2);
  color: var(--ink-2);
  font-size: .96rem;
}
@media (min-width: 960px) { .story .boundary { grid-column: 2; } }
.story .boundary svg { width: 18px; height: 18px; margin-top: 3px; color: var(--coral-ink); }

.team-card {
  padding: 28px 26px;
  border-radius: var(--radius-l);
  background: var(--navy-2);
  border: 1px solid rgba(255, 255, 255, .08);
}
.team-card .ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: rgba(63, 193, 179, .14); color: var(--teal-bright); margin-bottom: 18px; }
.team-card .ic svg { width: 22px; height: 22px; }
.team-card h3 { color: var(--white); margin-bottom: 8px; }
.team-card p { color: #BFCBDC; margin: 0; }
.team-card .value { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .94rem; color: #D6DFEB; }
.team-card .value b { color: var(--teal-bright); }

/* ---------- Forms ---------- */
.form-shell {
  border-radius: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-l);
  overflow: hidden;
}
.form-shell .fs-head { padding: 26px clamp(20px, 4vw, 40px); background: var(--navy); color: #C9D5E4; }
.form-shell .fs-head h2 { color: var(--white); font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem); }
.form-shell .fs-head p { margin: 8px 0 0; }
.form-shell form { padding: clamp(20px, 4vw, 40px); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form-section { padding-bottom: 30px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.form-section:last-of-type { border-bottom: 0; margin-bottom: 0; }
.form-section > legend {
  display: flex; align-items: center; gap: 12px;
  padding: 0;
  margin-bottom: 18px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 540;
  color: var(--navy);
}
.form-section > legend .num {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--mint);
  color: var(--teal-deep);
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 700;
}
.fields { display: grid; gap: 20px; }
@media (min-width: 720px) { .fields.two { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 7px; min-width: 0; }
.field > label, .field > .label, .group-label {
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
}
.req { color: var(--coral-ink); font-weight: 700; }
.opt { color: var(--muted); font-weight: 500; font-size: .9rem; }
.help { color: var(--muted); font-size: .9rem; margin: -2px 0 0; line-height: 1.45; }
input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1.5px solid var(--line-2);
  border-radius: 12px;
  background: var(--white);
  color: var(--navy);
  font-size: 1.02rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310223D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 42px;
}
input:hover, select:hover, textarea:hover { border-color: #B9B2A0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal-ink); box-shadow: 0 0 0 4px rgba(15, 118, 110, .16); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--coral-ink); }
.field-error { display: none; align-items: center; gap: 6px; color: var(--coral-ink); font-weight: 600; font-size: .9rem; }
.field-error svg { width: 16px; height: 16px; }
.has-error > .field-error, .has-error .field-error { display: flex; }

.choice-grid { display: grid; gap: 8px; }
@media (min-width: 560px) { .choice-grid.cols-2 { grid-template-columns: 1fr 1fr; } .choice-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 10px 14px;
  border: 1.5px solid var(--line-2);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.3;
  transition: border-color .15s ease, background-color .15s ease;
}
.choice:hover { border-color: #B9B2A0; }
.choice input {
  appearance: none;
  flex: none;
  width: 20px; height: 20px;
  margin: 0;
  border: 1.5px solid var(--line-2);
  border-radius: 6px;
  background: var(--white) center / 14px no-repeat;
  display: grid; place-items: center;
}
.choice input[type="radio"] { border-radius: 50%; }
.choice input:checked { background-color: var(--teal-ink); border-color: var(--teal-ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.choice input[type="radio"]:checked { background-image: radial-gradient(circle, white 0 3.5px, transparent 4px); background-size: auto; }
.choice input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice:has(input:checked) { border-color: var(--teal-ink); background: var(--mint-2); color: var(--navy); }
.choice small { display: block; font-weight: 500; color: var(--muted); font-size: .85rem; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: grid; gap: 18px; margin-top: 10px; }
.consent-box { padding: 16px 18px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); }
.consent-box .choice { border: 0; background: transparent; padding: 0; min-height: 0; align-items: flex-start; font-weight: 500; color: var(--ink-2); }
.consent-box .choice input { margin-top: 2px; }
.consent-box .choice:has(input:checked) { background: transparent; }
.form-summary {
  display: none;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--coral-soft);
  border: 1px solid #F4CEC7;
  color: #5E221B;
}
.form-summary.is-visible { display: block; }
.form-summary h3 { font-size: 1rem; color: #5E221B; margin-bottom: 6px; }
.form-summary ul { padding-left: 20px; }
.form-summary a { color: #7A2A20; font-weight: 600; }
.form-status { display: none; }
.form-status.is-visible { display: block; }
.privacy-line { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .9rem; }
.privacy-line svg { width: 18px; height: 18px; color: var(--teal-ink); margin-top: 2px; }

.success {
  padding: clamp(28px, 5vw, 56px);
  text-align: center;
}
.success .big-check { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 24px; background: var(--mint); color: var(--teal-deep); }
.success .big-check svg { width: 36px; height: 36px; }
.success h2 { font-size: clamp(1.8rem, 1.4rem + 1.5vw, 2.5rem); margin-bottom: 12px; outline: none; }
.success p { max-width: 36em; margin-inline: auto; color: var(--ink-2); }
.success ol { text-align: left; max-width: 30em; margin: 24px auto 0; display: grid; gap: 10px; padding-left: 22px; color: var(--ink-2); }

.updates {
  display: grid;
  gap: 18px;
  align-items: center;
  padding: clamp(24px, 4vw, 36px);
  border-radius: 24px;
  background: var(--white);
  border: 1px solid var(--line);
}
@media (min-width: 900px) { .updates { grid-template-columns: 1fr 1.1fr; gap: 40px; } }
.updates h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); }
.updates p { margin: 8px 0 0; color: var(--muted); }
.updates form { display: grid; gap: 10px; }
.updates .row { display: flex; gap: 10px; flex-wrap: wrap; }
.updates .row input { flex: 1 1 220px; }
.updates .ok { display: none; align-items: center; gap: 8px; color: var(--teal-deep); font-weight: 700; }
.updates .ok svg { width: 20px; height: 20px; }
.updates.is-done .ok { display: flex; }
.updates.is-done .row { display: none; }

/* ---------- Prose (legal / about) ---------- */
.prose { max-width: 720px; }
.prose h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); margin: 48px 0 14px; }
.prose h3 { margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1em; display: grid; gap: 6px; }
.draft-banner {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--amber-soft);
  border: 1px solid #F1DDAE;
  color: #4F3A10;
  margin-bottom: 32px;
}
.draft-banner svg { width: 22px; height: 22px; color: var(--amber); margin-top: 1px; }
.draft-banner p { margin: 0; }
.prose .ph { background: #FFF1C2; padding: 0 4px; border-radius: 4px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #AFBDD0;
  padding: clamp(56px, 7vw, 88px) 0 32px;
  margin-top: 0;
  font-size: .98rem;
}
.footer-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; } }
@media (min-width: 560px) and (max-width: 899px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } .footer-brand { grid-column: 1 / -1; } }
.footer-brand .brand { color: var(--white); }
.footer-brand .brand-name span { color: var(--teal-bright); }
.footer-brand p { margin: 16px 0 0; max-width: 24em; }
.footer-brand .cognary { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); color: #D0DAE7; font-size: .88rem; font-weight: 600; }
.footer-col h2 { font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--white); margin-bottom: 14px; }
.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a { color: #AFBDD0; text-decoration: none; }
.footer-col a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .88rem;
  color: #8FA0B8;
}
.footer-bottom p { margin: 0; }

/* ---------- Reveal on scroll (progressive; content visible without JS) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--rd, 0s); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
}

@media print {
  .site-header, .site-footer, .nav-toggle, .demo, .hero-rings { display: none !important; }
  body { background: white; }
}
