:root,
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #63003C;
  --md-primary-fg-color--light: #8B1A5A;
  --md-primary-fg-color--dark: #4A002D;
  --md-accent-fg-color: #63003C;
}
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #63003C;
  --md-primary-fg-color--light: #8B1A5A;
  --md-primary-fg-color--dark: #4A002D;
  --md-accent-fg-color: #8B1A5A;
}

/* Make the header title clickable as a link to home */
.md-header__title {
  cursor: pointer;
}

/* Cyclops head section divider */
.section-divider {
  text-align: center;
  margin: 1.5em 0 0.5em;
  line-height: 0;
  opacity: 0.7;
}
.section-divider img {
  width: 40px;
  height: 40px;
  vertical-align: middle;
}

/* FAQ collapsible question boxes */
details.question {
  border-left: 4px solid #63003C;
}
details.question > summary {
  background-color: rgba(99, 0, 60, 0.05);
}
details.question > summary::before {
  color: #63003C;
}

/* ── AI Background: falling tokens ──────────────────────────── */
/* TODO: re-enable .ai-bg by removing display:none below */
.ai-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 9999;
  display: none;
}
.ai-t {
  position: absolute;
  top: -30px;
  font-family: 'Consolas', 'Courier New', monospace;
  color: rgba(99, 0, 60, 0.16);
  animation: ai-fall linear infinite;
  white-space: nowrap;
  user-select: none;
}
/* Tokens that periodically "light up" like an attention head firing */
.ai-t.ai-glow {
  animation: ai-fall linear infinite, ai-pulse 3s ease-in-out infinite;
}
@keyframes ai-fall {
  0%   { transform: translateY(0);                  opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { transform: translateY(calc(100vh + 40px)); opacity: 0; }
}
@keyframes ai-pulse {
  0%, 100% { color: rgba(99, 0, 60, 0.16); text-shadow: none; }
  50%      { color: rgba(99, 0, 60, 0.40); text-shadow: 0 0 8px rgba(99, 0, 60, 0.25); }
}
/* ── Cyclops spawn points ────────────────────────────────────── */
.ai-spawn {
  position: absolute;
  width: 0;
  height: 0;
}
/* The cyclops head: fades in, pulses visibly, fades out */
.ai-spawn svg {
  position: absolute;
  left: -20px;
  top: -20px;
  width: 40px;
  height: 40px;
  opacity: 0;
  animation: ai-cyclops-life ease-in-out infinite;
}
/* The spawned token: waits for cyclops to vanish, then falls from that spot */
.ai-spawn .ai-spawned {
  position: absolute;
  top: 0;
  left: -20px;
  font-family: 'Consolas', 'Courier New', monospace;
  color: rgba(99, 0, 60, 0.28);
  font-size: 13px;
  white-space: nowrap;
  user-select: none;
  opacity: 0;
  animation: ai-spawn-fall linear infinite;
}
/*  Cyclops lifecycle over ~10-14s:
    0-8%: appear   8-60%: pulse/breathe   60-70%: fade   70-100%: hidden (word falls) */
@keyframes ai-cyclops-life {
  0%        { opacity: 0;    transform: scale(0.3); }
  8%        { opacity: 0.45; transform: scale(1.1); }
  18%       { opacity: 0.55; transform: scale(0.85); }
  28%       { opacity: 0.65; transform: scale(1.25); }
  38%       { opacity: 0.50; transform: scale(0.9); }
  48%       { opacity: 0.60; transform: scale(1.2); }
  58%       { opacity: 0.35; transform: scale(1.0); }
  68%       { opacity: 0;    transform: scale(0.4); }
  100%      { opacity: 0;    transform: scale(0.3); }
}
/* Token spawns when cyclops vanishes (~68%), then falls down */
@keyframes ai-spawn-fall {
  0%        { opacity: 0;    transform: translateY(0); }
  66%       { opacity: 0;    transform: translateY(0); }
  70%       { opacity: 0.40; transform: translateY(4px); }
  76%       { opacity: 0.30; transform: translateY(20px); }
  94%       { opacity: 0.10; transform: translateY(calc(45vh)); }
  100%      { opacity: 0;    transform: translateY(calc(52vh)); }
}
/* ── Dark mode variants ──────────────────────────────────────── */
[data-md-color-scheme="slate"] .ai-t {
  color: rgba(180, 130, 160, 0.18);
}
[data-md-color-scheme="slate"] .ai-t.ai-glow {
  animation: ai-fall linear infinite, ai-pulse-dark 3s ease-in-out infinite;
}
@keyframes ai-pulse-dark {
  0%, 100% { color: rgba(180, 130, 160, 0.18); text-shadow: none; }
  50%      { color: rgba(180, 130, 160, 0.45); text-shadow: 0 0 8px rgba(180, 130, 160, 0.3); }
}
[data-md-color-scheme="slate"] .ai-spawn .ai-spawned {
  color: rgba(180, 130, 160, 0.25);
}
[data-md-color-scheme="slate"] .ai-spawn svg text {
  fill: rgba(180, 130, 160, 0.5);
}
[data-md-color-scheme="slate"] .ai-spawn svg #eye {
  fill: rgba(255, 140, 60, 0.6);
}
@media (prefers-reduced-motion: reduce) {
  .ai-bg { display: none; }
}
