/* Shared reading contrast. Ordinary text is white in dark mode and black in light mode. */
:root {
  --text: #fff;
  --muted: #fff;
  --subtle: #fff;
}
:root[data-theme="light"] {
  --text: #000;
  --muted: #000;
  --subtle: #000;
}
/* Override the former secondary gray palette across all six views and both languages. */
html[data-theme] body :is(
  p, p a, h1, h2, h3, label,
  .brand-light, .nav > a, .network,
  .btn:not(.btn-primary), .icon-btn,
  .pill, .pill-warm, .pill-green,
  .text-link, .copper, .hero-trust, .core-label,
  .visual-badge strong, .visual-badge small,
  .status-inner, .status-inner strong, .status-inner a,
  .stat-label, .stat-sub, .stat-value .unit, .stat-updated,
  .feature .fee-large small, .steps-mini li, .steps-mini b,
  .terminal-head, .terminal-label, .code-line,
  .connection-row, .connection-row span:last-child, .terminal-note,
  .footer-links, .footer-bottom, .footer-status,
  .notice, .notice a,
  .segmented button, .segmented button.active,
  .chart-times, .chart-empty strong, .empty-state strong,
  .chart-empty p, .empty-state p, .chart-foot, .chart-caption,
  .share-row, .share-row strong, .share-foot,
  th, td, .table-footer, input, select, option,
  .tabs button, .tabs button.active, .count,
  .field-hint, .privacy-note, .miner-id, .hint, .copy-btn,
  .faq-group-label, summary,
  .source-note, .source-note a, .toast,
  .status-caption, .mini-stat span, .inline-status,
  .empty-inline, .chip-link, .row-link, .last-update,
  .network-hint, .noscript,
  .preference-trigger, .preference-trigger:hover,
  .preference-trigger[aria-expanded="true"],
  .preference-heading, .preference-option,
  .preference-option:hover, .preference-option:focus-visible,
  .preference-option[aria-checked="true"],
  .preference-option strong, .preference-option small,
  .language-code, .preference-option[aria-checked="true"] .language-code
) {
  color: var(--text);
}
html[data-theme] body input::placeholder {
  color: var(--text);
  opacity: 1;
}
html[data-theme] body .chart::before,
html[data-theme] body summary::after {
  color: var(--text);
}
/* Copper buttons use black text against their light fill in either theme. */
html[data-theme] body .btn-primary {
  color: #000;
}
html[data-theme] body .btn-primary :is(span, svg) {
  color: inherit;
}
/* Change text immediately with its surface when switching themes. */
html[data-theme] body :is(a, button) {
  transition-property: background, border-color, transform, box-shadow;
}
/* Keep disabled labels legible; the border and cursor communicate availability. */
html[data-theme] body button:disabled {
  opacity: 1;
  border-style: dashed;
}
