html:not([data-theme='dark']) {
  color-scheme: light;
  color: #281735;
  --site-canvas: #f8f6fc;
  --site-surface: #fff;
  --site-ink: #281735;
  --site-muted: #65596f;
  --site-quiet: #6d6176;
  --site-accent: #633a83;
  --site-rule: #d9d0e4;
}

html[data-theme='dark'] {
  color-scheme: dark;
}

html:not([data-theme='dark']),
html:not([data-theme='dark']) body,
html:not([data-theme='dark']) #app,
html:not([data-theme='dark']) ::view-transition,
html:not([data-theme='dark']) ::view-transition-group(root),
html:not([data-theme='dark']) ::view-transition-image-pair(root) {
  background-color: var(--site-canvas);
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  color: #c9bbca;
  cursor: pointer;
  white-space: nowrap;
}
html:not([data-theme='dark']) .theme-switch {
  color: var(--site-muted);
}
.theme-switch__label {
  font-size: 0.67rem;
  font-weight: 700;
}
.theme-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.theme-switch__track {
  width: 42px;
  height: 24px;
  display: flex;
  align-items: center;
  padding: 3px;
  border: 1px solid #aa819f;
  border-radius: 99px;
  background: #4b2550;
  transition: background-color 150ms ease;
}
.theme-switch__track span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(40, 23, 53, 0.25);
  transition: transform 150ms ease;
}
.theme-switch input:checked + .theme-switch__track {
  border-color: #feabae;
  background: #8d026e;
}
.theme-switch input:checked + .theme-switch__track span {
  transform: translateX(18px);
}
.theme-switch input:focus-visible + .theme-switch__track {
  outline: 3px solid #d0a9f0;
  outline-offset: 3px;
}
html:not([data-theme='dark']) .theme-switch__track {
  border-color: #a794b8;
  background: #e9deee;
}
html:not([data-theme='dark']) .theme-switch input:focus-visible + .theme-switch__track {
  outline-color: var(--site-accent);
}

html:not([data-theme='dark']) .sb-header {
  border-color: var(--site-rule);
  background: rgba(250, 248, 253, 0.88);
  box-shadow: 0 1px 0 rgba(68, 33, 107, 0.05);
}
html:not([data-theme='dark']) .sb-header__brand img {
  filter: brightness(0) saturate(100%) invert(14%) sepia(24%) saturate(1754%) hue-rotate(232deg)
    brightness(94%);
}
html:not([data-theme='dark']) .sb-header__nav-link {
  color: var(--site-muted);
}
html:not([data-theme='dark']) .sb-header__nav-link:hover,
html:not([data-theme='dark']) .sb-header__nav-link[aria-current='page'] {
  background: #eee7f6;
  color: var(--site-ink);
}
html:not([data-theme='dark']) .sb-header__action {
  border-color: #d4c3df;
  color: var(--site-accent);
}
html:not([data-theme='dark']) .sb-header__action:hover,
html:not([data-theme='dark']) .sb-header__action[aria-current='page'] {
  border-color: var(--site-accent);
  background: var(--site-accent);
  color: #fff;
}

/* Signal feed and standard articles */
html:not([data-theme='dark']) {
  --plum: #f8f6fc;
  --plum-soft: #eee7f6;
  --warm: #281735;
  --coral: #633a83;
  --muted: #65596f;
  --quiet: #6d6176;
  --rule: #d9d0e4;
}
html:not([data-theme='dark']) .signal-shell {
  background:
    radial-gradient(circle at 83% 5%, rgba(245, 198, 146, 0.26), transparent 26rem),
    var(--site-canvas);
}
html:not([data-theme='dark']) .filters button {
  color: var(--site-muted);
}
html:not([data-theme='dark']) .filters button[aria-pressed='true'] {
  background: #44216b;
  color: #fff;
}

/* Slida marketing and feature pages */
html:not([data-theme='dark']) {
  --plum-1000: #f8f6fc;
  --plum-950: #44216b;
  --plum-900: #eee7f6;
  --ink-soft: #65596f;
}
html:not([data-theme='dark']) .slida-ambient {
  --warm: #281735;
  --coral: #633a83;
  --plum-950: #44216b;
  background: #f8f6fc;
  color: var(--site-ink);
}
html:not([data-theme='dark']) .slida-ambient .ambient-shade {
  background:
    linear-gradient(
      90deg,
      rgba(248, 246, 252, 0.97) 0,
      rgba(248, 246, 252, 0.9) 38%,
      rgba(248, 246, 252, 0.35) 68%,
      rgba(248, 246, 252, 0.65)
    ),
    linear-gradient(0deg, rgba(248, 246, 252, 0.72), transparent 42%);
}
html:not([data-theme='dark']) .slida-ambient .ambient-hero-copy h1 {
  text-shadow: none;
}
html:not([data-theme='dark']) .slida-ambient .ambient-hero-copy > p:not(.ambient-eyebrow),
html:not([data-theme='dark']) .slida-ambient .ambient-proof,
html:not([data-theme='dark']) .slida-ambient .acronym-line,
html:not([data-theme='dark']) .slida-ambient .ambient-caption,
html:not([data-theme='dark']) .slida-ambient .landscape-loader {
  color: var(--site-muted);
}
html:not([data-theme='dark']) .slida-ambient .slida-brand-stage,
html:not([data-theme='dark']) .slida-ambient .ambient-caption,
html:not([data-theme='dark']) .slida-ambient .landscape-loader {
  border-color: var(--site-rule);
}
html:not([data-theme='dark']) .slida-ambient .slida-brand-stage::before,
html:not([data-theme='dark']) .slida-ambient .ambient-story-rail button {
  color: var(--site-quiet);
}
html:not([data-theme='dark']) .slida-ambient .ambient-story-rail button.is-active {
  color: var(--site-ink);
}
html:not([data-theme='dark']) .slida-ambient .ambient-story-rail button > i {
  background: var(--site-rule);
}
html:not([data-theme='dark']) .slida-ambient .ambient-story-rail button.is-active > i {
  background: var(--site-accent);
}
html:not([data-theme='dark']) .slida-ambient .ambient-motion-toggle {
  border-color: var(--site-rule);
  background: rgba(255, 255, 255, 0.72);
  color: var(--site-muted);
}
html:not([data-theme='dark']) .slida-ambient .welcome-final-mark {
  background: #fff;
}
html:not([data-theme='dark']) .early-access {
  background: #f1ebf7;
}
html:not([data-theme='dark']) .access-copy h2,
html:not([data-theme='dark']) .pricing-philosophy h3 {
  color: var(--site-ink);
}
html:not([data-theme='dark']) .access-intro,
html:not([data-theme='dark']) .pricing-philosophy > p:last-child {
  color: var(--site-muted);
}
html:not([data-theme='dark']) .pricing-philosophy > p:first-child,
html:not([data-theme='dark']) .footer-support a,
html:not([data-theme='dark']) .footer-privacy a,
html:not([data-theme='dark']) .footer-privacy button {
  color: var(--site-accent);
}
html:not([data-theme='dark']) .pricing-philosophy {
  border-color: var(--site-accent);
  background: rgba(255, 255, 255, 0.76);
}
html:not([data-theme='dark']) .primary-cta,
html:not([data-theme='dark']) .analytics-allow {
  border-color: #44216b;
  background: #44216b;
  color: #fff;
}
html:not([data-theme='dark']) .primary-cta:hover {
  border-color: #633a83;
  background: #633a83;
}
html:not([data-theme='dark']) .slida-ambient .ambient-cta {
  border-color: #44216b;
  background: #44216b;
  color: #fff;
}
html:not([data-theme='dark']) .slida-ambient .ambient-cta:hover {
  border-color: #633a83;
  background: #633a83;
}
html:not([data-theme='dark']) .site-shell footer {
  border-color: var(--site-rule);
  color: var(--site-quiet);
}
html:not([data-theme='dark']) .analytics-consent {
  border-color: var(--site-rule);
  background: #fff;
  color: var(--site-ink);
}
html:not([data-theme='dark']) .analytics-consent p {
  color: var(--site-muted);
}
html:not([data-theme='dark']) .feature-intro {
  border-color: var(--site-rule);
}
html:not([data-theme='dark']) .feature-back,
html:not([data-theme='dark']) .feature-availability,
html:not([data-theme='dark']) .feature-body a {
  color: var(--site-accent);
}
html:not([data-theme='dark']) .feature-lead,
html:not([data-theme='dark']) .feature-body p,
html:not([data-theme='dark']) .feature-body li {
  color: var(--site-muted);
}
html:not([data-theme='dark']) .feature-cta {
  border-color: var(--site-accent);
}

/* Early access and legal pages */
html:not([data-theme='dark']) {
  --panel: #44216b;
}
html:not([data-theme='dark']) body.legal-page {
  background:
    radial-gradient(circle at 84% 4%, rgba(245, 198, 146, 0.24), transparent 28rem),
    linear-gradient(rgba(104, 64, 139, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104, 64, 139, 0.025) 1px, transparent 1px), var(--site-canvas);
  background-size:
    auto,
    52px 52px,
    52px 52px,
    auto;
}
html:not([data-theme='dark']) .lifecycle-shell section {
  border-color: var(--site-rule);
  background: rgba(255, 255, 255, 0.88);
}
html:not([data-theme='dark']) .lifecycle-shell section > p:not(.eyebrow),
html:not([data-theme='dark']) .lifecycle-shell .privacy-context,
html:not([data-theme='dark']) .lifecycle-shell .consent-row,
html:not([data-theme='dark']) .lifecycle-shell .reissue > p {
  color: var(--site-muted);
}
html:not([data-theme='dark']) .lifecycle-shell input[type='email'],
html:not([data-theme='dark']) .lifecycle-shell input[type='text'] {
  border-color: var(--site-rule);
  background: #fff;
  color: var(--site-ink);
}
html:not([data-theme='dark']) .lifecycle-shell button {
  border-color: #44216b;
  background: #44216b;
  color: #fff;
}
html:not([data-theme='dark']) .lifecycle-shell .retry-button {
  background: transparent;
  color: var(--site-accent);
}
html:not([data-theme='dark']) .lifecycle-shell .status {
  background: #eee7f6;
  color: var(--site-ink);
}
html:not([data-theme='dark']) .lifecycle-shell footer {
  color: var(--site-muted);
}
html:not([data-theme='dark']) .legal-summary {
  border-color: var(--site-rule);
  border-left-color: var(--site-accent);
  background: #fff;
  box-shadow: 0 18px 48px rgba(68, 33, 107, 0.08);
  color: var(--site-ink);
}
html:not([data-theme='dark']) .legal-main code {
  border-color: var(--site-rule);
  background: #eee7f6;
  color: var(--site-ink);
}

/* The research article opens in light mode, with its own dark counterpart. */
html[data-theme='dark'] {
  --research-canvas: #1c1025;
  --research-surface: #2e1a3a;
  --research-ink: #fdfbf7;
  --research-muted: #d5c8df;
  --research-border: #60496d;
  --research-primary: #d0a9f0;
  --research-primary-hover: #e2c7f5;
  --research-soft: #45295b;
  --research-accent: #e2c7f5;
  --research-line: #a48abb;
  --research-focus: #f0c36e;
}
.frontier-nav-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}
@media (max-width: 600px) {
  .frontier-nav-actions .draft-badge {
    display: none;
  }
  .frontier-page .frontier-nav {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (max-width: 980px) {
  .sb-header {
    grid-template-columns: 1fr auto;
    gap: 8px 16px;
  }
  .sb-header__nav {
    grid-row: 2;
    grid-column: 1 / -1;
    padding-top: 7px;
  }
  html:not([data-theme='dark']) .sb-header__nav {
    border-color: var(--site-rule);
  }
  .sb-header__actions {
    grid-row: 1;
    grid-column: 2;
  }
}
@media (max-width: 560px) {
  .theme-switch__label {
    display: none;
  }
  .sb-header__actions {
    gap: 8px;
  }
}
@media (max-width: 370px) {
  .sb-header__brand img {
    width: 128px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .theme-switch__track,
  .theme-switch__track span {
    transition: none;
  }
}
