:root[data-mithrandir-theme="active"] {
  --paper: var(--theme-page);
  --paper-deep: var(--theme-surface);
  --ink: var(--theme-text);
  --blue-muted: var(--theme-text-muted);
  --line: var(--theme-border);
}

:root[data-mithrandir-theme="active"] body {
  background: var(--theme-page);
  color: var(--theme-text);
}

:root[data-mithrandir-theme="active"] .page-shell,
:root[data-mithrandir-theme="active"] .hero,
:root[data-mithrandir-theme="active"] .career-section,
:root[data-mithrandir-theme="active"] .case-section {
  background-color: var(--theme-page);
}

:root[data-mithrandir-theme="active"] .intro,
:root[data-mithrandir-theme="active"] .lower-grid p,
:root[data-mithrandir-theme="active"] .timeline-content p,
:root[data-mithrandir-theme="active"] .case-section p,
:root[data-mithrandir-theme="active"] .case-list li,
:root[data-mithrandir-theme="active"] .case-meta dd,
:root[data-mithrandir-theme="active"] .open-note {
  color: var(--theme-text-muted);
}

:root[data-mithrandir-theme="active"] .hero h1,
:root[data-mithrandir-theme="active"] .lower-grid h2,
:root[data-mithrandir-theme="active"] .primary-link,
:root[data-mithrandir-theme="active"] blockquote,
:root[data-mithrandir-theme="active"] .countdown,
:root[data-mithrandir-theme="active"] .career-hero h1,
:root[data-mithrandir-theme="active"] .case-hero h1,
:root[data-mithrandir-theme="active"] .career-summary strong,
:root[data-mithrandir-theme="active"] .career-anchors a,
:root[data-mithrandir-theme="active"] .career-link,
:root[data-mithrandir-theme="active"] .career-section-header h2,
:root[data-mithrandir-theme="active"] .case-section h2,
:root[data-mithrandir-theme="active"] .timeline-date,
:root[data-mithrandir-theme="active"] .timeline-content h3,
:root[data-mithrandir-theme="active"] .career-meta span,
:root[data-mithrandir-theme="active"] .case-meta dt,
:root[data-mithrandir-theme="active"] .case-section h3,
:root[data-mithrandir-theme="active"] .case-callout strong {
  color: var(--theme-text);
}

:root[data-theme="dark"][data-mithrandir-theme="active"] .countdown {
  color: var(--theme-maize) !important;
}

:root[data-mithrandir-theme="active"] .tool-card,
:root[data-mithrandir-theme="active"] .timeline-card,
:root[data-mithrandir-theme="active"] .career-summary,
:root[data-mithrandir-theme="active"] .case-callout {
  background: var(--theme-surface-raised);
}

:root[data-mithrandir-theme="active"] .countdown-card,
:root[data-mithrandir-theme="active"] .career-anchors,
:root[data-mithrandir-theme="active"] .timeline-media,
:root[data-mithrandir-theme="active"] .case-meta,
:root[data-mithrandir-theme="active"] .case-hero-image {
  background: var(--theme-surface);
}

:root[data-mithrandir-theme="active"] .career-summary,
:root[data-mithrandir-theme="active"] .timeline-card,
:root[data-mithrandir-theme="active"] .case-callout,
:root[data-mithrandir-theme="active"] .case-hero-image,
:root[data-mithrandir-theme="active"] .career-meta span {
  border-color: var(--theme-border);
}

:root[data-mithrandir-theme="active"] .career-meta span {
  background: var(--theme-focus-soft);
}

:root[data-theme="dark"][data-mithrandir-theme="active"] .hero,
:root[data-theme="dark"][data-mithrandir-theme="active"] .career-hero,
:root[data-theme="dark"][data-mithrandir-theme="active"] .case-hero {
  background:
    radial-gradient(circle at 78% 28%, rgba(255, 203, 5, 0.09), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 48%),
    var(--theme-page);
}

:root[data-theme="dark"][data-mithrandir-theme="active"] .declaration {
  background: var(--theme-navy-900);
  color: var(--theme-rail-text);
  box-shadow: 14px 14px 0 color-mix(in srgb, var(--theme-maize) 32%, transparent);
}

:root[data-theme="dark"][data-mithrandir-theme="active"] .career-hero::before,
:root[data-theme="dark"][data-mithrandir-theme="active"] .daily-quote {
  background: var(--theme-navy-950);
}

:root[data-mithrandir-theme="active"] .login-card {
  border-color: var(--theme-border-strong);
  background: var(--theme-surface-raised);
  color: var(--theme-text);
  box-shadow: var(--theme-shadow-strong);
}

:root[data-mithrandir-theme="active"] .login-card p {
  color: var(--theme-text-muted);
}

:root[data-mithrandir-theme="active"] .login-card input {
  border-color: var(--theme-border-strong);
  background: var(--theme-surface-muted);
  color: var(--theme-text);
}

:root[data-mithrandir-theme="active"] .login-card input:focus-visible,
:root[data-mithrandir-theme="active"] .login-card button:focus-visible {
  outline: 3px solid var(--theme-focus-soft);
  outline-offset: 2px;
}

:root[data-mithrandir-theme="active"] .login-card button {
  background: var(--theme-accent);
  color: var(--theme-accent-contrast);
}

:root[data-mithrandir-theme="active"] .login-card button:hover {
  background: var(--theme-accent-strong);
}

:root[data-mithrandir-theme="active"] .login-card .message {
  border: 1px solid var(--theme-danger-border);
  background: var(--theme-danger-surface);
  color: var(--theme-danger);
}

:root[data-mithrandir-theme="active"] .login-card .expired {
  border-color: var(--theme-border);
  background: var(--theme-surface-muted);
  color: var(--theme-text-muted);
}

:root[data-mithrandir-theme="active"] .login-card .home-link {
  color: var(--theme-text);
}
