/* ============================================================
 * RAG & Search page — local stylesheet (rs- prefix)
 * Design vocabulary: editorial · retrieval pipeline · teal accent
 * Mirrors the v2 / marketing conventions so AI & Automation reads as
 * one studio. LIME stays the site-wide primary accent; teal
 * (--rs-teal) flavors the demo / pipeline / dashboard internals only.
 * ============================================================ */

.rs-page {
  --rs-teal: #14B8A6;
  --rs-teal-2: #2DD4BF;
  --rs-amber: #F59E0B;
  --rs-red: #F4796F;
  --rs-paper: #E7F2F0;
  --rs-ink: #06100F;
  --rs-lime: #d4ff3a;
  --rs-paper-soft: rgba(231, 242, 240, 0.04);
  --rs-line: rgba(231, 242, 240, 0.12);
  --rs-line-strong: rgba(231, 242, 240, 0.22);
  --rs-mono: 'JetBrains Mono', ui-monospace, monospace;
  --rs-display: 'Fraunces', 'Bodoni Moda', serif;
  --rs-sans: 'Space Grotesk', system-ui, sans-serif;
  background: var(--rs-ink);
  color: var(--rs-paper);
}

/* ===== shared atoms ===== */
.rs-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--rs-mono);
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(231, 242, 240, 0.62);
  padding: 8px 12px;
  border: 1px solid var(--rs-line);
  border-radius: 999px;
  background: var(--rs-paper-soft);
}
.rs-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
  animation: rsPulse 2.4s ease-in-out infinite;
}
@keyframes rsPulse { 0%, 100% { opacity: 1 } 50% { opacity: 0.45 } }

.rs-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--rs-sans);
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.04em;
  padding: 14px 22px;
  border: 1px solid var(--rs-line-strong);
  border-radius: 999px;
  color: var(--rs-paper);
  background: transparent;
  text-decoration: none;
  transition: background-color 0.35s cubic-bezier(0.16,1,0.3,1),
              color 0.35s cubic-bezier(0.16,1,0.3,1),
              border-color 0.35s cubic-bezier(0.16,1,0.3,1);
}
.rs-btn:hover { background: var(--rs-paper); color: var(--rs-ink); border-color: var(--rs-paper); }
/* Primary CTA — LIME per site convention. --rs-btn--teal aliases lime so
 * markup can opt into a "teal" name without ever colouring a primary CTA teal. */
.rs-btn--lime,
.rs-btn--teal {
  background: var(--rs-lime);
  color: var(--rs-ink);
  border-color: var(--rs-lime);
}
.rs-btn--lime:hover,
.rs-btn--teal:hover { background: transparent; color: var(--rs-lime); border-color: var(--rs-lime); }
.rs-btn .arr { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.rs-btn:hover .arr { transform: translateX(4px); }

.rs-section {
  position: relative;
  padding: 140px 6vw 160px;
  z-index: 2;
}
.rs-pipeline, .rs-arch, .rs-tools, .rs-compound, .rs-ledger, .rs-cta {
  z-index: 5;
  isolation: isolate;
}
.rs-program { z-index: 1; }
.rs-program__sticky { z-index: 1; }
.rs-pipe__stage, .rs-pipe__panel, .rs-pipe__slider,
.rs-tools__grid, .rs-tool {
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
.rs-section__head {
  max-width: 880px;
  margin: 0 auto 80px;
  text-align: center;
}
.rs-section__title {
  font-family: var(--rs-display);
  font-weight: 400;
  font-size: clamp(40px, 5.6vw, 92px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 24px 0 24px;
  font-variation-settings: 'opsz' 144, 'SOFT' 30, 'WONK' 1;
}
.rs-section__title em { font-style: italic; color: var(--rs-lime); }
.rs-section__lede {
  font-family: var(--rs-sans);
  font-size: 17px; line-height: 1.62;
  color: rgba(231, 242, 240, 0.70);
  max-width: 640px; margin: 0 auto;
}
.rs-section__lede em {
  font-family: var(--rs-display); font-style: italic;
  color: var(--rs-paper); font-weight: 500;
}

/* ============================================================
 * 01 — HERO (retrieval console)
 * ============================================================ */
.rs-hero {
  position: relative; min-height: 100vh;
  padding: 120px 6vw 60px; overflow: hidden; z-index: 1;
}
.rs-hero__grain {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.06;
  background-image:
    radial-gradient(rgba(231, 242, 240, 0.6) 1px, transparent 1px),
    radial-gradient(rgba(231, 242, 240, 0.6) 1px, transparent 1px);
  background-size: 4px 4px, 6px 6px; background-position: 0 0, 2px 3px;
  mix-blend-mode: overlay;
}
.rs-hero__three {
  position: absolute; top: 6%; right: -8%;
  width: 72vw; max-width: 1000px; height: 76vh;
  pointer-events: none; opacity: 0.62; z-index: 0;
}
.rs-hero__inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px;
  align-items: center; min-height: calc(100vh - 240px);
}
.rs-hero__left { padding-right: 20px; }
.rs-hero__title {
  font-family: var(--rs-display); font-weight: 400;
  font-size: clamp(48px, 6.4vw, 108px); line-height: 1.0;
  letter-spacing: -0.025em; margin: 28px 0 28px;
  font-variation-settings: 'opsz' 144, 'wght' 400, 'SOFT' 30, 'WONK' 1;
}
.rs-hero__title em { font-style: italic; color: var(--rs-lime); }
.rs-hero__lede {
  font-family: var(--rs-sans); font-size: 18px; line-height: 1.62;
  color: rgba(231, 242, 240, 0.72); max-width: 540px;
}
.rs-hero__cta-row { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }
.rs-hero__caption {
  margin-top: 38px; font-family: var(--rs-mono); font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(231, 242, 240, 0.45);
  display: flex; gap: 14px; align-items: baseline;
}
.rs-hero__caption .n {
  font-family: var(--rs-display); font-style: italic; font-size: 16px; color: var(--rs-lime);
}

/* retrieval console */
.rs-hero__console {
  position: relative; width: 100%;
  background: linear-gradient(180deg, #0c1a18 0%, #091210 100%);
  border: 1px solid var(--rs-line); border-radius: 14px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6), 0 0 0 1px rgba(231,242,240,0.04);
  overflow: hidden; display: flex; flex-direction: column;
}
.rs-console__chrome {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--rs-line);
  background: rgba(231, 242, 240, 0.02);
}
.rs-console__title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--rs-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase; color: rgba(231,242,240,0.6);
}
.rs-console__pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--lime); box-shadow: 0 0 10px var(--lime);
  animation: rsPulse 1.6s ease-in-out infinite;
}
.rs-console__roas {
  font-family: var(--rs-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(231,242,240,0.55);
}
.rs-console__roas span {
  font-family: var(--rs-display); font-style: italic; font-size: 18px;
  color: var(--rs-lime); margin-left: 6px;
  font-variation-settings: 'opsz' 96, 'wght' 600;
}
.rs-console__query {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-bottom: 1px solid var(--rs-line);
  background: rgba(231,242,240,0.02);
  font-family: var(--rs-mono); font-size: 12.5px; color: rgba(231,242,240,0.82);
}
.rs-console__query-icon { color: var(--rs-teal); font-size: 14px; }
.rs-console__query-text { flex: 1; }
.rs-console__caret {
  width: 1.5px; height: 14px; background: var(--rs-teal);
  animation: rsCaret 1.1s step-end infinite;
}
.rs-console__body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--rs-line);
}
.rs-console__metric {
  background: #091210; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.rs-console__metric .k {
  font-family: var(--rs-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(231,242,240,0.5);
}
.rs-console__metric .v {
  font-family: var(--rs-display); font-size: 30px; font-weight: 500; color: var(--rs-paper);
  font-variation-settings: 'opsz' 96, 'wght' 500;
}
.rs-console__spark { display: block; width: 100%; height: 90px; background: #091210; }
.rs-console__control {
  padding: 16px 20px 20px; border-top: 1px solid var(--rs-line);
  background: rgba(231,242,240,0.02);
}
.rs-console__control-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--rs-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(231,242,240,0.55); margin-bottom: 12px;
}
.rs-console__budget { font-family: var(--rs-display); font-style: italic; font-size: 18px; color: var(--rs-teal); }
.rs-console__slider, .rs-pipe__slider {
  appearance: none; -webkit-appearance: none; width: 100%; height: 4px;
  background: var(--rs-line); border-radius: 2px; outline: none; cursor: ew-resize;
}
.rs-console__slider::-webkit-slider-thumb, .rs-pipe__slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--lime); cursor: ew-resize; box-shadow: 0 4px 12px rgba(212,255,58,0.5);
}
.rs-console__slider::-moz-range-thumb, .rs-pipe__slider::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--lime);
  cursor: ew-resize; border: 0; box-shadow: 0 4px 12px rgba(212,255,58,0.5);
}
@keyframes rsCaret { 0%,100% { opacity: 1 } 50% { opacity: 0 } }

/* hero metrics row */
.rs-hero__metrics {
  position: relative; z-index: 2; margin-top: 36px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--rs-line);
}
.rs-hero__metric {
  padding: 22px 24px; border-right: 1px solid var(--rs-line);
  display: flex; flex-direction: column; gap: 8px;
}
.rs-hero__metric:last-child { border-right: 0; }
.rs-hero__metric .k {
  font-family: var(--rs-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(231,242,240,0.5);
}
.rs-hero__metric .v {
  font-family: var(--rs-display); font-size: 38px; font-weight: 500; color: var(--rs-paper);
  font-variation-settings: 'opsz' 96, 'wght' 500;
}
.rs-hero__metric .v em { font-style: italic; color: var(--rs-lime); }

/* ============================================================
 * 02 — LEDGER
 * ============================================================ */
.rs-ledger__table { max-width: 1200px; margin: 0 auto; border-top: 1px solid var(--rs-line-strong); }
.rs-ledger__row {
  display: grid; grid-template-columns: 1.2fr 1fr 2.4fr 1fr; gap: 30px;
  padding: 26px 18px; border-bottom: 1px solid var(--rs-line);
  transition: background 0.3s ease, padding 0.3s ease; align-items: baseline;
}
.rs-ledger__row:hover { background: rgba(231,242,240,0.03); padding-left: 28px; }
.rs-ledger__name {
  font-family: var(--rs-display); font-style: italic; font-size: 28px;
  font-variation-settings: 'opsz' 96, 'wght' 500, 'SOFT' 30, 'WONK' 1; color: var(--rs-paper);
}
.rs-ledger__type {
  font-family: var(--rs-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(231,242,240,0.55);
}
.rs-ledger__beat {
  font-family: var(--rs-sans); font-size: 14px; line-height: 1.55; color: rgba(231,242,240,0.72);
}
.rs-ledger__metric { text-align: right; display: flex; flex-direction: column; gap: 4px; }
.rs-ledger__metric em {
  font-family: var(--rs-display); font-style: italic; font-size: 32px; font-weight: 500;
  color: var(--rs-lime); font-variation-settings: 'opsz' 96, 'wght' 500;
}
.rs-ledger__metric span {
  font-family: var(--rs-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(231,242,240,0.45);
}

/* ============================================================
 * 03 — PIPELINE (signature: live retrieval)
 * ============================================================ */
.rs-pipe__stage {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px;
  max-width: 1220px; margin: 0 auto; align-items: start;
}
/* left — knowledge base / retrieved chunks */
.rs-pipe__kb {
  background: #0a1513; border: 1px solid var(--rs-line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.6);
}
.rs-pipe__kb-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--rs-line); background: rgba(231,242,240,0.02);
}
.rs-pipe__kb-mark {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--rs-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(231,242,240,0.74);
}
.rs-pipe__kb-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--rs-teal); box-shadow: 0 0 10px var(--rs-teal); }
.rs-pipe__kb-stage {
  font-family: var(--rs-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--rs-teal);
}
.rs-pipe__chunks { padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 460px; }
.rs-chunk {
  position: relative; padding: 13px 15px 13px 16px; border-radius: 9px;
  background: rgba(231,242,240,0.025); border: 1px solid var(--rs-line);
  display: flex; flex-direction: column; gap: 8px;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), border-color 0.4s ease, background 0.4s ease, opacity 0.4s ease;
}
.rs-chunk.is-cited { border-color: var(--rs-teal); background: rgba(20,184,166,0.08); box-shadow: 0 8px 24px -10px rgba(20,184,166,0.5); }
.rs-chunk.is-dropped { opacity: 0.38; }
.rs-chunk.is-distractor.is-dropped { opacity: 0.3; }
.rs-chunk__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rs-chunk__src {
  font-family: var(--rs-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(231,242,240,0.5);
}
.rs-chunk__cite-no {
  flex: 0 0 auto; width: 19px; height: 19px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--rs-mono); font-size: 11px; font-weight: 600;
  background: var(--rs-teal); color: #04100e;
}
.rs-chunk__text { font-family: var(--rs-sans); font-size: 13px; line-height: 1.45; color: rgba(231,242,240,0.88); }
.rs-chunk__meta { display: flex; align-items: center; gap: 12px; }
.rs-chunk__bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(231,242,240,0.1); overflow: hidden; }
.rs-chunk__bar i { display: block; height: 100%; background: var(--rs-teal-2); border-radius: 2px; transition: width 0.5s cubic-bezier(0.16,1,0.3,1); }
.rs-chunk__score {
  font-family: var(--rs-mono); font-size: 10px; letter-spacing: 0.06em; color: rgba(231,242,240,0.55);
  white-space: nowrap;
}
.rs-chunk__score b { color: var(--rs-teal-2); font-weight: 600; }
.rs-pipe__empty {
  padding: 40px 18px; text-align: center; font-family: var(--rs-sans); font-size: 14px;
  color: rgba(231,242,240,0.4); font-style: italic;
}

/* right — control panel + answer */
.rs-pipe__panel {
  display: flex; flex-direction: column; gap: 18px; padding: 24px;
  background: rgba(231,242,240,0.03); border: 1px solid var(--rs-line); border-radius: 14px;
}
.rs-pipe__queries { display: flex; gap: 8px; flex-wrap: wrap; }
.rs-pipe__q {
  font-family: var(--rs-mono); font-size: 11px; letter-spacing: 0.06em;
  padding: 8px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rs-line); background: transparent; color: rgba(231,242,240,0.7);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.rs-pipe__q:hover { border-color: var(--rs-line-strong); color: var(--rs-paper); }
.rs-pipe__q.is-on { background: var(--rs-teal); color: #04100e; border-color: var(--rs-teal); }
.rs-pipe__askbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 10px; background: rgba(6,16,15,0.6); border: 1px solid var(--rs-line);
  font-family: var(--rs-sans); font-size: 14px; color: var(--rs-paper);
}
.rs-pipe__askbar-icon { color: var(--rs-teal); }
.rs-pipe__controls { display: flex; flex-direction: column; gap: 16px; }
.rs-pipe__control-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--rs-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(231,242,240,0.6); margin-bottom: 10px;
}
.rs-pipe__val { font-family: var(--rs-display); font-style: italic; font-size: 17px; color: var(--rs-teal); }
.rs-pipe__toggles { display: flex; gap: 10px; }
.rs-pipe__toggle {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 12px; border-radius: 10px; cursor: pointer;
  font-family: var(--rs-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--rs-line); background: rgba(6,16,15,0.4); color: rgba(231,242,240,0.55);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.rs-pipe__toggle-dot {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(231,242,240,0.3);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.rs-pipe__toggle.is-on { color: var(--rs-paper); border-color: rgba(20,184,166,0.5); }
.rs-pipe__toggle.is-on .rs-pipe__toggle-dot { background: var(--rs-teal); box-shadow: 0 0 9px var(--rs-teal); }

.rs-pipe__answer {
  border-radius: 12px; padding: 18px; border: 1px solid var(--rs-line);
  background: rgba(6,16,15,0.5); transition: border-color 0.35s ease, background 0.35s ease;
}
.rs-pipe__answer.is-hallucinated { border-color: rgba(244,121,111,0.5); background: rgba(244,121,111,0.06); }
.rs-pipe__answer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.rs-pipe__answer-label {
  font-family: var(--rs-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(231,242,240,0.55);
}
.rs-pipe__answer-flag {
  font-family: var(--rs-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
}
.rs-pipe__answer-flag.is-grounded { color: var(--rs-teal-2); background: rgba(20,184,166,0.14); }
.rs-pipe__answer-flag.is-warn { color: var(--rs-red); background: rgba(244,121,111,0.16); }
.rs-pipe__answer-text {
  font-family: var(--rs-display); font-size: 18px; line-height: 1.5; color: var(--rs-paper);
  font-variation-settings: 'opsz' 40, 'SOFT' 20;
}
.rs-pipe__answer-text sup {
  font-family: var(--rs-mono); font-size: 10px; font-weight: 600; color: var(--rs-teal-2);
  vertical-align: super; padding: 0 1px;
}
.rs-pipe__answer-cites { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.rs-cite {
  display: flex; gap: 8px; align-items: baseline;
  font-family: var(--rs-sans); font-size: 11.5px; color: rgba(231,242,240,0.62); line-height: 1.4;
}
.rs-cite__no {
  flex: 0 0 auto; font-family: var(--rs-mono); font-size: 10px; font-weight: 600; color: var(--rs-teal-2);
}

.rs-pipe__readout {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px;
  background: var(--rs-line); border: 1px solid var(--rs-line); border-radius: 10px; overflow: hidden;
}
.rs-pipe__stat { background: rgba(231,242,240,0.02); padding: 13px 14px; display: flex; flex-direction: column; gap: 5px; }
.rs-pipe__stat .k {
  font-family: var(--rs-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(231,242,240,0.5);
}
.rs-pipe__stat .v {
  font-family: var(--rs-display); font-size: 22px; color: var(--rs-paper);
  font-variation-settings: 'opsz' 96, 'wght' 500;
}
.rs-pipe__stat--hero { background: rgba(20,184,166,0.08); }
.rs-pipe__stat--hero .v { color: var(--rs-lime); font-style: italic; }
.rs-pipe__note {
  font-family: var(--rs-display); font-style: italic; font-size: 15px;
  color: rgba(231,242,240,0.7); line-height: 1.5;
}

/* ============================================================
 * 04 — ARCHITECTURE (mock pipeline dashboard)
 * ============================================================ */
.rs-arch__app {
  max-width: 1200px; margin: 0 auto;
  background: #0a1513; border: 1px solid var(--rs-line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.6);
}
.rs-arch__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--rs-line); background: rgba(231,242,240,0.02);
  flex-wrap: wrap; gap: 10px;
}
.rs-arch__bar-mark {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--rs-mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(231,242,240,0.78);
}
.rs-arch__pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--rs-teal); box-shadow: 0 0 10px var(--rs-teal); }
.rs-arch__bar-strat {
  font-family: var(--rs-mono); font-size: 11px; letter-spacing: 0.1em; color: rgba(231,242,240,0.55);
}
.rs-arch__bar-strat strong { color: var(--rs-paper); font-weight: 600; }
.rs-arch__body { display: grid; grid-template-columns: 200px 1fr; }
.rs-arch__tree {
  border-right: 1px solid var(--rs-line); padding: 18px 0; display: flex; flex-direction: column;
  background: rgba(231,242,240,0.01);
}
.rs-tree__node {
  font-family: var(--rs-sans); font-size: 13px; color: rgba(231,242,240,0.7);
  padding: 9px 22px; cursor: default; transition: background 0.2s ease, color 0.2s ease;
}
.rs-tree__node--root { font-weight: 600; color: var(--rs-paper); font-size: 13px; }
.rs-tree__node--stage { color: rgba(231,242,240,0.78); }
.rs-tree__node.is-on { background: rgba(20,184,166,0.1); color: var(--rs-paper); box-shadow: inset 3px 0 0 var(--rs-teal); }
.rs-tree__node--stage:hover { background: rgba(231,242,240,0.04); }
.rs-arch__table { padding: 4px 0; overflow-x: auto; }
.rs-st__head, .rs-st__row {
  display: grid; grid-template-columns: 1fr 1.4fr 2.5fr 0.9fr; gap: 12px;
  padding: 13px 24px; align-items: center;
}
.rs-st__head {
  font-family: var(--rs-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(231,242,240,0.45); border-bottom: 1px solid var(--rs-line);
}
.rs-st__row {
  border-bottom: 1px solid rgba(231,242,240,0.06);
  font-family: var(--rs-sans); font-size: 13px; color: rgba(231,242,240,0.82);
}
.rs-st__row:last-child { border-bottom: 0; }
.rs-st__row.is-active { background: rgba(20,184,166,0.07); box-shadow: inset 3px 0 0 var(--rs-teal); }
.rs-st__stage { font-family: var(--rs-display); font-style: italic; font-size: 17px; color: var(--rs-paper); font-variation-settings: 'opsz' 72, 'wght' 500; }
.rs-st__tool { font-family: var(--rs-mono); font-size: 12px; color: var(--rs-teal-2); }
.rs-st__role { color: rgba(231,242,240,0.7); line-height: 1.4; }
.rs-st__sig {
  justify-self: start; font-family: var(--rs-mono); font-size: 10px; letter-spacing: 0.06em;
  padding: 3px 9px; border-radius: 999px; text-transform: lowercase; white-space: nowrap;
}
.rs-st__sig--ok { background: rgba(20,184,166,0.16); color: var(--rs-teal-2); }
.rs-st__sig--live { background: rgba(212,255,58,0.16); color: var(--rs-lime); }
.rs-st__sig--warn { background: rgba(245,158,11,0.16); color: var(--rs-amber); }
.rs-arch__foot {
  display: flex; gap: 28px; flex-wrap: wrap; padding: 16px 24px;
  border-top: 1px solid var(--rs-line); background: rgba(231,242,240,0.02);
}
.rs-arch__legend {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--rs-mono); font-size: 11px; letter-spacing: 0.06em; color: rgba(231,242,240,0.55);
}

/* ============================================================
 * 05 — PROGRAM (pinned cadence)
 * ============================================================ */
.rs-program {
  position: relative; padding: 0;
  background: linear-gradient(180deg, transparent, rgba(231,242,240,0.02), transparent);
}
.rs-program__inner { position: relative; height: 600vh; }
.rs-program__sticky {
  position: sticky; top: 0; height: 100vh; display: grid; place-items: center; overflow: hidden;
}
.rs-program__num {
  position: absolute; top: 8vh; right: 6vw;
  font-family: var(--rs-display); font-style: italic; font-size: clamp(120px, 18vw, 280px);
  line-height: 1; color: rgba(231,242,240,0.05);
  font-variation-settings: 'opsz' 144, 'wght' 400, 'SOFT' 30, 'WONK' 1; pointer-events: none;
}
.rs-program__scene {
  position: absolute; inset: 0; display: grid; place-items: center;
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease; padding: 0 6vw;
}
.rs-program__scene.is-active { opacity: 1; transform: translateY(0); }
.rs-program__scene-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px;
  align-items: center; width: 100%; max-width: 1200px;
}
.rs-program__copy h3 {
  font-family: var(--rs-display); font-size: clamp(40px, 5.6vw, 88px); line-height: 1.05;
  letter-spacing: -0.02em; margin: 24px 0 20px;
  font-variation-settings: 'opsz' 144, 'wght' 500, 'SOFT' 30, 'WONK' 1;
}
.rs-program__copy h3 em { font-style: italic; color: var(--rs-lime); }
.rs-program__copy p {
  font-family: var(--rs-sans); font-size: 17px; line-height: 1.62;
  color: rgba(231,242,240,0.72); max-width: 480px;
}
.rs-program__step {
  margin-top: 24px; font-family: var(--rs-mono); font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--lime);
}
.rs-program__visual {
  position: relative; height: 56vh; border-radius: 8px; overflow: hidden;
  background: rgba(231,242,240,0.03); border: 1px solid var(--rs-line);
}
.rs-program__rail {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  width: 200px; height: 2px; background: rgba(231,242,240,0.12); border-radius: 1px;
  overflow: hidden; z-index: 50; opacity: 0; transition: opacity 0.4s ease;
}
.rs-program__rail.is-on { opacity: 1; }
.rs-program__rail-fill { height: 100%; width: 0%; background: var(--rs-lime); transition: width 0.2s linear; }

/* program visuals */
.rs-pv { position: absolute; inset: 0; padding: 28px; display: flex; flex-direction: column; gap: 12px; overflow: auto; }
.rs-pv--scope { gap: 12px; }
.rs-pv__find {
  display: flex; gap: 14px; align-items: baseline; padding: 14px 18px;
  background: rgba(231,242,240,0.04); border-left: 2px solid var(--rs-teal); border-radius: 0 6px 6px 0;
}
.rs-pv__find-tag {
  flex: 0 0 auto; font-family: var(--rs-mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--rs-teal); min-width: 80px;
}
.rs-pv__find span:last-child { font-family: var(--rs-sans); font-size: 14px; color: rgba(231,242,240,0.85); line-height: 1.45; }
.rs-pv--ingest, .rs-pv--report { padding: 22px 26px; gap: 0; }
.rs-pv__row, .rs-pv__report {
  display: grid; grid-template-columns: 100px 1fr; gap: 18px; padding: 13px 0;
  border-bottom: 1px solid var(--rs-line); align-items: baseline;
}
.rs-pv__row:last-child, .rs-pv__report:last-child { border-bottom: 0; }
.rs-pv__row .k, .rs-pv__report .k {
  font-family: var(--rs-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--rs-lime);
}
.rs-pv__row .v { font-family: var(--rs-sans); font-size: 14px; color: rgba(231,242,240,0.9); }
.rs-pv__report .v {
  font-family: var(--rs-display); font-style: italic; font-size: 16px; color: rgba(231,242,240,0.92);
  font-variation-settings: 'opsz' 96, 'SOFT' 30, 'WONK' 1;
}
.rs-pv--launch { padding: 22px 26px; gap: 10px; }
.rs-pv__check {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border: 1px solid var(--rs-line); border-radius: 8px;
  font-family: var(--rs-sans); font-size: 13.5px; color: rgba(231,242,240,0.7);
}
.rs-pv__check::before {
  content: ''; width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--rs-line-strong); flex: 0 0 auto;
}
.rs-pv__check.is-done { color: var(--rs-paper); border-color: rgba(20,184,166,0.4); }
.rs-pv__check.is-done::before {
  border-color: var(--rs-teal); background: var(--rs-teal);
  box-shadow: inset 0 0 0 2px #0a1513;
}
.rs-pv--ground { padding: 18px; }
.rs-pv__terms { display: flex; flex-direction: column; gap: 6px; }
.rs-pv__term {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  padding: 9px 14px; border-radius: 7px; background: rgba(231,242,240,0.03);
  border: 1px solid var(--rs-line); font-family: var(--rs-mono); font-size: 12px;
}
.rs-pv__term-q { font-family: var(--rs-sans); color: rgba(231,242,240,0.85); }
.rs-pv__term-act { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.rs-pv__term-act--add { background: rgba(20,184,166,0.16); color: var(--rs-teal-2); }
.rs-pv__term-act--neg { background: rgba(244,121,111,0.16); color: var(--rs-red); }
.rs-pv__term-roas { color: var(--rs-lime); }
.rs-pv--scale { flex-direction: row; flex-wrap: wrap; align-content: center; justify-content: center; gap: 8px; padding: 28px; }
.rs-pv__chip {
  padding: 8px 14px; border: 1px solid var(--rs-line); border-radius: 999px;
  font-family: var(--rs-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(231,242,240,0.7);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.rs-pv__chip:hover { background: var(--rs-teal); color: #04100e; border-color: var(--rs-teal); }

/* ============================================================
 * 06 — COMPOUND chart
 * ============================================================ */
.rs-compound__wrap {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: center;
}
.rs-compound__chart {
  display: block; width: 100%; height: 380px;
  background: rgba(231,242,240,0.02); border: 1px solid var(--rs-line); border-radius: 12px;
}
.rs-compound__legend { display: flex; flex-direction: column; gap: 18px; }
.rs-compound__key {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--rs-sans); font-size: 15px; color: rgba(231,242,240,0.85); line-height: 1.5;
}
.rs-compound__key span {
  flex: 0 0 auto; width: 14px; height: 14px; border-radius: 4px; margin-top: 2px;
}
.rs-compound__key--managed span { background: var(--rs-lime); }
.rs-compound__key--auto span { background: rgba(231,242,240,0.3); }
.rs-compound__caption {
  font-family: var(--rs-mono); font-size: 11px; letter-spacing: 0.08em;
  color: rgba(231,242,240,0.4); line-height: 1.6; margin-top: 8px;
}

/* ============================================================
 * 07 — TOOLS
 * ============================================================ */
.rs-tools__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  max-width: 1200px; margin: 0 auto; background: var(--rs-line);
  border: 1px solid var(--rs-line); border-radius: 12px; overflow: hidden;
}
.rs-tool {
  background: var(--rs-ink); padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease; min-height: 110px; position: relative;
}
.rs-tool:hover { background: var(--rs-teal); color: #04100e; }
.rs-tool .cat {
  font-family: var(--rs-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(231,242,240,0.45); margin-bottom: 6px;
}
.rs-tool:hover .cat { color: rgba(4,16,14,0.7); }
.rs-tool .nm {
  font-family: var(--rs-display); font-style: italic; font-size: 22px;
  font-variation-settings: 'opsz' 96, 'wght' 500, 'SOFT' 30, 'WONK' 1;
}
.rs-tool .glyph svg {
  width: 28px; height: 28px; fill: none; stroke: var(--lime); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  transition: stroke 0.3s ease, transform 0.3s ease;
}
.rs-tool:hover .glyph svg { stroke: #04100e; transform: rotate(8deg); }

/* ============================================================
 * 08 — CTA
 * ============================================================ */
.rs-cta { position: relative; padding: 160px 6vw 200px; text-align: center; overflow: hidden; }
.rs-cta canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.rs-cta__inner { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; }
.rs-cta__title {
  font-family: var(--rs-display); font-weight: 400; font-size: clamp(48px, 7vw, 112px);
  line-height: 1.04; letter-spacing: -0.025em; margin: 24px 0 24px;
  font-variation-settings: 'opsz' 144, 'wght' 400, 'SOFT' 30, 'WONK' 1;
}
.rs-cta__title em { font-style: italic; color: var(--rs-lime); }
.rs-cta__lede {
  font-family: var(--rs-sans); font-size: 18px; line-height: 1.6;
  color: rgba(231,242,240,0.7); max-width: 580px; margin: 0 auto 36px;
}

/* tweaks/sound hidden on production */
.rs-page .v2-tweaks, .rs-page .v2-sound { display: none !important; }

/* ============================================================
 * Trusted — client logo-loop strip (React Bits "Logo Loop")
 * ============================================================ */
.rs-trust {
  position: relative; z-index: 2;
  padding: 44px 0 52px;
  border-top: 1px solid var(--rs-line);
  border-bottom: 1px solid var(--rs-line);
  overflow: hidden;
}
.rs-trust__label {
  text-align: center;
  font-family: var(--rs-mono);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(231, 242, 240, 0.45);
  margin-bottom: 26px;
}
.rs-trust__loop { width: 100%; }
.rs-trust__track { display: flex; align-items: center; }
.rs-trust__logo {
  flex: 0 0 auto;
  padding: 0 42px;
  font-family: var(--rs-display);
  font-style: italic;
  font-size: clamp(24px, 3vw, 32px);
  color: rgba(231, 242, 240, 0.40);
  font-variation-settings: 'opsz' 96, 'wght' 500, 'SOFT' 30, 'WONK' 1;
  white-space: nowrap;
  transition: color 0.3s ease;
}
.rs-trust__logo:hover { color: var(--rs-paper); }

/* ============================================================
 * Responsive
 * ============================================================ */
@media (max-width: 1024px) {
  .rs-hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .rs-hero__three { display: none; }
  .rs-hero__metrics { grid-template-columns: repeat(2, 1fr); }
  .rs-hero__metric { border-bottom: 1px solid var(--rs-line); }
  .rs-hero__metric:nth-child(2) { border-right: 0; }
  .rs-program__scene-inner { grid-template-columns: 1fr; gap: 30px; }
  .rs-program__visual { height: 40vh; }
  .rs-pipe__stage { grid-template-columns: 1fr; gap: 30px; }
  .rs-pipe__chunks { min-height: 0; }
  .rs-compound__wrap { grid-template-columns: 1fr; gap: 28px; }
  .rs-arch__body { grid-template-columns: 1fr; }
  .rs-arch__tree { display: grid; grid-template-columns: repeat(2, 1fr); border-right: 0; border-bottom: 1px solid var(--rs-line); }
  .rs-tools__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .rs-section { padding: 80px 5vw 100px; }
  .rs-hero { padding: 100px 5vw 40px; }
  .rs-ledger__row { grid-template-columns: 1fr; gap: 8px; padding: 18px 12px; }
  .rs-ledger__metric { text-align: left; }
  .rs-console__body { grid-template-columns: 1fr 1fr; }
  .rs-pipe__readout { grid-template-columns: 1fr; }
  .rs-arch__tree { grid-template-columns: 1fr; }
  .rs-st__head { display: none; }
  .rs-st__row { grid-template-columns: 1fr 1fr; gap: 6px 10px; }
  .rs-program__inner { height: auto; }
  .rs-program__sticky { position: static; height: auto; padding: 60px 0; }
  .rs-program__scene { position: relative; opacity: 1; transform: none; padding: 30px 5vw; height: auto; }
  .rs-program__visual { height: 44vh; }
  .rs-program__rail { display: none; }
  .rs-tools__grid { grid-template-columns: 1fr; }
  .rs-trust { padding: 32px 0 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .rs-program__scene { transition: none; }
  .rs-chunk { transition: none; }
  .rs-console__pulse, .rs-eyebrow .dot, .rs-console__caret, .rs-pipe__kb-pulse { animation: none; }
}
