/* Shipping Practice Lab 67.2 — Graphite & Aqua.
   One dark palette shared by the existing application and section token systems.
   This file is loaded after the page styles. Light themes and semantic status
   colours retain their existing values. Maps, photography and printed documents
   keep their own content colours. */
html[data-theme="dark"] {
  --lab-bg:#131819;
  --lab-surface:#1b2224;
  --lab-raised:#232d30;
  --lab-soft:#20292b;
  --lab-text:#edf4f2;
  --lab-copy:#d4dfdc;
  --lab-muted:#a6b7b2;
  --lab-faint:#90a39e;
  --lab-line:#354440;
  --lab-line-strong:#536963;
  --lab-accent:#46dfc1;
  --lab-accent-hover:#79eed6;
  --lab-accent-pressed:#2ac4a7;
  --lab-accent-soft:#203d36;
  --lab-on-accent:#10251f;
  --lab-glass:rgba(19,24,25,.95);

  --spl-page:var(--lab-bg);--spl-page-alt:var(--lab-soft);
  --spl-surface:var(--lab-surface);--spl-surface-2:var(--lab-soft);--spl-surface-3:var(--lab-raised);
  --spl-ink:var(--lab-text);--spl-text:var(--lab-copy);--spl-muted:var(--lab-muted);
  --spl-border:var(--lab-line);--spl-border-strong:var(--lab-line-strong);
  --spl-primary:var(--lab-accent);--spl-primary-hover:var(--lab-accent-hover);--spl-primary-soft:var(--lab-accent-soft);
  --spl-focus:var(--lab-accent);--spl-header-surface:var(--lab-glass);--spl-overlay:rgba(5,9,8,.78);
  --spl-bg:var(--lab-bg);--spl-card:var(--lab-surface);--spl-line:var(--lab-line);
  --spl-accent:var(--lab-accent);--spl-accent-soft:var(--lab-accent-soft);
  --spl64-bg:var(--lab-bg);--spl64-bg-elev:var(--lab-surface);--spl64-bg-soft:var(--lab-soft);--spl64-bg-strong:var(--lab-raised);
  --spl64-text:var(--lab-copy);--spl64-text-strong:var(--lab-text);--spl64-text-muted:var(--lab-muted);--spl64-text-faint:var(--lab-faint);
  --spl64-border:var(--lab-line);--spl64-border-strong:var(--lab-line-strong);
  --spl64-accent:var(--lab-accent);--spl64-accent-2:var(--lab-accent-hover);--spl64-accent-soft:var(--lab-accent-soft);
  --spl-nav-bg:var(--lab-surface);--spl-nav-ink:var(--lab-text);--spl-nav-muted:var(--lab-muted);
  --spl-nav-line:var(--lab-line);--spl-nav-accent:var(--lab-accent);--spl-nav-dark:var(--lab-bg);

  --mi-bg:var(--lab-bg);--mi-bg-soft:var(--lab-soft);--mi-panel:var(--lab-surface);--mi-panel-2:var(--lab-soft);--mi-panel-3:var(--lab-raised);
  --mi-text:var(--lab-text);--mi-muted:var(--lab-muted);--mi-soft:var(--lab-copy);--mi-line:var(--lab-line);--mi-line-strong:var(--lab-line-strong);--mi-cyan:var(--lab-accent);
  --hub-bg:var(--lab-bg);--hub-bg2:var(--lab-soft);--hub-panel:var(--lab-surface);--hub-panel2:var(--lab-raised);
  --hub-line:var(--lab-line);--hub-cyan:var(--lab-accent);--hub-cyan2:var(--lab-accent-hover);--hub-white:var(--lab-text);--hub-muted:var(--lab-muted);
  --desk-bg:var(--lab-bg);--desk-bg-2:var(--lab-soft);--desk-surface:var(--lab-surface);--desk-surface-2:var(--lab-soft);--desk-surface-3:var(--lab-raised);
  --desk-ink:var(--lab-text);--desk-text:var(--lab-copy);--desk-muted:var(--lab-muted);--desk-line:var(--lab-line);--desk-line-strong:var(--lab-line-strong);
  --desk-navy:var(--lab-bg);--desk-navy-2:var(--lab-surface);--desk-teal:var(--lab-accent);--desk-cyan:var(--lab-accent);
  --pa-navy:var(--lab-bg);--pa-navy-2:var(--lab-surface);--pa-ink:var(--lab-text);--pa-muted:var(--lab-muted);
  --pa-line:var(--lab-line);--pa-paper:var(--lab-surface);--pa-canvas:var(--lab-bg);--pa-cyan:var(--lab-accent);--pa-cyan-2:var(--lab-accent);
  --vu-deep:var(--lab-bg);--vu-navy:var(--lab-surface);--vu-blue:var(--lab-raised);--vu-paper:var(--lab-bg);--vu-white:var(--lab-surface);
  --vu-ink:var(--lab-text);--vu-muted:var(--lab-muted);--vu-line:var(--lab-line);--vu-cyan:var(--lab-accent);--vu-cyan-soft:var(--lab-accent-hover);
  --fi-paper:var(--lab-bg);--fi-white:var(--lab-surface);--fi-deep:var(--lab-surface);--fi-ink:var(--lab-text);--fi-text:var(--lab-copy);
  --fi-muted:var(--lab-muted);--fi-line:var(--lab-line);--fi-blue:var(--lab-accent);--fi-cyan:var(--lab-accent);
  --cl-navy:var(--lab-bg);--cl-blue:var(--lab-raised);--cl-paper:var(--lab-bg);--cl-white:var(--lab-surface);
  --cl-ink:var(--lab-text);--cl-muted:var(--lab-muted);--cl-line:var(--lab-line);--cl-cyan:var(--lab-accent);--cl-cyan2:var(--lab-accent-hover);
  --spl2-navy:var(--lab-bg);--spl2-paper:var(--lab-bg);--spl2-white:var(--lab-surface);--spl2-soft:var(--lab-soft);
  --spl2-ink:var(--lab-text);--spl2-muted:var(--lab-muted);--spl2-line:var(--lab-line);--spl2-teal:var(--lab-accent);--spl2-cyan:var(--lab-accent);
  --cj-bg:var(--lab-bg);--cj-panel:var(--lab-surface);--cj-panel-2:var(--lab-raised);--cj-text:var(--lab-text);--cj-muted:var(--lab-muted);--cj-line:var(--lab-line);--cj-accent:var(--lab-accent);--cj-accent-soft:var(--lab-accent-soft);
}

/* Body-level token bridges override older section-specific dark palettes. */
html[data-theme="dark"] body.spl-premium-home {
  --bg:var(--lab-bg);--surface:var(--lab-surface);--raised:var(--lab-raised);--section:var(--lab-soft);
  --text:var(--lab-text);--muted:var(--lab-muted);--subtle:var(--lab-faint);--line:var(--lab-line);
  --accent:var(--lab-accent);--button:var(--lab-accent);--button-text:var(--lab-on-accent);--nav:var(--lab-glass);--soft:var(--lab-accent-soft);
}
html[data-theme="dark"] body.career-hub-body {
  --ch-paper:var(--lab-bg);--ch-white:var(--lab-surface);--ch-ink:var(--lab-text);--ch-muted:var(--lab-muted);--ch-line:var(--lab-line);--ch-cyan:var(--lab-accent);--ch-blue:var(--lab-raised);
}
html[data-theme="dark"] body.cn-body {
  --cn-paper:var(--lab-bg);--cn-white:var(--lab-surface);--cn-soft:var(--lab-soft);--cn-ink:var(--lab-text);--cn-ink2:var(--lab-copy);
  --cn-muted:var(--lab-muted);--cn-line:var(--lab-line);--cn-blue:var(--lab-accent);--cn-cyan:var(--lab-accent-hover);
}
html[data-theme="dark"] body.sea-body {
  --sea-paper:var(--lab-bg);--sea-white:var(--lab-surface);--sea-deep:var(--lab-bg);--sea-blue:var(--lab-raised);
  --sea-ink:var(--lab-text);--sea-muted:var(--lab-muted);--sea-line:var(--lab-line);--sea-cyan:var(--lab-accent);
  --sea-command:var(--lab-bg);--sea-command-card:var(--lab-surface);--sea-electric:var(--lab-accent);--sea-surface-glass:var(--lab-glass);
  --sea-category-bg:var(--lab-surface);--sea-category-border:var(--lab-line);--sea-category-copy:var(--lab-muted);
}
html[data-theme="dark"] body.mcs-body {
  --mcs-paper:var(--lab-bg);--mcs-surface:var(--lab-surface);--mcs-ink:var(--lab-text);--mcs-muted:var(--lab-muted);--mcs-line:var(--lab-line);--mcs-navy:var(--lab-bg);--mcs-navy-2:var(--lab-surface);--mcs-cyan:var(--lab-accent);
}
html[data-theme="dark"] body.spl-auth-page {
  --spl-a-bg:var(--lab-bg);--spl-a-panel:var(--lab-surface);--spl-a-line:var(--lab-line);
  --spl-a-text:var(--lab-text);--spl-a-muted:var(--lab-muted);--spl-a-green:var(--lab-accent);
}
html[data-theme="dark"] body.spl-dashboard-v54-page {
  --pd-bg:var(--lab-bg);--pd-surface:var(--lab-surface);--pd-surface-2:var(--lab-soft);--pd-surface-3:var(--lab-raised);
  --pd-ink:var(--lab-text);--pd-text:var(--lab-copy);--pd-muted:var(--lab-muted);--pd-faint:var(--lab-faint);
  --pd-border:var(--lab-line);--pd-border-strong:var(--lab-line-strong);--pd-navy:var(--lab-bg);--pd-navy-2:var(--lab-surface);
  --pd-cyan:var(--lab-accent);--pd-cyan-dark:var(--lab-accent);--pd-cyan-soft:var(--lab-accent-soft);
}
html[data-theme="dark"] body {background:var(--lab-bg)!important}

/* Section backgrounds and existing solid panels; imagery stays in place. */
html[data-theme="dark"] body :is(
  .vu-hero,.vu-explorer-section,.pa-intro,.pa-disruption-section,.fi-hero,.fi-fleet-section,
  .career-hub-hero,.career-hub-method,.career-hub-footer,.career-path-sea,
  .ch-focus-hero,.mi-hero,.mi-lead-story,.mi-daily-brief,.desk-review-hero,.spl-auth-intro,.mg-hero,
  .ph-chartering-card,.cl-home-card,.cl-module-entry,.cn-hero,.cn-search-section,.cn-role-section,
  .sea-hero,.sea-detail-header,.sea-compass-card,.page-hero-modules
) {background:linear-gradient(145deg,var(--lab-raised),var(--lab-bg))!important;border-color:var(--lab-line)!important}
html[data-theme="dark"] body :is(
  .vu-hero-manifest,.vu-hero-console,.vu-workspace-detail,.vu-ai-context,.vu-card,.vu-compare-dock,
  .vu-twin-shell,.vu-twin-selector,.vu-system-panel,.vu-mode-switch,.vu-telemetry,
  .pa-intro-facts>div,.pa-map-topbar,.pa-port-panel,.pa-scenario-sidebar,.pa-scenario-panel,.pa-map-instruction,
  .pa-map-tooltip,.fi-command-grid div,.fi-source-grid a,.fi-fleet-leader,.fi-fleet-card,.fi-fleet-detail,
  .fi-fleet-detail-mix,.fi-trade-controls,.fi-trade-map-card,.fi-section-nav,
  .career-path-office,.career-hub-compass,.career-hub-compass-ring span,
  .ch-panel,.ch-hero-card,.ch-search,.ch-search-box,.ch-step,.ch-category,.ch-tool-panel,.ch-sim,.ch-stats div,
  .ch-focus-section,.ch-sim-log,.ch-message,.ch-case-solution,
  .mi-command-card,.mi-hero-metrics div,.mi-tape,
  .desk-arrival-status,.desk-arrival-copy,.desk-daily-brief,.desk-document-viewer,.desk-document-toolbar,
  .spl-auth-layout,.spl-auth-card,.spl-auth-header,.spl-auth-account,
  .mg-card,.mg-detail,.mg-stat,.mg-box,.mg-related button,.mg-load button,.mg-detail-close,.mg-sources,.spl-glossary-pager,
  .fi-score,.fi-sources,.fi-toast,.ph-cj-entry-card,.spl-portal-identity,.spl-profile-settings-shortcut,
  .cn-preview,.cn-match-card,.cn-match-result,.cn-company-summary>div,.cn-company-summary>a,.cn-company-card,
  .cn-search-builder,.cn-tracker-form,.cn-tracker-board,.cn-tracker-item,.cn-safety-section,.cn-safety-section aside,.cn-dialog,.cn-dialog-box,
  .cn-choice-grid button,.cn-interest-grid button,.cn-preview-action,.cn-subnav,
  .sea-command-deck,.sea-command-topline,.sea-category-footnote,.sea-role-card,.sea-guide-card,.sea-cert-card,
  .sea-school-card,.sea-university-card,.sea-base-card,.sea-related,.sea-booklet-panel,.sea-booklet-first,.sea-academic-note,
  .sea-start-grid button,.sea-toolbar,.sea-hero-instrument,.sea-path-node,
  .formula-card,.formula-example,.cl-side-panel,.cl-rail-card,.cl-side-assistant,.cl-tool-card,.cl-reference-card
) {background:var(--lab-surface)!important;border-color:var(--lab-line)!important;color:var(--lab-copy)!important}
html[data-theme="dark"] body :is(.vu-compare-presets button,.pa-map-toolbar button,.pa-panel-close,.fi-load-more,.vu-btn-dark) {
  background:var(--lab-raised)!important;border-color:var(--lab-line-strong)!important;color:var(--lab-text)!important;
}
html[data-theme="dark"] body .global-shade {background:linear-gradient(90deg,rgba(19,24,25,.95),rgba(19,24,25,.8) 42%,rgba(19,24,25,.45))}
html[data-theme="dark"] body .mg-main {background:var(--lab-bg)!important;color:var(--lab-copy)!important}
html[data-theme="dark"] body .mg-toolbar {background:var(--lab-glass)!important;border-color:var(--lab-line)!important}
html[data-theme="dark"] body :is(.mg-search input,.mg-filters button,.mg-load button,.mg-related button) {background:var(--lab-soft)!important;border-color:var(--lab-line-strong)!important;color:var(--lab-copy)!important}
html[data-theme="dark"] body .mg-card:hover {background:var(--lab-accent-soft)!important;border-color:var(--lab-accent)!important}
html[data-theme="dark"] body .formula-card code {background:var(--lab-accent-soft)!important;color:var(--lab-accent)!important}
html[data-theme="dark"] body.cn-body :is(.cn-hero,#career-match,#companies,#tracker,.cn-safety-section,.cn-search-builder) :is(h1,h2,h3,h4,strong) {color:var(--lab-text)!important}
html[data-theme="dark"] body.cn-body :is(.cn-hero,#career-match,#companies,#tracker,.cn-safety-section,.cn-search-builder) :is(p,li,small) {color:var(--lab-muted)!important}

/* Primary actions: saturated aqua with dark text, never white-on-aqua. */
html[data-theme="dark"] body :is(
  .spl-button-primary,[data-spl-button="primary"],.spl-auth-submit,.ph-button-primary,
  .vu-btn-primary,.vu-card-actions button:first-child,.desk-button-primary,.desk-case-card-footer button,
  .desk-daily-brief>button,.desk-composer-actions button,.pa-panel-actions button,
  .ch-search-box button,.ch-ai-card a,.ch-reference a,.ch-case button,.ch-btn.primary,
  .fi-button.primary,.fi-download,.pa-primary-link,.mg-search button,.mg-link,.ph-chartering-actions .primary,
  .cn-button-primary,.cn-button-light,.cn-search-builder>.cn-button,.sea-button-primary,.cj-button-primary,.cl-button-primary
) {background:var(--lab-accent)!important;border-color:var(--lab-accent)!important;color:var(--lab-on-accent)!important;box-shadow:none!important}
html[data-theme="dark"] body :is(
  .spl-button-primary,[data-spl-button="primary"],.spl-auth-submit,.ph-button-primary,
  .vu-btn-primary,.vu-card-actions button:first-child,.desk-button-primary,.desk-case-card-footer button,
  .desk-daily-brief>button,.desk-composer-actions button,.pa-panel-actions button,
  .ch-search-box button,.ch-ai-card a,.ch-reference a,.ch-case button,.ch-btn.primary,
  .fi-button.primary,.fi-download,.pa-primary-link,.mg-search button,.mg-link,.ph-chartering-actions .primary,
  .cn-button-primary,.cn-button-light,.cn-search-builder>.cn-button,.sea-button-primary,.cj-button-primary,.cl-button-primary
):hover:not(:disabled):not([aria-disabled="true"]) {background:var(--lab-accent-hover)!important;border-color:var(--lab-accent-hover)!important}
html[data-theme="dark"] body.spl-premium-home .button.primary:hover {background:var(--lab-accent-hover)!important;filter:none}
html[data-theme="dark"] body.spl-premium-home .button.primary:active {background:var(--lab-accent-pressed)!important}
html[data-theme="dark"] body .spl-ai-user p,
html[data-theme="dark"] body .desk-thread-button b {color:var(--lab-on-accent)!important}

/* Selections are distinct from neutral controls and from status/error colours. */
html[data-theme="dark"] body :is(
  .globe-port-picker button[aria-pressed="true"],.vu-workspace-tabs button.active,
  .vu-filter-row button.active,.vu-mode-switch button.active,.pa-profile-tabs button.is-active,
  .pa-layer-buttons button.is-active,.desk-filters button.active,.desk-work-tabs button.active,
  .mi-filter-row button.active,.spl-auth-modal-tab.is-active,.mg-filters button.active,
  .ph-filter button.active,.ph-case-nav button.active,.fi-fleet-filters button.active,
  .sea-tablist button[aria-selected="true"],.sea-chip-row button.active,.sea-academic-tabs button.active,.cj-mode.active
) {background:var(--lab-accent)!important;border-color:var(--lab-accent)!important;color:var(--lab-on-accent)!important;box-shadow:none!important}
html[data-theme="dark"] body :is(.desk-filters button.active,.desk-work-tabs button.active) :is(span,b,small) {color:var(--lab-on-accent)!important;background:transparent!important}
html[data-theme="dark"] body :is(a,button)[aria-current="page"],
html[data-theme="dark"] body :is(button,[role="tab"])[aria-selected="true"] {border-color:var(--lab-accent)!important}
html[data-theme="dark"] body :is(.spl-mobile-bottom-nav,.spl-mobile-drawer) {background:var(--lab-glass)!important;border-color:var(--lab-line)!important}
html[data-theme="dark"] body .spl-mobile-bottom-nav a.active,
html[data-theme="dark"] body .spl-mobile-drawer a[aria-current="page"] {background:var(--lab-accent-soft)!important;color:var(--lab-accent)!important;border-color:var(--lab-accent)!important}
html[data-theme="dark"] body .spl-mobile-bottom-nav a.active :is(span,svg,small) {color:var(--lab-accent)!important}
html[data-theme="dark"] body .site-header.spl-universal-header .desktop-nav>a:is(:hover,[aria-current="page"]),
html[data-theme="dark"] body .site-header.spl-universal-header .spl-more-menu>summary:hover,
html[data-theme="dark"] body .site-header.spl-universal-header .account-link:hover {color:var(--lab-accent)!important}
html[data-theme="dark"] body .site-header.spl-universal-header .desktop-nav .spl-practice-cta:is(:hover,[aria-current="page"]) {background:var(--lab-accent)!important;color:var(--lab-on-accent)!important;border-color:var(--lab-accent)!important}
html[data-theme="dark"] body .site-header.spl-universal-header .brand-star {color:var(--lab-accent)!important}
html[data-theme="dark"] body .site-header.spl-universal-header .brand-rule {background:var(--lab-line-strong)!important}
html[data-theme="dark"] body :is(.ch-nav a.active,.cl-side-nav a.active,.fi-trade-route-list button.active,.vu-twin-list button.active) {background:var(--lab-accent-soft)!important;border-color:var(--lab-accent)!important;color:var(--lab-accent)!important}
html[data-theme="dark"] body :is(.cn-choice-grid button.selected,.cn-interest-grid button.selected) {background:var(--lab-accent-soft)!important;border-color:var(--lab-accent)!important;color:var(--lab-text)!important}
html[data-theme="dark"] body .cn-button-secondary {background:var(--lab-raised)!important;color:var(--lab-text)!important;border-color:var(--lab-line-strong)!important}
html[data-theme="dark"] body .cj-stage-button.active .cj-stage-index {color:var(--lab-on-accent)!important}

/* Clear hover, pressed and keyboard states without changing layout or motion. */
html[data-theme="dark"] body.spl-premium-home .category-card:is(:hover,:focus-visible) {background:var(--lab-accent-soft)!important;border-color:var(--lab-accent)!important}
html[data-theme="dark"] body.spl-premium-home .category-card:is(:hover,:focus-visible) :is(h3,.category-arrow) {color:var(--lab-accent)!important}
html[data-theme="dark"] body.spl-premium-home :is(.button.secondary,.photo-button):hover {border-color:var(--lab-accent)!important;color:var(--lab-accent)!important;background:var(--lab-accent-soft)!important}
html[data-theme="dark"] body :is(.h-globe-controls button,.globe-port-picker button,.vu-compare-presets button,.pa-map-toolbar button,.spl-theme-toggle):hover:not(:disabled) {background:var(--lab-accent-soft)!important;color:var(--lab-accent)!important;border-color:var(--lab-accent)!important}
html[data-theme="dark"] body :is(a,button,summary,input,select,textarea,[tabindex]):focus-visible {outline:2px solid var(--lab-accent)!important;outline-offset:4px!important}
html[data-theme="dark"] body :is(input[type="checkbox"],input[type="radio"],input[type="range"],progress) {accent-color:var(--lab-accent)}
html[data-theme="dark"] body ::selection {background:var(--lab-accent);color:var(--lab-on-accent)}
