/* One dark palette across the marketing site; light mode remains untouched.
   Base #101c27 · section #172936 · raised card #223b4d. */
:root[data-theme="dark"] {
  --bg0: #101c27;
  --bg2: #172936;
  --bg1: #223b4d;
  --panel: var(--bg1);
  --panel-alt: var(--bg2);
  --panel-deep: var(--bg2);
  --text: #edf3f8;
  --muted: #b7c8d5;
  --line: rgba(185, 211, 230, .12);
  --line-strong: rgba(185, 211, 230, .22);
  --blue: #075b91;
  --accent: #56a8f0;
  --ice: #b0d9fa;
  --accent-soft: rgba(86, 168, 240, .1);
  --green: #62cea2;
  --green-deep: #62cea2;
  --red: #f58d85;
  --green-soft: rgba(98, 206, 162, .07);
  --green-line: rgba(98, 206, 162, .24);
  --red-soft: rgba(245, 141, 133, .07);
  --red-line: rgba(245, 141, 133, .24);
  --track: rgba(185, 211, 230, .1);
  --track-strong: rgba(185, 211, 230, .2);
  --header-bg: #101c27;
  --grid-line: transparent;
  --glow-1: transparent;
  --glow-2: transparent;
  --glow-accent: transparent;
  --hi-top: var(--bg1);
  --hi-bot: var(--bg1);
  --shadow-lg: rgba(0, 0, 0, .18);
  --flow-blue: #56a8f0;
  --flow-muted: #8aaec7;
  --flow-highlight: #f1f7fd;
}

/* Calm page layers; the middle navy supports raised cards without heavy edges. */
[data-theme="dark"] body { background: var(--bg0); }
[data-theme="dark"] .site-header { background: var(--bg0); }
[data-theme="dark"] .section { background: var(--bg0); }
[data-theme="dark"] .section-alt,
[data-theme="dark"] main:has(> .page-hero),
[data-theme="dark"] main:has(> .page-hero) > section,
[data-theme="dark"] .page-section-nav,
[data-theme="dark"] .page-hero,
[data-theme="dark"] .integration-section { background: var(--bg2); }
[data-theme="dark"] .operator-perspectives { background: var(--bg0); }
[data-theme="dark"] #contact.closing-invitation { background: var(--bg2); }
[data-theme="dark"] :is(.site-footer, .video-frame, .short-frame, .video-modal) {
  --bg0: #101c27; --bg1: #223b4d; --bg2: #172936;
  --panel: #223b4d; --panel-alt: #172936;
  --text: #edf3f8; --muted: #b7c8d5; --accent: #56a8f0; --ice: #b0d9fa;
  --line: rgba(185,211,230,.12); --line-strong: rgba(185,211,230,.22);
}

/* Existing geometry and logo assets are preserved. */
[data-theme="dark"] .hero--streams { background: var(--bg0); color: var(--text); }
[data-theme="dark"] .hero--streams h1 { color: var(--text); }
[data-theme="dark"] .hero--streams .sub { color: var(--muted); }
[data-theme="dark"] .hero--streams .kicker { color: var(--accent); }
[data-theme="dark"] :is(.hero-streams, .hero-phone-streams) path { stroke: var(--flow-blue); }
[data-theme="dark"] .subpage-hero-streams path { stroke: var(--flow-blue); }
[data-theme="dark"] .subpage-hero-streams path:nth-child(3n) { stroke: var(--flow-muted); }
[data-theme="dark"] .closing-streams g { stroke: var(--flow-blue); }

/* Raised, quietly outlined surfaces; retain status colors and photo treatments. */
[data-theme="dark"] :is(.cell, .application-panel, .concept-node, .allocation-panel,
  .connection-option, .platform-capability-card, .industry-event, .event-next,
  .panel, .impact-comparison, .financial-assumption-card,
  .replacement-process-card, .consolidation-card, .revenue-allocation-card,
  .instant-worker, .flow-node, .proxy-card, .rack-visual, .sim, .mm-form, .role-card) {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: none;
}
[data-theme="dark"] .concept-section .concept-node--equalizer,
[data-theme="dark"] .integration-layer,
[data-theme="dark"] .allocation-resource { background: var(--bg1); box-shadow: none; border-color: var(--line-strong); }
[data-theme="dark"] .concept-section .concept-node--equalizer p,
[data-theme="dark"] .allocation-total > span { color: var(--muted); }
[data-theme="dark"] .allocation-resource p { color: var(--text); }
[data-theme="dark"] :is(.revenue-client, .consolidation-card-after) { border-color: rgba(125,187,236,.24); }
[data-theme="dark"] .revenue-host-icon { stroke: var(--flow-muted); }
[data-theme="dark"] .nav-drop-menu { background: var(--bg1); border-color: var(--line); box-shadow: 0 12px 30px var(--shadow-lg); }
[data-theme="dark"] .solutions-menu-preview { background: var(--bg2); }
[data-theme="dark"] .site-nav { background: transparent; }
@media (max-width: 920px) {
  [data-theme="dark"] .site-nav { background: var(--bg0); }
}

/* CTA fills stay in the brand-blue family; supporting links use a readable tint. */
:root[data-theme="dark"] .btn-primary,
:root[data-theme="dark"] .site-nav a.nav-cta { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: none; }
:root[data-theme="dark"] .btn-primary:hover,
:root[data-theme="dark"] .site-nav a.nav-cta:hover { background: #086da9; border-color: #086da9; color: #fff; }
:root[data-theme="dark"] .btn-ghost { color: var(--text); border-color: var(--line-strong); background: transparent; }
:root[data-theme="dark"] .btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
[data-theme="dark"] .performance-page #fleetSim .sim-mode button.active,
[data-theme="dark"] .facility-page #calculator .switch input:checked + .track { background: var(--blue); }
[data-theme="dark"] :is(.switch input:checked + .track, .sim-core, .miner .led) { box-shadow: none; }
[data-theme="dark"] .fleet-tile .tile-icon { filter: none; }
[data-theme="dark"] .performance-page #fleetSim .fleet-tile:not(.off) { background: var(--bg1); }
[data-theme="dark"] .performance-page #fleetProxy { background: var(--bg1); border-color: var(--line); }
[data-theme="dark"] .performance-page #fleetSim .sim-actions button:not(#fleetReset) { border-color: var(--line-strong); }
[data-theme="dark"] .facility-page #calculator :is(.toggle-row.active, .machine) { background: var(--bg2); border-color: var(--line); }
[data-theme="dark"] .facility-page #calculator .res-row.highlight { background: transparent; }
[data-theme="dark"] input[type="range"]::-webkit-slider-thumb { box-shadow: none; }
[data-theme="dark"] input[type="range"]::-moz-range-thumb { box-shadow: none; }

/* One line tint and brighter current across the code-native flow diagrams. */
[data-theme="dark"] :is(.concept-streams, .allocation-connections) > path,
[data-theme="dark"] :is(.connection-route, .integration-flow-lines, .instant-live-path, .instant-shared-path, .instant-particle, .instant-output-particles),
[data-theme="dark"] .consolidation-transfer > svg { stroke: var(--flow-blue); }
[data-theme="dark"] :is(.concept-streams, .allocation-connections) .concept-currents { stroke: var(--flow-highlight); }
[data-theme="dark"] .integration-travel { stroke: var(--flow-highlight); }
[data-theme="dark"] .instant-particle,
[data-theme="dark"] .instant-output-particles { stroke: var(--flow-highlight); }
[data-theme="dark"] .instant-diagram:not([data-phase="temporary"]) .instant-live-path { stroke: var(--flow-muted); opacity: .45; }
[data-theme="dark"] .instant-miner-live { stroke: var(--flow-blue); }
[data-theme="dark"] .instant-pending-path { stroke: var(--flow-muted); }
[data-theme="dark"] .instant-worker-connection { background: var(--flow-blue); }
[data-theme="dark"] .revenue-allocation-routes { stroke: var(--flow-blue); }
[data-theme="dark"] .revenue-allocation-routes .revenue-host-route { stroke: var(--flow-muted); }
[data-theme="dark"] .revenue-allocation-routes .revenue-flow-highlight { stroke: var(--flow-highlight); }
[data-theme="dark"] :is(.revenue-client-flow i, .revenue-host-flow) { background: var(--flow-muted); }
[data-theme="dark"] :is(.revenue-client-flow i, .revenue-host-flow)::after { background: var(--flow-highlight); }
[data-theme="dark"] .replacement-process-card:not(:last-child)::after { background: var(--flow-blue); }

/* Booking is a third-party white iframe: retain its native surface as a deliberate inset. */
[data-theme="dark"] .demo-calendar-shell { box-shadow: none; border-color: var(--line-strong); }
[data-theme="dark"] .demo-calendar-alternative { color: var(--muted); }

[data-theme="dark"] .instant-active { color: var(--green); }
[data-theme="dark"] .facility-page #calculator input[type="range"] { background: #718da1; }

/* Use the supplied white logo, never a filter or recoloring, on navy diagrams. */
.connection-logo-white { display: none; }
[data-theme="dark"] .connection-logo-color { display: none; }
[data-theme="dark"] .connection-logo-white { display: inline; }
[data-theme="dark"] :is(.application-art, .solution-preview-art) [stroke="#07558a" i] { stroke: var(--flow-highlight); }
[data-theme="dark"] :is(.application-art, .solution-preview-art) [stroke="#50a3e8" i] { stroke: var(--flow-blue); }
[data-theme="dark"] :is(.application-art, .solution-preview-art) [stroke="#8fa8ba" i] { stroke: var(--flow-muted); }

/* Brand blue for editorial/diagram accents; keep approved CTA and button colors. */
[data-theme="dark"] :is(button, .btn, .nav-cta, .switch,
  .concept-cta, .integration-cta, .homepage-story-cta, .application-cta,
  .closing-contact, .contact-page-action, .industry-meet-link, .demo-calendar-alternative a) {
  --accent: #7dbbec;
  --accent-soft: rgba(125,187,236,.1);
}

/* Recipient lines share the Client treatment, including highlight intensity. */
[data-theme="dark"] .revenue-host-flow { opacity: .45; }
