/* Launch palette: a restrained, neutral black mode. Keep the artwork intact. */
html[data-theme='dark']:not(#legacy-publication) {
  color-scheme: dark;
  --publication-bg: #0a0a0a;
  --publication-ink: #f4f4f4;
  --publication-muted: #aaa;
  --publication-line: #292929;
  --publication-wash: #141414;
  --publication-nav-ink: #c5c5c5;
  --publication-focus: #419cff;
}
html[data-theme='light'] { color-scheme: light; }
html[data-theme='dark']:not(#legacy-publication) body:not(.member-login-page) {
  --bg: #0a0a0a;
  --surface: #141414;
  --elevated: #1b1b1b;
  --text-primary: #f4f4f4;
  --text-secondary: #aaa;
  --text-muted: #aaa;
  --border: #292929;
  background: #0a0a0a !important;
  color: #f4f4f4;
}
html[data-theme='dark']:not(#legacy-publication) body.home-editorial.home-refined.home-openai-clean {
  --editorial-ink: #0a0a0a;
  --editorial-surface: #141414;
  --editorial-text: #f4f4f4;
  --editorial-muted: #aaa;
  --editorial-line: #292929;
  --editorial-line-soft: #202020;
  --editorial-blue: #419cff;
}
html[data-theme='dark']:not(#legacy-publication) body:not(.member-login-page) {
  :is(.site-footer,.site-drawer-panel) { background: #0a0a0a !important; color: #f4f4f4 !important; border-color: #292929 !important; }
  .site-drawer-panel :is(a,button) { color: #f4f4f4; }
  .site-footer :is(p,small,.footer-copy,.footer-bottom) { color: #aaa !important; }
  :is(.editorial-daily-marker,.editorial-frontpage,.research-hero,.report-library-section,.podcast-audience,.episodes-section,.campaign-results) { background-color: #0a0a0a !important; }
  &.reports-page main > section { background-color: #0a0a0a !important; }
  .research-latest :is(h2,h3,a) { color: #f4f4f4 !important; }
  .research-latest :is(p,small) { color: #aaa !important; }
  :is(.campaign-case,.campaign-final,.latest-newsletter,.weekly-finimize-side-card,.home-report-feature,.terminal-outcome-card,.terminal-feature-row,.newsletter-cta-card) { background-color: #141414 !important; border-color: #292929 !important; }
  :is(.terminal-outcome-card,.terminal-feature-row,.terminal-proof-panel) :is(h2,h3,strong) { color: #f4f4f4 !important; }
  :is(.terminal-outcome-card,.terminal-feature-row,.terminal-proof-panel) p { color: #aaa !important; }
  .terminal-proof-panel { background: #141414 !important; border: 1px solid #292929; }
  .terminal-proof-panel blockquote { color: #e8e8e8 !important; }
  .campaign-hero { background-color: #0a0a0a !important; background-image: radial-gradient(ellipse at 85% 30%, #07346877, transparent 65%) !important; }
  .campaign-logo { background: transparent !important; }
  .campaign-logo img { filter: grayscale(1) invert(1); mix-blend-mode: screen; }
  .podcast-hero { background-color: #0a0a0a !important; background-image: radial-gradient(ellipse at 80% 25%, #19334b33, transparent 65%) !important; }
  :is(.editorial-signup-status,.form-status).is-success { color: #8cd5b1 !important; }
  :is(.editorial-signup-status,.form-status,.newsletter-cta-note).is-error { color: #ffb1ac !important; }
  :is(input,textarea,select) { color-scheme: dark; }
  :is(input,textarea)::placeholder { color: #a3a3a3; }
}
html[data-theme='dark']:not(#legacy-publication) body.editorial-page[data-editorial-page='article'] {
  --reader-paper: #0a0a0a;
  --reader-ink: #ededed;
  --reader-muted: #aaa;
  --reader-line: #303030;
}
/* The account screen remains intentionally white in both themes. */
html:has(body.member-login-page):not(#legacy-publication) {
  color-scheme: light;
  --publication-bg: #fff;
  --publication-ink: #111;
  --publication-muted: #5e626b;
  --publication-line: #e3e5e9;
  --publication-wash: #f6f7f9;
  --publication-nav-ink: #454750;
  --publication-nav-hover: #111;
}
html body.member-login-page :is(input,textarea,select) { color-scheme: light; }
html { scroll-padding-top: 88px; }
.skip-to-content { position: fixed; top: 8px; left: 16px; z-index: 100000; padding: 12px 18px; background: #fff; color: #111; border: 2px solid #111; border-radius: 6px; transform: translateY(-160%); }
.skip-to-content:focus { transform: none; }
html body :is(button,a,input,textarea,select) { -webkit-tap-highlight-color: transparent; }
html body :is(img,video) { max-width: 100%; }
html body .article-body :is(pre,table) { max-width: 100%; overflow-x: auto; }
html body .article-body a { overflow-wrap: anywhere; }
html:not(#legacy-publication) body .site-footer .footer-brand { color: var(--publication-ink) !important; }
html:not(#legacy-publication) body .site-footer .footer-brand span { color: inherit !important; }
html:not(#legacy-publication) body .site-footer :is(.footer-links a,.footer-col a) { color: var(--publication-muted) !important; }
html:not(#legacy-publication) body .newsletter-cta :is(.newsletter-cta-form,.newsletter-cta-input) { box-shadow: none !important; }
/* Avoid iOS input zoom and preserve comfortable tap targets on compact screens. */
@media (max-width: 600px) {
  html body :is(input[type='email'],input[type='text'],textarea,select) { font-size: 16px !important; }
  html:not(#legacy-publication) body .publication-nav .nav-inner { gap: 6px !important; padding-inline: 16px !important; }
  html:not(#legacy-publication) body .publication-nav .nav-actions { gap: 2px !important; }
  html:not(#legacy-publication) body .publication-nav .nav-logo.nav-logo--insights { gap: 10px !important; }
  html:not(#legacy-publication) body .publication-nav .btn { min-height: 44px !important; }
  html body .report-library-header { margin-bottom: 24px; }
}
@media (max-width: 370px) {
  html:not(#legacy-publication) body .publication-nav .nav-logo .nav-wordmark { font-size: 16px !important; }
  html:not(#legacy-publication) body .publication-nav .nav-logo-img { width: 28px !important; height: 28px !important; }
  html:not(#legacy-publication) body .publication-nav .nav-right-links .btn { padding-inline: 10px !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  html body *, html body *::before, html body *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
