/* ======================================================================
   Meterless site, shared system (light / warm paper edition)
   ======================================================================
   Design direction: editorial + operator. Warm paper background, deep
   ink, burnt orange accent. Serif display for moments of conviction,
   sans for body, mono for instruments. Every page inherits this.
   ====================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Canvas */
  --paper:     #f5f1e8;   /* warm paper, page bg */
  --paper-2:   #ece7d9;   /* slightly deeper paper for bands */
  --paper-3:   #e3ddcc;   /* hairline rule, dividers */
  --card:      #fbf8f0;   /* raised cards, just whiter than paper */
  --card-2:    #ffffff;   /* pure white, for instrument panels */

  /* Ink */
  --ink:       #141311;   /* near-black, slightly warm */
  --ink-2:     #2a2723;   /* body ink */
  --ink-dim:   #5a544a;   /* secondary text */
  --ink-mute:  #8a8377;   /* tertiary / captions */
  --ink-faint: #b8b1a0;   /* faint, hairlines */

  /* Rule / border */
  --rule:      #d9d2be;
  --rule-soft: #e5dfcc;

  /* Accent, burnt orange, used SPARINGLY */
  --accent:       #c2410c;
  --accent-hot:   #9a2f08;
  --accent-soft:  #f5d9c4;
  --accent-tint:  #f9e6d4;

  /* Per-product colors, reuse from Homepage brand system */
  --c-gaia:   #0a72ef;     /* blue, the mind */
  --c-swarms: #7928ca;     /* violet, many agents */
  --c-relay:  #0d8048;     /* deep emerald, the hands */
  --c-focus:  #2bbc8a;     /* mint, the lens */

  /* Fonts (aligned with index.html deck: Fraunces + JetBrains Mono) */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
  --font-serif: 'Fraunces', 'Times New Roman', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Motion */
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* =====================================================================
   Base
   ===================================================================== */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; transition: color .15s ease, opacity .15s ease; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
::selection { background: var(--accent); color: #fff; }

/* =====================================================================
   Layout
   ===================================================================== */

.wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px;
}
@media (max-width: 720px) { .wrap { padding: 0 24px; } }

.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--rule-soft) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

/* =====================================================================
   TOP BAR
   ===================================================================== */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule-soft);
}
@media (max-width: 720px) { .topbar { padding: 0 20px; height: 52px; } }

.brand-lock {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0;            /* hide the raw text node; wordmark renders via ::after */
  letter-spacing: -0.01em;
  color: transparent;
  line-height: 0;
  text-decoration: none;
}
/* Brand mark (26×26 rounded square + zigzag glyph). */
.brand-lock .mark {
  display: block;
  width: 26px;
  height: 26px;
  background: url("assets/brand-mark.svg") center / contain no-repeat;
  border-radius: 0;
  color: transparent;
}
.brand-lock .mark svg { display: none; }   /* legacy inline glyph hidden */
/* Wordmark (676×72, ~9.39:1) — rendered after the mark via background image. */
.brand-lock::after {
  content: "";
  display: block;
  width: 132px;            /* 9.39 × 14 ≈ 132px at 14px tall */
  height: 14px;
  background: url("assets/word-mark.svg") left center / contain no-repeat;
}
@media (max-width: 720px) {
  .brand-lock { gap: 8px; }
  .brand-lock .mark { width: 22px; height: 22px; }
  .brand-lock::after { width: 113px; height: 12px; }
}

.top-nav {
  display: flex; align-items: center; gap: 8px;
}
.top-btn {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--ink); line-height: 1;
  transition: background 160ms ease, border-color 160ms ease;
}
.top-btn:hover { background: var(--card-2); border-color: color-mix(in srgb, var(--accent) 35%, var(--rule)); }
.top-btn .tb-ic { width: 14px; height: 14px; display: inline-grid; place-items: center; color: var(--ink-mute); }
.top-btn .tb-ic svg { width: 14px; height: 14px; }
.top-btn:hover .tb-ic { color: var(--accent); }
@media (max-width: 720px) {
  .top-btn { padding: 6px 10px; font-size: 12px; }
  .top-btn .tb-ic { display: none; }
}

.top-meta {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 8px;
  padding-left: 14px;
  border-left: 1px solid var(--rule);
}
@media (max-width: 720px) { .top-meta { display: none; } }
.top-meta .live {
  width: 6px; height: 6px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.18);
  animation: pulse-live 2s ease-in-out infinite;
}
@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* =====================================================================
   DOCK, bottom nav for product switching
   ===================================================================== */

.dock {
  position: fixed;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex; align-items: center; gap: 2px;
  padding: 6px;
  background: var(--ink);
  border-radius: 999px;
  box-shadow: 0 12px 40px -8px rgba(20,19,17,0.35), 0 2px 6px rgba(20,19,17,0.15);
}
.dock-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  transition: all .18s ease;
}
.dock-item:hover { color: #fff; background: rgba(255,255,255,0.06); }
.dock-item .dock-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.35);
}
.dock-item[data-product="gaia"]   .dock-dot { background: var(--c-gaia); }
.dock-item[data-product="swarms"] .dock-dot { background: var(--c-swarms); }
.dock-item[data-product="relay"]  .dock-dot { background: var(--c-relay); }
.dock-item[data-product="focus"]  .dock-dot { background: var(--c-focus); }
.dock-item.active { color: #fff; background: rgba(255,255,255,0.08); }
.dock-sep { width: 1px; height: 18px; background: rgba(255,255,255,0.1); margin: 0 4px; }

/* =====================================================================
   TYPE, editorial display system
   ===================================================================== */

/* Serif display, used sparingly, for big conviction moments */
.serif {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
}

.display-xl {
  font-size: clamp(56px, 9vw, 140px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.92;
  color: var(--ink);
}
.display-l {
  font-size: clamp(44px, 6vw, 88px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.98;
  color: var(--ink);
}
.display-m {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
  color: var(--ink);
}

.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--ink-dim);
  line-height: 1.5;
  max-width: 560px;
}

/* Mono labels, used like field markers on architectural drawings */
.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.mono-label.accent { color: var(--accent); }
.mono-label.ink { color: var(--ink-2); }

/* Eyebrow, section tag with a leading bar */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
}

/* =====================================================================
   BUTTONS, conversion-focused
   ===================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 10px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 1px 2px rgba(20,19,17,0.15), 0 0 0 1px var(--ink);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -4px rgba(20,19,17,0.35), 0 0 0 1px var(--ink);
}
.btn-primary .arrow { transition: transform .2s ease; }
.btn-primary:hover .arrow { transform: translateX(3px); }

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(194,65,12,0.2), 0 0 0 1px var(--accent);
}
.btn-accent:hover {
  background: var(--accent-hot);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -4px rgba(194,65,12,0.4), 0 0 0 1px var(--accent-hot);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--rule);
}
.btn-ghost:hover {
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--ink);
}

/* Inline link with underline */
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
  transition: color .15s;
}
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }

/* =====================================================================
   SECTIONS
   ===================================================================== */

.section { padding: 120px 0; position: relative; }
@media (max-width: 720px) { .section { padding: 80px 0; } }

.section-hair { border-top: 1px solid var(--rule-soft); }
.section-band { background: var(--paper-2); }

.section-head { margin-bottom: 64px; max-width: 900px; }
.section-head h2 {
  font-family: var(--font-sans);
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
  color: var(--ink);
  margin: 0 0 18px;
}
.section-head h2 em {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.015em;
}
.section-head .sub {
  font-size: 18px;
  color: var(--ink-dim);
  line-height: 1.5;
  max-width: 560px;
}

/* Ledger line, a thin rule with a mono label, used for section tops */
.ledger-line {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 36px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.ledger-line::before,
.ledger-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.ledger-line::before { flex: 0 0 60px; }

/* =====================================================================
   CARDS
   ===================================================================== */

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 28px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--ink-2);
  box-shadow: 0 20px 40px -20px rgba(20,19,17,0.2);
}

/* =====================================================================
   INSTRUMENT PANEL, for demos & terminals
   ===================================================================== */

.panel {
  background: var(--card-2);
  border: 1px solid var(--rule);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 2px 4px rgba(20,19,17,0.04),
    0 24px 60px -30px rgba(20,19,17,0.18);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule-soft);
  background: var(--card);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.panel-head .dots { display: flex; gap: 6px; }
.panel-head .dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--rule);
}
.panel-body { padding: 24px; }

/* =====================================================================
   ANIMATIONS
   ===================================================================== */

.fade-up { opacity: 0; transform: translateY(16px); animation: fadeUp 1s var(--ease) forwards; }
.fade-up.d-1 { animation-delay: 0.05s; }
.fade-up.d-2 { animation-delay: 0.15s; }
.fade-up.d-3 { animation-delay: 0.25s; }
.fade-up.d-4 { animation-delay: 0.35s; }
.fade-up.d-5 { animation-delay: 0.45s; }
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* =====================================================================
   FOOTER
   ===================================================================== */

.footer {
  padding: 60px 0 100px;
  border-top: 1px solid var(--rule-soft);
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 18px;
}
.footer a:hover { color: var(--ink); }

/* =====================================================================
   TWEAK: per-product accent (legacy var name kept for product pages)
   ===================================================================== */
.hair { background: var(--rule); height: 1px; width: 100%; }
.hair-dash {
  background-image: linear-gradient(to right, var(--rule) 50%, transparent 50%);
  background-size: 8px 1px;
  background-repeat: repeat-x;
  height: 1px;
  width: 100%;
}

/* =====================================================================
   MODAL — top-bar Resources & Support overlays
   ===================================================================== */

.mm-overlay {
  position: fixed; inset: 0;
  z-index: 200;
  background: color-mix(in srgb, var(--ink) 55%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 40px 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 200ms ease;
}
.mm-overlay.is-open { opacity: 1; pointer-events: auto; }

.mm-card {
  position: relative;
  width: min(1080px, 100%);
  max-height: calc(100vh - 80px);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 24px 80px -20px color-mix(in srgb, var(--ink) 35%, transparent);
  display: flex; flex-direction: column;
  overflow: hidden;
  transform: translateY(8px) scale(0.98);
  transition: transform 240ms cubic-bezier(.2,.8,.2,1);
}
.mm-overlay.is-open .mm-card { transform: translateY(0) scale(1); }
.mm-card-sm { width: min(720px, 100%); }

.mm-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px;
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--rule);
  flex-shrink: 0;
}
.mm-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.mm-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 400; letter-spacing: -0.025em; line-height: 1.05;
  color: var(--ink);
  margin: 0;
  font-variation-settings: "opsz" 144;
}
.mm-title em { font-style: italic; color: var(--accent); font-variation-settings: "opsz" 144; }

/* Secondary headline inside modal body (below header strip) */
.mm-body > .mm-title.mm-body-lede {
  margin: 0 0 8px;
}

.mm-close {
  appearance: none; cursor: pointer;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 22px; line-height: 1;
  color: var(--ink-mute);
  font-family: var(--font-sans);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.mm-close:hover { background: var(--card-2); color: var(--ink); border-color: var(--accent); }

.mm-body {
  padding: 28px 32px 32px;
  overflow-y: auto;
}

.mm-lede {
  font-family: var(--font-sans);
  font-size: 15px; line-height: 1.55;
  color: var(--ink-dim);
  max-width: 64ch;
  margin: 0 0 24px;
}

.mm-engines { margin-bottom: 28px; }

.mm-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.mm-links-cols { padding-top: 0; border-top: none; }

.mm-link {
  display: flex; flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.mm-link:hover { background: var(--card-2); border-color: var(--accent); transform: translateY(-1px); }
.mm-link b {
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ink);
}
.mm-link span {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.02em;
  color: var(--ink-mute);
}

.mm-link-lg {
  padding: 20px;
  gap: 8px;
}
.mml-ic {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  background: var(--card-2);
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--accent);
  margin-bottom: 6px;
}
.mml-ic svg { width: 18px; height: 18px; }
.mm-link-lg b { font-size: 15px; }

@media (max-width: 720px) {
  .mm-overlay { padding: 16px; }
  .mm-card { max-height: calc(100vh - 32px); border-radius: 12px; }
  .mm-head { padding: 20px 22px 16px; }
  .mm-body { padding: 22px; }
  .mm-title { font-size: 26px; }
}

/* Lock body scroll when a modal is open */
body.mm-locked { overflow: hidden; }

/* =====================================================================
   ENGINE CAROUSEL — five primitives (Resources modal on all pages)
   ===================================================================== */

.engines-flow {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: stretch;
  position: relative;
}
@media (max-width: 720px) {
  .engines-flow { grid-template-columns: 1fr; gap: 32px; }
}

.ef-engines { display: flex; flex-direction: column; gap: 0; }
.ef-engine {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 18px;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}
.ef-engine:last-child { border-bottom: 1px solid var(--rule); }
.ef-engine:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.ef-engine:hover h5 { color: var(--accent); }
.ef-engine { transition: background 160ms ease; padding-left: 6px; padding-right: 6px; margin-left: -6px; margin-right: -6px; }
.ef-engine .ef-n {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em; color: var(--ink-mute);
  padding-top: 4px;
}
.ef-engine h5 {
  font-family: var(--font-sans);
  font-size: 18px; font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.25; margin: 0 0 4px;
  color: var(--ink);
}
.ef-engine h5 em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  color: var(--ink-dim); font-size: 14.5px; margin-left: 6px;
  letter-spacing: -0.005em;
}
.ef-engine .ef-tag {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--ink-mute); letter-spacing: 0.04em;
  line-height: 1.5;
}

.ef-stage {
  display: flex; flex-direction: column;
  gap: 10px;
  --ef-c: var(--accent);
}
.ef-stage[data-active="0"] { --ef-c: #B8542B; }
.ef-stage[data-active="1"] { --ef-c: #6B3FA0; }
.ef-stage[data-active="2"] { --ef-c: #2563EB; }
.ef-stage[data-active="3"] { --ef-c: #C4513A; }
.ef-stage[data-active="4"] { --ef-c: #2A7A4D; }

.ef-stage-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  padding: 0 4px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mute);
}
.ef-sh-left { display: flex; gap: 8px; align-items: center; min-width: 0; flex-wrap: wrap; }
.ef-sh-n { color: var(--ink-mute); }
.ef-sh-n b { color: var(--ink); font-weight: 500; }
.ef-sh-name { color: var(--ef-c); font-weight: 600; transition: color 300ms ease; }
.ef-sh-sep { color: var(--ink-mute); }
.ef-sh-sub { color: var(--ink-mute); }
.ef-sh-phase {
  display: inline-block;
  padding: 3px 8px;
  background: color-mix(in srgb, var(--ef-c) 12%, transparent);
  color: var(--ef-c);
  border-radius: 3px;
  font-weight: 500;
  transition: all 300ms ease;
}

.ef-stage-body {
  position: relative;
  aspect-ratio: 5 / 4;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 0 var(--paper) inset, 0 20px 40px -28px rgba(20,19,17,0.18);
}
.ef-vis {
  position: absolute; inset: 0;
  transition: opacity 280ms ease;
}
.ef-vis.fading { opacity: 0; }

.ef-dots {
  position: absolute; left: 12px; bottom: 12px;
  display: flex; gap: 6px;
  z-index: 5;
  padding: 6px 8px;
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  border: 1px solid var(--rule);
  border-radius: 100px;
  backdrop-filter: blur(4px);
}
.ef-dot {
  width: 24px; height: 4px; border-radius: 2px;
  background: var(--rule);
  border: none; padding: 0; cursor: pointer;
  transition: background 200ms ease, width 200ms ease;
}
.ef-dot:hover { background: color-mix(in srgb, var(--ef-c) 50%, var(--rule)); }
.ef-dot.on { background: var(--ef-c); width: 32px; }
.ef-dot span { position: absolute; left: -9999px; }

.ef-stage-foot {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 4px 4px 0;
}
.ef-sh-desc {
  margin: 0;
  font-size: 13px; color: var(--ink-dim);
  line-height: 1.5;
  flex: 1;
  text-wrap: pretty;
}
.ef-sh-link {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ef-c);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
  transition: color 300ms ease;
}
.ef-sh-link span { margin-left: 4px; }
.ef-sh-link:hover { text-decoration: underline; }

/* H-MEM */
.v-hmem { position: absolute; inset: 0; padding: 28px 32px 56px; display: flex; flex-direction: column; gap: 14px; }
.v-hmem .vh-tier { border: 1px solid var(--rule); border-radius: 3px; padding: 10px 14px; background: var(--paper-2); position: relative; transition: all 400ms ease; }
.v-hmem .vh-tier .vh-tname { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; color: var(--ink-mute); margin-bottom: 6px; }
.v-hmem .vh-tier .vh-row { display: flex; gap: 6px; flex-wrap: wrap; }
.v-hmem .vh-tier .vh-cell { padding: 4px 8px; font-family: var(--font-mono); font-size: 10.5px; background: var(--paper); border: 1px solid var(--rule); border-radius: 2px; color: var(--ink-dim); transition: all 300ms ease; }
.v-hmem .vh-tier.hit { border-color: var(--ef-c); background: color-mix(in srgb, var(--ef-c) 6%, var(--paper-2)); }
.v-hmem .vh-tier.hit .vh-cell.lit { background: color-mix(in srgb, var(--ef-c) 14%, var(--paper)); border-color: var(--ef-c); color: var(--ink); }
.v-hmem .vh-flow { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--ef-c) 30%, transparent), transparent); pointer-events: none; opacity: 0.4; }

/* Markovian */
.v-mk { position: absolute; inset: 0; padding: 28px 32px 56px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.v-mk .mk-strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; height: 28px; }
.v-mk .mk-cell { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 2px; transition: all 300ms ease; }
.v-mk .mk-cell.in { background: color-mix(in srgb, var(--ef-c) 18%, var(--paper)); border-color: var(--ef-c); }
.v-mk .mk-cell.out { background: var(--paper-2); opacity: 0.4; }
.v-mk .mk-window { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; color: var(--ink-mute); display: flex; justify-content: space-between; }
.v-mk .mk-window b { color: var(--ef-c); font-weight: 600; }
.v-mk .mk-arrow { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); }
.v-mk .mk-arrow .mk-blob { width: 14px; height: 14px; background: color-mix(in srgb, var(--ef-c) 30%, transparent); border: 1px solid var(--ef-c); border-radius: 50%; animation: mkPulse 1.6s ease-in-out infinite; }
@keyframes mkPulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: 0.5; } }
.v-mk .mk-out-strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; height: 18px; }
.v-mk .mk-out-strip .mk-cell { background: color-mix(in srgb, var(--ef-c) 8%, var(--paper)); }

/* Scout */
.v-sc { position: absolute; inset: 0; padding: 24px 32px 56px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: center; }
.v-sc .sc-input { font-family: var(--font-mono); font-size: 12px; color: var(--ink); padding: 10px 12px; border: 1px solid var(--rule); background: var(--paper-2); border-radius: 3px; line-height: 1.5; min-height: 80px; position: relative; }
.v-sc .sc-caret { display: inline-block; width: 6px; height: 12px; background: var(--ef-c); margin-left: 2px; vertical-align: -1px; animation: scCaret 1s steps(2) infinite; }
@keyframes scCaret { 50% { opacity: 0; } }
.v-sc .sc-radar { display: flex; flex-direction: column; gap: 6px; }
.v-sc .sc-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--ink-mute); margin-bottom: 4px; }
.v-sc .sc-bar { display: grid; grid-template-columns: 90px 1fr 30px; gap: 8px; align-items: center; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-dim); }
.v-sc .sc-bar .sc-name { text-align: right; }
.v-sc .sc-bar .sc-track { height: 6px; background: var(--paper-2); border-radius: 3px; overflow: hidden; position: relative; }
.v-sc .sc-bar .sc-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ef-c); border-radius: 3px; transition: width 500ms ease; }
.v-sc .sc-bar .sc-pct { color: var(--ink-mute); font-size: 10px; }
.v-sc .sc-bar.lead .sc-name { color: var(--ef-c); font-weight: 600; }

/* Swarm */
.v-sw { position: absolute; inset: 0; padding: 24px 28px 56px; display: flex; flex-direction: column; }
.v-sw .sw-svg { flex: 1; width: 100%; height: 100%; }
.v-sw .sw-svg circle.node { fill: var(--paper-2); stroke: var(--rule); stroke-width: 1; transition: all 300ms ease; }
.v-sw .sw-svg circle.node.hit { fill: color-mix(in srgb, var(--ef-c) 25%, var(--paper)); stroke: var(--ef-c); stroke-width: 1.5; }
.v-sw .sw-svg circle.node.done { fill: var(--ef-c); stroke: var(--ef-c); }
.v-sw .sw-svg line.edge { stroke: var(--rule); stroke-width: 1; }
.v-sw .sw-svg line.edge.hit { stroke: var(--ef-c); stroke-width: 1.5; stroke-dasharray: 3 3; animation: swDash 0.6s linear infinite; }
@keyframes swDash { to { stroke-dashoffset: -6; } }
.v-sw .sw-svg text { font-family: var(--font-mono); font-size: 7px; fill: var(--ink-mute); letter-spacing: 0.08em; }
.v-sw .sw-svg text.lit { fill: var(--ef-c); font-weight: 600; }
.v-sw .sw-counter { position: absolute; top: 24px; right: 32px; font-family: var(--font-mono); font-size: 10px; color: var(--ink-mute); letter-spacing: 0.14em; }
.v-sw .sw-counter b { color: var(--ef-c); font-weight: 600; }

/* World Model */
.v-wm { position: absolute; inset: 0; padding: 24px 32px 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: center; }
.v-wm .wm-state { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 3px; padding: 12px 14px; }
.v-wm .wm-st-h { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; color: var(--ink-mute); margin-bottom: 8px; display: flex; justify-content: space-between; }
.v-wm .wm-st-h b { color: var(--ef-c); font-weight: 600; }
.v-wm .wm-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 4px 0; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-dim); border-top: 1px dashed var(--rule); transition: all 300ms ease; }
.v-wm .wm-row:first-of-type { border-top: none; }
.v-wm .wm-row b { color: var(--ink); font-weight: 500; }
.v-wm .wm-row.hit { color: var(--ink); }
.v-wm .wm-row.hit b { color: var(--ef-c); }
.v-wm .wm-agents { display: flex; flex-direction: column; gap: 8px; }
.v-wm .wm-agent { display: grid; grid-template-columns: 8px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 3px; background: var(--paper); font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-dim); transition: all 300ms ease; }
.v-wm .wm-agent .wm-aglyph { width: 8px; height: 8px; border-radius: 50%; background: var(--rule); }
.v-wm .wm-agent.hit { border-color: var(--ef-c); background: color-mix(in srgb, var(--ef-c) 6%, var(--paper)); }
.v-wm .wm-agent.hit .wm-aglyph { background: var(--ef-c); }
.v-wm .wm-agent .wm-aname { color: var(--ink); }
.v-wm .wm-agent .wm-aact { color: var(--ink-mute); font-size: 9.5px; }
.v-wm .wm-agent.hit .wm-aact { color: var(--ef-c); }
.v-wm .wm-link { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em; color: var(--ef-c); padding: 4px 8px; background: color-mix(in srgb, var(--ef-c) 10%, var(--paper)); border: 1px solid var(--ef-c); border-radius: 100px; pointer-events: none; }

/* =====================================================================
   VIDEO / IFRAME SHEET (impact proof modal + Gen AI Talks)
   ===================================================================== */

.impact-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 40px;
}
.impact-modal.on { display: flex; animation: imFade 200ms ease; }
@keyframes imFade { from { opacity: 0; } to { opacity: 1; } }
.impact-modal-backdrop {
  position: absolute; inset: 0;
  background: color-mix(in srgb, var(--ink) 75%, transparent);
  backdrop-filter: blur(6px);
}
.impact-modal-shell {
  position: relative;
  width: min(1200px, 100%); height: min(820px, 90vh);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 80px color-mix(in srgb, var(--ink) 30%, transparent);
  animation: imSlide 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes imSlide { from { transform: translateY(12px) scale(0.985); opacity: 0; } to { transform: none; opacity: 1; } }
.impact-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 20px;
  border-bottom: 1px solid var(--rule);
  background: var(--card-2);
}
.impact-modal-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.impact-modal-title .imt-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em;
  color: var(--accent); text-transform: uppercase;
}
.impact-modal-title h3 {
  font-family: var(--font-display, var(--font-sans));
  font-size: 18px; font-weight: 600; letter-spacing: -0.02em;
  margin: 0; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.impact-modal-close {
  appearance: none; background: transparent; border: 1px solid var(--rule);
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 20px; line-height: 1; color: var(--ink-dim);
  cursor: pointer; flex-shrink: 0;
  transition: border-color 160ms ease, color 160ms ease;
}
.impact-modal-close:hover { border-color: var(--accent); color: var(--accent); }
.impact-modal-body { flex: 1; min-height: 0; background: var(--card-2); }
.impact-modal-body iframe {
  width: 100%; height: 100%; border: 0; display: block; background: var(--paper);
}
body.impact-modal-open,
body.talks-modal-open { overflow: hidden; }
@media (max-width: 700px) {
  .impact-modal { padding: 12px; }
  .impact-modal-shell { height: 92vh; border-radius: 10px; }
}
