.theme-toggle .theme-sun { display: none; }
html[data-theme="dark"] .theme-toggle .theme-sun { display: block; }
html[data-theme="dark"] .theme-toggle .theme-moon { display: none; }
html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0b1422;
  --surface: #111e30;
  --surface-subtle: #17263a;
  --sky: #0b1422;
  --sky-soft: #172d45;
  --navy: #e2f0fa;
  --ink: #e2f0fa;
  --muted: #a6b7c9;
  --line: #2c3e54;
  --blue: #70b6ff;
  --link: #8ac5ff;
  --red: #ff909e;
  --green: #64d8ac;
  color: var(--ink);
  background: var(--paper);
}
html[data-theme="dark"] body { color: var(--ink); background: var(--paper); }
html[data-theme="dark"] ::selection { background: #2e587b; color: #fff; }
html[data-theme="dark"] :is(.publication-header,.site-menu,.topic-navigation,.more-topics-menu,
  .publication-footer,.reading-page,.tp-home,.markets-page,.feed-page,.market-data-page) {
  color: var(--ink); background: var(--paper); border-color: var(--line);
}
html[data-theme="dark"] img[src$="/tokenpost-logo.svg"] { content: url("/tokenpost-logo-white.svg"); }
html[data-theme="dark"] :is(.publication-date,.site-menu-group h2,.primary-topics > :is(button, a),
  .more-topics > summary,.publication-footer-columns a,.publication-footer-columns button,.publication-footer-social,
  .publication-footer-bottom,.tp-card-meta,.story-meta,.edition-story-meta,.reader-deck,.reader-byline,
  .reader-publication-meta,.image-caption,.reader-source,.reader-related-meta,.reader-author-bio p,
  .feed-time,.feed-summary,.feed-source,.md-sidebar-title,.md-nav-group > button,.md-back-home,
  .md-view-tabs > button,.watch-film-caption,.watch-film-caption a,.lead) { color: var(--muted); }
html[data-theme="dark"] :is(h1,h2,h3,h4,.reader-body,.reader-body p,.reader-body li,
  .reader-related-copy h3,.reader-author-name,.tp-card-copy,.feed-headline,.md-table,
  .publication-header .publication-account .icon-button,.article-tickers a) { color: var(--ink); }
html[data-theme="dark"] :is(.story-category,.reader-category,.reader-body a,.md-view-tabs > button[aria-current="page"]) { color: var(--link); }
html[data-theme="dark"] :is(.feature-dialog,.feature-dialog-heading,.assistant-drawer,
  .assistant-drawer > .feature-dialog-heading,.chat-tabs > button,.chat-compose,.chat-compose > div,
  .suggested-prompts > button,.search-dialog,.search-panel,.saved-panel,.member-dialog,.member-content,
  .x-embed-card,.x-embed-author,.feed-filters,.feed-toolbar,.feed-day-heading,
  .md-sidebar,.md-search,.md-table th,.md-metrics,.md-metric,.md-panel,.md-chart-panel,.md-asset-detail,
  .md-outline-button,.md-ai-button,.reader-tools > button,.article-tickers a,
  .floating-chat .ai-launch,.community-launch,.live-reopen,.video-placeholder,
  .publication-header .publication-account .wallet-button) {
  color: var(--ink); background: var(--surface); border-color: var(--line);
}
html[data-theme="dark"] .market-data-page { --md-surface: var(--surface); --md-soft: var(--surface-subtle); --md-muted: var(--muted); }
html[data-theme="dark"] :is(input,textarea,select) { color: var(--ink); background-color: var(--surface); border-color: var(--line); }
html[data-theme="dark"] :is(input,textarea)::placeholder { color: var(--muted); }
html[data-theme="dark"] :is(.md-table tr:hover td,.md-table tr.is-selected td,.md-nav-group > button.selected,
  .md-sector-tabs > button[aria-pressed="true"],.chat-tabs > button.selected,
  .assistant-drawer .chat-message.assistant p,.assistant-drawer .chat-message.user p,
  .reader-tools > button:hover,.article-tickers a:hover,.icon-button:hover,
  .publication-header .publication-account .wallet-button:hover) { background: var(--sky-soft); color: var(--ink); }
html[data-theme="dark"] :is(.tp-card-copy p,.edition-story p,.market-story p,.feed-brief p,.chat-welcome p) { color: var(--muted); }
html[data-theme="dark"] :is(.publication-nav-row,.publication-platform-nav::before,.editorial-rule,
  .reader-tools,.reader-section-line,.md-table td,.md-table th) { border-color: var(--line); }
html[data-theme="dark"] .md-chart svg text { fill: var(--muted); }
html[data-theme="dark"] .positive { color: var(--green); }
html[data-theme="dark"] .negative { color: #ff909e; }
html[data-theme="dark"] :is(a,button):hover { color: var(--link); }
html[data-theme="dark"] .mini-player-controls button { background: #17263a; color: #e2f0fa; }
html[data-theme="dark"] :is(.layout aside a[aria-current="page"],footer:not(.publication-footer)) { background: var(--surface); color: var(--muted); }
html[data-theme="dark"] .skip-link { background: var(--surface); color: var(--ink); }
html[data-theme="dark"] :is(.tp-lead-meta,.tp-section-heading > span,.edition-section-heading > button,
  .edition-data-state,.edition-data-source,.edition-quotes small,.wire-tabs > button,
  .rail-community > p,.rail-ai > p) { color: var(--muted); }
html[data-theme="dark"] :is(.wire-tabs > button.selected,.edition-text-link,.rail-ai > svg) { color: var(--link); }
