:root { color-scheme: light; }
.public-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  font: 680 clamp(29px, 1.5vw, 58px) / 1 var(--plaivi-font);
  letter-spacing: var(--plaivi-wordmark-tracking);
  text-transform: lowercase;
  color: var(--theme-text, #111);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.public-theme-toggle > span { font-size: calc(1em + var(--plaivi-size-step-1, 1px)); }

.public-theme-toggle:focus-visible {
  outline: 3px solid var(--theme-link, var(--blue));
  outline-offset: 5px;
}
:root[data-theme="black"] {
  --ink: var(--theme-text);
  --muted: var(--theme-muted);
  --line: var(--theme-border);
  --blue: var(--theme-link);
}
[data-theme="black"] .public-logo img { filter: brightness(1.55); }
[data-theme="black"] :is(.about-values,.thought,.podcast-audio,.phase-grid article,.program-tags span) {
  background: var(--theme-positive);
}
[data-theme="black"] .about-values article { border-color: var(--theme-border); }
[data-theme="black"] .library-tools input { background: var(--theme-panel); }
[data-theme="black"] :is(.btn:not(.secondary),.filter-tabs button[aria-pressed="true"],.about-hero figcaption) {
  background: var(--theme-action);
  border-color: var(--theme-action);
  color: #fff;
}
[data-theme="black"] .type-cover.tone-2 { background: #2149e5; }
@media (max-width:720px) {
  [data-theme="black"] .reader-layout>aside { background: var(--theme-panel); }
}

@media screen {
  .footer-wordmark-hint {
    --footer-glow-peak: #a7a7a7;
    --footer-glow-shadow: 0 0 1px currentColor, 0 0 4px rgb(255 255 255 / 80%);
    --footer-glow-rest: 1;
    animation: footer-wordmark-glint 2s ease-in-out;
  }
  @supports (color: color-mix(in srgb, black, white)) {
    .footer-wordmark-hint { --footer-glow-peak: color-mix(in srgb, currentColor 37%, white); }
  }
  [data-theme="black"] .footer-wordmark-hint {
    --footer-glow-peak: white;
    --footer-glow-shadow: 0 0 2px white, 0 0 7px rgb(255 255 255 / 85%);
    --footer-glow-rest: .78;
  }
  @keyframes footer-wordmark-glint {
    0%, 100% { color: inherit; text-shadow: none; opacity: 1; }
    15%, 24%, 65%, 74% {
      color: var(--footer-glow-peak);
      text-shadow: var(--footer-glow-shadow);
      opacity: 1;
    }
    37.5%, 50%, 87.5% {
      color: inherit;
      text-shadow: none;
      opacity: var(--footer-glow-rest);
    }
  }
}

@media screen and (prefers-reduced-motion: reduce) {
  .footer-wordmark-hint, [data-theme="black"] .footer-wordmark-hint {
    --footer-glow-shadow: none;
    /* Keep the stationary color cues visible under the global motion reset. */
    animation-duration: 2s !important;
  }
}
