/* AIHT Impulse Engine - global living layer (L5, 2026-07-07). ASCII-safe. */

:root { --pulse: 0; --impulse-teal: 0, 212, 200; }

/* fixed fiber-network canvas behind content, above body background */
.aiht-impulse-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  display: block;
}

/* pages that paint opaque containers must let the network show through:
   body keeps the navy, containers go transparent (wins over aiht_dark_fix
   because this sheet loads later with equal !important). */
body.aiht-impulse-on,
body.aiht-impulse-on #page,
body.aiht-impulse-on .site,
body.aiht-impulse-on #content,
body.aiht-impulse-on .site-content,
body.aiht-impulse-on .ast-container,
body.aiht-impulse-on main,
body.aiht-impulse-on #main,
body.aiht-impulse-on #primary,
body.aiht-impulse-on .content-area,
body.aiht-impulse-on article.post,
body.aiht-impulse-on article.page,
body.aiht-impulse-on .hentry,
body.aiht-impulse-on .entry,
body.aiht-impulse-on .entry-content,
body.aiht-impulse-on .ast-article-single {
  background-color: transparent !important;
}
body.aiht-impulse-on { background-color: #06111F !important; }

/* ---- pulse helpers: opt-in via data-pulse / classes, all driven by --pulse ---- */

/* accent glow that breathes (buttons, badges, stat numbers) */
[data-pulse="glow"] {
  text-shadow: 0 0 calc(var(--pulse) * 12px) rgba(var(--impulse-teal), calc(0.20 + var(--pulse) * 0.35));
}
[data-pulse="box"] {
  box-shadow: 0 0 calc(6px + var(--pulse) * 16px) rgba(var(--impulse-teal), calc(0.10 + var(--pulse) * 0.22));
}
/* dot / LED that beats (status dots, badges) */
[data-pulse="dot"] {
  opacity: calc(0.55 + var(--pulse) * 0.45);
  transform: scale(calc(1 + var(--pulse) * 0.35));
}
/* border that charges with each beat */
[data-pulse="line"] {
  border-color: rgba(var(--impulse-teal), calc(0.18 + var(--pulse) * 0.4)) !important;
}

@media (prefers-reduced-motion: reduce) {
  [data-pulse="glow"], [data-pulse="box"], [data-pulse="dot"], [data-pulse="line"] {
    text-shadow: none; box-shadow: none; transform: none; opacity: 1;
  }
}
