/* =============================================================
   SecDog — secdogscanner.secblok.io
   Static landing page styles.
   Organization: tokens → base → layout → components → sections → responsive
   Design language: light-default, Apple-HIG minimal, 72% glass panels,
   1px hairline borders for depth (not shadows), dark mode via
   prefers-color-scheme + manual [data-theme] override.
   ============================================================= */

/* -------------------------------------------------------------
   1. DESIGN TOKENS
   ------------------------------------------------------------- */
:root {
  /* Surfaces & color */
  --bg: #f5f5f7;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-solid: #ffffff;
  --chip: rgba(0, 0, 0, 0.05);
  --stroke: rgba(0, 0, 0, 0.08);
  --stroke-strong: rgba(0, 0, 0, 0.14);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --accent-press: #0064c8;
  --ok: #1a7f37;
  --ok-bg: rgba(26, 127, 55, 0.12);
  --err: #d70015;

  /* Severity accents (use sparingly, as small accents only) */
  --sev-critical: #d70015;
  --sev-high: #ff6b00;
  --sev-medium: #e6a700;
  --sev-low: #0071e3;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Spacing (8px grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --section-pad: 104px;

  /* Radius */
  --r-btn: 8px;
  --r-card: 12px;
  --r-pill: 999px;

  /* Layout */
  --maxw: 1100px;
  --readw: 720px;
  --nav-h: 56px;

  /* Subtle shadow reserved for sticky nav only */
  --nav-shadow: 0 1px 0 var(--stroke), 0 6px 24px rgba(0, 0, 0, 0.04);

  color-scheme: light;
}

/* Dark theme — manual toggle takes precedence */
[data-theme="dark"] {
  --bg: #1c1c1e;
  --panel: rgba(44, 44, 46, 0.72);
  --panel-solid: #2c2c2e;
  --chip: rgba(255, 255, 255, 0.08);
  --stroke: rgba(255, 255, 255, 0.1);
  --stroke-strong: rgba(255, 255, 255, 0.18);
  --text: #f5f5f7;
  --muted: #98989d;
  --accent: #0071e3;
  --accent-press: #2b8cf0;
  --ok: #30d158;
  --ok-bg: rgba(48, 209, 88, 0.16);
  --err: #ff453a;
  --nav-shadow: 0 1px 0 var(--stroke), 0 6px 24px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

/* Dark via system preference (only when no manual override set) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1c1e;
    --panel: rgba(44, 44, 46, 0.72);
    --panel-solid: #2c2c2e;
    --chip: rgba(255, 255, 255, 0.08);
    --stroke: rgba(255, 255, 255, 0.1);
    --stroke-strong: rgba(255, 255, 255, 0.18);
    --text: #f5f5f7;
    --muted: #98989d;
    --accent-press: #2b8cf0;
    --ok: #30d158;
    --ok-bg: rgba(48, 209, 88, 0.16);
    --err: #ff453a;
    --nav-shadow: 0 1px 0 var(--stroke), 0 6px 24px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

/* -------------------------------------------------------------
   2. BASE / RESET
   ------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "calt";
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  margin: 0;
}

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

a:hover {
  text-decoration: underline;
}

img,
video {
  max-width: 100%;
  display: block;
}

code,
.mono {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

/* Focus — visible everywhere, AA */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* -------------------------------------------------------------
   3. LAYOUT PRIMITIVES
   ------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.section {
  padding-block: var(--section-pad);
}

.section--tight {
  padding-block: var(--space-8);
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.section-head {
  max-width: var(--readw);
  margin-bottom: var(--space-7);
}

.section-head h2 {
  font-size: clamp(1.6rem, 1.1rem + 2vw, 2.25rem);
  letter-spacing: -0.02em;
}

.section-head p {
  margin-top: var(--space-4);
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.lede {
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.6;
  max-width: var(--readw);
}

/* -------------------------------------------------------------
   4. COMPONENTS
   ------------------------------------------------------------- */

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  padding: 11px 18px;
  border-radius: var(--r-btn);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.05s ease, color 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(0.5px);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-press);
}

.btn--ghost {
  background: var(--chip);
  color: var(--text);
  border-color: var(--stroke);
}

.btn--ghost:hover {
  border-color: var(--stroke-strong);
}

.btn--lg {
  padding: 13px 22px;
  font-size: 1rem;
}

/* --- Pills / chips --- */
.pillrow {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  background: var(--chip);
  border: 1px solid var(--stroke);
  border-radius: var(--r-pill);
  padding: 6px 12px;
}

.pill svg {
  width: 13px;
  height: 13px;
  flex: none;
}

/* Verified pill — green tint + green text + check */
.pill--verified {
  color: var(--ok);
  background: var(--ok-bg);
  border-color: transparent;
}

.pill--verified svg {
  color: var(--ok);
}

/* --- Glass panel / card --- */
.panel {
  background: var(--panel);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--stroke);
  border-radius: var(--r-card);
}

.card {
  background: var(--panel);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--stroke);
  border-radius: var(--r-card);
  padding: var(--space-5);
}

.card h3 {
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.card p {
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* --- Code / evidence snippet --- */
.code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--chip);
  border: 1px solid var(--stroke);
  border-radius: var(--r-btn);
  padding: 10px 12px;
  margin-top: var(--space-3);
  overflow-x: auto;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}

.code .marker {
  color: var(--ok);
  font-weight: 600;
}

.code .tok {
  color: var(--accent);
}

/* --- Video frame --- */
.videoframe {
  position: relative;
  border: 1px solid var(--stroke);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--chip);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}

.videoframe video {
  display: block;
  width: 100%;
  height: auto;
}

/* macOS-style window chrome strip on the hero frame */
.videoframe--chrome::before {
  content: "";
  display: block;
  height: 34px;
  background: var(--chip);
  border-bottom: 1px solid var(--stroke);
}

.videoframe--chrome .dots {
  position: absolute;
  top: 12px;
  left: 14px;
  display: flex;
  gap: 7px;
  z-index: 2;
}

.videoframe--chrome .dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--stroke-strong);
}

/* --- Callout (honesty note) --- */
.callout {
  border: 1px solid var(--stroke-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-card);
  background: var(--chip);
  padding: var(--space-5);
  margin-top: var(--space-6);
}

.callout .tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.callout p {
  margin-top: var(--space-2);
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.callout a {
  font-weight: 500;
}

/* -------------------------------------------------------------
   5. NAV
   ------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--panel);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--stroke);
  transition: box-shadow 0.2s ease;
}

.nav.is-stuck {
  box-shadow: var(--nav-shadow);
}

.nav__inner {
  height: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--accent);
}

/* Real product icon used as the wordmark mark (rounded tile). */
.brand__icon {
  width: 26px;
  height: 26px;
  flex: none;
  display: block;
  border-radius: 7px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-left: var(--space-4);
}

.nav__links a {
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

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

.nav__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Theme toggle */
.themebtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-btn);
  border: 1px solid var(--stroke);
  background: var(--chip);
  color: var(--text);
  cursor: pointer;
  padding: 0;
}

.themebtn:hover {
  border-color: var(--stroke-strong);
}

.themebtn svg {
  width: 17px;
  height: 17px;
}

.themebtn .icon-moon {
  display: none;
}

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

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

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .themebtn .icon-sun {
    display: none;
  }
  :root:not([data-theme="light"]) .themebtn .icon-moon {
    display: block;
  }
}

/* -------------------------------------------------------------
   6. HERO
   ------------------------------------------------------------- */
.hero {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 1.3rem + 3.4vw, 3.25rem);
  letter-spacing: -0.025em;
  line-height: 1.08;
  max-width: 16ch;
  margin-inline: auto;
}

.hero h1 .muted {
  display: block;
  color: var(--muted);
  font-weight: 600;
  margin-top: var(--space-2);
}

.hero__sub {
  max-width: 680px;
  margin: var(--space-5) auto 0;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.hero .pillrow {
  justify-content: center;
  margin-top: var(--space-5);
}

.hero__cta {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-6);
  flex-wrap: wrap;
}

.hero__video {
  margin-top: var(--space-8);
}

.hero__note {
  margin-top: var(--space-4);
  font-size: 0.8125rem;
  color: var(--muted);
}

/* -------------------------------------------------------------
   7. SECTION LAYOUTS
   ------------------------------------------------------------- */

/* Alternating media + copy split */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}

.split--rev .split__media {
  order: -1;
}

.split__copy h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.125rem);
  letter-spacing: -0.02em;
}

.split__copy p {
  margin-top: var(--space-4);
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.featurelist {
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-3);
}

.featurelist li {
  position: relative;
  padding-left: 26px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
}

.featurelist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"/></svg>') center / 11px no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"/></svg>') center / 11px no-repeat;
}

/* Oracle proofs grid */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.oracle .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--r-pill);
  background: var(--chip);
  border: 1px solid var(--stroke);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

/* Capability tag grid */
.taggrid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.tag {
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--text);
  background: var(--chip);
  border: 1px solid var(--stroke);
  border-radius: var(--r-btn);
  padding: 6px 10px;
}

.tag .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.dot--crit { background: var(--sev-critical); }
.dot--high { background: var(--sev-high); }
.dot--med  { background: var(--sev-medium); }
.dot--low  { background: var(--sev-low); }

.tag-group {
  margin-top: var(--space-5);
}

.tag-group:first-child {
  margin-top: 0;
}

.tag-group h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-3);
}

.routing-note {
  margin-top: var(--space-6);
  font-size: 0.9375rem;
  color: var(--muted);
  max-width: var(--readw);
}

/* Severity legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-5);
  font-size: 0.8125rem;
  color: var(--muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
}

/* -------------------------------------------------------------
   8. PRICING
   ------------------------------------------------------------- */
.pricing {
  text-align: center;
}

.pricecard {
  max-width: 480px;
  margin: var(--space-7) auto 0;
  padding: var(--space-7);
  text-align: left;
}

.pricecard__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ok);
  background: var(--ok-bg);
  border-radius: var(--r-pill);
  padding: 5px 11px;
}

.pricecard h3 {
  font-size: 1.375rem;
  margin-top: var(--space-4);
}

.pricecard__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: var(--space-3);
}

.pricecard__price .amt {
  font-size: 2.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.pricecard__price .per {
  color: var(--muted);
  font-size: 1rem;
}

.pricecard__alt {
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: 0.9375rem;
}

.pricecard .featurelist {
  margin-top: var(--space-5);
}

.pricecard__cta {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
  flex-wrap: wrap;
}

.pricecard__cta .btn {
  flex: 1;
}

.pricing__foot {
  margin-top: var(--space-5);
  font-size: 0.875rem;
  color: var(--muted);
}

/* -------------------------------------------------------------
   9. FINAL CTA BAND
   ------------------------------------------------------------- */
.ctaband {
  text-align: center;
}

.ctaband .panel {
  padding: var(--space-8) var(--space-6);
}

.ctaband h2 {
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.25rem);
  letter-spacing: -0.02em;
  max-width: 20ch;
  margin-inline: auto;
}

.ctaband p {
  margin: var(--space-4) auto 0;
  color: var(--muted);
  max-width: 50ch;
}

.ctaband__cta {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-6);
  flex-wrap: wrap;
}

/* -------------------------------------------------------------
   10. FOOTER
   ------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--stroke);
  padding-block: var(--space-8) var(--space-7);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: var(--space-6);
}

.footer__brand .brand {
  font-size: 1.0625rem;
}

.footer__brand p {
  margin-top: var(--space-3);
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 30ch;
}

.footer__col h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-2);
}

.footer__col a {
  color: var(--muted);
  font-size: 0.9375rem;
}

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

.footer__legal {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--stroke);
  font-size: 0.8125rem;
  color: var(--muted);
}

/* -------------------------------------------------------------
   11. SCROLL REVEAL (JS-driven; safe default visible)
   ------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* -------------------------------------------------------------
   12. RESPONSIVE
   ------------------------------------------------------------- */
@media (max-width: 880px) {
  :root {
    --section-pad: 72px;
  }

  .split {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .split--rev .split__media {
    order: 0;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

  /* Collapsible nav links: wrap below the bar */
  .nav__inner {
    flex-wrap: wrap;
  }

  .nav__links {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: var(--space-4);
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 560px) {
  :root {
    --section-pad: 56px;
  }

  .wrap {
    padding-inline: var(--space-4);
  }

  .hero__cta .btn,
  .pricecard__cta .btn,
  .ctaband__cta .btn {
    flex: 1 1 100%;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .nav__links {
    gap: var(--space-3);
    font-size: 0.875rem;
  }
}

/* -------------------------------------------------------------
   13. MOTION PREFERENCES
   ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* =============================================================
   14. ROUTER / SWARM ANIMATED DIAGRAM  (scoped under .router-anim)
   Pure inline SVG + CSS animation. Theme-aware via design tokens.
   ~8s seamless loop. Reduced-motion → clean static end-state.
   ============================================================= */
.router-anim {
  margin: var(--space-7) 0 var(--space-6);
}

.router-anim__fig {
  margin: 0;
  padding: var(--space-5);
  background: var(--panel);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--stroke);
  border-radius: var(--r-card);
}

.router-anim__svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  overflow: visible;
}

/* ---- tier color helpers (severity tokens reused as tier accents) ---- */
.router-anim {
  --ra-strong: var(--accent);     /* strong → brand blue   */
  --ra-balanced: var(--sev-medium);/* balanced → amber      */
  --ra-cheap: var(--muted);        /* cheap → neutral grey  */
  --ra-cool: var(--sev-high);      /* cooling → orange      */
}

/* ---- stage + structural text ---- */
.router-anim__svg text {
  font-family: var(--font-sans);
  fill: var(--text);
}
.ra-stage {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  fill: var(--muted);
}

/* ---- connectors (hairline, dashed for subtle flow texture) ---- */
.ra-wire {
  stroke: var(--stroke-strong);
  stroke-width: 1.4;
  fill: none;
}
.ra-wire--strong   { stroke: color-mix(in srgb, var(--ra-strong) 55%, transparent); }
.ra-wire--balanced { stroke: color-mix(in srgb, var(--ra-balanced) 55%, transparent); }
.ra-wire--cheap    { stroke: color-mix(in srgb, var(--ra-cheap) 60%, transparent); }

/* the cooling pool wire dims away during the re-route beat */
.ra-wire--cool {
  animation: ra-wire-cool 8s ease-in-out infinite;
}
@keyframes ra-wire-cool {
  0%, 55%   { opacity: 1; }
  62%, 90%  { opacity: .12; }
  100%      { opacity: 1; }
}

/* ---- travelling packets (offset-path along the same curves) ---- */
.ra-dot {
  fill: var(--accent);
  offset-rotate: 0deg;
  opacity: 0;
  animation: ra-travel 8s cubic-bezier(.4, 0, .2, 1) infinite;
  animation-delay: var(--delay, 0s);
}
.ra-dot--strong   { fill: var(--ra-strong); }
.ra-dot--balanced { fill: var(--ra-balanced); }
.ra-dot--cheap    { fill: var(--ra-cheap); }

/* inbound packets ride 0→100% of the pool→hub curve */
.ra-flow--in .ra-dot  { offset-distance: 0%; }
.ra-flow--out .ra-dot { offset-distance: 0%; }

@keyframes ra-travel {
  0%   { offset-distance: 0%;   opacity: 0; }
  6%   { opacity: 1; }
  44%  { opacity: 1; }
  50%  { offset-distance: 100%; opacity: 0; }
  100% { offset-distance: 100%; opacity: 0; }
}

/* the cooling-lane packet halts during the re-route beat */
.ra-dot--cool {
  animation: ra-travel-cool 8s cubic-bezier(.4, 0, .2, 1) infinite;
}
@keyframes ra-travel-cool {
  0%   { offset-distance: 0%;   opacity: 0; }
  6%   { opacity: 1; }
  40%  { offset-distance: 92%;  opacity: 1; }
  46%  { offset-distance: 100%; opacity: 0; }
  /* during cooling window: suppressed (no new packet) */
  55%, 100% { offset-distance: 0%; opacity: 0; }
}

/* ---- pool chips ---- */
.ra-chip rect {
  fill: var(--chip);
  stroke: var(--stroke);
  stroke-width: 1;
}
.ra-chip text {
  font-size: 13px;
  font-weight: 500;
  dominant-baseline: middle;
}
.ra-tier--strong   { fill: var(--ra-strong); }
.ra-tier--balanced { fill: var(--ra-balanced); }
.ra-tier--cheap    { fill: var(--ra-cheap); }

/* subtle staggered breathing of every chip */
.ra-chip {
  transform-box: fill-box;
  transform-origin: center;
  animation: ra-breathe 6s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.55s);
}
@keyframes ra-breathe {
  0%, 100% { opacity: .9;  transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.012); }
}

/* the cooling chip: dims to muted state once per loop, then recovers */
.ra-chip--cooling {
  animation: ra-chip-cool 8s ease-in-out infinite;
}
.ra-chip--cooling rect {
  transition: none;
}
.ra-cooltag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  fill: var(--ra-cool);
  text-transform: uppercase;
  opacity: 0;
  animation: ra-cooltag 8s ease-in-out infinite;
}
@keyframes ra-chip-cool {
  0%, 52%   { opacity: .92; }
  62%, 88%  { opacity: .4; }
  100%      { opacity: .92; }
}
@keyframes ra-cooltag {
  0%, 54%  { opacity: 0; }
  64%, 86% { opacity: 1; }
  100%     { opacity: 0; }
}

/* ---- hub / assigner ---- */
.ra-hub__ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.2;
  opacity: .4;
  transform-box: fill-box;
  transform-origin: center;
  animation: ra-hub-ring 8s ease-in-out infinite;
}
.ra-hub__core {
  fill: var(--panel-solid);
  stroke: var(--stroke-strong);
  stroke-width: 1;
}
.ra-hub__t1, .ra-hub__t2 {
  font-size: 11px;
  font-weight: 600;
  fill: var(--text);
}
@keyframes ra-hub-ring {
  0%, 100% { transform: scale(1);    opacity: .35; }
  50%      { transform: scale(1.06); opacity: .55; }
}

/* ---- swarm specialists ---- */
.ra-spec rect {
  fill: var(--chip);
  stroke: var(--stroke);
  stroke-width: 1;
}
.ra-spec__name {
  font-size: 13px;
  font-weight: 500;
  dominant-baseline: middle;
}
.ra-badge text {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  fill: #fff;
  dominant-baseline: middle;
}
.ra-badge--strong rect   { fill: var(--ra-strong); }
.ra-badge--balanced rect { fill: var(--ra-balanced); }
.ra-badge--cheap rect    { fill: var(--ra-cheap); }
.ra-badge--balanced text { fill: #1d1d1f; }
.ra-badge--cheap text    { fill: var(--panel-solid); }

/* specialists pulse as packets arrive (staggered to match packet delays) */
.ra-spec {
  transform-box: fill-box;
  transform-origin: center;
  animation: ra-spec-pulse 8s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.7s + 1.6s);
}
@keyframes ra-spec-pulse {
  0%, 100% { transform: scale(1); }
  3%       { transform: scale(1.025); }
  8%       { transform: scale(1); }
}

/* ---- legend ---- */
.router-anim__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--stroke);
  font-size: 13px;
  color: var(--muted);
}
.ra-key {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.ra-key__dot {
  width: 9px;
  height: 9px;
  border-radius: var(--r-pill);
  flex: none;
}
.ra-key__dot--strong   { background: var(--ra-strong); }
.ra-key__dot--balanced { background: var(--ra-balanced); }
.ra-key__dot--cheap    { background: var(--ra-cheap); }
.ra-key__dot--cool     { background: var(--ra-cool); }
.ra-key--cool          { color: var(--ra-cool); }

/* ---- responsive: keep legible on narrow widths ---- */
@media (max-width: 880px) {
  .router-anim__fig { padding: var(--space-4); }
}
@media (max-width: 560px) {
  .router-anim__fig { padding: var(--space-3); }
  .router-anim__legend { font-size: 12px; gap: var(--space-2) var(--space-4); }
}

/* ---- reduced motion: freeze to a clean, legible static end-state ----
   (the global reduced-motion rule zeroes durations; here we explicitly
   pin every animated sub-part to its visible resting state) */
@media (prefers-reduced-motion: reduce) {
  .router-anim .ra-chip,
  .router-anim .ra-chip--cooling,
  .router-anim .ra-cooltag,
  .router-anim .ra-spec,
  .router-anim .ra-hub__ring,
  .router-anim .ra-wire--cool,
  .router-anim .ra-dot,
  .router-anim .ra-dot--cool {
    animation: none !important;
  }
  /* everything visible, nothing mid-flight */
  .router-anim .ra-chip,
  .router-anim .ra-spec { opacity: 1; transform: none; }
  .router-anim .ra-chip--cooling { opacity: .55; }   /* shown in its cooling state, statically */
  .router-anim .ra-cooltag { opacity: 1; }
  .router-anim .ra-wire--cool { opacity: .25; }
  .router-anim .ra-hub__ring { opacity: .4; }
  /* park packets at the receiving end so the flow direction reads, no motion */
  .router-anim .ra-dot { offset-distance: 100%; opacity: 1; }
  .router-anim .ra-dot--cool { opacity: 0; }          /* its lane is the re-routed one */
}

/* =============================================================
   15. LEARNING-LOOP ANIMATED DIAGRAM  (scoped under .loop-anim)
   Pure inline SVG + CSS animation. Theme-aware via design tokens.
   ~8s seamless loop: learn -> store (local) -> reload -> start ahead.
   Reduced-motion -> clean static end-state. Sibling of .router-anim.
   ============================================================= */
.loop-anim {
  margin: 0;
  padding: var(--space-5);
  background: var(--panel);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--stroke);
  border-radius: var(--r-card);
}

.la-svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  overflow: visible;
}

/* ---- artifact accents (severity / ok tokens reused) ---- */
.loop-anim {
  --la-ok: var(--ok);            /* verified finding -> green */
  --la-tech: var(--accent);      /* distilled playbook -> brand blue */
  --la-note: var(--sev-medium);  /* target quirk -> amber */
}

/* ---- shared text ---- */
.la-svg text {
  font-family: var(--font-sans);
  fill: var(--text);
}

/* ---- engagement nodes ---- */
.la-eng rect {
  fill: var(--chip);
  stroke: var(--stroke);
  stroke-width: 1;
}
.la-eng__t {
  font-size: 14px;
  font-weight: 600;
  dominant-baseline: middle;
}
.la-eng__s {
  font-size: 11px;
  font-weight: 500;
  fill: var(--muted);
  dominant-baseline: middle;
}

/* engagement 1 breathes gently as it works */
.la-eng--one {
  transform-box: fill-box;
  transform-origin: center;
  animation: la-breathe 8s ease-in-out infinite;
}
@keyframes la-breathe {
  0%, 100% { opacity: .94; transform: scale(1); }
  18%      { opacity: 1;   transform: scale(1.012); }
  40%      { opacity: .94; transform: scale(1); }
}

/* engagement 2 lights up once the return arc delivers */
.la-eng--two rect {
  stroke: var(--stroke);
  animation: la-eng2-rect 8s ease-in-out infinite;
}
@keyframes la-eng2-rect {
  0%, 60%   { stroke: var(--stroke); fill: var(--chip); }
  74%, 96%  { stroke: color-mix(in srgb, var(--la-tech) 60%, var(--stroke)); fill: color-mix(in srgb, var(--la-tech) 8%, var(--chip)); }
  100%      { stroke: var(--stroke); fill: var(--chip); }
}
.la-eng--two .la-eng__t { opacity: .6; animation: la-eng2-text 8s ease-in-out infinite; }
.la-eng__s--load { opacity: 0; animation: la-eng2-load 8s ease-in-out infinite; }
@keyframes la-eng2-text {
  0%, 58%  { opacity: .55; }
  72%, 96% { opacity: 1; }
  100%     { opacity: .55; }
}
@keyframes la-eng2-load {
  0%, 60%  { opacity: 0; }
  74%, 96% { opacity: 1; }
  100%     { opacity: 0; }
}

/* "starts ahead" badge fades in with engagement 2 */
.la-ahead rect { fill: var(--la-tech); }
.la-ahead text {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .02em;
  fill: #fff;
  dominant-baseline: middle;
}
.la-ahead {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: la-ahead 8s ease-in-out infinite;
}
@keyframes la-ahead {
  0%, 64%  { opacity: 0; transform: scale(.9); }
  76%      { opacity: 1; transform: scale(1.04); }
  82%, 96% { opacity: 1; transform: scale(1); }
  100%     { opacity: 0; transform: scale(.9); }
}

/* recall ping text */
.la-recall__q {
  font-size: 11px;
  font-style: italic;
  fill: var(--muted);
  opacity: 0;
  animation: la-recall-q 8s ease-in-out infinite;
}
.la-recall__hit {
  font-size: 11px;
  font-weight: 600;
  fill: var(--la-tech);
  opacity: 0;
  animation: la-recall-hit 8s ease-in-out infinite;
}
@keyframes la-recall-q {
  0%, 66%  { opacity: 0; }
  78%, 96% { opacity: 1; }
  100%     { opacity: 0; }
}
@keyframes la-recall-hit {
  0%, 72%  { opacity: 0; }
  84%, 96% { opacity: 1; }
  100%     { opacity: 0; }
}

/* ---- artifact chips (emitted from engagement 1) ---- */
.la-chip rect {
  fill: var(--chip);
  stroke: var(--stroke);
  stroke-width: 1;
}
.la-chip__t {
  font-size: 11px;
  font-weight: 600;
  dominant-baseline: middle;
}
.la-chip__tag {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .02em;
  dominant-baseline: middle;
}
.la-chip--ok   .la-chip__tag { fill: var(--la-ok); }
.la-chip--tech .la-chip__tag { fill: var(--la-tech); }
.la-chip--note .la-chip__tag { fill: var(--la-note); }
.la-check  { stroke: var(--la-ok);   stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.la-chip--tech .la-glyph { fill: color-mix(in srgb, var(--la-tech) 80%, transparent); }
.la-chip--note .la-glyph { fill: color-mix(in srgb, var(--la-note) 80%, transparent); }

/* each chip pulses once as its artifact is emitted (staggered to packet delays) */
.la-chip {
  transform-box: fill-box;
  transform-origin: center;
  animation: la-chip-emit 8s ease-in-out infinite;
  animation-delay: calc(var(--i) * 1.1s);
}
@keyframes la-chip-emit {
  0%       { opacity: .7;  transform: scale(1); }
  5%       { opacity: 1;   transform: scale(1.03); }
  10%      { opacity: 1;   transform: scale(1); }
  64%, 100%{ opacity: .7;  transform: scale(1); }
}

/* ---- connectors: hairline curves engagement1 -> store ---- */
.la-wire {
  stroke: var(--stroke-strong);
  stroke-width: 1.4;
  fill: none;
}

/* ---- return arc: store -> engagement 2 ---- */
.la-arc {
  stroke: color-mix(in srgb, var(--la-tech) 50%, transparent);
  stroke-width: 1.6;
  fill: none;
  stroke-dasharray: 4 5;
  animation: la-arc-flow 8s linear infinite;
}
@keyframes la-arc-flow {
  to { stroke-dashoffset: -36; }
}
.la-arc__head { fill: color-mix(in srgb, var(--la-tech) 70%, transparent); }

/* ---- travelling packets ---- */
.la-art, .la-knot {
  offset-rotate: 0deg;
  offset-distance: 0%;
  opacity: 0;
}
.la-art {
  animation: la-travel 8s cubic-bezier(.4, 0, .2, 1) infinite;
  animation-delay: var(--delay, 0s);
}
.la-art--ok   { fill: var(--la-ok); }
.la-art--tech { fill: var(--la-tech); }
.la-art--note { fill: var(--la-note); }
@keyframes la-travel {
  0%   { offset-distance: 0%;   opacity: 0; }
  5%   { opacity: 1; }
  26%  { opacity: 1; }
  31%  { offset-distance: 100%; opacity: 0; }
  100% { offset-distance: 100%; opacity: 0; }
}

/* knowledge packets ride the return arc late in the loop */
.la-knot {
  fill: var(--la-tech);
  animation: la-travel-return 8s cubic-bezier(.4, 0, .2, 1) infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes la-travel-return {
  0%   { offset-distance: 0%;   opacity: 0; }
  4%   { opacity: 1; }
  16%  { opacity: 1; }
  20%  { offset-distance: 100%; opacity: 0; }
  100% { offset-distance: 100%; opacity: 0; }
}

/* ---- memory store: accumulates / glows as artifacts arrive ---- */
.la-store__cap {
  fill: var(--panel-solid);
  stroke: var(--stroke-strong);
  stroke-width: 1.2;
}
.la-store__body {
  stroke: var(--stroke-strong);
  stroke-width: 1.2;
}
.la-store__disc {
  stroke: var(--stroke);
  stroke-width: 1;
  opacity: 0;
}
.la-store__disc--1 { animation: la-disc 8s ease-in-out infinite; animation-delay: 0s; }
.la-store__disc--2 { animation: la-disc 8s ease-in-out infinite; animation-delay: 1.1s; }
@keyframes la-disc {
  0%, 36%  { opacity: 0; }
  44%, 96% { opacity: .65; }
  100%     { opacity: 0; }
}
.la-store__t {
  font-size: 11px;
  font-weight: 600;
  fill: var(--muted);
}
/* soft accumulating glow that swells as each artifact lands */
.la-store__glow {
  fill: var(--la-tech);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: la-store-glow 8s ease-in-out infinite;
}
@keyframes la-store-glow {
  0%, 8%   { opacity: 0;   transform: scale(.7); }
  18%      { opacity: .10; transform: scale(.85); }
  30%      { opacity: .14; transform: scale(.95); }
  44%      { opacity: .20; transform: scale(1.05); }
  58%      { opacity: .16; transform: scale(1); }
  100%     { opacity: 0;   transform: scale(.7); }
}

/* ---- static sealed gate: MUST NOT animate (honest invariant) ---- */
.la-seal rect {
  fill: var(--chip);
  stroke: var(--stroke);
  stroke-width: 1;
}
.la-seal__shackle { stroke: var(--muted); stroke-width: 1.6; }
.la-seal__body    { fill: var(--muted); stroke: none; }
.la-seal__t {
  font-size: 11px;
  font-weight: 600;
  fill: var(--text);
  dominant-baseline: middle;
}
.la-seal__s {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .02em;
  fill: var(--muted);
  dominant-baseline: middle;
}

/* ---- legend ---- */
.la-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--stroke);
  font-size: 13px;
  color: var(--muted);
}
.la-key {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.la-key__dot {
  width: 9px;
  height: 9px;
  border-radius: var(--r-pill);
  flex: none;
}
.la-key__dot--ok   { background: var(--la-ok); }
.la-key__dot--tech { background: var(--la-tech); }
.la-key__dot--note { background: var(--la-note); }

/* ---- responsive: keep legible on narrow widths ---- */
@media (max-width: 880px) {
  .loop-anim { padding: var(--space-4); }
}
@media (max-width: 560px) {
  .loop-anim { padding: var(--space-3); }
  .la-legend { font-size: 12px; gap: var(--space-2) var(--space-4); }
}

/* ---- reduced motion: freeze to a clean, legible static end-state ----
   Pin every animated sub-part to a resting "loop complete" state:
   artifacts delivered into the store, engagement 2 lit, nothing mid-flight. */
@media (prefers-reduced-motion: reduce) {
  .loop-anim .la-eng--one,
  .loop-anim .la-eng--two rect,
  .loop-anim .la-eng--two .la-eng__t,
  .loop-anim .la-eng__s--load,
  .loop-anim .la-ahead,
  .loop-anim .la-recall__q,
  .loop-anim .la-recall__hit,
  .loop-anim .la-chip,
  .loop-anim .la-arc,
  .loop-anim .la-art,
  .loop-anim .la-knot,
  .loop-anim .la-store__disc,
  .loop-anim .la-store__glow {
    animation: none !important;
  }
  /* structure fully visible, nothing transient hidden */
  .loop-anim .la-eng--one,
  .loop-anim .la-chip { opacity: 1; transform: none; }
  .loop-anim .la-eng--two .la-eng__t { opacity: 1; }
  .loop-anim .la-eng__s--load { opacity: 1; }
  .loop-anim .la-ahead { opacity: 1; transform: none; }
  .loop-anim .la-recall__q,
  .loop-anim .la-recall__hit { opacity: 1; }
  /* engagement 2 shown in its lit, briefing-loaded state */
  .loop-anim .la-eng--two rect {
    stroke: color-mix(in srgb, var(--la-tech) 60%, var(--stroke));
    fill: color-mix(in srgb, var(--la-tech) 8%, var(--chip));
  }
  /* store shown accumulated; arc steady; no packets mid-flight */
  .loop-anim .la-store__disc { opacity: .65; }
  .loop-anim .la-store__glow { opacity: .14; transform: none; }
  .loop-anim .la-art,
  .loop-anim .la-knot { opacity: 0; }
}

/* -------------------------------------------------------------
   13. BACKGROUND TREATMENT  (depth behind hero, no HTML changes)
   -------------------------------------------------------------
   Two fixed, full-viewport pseudo-elements sit BEHIND all content
   (negative z-index, pointer-events:none) so both index.html and
   trust.html get them with zero markup changes:

     body::before  — fine technical grid (inline SVG data-URI),
                     masked to fade out below the hero so it never
                     competes with the videos/cards further down.
     body::after   — soft accent wash (brand blue + a hint of the
                     product green) anchored top-center behind the
                     hero headline. Low-alpha, never tints the text.

   Legibility note: the body keeps its opaque var(--bg) fill, and the
   treatment renders UNDER it / behind the text — opacities are kept
   to ~3-5% (grid) and a soft low-alpha wash (glow), so the headline
   (#1d1d1f on #f5f5f7 ≈ 16:1) and body copy stay well above WCAG AA.
   ------------------------------------------------------------- */

/* Anchor: body already paints var(--bg); make it a stacking root so
   the negative-z pseudo-elements layer predictably under content. */
body {
  position: relative;
  z-index: 0;
}

/* --- Primary texture: fine technical grid, fading down the page --- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  /* 44px grid of 1px hairlines. Light theme: near-black lines. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M44 0H0V44' fill='none' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E");
  background-position: center top;
  /* Very faint in light mode (~4.5%). */
  opacity: 0.045;
  /* Densest at the hero, dissolved to nothing by ~880px so lower
     sections (videos, cards) read on clean var(--bg). */
  -webkit-mask-image: linear-gradient(to bottom,
      rgba(0, 0, 0, 1) 0,
      rgba(0, 0, 0, 0.85) 320px,
      rgba(0, 0, 0, 0) 880px);
  mask-image: linear-gradient(to bottom,
      rgba(0, 0, 0, 1) 0,
      rgba(0, 0, 0, 0.85) 320px,
      rgba(0, 0, 0, 0) 880px);
}

/* --- Accent wash: soft brand glow behind the hero headline --- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Two soft radials: blue accent (primary) + faint product green.
     Anchored top-center, near the hero. No hard orb — wide, low-alpha. */
  background-image:
    radial-gradient(60% 48% at 50% 16%,
      color-mix(in srgb, var(--accent) 22%, transparent) 0%,
      transparent 70%),
    radial-gradient(48% 40% at 64% 6%,
      color-mix(in srgb, var(--ok) 12%, transparent) 0%,
      transparent 72%);
  /* Soft overall wash in light mode. */
  opacity: 0.5;
  /* Confine the glow to the top band; it never reaches body copy. */
  -webkit-mask-image: linear-gradient(to bottom,
      rgba(0, 0, 0, 1) 0,
      rgba(0, 0, 0, 1) 360px,
      rgba(0, 0, 0, 0) 720px);
  mask-image: linear-gradient(to bottom,
      rgba(0, 0, 0, 1) 0,
      rgba(0, 0, 0, 1) 360px,
      rgba(0, 0, 0, 0) 720px);
}

/* Dark theme: white grid lines, a touch more presence on both layers. */
[data-theme="dark"] body::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M44 0H0V44' fill='none' stroke='%23fff' stroke-width='1'/%3E%3C/svg%3E");
  opacity: 0.06;
}
[data-theme="dark"] body::after {
  opacity: 0.6;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M44 0H0V44' fill='none' stroke='%23fff' stroke-width='1'/%3E%3C/svg%3E");
    opacity: 0.06;
  }
  :root:not([data-theme="light"]) body::after {
    opacity: 0.6;
  }
}

/* Optional barely-perceptible glow drift — disabled for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  body::after {
    animation: secdog-bg-drift 24s ease-in-out infinite alternate;
  }
}
@keyframes secdog-bg-drift {
  from { transform: translateY(-6px); }
  to   { transform: translateY(6px); }
}
