/* Apply palette colors to interface surfaces. Media keep their source colors. */
html[data-noveam-theme="dark"] {
  color-scheme: dark;
  background-color: #101827;
  color: #fff;
}
html[data-noveam-theme="dark"]:not([data-settings-theme]) body {
  --bg: #101827;
  --card: #19263b;
  --surface: #19263b;
  --text: #fff;
  --muted: #d7e0ef;
  --line: #42536c;
  background: linear-gradient(145deg, #101827, #182640 58%, #17233b) fixed !important;
  color: var(--text) !important;
}
html[data-noveam-theme="dark"]:not([data-settings-theme]) :is(
  article, .card, .panel, .sectionBox, .socialStat, .achievementToken,
  .post, .post-card, .article-card, .composer, .comment, .comments,
  .sidebar, .modal, .dialog, dialog, .dropdown, .menu, .notice,
  .profile-card, .privacy, .chip, .badge, .avatarText,
  table, th, td, input, textarea, select, option
) {
  background-color: var(--card, #19263b) !important;
  color: #fff !important;
  border-color: var(--line, #42536c) !important;
}
html[data-noveam-theme="dark"]:not([data-settings-theme]) :is(
  header:not(.nv-global-nav), footer, .secondary, .actions button
) {
  background-color: #223451 !important;
  color: #fff !important;
}
html[data-noveam-theme="dark"]:not([data-settings-theme]) :is(
  h1, h2, h3, h4, h5, h6, p, label, legend, .posthead, .viewrow
) {
  color: #fff !important;
}
html[data-noveam-theme="dark"]:not([data-settings-theme]) :is(
  small, .muted, .meta, .subtitle, .caption
) {
  color: #d7e0ef !important;
}
html[data-noveam-theme="dark"]:not([data-settings-theme]) :is(
  article a:not(.btn), .card a:not(.btn):not(.secondary)
) {
  color: #c7dcff !important;
}
html[data-noveam-theme="dark"]:not([data-settings-theme]) ::placeholder {
  color: #c3cfe1;
}

/* Explore cards and Feed navigation use explicit dark surfaces and focus states. */
html[data-noveam-theme="dark"][data-noveam-page="explore"] :is(.feature-card, .quick a),
html[data-noveam-theme="dark"][data-noveam-page="feed"] :is(.leftcol .navlink, .mobileNav .navlink) {
  background: #1d2b43 !important;
  color: #fff !important;
  border: 1px solid #425675;
}
html[data-noveam-theme="dark"][data-noveam-page="explore"] :is(.feature-icon, .arrow) {
  color: #fff;
}
html[data-noveam-theme="dark"][data-noveam-page="explore"] .feature-icon {
  background: linear-gradient(135deg, #2b4677, #49356e);
}
html[data-noveam-theme="dark"][data-noveam-page="explore"] :is(.hero, .feature-card:hover, .quick a:hover),
html[data-noveam-theme="dark"][data-noveam-page="feed"] :is(.navlink.active, .navlink:hover) {
  background: linear-gradient(125deg, #253f70, #483268) !important;
  color: #fff !important;
  border-color: #7994c1;
}
html[data-noveam-theme="dark"][data-noveam-page="feed"] .leftcol :is(.navSection, .navlink span, h3) {
  color: #fff !important;
}
html[data-noveam-theme="dark"][data-noveam-page="explore"] :is(.feature-card, .quick a):focus-visible,
html[data-noveam-theme="dark"][data-noveam-page="feed"] .navlink:focus-visible {
  outline: 2px solid #b7d4ff;
  outline-offset: 2px;
}
