/* GENERATED by tools/dark.js from styles.css and design-system.css and index.html. Do not edit above the
   marker: run `node tools/dark.js` (or tools/bundle.js) after changing a colour in either
   stylesheet. check.js §76 fails if this half is stale. Screen only: print stays light. */
@media screen{

/* ---- from styles.css ---- */
  html[data-theme="dark"]{ --paper:#515458; --paper-2:#52555A; --paper-3:#585B5F; --rule:#FDFDFD; --ink:#FDFDFD; --ink-2:#EFF0F0; --muted:#DFE0E1; --faint:#CDCED0; --border:#75787C; --border-soft:#5B5E62; --accent:#B3D1F1; --accent-2:#B3D1F1; --accent-tint:rgba(179,209,241,0.07); --accent-tint-strong:rgba(179,209,241,0.13); --note-bg:rgba(83,86,90,0.72); --note-border:rgba(179,209,241,0.22); --tooltip-bg:rgba(79,82,86,0.88); --tooltip-shadow:0 10px 28px rgba(0,0,0,0.24); --warn:#FFBEB9; --good:#BCDAC1; --highlight:#58513A; --shadow-soft:0 1px 2px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.07); }
  html[data-theme="dark"],
html[data-theme="dark"] body{ background-color:var(--paper); background-image:none; color:var(--ink); }
  html[data-theme="dark"] .sidebar{ background-color:var(--paper-2); background-image:none; border-right-color:var(--border); }
  html[data-theme="dark"] .brand{ border-bottom-color:var(--border-soft); }
  html[data-theme="dark"] .brand-mark{ color:var(--accent); }
  html[data-theme="dark"] .brand-mark-label{ color:var(--muted); }
  html[data-theme="dark"] .brand-title{ color:var(--ink); }
  html[data-theme="dark"] .brand-title em{ color:var(--accent); }
  html[data-theme="dark"] .brand-sub{ color:var(--muted); }
  html[data-theme="dark"] .nav-label{ color:var(--muted); background-color:transparent; background-image:none; border-color:transparent; }
  html[data-theme="dark"] .nav-label:hover{ background-color:rgba(255,255,255,0.03); background-image:none; color:var(--ink); border-color:var(--border-soft); }
  html[data-theme="dark"] .nav-label::after{ color:var(--faint); }
  html[data-theme="dark"] .nav-group:has(.nav-item.active) .nav-label{ color:var(--accent); background-color:var(--accent-tint); background-image:none; border-color:rgba(179,209,241,0.16); }
  html[data-theme="dark"] .nav-group:has(.nav-item.active) .nav-label::after{ color:var(--accent); }
  html[data-theme="dark"] .nav-item{ color:var(--ink-2); border-left-color:transparent; }
  html[data-theme="dark"] .nav-item:hover{ background-color:rgba(255,255,255,0.03); background-image:none; color:var(--ink); }
  html[data-theme="dark"] .nav-item.active{ background-color:var(--accent-tint); background-image:none; color:var(--accent); border-left-color:var(--accent); }
  html[data-theme="dark"] .nav-dev-tag{ color:#FBC2A8; background-color:#5E542D; background-image:none; border-color:#E7D08A; }
  html[data-theme="dark"] .nav-item.nav-item-recommended{ border-color:var(--border); border-left-color:var(--border); background-color:var(--paper); background-image:none; box-shadow:var(--shadow-soft); color:var(--ink-2); }
  html[data-theme="dark"] .nav-item.nav-item-recommended:hover{ background-color:rgba(255,255,255,0.03); background-image:none; border-color:var(--border); color:var(--ink); }
  html[data-theme="dark"] .nav-item.nav-item-recommended.active{ background-color:var(--accent-tint); background-image:none; color:var(--accent); border-color:rgba(179,209,241,0.28); border-left-color:var(--accent); }
  html[data-theme="dark"] .nav-item.nav-item-recommended.active:hover{ background-color:var(--accent-tint-strong); background-image:none; border-color:rgba(179,209,241,0.42); border-left-color:var(--accent); color:var(--accent); }
  html[data-theme="dark"] .nav-badge{ color:var(--muted); border-color:var(--border); background-color:var(--paper-2); background-image:none; }
  html[data-theme="dark"] .nav-item.nav-item-recommended.active .nav-badge{ color:var(--accent); border-color:rgba(179,209,241,0.34); background-color:var(--paper); background-image:none; }
  html[data-theme="dark"] .nav-item-num{ color:var(--faint); }
  html[data-theme="dark"] .nav-item.active .nav-item-num{ color:var(--accent); }
  html[data-theme="dark"] .nav-item.nav-item-recommended.active .nav-item-num{ color:var(--accent); }
  html[data-theme="dark"] .sidebar-foot{ border-top-color:var(--border-soft); color:var(--muted); }
  html[data-theme="dark"] .main{ background-color:var(--paper); background-image:none; }
  html[data-theme="dark"] .eyebrow{ color:var(--muted); }
  html[data-theme="dark"] .eyebrow::before{ color:var(--accent); }
  html[data-theme="dark"] .eyebrow .ed-mark{ color:var(--accent); }
  html[data-theme="dark"] h1.section-title{ color:var(--ink); }
  html[data-theme="dark"] h1.section-title .ink{ color:var(--ink); }
  html[data-theme="dark"] h1.section-title em{ color:var(--accent); }
  html[data-theme="dark"] .section-desc{ color:var(--ink-2); }
  html[data-theme="dark"] .section-body-text{ color:var(--ink-2); }
  html[data-theme="dark"] .section-desc em{ color:var(--accent); }
  html[data-theme="dark"] .section-rule{ background-color:var(--border); background-image:none; }
  html[data-theme="dark"] .home-actions .btn-primary{ box-shadow:0 8px 20px rgba(0,0,0,0.28); }
  html[data-theme="dark"] .home-actions .btn-secondary{ background-color:var(--paper-2); background-image:none; border-color:var(--border-soft); color:var(--ink-2); }
  html[data-theme="dark"] .home-actions .btn-secondary:hover{ background-color:var(--paper); background-image:none; border-color:var(--accent); color:var(--accent); }
  html[data-theme="dark"] .home-overview-panel{ background:linear-gradient(135deg,var(--paper-2),var(--paper)); border-color:var(--border); box-shadow:0 8px 24px rgba(0,0,0,0.09); }
  html[data-theme="dark"] .home-overview-panel::before{ background:linear-gradient(90deg,var(--accent),rgba(179,209,241,0.05)); }
  html[data-theme="dark"] .home-overview-copy{ color:var(--ink-2); }
  html[data-theme="dark"] .home-tool-card{ border-color:var(--border-soft); background-color:rgba(79,82,86,0.72); background-image:none; box-shadow:var(--shadow-soft); }
  html[data-theme="dark"] .home-tool-card:hover{ border-color:rgba(179,209,241,0.3); background-color:var(--paper); background-image:none; box-shadow:0 8px 20px rgba(0,0,0,0.12); }
  html[data-theme="dark"] .home-tool-icon{ background-color:var(--accent-tint); background-image:none; color:var(--accent); }
  html[data-theme="dark"] .home-tool-label{ color:var(--muted); }
  html[data-theme="dark"] .home-tool-title{ color:var(--ink); }
  html[data-theme="dark"] .home-tool-card:hover .home-tool-title{ color:var(--accent); }
  html[data-theme="dark"] .home-workflow-card{ border-color:var(--border-soft); background-color:var(--paper); background-image:none; box-shadow:var(--shadow-soft); }
  html[data-theme="dark"] .home-workflow-card p{ color:var(--ink-2); }
  html[data-theme="dark"] .home-info{ border-color:var(--border-soft); border-left-color:var(--note-border); background-color:var(--note-bg); background-image:none; color:var(--ink-2); }
  html[data-theme="dark"] .home-info::before{ background-color:var(--accent-tint); background-image:none; color:var(--accent); }
  html[data-theme="dark"] .home-info strong{ color:var(--ink); }
  html[data-theme="dark"] .home-pathway-card{ background-color:var(--paper); background-image:none; border-color:var(--border-soft); box-shadow:var(--shadow-soft); }
  html[data-theme="dark"] .home-pathway-card::before{ background:linear-gradient(90deg,var(--accent),rgba(179,209,241,0.05)); }
  html[data-theme="dark"] .home-pathway-card:hover{ border-color:rgba(179,209,241,0.26); box-shadow:0 8px 20px rgba(0,0,0,0.12); }
  html[data-theme="dark"] .home-pathway-icon{ background-color:var(--accent-tint); background-image:none; color:var(--accent); }
  html[data-theme="dark"] .home-pathway-label{ color:var(--muted); }
  html[data-theme="dark"] .home-pathway-title{ color:var(--ink); }
  html[data-theme="dark"] .home-pathway-card:hover .home-pathway-title{ color:var(--accent); }
  html[data-theme="dark"] .home-pathway-desc{ color:var(--ink-2); }
  html[data-theme="dark"] .home-pathway-tools{ border-top-color:var(--border-soft); }
  html[data-theme="dark"] .home-pathway-tool{ color:var(--ink-2); }
  html[data-theme="dark"] .home-pathway-tool:hover{ background-color:rgba(179,209,241,0.06); background-image:none; }
  html[data-theme="dark"] .home-pathway-tool:hover .home-pathway-tool-name{ color:var(--accent); }
  html[data-theme="dark"] .home-pathway-tool-num{ color:var(--faint); }
  html[data-theme="dark"] .home-pathway-tool-badge{ color:var(--accent); border-color:rgba(179,209,241,0.3); background-color:var(--accent-tint); background-image:none; }
  html[data-theme="dark"] .home-pathway-tool-badge-info{ border-color:rgba(179,209,241,0.28); color:var(--accent); background-color:rgba(74,77,81,0.38); background-image:none; }
  html[data-theme="dark"] .home-pathway-tool-badge:focus{ outline-color:rgba(179,209,241,0.28); }
  html[data-theme="dark"] .home-pathway-tool-badge::before{ border-color:rgba(179,209,241,0.24); background-color:var(--tooltip-bg); background-image:none; color:var(--ink-2); box-shadow:var(--tooltip-shadow); }
  html[data-theme="dark"] .home-pathway-tool-badge::after{ border-color:var(--tooltip-bg) transparent transparent transparent; }
  html[data-theme="dark"] h2.block-title{ color:var(--ink); border-bottom-color:var(--border); }
  html[data-theme="dark"] h3.sub-title{ color:var(--ink); }
  html[data-theme="dark"] label{ color:var(--ink-2); }
  html[data-theme="dark"] label .hint{ color:var(--faint); }
  html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{ color:var(--ink); background-color:var(--paper); background-image:none; border-color:var(--border); }
  html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-tint-strong); }
  html[data-theme="dark"] select{ background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%236B6B6B' d='M0 0l5 6 5-6z'/></svg>"); }
  html[data-theme="dark"] .btn{ border-color:var(--border); background-color:var(--paper); background-image:none; color:var(--ink); }
  html[data-theme="dark"] .btn:hover{ border-color:var(--ink); background-color:var(--paper-2); background-image:none; }
  html[data-theme="dark"] .btn-primary{ background-color:var(--accent); background-image:none; color:#4A4D51; border-color:var(--accent); }
  html[data-theme="dark"] .btn-primary:hover{ background-color:#B3D1F1; background-image:none; border-color:#B3D1F1; }
  html[data-theme="dark"] .btn-ghost{ border-color:transparent; background-color:transparent; background-image:none; color:var(--muted); }
  html[data-theme="dark"] .btn-ghost:hover{ background-color:rgba(255,255,255,0.04); background-image:none; color:var(--ink); }
  html[data-theme="dark"] .panel{ background-color:var(--paper); background-image:none; border-color:var(--border-soft); box-shadow:var(--shadow-soft); }
  html[data-theme="dark"] .panel-emphasis{ background-color:var(--paper-2); background-image:none; border-color:var(--border); }
  html[data-theme="dark"] .input-table th{ color:var(--muted); border-bottom-color:var(--border-soft); }
  html[data-theme="dark"] .input-table td{ border-bottom-color:rgba(117,120,124,0.58); }
  html[data-theme="dark"] .input-table td input{ border-color:var(--border-soft); background-color:var(--paper); background-image:none; }
  html[data-theme="dark"] .input-table td input:focus{ border-color:var(--accent); }
  html[data-theme="dark"] .input-table .row-num{ color:var(--faint); }
  html[data-theme="dark"] .input-table tr.group-col-header td{ background-color:transparent; background-image:none; }
  html[data-theme="dark"] .input-table tr.group-col-header td.group-col-label{ color:var(--faint); }
  html[data-theme="dark"] .input-table tr.group-header td{ background-color:transparent; background-image:none; color:var(--muted); border-top-color:var(--border-soft); }
  html[data-theme="dark"] .input-table tr.group-header td .group-remove{ background-color:none; background-image:none; color:var(--faint); }
  html[data-theme="dark"] .input-table tr.group-header td .group-remove:hover{ color:var(--warn); background-color:rgba(251,193,182,0.08); background-image:none; }
  html[data-theme="dark"] .input-table tr.group-header td .group-add-row{ background-color:none; background-image:none; color:var(--faint); }
  html[data-theme="dark"] .input-table tr.group-header td .group-add-row:hover{ color:var(--accent); background-color:var(--paper-2); background-image:none; }
  html[data-theme="dark"] .input-table tr.group-header td .group-name-input{ color:var(--muted); background-color:transparent; background-image:none; border-bottom-color:var(--border); }
  html[data-theme="dark"] .input-table tr.group-header td .group-name-input::placeholder{ color:var(--faint); }
  html[data-theme="dark"] .input-table tr.group-header td .group-name-input:focus{ color:var(--ink); border-bottom-color:var(--accent); background-color:var(--paper-2); background-image:none; }
  html[data-theme="dark"] .input-table tr.group-header .type-badge{ color:var(--faint); }
  html[data-theme="dark"] .input-table .row-actions button{ background-color:none; background-image:none; color:var(--faint); }
  html[data-theme="dark"] .input-table .row-actions button:hover{ color:var(--warn); background-color:rgba(251,193,182,0.08); background-image:none; }
  html[data-theme="dark"] .input-table .computed{ color:var(--ink-2); }
  html[data-theme="dark"] .input-table .computed.muted{ color:var(--faint); }
  html[data-theme="dark"] .input-table .computed.sig-yes{ color:var(--warn); }
  html[data-theme="dark"] .input-table .computed.sig-no{ color:var(--good); }
  html[data-theme="dark"] .input-table .computed.sig-improve{ color:var(--good); }
  html[data-theme="dark"] .input-table .computed.sig-decline{ color:var(--warn); }
  html[data-theme="dark"] .add-row-btn{ background-color:rgba(174,223,189,0.06); background-image:none; border-color:#AEDFBD; color:#B4DDC1; }
  html[data-theme="dark"] .add-row-btn:hover{ background-color:#AEDFBD; background-image:none; border-color:#B4DDC1; color:#4A4D51; box-shadow:0 2px 6px rgba(0,0,0,0.6); }
  html[data-theme="dark"] .add-row-btn:active{ background-color:#B4DDC1; background-image:none; border-color:#B7DCC3; }
  html[data-theme="dark"] .add-row-btn:focus-visible{ outline-color:rgba(174,223,189,0.45); }
  html[data-theme="dark"] .descriptor-card{ border-color:var(--border-soft); background-color:var(--paper); background-image:none; box-shadow:var(--shadow-soft); }
  html[data-theme="dark"] .descriptor-card-title{ color:var(--ink); }
  html[data-theme="dark"] .descriptor-card-tradition{ color:var(--muted); }
  html[data-theme="dark"] .descriptor-active-word{ color:var(--accent); }
  html[data-theme="dark"] .descriptor-divider{ background-color:var(--border-soft); background-image:none; }
  html[data-theme="dark"] .descriptor-row{ border-left-color:transparent; color:var(--ink-2); }
  html[data-theme="dark"] .descriptor-row .desc-row-criteria{ color:var(--faint); }
  html[data-theme="dark"] .descriptor-row.active{ background-color:var(--accent-tint); background-image:none; border-left-color:var(--accent); color:var(--ink); }
  html[data-theme="dark"] .descriptor-row.active .desc-row-label{ color:var(--ink); }
  html[data-theme="dark"] .descriptor-row.active .desc-row-criteria{ color:var(--accent); }
  html[data-theme="dark"] .flag{ border-color:var(--border-soft); background-color:var(--paper-2); background-image:none; color:var(--muted); }
  html[data-theme="dark"] .flag.on{ background-color:rgba(251,193,182,0.08); background-image:none; color:var(--warn); border-color:rgba(251,193,182,0.25); }
  html[data-theme="dark"] .tabs{ border-bottom-color:var(--border); }
  html[data-theme="dark"] .tab{ color:var(--muted); border-bottom-color:transparent; }
  html[data-theme="dark"] .tab:hover{ color:var(--ink); }
  html[data-theme="dark"] .tab.active{ color:var(--accent); border-bottom-color:var(--accent); }
  html[data-theme="dark"] .toast{ background-color:var(--ink); background-image:none; color:#4A4D51; box-shadow:0 8px 24px rgba(0,0,0,0.3); }
  html[data-theme="dark"] .toast.error{ background-color:var(--warn); background-image:none; }
  html[data-theme="dark"] .info-box{ background-color:var(--note-bg); background-image:none; border-color:var(--border-soft); border-left-color:var(--note-border); color:var(--ink-2); }
  html[data-theme="dark"] .info-box strong{ color:var(--ink); }
  html[data-theme="dark"] .caution-box{ background-color:rgba(179,209,241,0.05); background-image:none; border-color:rgba(179,209,241,0.28); border-left-color:var(--warn); color:var(--ink-2); }
  html[data-theme="dark"] .caution-box strong{ color:var(--warn); }
  html[data-theme="dark"] .opie-optin{ color:var(--ink-2); }
  html[data-theme="dark"] .formula{ background-color:var(--paper-2); background-image:none; color:var(--ink); }
  html[data-theme="dark"] .calc-summary{ background-color:var(--paper-2); background-image:none; border-color:var(--border-soft); }
  html[data-theme="dark"] .calc-summary-label{ color:var(--muted); }
  html[data-theme="dark"] .calc-summary-value{ color:var(--ink); }
  html[data-theme="dark"] .autofill-panel{ background-color:var(--note-bg); background-image:none; border-color:var(--border-soft); }
  html[data-theme="dark"] .btn-clear{ background-color:#FFBFB5; background-image:none; border-color:#FFBFB5; color:#4A4D51; box-shadow:0 1px 2px rgba(0,0,0,0.6), 0 2px 6px rgba(0,0,0,0.44); }
  html[data-theme="dark"] .btn-clear:hover{ background-color:#FFBFB5; background-image:none; border-color:#FFBFB5; color:#4A4D51; box-shadow:0 2px 4px rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.6); }
  html[data-theme="dark"] .btn-clear:active{ background-color:#FFBFB5; background-image:none; border-color:#FFBFB4; }
  html[data-theme="dark"] .btn-clear:focus-visible{ outline-color:rgba(255,191,181,0.45); }
  html[data-theme="dark"] .pre-results-table th{ color:var(--muted); border-bottom-color:var(--border-soft); }
  html[data-theme="dark"] .pre-results-table td{ border-bottom-color:rgba(117,120,124,0.58); }
  html[data-theme="dark"] .pre-results-table td.num{ color:var(--ink-2); }
  html[data-theme="dark"] .pre-results-table td.fsiq{ color:var(--ink); }
  html[data-theme="dark"] .pre-results-table td.psy{ color:var(--faint); }
  html[data-theme="dark"] .pre-results-table td.model{ color:var(--ink); }
  html[data-theme="dark"] .model-info-dot{ border-color:rgba(179,209,241,0.24); background-color:var(--accent-tint); background-image:none; color:var(--accent); }
  html[data-theme="dark"] .model-info-dot:focus{ outline-color:rgba(179,209,241,0.34); }
  html[data-theme="dark"] .model-info-dot::before{ border-color:rgba(179,209,241,0.24); background-color:var(--tooltip-bg); background-image:none; color:var(--ink-2); box-shadow:var(--tooltip-shadow); }
  html[data-theme="dark"] .model-info-dot::after{ border-color:var(--tooltip-bg) transparent transparent transparent; }
  html[data-theme="dark"] .pre-results-table tr:last-child td{ border-bottom-color:var(--ink); }
  html[data-theme="dark"] .pre-results-table .group-row td{ background-color:var(--note-bg); background-image:none; color:var(--muted); border-bottom-color:var(--border-soft); }
  html[data-theme="dark"] .pre-predict-table .achieved-cell input{ border-color:var(--border-soft); background-color:var(--paper); background-image:none; }
  html[data-theme="dark"] .pre-predict-table .diff.neg{ color:var(--warn); }
  html[data-theme="dark"] .pre-predict-table .diff.pos{ color:var(--good); }
  html[data-theme="dark"] .pre-formula-tip{ color:var(--faint); }
  html[data-theme="dark"] .pre-input-intro{ color:var(--ink-2); border-color:var(--border-soft); border-left-color:var(--note-border); background-color:var(--note-bg); background-image:none; }
  html[data-theme="dark"] .pre-form-section{ border-top-color:var(--border-soft); }
  html[data-theme="dark"] .pre-form-title{ color:var(--muted); }
  html[data-theme="dark"] .pre-form-note{ color:var(--muted); }
  html[data-theme="dark"] .pre-label-sub{ color:var(--faint); }
  html[data-theme="dark"] .db-view-switch{ border-color:var(--border); }
  html[data-theme="dark"] .db-view-btn{ background-color:var(--paper-card); background-image:none; color:var(--muted); }
  html[data-theme="dark"] .db-view-btn + .db-view-btn{ border-left-color:var(--border); }
  html[data-theme="dark"] .db-view-btn[aria-pressed="true"]{ background-color:var(--ink); background-image:none; color:var(--paper-card); }
  html[data-theme="dark"] .db-view-btn:focus-visible{ outline-color:var(--ink); }
  html[data-theme="dark"] .pvt-acc-lede{ color:var(--muted); }
  html[data-theme="dark"] .pvt-acc-wrap{ border-color:var(--border); background-color:var(--paper-card); background-image:none; }
  html[data-theme="dark"] .pvt-acc-table th,
html[data-theme="dark"] .pvt-acc-table td{ border-bottom-color:var(--border-soft); }
  html[data-theme="dark"] .pvt-acc-table th{ background-color:var(--paper-card); background-image:none; color:var(--faint); border-bottom-color:var(--border); }
  html[data-theme="dark"] .pvt-acc-table td.pvt-acc-measure{ color:var(--ink); }
  html[data-theme="dark"] .pvt-acc-table td.pvt-acc-src{ color:var(--muted); }
  html[data-theme="dark"] .pvt-acc-table tbody tr:hover{ background-color:var(--accent-tint); background-image:none; }
  html[data-theme="dark"] .db-readout{ color:var(--faint); }
  html[data-theme="dark"] .db-readout b{ color:var(--ink); }
  html[data-theme="dark"] .db-list{ border-color:var(--border); background-color:var(--paper-card); background-image:none; }
  html[data-theme="dark"] .db-table th,
html[data-theme="dark"] .db-table td{ border-bottom-color:var(--border-soft); }
  html[data-theme="dark"] .db-th{ background-color:var(--paper-card); background-image:none; color:var(--faint); border-bottom-color:var(--border); }
  html[data-theme="dark"] .db-th:hover{ color:var(--ink); }
  html[data-theme="dark"] .db-th[aria-sort]{ color:var(--ink); }
  html[data-theme="dark"] .db-th:focus-visible{ outline-color:var(--ink); }
  html[data-theme="dark"] .db-td-measure{ color:var(--ink); }
  html[data-theme="dark"] .db-td-ctx{ color:var(--muted); }
  html[data-theme="dark"] .db-td-num{ color:var(--ink-2); }
  html[data-theme="dark"] .db-td-rel{ color:var(--ink); }
  html[data-theme="dark"] .db-table tbody tr:hover{ background-color:var(--accent-tint); background-image:none; }
  html[data-theme="dark"] .db-dash{ color:var(--faint); }
  html[data-theme="dark"] .db-chip-internal{ color:#C1F2F8; background-color:rgba(193,242,248,0.09); background-image:none; }
  html[data-theme="dark"] .db-chip-stability{ color:#EBCAAE; background-color:rgba(235,202,174,0.1); background-image:none; }
  html[data-theme="dark"] .db-chip-retest{ color:#EAEBEB; background-color:rgba(234,235,235,0.07); background-image:none; }
  html[data-theme="dark"] .db-chip-none{ color:var(--faint); background-color:rgba(208,209,210,0.1); background-image:none; }
  html[data-theme="dark"] .db-byage{ color:var(--faint); }
  html[data-theme="dark"] .custom-tag{ color:var(--accent); }
  html[data-theme="dark"] .db-metric-tag{ color:var(--ink-2); background-color:var(--surface-2,rgba(255,255,255,0.05)); background-image:none; border-color:var(--border-soft); }
  html[data-theme="dark"] .ct-entry-table .ct-row-num{ color:var(--muted); }
  html[data-theme="dark"] .combo-list{ background-color:var(--paper); background-image:none; border-color:var(--border); box-shadow:0 6px 18px rgba(0,0,0,0.16); }
  html[data-theme="dark"] .combo-item{ color:var(--ink-2); }
  html[data-theme="dark"] .combo-item:hover,
html[data-theme="dark"] .combo-item.highlight{ background-color:var(--paper-2); background-image:none; color:var(--ink); }
  html[data-theme="dark"] .combo-item.group-header{ color:var(--faint); background-color:var(--paper-2); background-image:none; }
  html[data-theme="dark"] .combo-item.group-header:hover{ background-color:var(--paper-2); background-image:none; }
  html[data-theme="dark"] .combo-item.combo-check input{ accent-color:var(--accent); }
  html[data-theme="dark"] .combo-custom-tag{ color:var(--accent); }
  html[data-theme="dark"] .combo-footer{ border-bottom-color:var(--border-soft); background-color:var(--paper); background-image:none; box-shadow:0 4px 12px rgba(0,0,0,0.08); }
  html[data-theme="dark"] .combo-count{ color:var(--muted); }
  html[data-theme="dark"] .combo-group-heading{ color:var(--muted); background-color:var(--paper-2); background-image:none; border-top-color:var(--border-soft); }
  html[data-theme="dark"] .combo-item.combo-indented .combo-check-text{ color:var(--ink-2); }
  html[data-theme="dark"] .combo-interval{ color:var(--faint); }
  html[data-theme="dark"] .combo-ageband-note{ background-color:var(--note-bg); background-image:none; border-bottom-color:var(--border-soft); color:var(--muted); }
  html[data-theme="dark"] .combo-ageband-note-icon{ color:var(--accent); }
  html[data-theme="dark"] #about .methods-pane-refs{ border-left-color:var(--border-soft); }
  html[data-theme="dark"] #about .methods-pane > .block-title,
html[data-theme="dark"] #about .methods-pane .references-title{ background-color:var(--paper); background-image:none; }
  @media (max-width:1180px){
    html[data-theme="dark"] #about .methods-pane-refs{ border-top-color:var(--border-soft); }
  }
  html[data-theme="dark"] #about .methods-h3{ color:var(--ink); border-bottom-color:var(--border-soft); }
  html[data-theme="dark"] .methods-table{ color:var(--ink-2); }
  html[data-theme="dark"] .methods-table th,
html[data-theme="dark"] .methods-table td{ border-bottom-color:var(--border-soft); }
  html[data-theme="dark"] .methods-table thead th{ color:var(--faint); }
  html[data-theme="dark"] .methods-table tbody th{ color:var(--ink); }
  html[data-theme="dark"] .references{ border-top-color:var(--border-soft); color:var(--muted); }
  html[data-theme="dark"] .references-title{ color:var(--faint); }
  html[data-theme="dark"] .references-group{ color:var(--faint); }
  @media (max-width:900px){
    html[data-theme="dark"] .sidebar{ border-bottom-color:var(--border); }
  }
  html[data-theme="dark"] .bat-premorbid-panel{ border-color:var(--note-border); background-color:var(--note-bg); background-image:none; }
  html[data-theme="dark"] .bat-premorbid-toggle{ border-color:var(--border-soft); background-color:var(--paper); background-image:none; color:var(--ink-2); }
  html[data-theme="dark"] .bat-premorbid-toggle input{ accent-color:var(--accent); }
  html[data-theme="dark"] .bat-premorbid-help{ color:var(--muted); }
  html[data-theme="dark"] .bat-premorbid-panel input:disabled,
html[data-theme="dark"] .bat-premorbid-panel select:disabled{ background-color:var(--paper-2); background-image:none; }
  html[data-theme="dark"] .bat-class-extreme{ background-color:transparent !important; background-image:none !important; }
  html[data-theme="dark"] .bat-expected-stars{ color:var(--ink); }
  html[data-theme="dark"] .report-section-num{ color:var(--faint); }
  html[data-theme="dark"] .report-section-item.active .report-section-num{ color:var(--accent); }
  html[data-theme="dark"] .report-search-shell{ background-color:#4A4D51; background-image:none; border-color:rgba(255,255,255,0.12); box-shadow:0 1px 2px rgba(0,0,0,0.08); }
  html[data-theme="dark"] .report-search-shell:hover{ border-color:rgba(255,255,255,0.22); }
  html[data-theme="dark"] .report-search-shell:focus-within{ border-color:var(--accent); box-shadow:0 0 0 4px rgba(179,209,241,0.14),
    0 1px 2px rgba(0,0,0,0.12),
    0 4px 12px rgba(0,0,0,0.12); }
  html[data-theme="dark"] .report-search-icon{ color:#D1D2D4; }
  html[data-theme="dark"] .report-search-shell:focus-within .report-search-icon{ color:var(--accent); }
  html[data-theme="dark"] .report-search-shell .report-test-search-inline,
html[data-theme="dark"] #report-writer .report-search-shell input.report-test-search-inline{ background-color:transparent !important; background-image:none !important; box-shadow:none !important; color:#FDFDFD; }
  html[data-theme="dark"] .report-test-search-inline::placeholder{ color:#D1D2D4; }
  html[data-theme="dark"] .report-search-clear{ background-color:rgba(255,255,255,0.06); background-image:none; color:#E5E6E6; }
  html[data-theme="dark"] .report-search-clear:hover{ background-color:rgba(255,255,255,0.14); background-image:none; color:#FDFDFD; }
  html[data-theme="dark"] .report-picker-floating-add{ border-color:rgba(179,209,241,0.32); background-color:var(--accent-tint); background-image:none; }
  html[data-theme="dark"] .report-picker-floating-count{ color:var(--accent); }
  html[data-theme="dark"] .report-manual-entry-details > summary{ color:#FDFDFD; background-color:#4A4D51; background-image:none; border-color:rgba(255,255,255,0.18); box-shadow:0 1px 2px rgba(0,0,0,0.08); }
  html[data-theme="dark"] .report-manual-entry-details > summary:hover{ color:var(--accent); border-color:rgba(179,209,241,0.45); background-color:rgba(179,209,241,0.05); background-image:none; box-shadow:0 2px 6px rgba(0,0,0,0.24); }
  html[data-theme="dark"] .report-manual-entry-details > summary:focus-visible{ outline-color:rgba(179,209,241,0.45); }
  html[data-theme="dark"] .report-manual-entry-details[open] > summary{ color:var(--accent); border-color:rgba(179,209,241,0.45); background-color:rgba(179,209,241,0.06); background-image:none; }
  html[data-theme="dark"] .report-manual-entry-details > summary::before{ background-color:rgba(255,255,255,0.06); background-image:none; color:#E5E6E6; }
  html[data-theme="dark"] .report-manual-entry-details > summary:hover::before,
html[data-theme="dark"] .report-manual-entry-details[open] > summary::before{ background-color:var(--accent); background-image:none; color:#4A4D51; }
  html[data-theme="dark"] .report-selected-list{ border-color:var(--border-soft); background-color:var(--paper); background-image:none; }
  html[data-theme="dark"] .report-selected-empty{ color:var(--faint); }
  html[data-theme="dark"] .report-selected-row{ border-bottom-color:rgba(117,120,124,0.5); }
  html[data-theme="dark"] .report-selected-row:hover{ background-color:rgba(179,209,241,0.035); background-image:none; }
  html[data-theme="dark"] .report-selected-row .report-selected-grip{ color:var(--faint); }
  html[data-theme="dark"] .report-selected-row .report-selected-name{ color:var(--ink); }
  html[data-theme="dark"] .report-selected-row .report-selected-tools button{ border-color:var(--border-soft); background-color:var(--paper); background-image:none; color:var(--faint); }
  html[data-theme="dark"] .report-selected-row .report-selected-tools button:hover{ color:var(--ink); border-color:var(--border); }
  html[data-theme="dark"] .report-selected-row .report-selected-tools button.is-on{ background-color:var(--accent-tint); background-image:none; border-color:rgba(179,209,241,0.34); color:var(--accent); }
  html[data-theme="dark"] .report-selected-row .report-selected-tools .report-selected-remove{ border-color:rgba(255,191,181,0.35); background-color:rgba(255,191,181,0.08); background-image:none; color:#FFBFB5; }
  html[data-theme="dark"] .report-selected-row .report-selected-tools .report-selected-remove:hover{ background-color:#FFBFB5; background-image:none; border-color:#FFBFB5; color:#4A4D51; box-shadow:0 2px 6px rgba(0,0,0,0.6); }
  html[data-theme="dark"] .report-selected-row .report-selected-tools .report-selected-remove:active{ background-color:#FFBFB5; background-image:none; border-color:#FFBFB4; }
  html[data-theme="dark"] .report-selected-row .report-selected-tools .report-selected-remove:focus-visible{ outline-color:rgba(255,191,181,0.55); }
  html[data-theme="dark"] .report-section-grip{ color:var(--faint); border-right-color:var(--border-soft); }
  html[data-theme="dark"] .report-section-grip:active{ color:var(--ink-2); }
  html[data-theme="dark"] .report-section-item.is-drop-target{ box-shadow:inset 0 2px 0 0 var(--accent); }
  html[data-theme="dark"] .report-grip-inline{ color:var(--faint); border-color:var(--border-soft); background-color:var(--paper); background-image:none; }
  html[data-theme="dark"] .report-scores-table tr.is-drop-target td{ box-shadow:inset 0 2px 0 0 var(--accent); }
  html[data-theme="dark"] .report-scores-grip{ color:var(--faint); }
  html[data-theme="dark"] .report-scores-table tr:hover .report-scores-grip{ color:var(--ink-2); }
  html[data-theme="dark"] .report-scores-table td:nth-child(1){ color:var(--ink); }
  html[data-theme="dark"] .report-scores-table td.report-scores-descriptor{ color:var(--ink-2); }
  html[data-theme="dark"] .report-scores-table .row-actions button{ border-color:var(--border-soft); background-color:var(--paper); background-image:none; color:var(--faint); }
  html[data-theme="dark"] .report-scores-table .row-actions button:hover{ color:var(--warn); border-color:rgba(179,209,241,0.34); }
  html[data-theme="dark"] .report-panel{ box-shadow:none; border-color:var(--border-soft); }
  html[data-theme="dark"] .report-panel .panel-kicker{ color:var(--muted); }
  html[data-theme="dark"] .report-section-item{ border-color:var(--border-soft); background-color:var(--paper); background-image:none; color:var(--ink-2); }
  html[data-theme="dark"] .report-section-item:hover{ background-color:rgba(179,209,241,0.035); background-image:none; color:var(--ink); }
  html[data-theme="dark"] .report-section-item.active{ border-color:rgba(179,209,241,0.34); background-color:var(--accent-tint); background-image:none; color:var(--accent); }
  html[data-theme="dark"] .report-section-content{ color:inherit; }
  html[data-theme="dark"] .report-section-remove{ background-color:transparent; background-image:none; color:var(--faint); border-left-color:var(--border-soft); }
  html[data-theme="dark"] .report-section-remove:hover{ color:var(--warn); background-color:rgba(179,209,241,0.06); background-image:none; }
  html[data-theme="dark"] .report-section-sub{ color:var(--muted); }
  html[data-theme="dark"] .report-section-meta{ color:var(--faint); }
  html[data-theme="dark"] .report-empty-state{ color:var(--faint); border-color:var(--border); }
  html[data-theme="dark"] .report-active-title{ color:var(--ink); }
  html[data-theme="dark"] .report-mini-copy{ color:var(--muted); }
  html[data-theme="dark"] .report-filter-chip{ border-color:var(--border-soft); background-color:var(--paper); background-image:none; color:var(--ink-2); }
  html[data-theme="dark"] .report-filter-chip:hover{ border-color:rgba(179,209,241,0.28); color:var(--ink); }
  html[data-theme="dark"] .report-filter-chip.active{ background-color:var(--accent-tint); background-image:none; border-color:rgba(179,209,241,0.34); color:var(--accent); }
  html[data-theme="dark"] .report-test-browser{ border-color:var(--border); background-color:#4A4D51; background-image:none; }
  html[data-theme="dark"] .report-test-browser::-webkit-scrollbar-track{ background-color:var(--paper-2); background-image:none; }
  html[data-theme="dark"] .report-test-browser::-webkit-scrollbar-thumb{ background-color:var(--border); background-image:none; border-color:var(--paper-2); }
  html[data-theme="dark"] .report-test-browser::-webkit-scrollbar-thumb:hover{ background-color:var(--faint); background-image:none; }
  html[data-theme="dark"] .report-picker-limit-note{ border-color:var(--note-border); background-color:var(--note-bg); background-image:none; color:var(--muted); }
  html[data-theme="dark"] .report-test-group{ border-color:var(--border-soft); background-color:var(--paper); background-image:none; }
  html[data-theme="dark"] .report-test-group-head{ background-color:rgba(81,85,89,0.85); background-image:none; border-bottom-color:var(--border-soft); color:var(--ink); }
  html[data-theme="dark"] .report-test-group-count{ color:var(--faint); }
  html[data-theme="dark"] .report-test-add{ border-color:var(--border-soft); background-color:var(--paper-2); background-image:none; color:var(--ink-2); }
  html[data-theme="dark"] .report-test-add:hover{ border-color:rgba(179,209,241,0.4); color:var(--accent); background-color:var(--accent-tint); background-image:none; }
  html[data-theme="dark"] .report-role-band-head{ color:var(--faint); background-color:rgba(81,85,89,0.4); background-image:none; border-bottom-color:rgba(117,120,124,0.4); }
  html[data-theme="dark"] .report-test-option{ border-bottom-color:rgba(117,120,124,0.5); color:var(--ink-2); }
  html[data-theme="dark"] .report-test-option:hover{ background-color:rgba(179,209,241,0.035); background-image:none; }
  html[data-theme="dark"] .report-test-option.is-selected{ border-color:rgba(179,209,241,0.24); background-color:rgba(179,209,241,0.055); background-image:none; }
  html[data-theme="dark"] .report-test-option input{ accent-color:var(--accent); }
  html[data-theme="dark"] .report-test-name{ color:var(--ink); }
  html[data-theme="dark"] .report-test-family{ color:var(--muted); }
  html[data-theme="dark"] .report-test-construct{ color:var(--ink-2); }
  html[data-theme="dark"] .report-test-badge{ color:var(--accent); border-color:rgba(179,209,241,0.25); background-color:var(--accent-tint); background-image:none; }
  html[data-theme="dark"] .report-test-option.is-added{ background-color:rgba(255,255,255,0.018); background-image:none; }
  html[data-theme="dark"] .report-test-option.is-added .report-test-badge{ color:var(--faint); border-color:var(--border); background-color:var(--paper-2); background-image:none; }
  html[data-theme="dark"] .report-picker-note{ color:var(--muted); border-left-color:var(--note-border); }
  html[data-theme="dark"] .report-manual-entry{ border-top-color:var(--border-soft); }
  html[data-theme="dark"] .report-measure-table td.report-cell-descriptor{ color:var(--ink-2); }
  html[data-theme="dark"] .report-measure-table tr.is-symptom td.report-cell-test{ box-shadow:inset 3px 0 0 0 rgba(0,0,0,0.6); }
  html[data-theme="dark"] .report-measure-table tr.is-symptom td.report-cell-descriptor{ color:var(--muted); }
  html[data-theme="dark"] .report-row-tools button{ border-color:var(--border-soft); background-color:var(--paper); background-image:none; color:var(--faint); }
  html[data-theme="dark"] .report-row-tools button:hover{ color:var(--ink); border-color:var(--border); }
  html[data-theme="dark"] .report-row-tools button.is-on{ background-color:var(--accent-tint); background-image:none; border-color:rgba(179,209,241,0.34); color:var(--accent); }
  html[data-theme="dark"] .report-row-tools button.report-row-remove:hover{ color:var(--warn); border-color:rgba(179,209,241,0.34); }
  html[data-theme="dark"] .report-section-actions{ border-left-color:var(--border-soft); }
  html[data-theme="dark"] .report-section-actions button{ background-color:transparent; background-image:none; color:var(--faint); }
  html[data-theme="dark"] .report-section-actions button:hover:not(:disabled){ color:var(--ink); background-color:rgba(179,209,241,0.04); background-image:none; }
  html[data-theme="dark"] .report-section-actions .report-section-remove{ color:var(--faint); border-left-color:var(--border-soft); }
  html[data-theme="dark"] .report-section-actions .report-section-remove:hover{ color:var(--warn); background-color:rgba(179,209,241,0.06); background-image:none; }
  html[data-theme="dark"] .report-toggle,
html[data-theme="dark"] .report-strength-toggle{ border-color:var(--border-soft); background-color:var(--paper); background-image:none; color:var(--ink-2); }
  html[data-theme="dark"] .report-toggle input,
html[data-theme="dark"] .report-strength-toggle input{ accent-color:var(--accent); }
  html[data-theme="dark"] .report-toggle:has(input:checked),
html[data-theme="dark"] .report-strength-toggle:has(input:checked){ border-color:rgba(179,209,241,0.34); color:var(--accent); background-color:var(--accent-tint); background-image:none; }
  html[data-theme="dark"] .report-output.is-locked{ background-color:#4D5054; background-image:none; }
  html[data-theme="dark"] .report-output.is-stale::before{ color:var(--accent); background-color:var(--accent-tint); background-image:none; border-color:rgba(179,209,241,0.24); }
  html[data-theme="dark"] .report-output{ border-color:var(--border); background-color:#4A4D51; background-image:none; color:var(--ink); }
  html[data-theme="dark"] .report-output:focus{ outline-color:rgba(179,209,241,0.34); }
  html[data-theme="dark"] .report-output h3{ color:var(--ink); }
  html[data-theme="dark"] .report-output h4{ color:var(--ink); }
  html[data-theme="dark"] .formula-disclosure summary{ color:var(--accent); border-color:rgba(179,209,241,0.2); background-color:var(--accent-tint); background-image:none; }
  html[data-theme="dark"] .formula-disclosure summary:hover{ background-color:var(--accent-tint-strong); background-image:none; border-color:rgba(179,209,241,0.34); }
  html[data-theme="dark"] .formula-disclosure summary::before{ color:var(--accent); }
  html[data-theme="dark"] .formula-disclosure .info-box{ background-color:var(--paper-2); background-image:none; border-color:var(--border-soft); }
  html[data-theme="dark"] .panel-kicker{ color:var(--muted); }
  html[data-theme="dark"] .autofill-panel{ box-shadow:none; }
  html[data-theme="dark"] .autofill-panel .autofill-row > .field > label{ color:var(--ink-2); }
  html[data-theme="dark"] .input-table{ background-color:rgba(74,77,81,0.18); background-image:none; }
  html[data-theme="dark"] .input-table thead tr.table-group-row th{ background-color:rgba(83,86,90,0.62); background-image:none; border-top-color:var(--border-soft); border-bottom-color:var(--border-soft); color:var(--muted); }
  html[data-theme="dark"] .input-table thead tr.table-group-row th:first-child{ color:var(--faint); }
  html[data-theme="dark"] .input-table tbody tr:hover{ background-color:rgba(179,209,241,0.024); background-image:none; }
  html[data-theme="dark"] .input-table td.computed.sig-no,
html[data-theme="dark"] .input-table td.computed.sig-yes,
html[data-theme="dark"] .input-table td.computed.sig-improve,
html[data-theme="dark"] .input-table td.computed.sig-decline{ background-color:transparent !important; background-image:none !important; }
  html[data-theme="dark"] .input-table td.computed.sig-no{ color:var(--muted); }
  html[data-theme="dark"] .input-table td.computed.sig-yes,
html[data-theme="dark"] .input-table td.computed.sig-decline{ color:var(--warn); }
  html[data-theme="dark"] .input-table td.computed.sig-improve{ color:var(--good); }
  html[data-theme="dark"] #rci-basic h2.block-title,
html[data-theme="dark"] #rci-practice h2.block-title,
html[data-theme="dark"] #rci-srb h2.block-title,
html[data-theme="dark"] #rci-crawford h2.block-title,
html[data-theme="dark"] #sdi h2.block-title{ color:var(--ink-2); }
  html[data-theme="dark"] #battery > .panel:not(.autofill-panel):not(.bat-premorbid-panel),
html[data-theme="dark"] #sdi > .panel:not(.autofill-panel),
html[data-theme="dark"] #rci-basic > .panel:not(.autofill-panel),
html[data-theme="dark"] #rci-practice > .panel:not(.autofill-panel),
html[data-theme="dark"] #rci-srb > .panel:not(.autofill-panel),
html[data-theme="dark"] #rci-crawford > .panel:not(.autofill-panel){ background-color:rgba(79,82,86,0.58); background-image:none; border-color:var(--border-soft); box-shadow:none; }
  html[data-theme="dark"] #battery > .panel:not(.autofill-panel):not(.bat-premorbid-panel) label,
html[data-theme="dark"] #sdi > .panel:not(.autofill-panel) label,
html[data-theme="dark"] #rci-basic > .panel:not(.autofill-panel) label,
html[data-theme="dark"] #rci-practice > .panel:not(.autofill-panel) label,
html[data-theme="dark"] #rci-srb > .panel:not(.autofill-panel) label,
html[data-theme="dark"] #rci-crawford > .panel:not(.autofill-panel) label{ color:var(--muted); }
  html[data-theme="dark"] #battery .bat-premorbid-panel{ box-shadow:none; }
  html[data-theme="dark"] .workflow-step-num{ color:var(--accent); background-color:var(--accent-tint); background-image:none; border-color:rgba(179,209,241,0.18); }
  html[data-theme="dark"] .workflow-step-title{ color:var(--ink); }
  html[data-theme="dark"] .workflow-step-copy{ color:var(--muted); }
  html[data-theme="dark"] .input-help-toggle summary{ color:var(--accent); border-bottom-color:rgba(179,209,241,0.35); }
  html[data-theme="dark"] .input-help-toggle summary::before{ border-color:rgba(179,209,241,0.25); background-color:var(--accent-tint); background-image:none; }
  html[data-theme="dark"] .column-guide{ border-color:var(--border-soft); border-left-color:var(--note-border); background-color:var(--note-bg); background-image:none; }
  html[data-theme="dark"] .column-guide div{ color:var(--ink-2); }
  html[data-theme="dark"] .column-guide code{ color:var(--accent); background-color:transparent; background-image:none; }
  html[data-theme="dark"] .input-table th[title]{ text-decoration-color:rgba(179,209,241,0.32); }
  html[data-theme="dark"] .input-table tr.row-check{ background-color:rgba(179,209,241,0.035); background-image:none; }
  html[data-theme="dark"] .input-table td.status-awaiting,
html[data-theme="dark"] .input-table td.status-check{ color:var(--faint); }
  html[data-theme="dark"] .input-table td.status-check{ color:var(--warn); }
  html[data-theme="dark"] .btn-example{ background-color:var(--paper); background-image:none; color:var(--muted); }
  html[data-theme="dark"] .btn-example:hover{ border-color:var(--accent); color:var(--accent); background-color:var(--accent-tint); background-image:none; }
  html[data-theme="dark"] .input-table th.d1-head,
html[data-theme="dark"] .input-table td:has(input[data-f="t1"]),
html[data-theme="dark"] #bat-table th:nth-child(3),
html[data-theme="dark"] #bat-table td:nth-child(3){ box-shadow:none; }
  html[data-theme="dark"] .input-table th.d1-head,
html[data-theme="dark"] .input-table th.d2-head,
html[data-theme="dark"] .input-table td:has(input[data-f="t1"]),
html[data-theme="dark"] .input-table td:has(input[data-f="t2"]),
html[data-theme="dark"] #bat-table th:nth-child(3),
html[data-theme="dark"] #bat-table th:nth-child(4),
html[data-theme="dark"] #bat-table th:nth-child(5),
html[data-theme="dark"] #bat-table th:nth-child(6),
html[data-theme="dark"] #bat-table td:nth-child(3),
html[data-theme="dark"] #bat-table td:nth-child(4),
html[data-theme="dark"] #bat-table td:nth-child(5),
html[data-theme="dark"] #bat-table td:nth-child(6){ background-color:rgba(179,209,241,0.052); background-image:none; }
  html[data-theme="dark"] .input-table td:has(input[data-f="t1"]) input,
html[data-theme="dark"] .input-table td:has(input[data-f="t2"]) input,
html[data-theme="dark"] #bat-table td:nth-child(3) input,
html[data-theme="dark"] #bat-table td:nth-child(4) input{ background-color:#4A4D51; background-image:none; }
  html[data-theme="dark"] .input-table tbody tr:hover td:has(input[data-f="t1"]),
html[data-theme="dark"] .input-table tbody tr:hover td:has(input[data-f="t2"]),
html[data-theme="dark"] #bat-table tbody tr:hover td:nth-child(3),
html[data-theme="dark"] #bat-table tbody tr:hover td:nth-child(4),
html[data-theme="dark"] #bat-table tbody tr:hover td:nth-child(5),
html[data-theme="dark"] #bat-table tbody tr:hover td:nth-child(6){ background-color:rgba(179,209,241,0.075); background-image:none; }
  html[data-theme="dark"] .esb-modes,
html[data-theme="dark"] .esb-views{ background-color:rgba(255,255,255,0.06); background-image:none; border-color:rgba(255,255,255,0.1); }
  html[data-theme="dark"] .esb-mode,
html[data-theme="dark"] .esb-view{ background-color:transparent; background-image:none; color:#E5E6E6; }
  html[data-theme="dark"] .esb-mode.is-on,
html[data-theme="dark"] .esb-view.is-on{ background-color:#4A4D51; background-image:none; color:#FDFDFD; box-shadow:0 1px 2px rgba(0,0,0,0.16), 0 0 0 1px rgba(255,255,255,0.04); }
  html[data-theme="dark"] .esb-mode:focus-visible,
html[data-theme="dark"] .esb-view:focus-visible{ outline-color:#FDFDFD; }
  html[data-theme="dark"] .esb-note{ color:#DBDCDD; }
  html[data-theme="dark"] .esb-group-title{ color:#F0F1F1; }
  html[data-theme="dark"] .esb-group-title span{ color:#D6D7D8; }
  html[data-theme="dark"] .esb-source{ color:#D6D7D8; }
  html[data-theme="dark"] .esb-warning{ color:#F0F1F1; background-color:#515559; background-image:none; border-color:rgba(255,190,185,0.25); }
  html[data-theme="dark"] .esb-legend{ color:#E5E6E6; }
  html[data-theme="dark"] .esb-swatch-g2{ background-color:#C8D9EB; background-image:none; }
  html[data-theme="dark"] .esb-swatch-g1{ background-color:#B9DBC2; background-image:none; }
  html[data-theme="dark"] .esb-hint{ color:#D6D7D8; }
  html[data-theme="dark"] .esb-answer{ border-color:rgba(255,255,255,0.08); background-color:#4A4D51; background-image:none; color:#F7F7F7; }
  html[data-theme="dark"] .esb-answer-label{ color:#D6D7D8; }
  html[data-theme="dark"] .esb-viewpane{ border-color:rgba(255,255,255,0.1); background-color:#4A4D51; background-image:none; }
  html[data-theme="dark"] .esb-table th{ background-color:#505358; background-image:none; color:#DBDCDD; border-bottom-color:rgba(255,255,255,0.12); }
  html[data-theme="dark"] .esb-table td{ border-bottom-color:rgba(255,255,255,0.05); color:#F0F1F1; }
  html[data-theme="dark"] .esb-table td.num{ color:#FDFDFD; }
  html[data-theme="dark"] .esb-size{ color:#DBDCDD; }
  html[data-theme="dark"] .esb-sub{ color:#D1D2D3; }
  html[data-theme="dark"] .esb-grp td{ background-color:#4D5054; background-image:none; color:#D6D7D8; }
  html[data-theme="dark"] .esb-eq-table tr.is-entered td{ background-color:#515559; background-image:none; }
  html[data-theme="dark"] .esb-eq-table tr.is-entered td:first-child{ box-shadow:inset 3px 0 0 rgba(0,0,0,0.6); color:#B3D1F1; }
  html[data-theme="dark"] .esb-ref-table tr.is-near td{ background-color:#515559; background-image:none; }
  html[data-theme="dark"] .esb-foot{ color:#E0E1E2; }
  html[data-theme="dark"] .esb-target-intro,
html[data-theme="dark"] .esb-target-help{ color:#F0F1F1; }
  html[data-theme="dark"] .esb-target-help{ color:#E0E1E2; }
  html[data-theme="dark"] .esb-formulas{ color:#F0F1F1; }
  html[data-theme="dark"] .esb-formulas dt{ color:#FDFDFD; }
  html[data-theme="dark"] #effectsize .es-d-slider-row{ background-color:transparent; background-image:none; box-shadow:none; }
  html[data-theme="dark"] #effectsize .es-d-slider-track-bg{ background:linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.07) 100%); box-shadow:inset 0 1px 1px rgba(0,0,0,0.2),
    inset 0 -1px 0 rgba(0,0,0,0.6); }
  html[data-theme="dark"] #effectsize .es-d-slider-track-bg::before{ background:linear-gradient(180deg, rgba(179,209,241,0.92) 0%, rgba(252,193,179,0.95) 100%); box-shadow:inset 0 1px 0 rgba(0,0,0,0.36); }
  html[data-theme="dark"] #effectsize #es-d-slider{ background-color:transparent; background-image:none; }
  html[data-theme="dark"] #effectsize #es-d-slider::-webkit-slider-runnable-track{ background-color:transparent; background-image:none; }
  html[data-theme="dark"] #effectsize #es-d-slider::-moz-range-track{ background-color:transparent; background-image:none; }
  html[data-theme="dark"] #effectsize #es-d-slider::-webkit-slider-thumb{ background:radial-gradient(circle at 30% 28%, #F7F7F7 0%, #FFFFFF 75%); border-color:#4A4D51; box-shadow:0 0 0 1px rgba(255,255,255,0.16),
    0 1px 2px rgba(0,0,0,0.36),
    0 4px 10px rgba(0,0,0,0.4); }
  html[data-theme="dark"] #effectsize #es-d-slider::-moz-range-thumb{ background:radial-gradient(circle at 30% 28%, #F7F7F7 0%, #FFFFFF 75%); border-color:#4A4D51; box-shadow:0 0 0 1px rgba(255,255,255,0.16),
    0 1px 2px rgba(0,0,0,0.36),
    0 4px 10px rgba(0,0,0,0.4); }
  html[data-theme="dark"] #effectsize #es-d-slider:hover::-webkit-slider-thumb{ box-shadow:0 0 0 1px rgba(255,255,255,0.26),
    0 2px 4px rgba(0,0,0,0.44),
    0 8px 18px rgba(0,0,0,0.44); }
  html[data-theme="dark"] #effectsize #es-d-slider:active::-webkit-slider-thumb,
html[data-theme="dark"] #effectsize #es-d-slider:focus-visible::-webkit-slider-thumb{ box-shadow:0 0 0 1px rgba(179,209,241,0.45),
    0 0 0 6px rgba(179,209,241,0.16),
    0 2px 4px rgba(0,0,0,0.44),
    0 10px 22px rgba(0,0,0,0.44); }
  html[data-theme="dark"] #effectsize .es-d-tick{ background-color:rgba(255,255,255,0.18); background-image:none; }
  html[data-theme="dark"] #effectsize .es-d-tick-major,
html[data-theme="dark"] #effectsize .es-d-tick-zero{ background-color:rgba(255,255,255,0.4); background-image:none; }
  html[data-theme="dark"] #effectsize .es-d-tick-major::after,
html[data-theme="dark"] #effectsize .es-d-tick-zero::after{ color:#D1D2D4; }
  html[data-theme="dark"] #effectsize .es-d-tick-zero::after{ color:#E5E6E6; }
  html[data-theme="dark"]{ --paper:#515458; --paper-2:#52555A; --paper-3:#585B5F; --paper-card:#4A4D51; --ink:#FDFDFD; --ink-2:#F5F5F5; --muted:#DFE0E1; --faint:#D0D1D2; --border:#838689; --border-soft:#696C71; --accent:#FDFDFD; --brand-warm:#B3D1F1; --accent-tint:rgba(253,253,253,0.05); --accent-tint-strong:rgba(253,253,253,0.1); }
  html[data-theme="dark"] body{ background-color:var(--paper); background-image:none; }
  html[data-theme="dark"] .main{ background-color:var(--paper); background-image:none; }
  html[data-theme="dark"] .topbar{ background-color:#4A4D51; background-image:none; border-bottom-color:#5B5E62; }
  html[data-theme="dark"] .topbar-row{ background-color:#4A4D51; background-image:none; }
  html[data-theme="dark"] .topbar-row-brand{ border-bottom-color:#56595D; }
  html[data-theme="dark"] .topbar-brand-title{ color:var(--ink); }
  html[data-theme="dark"] .topbar-brand-title em{ color:var(--brand-warm); }
  html[data-theme="dark"] .topbar-divider{ background-color:#707377; background-image:none; }
  html[data-theme="dark"] .topbar-page-title{ color:var(--ink); }
  html[data-theme="dark"] .topbar-page-title em{ color:#EFEFEF; }
  html[data-theme="dark"] .topnav-item{ background-color:transparent !important; background-image:none !important; color:#DDDDDE !important; }
  html[data-theme="dark"] .topnav-item:hover{ color:#FDFDFD !important; background-color:transparent !important; background-image:none !important; }
  html[data-theme="dark"] .topnav-item::after{ background-color:#FDFDFD; background-image:none; }
  html[data-theme="dark"] .topnav-item.active{ color:#FDFDFD !important; background-color:transparent !important; background-image:none !important; border-left-color:transparent !important; }
  html[data-theme="dark"] .site-footer{ background-color:transparent; background-image:none; border-top-color:rgba(255,255,255,0.08); }
  html[data-theme="dark"] .site-footer-link{ background-color:transparent !important; background-image:none !important; color:#E5E6E6 !important; }
  html[data-theme="dark"] .site-footer-link:hover{ color:#FDFDFD !important; text-decoration-color:#D1D2D4; }
  html[data-theme="dark"] .site-footer-link.active{ color:#FDFDFD !important; background-color:transparent !important; background-image:none !important; }
  html[data-theme="dark"] .site-footer-meta{ color:#D0D1D2; }
  html[data-theme="dark"] .topnav-chevron{ color:currentColor; }
  html[data-theme="dark"] .topnav-dropdown{ background-color:#4A4D51; background-image:none; border-color:#5B5E62; box-shadow:0 12px 28px rgba(0,0,0,0.2); }
  html[data-theme="dark"] .topnav-drop-item{ background-color:transparent !important; background-image:none !important; color:#EBEBEC !important; }
  html[data-theme="dark"] .topnav-drop-item:hover{ background-color:#52555A !important; background-image:none !important; color:#FDFDFD !important; }
  html[data-theme="dark"] .topnav-drop-item.active{ color:#FDFDFD !important; background-color:#52555A !important; background-image:none !important; border-left-color:transparent !important; }
  html[data-theme="dark"] .eyebrow{ color:#D6D7D8; background-color:none; background-image:none; }
  html[data-theme="dark"] .section-title{ color:var(--ink); }
  html[data-theme="dark"] .section-title em{ color:var(--ink); }
  html[data-theme="dark"] .section-desc{ color:#EBEBEC; }
  html[data-theme="dark"] .section-desc em{ color:var(--ink-2); }
  html[data-theme="dark"] .section-body-text{ color:#EBEBEC; }
  html[data-theme="dark"] .home-hero .section-desc{ color:#EBEBEC; }
  html[data-theme="dark"] .section-rule{ background-color:#696C71; background-image:none; }
  html[data-theme="dark"] .home-pathway-card{ background-color:var(--paper-card); background-image:none; border-color:#616468; box-shadow:none; }
  html[data-theme="dark"] .home-pathway-card:hover{ border-color:#D1D2D4; box-shadow:none; }
  html[data-theme="dark"] .home-pathway-icon{ background-color:rgba(253,253,253,0.05); background-image:none; color:#FDFDFD; }
  html[data-theme="dark"] .home-pathway-label{ color:#D6D7D8; }
  html[data-theme="dark"] .home-pathway-title{ color:var(--ink); }
  html[data-theme="dark"] .home-pathway-card:hover .home-pathway-title{ color:var(--ink); }
  html[data-theme="dark"] .home-pathway-desc{ color:#E9E9EA; }
  html[data-theme="dark"] .home-pathway-tools{ border-top-color:#575A5E; }
  html[data-theme="dark"] .home-pathway-tool{ color:#E9E9EA; background-color:none; background-image:none; }
  html[data-theme="dark"] .home-pathway-tool:hover{ background-color:none; background-image:none; }
  html[data-theme="dark"] .home-pathway-tool-num{ color:#D0D1D2; }
  html[data-theme="dark"] .home-pathway-tool-name{ color:#EFEFEF; }
  html[data-theme="dark"] .home-pathway-tool-name:hover{ color:#FDFDFD; text-decoration-color:#D1D2D4; }
  html[data-theme="dark"] .home-pathway-tool-badge{ background-color:rgba(253,253,253,0.05); background-image:none; border-color:rgba(253,253,253,0.18) !important; color:#EFEFEF !important; }
  html[data-theme="dark"] .btn{ box-shadow:none !important; }
  html[data-theme="dark"] .btn-primary{ background-color:#FDFDFD; background-image:none; color:#4A4D51; border-color:#FDFDFD; }
  html[data-theme="dark"] .btn-primary:hover{ background-color:#FFFFFF; background-image:none; border-color:#FFFFFF; }
  html[data-theme="dark"] .home-actions .btn-primary{ box-shadow:none; }
  html[data-theme="dark"] .panel{ background-color:#4A4D51 !important; background-image:none !important; border-color:#616468 !important; box-shadow:none !important; }
  html[data-theme="dark"] .panel-emphasis{ background-color:#4F5256 !important; background-image:none !important; border-color:#74777A !important; }
  html[data-theme="dark"] .panel-kicker{ color:#D6D7D8; }
  html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] textarea{ background-color:#4A4D51 !important; border-color:#707377 !important; color:var(--ink) !important; }
  html[data-theme="dark"] select{ background-color:#4A4D51 !important; border-color:#707377 !important; color:var(--ink) !important; }
  html[data-theme="dark"] input[type="text"]:hover,
html[data-theme="dark"] input[type="number"]:hover,
html[data-theme="dark"] input[type="date"]:hover,
html[data-theme="dark"] select:hover,
html[data-theme="dark"] textarea:hover{ border-color:#D1D2D4 !important; }
  html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus{ border-color:#FDFDFD !important; box-shadow:0 0 0 3px rgba(253,253,253,0.08) !important; }
  html[data-theme="dark"] .field label{ color:#DBDCDD; }
  html[data-theme="dark"] .btn{ background-color:#4A4D51 !important; background-image:none !important; border-color:#838689 !important; box-shadow:none !important; color:var(--ink) !important; }
  html[data-theme="dark"] .btn:hover{ background-color:#52555A !important; background-image:none !important; border-color:#D1D2D4 !important; color:var(--ink) !important; }
  html[data-theme="dark"] .btn-primary{ background-color:#FDFDFD !important; background-image:none !important; color:#4A4D51 !important; border-color:#FDFDFD !important; }
  html[data-theme="dark"] .btn-primary:hover{ background-color:#FFFFFF !important; background-image:none !important; border-color:#FFFFFF !important; }
  html[data-theme="dark"] .btn-secondary{ background-color:#4A4D51 !important; background-image:none !important; color:var(--ink) !important; border-color:#838689 !important; }
  html[data-theme="dark"] .btn-secondary:hover{ background-color:#52555A !important; background-image:none !important; border-color:#D1D2D4 !important; color:var(--ink) !important; }
  html[data-theme="dark"] .btn-ghost{ background-color:transparent !important; background-image:none !important; border-color:transparent !important; color:#DFE0E1 !important; }
  html[data-theme="dark"] .btn-ghost:hover{ background-color:rgba(253,253,253,0.05) !important; background-image:none !important; color:var(--ink) !important; }
  html[data-theme="dark"] .btn.btn-clear{ background-color:#FFBFB5 !important; background-image:none !important; border-color:#FFBFB5 !important; color:#4A4D51 !important; box-shadow:0 1px 2px rgba(0,0,0,0.6), 0 2px 6px rgba(0,0,0,0.44) !important; }
  html[data-theme="dark"] .btn.btn-clear:hover{ background-color:#FFBFB5 !important; background-image:none !important; border-color:#FFBFB5 !important; color:#4A4D51 !important; box-shadow:0 2px 4px rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.6) !important; }
  html[data-theme="dark"] .btn.btn-clear:active{ background-color:#FFBFB5 !important; background-image:none !important; border-color:#FFBFB4 !important; }
  html[data-theme="dark"] .btn.btn-clear:focus-visible{ outline-color:rgba(255,191,181,0.45); }
  html[data-theme="dark"] .info-box{ background-color:#52555A !important; background-image:none !important; border-color:#707377 !important; border-left-color:#FDFDFD !important; color:var(--ink-2); }
  html[data-theme="dark"] .info-box strong{ color:var(--ink); }
  html[data-theme="dark"] .input-table{ background-color:#4A4D51; background-image:none; border-color:#616468; }
  html[data-theme="dark"] .input-table thead th{ background-color:#52555A; background-image:none; color:#EFEFEF; }
  html[data-theme="dark"] .input-table tbody tr:hover{ background-color:#4F5256; background-image:none; }
  html[data-theme="dark"] .combo-list{ background-color:#4A4D51; background-image:none; border-color:#707377; box-shadow:0 8px 22px rgba(0,0,0,0.16); }
  html[data-theme="dark"] .combo-item:hover{ background-color:#52555A; background-image:none; }
  html[data-theme="dark"] a{ color:#FDFDFD; text-decoration-color:#D1D2D4; }
  html[data-theme="dark"] a:hover{ text-decoration-color:#FDFDFD; }
  html[data-theme="dark"] details summary:hover{ color:var(--ink); }
  html[data-theme="dark"] .change-method-tab{ background-color:#4A4D51 !important; background-image:none !important; border-color:#616468 !important; color:#EBEBEC !important; }
  html[data-theme="dark"] .change-method-tab.active{ background-color:#52555A !important; background-image:none !important; border-color:#FDFDFD !important; color:#FDFDFD !important; }
  html[data-theme="dark"] .change-method-tab.active .change-method-label,
html[data-theme="dark"] .change-method-tab.active .change-method-num{ color:#FDFDFD !important; }
  html[data-theme="dark"] .change-method-tab:focus-visible{ box-shadow:inset 0 0 0 2px rgba(253,253,253,0.2) !important; }
  html[data-theme="dark"] .panel-emphasis{ background-color:#505357 !important; background-image:none !important; }
  html[data-theme="dark"] #change-analysis .change-method-tabs{ background-color:#4A4D51 !important; background-image:none !important; border-color:rgba(255,255,255,0.06) !important; box-shadow:0 1px 2px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.08) !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab{ background-color:transparent !important; background-image:none !important; box-shadow:none !important; border-right-color:rgba(255,255,255,0.06) !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab:hover:not(.active){ background-color:rgba(255,255,255,0.025) !important; background-image:none !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab.active{ background:linear-gradient(180deg, #4F5256 0%, #52555A 100%) !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab.active::after{ background:linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.55) 22%, rgba(255,255,255,0.55) 78%, transparent 100%); }
  html[data-theme="dark"] #change-analysis .change-method-num{ background-color:rgba(255,255,255,0.07) !important; background-image:none !important; color:#DBDCDD !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab:hover:not(.active) .change-method-num{ background-color:rgba(255,255,255,0.12) !important; background-image:none !important; color:#EFEFEF !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab.active .change-method-num{ background-color:rgba(255,255,255,0.12) !important; background-image:none !important; color:#FDFDFD !important; box-shadow:0 0 0 2px rgba(255,255,255,0.04) !important; }
  html[data-theme="dark"] #change-analysis .change-method-label{ color:#E5E6E6 !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab:hover:not(.active) .change-method-label{ color:#FDFDFD !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab.active .change-method-label{ color:#FDFDFD !important; }
  html[data-theme="dark"] #change-analysis .change-method-pill{ color:#D6D7D8 !important; background-color:transparent !important; background-image:none !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab.active .change-method-pill{ color:#E5E6E6 !important; }
  html[data-theme="dark"] #change-analysis .change-method-meta{ color:#D1D2D4 !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab.active .change-method-meta{ color:#E5E6E6 !important; }
  html[data-theme="dark"] .input-table{ background-color:#4A4D51 !important; background-image:none !important; border-color:#616468 !important; }
  html[data-theme="dark"] .input-table thead th{ background-color:#505357 !important; background-image:none !important; color:#E5E6E6 !important; border-bottom-color:#616468 !important; }
  html[data-theme="dark"] .input-table tbody td{ border-bottom-color:#575A5E !important; }
  html[data-theme="dark"] .input-table tbody tr{ background-color:#4A4D51 !important; background-image:none !important; }
  html[data-theme="dark"] .input-table tbody tr:hover{ background-color:#4F5256 !important; background-image:none !important; }
  html[data-theme="dark"] .input-table input[type="text"],
html[data-theme="dark"] .input-table input[type="number"]{ border-color:#5B5E62 !important; background-color:#4A4D51 !important; background-image:none !important; }
  html[data-theme="dark"] .input-table input:focus{ border-color:#FDFDFD !important; box-shadow:0 0 0 2px rgba(253,253,253,0.08) !important; }
  html[data-theme="dark"] .input-table .row-num{ color:#D0D1D2 !important; }
  html[data-theme="dark"] .combo-input{ background-color:#4A4D51 !important; background-image:none !important; border-color:#707377 !important; }
  html[data-theme="dark"] .combo-list{ background-color:#4A4D51 !important; background-image:none !important; border-color:#707377 !important; box-shadow:0 8px 22px rgba(0,0,0,0.16) !important; }
  html[data-theme="dark"] .combo-item{ color:#EFEFEF !important; border-bottom-color:#52555A; }
  html[data-theme="dark"] .combo-item:hover{ background-color:#52555A !important; background-image:none !important; color:#FDFDFD !important; }
  html[data-theme="dark"] .section-desc{ color:#E5E6E6 !important; }
  html[data-theme="dark"] #change-analysis .autofill-panel,
html[data-theme="dark"] #change-analysis .change-context-panel{ background-color:#4A4D51 !important; background-image:none !important; border-color:#616468 !important; box-shadow:none !important; }
  html[data-theme="dark"] #premorbid .panel{ box-shadow:none !important; }
  html[data-theme="dark"] .toast{ background-color:#FDFDFD !important; background-image:none !important; color:#4A4D51 !important; box-shadow:0 8px 24px rgba(0,0,0,0.36) !important; }
  html[data-theme="dark"] #change-analysis .section-desc{ color:#E5E6E6 !important; }
  html[data-theme="dark"] #change-analysis .change-method-tabs{ background-color:transparent !important; background-image:none !important; border-color:#696C71 !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab{ background-color:#4A4D51 !important; background-image:none !important; border-right-color:rgba(255,255,255,0.04) !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab:hover{ background-color:#505357 !important; background-image:none !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab.active{ background-color:#52555A !important; background-image:none !important; color:#FDFDFD !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab.active::before{ background-color:#FDFDFD; background-image:none; }
  html[data-theme="dark"] #change-analysis .change-method-num{ color:#D0D1D2 !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab.active .change-method-num{ color:#E5E6E6 !important; }
  html[data-theme="dark"] #change-analysis .change-method-label{ color:#EFEFEF !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab.active .change-method-label{ color:#FDFDFD !important; }
  html[data-theme="dark"] #change-analysis .change-method-meta{ color:#D6D7D8 !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab.active .change-method-meta{ color:#E5E6E6 !important; }
  html[data-theme="dark"] #change-analysis .change-context-panel,
html[data-theme="dark"] #change-analysis .autofill-panel,
html[data-theme="dark"] #change-analysis .change-setup-grid > .panel{ background-color:#4A4D51 !important; background-image:none !important; border-color:#616468 !important; box-shadow:none !important; }
  html[data-theme="dark"] #change-analysis h2,
html[data-theme="dark"] #change-analysis .change-test-data-title{ color:#FDFDFD; }
  html[data-theme="dark"]{ --shadow-1:0 1px 2px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.08); --shadow-2:0 2px 4px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.12); --shadow-3:0 4px 8px rgba(0,0,0,0.1), 0 12px 28px rgba(0,0,0,0.16); --shadow-4:0 8px 16px rgba(0,0,0,0.16), 0 24px 48px rgba(0,0,0,0.24); }
  html[data-theme="dark"] body{ background-color:var(--paper) !important; background-image:none !important; }
  html[data-theme="dark"] .topbar{ background-color:#4A4D51 !important; background-image:none !important; box-shadow:0 1px 0 rgba(0,0,0,0.08); }
  html[data-theme="dark"] .topbar-row-brand{ border-bottom-color:rgba(255,255,255,0.06) !important; }
  html[data-theme="dark"] .home-pathway-card{ border-color:rgba(255,255,255,0.06) !important; box-shadow:var(--shadow-1) !important; }
  html[data-theme="dark"] .home-pathway-card:hover{ box-shadow:var(--shadow-3) !important; border-color:rgba(255,255,255,0.12) !important; }
  html[data-theme="dark"] .home-pathway-icon{ background:linear-gradient(135deg, rgba(253,253,253,0.06), rgba(253,253,253,0.02)) !important; }
  html[data-theme="dark"] .home-pathway-card:hover .home-pathway-title{ color:#FFFFFF !important; }
  html[data-theme="dark"] .home-hero .section-desc{ color:#EFEFEF !important; }
  html[data-theme="dark"] .section-desc{ color:#E5E6E6 !important; }
  html[data-theme="dark"] .panel{ background-color:#4A4D51 !important; background-image:none !important; border-color:rgba(255,255,255,0.05) !important; box-shadow:var(--shadow-1) !important; }
  html[data-theme="dark"] .panel-emphasis{ background:linear-gradient(180deg, #4F5256 0%, #52555A 100%) !important; border-color:rgba(179,209,241,0.15) !important; }
  html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{ border-color:rgba(255,255,255,0.12) !important; }
  html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus{ border-color:#FDFDFD !important; box-shadow:0 0 0 3px rgba(253,253,253,0.1) !important; }
  html[data-theme="dark"] .btn{ border-color:rgba(255,255,255,0.12) !important; }
  html[data-theme="dark"] .btn:hover{ box-shadow:var(--shadow-1) !important; }
  html[data-theme="dark"] .btn-primary{ background:linear-gradient(180deg, #F7F7F7 0%, #FDFDFD 100%) !important; border-color:#FDFDFD !important; box-shadow:0 1px 2px rgba(0,0,0,0.24), inset 0 1px 0 rgba(0,0,0,0.12) !important; }
  html[data-theme="dark"] .btn-primary:hover{ background:linear-gradient(180deg, #FBFBFB 0%, #FFFFFF 100%) !important; box-shadow:0 2px 6px rgba(0,0,0,0.36), inset 0 1px 0 rgba(0,0,0,0.12) !important; }
  html[data-theme="dark"] #change-analysis .change-method-tabs{ border-color:rgba(255,255,255,0.08) !important; background-color:rgba(74,77,81,0.6) !important; background-image:none !important; box-shadow:var(--shadow-1) !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab{ background-color:transparent !important; background-image:none !important; border-right-color:rgba(255,255,255,0.05) !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab:hover{ background-color:rgba(255,255,255,0.025) !important; background-image:none !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab.active{ background:linear-gradient(180deg, #4F5256 0%, #52555A 100%) !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab.active::before{ background:linear-gradient(90deg, transparent 0%, #FDFDFD 20%, #FDFDFD 80%, transparent 100%) !important; }
  html[data-theme="dark"] .input-table{ border-color:rgba(255,255,255,0.06) !important; box-shadow:var(--shadow-1) !important; }
  html[data-theme="dark"] .input-table thead th{ background-color:rgba(255,255,255,0.025) !important; background-image:none !important; color:#DFE0E1 !important; border-bottom-color:rgba(255,255,255,0.08) !important; }
  html[data-theme="dark"] .input-table tbody tr:hover{ background-color:rgba(255,255,255,0.02) !important; background-image:none !important; }
  html[data-theme="dark"] .input-table tbody td{ border-bottom-color:rgba(255,255,255,0.04) !important; }
  html[data-theme="dark"] .site-footer{ background-color:transparent !important; background-image:none !important; border-top-color:rgba(255,255,255,0.08) !important; }
  html[data-theme="dark"]::-webkit-scrollbar-track{ background-color:transparent; background-image:none; }
  html[data-theme="dark"]::-webkit-scrollbar-thumb{ background-color:rgba(255,255,255,0.15); background-image:none; border-color:transparent; }
  html[data-theme="dark"]::-webkit-scrollbar-thumb:hover{ background-color:rgba(255,255,255,0.28); background-image:none; border-color:transparent; }
  html[data-theme="dark"] button:focus-visible,
html[data-theme="dark"] a:focus-visible{ outline-color:rgba(253,253,253,0.4); }
  html[data-theme="dark"]::selection{ background-color:rgba(179,209,241,0.18); background-image:none; color:#FDFDFD; }
  html[data-theme="dark"] .combo-list{ box-shadow:var(--shadow-3) !important; }
  html[data-theme="dark"] .topnav-dropdown{ box-shadow:var(--shadow-3) !important; border-color:rgba(255,255,255,0.08) !important; }
  html[data-theme="dark"] .section-rule{ background:linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 20%, rgba(255,255,255,0.12) 80%, transparent 100%) !important; }
  html[data-theme="dark"] .topnav-drop-item:hover{ background-color:rgba(179,209,241,0.05) !important; background-image:none !important; }
  html[data-theme="dark"] #change-analysis .autofill-panel:empty::before,
html[data-theme="dark"] #change-analysis .autofill-panel.is-empty::before{ color:#D1D2D4; }
  html[data-theme="dark"] #battery .bat-premorbid-panel{ background:linear-gradient(180deg, #4F5256, #52555A) !important; border-color:rgba(255,255,255,0.06) !important; }
  html[data-theme="dark"] #battery .bat-premorbid-help{ color:#E5E6E6; }
  html[data-theme="dark"] #battery .bat-premorbid-toggle{ color:#FDFDFD; }
  html[data-theme="dark"] #premorbid .pre-form-section{ background-color:#4A4D51 !important; background-image:none !important; border-color:rgba(255,255,255,0.06) !important; box-shadow:var(--shadow-1) !important; }
  html[data-theme="dark"] #premorbid .pre-form-heading,
html[data-theme="dark"] #premorbid .pre-form-title{ color:#FDFDFD !important; }
  html[data-theme="dark"] #premorbid .pre-results-table,
html[data-theme="dark"] #premorbid .pre-predict-table{ background-color:#4A4D51; background-image:none; border-color:rgba(255,255,255,0.06) !important; box-shadow:var(--shadow-1); }
  html[data-theme="dark"] #premorbid .pre-form-note{ color:#DBDCDD; }
  html[data-theme="dark"] #about p,
html[data-theme="dark"] #about li{ color:#EFEFEF; }
  html[data-theme="dark"] #about h2,
html[data-theme="dark"] #about h3{ color:#FDFDFD; }
  html[data-theme="dark"] #about a{ color:#FDFDFD; text-decoration-color:rgba(179,209,241,0.4); }
  html[data-theme="dark"] #about a:hover{ text-decoration-color:#B3D1F1; }
  html[data-theme="dark"] #about details{ background-color:#4A4D51; background-image:none; border-color:rgba(255,255,255,0.06); box-shadow:var(--shadow-1); }
  html[data-theme="dark"] #about details summary{ color:#FDFDFD; }
  html[data-theme="dark"] #custom-tests .panel{ background-color:#4A4D51; background-image:none; border-color:rgba(255,255,255,0.06) !important; box-shadow:var(--shadow-1) !important; }
  html[data-theme="dark"] .home-pathway-card .home-pathway-tools{ border-top-color:rgba(255,255,255,0.06) !important; }
  html[data-theme="dark"] .home-pathway-tool-name:hover{ color:#FDFDFD !important; }
  html[data-theme="dark"] .home-pathway-tool-badge{ background:linear-gradient(180deg, #F7F7F7, #FDFDFD) !important; color:#4A4D51 !important; box-shadow:0 1px 2px rgba(0,0,0,0.36) !important; }
  html[data-theme="dark"] .toast{ border-color:rgba(74,77,81,0.06) !important; }
  html[data-theme="dark"] #premorbid .pre-input-intro{ color:#DFE0E1 !important; background-color:transparent !important; background-image:none !important; }
  html[data-theme="dark"] #premorbid .pre-form-section{ background-color:transparent !important; background-image:none !important; box-shadow:none !important; }
  html[data-theme="dark"] #premorbid .pre-form-title{ color:#DBDCDD !important; }
  html[data-theme="dark"] #premorbid .pre-form-note{ color:#D1D2D4 !important; }
  html[data-theme="dark"] #premorbid #pre-inputs .premorbid-input-panel{ background:linear-gradient(180deg, #505357 0%, #54575B 100%) !important; border-color:rgba(255,255,255,0.06) !important; }
  html[data-theme="dark"] #premorbid #pre-inputs .pre-form-section{ background-color:#4A4D51 !important; background-image:none !important; border-color:rgba(255,255,255,0.05) !important; box-shadow:var(--shadow-1) !important; }
  html[data-theme="dark"] #premorbid #pre-inputs .pre-form-section:hover{ box-shadow:var(--shadow-2) !important; }
  html[data-theme="dark"] #premorbid #pre-inputs .pre-form-heading{ border-bottom-color:rgba(255,255,255,0.05); }
  html[data-theme="dark"] #premorbid #pre-inputs .pre-form-title{ color:#FDFDFD !important; }
  html[data-theme="dark"] #premorbid #pre-inputs .pre-form-note{ color:#DBDCDD !important; }
  html[data-theme="dark"] #premorbid #pre-inputs .field label{ color:#E5E6E6 !important; }
  html[data-theme="dark"] #premorbid #pre-inputs .pre-label-sub{ color:#D1D2D4 !important; }
  html[data-theme="dark"] #premorbid #pre-predict > p,
html[data-theme="dark"] #premorbid #pre-opiepredict > p{ color:#DFE0E1 !important; background:linear-gradient(180deg, #4F5256, #52555A) !important; border-color:rgba(255,255,255,0.06) !important; border-left-color:#FDFDFD !important; }
  html[data-theme="dark"] #premorbid .pre-predict-table{ background-color:#4A4D51 !important; background-image:none !important; border-color:rgba(255,255,255,0.06) !important; box-shadow:var(--shadow-1) !important; }
  html[data-theme="dark"] #premorbid .pre-predict-table thead th{ background-color:rgba(255,255,255,0.025) !important; background-image:none !important; color:#E5E6E6 !important; border-bottom-color:rgba(255,255,255,0.08) !important; }
  html[data-theme="dark"] #premorbid .pre-predict-table tbody tr.group-row > td{ background:linear-gradient(180deg, #505357, #54575B) !important; color:#FDFDFD !important; border-top-color:rgba(255,255,255,0.08) !important; border-bottom-color:rgba(255,255,255,0.06) !important; }
  html[data-theme="dark"] #premorbid .pre-predict-table tbody td{ border-bottom-color:rgba(255,255,255,0.04) !important; color:#FDFDFD !important; }
  html[data-theme="dark"] #premorbid .pre-predict-table tbody tr:not(.group-row):hover td{ background-color:rgba(255,255,255,0.02) !important; background-image:none !important; }
  html[data-theme="dark"] #premorbid .pre-predict-table tbody td.model{ color:#FDFDFD !important; }
  html[data-theme="dark"] #premorbid .pre-predict-table tbody td.num{ color:#EFEFEF !important; }
  html[data-theme="dark"] #premorbid .pre-predict-table tbody td.num:not(:has(input)):not(:has(strong)){ color:#D0D1D2 !important; }
  html[data-theme="dark"] #premorbid .pre-predict-table tbody td.achieved-cell{ background-color:rgba(255,255,255,0.015); background-image:none; }
  html[data-theme="dark"] #premorbid .pre-predict-table tbody td.achieved-cell input[type="number"]{ border-color:rgba(255,255,255,0.12) !important; background-color:#4A4D51 !important; background-image:none !important; }
  html[data-theme="dark"] #premorbid .pre-predict-table tbody td.achieved-cell input[type="number"]:hover{ border-color:#D1D2D4 !important; }
  html[data-theme="dark"] #premorbid .pre-predict-table tbody td.achieved-cell input[type="number"]:focus{ border-color:#FDFDFD !important; box-shadow:0 0 0 2px rgba(253,253,253,0.1) !important; }
  html[data-theme="dark"] #premorbid .pre-predict-table tbody td.diff.neg{ color:#FFBEB9 !important; }
  html[data-theme="dark"] #premorbid .pre-predict-table tbody td.diff.pos{ color:#BCDAC1 !important; }
  html[data-theme="dark"] #premorbid .pre-predict-table .model-info-dot{ background-color:rgba(255,255,255,0.06) !important; background-image:none !important; color:#DBDCDD !important; }
  html[data-theme="dark"] #premorbid .pre-predict-table .model-info-dot:hover{ background-color:rgba(255,255,255,0.12) !important; background-image:none !important; color:#FDFDFD !important; }
  html[data-theme="dark"] #premorbid #pre-predict .info-box,
html[data-theme="dark"] #premorbid #pre-opiepredict .info-box{ background:linear-gradient(180deg, #4F5256, #52555A) !important; border-color:rgba(255,255,255,0.06) !important; border-left-color:#FDFDFD !important; color:#EFEFEF !important; }
  html[data-theme="dark"] #premorbid .model-info-dot{ background-color:rgba(255,255,255,0.06) !important; background-image:none !important; color:#DBDCDD !important; }
  html[data-theme="dark"] #premorbid .model-info-dot:hover{ background-color:rgba(255,255,255,0.12) !important; background-image:none !important; color:#FDFDFD !important; }
  html[data-theme="dark"] #premorbid .model-info-dot::before{ background-color:#4A4D51 !important; background-image:none !important; border-color:rgba(255,255,255,0.1) !important; box-shadow:var(--shadow-3) !important; color:#EFEFEF !important; }
  html[data-theme="dark"] #premorbid .model-info-dot::after{ border-color:#4A4D51 transparent transparent transparent !important; filter:drop-shadow(0 1px 0 rgba(0,0,0,0.2)); }
  html[data-theme="dark"] #premorbid .pre-tab-nav{ background-color:rgba(74,77,81,0.96); background-image:none; border-color:rgba(255,255,255,0.08); box-shadow:0 -8px 24px rgba(0,0,0,0.16), 0 -1px 0 rgba(0,0,0,0.08); }
  html[data-theme="dark"] #premorbid .pre-tab-nav::before{ background:linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 30%, rgba(255,255,255,0.18) 70%, transparent 100%); }
  html[data-theme="dark"] #premorbid .pre-nav-step{ color:#E5E6E6; }
  html[data-theme="dark"] #premorbid .pre-nav-back{ background-color:#4A4D51 !important; background-image:none !important; border-color:rgba(255,255,255,0.18) !important; color:#FDFDFD !important; box-shadow:var(--shadow-1) !important; }
  html[data-theme="dark"] #premorbid .pre-nav-back:hover{ background-color:#52555A !important; background-image:none !important; border-color:#F0F1F1 !important; box-shadow:var(--shadow-2) !important; }
  html[data-theme="dark"] #premorbid .pre-nav-next{ background:linear-gradient(180deg, #A8E1BB 0%, #AEDFBD 100%) !important; border-color:#B4DDC1 !important; color:#4A4D51 !important; box-shadow:0 1px 2px rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.56), inset 0 1px 0 rgba(0,0,0,0.36) !important; }
  html[data-theme="dark"] #premorbid .pre-nav-next:hover{ background:linear-gradient(180deg, #A6E2BA 0%, #ACE0BC 100%) !important; border-color:#B7DCC3 !important; box-shadow:0 2px 4px rgba(0,0,0,0.6), 0 8px 18px rgba(0,0,0,0.6), inset 0 1px 0 rgba(0,0,0,0.4) !important; }
  html[data-theme="dark"] #premorbid .pre-nav-next:active{ background:linear-gradient(180deg, #AEDFBD 0%, #B4DDC1 100%) !important; box-shadow:0 1px 2px rgba(0,0,0,0.6) inset !important; }
  html[data-theme="dark"] #premorbid .pre-nav-next:focus-visible{ outline-color:rgba(174,223,189,0.45); }
  html[data-theme="dark"] #premorbid .pre-nav-next[disabled]{ background:linear-gradient(180deg, #6B8275 0%, #96B4A3 100%) !important; border-color:#A6C6B3 !important; box-shadow:none !important; }
  html[data-theme="dark"] #premorbid .pre-nav-step{ color:#D1D2D4; }
  html[data-theme="dark"] #change-analysis .change-context-panel,
html[data-theme="dark"] #change-analysis .change-setup-grid > .panel,
html[data-theme="dark"] #change-analysis .autofill-panel{ background-color:#4A4D51 !important; background-image:none !important; border-color:rgba(255,255,255,0.06) !important; box-shadow:var(--shadow-1) !important; }
  html[data-theme="dark"] #change-analysis .change-context-panel .change-panel-title,
html[data-theme="dark"] #change-analysis .change-setup-grid .panel-kicker{ color:#DBDCDD !important; }
  html[data-theme="dark"] #change-analysis .change-settings-list label{ color:#E5E6E6 !important; }
  html[data-theme="dark"] #change-analysis h2,
html[data-theme="dark"] #change-analysis .change-section-heading,
html[data-theme="dark"] #change-analysis [class*="test-data-title"]{ color:#FDFDFD !important; border-bottom-color:rgba(255,255,255,0.06); }
  html[data-theme="dark"] #change-analysis .change-method-tab-overview{ border-right-color:rgba(255,255,255,0.1) !important; }
  html[data-theme="dark"] .change-overview-bubble{ background-color:#FFFFFF; background-image:none; color:#4A4D51; }
  html[data-theme="dark"] .change-method-overview-label{ color:#FFFFFF; }
  html[data-theme="dark"] #change-analysis .change-overview-intro{ color:#EFEFEF; }
  html[data-theme="dark"] #change-analysis .change-overview-card{ background-color:#4A4D51; background-image:none; border-color:rgba(255,255,255,0.06); box-shadow:var(--shadow-1); }
  html[data-theme="dark"] #change-analysis .change-overview-card:hover{ box-shadow:var(--shadow-2); border-color:rgba(255,255,255,0.14); }
  html[data-theme="dark"] #change-analysis .change-overview-card.is-pinned{ border-color:rgba(179,209,241,0.4); background-color:#4E5155; background-image:none; box-shadow:var(--shadow-2); }
  html[data-theme="dark"] #change-analysis .change-overview-card:focus-visible{ outline-color:var(--accent); }
  html[data-theme="dark"] #change-analysis .change-overview-card-recommended{ background:linear-gradient(180deg, #4F5256 0%, #4A4D51 35%); border-color:rgba(179,209,241,0.25); }
  html[data-theme="dark"] #change-analysis .change-overview-num{ color:#D0D1D2; }
  html[data-theme="dark"] #change-analysis .change-overview-level{ color:#DBDCDD; }
  html[data-theme="dark"] #change-analysis .change-overview-card h3{ color:#FDFDFD; }
  html[data-theme="dark"] #change-analysis .change-overview-cite{ color:#DBDCDD !important; }
  html[data-theme="dark"] #change-analysis .change-overview-card p:not(.change-overview-cite){ color:#EFEFEF; }
  html[data-theme="dark"] #change-analysis .change-overview-card strong{ color:#FDFDFD; }
  html[data-theme="dark"] #change-analysis .change-overview-badge{ background:linear-gradient(180deg, #F7F7F7, #FFFFFF); color:#4A4D51; }
  html[data-theme="dark"] #change-analysis .input-table th .change-date-head-input{ background-color:transparent !important; background-image:none !important; background-color:transparent !important; border-color:transparent !important; box-shadow:none !important; color:#E5E6E6 !important; }
  html[data-theme="dark"] #change-analysis .input-table th .change-date-head-input{ border-bottom-color:rgba(255,255,255,0.18) !important; }
  html[data-theme="dark"] #change-analysis .input-table th .change-date-head-input:hover{ background-color:rgba(74,77,81,0.6) !important; background-image:none !important; border-color:rgba(255,255,255,0.18) !important; }
  html[data-theme="dark"] #change-analysis .input-table th .change-date-head-input:focus{ background-color:#4A4D51 !important; background-image:none !important; border-color:#FDFDFD !important; box-shadow:0 0 0 2px rgba(253,253,253,0.08) !important; color:#FDFDFD !important; }
  html[data-theme="dark"] #change-analysis .change-overview-features{ border-top-color:rgba(255,255,255,0.06); }
  html[data-theme="dark"] #change-analysis .change-overview-features-label{ color:#D1D2D4; }
  html[data-theme="dark"] #change-analysis .change-overview-feature{ background-color:rgba(255,255,255,0.05); background-image:none; color:#EFEFEF; border-color:transparent; box-shadow:none; }
  html[data-theme="dark"] #change-analysis .change-overview-feature:hover{ background-color:rgba(255,255,255,0.09); background-image:none; color:#FDFDFD; }
  html[data-theme="dark"] #change-analysis .change-overview-feature.is-none{ background-color:transparent; background-image:none; border-color:rgba(255,255,255,0.18); color:#D1D2D4; }
  html[data-theme="dark"] #change-analysis .change-overview-feature.is-none:hover{ background-color:transparent; background-image:none; color:#D1D2D4; }
  html[data-theme="dark"] #change-analysis .change-overview-feature-strong{ background-color:rgba(179,209,241,0.1) !important; background-image:none !important; color:#B3D1F1 !important; border-color:rgba(179,209,241,0.2) !important; }
  html[data-theme="dark"] #change-analysis .change-overview-feature-strong:hover{ background-color:rgba(179,209,241,0.16) !important; background-image:none !important; color:#F2C5BA !important; }
  html[data-theme="dark"] #battery > .section-desc{ color:#DFE0E1 !important; background-color:transparent !important; background-image:none !important; }
  html[data-theme="dark"] #battery > .panel{ background-color:#4A4D51 !important; background-image:none !important; border-color:rgba(255,255,255,0.06) !important; box-shadow:var(--shadow-1) !important; }
  html[data-theme="dark"] #battery .bat-premorbid-panel{ background:linear-gradient(180deg, #4F5256, #52555A) !important; border-color:rgba(255,255,255,0.06) !important; }
  html[data-theme="dark"] #battery .bat-premorbid-help{ color:#DFE0E1 !important; }
  html[data-theme="dark"] #battery .autofill-panel{ background-color:#4A4D51 !important; background-image:none !important; }
  html[data-theme="dark"] #battery .autofill-row .field label{ color:#E5E6E6 !important; }
  html[data-theme="dark"] #battery .autofill-row .hint{ color:#D1D2D4 !important; }
  html[data-theme="dark"] #battery .panel:not(.bat-premorbid-panel) .field label,
html[data-theme="dark"] #battery .bat-premorbid-panel .field > label:first-child{ color:#E5E6E6 !important; }
  html[data-theme="dark"] #battery .field .hint{ color:#D1D2D4 !important; }
  html[data-theme="dark"] #battery .block-title,
html[data-theme="dark"] #battery h2.block-title{ color:#FDFDFD !important; }
  html[data-theme="dark"] .conv-full-label{ color:#DBDCDD; }
  html[data-theme="dark"] .conv-full-anchor{ background-color:rgba(255,255,255,0.06); background-image:none; border-color:rgba(255,255,255,0.1); }
  html[data-theme="dark"] .conv-full-anchor button{ background-color:transparent; background-image:none; color:#E5E6E6; }
  html[data-theme="dark"] .conv-full-anchor button:hover:not(.is-active){ color:#FDFDFD; }
  html[data-theme="dark"] .conv-full-anchor button.is-active{ background-color:#4A4D51; background-image:none; color:#FDFDFD; box-shadow:0 1px 2px rgba(0,0,0,0.16), 0 0 0 1px rgba(255,255,255,0.04); }
  html[data-theme="dark"] .conv-full-anchor button:focus-visible{ box-shadow:0 0 0 2px rgba(179,209,241,0.3); }
  html[data-theme="dark"] .conv-full-scroll{ border-color:rgba(255,255,255,0.1); background-color:#4A4D51; background-image:none; }
  html[data-theme="dark"] .conv-full-th{ background-color:#505358; background-image:none; color:#DBDCDD; border-bottom-color:rgba(255,255,255,0.12); }
  html[data-theme="dark"] .conv-full-th.is-anchor{ color:#B3D1F1; }
  html[data-theme="dark"] .conv-full-row td{ border-bottom-color:rgba(255,255,255,0.045); }
  html[data-theme="dark"] .conv-full-row:hover td.conv-full-cell{ background-color:rgba(255,255,255,0.03); background-image:none; }
  html[data-theme="dark"] .conv-full-cell{ color:#EFEFEF; }
  html[data-theme="dark"] .conv-full-cell.is-anchor{ color:#FDFDFD; background-color:rgba(255,255,255,0.02); background-image:none; }
  html[data-theme="dark"] .conv-full-row.is-current td.conv-full-cell{ background-color:#515559; background-image:none; border-top-color:rgba(179,209,241,0.3); border-bottom-color:rgba(179,209,241,0.3); }
  html[data-theme="dark"] .conv-full-row.is-current .conv-full-cell.is-anchor{ color:#B3D1F1; }
  html[data-theme="dark"] .conv-full-foot{ color:#E0E1E2; }
  html[data-theme="dark"] .conv-band{ color:#F0F1F1; background-color:#4D5054; background-image:none; border-left-color:rgba(255,255,255,0.06); border-bottom-color:rgba(255,255,255,0.12); }
  html[data-theme="dark"] .conv-band small{ color:#D1D2D3; }
  html[data-theme="dark"] .conv-band.is-current{ background-color:#515559; background-image:none; color:#E3CEA7; }
  html[data-theme="dark"] .conv-full-row.conv-band-end td.conv-full-cell{ border-bottom-color:rgba(255,255,255,0.12); }
  html[data-theme="dark"] .conv-edge{ color:#B3D1F1; }
  html[data-theme="dark"] .conv-hint{ color:#D6D7D8; }
  html[data-theme="dark"] .conv-result{ border-color:rgba(255,255,255,0.08); background-color:#4A4D51; background-image:none; }
  html[data-theme="dark"] .conv-r-cell{ border-right-color:rgba(255,255,255,0.06); }
  html[data-theme="dark"] .conv-r-label{ color:#D6D7D8; }
  html[data-theme="dark"] .conv-r-value{ color:#FDFDFD; }
  html[data-theme="dark"] .conv-r-cell.is-entered{ background-color:#55585C; background-image:none; box-shadow:inset 0 3px 0 rgba(0,0,0,0.6); }
  html[data-theme="dark"] .conv-r-cell.is-entered .conv-r-label{ color:#B3D1F1; }
  html[data-theme="dark"] .conv-r-class{ border-top-color:rgba(255,255,255,0.06); background-color:#4D5054; background-image:none; }
  html[data-theme="dark"] .conv-r-class b{ color:#FDFDFD; }
  html[data-theme="dark"] .conv-r-empty{ color:#D6D7D8; }
  html[data-theme="dark"] .conv-tabletitle{ color:#DBDCDD; }
  html[data-theme="dark"] .norms-toggle-pill{ background-color:rgba(255,255,255,0.06); background-image:none; border-color:rgba(255,255,255,0.1); box-shadow:inset 0 1px 2px rgba(0,0,0,0.08); }
  html[data-theme="dark"] .norms-pill-segment{ background-color:transparent; background-image:none; color:#DBDCDD; }
  html[data-theme="dark"] .norms-pill-segment:hover:not(.is-active){ color:#FDFDFD; }
  html[data-theme="dark"] .norms-pill-segment.is-active{ background-color:#4A4D51; background-image:none; color:#FDFDFD; box-shadow:0 1px 2px rgba(0,0,0,0.16), 0 0 0 1px rgba(255,255,255,0.04); }
  html[data-theme="dark"] .norms-pill-segment.is-active[data-state="locked"]{ background:linear-gradient(180deg, rgba(179,209,241,0.16), rgba(179,209,241,0.08)); color:#B3D1F1; box-shadow:0 1px 2px rgba(0,0,0,0.24), 0 0 0 1px rgba(179,209,241,0.1); }
  html[data-theme="dark"] .norms-lock-btn:hover{ background-color:#52555A; background-image:none; border-color:rgba(255,255,255,0.24); color:#FDFDFD; }
  html[data-theme="dark"] .norms-lock-btn[aria-pressed="true"]{ background-color:rgba(179,209,241,0.08); background-image:none; border-color:rgba(179,209,241,0.24); color:#B3D1F1; }
  html[data-theme="dark"] .norms-lock-btn[aria-pressed="true"]:hover{ background-color:rgba(179,209,241,0.14); background-image:none; border-color:rgba(179,209,241,0.34); }
  html[data-theme="dark"] .input-table.norms-locked [data-norm-cell="true"] input{ background-color:rgba(255,255,255,0.025) !important; background-image:none !important; }
  html[data-theme="dark"] #change-analysis .input-table thead th.row-actions,
html[data-theme="dark"] #change-analysis .input-table thead th:last-child:empty{ background-color:transparent !important; background-image:none !important; border-bottom-color:transparent !important; }
  html[data-theme="dark"] #battery .bat-side-panel{ background-color:#4A4D51; background-image:none; border-color:rgba(255,255,255,0.08); box-shadow:0 1px 2px rgba(0,0,0,0.06); }
  html[data-theme="dark"] #battery .bat-side-panel-head{ border-bottom-color:rgba(255,255,255,0.06); background:linear-gradient(180deg, #4F5256 0%, #4A4D51 100%); }
  html[data-theme="dark"] #battery .bat-side-panel-eyebrow{ color:#DBDCDD; }
  html[data-theme="dark"] #battery .bat-field-compact label{ color:#DBDCDD; }
  html[data-theme="dark"] #battery .bat-field-compact .hint{ color:#D1D2D4; }
  html[data-theme="dark"] #battery .bat-field-compact select,
html[data-theme="dark"] #battery .bat-field-compact input{ border-color:rgba(255,255,255,0.14); background-color:#4A4D51; background-image:none; }
  html[data-theme="dark"] #battery .bat-field-compact select:focus,
html[data-theme="dark"] #battery .bat-field-compact input:focus{ border-color:rgba(179,209,241,0.45); box-shadow:0 0 0 3px rgba(179,209,241,0.12); }
  html[data-theme="dark"] #battery .bat-premorbid-checkbox{ color:#FDFDFD; }
  html[data-theme="dark"] #battery .bat-premorbid-checkbox input[type="checkbox"]{ accent-color:var(--accent); }
  html[data-theme="dark"] #battery .bat-premorbid-block[data-enabled="true"]{ border-color:rgba(179,209,241,0.22); }
  html[data-theme="dark"] #battery .bat-premorbid-block[data-enabled="true"] .bat-side-panel-head{ background:linear-gradient(180deg, rgba(179,209,241,0.05) 0%, #4A4D51 100%); border-bottom-color:rgba(179,209,241,0.18); }
  html[data-theme="dark"] #battery .bat-side-panel-blurb{ color:#DBDCDD; }
  html[data-theme="dark"] #battery .bat-side-panel-blurb abbr{ border-bottom-color:rgba(255,255,255,0.28); }
  html[data-theme="dark"] #battery .bat-side-panel-blurb strong{ color:#E5E6E6; }
  html[data-theme="dark"] #battery .bat-side-panel-caption{ border-top-color:rgba(255,255,255,0.04); color:#D6D7D8; }
  html[data-theme="dark"] #battery .bat-side-panel-caption strong{ color:#E5E6E6; }
  html[data-theme="dark"] #battery .bat-table-block{ background-color:#4A4D51; background-image:none; border-color:rgba(255,255,255,0.08); box-shadow:0 1px 2px rgba(0,0,0,0.06); }
  html[data-theme="dark"] #battery .bat-table-head{ border-bottom-color:rgba(255,255,255,0.06); background:linear-gradient(180deg, #4F5256 0%, #4A4D51 100%); }
  html[data-theme="dark"] #battery .bat-autofill-combo .combo-list{ box-shadow:0 12px 28px rgba(0,0,0,0.28), 0 2px 6px rgba(0,0,0,0.16); }
  html[data-theme="dark"] #battery .bat-autofill-icon{ color:#D1D2D4; }
  html[data-theme="dark"] #battery .bat-autofill-input{ background-color:#4A4D51; background-image:none; border-color:rgba(255,255,255,0.14); color:#FDFDFD; }
  html[data-theme="dark"] #battery .bat-autofill-input::placeholder{ color:#D1D2D4; }
  html[data-theme="dark"] #battery .bat-autofill-input:focus{ border-color:var(--accent); box-shadow:0 0 0 3px rgba(179,209,241,0.12); }
  html[data-theme="dark"] .is-copied{ background-color:#AEDFC0 !important; background-image:none !important; border-color:#AEDFC0 !important; color:#4A4D51 !important; }
  html[data-theme="dark"] .is-copied svg{ stroke:#4A4D51 !important; }
  html[data-theme="dark"] .rb-root.is-open .rb-drawer{ border-color:rgba(255,255,255,0.1); background-color:#4A4D51; background-image:none; box-shadow:0 1px 1px rgba(0,0,0,0.08),
    0 8px 18px rgba(0,0,0,0.2),
    0 28px 60px rgba(0,0,0,0.36); }
  html[data-theme="dark"] .rb-head-btn{ background-color:transparent; background-image:none; border-color:transparent; color:#E5E6E6; }
  html[data-theme="dark"] .rb-mode-toggle{ background-color:rgba(255,255,255,0.05); background-image:none; border-color:rgba(255,255,255,0.06); }
  html[data-theme="dark"] .rb-mode-btn{ background-color:transparent; background-image:none; color:#DCDCDD; }
  html[data-theme="dark"] .rb-mode-btn:hover:not(.is-active){ color:#FFFFFF; }
  html[data-theme="dark"] .rb-mode-btn.is-active{ background-color:#4A4D51; background-image:none; color:#FFFFFF; box-shadow:0 1px 0 rgba(0,0,0,0.08),
    0 1px 3px rgba(0,0,0,0.16); }
  html[data-theme="dark"] .rb-head-btn:hover{ background-color:rgba(255,255,255,0.06); background-image:none; color:#FDFDFD; border-color:rgba(255,255,255,0.1); }
  html[data-theme="dark"] .rb-add-prompt{ background:linear-gradient(180deg, #A8E1BB 0%, #AEDFBD 100%); color:#4A4D51; border-color:#B4DDC1; box-shadow:0 1px 2px rgba(0,0,0,0.6),
    0 6px 18px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(0,0,0,0.36); }
  html[data-theme="dark"] .rb-add-prompt svg{ color:#4A4D51; }
  html[data-theme="dark"] .rb-add-prompt:hover{ background:linear-gradient(180deg, #A6E2BA 0%, #ACE0BC 100%); }
  html[data-theme="dark"] .rb-drawer-head{ background-color:#4A4D51; background-image:none; border-bottom-color:rgba(255,255,255,0.08); }
  html[data-theme="dark"] .rb-drawer-title{ color:#FFFFFF; }
  html[data-theme="dark"] .rb-drawer-title svg{ color:#DCDCDD; }
  html[data-theme="dark"] .rb-drawer-count{ background-color:rgba(255,255,255,0.05); background-image:none; color:#E8E8E9; }
  html[data-theme="dark"] .rb-drawer-body{ background-color:#4F5257; background-image:none; }
  html[data-theme="dark"] .rb-drawer-body::-webkit-scrollbar{ background-color:transparent; background-image:none; }
  html[data-theme="dark"] .rb-drawer-body::-webkit-scrollbar-track{ background-color:rgba(255,255,255,0.04); background-image:none; border-left-color:rgba(255,255,255,0.04); }
  html[data-theme="dark"] .rb-drawer-body::-webkit-scrollbar-thumb{ background-color:rgba(255,255,255,0.28); background-image:none; border-color:#4F5257; }
  html[data-theme="dark"] .rb-drawer-body::-webkit-scrollbar-thumb:hover{ background-color:rgba(255,255,255,0.42); background-image:none; }
  html[data-theme="dark"] .rb-drawer-body::-webkit-scrollbar-thumb:active{ background-color:rgba(255,255,255,0.52); background-image:none; }
  html[data-theme="dark"] .rb-drawer-body{ scrollbar-color:rgba(255,255,255,0.32) rgba(255,255,255,0.04); }
  html[data-theme="dark"] .rb-empty{ color:#D1D2D4; }
  html[data-theme="dark"] .rb-empty svg{ color:#999C9F; }
  html[data-theme="dark"] .rb-empty-title{ color:#E5E6E6; }
  html[data-theme="dark"] .rb-empty-sub{ color:#D1D2D4; }
  html[data-theme="dark"] .rb-empty-sub strong{ color:#E5E6E6; }
  html[data-theme="dark"] .rb-item{ background-color:#4A4D51; background-image:none; border-color:rgba(255,255,255,0.08); box-shadow:0 1px 2px rgba(0,0,0,0.08); }
  html[data-theme="dark"] .rb-item:hover{ border-color:rgba(255,255,255,0.16); box-shadow:0 4px 14px rgba(0,0,0,0.12); }
  html[data-theme="dark"] .rb-item.is-drop-before{ border-top-color:transparent; }
  html[data-theme="dark"] .rb-item.is-drop-before::before{ background-color:#B3D1F1; background-image:none; box-shadow:0 0 0 4px rgba(179,209,241,0.14); }
  html[data-theme="dark"] .rb-item.is-drop-after{ border-bottom-color:transparent; }
  html[data-theme="dark"] .rb-item.is-drop-after::after{ background-color:#B3D1F1; background-image:none; box-shadow:0 0 0 4px rgba(179,209,241,0.14); }
  html[data-theme="dark"] .rb-item-header{ background-color:#4A4D51; background-image:none; border-bottom-color:rgba(255,255,255,0.06); }
  html[data-theme="dark"] .rb-item-grip{ color:#DCDCDD; border-color:transparent; background-color:transparent; background-image:none; }
  html[data-theme="dark"] .rb-item:hover .rb-item-grip{ color:#E8E8E9; background-color:rgba(255,255,255,0.04); background-image:none; }
  html[data-theme="dark"] .rb-item-grip:hover,
html[data-theme="dark"] .rb-item-grip:focus-visible{ color:#FFFFFF; background-color:rgba(255,255,255,0.08); background-image:none; border-color:rgba(255,255,255,0.14); }
  html[data-theme="dark"] .rb-item-grip:focus-visible{ outline-color:rgba(255,255,255,0.3); }
  html[data-theme="dark"] .rb-item-num{ background-color:rgba(255,255,255,0.06); background-image:none; color:#E5E6E6; }
  html[data-theme="dark"] .rb-item-source{ color:#DBDCDD; }
  html[data-theme="dark"] .rb-item-time{ color:#D1D2D4; }
  html[data-theme="dark"] .rb-item-group .rb-item-header{ background:linear-gradient(180deg, rgba(179,209,241,0.05), rgba(179,209,241,0.02)); }
  html[data-theme="dark"] .rb-merge-badge{ background-color:rgba(179,209,241,0.12); background-image:none; color:#B3D1F1; }
  html[data-theme="dark"] .rb-member-label{ color:#F2F2F2; }
  html[data-theme="dark"] .rb-member-btn{ border-color:rgba(255,255,255,0.14); background-color:#4A4D51; background-image:none; color:#E0E1E2; }
  html[data-theme="dark"] .rb-member-btn:hover:not(:disabled){ background-color:rgba(179,209,241,0.08); background-image:none; color:#B3D1F1; border-color:rgba(179,209,241,0.3); }
  html[data-theme="dark"] .rb-member-btn-danger:hover:not(:disabled){ background-color:rgba(255,191,181,0.08); background-image:none; color:#FFBFB5; border-color:rgba(255,191,181,0.3); }
  html[data-theme="dark"] .rb-item-remove{ border-color:rgba(255,191,181,0.3); background-color:rgba(255,191,181,0.06); background-image:none; color:#FFBFB5; }
  html[data-theme="dark"] .rb-item-remove:hover{ background-color:#FFBFB5; background-image:none; color:#4A4D51; border-color:#FFBFB5; }
  html[data-theme="dark"] .rb-item-actionbtn{ background-color:#4A4D51; background-image:none; border-color:rgba(255,255,255,0.16); color:#EFEFEF; }
  html[data-theme="dark"] .rb-item-actionbtn svg{ color:#DBDCDD; }
  html[data-theme="dark"] .rb-item-actionbtn:hover{ background-color:rgba(255,255,255,0.04); background-image:none; color:#FDFDFD; border-color:rgba(255,255,255,0.3); }
  html[data-theme="dark"] .rb-item-actionbtn:hover svg{ color:#FDFDFD; }
  html[data-theme="dark"] .rb-item-options.is-open,
html[data-theme="dark"] .rb-item-options-wrap:has(.rb-item-menu.is-open) .rb-item-options{ background-color:rgba(255,255,255,0.08); background-image:none; color:#FDFDFD; border-color:rgba(255,255,255,0.36); }
  html[data-theme="dark"] .rb-item-menu{ background-color:#4A4D51; background-image:none; border-color:rgba(255,255,255,0.12); box-shadow:0 8px 24px rgba(0,0,0,0.28), 0 1px 2px rgba(0,0,0,0.12); }
  html[data-theme="dark"] .rb-item-menu-item{ background-color:transparent; background-image:none; color:#FDFDFD; }
  html[data-theme="dark"] .rb-item-menu-item svg{ color:#DBDCDD; }
  html[data-theme="dark"] .rb-item-menu-item:hover:not(:disabled){ background-color:rgba(255,255,255,0.05); background-image:none; }
  html[data-theme="dark"] .rb-item-menu-item:hover:not(:disabled) svg{ color:#FDFDFD; }
  html[data-theme="dark"] .rb-item-menu-sep{ background-color:rgba(255,255,255,0.07); background-image:none; }
  html[data-theme="dark"] .rb-item-menu-section{ color:#D1D2D4; }
  html[data-theme="dark"] .rb-col-check{ border-color:rgba(255,255,255,0.3); background-color:#4A4D51; background-image:none; }
  html[data-theme="dark"] .rb-col-check svg{ color:#4A4D51; }
  html[data-theme="dark"] .rb-col-check.is-checked{ background-color:var(--accent); background-image:none; border-color:var(--accent); }
  html[data-theme="dark"] .rb-item-menu-danger{ color:#FFBFB5; }
  html[data-theme="dark"] .rb-item-menu-danger svg{ color:#FFBFB5; }
  html[data-theme="dark"] .rb-item-menu-danger:hover{ background-color:rgba(255,191,181,0.08); background-image:none; color:#FFBFB5; }
  html[data-theme="dark"] .rb-item-menu-danger:hover svg{ color:#FFBFB5; }
  html[data-theme="dark"] .rb-editable-header:hover{ background-color:rgba(179,209,241,0.06); background-image:none; box-shadow:inset 0 -1px 0 rgba(0,0,0,0.6); }
  html[data-theme="dark"] .rb-editable-header:focus{ background-color:rgba(179,209,241,0.1); background-image:none; box-shadow:inset 0 0 0 1px rgba(179,209,241,0.5); }
  html[data-theme="dark"] .rb-drawer-actions{ background-color:#4A4D51; background-image:none; border-top-color:rgba(255,255,255,0.08); }
  html[data-theme="dark"] .rb-drawer-actions .btn-clear{ background-color:transparent !important; background-image:none !important; color:#DCDCDD !important; border-color:transparent !important; box-shadow:none !important; }
  html[data-theme="dark"] .rb-drawer-actions .btn-clear:hover:not(:disabled){ background-color:rgba(255,191,181,0.06) !important; background-image:none !important; color:#FFBFB5 !important; border-color:rgba(255,191,181,0.18) !important; }
  html[data-theme="dark"] .rb-action-copy,
html[data-theme="dark"] .rb-action-export-excel{ background-color:#4A4D51; background-image:none; color:#FFFFFF; border-color:rgba(255,255,255,0.14); box-shadow:0 1px 0 rgba(0,0,0,0.04); }
  html[data-theme="dark"] .rb-action-copy:hover:not(:disabled),
html[data-theme="dark"] .rb-action-export-excel:hover:not(:disabled){ background-color:#4E5155; background-image:none; border-color:rgba(255,255,255,0.26); color:#FFFFFF; }
  html[data-theme="dark"] .rb-action-copy svg,
html[data-theme="dark"] .rb-action-export-excel svg{ color:#E8E8E9; }
  html[data-theme="dark"] .rb-action-export{ background-color:#FFFFFF; background-image:none; color:#4A4D51; border-color:#FFFFFF; box-shadow:inset 0 1px 0 rgba(0,0,0,0.2),
    0 1px 2px rgba(0,0,0,0.4),
    0 4px 10px rgba(0,0,0,0.28); }
  html[data-theme="dark"] .rb-action-export:hover:not(:disabled){ background-color:#FBFBFB; background-image:none; box-shadow:inset 0 1px 0 rgba(0,0,0,0.24),
    0 2px 4px rgba(0,0,0,0.44),
    0 8px 18px rgba(0,0,0,0.36); }
  html[data-theme="dark"] .rb-action-export svg{ color:#4A4D51; }
  html[data-theme="dark"] .rb-offer-box{ border-color:rgba(179,209,241,0.3); border-left-color:#B3D1F1; background-color:#4A4D51; background-image:none; box-shadow:0 1px 2px rgba(0,0,0,0.12),
    0 10px 30px rgba(0,0,0,0.32); }
  html[data-theme="dark"] .rb-offer-text strong{ color:#B3D1F1; }
  html[data-theme="dark"] .rb-offer-text span{ color:var(--ink-2); }
  html[data-theme="dark"] .rb-offer-add{ background-color:#B3D1F1; background-image:none; border-color:#B3D1F1; color:#4A4D51; }
  html[data-theme="dark"] .rb-offer-add:hover{ background-color:#B3D1F1; background-image:none; border-color:#B3D1F1; }
  html[data-theme="dark"] .rb-offer-skip{ background-color:transparent; background-image:none; border-color:rgba(255,255,255,0.18); color:var(--ink-2); }
  html[data-theme="dark"] .rb-offer-skip:hover{ border-color:rgba(255,255,255,0.34); color:#FFFFFF; }
  html[data-theme="dark"] .topbar-kofi{ background-color:transparent; background-image:none; color:#E5E6E6; border-color:transparent; }
  html[data-theme="dark"] .topbar-kofi svg{ color:currentColor; }
  html[data-theme="dark"] .topbar-kofi:hover{ color:#B3D1F1; background-color:rgba(179,209,241,0.05); background-image:none; border-color:rgba(179,209,241,0.18); }
  html[data-theme="dark"] .topbar-kofi:focus-visible{ outline-color:rgba(179,209,241,0.4); }
  html[data-theme="dark"] .rb-kofi-toast{ background-color:#4A4D51; background-image:none; border-color:rgba(255,255,255,0.08); box-shadow:0 1px 1px rgba(0,0,0,0.08),
    0 6px 16px rgba(0,0,0,0.2),
    0 22px 44px rgba(0,0,0,0.28); }
  html[data-theme="dark"] .rb-kofi-toast-close{ background-color:transparent; background-image:none; color:#CED0D1; }
  html[data-theme="dark"] .rb-kofi-toast-close:hover{ background-color:rgba(255,255,255,0.06); background-image:none; color:#FFFFFF; }
  html[data-theme="dark"] .rb-kofi-toast-close:focus-visible{ outline-color:rgba(255,190,184,0.4); }
  html[data-theme="dark"] .rb-kofi-toast-icon{ background-color:#FFBEB8; background-image:none; box-shadow:inset 0 -1px 0 rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(0,0,0,0.36),
    0 2px 6px rgba(0,0,0,0.6); }
  html[data-theme="dark"] .rb-kofi-toast-title{ color:#FFFFFF; }
  html[data-theme="dark"] .rb-kofi-toast-sub{ color:#E3E4E5; }
  html[data-theme="dark"] .rb-kofi-toast-cta{ background-color:#FFBEB8; background-image:none; color:#4A4D51; box-shadow:inset 0 1px 0 rgba(0,0,0,0.4),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 2px 4px rgba(0,0,0,0.44),
    0 6px 14px rgba(0,0,0,0.36); }
  html[data-theme="dark"] .rb-kofi-toast-cta-cup{ color:#4A4D51; }
  html[data-theme="dark"] .rb-kofi-toast-cta:hover{ background-color:#FFBEB8; background-image:none; box-shadow:inset 0 1px 0 rgba(0,0,0,0.44),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 4px 8px rgba(0,0,0,0.52),
    0 10px 22px rgba(0,0,0,0.48); }
  html[data-theme="dark"] .rb-kofi-toast-cta:active{ background-color:#FFBFB7; background-image:none; }
  html[data-theme="dark"] .rb-kofi-toast-cta:focus-visible{ outline-color:rgba(255,190,184,0.55); }
  html[data-theme="dark"] .rb-kofi-toast-credit{ color:#CED0D1; }
  html[data-theme="dark"] #change-analysis .change-overview-h{ color:#FDFDFD; }
  html[data-theme="dark"] #change-analysis .change-overview-sub{ color:#EFEFEF; }
  html[data-theme="dark"] #change-analysis .change-overview-card{ background-color:#4A4D51 !important; background-image:none !important; border-color:rgba(255,255,255,0.08) !important; box-shadow:0 1px 2px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.08) !important; }
  html[data-theme="dark"] #change-analysis .change-overview-card:hover{ border-color:rgba(255,255,255,0.16) !important; box-shadow:0 2px 6px rgba(0,0,0,0.12), 0 12px 30px rgba(0,0,0,0.14) !important; }
  html[data-theme="dark"] #change-analysis .change-overview-card-head .change-overview-num{ color:#B3D1F1; }
  html[data-theme="dark"] #change-analysis .change-overview-card-head .change-overview-level{ color:#DBDCDD; }
  html[data-theme="dark"] #change-analysis .change-overview-card .change-overview-title{ color:#FDFDFD !important; }
  html[data-theme="dark"] #change-analysis .change-overview-card .change-overview-tag{ color:#EFEFEF; }
  html[data-theme="dark"] #change-analysis .change-overview-card .change-overview-cite{ color:#DBDCDD !important; }
  html[data-theme="dark"] #change-analysis .change-overview-indicator.is-on{ color:#FDFDFD; }
  html[data-theme="dark"] #change-analysis .change-overview-indicator.is-on .change-overview-dot{ background-color:#BADCBA; background-image:none; box-shadow:0 0 0 2px rgba(186,220,186,0.16); }
  html[data-theme="dark"] #change-analysis .change-overview-indicator.is-off{ color:#C3C4C6; }
  html[data-theme="dark"] #change-analysis .change-overview-indicator.is-off .change-overview-dot{ background-color:transparent; background-image:none; border-color:#75787C; }
  html[data-theme="dark"] #change-analysis .change-overview-cta{ color:#B3D1F1; background-color:#4A4D51; background-image:none; border-color:rgba(179,209,241,0.3); }
  html[data-theme="dark"] #change-analysis .change-overview-cta:hover{ background-color:#B3D1F1; background-image:none; color:#4A4D51; border-color:#B3D1F1; box-shadow:0 4px 10px rgba(0,0,0,0.4); }
  html[data-theme="dark"] #change-analysis .change-overview-card.is-pinned{ background-color:#4A4D51 !important; background-image:none !important; border-color:rgba(255,255,255,0.08) !important; }
  html[data-theme="dark"] #change-analysis .change-method-tabs{ box-shadow:0 1px 2px rgba(0,0,0,0.08) !important; background-color:#4A4D51 !important; background-image:none !important; border-color:rgba(255,255,255,0.08) !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab:not(.active){ background-color:#4A4D51 !important; background-image:none !important; box-shadow:inset 0 -1px 0 rgba(0,0,0,0.16) !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab.active{ background-color:#575A5F !important; background-image:none !important; }
  html[data-theme="dark"] #change-analysis .change-method-tab.active::after{ background-color:#FFFFFF !important; background-image:none !important; }
  html[data-theme="dark"] #change-analysis .change-method-panel.active{ background-color:#4D5054 !important; background-image:none !important; border-color:rgba(255,255,255,0.08) !important; box-shadow:0 6px 18px rgba(0,0,0,0.1) !important; }
  html[data-theme="dark"] #premorbid .pre-forest-plot-wrap{ background-color:transparent !important; background-image:none !important; box-shadow:none !important; }
  html[data-theme="dark"] #premorbid .pre-forest-plot-label{ color:#FDFDFD; }
  html[data-theme="dark"] #premorbid .pre-forest-plot-foot{ color:#ECECED; }
  html[data-theme="dark"] #change-analysis .change-overview-table{ background-color:#4A4D51; background-image:none; border-color:rgba(255,255,255,0.08); }
  html[data-theme="dark"] #change-analysis .change-overview-table thead th{ color:#DBDCDD; background-color:rgba(255,255,255,0.025); background-image:none; border-bottom-color:rgba(255,255,255,0.08); }
  html[data-theme="dark"] #change-analysis .change-overview-colh-label{ text-decoration-color:rgba(255,255,255,0.28); }
  html[data-theme="dark"] #change-analysis .change-overview-colh-label:hover,
html[data-theme="dark"] #change-analysis .change-overview-colh-label:focus-visible{ color:#B3D1F1; text-decoration-color:rgba(179,209,241,0.55); }
  html[data-theme="dark"] #change-analysis .change-overview-colh-label::before{ background-color:rgba(255,255,255,0.96); background-image:none; color:#4A4D51; border-color:rgba(255,255,255,0.96); box-shadow:0 12px 28px rgba(0,0,0,0.44); }
  html[data-theme="dark"] #change-analysis .change-overview-colh-label::after{ border-color:transparent transparent rgba(255,255,255,0.96) transparent; }
  html[data-theme="dark"] #change-analysis .change-overview-row:hover,
html[data-theme="dark"] #change-analysis .change-overview-row:focus-visible{ background-color:#515559; background-image:none; }
  html[data-theme="dark"] #change-analysis .change-overview-row:focus-visible{ box-shadow:inset 3px 0 0 rgba(0,0,0,0.6); }
  html[data-theme="dark"] #change-analysis .change-overview-row + .change-overview-row > td{ border-top-color:rgba(255,255,255,0.05); }
  html[data-theme="dark"] #change-analysis .change-overview-table-title{ color:#FDFDFD; }
  html[data-theme="dark"] #change-analysis .change-overview-table-cite{ color:#DBDCDD; }
  html[data-theme="dark"] #change-analysis .change-overview-table-dot-cell .change-overview-tick{ color:#BADCBA; }
  html[data-theme="dark"] #change-analysis .change-overview-table-dot-cell .change-overview-dot.is-off{ background-color:transparent; background-image:none; border-color:rgba(255,255,255,0.16); }
  html[data-theme="dark"] #change-analysis .change-overview-info{ background-color:rgba(255,255,255,0.08); background-image:none; color:#DFE0E1; }
  html[data-theme="dark"] #change-analysis .change-overview-info:hover,
html[data-theme="dark"] #change-analysis .change-overview-info:focus-visible{ background-color:#B3D1F1; background-image:none; color:#4A4D51; }
  html[data-theme="dark"] #change-analysis .change-overview-info::before{ background-color:#4A4D51; background-image:none; border-color:rgba(179,209,241,0.24); color:#FDFDFD; box-shadow:0 10px 24px rgba(0,0,0,0.28); }
  html[data-theme="dark"] #change-analysis .change-overview-info::after{ border-color:#4A4D51 transparent transparent transparent; }
  html[data-theme="dark"] #change-analysis .change-overview-table-arrow{ color:#B3D1F1; }
  html[data-theme="dark"] #battery #bat-table thead th{ color:#F0F1F1 !important; background-color:rgba(255,255,255,0.035) !important; background-image:none !important; border-bottom-color:rgba(255,255,255,0.18) !important; }
  html[data-theme="dark"] #battery #bat-table tbody td{ border-bottom-color:rgba(255,255,255,0.06) !important; }
  html[data-theme="dark"] #battery #bat-table tbody tr:hover td{ background-color:rgba(255,255,255,0.02) !important; background-image:none !important; }
  html[data-theme="dark"] #battery .bat-row-type-tag,
html[data-theme="dark"] #sdi .bat-row-type-tag{ background-color:rgba(255,255,255,0.07); background-image:none; color:#E5E6E6; }
  html[data-theme="dark"] #battery #bat-table .row-actions button{ background-color:transparent; background-image:none; border-color:transparent; color:#D1D2D4; }
  html[data-theme="dark"] #battery #bat-table .row-actions button:hover{ background-color:rgba(179,209,241,0.1); background-image:none; color:#B3D1F1; border-color:rgba(179,209,241,0.2); }
  html[data-theme="dark"] #battery .add-row-actions{ border-top-color:rgba(255,255,255,0.06) !important; }
  html[data-theme="dark"] #battery .add-row-actions .btn-clear{ color:#D1D2D4 !important; background-color:transparent !important; background-image:none !important; border-color:rgba(255,255,255,0.1) !important; }
  html[data-theme="dark"] #battery .add-row-actions .btn-clear:hover{ color:#B3D1F1 !important; border-color:rgba(179,209,241,0.3) !important; background-color:rgba(179,209,241,0.04) !important; background-image:none !important; }
  html[data-theme="dark"] .bat-empty-msg{ color:#D1D2D4; background-color:rgba(255,255,255,0.015); background-image:none; border-bottom-color:rgba(255,255,255,0.06); }
  html[data-theme="dark"] .uk-caution-red{ color:#FFBFB5; }
  html[data-theme="dark"] .bat-score-na-cell{ background-color:rgba(255,255,255,0.03); background-image:none; }
  html[data-theme="dark"] .bat-score-na{ background-color:rgba(255,255,255,0.05) !important; background-image:none !important; border-color:rgba(255,255,255,0.08) !important; }
  html[data-theme="dark"] .bat-age-hint{ color:var(--faint); }
  html[data-theme="dark"] .bat-age-required-bar{ background-color:rgba(251,193,182,0.06); background-image:none; border-color:rgba(251,193,182,0.28); border-left-color:var(--warn); }
  html[data-theme="dark"] .bat-age-bar-title{ color:var(--warn); }
  html[data-theme="dark"] .bat-age-bar-body{ color:var(--ink-2); }
  html[data-theme="dark"] .bat-age-bar-input{ border-color:rgba(255,255,255,0.25); background-color:#4A4D51; background-image:none; }
  html[data-theme="dark"] .bat-age-bar-add{ color:#4A4D51; background-color:var(--warn); background-image:none; }
  html[data-theme="dark"] #validity > .section-desc{ color:var(--ds-text-muted) !important; }
  html[data-theme="dark"] .pvt-panel,
html[data-theme="dark"] .pvt-card,
html[data-theme="dark"] .pvt-verdict,
html[data-theme="dark"] .pvt-explain,
html[data-theme="dark"] .pvt-tile{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border); }
  html[data-theme="dark"] .pvt-panel-title{ color:var(--ds-text); }
  html[data-theme="dark"] .pvt-card-kicker{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .pvt-flag{ border-color:var(--ds-border-strong); background-color:var(--ds-surface); background-image:none; color:var(--ds-text-subtle); }
  html[data-theme="dark"] .pvt-flag.is-pass{ color:var(--ds-success); border-color:rgba(174,223,188,0.35); background-color:var(--ds-success-tint); background-image:none; }
  html[data-theme="dark"] .pvt-flag.is-fail{ color:var(--pw-fail); border-color:rgba(255,190,185,0.35); background-color:var(--pw-fail-tint); background-image:none; }
  html[data-theme="dark"] .pvt-flag.is-na,
html[data-theme="dark"] .pvt-flag.is-flag{ color:#E7CDA5; border-color:rgba(241,201,156,0.35); background-color:var(--ds-warning-tint); background-image:none; }
  html[data-theme="dark"] .pvt-ring-seg{ fill:none; stroke:rgba(255,255,255,0.1); }
  html[data-theme="dark"] .pvt-ring-seg.is-fail{ stroke:var(--pw-fail); }
  html[data-theme="dark"] .pvt-ring-seg.is-pass{ stroke:var(--ds-success); }
  html[data-theme="dark"] .pvt-ring-seg.is-flag{ stroke:var(--ds-warning); }
  html[data-theme="dark"] .pvt-ring-seg.is-gated{ stroke:rgba(241,201,156,0.45); }
  html[data-theme="dark"] .pvt-ring-num{ color:var(--ds-text); }
  html[data-theme="dark"] .pvt-verdict.is-idle .pvt-ring-num{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .pvt-ring-of{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .pvt-ring-cap{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .pvt-verdict-head{ color:var(--ds-text); }
  html[data-theme="dark"] .pvt-verdict-btn{ border-color:var(--ds-border-strong); background-color:var(--ds-surface); background-image:none; color:var(--ds-text-muted); }
  html[data-theme="dark"] .pvt-verdict-btn:hover{ background-color:var(--ds-surface-emphasis); background-image:none; color:var(--ds-text); }
  html[data-theme="dark"] .pvt-verdict-btn.active{ border-color:var(--ds-text); color:var(--ds-text); }
  html[data-theme="dark"] .pvt-verdict-btn:focus-visible{ box-shadow:0 0 0 2px var(--ds-primary-ring); }
  html[data-theme="dark"] .pvt-verdict-rule,
html[data-theme="dark"] .pvt-verdict-body{ color:var(--ds-text-muted); }
  html[data-theme="dark"] .pvt-verdict-rule{ color:var(--ds-text); }
  html[data-theme="dark"] .pvt-verdict-figs{ color:var(--ds-text-muted); }
  html[data-theme="dark"] .pvt-verdict-more{ color:var(--ds-text-muted); }
  html[data-theme="dark"] .pvt-verdict-more summary,
html[data-theme="dark"] .pvt-verdict-figs summary{ color:var(--ds-text); text-decoration-color:var(--ds-border-strong); }
  html[data-theme="dark"] .pvt-verdict-figs summary{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .pvt-verdict-figs summary::after{ color:var(--ds-text); text-decoration-color:var(--ds-border-strong); }
  html[data-theme="dark"] .pvt-verdict-more summary:focus-visible,
html[data-theme="dark"] .pvt-verdict-figs summary:focus-visible{ box-shadow:0 0 0 2px var(--ds-primary-ring); }
  html[data-theme="dark"] .pvt-verdict-figs-table th{ color:var(--ds-text-subtle); border-bottom-color:var(--ds-border); }
  html[data-theme="dark"] .pvt-verdict-figs-table td{ color:var(--ds-text-muted); border-bottom-color:var(--ds-border-subtle); }
  html[data-theme="dark"] .pvt-verdict-figs-table tr.is-applied td{ color:var(--ds-text); }
  html[data-theme="dark"] .pvt-board-note{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .pvt-tile{ outline-color:transparent; }
  html[data-theme="dark"] .pvt-tile:hover{ border-color:var(--ds-border-strong); }
  html[data-theme="dark"] .pvt-tile.is-open{ border-color:var(--ds-text-subtle); outline-color:rgba(255,255,255,0.06); }
  html[data-theme="dark"] .pvt-tile-name{ color:var(--ds-text); }
  html[data-theme="dark"] .pvt-tile-member{ background-color:transparent; background-image:none; color:inherit; }
  html[data-theme="dark"] .pvt-tile-member:hover{ background-color:var(--ds-surface-subtle); background-image:none; }
  html[data-theme="dark"] .pvt-tile-member.active{ background-color:var(--ds-surface-emphasis); background-image:none; }
  html[data-theme="dark"] .pvt-tile-member:focus-visible{ box-shadow:inset 0 0 0 2px var(--ds-primary-ring); }
  html[data-theme="dark"] .pvt-tl-label{ color:var(--ds-text-muted); }
  html[data-theme="dark"] .pvt-tl-value{ color:var(--ds-text); }
  html[data-theme="dark"] .pvt-tl-cut{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .pvt-tl-state{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .pvt-tl-state.is-fail{ color:var(--pw-fail); }
  html[data-theme="dark"] .pvt-tl-state.is-pass{ color:var(--ds-success); }
  html[data-theme="dark"] .pvt-tl-state.is-flag{ color:#E7CDA5; }
  html[data-theme="dark"] .pvt-tl-acc{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .pvt-tl-head{ color:var(--ds-text); }
  html[data-theme="dark"] .pvt-tl-prompt{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .pvt-tile-member.is-invalid .pvt-tl-prompt{ color:var(--pw-fail); }
  html[data-theme="dark"] .pvt-tile-member.is-partial .pvt-tl-prompt{ color:#E7CDA5; }
  html[data-theme="dark"] .pvt-tl-note{ color:#E7CDA5; }
  html[data-theme="dark"] .pvt-cutbar::before{ background-color:rgba(255,255,255,0.06); background-image:none; }
  html[data-theme="dark"] .pvt-cutbar-zone{ background-color:rgba(255,255,255,0.16); background-image:none; }
  html[data-theme="dark"] .pvt-cutbar-dot{ border-color:var(--ds-surface); background-color:var(--ds-success); background-image:none; box-shadow:0 0 0 1px rgba(255,255,255,0.1); }
  html[data-theme="dark"] .pvt-cutbar-dot.is-fail{ background-color:var(--pw-fail); background-image:none; }
  html[data-theme="dark"] .pvt-cutbar-dot.is-flag{ background-color:var(--ds-warning); background-image:none; }
  html[data-theme="dark"] .pvt-tcell{ border-color:var(--ds-border-subtle); background-color:var(--ds-surface-subtle); background-image:none; color:var(--ds-text); }
  html[data-theme="dark"] .pvt-tcell small{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .pvt-tcell.is-blank{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .pvt-tcell.is-fail{ background-color:var(--pw-fail-tint); background-image:none; border-color:rgba(255,190,185,0.28); color:var(--pw-fail); }
  html[data-theme="dark"] .pvt-unscored-label{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .pvt-unscored-btn{ border-color:var(--ds-border-strong); background-color:transparent; background-image:none; color:var(--ds-text-muted); }
  html[data-theme="dark"] .pvt-unscored-btn:hover{ background-color:var(--ds-surface); background-image:none; color:var(--ds-text); }
  html[data-theme="dark"] .pvt-unscored-btn.active{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-text-subtle); color:var(--ds-text); }
  html[data-theme="dark"] .pvt-unscored-btn:focus-visible{ box-shadow:0 0 0 2px var(--ds-primary-ring); }
  html[data-theme="dark"] .pvt-unscored-plus{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .pvt-side{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border); box-shadow:var(--ds-shadow-1); }
  html[data-theme="dark"] .pvt-side-head{ border-bottom-color:var(--ds-border); }
  html[data-theme="dark"] .pvt-side-title{ color:var(--ds-text); }
  html[data-theme="dark"] .pvt-side-sub{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .pvt-side-close{ border-color:var(--ds-border); background-color:var(--ds-surface); background-image:none; color:var(--ds-text-muted); }
  html[data-theme="dark"] .pvt-side-close:hover{ background-color:var(--ds-surface-emphasis); background-image:none; color:var(--ds-text); }
  html[data-theme="dark"] .pvt-side-close:focus-visible{ box-shadow:0 0 0 2px var(--ds-primary-ring); }
  html[data-theme="dark"] .pvt-side-switch{ border-color:var(--ds-border-strong); background-color:var(--ds-surface); background-image:none; }
  html[data-theme="dark"] .pvt-side-switch-btn{ border-left-color:var(--ds-border); background-color:transparent; background-image:none; color:var(--ds-text-muted); }
  html[data-theme="dark"] .pvt-side-switch-btn:hover{ background-color:var(--ds-surface-emphasis); background-image:none; }
  html[data-theme="dark"] .pvt-side-switch-btn.active{ background-color:var(--ds-text); background-image:none; color:#4A4D51; }
  html[data-theme="dark"] .pvt-side-switch-btn:focus-visible{ box-shadow:inset 0 0 0 2px var(--ds-primary-ring); }
  html[data-theme="dark"] .pvt-side-body .pvt-card,
html[data-theme="dark"] .pvt-side-body .pvt-explain,
html[data-theme="dark"] .pvt-side-body .pvt-panel{ background-color:transparent; background-image:none; }
  html[data-theme="dark"] .pvt-agg-copy{ color:var(--ds-text-muted); }
  html[data-theme="dark"] .pvt-agg-frame{ border-color:var(--ds-border); background-color:var(--ds-surface-subtle); background-image:none; }
  html[data-theme="dark"] .pvt-card .field label{ color:var(--ds-text-subtle) !important; }
  html[data-theme="dark"] .pvt-result-inner,
html[data-theme="dark"] .pvt-readout{ border-color:var(--ds-border); background-color:var(--ds-surface); background-image:none; }
  html[data-theme="dark"] .pvt-result-inner.is-empty .pvt-result-headline{ color:var(--ds-text); }
  html[data-theme="dark"] .pvt-result-headline{ color:var(--ds-text-muted); }
  html[data-theme="dark"] .pvt-result-detail{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .pvt-readout-head{ border-bottom-color:var(--ds-border-subtle); color:var(--ds-text-subtle); }
  html[data-theme="dark"] .pvt-readout-head strong{ color:var(--ds-text); }
  html[data-theme="dark"] .pvt-index{ border-bottom-color:var(--ds-border-subtle); }
  html[data-theme="dark"] .pvt-index-label{ color:var(--ds-text); }
  html[data-theme="dark"] .pvt-index-value{ color:var(--ds-text); }
  html[data-theme="dark"] .pvt-index-value.is-none{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .pvt-index-meta{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .pvt-readout-note{ border-top-color:var(--ds-border-subtle); color:var(--ds-text-subtle); }
  html[data-theme="dark"] .pvt-table th{ color:var(--ds-text-subtle); border-bottom-color:var(--ds-border-strong); }
  html[data-theme="dark"] .pvt-table td{ border-bottom-color:var(--ds-border-subtle); color:var(--ds-text); }
  html[data-theme="dark"] .pvt-cell-fail{ color:var(--pw-fail) !important; }
  html[data-theme="dark"] .pvt-table tr.pvt-row-selected td{ background-color:var(--ds-primary-tint); background-image:none; }
  html[data-theme="dark"] .pvt-row-selected-tag{ color:var(--ds-primary); }
  html[data-theme="dark"] .pvt-table tr.pvt-group-row td{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .pvt-group-note{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .pvt-caution{ border-color:var(--ds-border); border-left-color:var(--ds-border-strong); background-color:var(--ds-surface); background-image:none; color:var(--ds-text-muted); }
  html[data-theme="dark"] .pvt-caution summary{ color:var(--ds-text-muted); }
  html[data-theme="dark"] .pvt-caution summary::after{ color:var(--ds-primary); }
  html[data-theme="dark"] .pvt-caution summary strong{ color:var(--ds-text); }
  html[data-theme="dark"] .pvt-caution.is-flagged{ border-color:rgba(241,201,156,0.4); border-left-color:var(--ds-warning); background-color:var(--ds-warning-tint); background-image:none; }
  html[data-theme="dark"] .pvt-caution.is-flagged summary strong{ color:#E7CDA5; }
  html[data-theme="dark"] .pvt-source{ background-color:var(--ds-surface-subtle); background-image:none; border-color:var(--ds-border-subtle); color:var(--ds-text-subtle); }
  html[data-theme="dark"] .pvt-source-accuracy{ color:var(--ds-text-muted); }
  html[data-theme="dark"] .pvt-derived{ border-top-color:var(--ds-border-subtle); color:var(--ds-text-muted); }
  html[data-theme="dark"] .pvt-derived-label{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .pvt-derived-gap{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .pvt-derived-warn{ border-left-color:rgba(255,190,185,0.35); color:#FFDCD4; }
  html[data-theme="dark"] .pvt-papers{ color:var(--ds-text-muted); }
  html[data-theme="dark"] .pvt-paper-link{ color:var(--accent); }
  html[data-theme="dark"] .pvt-paper-link::after{ color:var(--ds-primary); }
  html[data-theme="dark"] .pvt-paper-nolink{ color:var(--ds-text-muted); }
  html[data-theme="dark"] .pvt-paper-sep{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .pvt-ref-doi{ color:var(--accent); }
  html[data-theme="dark"] .rey-admin-hint{ color:#DBDCDD; }
  html[data-theme="dark"] .rey-admin{ background-color:#4A4D51; background-image:none; }
  html[data-theme="dark"] .rey-close{ border-color:rgba(255,255,255,0.12); background-color:#4A4D51; background-image:none; color:var(--muted); }
  html[data-theme="dark"] .rey-close:hover{ color:var(--ink); border-color:rgba(255,255,255,0.28); }
  html[data-theme="dark"] .rey-kicker{ color:#DBDCDD; }
  html[data-theme="dark"] .rey-title{ color:var(--ink); }
  html[data-theme="dark"] .rey-copy{ color:var(--muted); }
  html[data-theme="dark"] .rey-script{ border-left-color:rgba(179,209,241,0.35); background-color:rgba(83,86,90,0.6); background-image:none; color:#EBECEC; }
  html[data-theme="dark"] .rey-cell{ color:#FFFFFF; }
  html[data-theme="dark"] .rey-pick{ border-color:transparent; background-color:transparent; background-image:none; }
  html[data-theme="dark"] .rey-pick:hover{ border-color:rgba(255,255,255,0.14); }
  html[data-theme="dark"] .rey-pick:focus-visible{ border-color:rgba(179,209,241,0.5); }
  html[data-theme="dark"] .rey-pick.is-picked{ border-color:#B3D1F1; background-color:rgba(179,209,241,0.07); background-image:none; }
  html[data-theme="dark"] .rey-picked{ color:var(--muted); }
  html[data-theme="dark"] .rey-countdown{ color:var(--muted); border-color:rgba(255,255,255,0.12); }
  html[data-theme="dark"] .table-viewport{ border-color:var(--border-soft); background-color:var(--paper-card); background-image:none; }
  html[data-theme="dark"] .table-viewport .input-table{ box-shadow:none !important; }
  html[data-theme="dark"] .table-viewport thead tr{ background-color:var(--paper-card); background-image:none; }
  html[data-theme="dark"] #battery .bat-table-block > .bat-age-required-bar{ border-bottom-color:rgba(251,193,182,0.28); border-left-color:var(--warn); }
  html[data-theme="dark"] .table-viewport thead tr:last-child th{ box-shadow:inset 0 -1px 0 var(--border-soft); }
  html[data-theme="dark"] .leave-card-backdrop{ background-color:rgba(0,0,0,0.532); background-image:none; }
  html[data-theme="dark"] .leave-card{ background-color:#4A4D51; background-image:none; color:var(--ink); border-color:var(--border); box-shadow:0 18px 48px rgba(0,0,0,0.44); }
  html[data-theme="dark"] .leave-card-body{ color:var(--ink); }
  html[data-theme="dark"] .leave-card-btn{ background-color:#4A4D51; background-image:none; color:var(--ink); border-color:var(--border); }
  html[data-theme="dark"] .leave-card-btn:hover{ background-color:#505458; background-image:none; }
  html[data-theme="dark"] .leave-card-btn.is-primary{ background-color:#FDFDFD; background-image:none; color:#4A4D51; border-color:#FDFDFD; }
  html[data-theme="dark"] .leave-card-btn.is-primary:hover{ background-color:#F3F3F4; background-image:none; }
  html[data-theme="dark"] .leave-card-btn.is-quiet{ border-color:transparent; color:var(--muted); }
  html[data-theme="dark"] .leave-card-btn:focus-visible{ outline-color:#FDFDFD; }
  html[data-theme="dark"] .terms-backdrop{ background-color:rgba(0,0,0,0.63); background-image:none; }
  html[data-theme="dark"] .terms-card{ background-color:#4A4D51; background-image:none; color:var(--ink); border-color:var(--border); box-shadow:0 18px 48px rgba(0,0,0,0.44); }
  html[data-theme="dark"] .terms-more{ color:var(--muted); }
  html[data-theme="dark"] .terms-full-toggle{ background-color:none; background-image:none; color:var(--ink); }
  html[data-theme="dark"] .terms-full{ border-color:var(--border); background-color:#4D5054; background-image:none; color:var(--ink); }
  html[data-theme="dark"] .terms-full:focus-visible{ outline-color:#FDFDFD; }
  html[data-theme="dark"] .terms-inline-link{ background-color:none; background-image:none; color:var(--accent); }
  html[data-theme="dark"] .cite-doi-link{ color:var(--accent); text-decoration-color:color-mix(in srgb, currentColor 35%, transparent); }
  html[data-theme="dark"] .cite-doi-link:hover,
html[data-theme="dark"] .cite-doi-link:focus-visible{ text-decoration-color:currentColor; }
  html[data-theme="dark"] .cite-doi-link::after{ color:var(--ds-primary); }
  html[data-theme="dark"] .pre-fig-info{ border-color:rgba(179,209,241,0.24); background-color:var(--accent-tint); background-image:none; color:var(--accent); }
  html[data-theme="dark"] .pre-fig-info:focus{ outline-color:rgba(179,209,241,0.34); }
  html[data-theme="dark"] .pre-fig-info::before{ border-color:rgba(179,209,241,0.24); background-color:var(--tooltip-bg); background-image:none; color:var(--ink-2); box-shadow:var(--tooltip-shadow); }
  html[data-theme="dark"] .pre-sources{ color:var(--ds-text-muted); }
  html[data-theme="dark"] .pre-input-out{ outline-color:#FFBFB5; }
  html[data-theme="dark"] .pvt-table td.pvt-cell-flag{ color:#E7CDA5; }

/* ---- from design-system.css ---- */
  html[data-theme="dark"]{ --ds-bg:#53565B; --ds-surface:#4D5054; --ds-surface-subtle:#505358; --ds-surface-emphasis:#575A5F; --ds-text:#FFFFFF; --ds-text-muted:#EBECEC; --ds-text-subtle:#E0E1E2; --ds-text-faint:#D1D2D3; --ds-text-inverse:#4D5054; --ds-border:rgba(255,255,255,0.1); --ds-border-strong:rgba(255,255,255,0.18); --ds-border-subtle:rgba(255,255,255,0.06); --ds-primary:#B3D1F1; --ds-primary-hover:#B3D1F1; --ds-primary-active:#B3D1F1; --ds-primary-tint:rgba(179,209,241,0.08); --ds-primary-ring:rgba(179,209,241,0.4); --ds-success:#AEDFBC; --ds-success-tint:rgba(174,223,188,0.1); --ds-warning:#F1C99C; --ds-warning-tint:rgba(241,201,156,0.1); --ds-destructive:#FFBFB5; --ds-destructive-hover:#FFBFB4; --ds-destructive-tint:rgba(255,191,181,0.08); --ds-shadow-1:0 1px 2px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.12); --ds-shadow-2:0 2px 4px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.16); --ds-shadow-3:0 4px 8px rgba(0,0,0,0.12), 0 12px 28px rgba(0,0,0,0.24); --ds-shadow-overlay:0 1px 2px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.2), 0 24px 56px rgba(0,0,0,0.32); }
  html[data-theme="dark"] body{ background-color:var(--ds-bg) !important; background-image:none !important; background-image:none !important; color:var(--ds-text); }
  html[data-theme="dark"] .ds-btn,
html[data-theme="dark"] .btn{ border-color:transparent; background-color:transparent; background-image:none; color:var(--ds-text); }
  html[data-theme="dark"] .ds-btn:focus-visible,
html[data-theme="dark"] .btn:focus-visible{ outline-color:var(--ds-ring-width) var(--ds-primary-ring); }
  html[data-theme="dark"] .btn-primary{ background-color:var(--ds-text) !important; background-image:none !important; color:var(--ds-text-inverse) !important; border-color:var(--ds-text) !important; box-shadow:var(--ds-shadow-1); }
  html[data-theme="dark"] .btn-primary:hover:not(:disabled){ background-color:#FBFBFB !important; background-image:none !important; border-color:#FBFBFB !important; box-shadow:var(--ds-shadow-2); }
  html[data-theme="dark"] .btn-secondary{ background-color:var(--ds-surface) !important; background-image:none !important; color:var(--ds-text) !important; border-color:var(--ds-border-strong) !important; }
  html[data-theme="dark"] .btn-secondary:hover:not(:disabled){ background-color:var(--ds-surface-emphasis) !important; background-image:none !important; border-color:var(--ds-border-strong) !important; }
  html[data-theme="dark"] .btn-ghost{ background-color:transparent !important; background-image:none !important; color:var(--ds-text-muted) !important; border-color:transparent !important; }
  html[data-theme="dark"] .btn-ghost:hover:not(:disabled){ background-color:var(--ds-surface-emphasis) !important; background-image:none !important; color:var(--ds-text) !important; }
  html[data-theme="dark"] .btn-destructive,
html[data-theme="dark"] .btn-clear{ background-color:transparent !important; background-image:none !important; color:var(--ds-text-subtle) !important; border-color:transparent !important; box-shadow:none !important; }
  html[data-theme="dark"] .btn-destructive:hover:not(:disabled),
html[data-theme="dark"] .btn-clear:hover:not(:disabled){ background-color:var(--ds-destructive-tint) !important; background-image:none !important; color:var(--ds-destructive) !important; border-color:rgba(255,191,181,0.18) !important; }
  html[data-theme="dark"] .add-row-btn,
html[data-theme="dark"] .rb-action-export,
html[data-theme="dark"] .rb-action-export-excel{ background-color:var(--ds-surface) !important; background-image:none !important; color:var(--ds-text) !important; border-color:var(--ds-border-strong) !important; box-shadow:none !important; }
  html[data-theme="dark"] .add-row-btn:hover:not(:disabled){ background-color:var(--ds-surface-emphasis) !important; background-image:none !important; color:var(--ds-text) !important; border-color:var(--ds-border-strong) !important; }
  html[data-theme="dark"] .rb-action-export{ background-color:var(--ds-text) !important; background-image:none !important; color:var(--ds-text-inverse) !important; border-color:var(--ds-text) !important; box-shadow:var(--ds-shadow-1) !important; }
  html[data-theme="dark"] .rb-action-export:hover:not(:disabled){ background-color:#FBFBFB !important; background-image:none !important; border-color:#FBFBFB !important; box-shadow:var(--ds-shadow-2) !important; }
  html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border-strong); color:var(--ds-text); }
  html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{ color:var(--ds-text-faint); }
  html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus{ border-color:var(--ds-primary); box-shadow:0 0 0 3px var(--ds-primary-tint); }
  html[data-theme="dark"] .ds-input-error,
html[data-theme="dark"] input[aria-invalid="true"],
html[data-theme="dark"] select[aria-invalid="true"]{ border-color:var(--ds-destructive) !important; }
  html[data-theme="dark"] input[aria-invalid="true"]:focus,
html[data-theme="dark"] select[aria-invalid="true"]:focus{ box-shadow:0 0 0 3px var(--ds-destructive-tint) !important; }
  html[data-theme="dark"] .ds-error-message{ color:var(--ds-destructive); }
  html[data-theme="dark"] .panel,
html[data-theme="dark"] .panel-emphasis{ background-color:var(--ds-surface) !important; background-image:none !important; border-color:var(--ds-border) !important; box-shadow:var(--ds-shadow-1) !important; }
  html[data-theme="dark"] .premorbid-input-panel{ background-color:var(--ds-surface) !important; background-image:none !important; }
  html[data-theme="dark"] #premorbid #pre-inputs .pre-form-section{ background-color:var(--ds-surface) !important; background-image:none !important; border-color:var(--ds-border) !important; }
  html[data-theme="dark"] .ds-badge{ background-color:var(--ds-surface-emphasis); background-image:none; color:var(--ds-text-muted); }
  html[data-theme="dark"] .ds-badge-primary{ background-color:var(--ds-primary-tint); background-image:none; color:var(--ds-primary); }
  html[data-theme="dark"] .ds-badge-success{ background-color:var(--ds-success-tint); background-image:none; color:var(--ds-success); }
  html[data-theme="dark"] .ds-empty{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .ds-empty-icon{ background-color:var(--ds-surface-emphasis); background-image:none; color:var(--ds-text-faint); }
  html[data-theme="dark"] .ds-empty-title{ color:var(--ds-text); }
  html[data-theme="dark"] .ds-empty-desc{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .ds-skeleton{ background-color:var(--ds-surface-emphasis); background-image:none; }
  html[data-theme="dark"] .rb-empty{ color:var(--ds-text-subtle) !important; }
  html[data-theme="dark"] .rb-empty-title{ color:var(--ds-text) !important; }
  html[data-theme="dark"] .rb-empty-sub{ color:var(--ds-text-subtle) !important; }
  html[data-theme="dark"] .rb-empty svg{ color:var(--ds-text-faint) !important; }
  html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .pre-form-title,
html[data-theme="dark"] .bat-config-label{ color:var(--ds-text-subtle) !important; }
  html[data-theme="dark"] .pre-form-note,
html[data-theme="dark"] .pre-label-sub,
html[data-theme="dark"] .bat-input-help{ color:var(--ds-text-faint) !important; }
  html[data-theme="dark"] *::placeholder{ color:var(--ds-text-faint) !important; }
  html[data-theme="dark"] .site-footer{ background-color:transparent !important; background-image:none !important; border-top-color:var(--ds-border) !important; }
  html[data-theme="dark"] .site-footer-link{ color:var(--ds-text-muted) !important; }
  html[data-theme="dark"] .site-footer-link:hover{ color:var(--ds-text) !important; }
  html[data-theme="dark"] .ds-version-stamp{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .ds-version-stamp .ds-version-dot{ background-color:var(--ds-success); background-image:none; box-shadow:0 0 0 3px var(--ds-success-tint); }
  html[data-theme="dark"] .ds-skip-link{ background-color:var(--ds-text); background-image:none; color:var(--ds-text-inverse); }
  html[data-theme="dark"] .ds-skip-link:focus{ outline-color:var(--ds-ring-width) var(--ds-primary-ring); }
  html[data-theme="dark"] .topbar-brand,
html[data-theme="dark"] .topbar-brand-home,
html[data-theme="dark"] button.topbar-brand{ background-color:transparent; background-image:none; color:inherit; }
  html[data-theme="dark"] .topbar-brand-home:focus-visible{ outline-color:var(--ds-primary-ring); }
  html[data-theme="dark"] .ds-brand-mark{ background-color:#B3D1F1; background-image:none; box-shadow:var(--ds-shadow-1); }
  html[data-theme="dark"] .ds-brand-mark::before{ background:#B3D1F1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23FBF7F0' stroke-width='5' stroke-linecap='round'%3E%3Cpath d='M11 22 C20 22 23.5 42 32 42 C40.5 42 44 22 53 22'/%3E%3Cline x1='32' y1='12' x2='32' y2='52'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat; }
  html[data-theme="dark"] .topbar-brand-title{ color:var(--ds-text) !important; }
  html[data-theme="dark"] .topbar-brand-title em{ color:var(--ds-primary) !important; }
  html[data-theme="dark"] .section-title{ color:var(--ds-text) !important; }
  html[data-theme="dark"] .section-desc{ color:var(--ds-text-muted) !important; }
  html[data-theme="dark"] button:focus-visible,
html[data-theme="dark"] [role="button"]:focus-visible,
html[data-theme="dark"] .nav-item:focus-visible,
html[data-theme="dark"] .topnav-item:focus-visible,
html[data-theme="dark"] .tab:focus-visible,
html[data-theme="dark"] .site-footer-link:focus-visible,
html[data-theme="dark"] a:focus-visible{ outline-color:var(--ds-ring-width) var(--ds-primary-ring); }
  html[data-theme="dark"] .premorbid-input-panel,
html[data-theme="dark"] #premorbid .premorbid-input-panel,
html[data-theme="dark"] #premorbid .pre-form-section,
html[data-theme="dark"] #premorbid #pre-inputs .pre-form-section,
html[data-theme="dark"] .panel-emphasis,
html[data-theme="dark"] .bat-config-panel,
html[data-theme="dark"] .bat-premorbid-panel,
html[data-theme="dark"] .autofill-panel,
html[data-theme="dark"] .column-guide,
html[data-theme="dark"] .combo-ageband-note,
html[data-theme="dark"] .bat-premorbid-help,
html[data-theme="dark"] .info-box,
html[data-theme="dark"] .home-info{ background-color:var(--ds-surface) !important; background-image:none !important; background-image:none !important; border-color:var(--ds-border) !important; }
  html[data-theme="dark"] .pre-step-next,
html[data-theme="dark"] .pre-nav-btn,
html[data-theme="dark"] .pre-nav-next,
html[data-theme="dark"] button.pre-nav-next,
html[data-theme="dark"] .bat-action-primary{ background-color:var(--ds-text) !important; background-image:none !important; color:var(--ds-text-inverse) !important; border-color:var(--ds-text) !important; box-shadow:var(--ds-shadow-1) !important; background-image:none !important; }
  html[data-theme="dark"] .pre-step-next:hover:not(:disabled),
html[data-theme="dark"] .pre-nav-btn:hover:not(:disabled),
html[data-theme="dark"] .pre-nav-next:hover:not(:disabled),
html[data-theme="dark"] button.pre-nav-next:hover:not(:disabled){ background-color:#FBFBFB !important; background-image:none !important; border-color:#FBFBFB !important; box-shadow:var(--ds-shadow-2) !important; }
  html[data-theme="dark"] .btn-clear,
html[data-theme="dark"] .btn.btn-clear,
html[data-theme="dark"] .add-row-actions .btn-clear,
html[data-theme="dark"] button.btn-clear{ background-color:transparent !important; background-image:none !important; background-image:none !important; color:var(--ds-text-subtle) !important; border-color:transparent !important; box-shadow:none !important; }
  html[data-theme="dark"] .btn-clear:hover:not(:disabled),
html[data-theme="dark"] button.btn-clear:hover:not(:disabled){ background-color:var(--ds-destructive-tint) !important; background-image:none !important; color:var(--ds-destructive) !important; border-color:rgba(255,191,181,0.18) !important; }
  html[data-theme="dark"] .topbar-brand-title em{ color:var(--ds-primary) !important; }
  html[data-theme="dark"] .home-db-title{ color:var(--ds-text); }
  html[data-theme="dark"] .home-db-title em{ color:var(--ds-primary); }
  html[data-theme="dark"] .home-db-sub{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .home-db-card{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border); box-shadow:0 1px 4px rgba(0,0,0,0.12); }
  html[data-theme="dark"] .home-db-card:hover{ border-color:var(--ds-primary); box-shadow:0 6px 20px rgba(0,0,0,0.24), 0 1px 4px rgba(0,0,0,0.12); }
  html[data-theme="dark"] .home-db-card-icon{ background-color:rgba(179,209,241,0.07); background-image:none; color:var(--ds-primary); }
  html[data-theme="dark"] .home-db-card-name{ color:var(--ds-text); }
  html[data-theme="dark"] .home-db-card-desc{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .home-db-card-arrow{ color:var(--ds-border-strong); }
  html[data-theme="dark"] .home-db-card:hover .home-db-card-arrow{ color:var(--ds-primary); }
  html[data-theme="dark"] .home-pathway-card{ background-color:var(--ds-surface) !important; background-image:none !important; border-color:var(--ds-border) !important; box-shadow:var(--ds-shadow-1) !important; }
  html[data-theme="dark"] .home-pathway-card:hover{ border-color:var(--ds-border-strong) !important; box-shadow:var(--ds-shadow-2) !important; }
  html[data-theme="dark"] .pre-results-table thead th,
html[data-theme="dark"] .input-table thead th{ color:var(--ds-text-subtle); border-bottom-color:var(--ds-border); background-color:transparent; background-image:none; }
  html[data-theme="dark"] .pre-results-table tbody td,
html[data-theme="dark"] .input-table tbody td{ color:var(--ds-text); border-bottom-color:var(--ds-border-subtle); background-color:transparent; background-image:none; }
  html[data-theme="dark"] .pre-results-table tbody tr:hover td,
html[data-theme="dark"] .input-table tbody tr:hover td{ background-color:var(--ds-surface-emphasis) !important; background-image:none !important; }
  html[data-theme="dark"] .ds-pill{ background-color:var(--ds-surface-emphasis); background-image:none; color:var(--ds-text-muted); border-color:transparent; }
  html[data-theme="dark"] .ds-pill::before{ background-color:currentColor; background-image:none; }
  html[data-theme="dark"] .ds-pill-success{ background-color:var(--ds-success-tint); background-image:none; color:var(--ds-success); border-color:rgba(174,223,188,0.18); }
  html[data-theme="dark"] .ds-pill-warning{ background-color:var(--ds-warning-tint); background-image:none; color:var(--ds-warning); border-color:rgba(241,201,156,0.18); }
  html[data-theme="dark"] .ds-pill-danger{ background-color:var(--ds-destructive-tint); background-image:none; color:var(--ds-destructive); border-color:rgba(255,191,181,0.18); }
  html[data-theme="dark"] .ds-pill-info{ background-color:rgba(255,255,255,0.06); background-image:none; color:var(--ds-text-muted); border-color:var(--ds-border); }
  html[data-theme="dark"] .outcome-decline,
html[data-theme="dark"] .outcome-decrease,
html[data-theme="dark"] [class*="reliable-decline"]{ color:var(--ds-destructive) !important; }
  html[data-theme="dark"] .outcome-improvement,
html[data-theme="dark"] .outcome-increase{ color:var(--ds-success) !important; }
  html[data-theme="dark"] .outcome-stable,
html[data-theme="dark"] .outcome-none{ color:var(--ds-text-muted) !important; }
  html[data-theme="dark"] .ds-status-bar{ background-color:var(--ds-surface-subtle); background-image:none; border-color:var(--ds-border-subtle); color:var(--ds-text-subtle); }
  html[data-theme="dark"] .ds-status-bar .ds-status-method{ color:var(--ds-text); }
  html[data-theme="dark"] .ds-status-bar .ds-status-divider{ background-color:var(--ds-border); background-image:none; }
  html[data-theme="dark"] .ds-status-bar .ds-status-time{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .ds-cite{ color:var(--ds-primary); border-bottom-color:var(--ds-primary); }
  html[data-theme="dark"] .ds-cite::after{ background-color:var(--ds-text); background-image:none; color:var(--ds-text-inverse); box-shadow:var(--ds-shadow-2); }
  html[data-theme="dark"] .ds-info{ background-color:var(--ds-surface-emphasis); background-image:none; color:var(--ds-text-subtle); }
  html[data-theme="dark"] .ds-info:hover{ background-color:var(--ds-text); background-image:none; color:var(--ds-text-inverse); }
  html[data-theme="dark"] .ds-info[data-tip]::after{ background-color:var(--ds-text); background-image:none; color:var(--ds-text-inverse); }
  html[data-theme="dark"] .topbar{ background-color:var(--ds-surface) !important; background-image:none !important; border-bottom-color:var(--ds-border) !important; }
  html[data-theme="dark"] .topbar-row-brand{ border-bottom-color:var(--ds-border-subtle) !important; }
  html[data-theme="dark"] .topbar-divider{ background-color:var(--ds-border) !important; background-image:none !important; }
  html[data-theme="dark"] .topbar-page-title{ color:var(--ds-text-muted) !important; }
  html[data-theme="dark"] .topbar-page-title em{ color:var(--ds-text) !important; }
  html[data-theme="dark"] .topnav-item{ color:var(--ds-text-muted) !important; }
  html[data-theme="dark"] .topnav-item:hover{ color:var(--ds-text) !important; }
  html[data-theme="dark"] .topnav-item.active{ color:var(--ds-text) !important; }
  html[data-theme="dark"]::-webkit-scrollbar-track{ background-color:transparent; background-image:none; }
  html[data-theme="dark"]::-webkit-scrollbar-thumb{ background-color:rgba(255,255,255,0.16); background-image:none; border-color:var(--ds-bg); }
  html[data-theme="dark"]::-webkit-scrollbar-thumb:hover{ background-color:rgba(255,255,255,0.3); background-image:none; }
  html[data-theme="dark"] *{ scrollbar-color:rgba(255,255,255,0.2) transparent; }
  html[data-theme="dark"]::selection{ background-color:var(--ds-primary-tint); background-image:none; color:var(--ds-text); }
  html[data-theme="dark"] kbd,
html[data-theme="dark"] .ds-kbd{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border-strong); color:var(--ds-text); }
  html[data-theme="dark"]{ --note-bg:#4A4D51; --tooltip-bg:rgba(255,255,255,0.95); --note-border:rgba(255,255,255,0.1); --accent-tint:rgba(255,255,255,0.05); }
  html[data-theme="dark"] .info-box,
html[data-theme="dark"] .home-info,
html[data-theme="dark"] .bat-config-panel,
html[data-theme="dark"] .bat-premorbid-panel,
html[data-theme="dark"] .bat-premorbid-help,
html[data-theme="dark"] .autofill-panel,
html[data-theme="dark"] .column-guide,
html[data-theme="dark"] .combo-ageband-note,
html[data-theme="dark"] .formula-disclosure .info-box,
html[data-theme="dark"] .pre-form-section,
html[data-theme="dark"] .premorbid-input-panel,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .panel-emphasis{ background-color:var(--ds-surface) !important; background-image:none !important; background-image:none !important; border-color:var(--ds-border) !important; }
  html[data-theme="dark"] .formula-body{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border); color:var(--ds-text-subtle); }
  html[data-theme="dark"] .formula-body strong,
html[data-theme="dark"] .formula-body b{ color:var(--ds-text); }
  html[data-theme="dark"] .autofill-panel{ box-shadow:none !important; background-color:transparent !important; background-image:none !important; }
  html[data-theme="dark"] .autofill-panel input,
html[data-theme="dark"] .autofill-panel .combo input{ background-color:var(--ds-surface) !important; background-image:none !important; border-color:var(--ds-border-strong) !important; }
  html[data-theme="dark"] .input-table tbody tr,
html[data-theme="dark"] .input-table tbody tr td,
html[data-theme="dark"] .input-table tbody tr.row-check,
html[data-theme="dark"] .input-table tbody tr.row-check td,
html[data-theme="dark"] .input-table tbody tr.row-awaiting,
html[data-theme="dark"] .input-table tbody tr.row-awaiting td,
html[data-theme="dark"] .input-table tbody tr:nth-child(even),
html[data-theme="dark"] .input-table tbody tr:nth-child(even) td{ background-color:var(--ds-surface) !important; background-image:none !important; background-image:none !important; }
  html[data-theme="dark"] .input-table tbody tr:hover,
html[data-theme="dark"] .input-table tbody tr:hover td{ background-color:var(--ds-surface-subtle) !important; background-image:none !important; }
  html[data-theme="dark"] .input-table thead tr.table-group-row th,
html[data-theme="dark"] .input-table tr.group-header td{ background-color:var(--ds-surface-subtle) !important; background-image:none !important; border-top-color:var(--ds-border) !important; border-bottom-color:var(--ds-border) !important; color:var(--ds-text-subtle) !important; }
  html[data-theme="dark"] .input-table thead tr.table-group-row th:first-child{ color:var(--ds-text-muted) !important; }
  html[data-theme="dark"] .input-table tbody tr td{ border-bottom-color:var(--ds-border-subtle) !important; }
  html[data-theme="dark"] .input-table .row-remove,
html[data-theme="dark"] .input-table tr td .row-remove,
html[data-theme="dark"] .input-table tr.group-header td .group-remove{ color:var(--ds-text-faint) !important; background-color:transparent !important; background-image:none !important; }
  html[data-theme="dark"] .input-table .row-remove:hover,
html[data-theme="dark"] .input-table tr.group-header td .group-remove:hover{ color:var(--ds-destructive) !important; background-color:var(--ds-destructive-tint) !important; background-image:none !important; }
  html[data-theme="dark"] .input-table .descriptor-stars,
html[data-theme="dark"] .input-table td .descriptor-stars,
html[data-theme="dark"] .classification-mark,
html[data-theme="dark"] .classification-stars{ color:var(--ds-text-faint) !important; }
  html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .bat-config-label,
html[data-theme="dark"] .pre-form-title,
html[data-theme="dark"] .bat-section-label{ color:var(--ds-text-subtle) !important; }
  html[data-theme="dark"] .bat-descriptor-star,
html[data-theme="dark"] .descriptor-star,
html[data-theme="dark"] [data-descriptor-marker]{ color:var(--ds-text-faint) !important; }
  html[data-theme="dark"] .bat-premorbid-help,
html[data-theme="dark"] .bat-descriptor-line,
html[data-theme="dark"] .descriptor-key{ color:var(--ds-text-muted) !important; }
  html[data-theme="dark"] .site-footer-meta{ color:var(--ds-text-faint) !important; }
  html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .input-table .btn-row{ background-color:var(--ds-surface) !important; background-image:none !important; border-color:var(--ds-border-strong) !important; color:var(--ds-text) !important; box-shadow:none !important; }
  html[data-theme="dark"] .required-marker,
html[data-theme="dark"] [aria-required="true"] + label::after,
html[data-theme="dark"] label[required-marker]::after{ color:var(--ds-destructive) !important; }
  html[data-theme="dark"] .field > label,
html[data-theme="dark"] .field-row > .field > label,
html[data-theme="dark"] .bat-config label,
html[data-theme="dark"] .pre-form-section label{ color:var(--ds-text-subtle) !important; }
  html[data-theme="dark"] .hint,
html[data-theme="dark"] .field-hint,
html[data-theme="dark"] .pre-label-sub,
html[data-theme="dark"] .pre-form-note,
html[data-theme="dark"] .bat-config-hint,
html[data-theme="dark"] .bat-input-help{ color:var(--ds-text-faint) !important; }
  html[data-theme="dark"] #battery .bat-premorbid-panel,
html[data-theme="dark"] #battery .bat-premorbid-help,
html[data-theme="dark"] #battery .panel,
html[data-theme="dark"] #battery .panel-emphasis,
html[data-theme="dark"] #battery > .panel,
html[data-theme="dark"] #battery > .panel:not(.input-table-wrap){ background-color:var(--ds-surface) !important; background-image:none !important; background-image:none !important; border-color:var(--ds-border) !important; }
  html[data-theme="dark"] #sdi > .panel:not(.autofill-panel),
html[data-theme="dark"] #rci-practice > .panel:not(.autofill-panel),
html[data-theme="dark"] #rci-srb > .panel:not(.autofill-panel),
html[data-theme="dark"] #rci-mcsweeney > .panel:not(.autofill-panel),
html[data-theme="dark"] #rci-crawford > .panel:not(.autofill-panel){ background-color:var(--ds-surface) !important; background-image:none !important; background-image:none !important; border-color:var(--ds-border) !important; }
  html[data-theme="dark"] #premorbid .panel,
html[data-theme="dark"] #premorbid .panel-emphasis,
html[data-theme="dark"] #premorbid .premorbid-input-panel,
html[data-theme="dark"] #premorbid .pre-form-section,
html[data-theme="dark"] #premorbid #pre-inputs .pre-form-section{ background-color:var(--ds-surface) !important; background-image:none !important; background-image:none !important; border-color:var(--ds-border) !important; }
  html[data-theme="dark"] #battery .autofill-panel,
html[data-theme="dark"] #sdi .autofill-panel,
html[data-theme="dark"] #rci-practice .autofill-panel,
html[data-theme="dark"] #rci-srb .autofill-panel,
html[data-theme="dark"] #rci-mcsweeney .autofill-panel,
html[data-theme="dark"] #rci-crawford .autofill-panel{ background-color:transparent !important; background-image:none !important; background-image:none !important; box-shadow:none !important; }
  html[data-theme="dark"] .input-table td input,
html[data-theme="dark"] .input-table td input[type="text"],
html[data-theme="dark"] .input-table td input[type="number"]{ background-color:var(--ds-surface) !important; background-image:none !important; border-color:var(--ds-border-strong) !important; }
  html[data-theme="dark"] #battery .input-table tbody tr,
html[data-theme="dark"] #battery .input-table tbody tr td,
html[data-theme="dark"] #battery .input-table tbody tr.row-check,
html[data-theme="dark"] #battery .input-table tbody tr.row-check td,
html[data-theme="dark"] #battery .input-table tbody tr.row-awaiting td,
html[data-theme="dark"] #sdi .input-table tbody tr,
html[data-theme="dark"] #rci-practice .input-table tbody tr,
html[data-theme="dark"] #rci-srb .input-table tbody tr,
html[data-theme="dark"] #rci-mcsweeney .input-table tbody tr,
html[data-theme="dark"] #rci-crawford .input-table tbody tr,
html[data-theme="dark"] #change-analysis .input-table tbody tr,
html[data-theme="dark"] #change-analysis .input-table tbody tr td{ background-color:var(--ds-surface) !important; background-image:none !important; background-image:none !important; }
  html[data-theme="dark"] #battery .input-table tbody tr:hover,
html[data-theme="dark"] #battery .input-table tbody tr:hover td,
html[data-theme="dark"] #sdi .input-table tbody tr:hover,
html[data-theme="dark"] #rci-practice .input-table tbody tr:hover,
html[data-theme="dark"] #rci-srb .input-table tbody tr:hover,
html[data-theme="dark"] #rci-mcsweeney .input-table tbody tr:hover,
html[data-theme="dark"] #rci-crawford .input-table tbody tr:hover,
html[data-theme="dark"] #change-analysis .input-table tbody tr:hover,
html[data-theme="dark"] #change-analysis .input-table tbody tr:hover td{ background-color:var(--ds-surface-subtle) !important; background-image:none !important; }
  html[data-theme="dark"] .model-info-dot::before,
html[data-theme="dark"] [data-tooltip]::before,
html[data-theme="dark"] [title]::after,
html[data-theme="dark"] .tooltip-content,
html[data-theme="dark"] .tip-content{ background-color:rgba(255,255,255,0.96) !important; background-image:none !important; color:#4A4D51 !important; border-color:rgba(255,255,255,0.96) !important; text-shadow:none !important; }
  html[data-theme="dark"] .model-info-dot::after{ border-color:rgba(255,255,255,0.96) transparent transparent transparent !important; }
  html[data-theme="dark"] .autofill-panel,
html[data-theme="dark"] #battery .autofill-panel,
html[data-theme="dark"] #sdi .autofill-panel,
html[data-theme="dark"] #rci-practice .autofill-panel,
html[data-theme="dark"] #rci-srb .autofill-panel,
html[data-theme="dark"] #rci-mcsweeney .autofill-panel,
html[data-theme="dark"] #rci-crawford .autofill-panel{ background-color:var(--ds-surface) !important; background-image:none !important; background-image:none !important; border-color:var(--ds-border) !important; box-shadow:var(--ds-shadow-1) !important; }
  html[data-theme="dark"] #battery .autofill-panel input,
html[data-theme="dark"] #battery .autofill-panel .combo input,
html[data-theme="dark"] .autofill-panel .combo input{ background-color:var(--ds-surface) !important; background-image:none !important; border-color:var(--ds-border) !important; }
  html[data-theme="dark"] .autofill-panel .combo input:focus{ border-color:var(--ds-primary) !important; box-shadow:0 0 0 3px var(--ds-primary-tint) !important; }
  html[data-theme="dark"] #battery .bat-table-head{ background-color:var(--ds-surface) !important; background-image:none !important; background-image:none !important; border-bottom-color:var(--ds-border) !important; background:linear-gradient(180deg, var(--ds-surface-subtle) 0%, var(--ds-surface) 100%) !important; }
  html[data-theme="dark"] #battery .bat-autofill-icon{ color:var(--ds-text-subtle) !important; }
  html[data-theme="dark"] #battery .bat-autofill-input{ background-color:var(--ds-surface) !important; background-image:none !important; border-color:var(--ds-border-strong) !important; color:var(--ds-text) !important; box-shadow:0 1px 2px rgba(0,0,0,0.08) inset !important; }
  html[data-theme="dark"] #battery .bat-autofill-input::placeholder{ color:var(--ds-text-faint) !important; }
  html[data-theme="dark"] #battery .bat-autofill-input:focus{ border-color:var(--ds-primary) !important; box-shadow:0 0 0 3px var(--ds-primary-tint) !important; }
  html[data-theme="dark"] #battery .bat-autofill-inline::before{ color:var(--ds-text-subtle); border-right-color:var(--ds-border); }
  html[data-theme="dark"] .topnav-dropdown{ background-color:var(--ds-surface) !important; background-image:none !important; border-color:var(--ds-border) !important; box-shadow:var(--ds-shadow-overlay) !important; }
  html[data-theme="dark"] .topnav-drop-item{ color:var(--ds-text) !important; background-color:transparent !important; background-image:none !important; }
  html[data-theme="dark"] .topnav-drop-item:hover{ background-color:rgba(255,255,255,0.04) !important; background-image:none !important; color:var(--ds-text) !important; }
  html[data-theme="dark"] .topnav-drop-item.active{ background-color:transparent !important; background-image:none !important; color:var(--ds-text) !important; }
  html[data-theme="dark"] .ds-inline-bar{ background-color:var(--ds-bg); background-image:none; border-color:var(--ds-border); box-shadow:var(--ds-shadow-1); }
  html[data-theme="dark"] .ds-inline-bar-select{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border-strong); color:var(--ds-text); background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%234A5260' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3,5 6,8 9,5'/%3E%3C/svg%3E"); }
  html[data-theme="dark"] .ds-inline-bar-select:hover{ border-color:var(--ds-text-faint); }
  html[data-theme="dark"] .ds-inline-bar-select:focus{ border-color:var(--ds-primary); box-shadow:0 0 0 3px var(--ds-primary-tint); }
  html[data-theme="dark"] .ds-inline-bar-label{ color:var(--ds-text-subtle); border-right-color:var(--ds-border); }
  html[data-theme="dark"] .ds-inline-bar-search > svg{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .ds-inline-bar-input,
html[data-theme="dark"] input.ds-inline-bar-input,
html[data-theme="dark"] input[type="text"].ds-inline-bar-input{ background-color:#4A4D51 !important; background-image:none !important; border-color:var(--ds-border-strong) !important; color:var(--ds-text) !important; box-shadow:0 1px 2px rgba(0,0,0,0.08) inset !important; }
  html[data-theme="dark"] .ds-inline-bar-input::placeholder{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .ds-inline-bar-input:focus{ border-color:var(--ds-primary); box-shadow:0 0 0 3px var(--ds-primary-tint); }
  html[data-theme="dark"] .ds-inline-bar-search .combo-list{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border); box-shadow:var(--ds-shadow-overlay); }
  html[data-theme="dark"] .ds-inline-bar-toggle{ background-color:var(--ds-surface-emphasis); background-image:none; border-color:var(--ds-border); }
  html[data-theme="dark"] .ds-inline-bar-toggle-btn{ background-color:transparent; background-image:none; color:var(--ds-text-muted); }
  html[data-theme="dark"] .ds-inline-bar-toggle-btn:hover:not(.is-active){ color:var(--ds-text); }
  html[data-theme="dark"] .ds-inline-bar-toggle-btn.is-active{ background-color:var(--ds-surface); background-image:none; color:var(--ds-text); box-shadow:0 1px 0 rgba(0,0,0,0.08),
    0 1px 3px rgba(0,0,0,0.16); }
  html[data-theme="dark"] .ds-inline-bar-toggle-btn:focus-visible{ outline-color:var(--ds-primary-ring); }
  html[data-theme="dark"] .ds-inline-bar-corr-toggle{ background-color:transparent; background-image:none; border-color:var(--ds-border-strong, #707377); color:var(--ds-text-2); }
  html[data-theme="dark"] .ds-inline-bar-corr-toggle:hover{ background-color:#4F5357; background-image:none; border-color:var(--ds-text-faint); color:var(--ds-text); }
  html[data-theme="dark"] .ds-inline-bar-corr-toggle input[type="checkbox"]{ border-color:var(--ds-border-strong, #707377); background-color:#4A4D51; background-image:none; }
  html[data-theme="dark"] .ds-inline-bar-corr-toggle input[type="checkbox"]:checked{ background-color:var(--ds-text); background-image:none; border-color:var(--ds-text); }
  html[data-theme="dark"] .ds-inline-bar-corr-toggle input[type="checkbox"]:checked::after{ border-right-color:#4A4D51; border-bottom-color:#4A4D51; }
  html[data-theme="dark"] .ds-inline-bar-corr-toggle:has(input:checked){ background-color:var(--ds-primary-tint, rgba(179,209,241,0.08)); background-image:none; border-color:var(--ds-primary, #B3D1F1); color:var(--ds-text); }
  html[data-theme="dark"] .ds-prem-card{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border); box-shadow:var(--ds-shadow-1); }
  html[data-theme="dark"] .ds-prem-card-or{ color:var(--ds-text-subtle, #D5D6D7); }
  html[data-theme="dark"] .ds-prem-card-info{ color:#B3D1F1; background-color:#515458; background-image:none; border-color:rgba(179,209,241,0.45); box-shadow:0 1px 2px rgba(0,0,0,0.2); }
  html[data-theme="dark"] .ds-prem-card-info:hover,
html[data-theme="dark"] .ds-prem-card-info:focus-visible{ color:#4A4D51; border-color:#B3D1F1; background-color:#B3D1F1; background-image:none; box-shadow:0 3px 8px rgba(0,0,0,0.5); }
  html[data-theme="dark"] .ds-prem-card-info-tip{ background-color:#4A4D51; background-image:none; border-color:rgba(255,255,255,0.14); box-shadow:0 8px 24px rgba(0,0,0,0.28); color:#E5E6E6; }
  html[data-theme="dark"] .ds-prem-card-info-tip strong{ color:#FDFDFD; }
  html[data-theme="dark"] .ds-prem-card.is-enabled{ border-color:rgba(179,209,241,0.25); background:linear-gradient(180deg, rgba(179,209,241,0.025), transparent); }
  html[data-theme="dark"] .ds-prem-card-eyebrow-tag{ color:#B3D1F1; }
  html[data-theme="dark"] .ds-prem-card-header{ border-right-color:var(--ds-border); }
  html[data-theme="dark"] .ds-prem-card-header:hover .ds-prem-card-mark{ border-color:var(--ds-primary); }
  html[data-theme="dark"] .ds-prem-card-mark{ border-color:var(--ds-border-strong); background-color:var(--ds-surface); background-image:none; color:transparent; }
  html[data-theme="dark"] .ds-prem-card-checkbox:checked + .ds-prem-card-mark{ background-color:var(--ds-primary); background-image:none; border-color:var(--ds-primary); color:#4A4D51; }
  html[data-theme="dark"] .ds-prem-card-checkbox:focus-visible + .ds-prem-card-mark{ outline-color:var(--ds-primary-ring); }
  html[data-theme="dark"] .ds-prem-card-toggle:hover .ds-prem-card-mark{ border-color:var(--ds-primary); }
  html[data-theme="dark"] .ds-prem-card-desc{ color:var(--ds-text-muted); }
  html[data-theme="dark"] .ds-prem-card-desc strong{ color:var(--ds-text); }
  html[data-theme="dark"] .ds-prem-card-desc abbr{ border-bottom-color:var(--ds-text-faint); }
  html[data-theme="dark"] .ds-prem-card-input-label{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .ds-prem-card-score{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border-strong); color:var(--ds-text); }
  html[data-theme="dark"] .ds-prem-card-score::placeholder{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .ds-prem-card-score:focus{ border-color:var(--ds-primary); box-shadow:0 0 0 3px var(--ds-primary-tint); }
  html[data-theme="dark"] .ds-inline-bar-checkbox{ color:var(--ds-text-muted); }
  html[data-theme="dark"] .ds-inline-bar-checkbox-mark{ border-color:var(--ds-border-strong); background-color:var(--ds-surface); background-image:none; color:transparent; }
  html[data-theme="dark"] .ds-inline-bar-checkbox input:checked + .ds-inline-bar-checkbox-mark{ background-color:var(--ds-primary); background-image:none; border-color:var(--ds-primary); color:#4A4D51; }
  html[data-theme="dark"] .ds-inline-bar-checkbox input:focus-visible + .ds-inline-bar-checkbox-mark{ outline-color:var(--ds-primary-ring); }
  html[data-theme="dark"] .ds-inline-bar-checkbox:hover .ds-inline-bar-checkbox-mark{ border-color:var(--ds-primary); }
  html[data-theme="dark"] .ds-inline-bar-prem.is-enabled .ds-inline-bar-checkbox{ color:var(--ds-text); }
  html[data-theme="dark"] .ds-inline-bar-prem-score{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border-strong); color:var(--ds-text); }
  html[data-theme="dark"] .ds-inline-bar-prem-score:disabled{ border-color:transparent; }
  html[data-theme="dark"] .ds-inline-bar-prem-score::placeholder{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .ds-inline-bar-prem-score:focus{ border-color:var(--ds-primary); box-shadow:0 0 0 3px var(--ds-primary-tint); }
  html[data-theme="dark"] .input-table td[data-norm-cell="true"] input,
html[data-theme="dark"] .input-table td[data-norm-cell="true"] input[type="text"],
html[data-theme="dark"] .input-table td[data-norm-cell="true"] input[type="number"]{ border-color:transparent !important; background-color:transparent !important; background-image:none !important; box-shadow:none !important; color:var(--ds-text-muted) !important; }
  html[data-theme="dark"] .input-table tbody tr:hover td[data-norm-cell="true"] input,
html[data-theme="dark"] .input-table tbody tr:focus-within td[data-norm-cell="true"] input{ border-color:var(--ds-border) !important; color:var(--ds-text) !important; }
  html[data-theme="dark"] .input-table td[data-norm-cell="true"] input:hover,
html[data-theme="dark"] .input-table td[data-norm-cell="true"] input[type="text"]:hover,
html[data-theme="dark"] .input-table td[data-norm-cell="true"] input[type="number"]:hover{ border-color:var(--ds-border-strong) !important; color:var(--ds-text) !important; }
  html[data-theme="dark"] .input-table td[data-norm-cell="true"] input:focus,
html[data-theme="dark"] .input-table td[data-norm-cell="true"] input[type="text"]:focus,
html[data-theme="dark"] .input-table td[data-norm-cell="true"] input[type="number"]:focus{ border-color:var(--ds-primary) !important; background-color:var(--ds-surface) !important; background-image:none !important; color:var(--ds-text) !important; box-shadow:0 0 0 3px var(--ds-primary-tint) !important; }
  html[data-theme="dark"] .input-table.norms-locked [data-norm-cell="true"] input{ background-color:var(--ds-surface) !important; background-image:none !important; color:var(--ds-text) !important; }
  html[data-theme="dark"] .rci-corr-toggle{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border-strong); color:var(--ds-text); }
  html[data-theme="dark"] .rci-corr-toggle:hover{ background-color:#4F5357; background-image:none; border-color:var(--ds-text-faint); }
  html[data-theme="dark"] .rci-corr-toggle input[type="checkbox"]{ border-color:var(--ds-border-strong); background-color:#4A4D51; background-image:none; }
  html[data-theme="dark"] .rci-corr-toggle input[type="checkbox"]:checked{ background-color:var(--ds-text); background-image:none; border-color:var(--ds-text); }
  html[data-theme="dark"] .rci-corr-toggle input[type="checkbox"]:checked::after{ border-right-color:#4A4D51; border-bottom-color:#4A4D51; }
  html[data-theme="dark"] .rci-corr-toggle:has(input:checked){ background-color:var(--ds-primary-tint); background-image:none; border-color:var(--ds-primary); }
  html[data-theme="dark"] .combo-indented-row{ border-bottom-color:#52555A; }
  html[data-theme="dark"] .combo-indented-row .combo-item.combo-indented{ border-color:var(--ds-border-strong, #707377) !important; background-color:var(--ds-surface, #4A4D51) !important; background-image:none !important; }
  html[data-theme="dark"] .combo-indented-row .combo-item.combo-indented:hover{ background-color:#4F5357 !important; background-image:none !important; border-color:#BDBFC0 !important; }
  html[data-theme="dark"] .combo-indented-row .combo-item.combo-indented:has(input:checked){ background-color:var(--ds-primary-tint, rgba(179,209,241,0.08)) !important; background-image:none !important; border-color:var(--ds-primary, #B3D1F1) !important; color:var(--ds-text, #FDFDFD) !important; }
  html[data-theme="dark"] .ds-prem-aside .ds-prem-ci-toggle{ background-color:transparent !important; background-image:none !important; }
  html[data-theme="dark"] .ds-prem-aside .ds-prem-ci-toggle .ds-inline-bar-toggle-btn{ border-color:var(--ds-border-strong) !important; background-color:var(--ds-surface) !important; background-image:none !important; color:var(--ds-text) !important; box-shadow:0 1px 0 rgba(0,0,0,0.04), inset 0 1px 0 rgba(0,0,0,0.6) !important; }
  html[data-theme="dark"] .ds-prem-aside .ds-prem-ci-toggle .ds-inline-bar-toggle-btn:hover:not(.is-active){ background-color:#4F5357 !important; background-image:none !important; border-color:var(--ds-text-faint) !important; }
  html[data-theme="dark"] .ds-prem-aside .ds-prem-ci-toggle .ds-inline-bar-toggle-btn.is-active{ background-color:var(--ds-text) !important; background-image:none !important; color:#4A4D51 !important; border-color:var(--ds-text) !important; box-shadow:0 1px 0 rgba(0,0,0,0.12),
    0 1px 3px rgba(0,0,0,0.36) !important; }
  html[data-theme="dark"] #premorbid.ds-prem-restructured > .section-desc{ color:var(--ds-text-2) !important; }
  html[data-theme="dark"] .ds-prem-aside .pre-form-section{ background-color:transparent !important; background-image:none !important; box-shadow:none !important; }
  html[data-theme="dark"] .ds-prem-aside .pre-form-section + .pre-form-section{ border-top-color:var(--ds-border) !important; }
  html[data-theme="dark"] .ds-prem-aside .pre-form-title{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .ds-prem-aside .field label{ color:var(--ds-text-subtle) !important; }
  html[data-theme="dark"] #premorbid.ds-prem-restructured .pre-tabs{ background-color:#4A4D51 !important; background-image:none !important; border-color:rgba(255,255,255,0.08) !important; box-shadow:0 1px 2px rgba(0,0,0,0.08) !important; }
  html[data-theme="dark"] #premorbid.ds-prem-restructured .pre-tabs > .tab{ color:#DFE0E1 !important; background-color:#4A4D51 !important; background-image:none !important; box-shadow:inset 0 -1px 0 rgba(0,0,0,0.16) !important; }
  html[data-theme="dark"] #premorbid.ds-prem-restructured .pre-tabs > .tab:hover:not(.active){ background-color:rgba(255,255,255,0.025) !important; background-image:none !important; color:#FDFDFD !important; }
  html[data-theme="dark"] #premorbid.ds-prem-restructured .pre-tabs > .tab.active,
html[data-theme="dark"] #premorbid.ds-prem-restructured .pre-tabs > .tab.active:hover{ color:#FDFDFD !important; background-color:#575A5F !important; background-image:none !important; box-shadow:none !important; }
  html[data-theme="dark"] #premorbid.ds-prem-restructured .pre-tabs > .tab.active::after{ background-color:#B3D1F1 !important; background-image:none !important; }
  html[data-theme="dark"] #premorbid.ds-prem-restructured .pre-tab-content.active{ background-color:#4A4D51 !important; background-image:none !important; border-color:rgba(255,255,255,0.08) !important; box-shadow:0 6px 18px rgba(0,0,0,0.1) !important; }
  html[data-theme="dark"] .ds-prem-ticks{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border); box-shadow:var(--ds-shadow-1); }
  html[data-theme="dark"] .ds-prem-ticks-eyebrow{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .ds-prem-ticks-count{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .ds-prem-ticks-count.is-all-ready{ color:#ABE1B5; }
  html[data-theme="dark"] .ds-prem-ticks-row{ color:var(--ds-text-faint); border-bottom-color:var(--ds-border); }
  html[data-theme="dark"] .ds-prem-ticks-row.is-ready{ color:var(--ds-text); }
  html[data-theme="dark"] .ds-prem-ticks-mark{ border-color:var(--ds-border-strong); background-color:transparent; background-image:none; }
  html[data-theme="dark"] .ds-prem-ticks-row.is-ready .ds-prem-ticks-mark{ background-color:#ABE1B5; background-image:none; border-color:#ABE1B5; }
  html[data-theme="dark"] .ds-prem-ticks-mark::after{ border-left-color:#4A4D51; border-bottom-color:#4A4D51; }
  html[data-theme="dark"] .rwauto-toolbar{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border); box-shadow:var(--ds-shadow-1); }
  html[data-theme="dark"] .rwauto-pill-toggle{ background-color:transparent; background-image:none; border-color:var(--ds-border-strong, #707377); color:var(--ds-text-2); }
  html[data-theme="dark"] .rwauto-pill-toggle:hover{ background-color:#4F5357; background-image:none; border-color:var(--ds-text-faint); color:var(--ds-text); }
  html[data-theme="dark"] .rwauto-pill-toggle input[type="checkbox"]{ border-color:var(--ds-border-strong, #707377); background-color:#4A4D51; background-image:none; }
  html[data-theme="dark"] .rwauto-pill-toggle input[type="checkbox"]:checked{ background-color:var(--ds-text); background-image:none; border-color:var(--ds-text); }
  html[data-theme="dark"] .rwauto-pill-toggle input[type="checkbox"]:checked::after{ border-right-color:#4A4D51; border-bottom-color:#4A4D51; }
  html[data-theme="dark"] .rwauto-pill-toggle:has(input:checked){ background-color:var(--ds-primary-tint, rgba(179,209,241,0.08)); background-image:none; border-color:var(--ds-primary, #B3D1F1); color:var(--ds-text); }
  html[data-theme="dark"] .rwauto-toolbar-label{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .rwauto-toolbar-select{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border-strong); color:var(--ds-text); background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%234A5260' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3,5 6,8 9,5'/%3E%3C/svg%3E"); }
  html[data-theme="dark"] .rwauto-toolbar-select:hover{ border-color:var(--ds-text-faint); }
  html[data-theme="dark"] .rwauto-toolbar-select:focus{ border-color:var(--ds-primary); box-shadow:0 0 0 3px var(--ds-primary-tint); }
  html[data-theme="dark"] .rwauto-btn{ background-color:var(--ds-text); background-image:none; color:#4A4D51; border-color:var(--ds-text); }
  html[data-theme="dark"] .rwauto-btn:hover{ background-color:#FFFFFF; background-image:none; }
  html[data-theme="dark"] .rwauto-paper{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border); box-shadow:0 1px 2px rgba(0,0,0,0.08),
    0 8px 22px rgba(0,0,0,0.12); color:var(--ds-text); }
  html[data-theme="dark"] .rwauto-paper h3{ color:var(--ds-text); border-bottom-color:var(--ds-text); }
  html[data-theme="dark"] .rwauto-empty{ color:var(--ds-text-2); }
  html[data-theme="dark"] .rwauto-empty-title{ color:var(--ds-text); }
  html[data-theme="dark"] .rwauto-empty-sub{ color:var(--ds-text-2); }
  html[data-theme="dark"] .toast{ background-color:var(--ds-text) !important; background-image:none !important; }
  html[data-theme="dark"] .ds-prem-card-tools{ border-top-color:rgba(255,255,255,0.08); }
  html[data-theme="dark"] .bat-prem-link-btn{ color:#B3D1F1; background-color:#4A4D51; background-image:none; border-color:rgba(179,209,241,0.3); }
  html[data-theme="dark"] .bat-prem-link-btn:hover:not(:disabled){ background-color:#515458; background-image:none; border-color:rgba(179,209,241,0.55); color:#FAC2B4; box-shadow:0 2px 6px rgba(0,0,0,0.2); }
  html[data-theme="dark"] .bat-prem-link-btn:disabled{ color:#C3C4C6; background-color:#4A4D51; background-image:none; border-color:rgba(255,255,255,0.1); }
  html[data-theme="dark"] .bat-prem-link-popover{ background-color:#4A4D51; background-image:none; border-color:rgba(255,255,255,0.14); box-shadow:0 8px 24px rgba(0,0,0,0.28); }
  html[data-theme="dark"] .bat-prem-link-option{ background-color:transparent; background-image:none; }
  html[data-theme="dark"] .bat-prem-link-option:hover{ background-color:rgba(255,255,255,0.04); background-image:none; }
  html[data-theme="dark"] .bat-prem-link-option-name{ color:#FDFDFD; }
  html[data-theme="dark"] .bat-prem-link-option-stats{ color:#DFE0E1; }
  html[data-theme="dark"] .bat-prem-link-empty{ color:#DFE0E1; }
  html[data-theme="dark"] .bat-prem-link-status{ background-color:#4F5256; background-image:none; border-color:rgba(255,255,255,0.1); color:#E5E6E6; }
  html[data-theme="dark"] .bat-prem-link-status-body strong{ color:#FDFDFD; }
  html[data-theme="dark"] .bat-prem-link-tier strong{ color:#FDFDFD; }
  html[data-theme="dark"] .bat-prem-link-text{ color:#E5E6E6; }
  html[data-theme="dark"] .bat-prem-link-text strong{ color:#FDFDFD; }
  html[data-theme="dark"] .bat-prem-link-clear{ background-color:transparent; background-image:none; color:#D5D6D7; }
  html[data-theme="dark"] .bat-prem-link-clear:hover{ background-color:rgba(255,255,255,0.08); background-image:none; color:#FDFDFD; }
  html[data-theme="dark"] .bat-ci-head,
html[data-theme="dark"] .bat-ci-cell{ color:var(--ink-1, #FDFDFD); }
  html[data-theme="dark"] .bat-type-popover{ background-color:var(--surface, #4A4D51); background-image:none; border-color:var(--border, #5C5F64); box-shadow:0 4px 16px rgba(0,0,0,0.2); }
  html[data-theme="dark"] .bat-type-opt{ background-color:transparent; background-image:none; color:var(--ink-1, #FDFDFD); }
  html[data-theme="dark"] .bat-type-opt:hover{ background-color:var(--surface-2, #505357); background-image:none; }
  html[data-theme="dark"] .bat-type-opt-sub{ color:var(--ink-3, #D0D1D3); }
  html[data-theme="dark"] .bat-type-popover-heading{ color:var(--ink-3, #D0D1D3); }
  html[data-theme="dark"] .bat-row-type-tag{ color:var(--ink-3, #D0D1D3); }
  html[data-theme="dark"] .bat-raw-toggle{ border-color:var(--border, #5C5F64); background-color:transparent; background-image:none; color:var(--ink-3, #D0D1D3); }
  html[data-theme="dark"] .bat-raw-toggle:hover,
html[data-theme="dark"] .bat-raw-toggle.is-active{ background-color:var(--surface-2, #53565A); background-image:none; color:var(--ink-1, #FDFDFD); border-color:var(--ink-3, #D0D1D3); }
  html[data-theme="dark"] .bat-add-repeat{ color:var(--ink-2, #E7E7E8); background-color:transparent; background-image:none; border-color:var(--border, #5C5F64); }
  html[data-theme="dark"] .bat-add-repeat:hover{ background-color:var(--surface-2, #505357); background-image:none; }
  html[data-theme="dark"] .ds-prem-note{ color:var(--ds-text-subtle, #D5D6D7); }
  html[data-theme="dark"] .ds-prem-note strong{ color:#E0E0E1; }
  html[data-theme="dark"] .ds-prem-mode-desc{ color:var(--ds-text-subtle, #D5D6D7); }
  html[data-theme="dark"] .ds-prem-mode-desc strong{ color:#FDFDFD; }
  html[data-theme="dark"] #change-analysis .change-overview-guide{ background-color:rgba(74,77,81,0.55); background-image:none; border-color:rgba(255,255,255,0.06); }
  html[data-theme="dark"] #change-analysis .change-overview-guide-eyebrow{ color:#DBDCDD; }
  html[data-theme="dark"] #change-analysis .change-overview-guide-row + .change-overview-guide-row{ border-top-color:rgba(255,255,255,0.08); }
  html[data-theme="dark"] #change-analysis .change-overview-guide-data{ color:#EFEFEF; }
  html[data-theme="dark"] #change-analysis .change-overview-guide-data em{ color:#FDFDFD; }
  html[data-theme="dark"] #change-analysis .change-overview-guide-arrow{ color:#C3C4C6; }
  html[data-theme="dark"] #change-analysis .change-overview-guide-pick{ color:#FDFDFD; background-color:#4A4D51; background-image:none; border-color:rgba(255,255,255,0.16); }
  html[data-theme="dark"] #change-analysis .change-overview-guide-pick:hover{ background-color:#FDFDFD; background-image:none; color:#4A4D51; border-color:#FDFDFD; }
  html[data-theme="dark"] .viz-settings-line{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .viz-empty-line{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .viz-tab{ color:var(--ds-text-muted); background-color:var(--ds-surface-subtle); background-image:none; border-color:var(--ds-border); }
  html[data-theme="dark"] .viz-tab:hover{ background-color:var(--ds-surface-emphasis); background-image:none; color:var(--ds-text); }
  html[data-theme="dark"] .viz-tab[aria-selected="true"]{ background-color:var(--ds-text); background-image:none; border-color:var(--ds-text); color:var(--ds-text-inverse); }
  html[data-theme="dark"] .viz-axis-note{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .viz-card-head{ border-bottom-color:var(--ds-border-subtle); }
  html[data-theme="dark"] .viz-card-title{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .viz-sub-caption{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .viz-col-head{ fill:var(--ds-text-faint); }
  html[data-theme="dark"] .viz-row-name{ fill:var(--ds-text); }
  html[data-theme="dark"] .viz-row-score{ fill:var(--ds-text); }
  html[data-theme="dark"] .viz-row-fact{ fill:var(--ds-text-muted); }
  html[data-theme="dark"] .viz-tick{ stroke:var(--ds-border-strong); }
  html[data-theme="dark"] .viz-tick-label{ fill:var(--ds-text-faint); }
  html[data-theme="dark"] .viz-whisker{ stroke:var(--ds-text-muted); }
  html[data-theme="dark"] .viz-dot{ fill:var(--ds-text); stroke:var(--ds-surface); }
  html[data-theme="dark"] .viz-dot-open{ fill:var(--ds-surface); stroke:var(--ds-text-muted); }
  html[data-theme="dark"] .viz-offscale{ fill:var(--ds-text-muted); }
  html[data-theme="dark"] .viz-step{ fill:none; stroke:var(--ds-text-muted); }
  html[data-theme="dark"] .viz-rci-band{ fill:var(--ds-text); }
  html[data-theme="dark"] .viz-rci-expected{ stroke:var(--ds-border-strong); }
  html[data-theme="dark"] .viz-link-line{ stroke:var(--ds-text-faint); }
  html[data-theme="dark"] .viz-svg .viz-pre-short-1{ fill:#F0C99F; stroke:var(--ds-surface); }
  html[data-theme="dark"] .viz-svg .viz-pre-short-2{ fill:var(--ds-warning); stroke:var(--ds-surface); }
  html[data-theme="dark"] .viz-svg .viz-pre-short-3{ fill:var(--ds-destructive); stroke:var(--ds-surface); }
  html[data-theme="dark"] .viz-svg line.viz-pre-short-1{ stroke:#F0C99F; fill:none; }
  html[data-theme="dark"] .viz-svg line.viz-pre-short-2{ stroke:var(--ds-warning); fill:none; }
  html[data-theme="dark"] .viz-svg line.viz-pre-short-3{ stroke:var(--ds-destructive); fill:none; }
  html[data-theme="dark"] .viz-legend-t1{ color:#F0C99F; }
  html[data-theme="dark"] .viz-legend-t2{ color:var(--ds-warning); }
  html[data-theme="dark"] .viz-legend-t3{ color:var(--ds-destructive); }
  html[data-theme="dark"] .viz-raw-rule{ stroke:var(--ds-border); }
  html[data-theme="dark"] .viz-raw-row{ color:var(--ds-text-subtle); background-color:var(--ds-surface-subtle); background-image:none; border-color:var(--ds-border-strong); }
  html[data-theme="dark"] .viz-raw-row b{ color:var(--ds-text); }
  html[data-theme="dark"] .viz-card-note{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .viz-legend{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .viz-legend-open,
html[data-theme="dark"] .viz-legend-filled{ color:var(--ds-text); }
  html[data-theme="dark"] .viz-gallery-nav{ border-top-color:var(--ds-border-subtle); }
  html[data-theme="dark"] .viz-step-count{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .viz-rail{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border); box-shadow:var(--ds-shadow-1); }
  html[data-theme="dark"] .viz-rail-item{ color:var(--ds-text-muted); background-color:transparent; background-image:none; border-color:transparent; }
  html[data-theme="dark"] .viz-rail-item:hover{ background-color:var(--ds-surface-emphasis); background-image:none; color:var(--ds-text); }
  html[data-theme="dark"] .viz-rail-item[aria-selected="true"]{ background-color:var(--ds-surface-emphasis); background-image:none; border-color:var(--ds-border-strong); color:var(--ds-text); }
  html[data-theme="dark"] .viz-rail-count,
html[data-theme="dark"] .viz-rail-num{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .ds-patient-field{ background-color:var(--ds-surface-subtle); background-image:none; border-color:var(--ds-border-strong); }
  html[data-theme="dark"] .ds-patient-field-label{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] input.ds-patient-field-input,
html[data-theme="dark"] input[type="number"].ds-patient-field-input{ background-color:var(--ds-surface) !important; background-image:none !important; border-color:var(--ds-border) !important; color:var(--ds-text) !important; box-shadow:none !important; }
  html[data-theme="dark"] .ds-patient-field-input::placeholder{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .ds-patient-field-input:focus{ border-color:var(--ds-primary); box-shadow:0 0 0 3px var(--ds-primary-tint); }
  html[data-theme="dark"] .ds-patient-field:focus-within{ border-color:var(--ds-border-strong); background-color:var(--ds-surface); background-image:none; }
  html[data-theme="dark"] .ds-patient-field-live{ color:var(--ds-primary); }
  html[data-theme="dark"] .ds-patient-field.is-live{ border-color:rgba(179,209,241,0.35); background-color:var(--ds-primary-tint); background-image:none; }
  html[data-theme="dark"] .ds-patient-field-dot{ background-color:var(--ds-primary); background-image:none; }
  html[data-theme="dark"] .pre-age-mirror-note{ color:var(--ds-primary); }
  html[data-theme="dark"] .combo-agefilter-note{ background-color:var(--ds-primary-tint); background-image:none; border-bottom-color:var(--ds-border); color:var(--ds-text-muted); }
  html[data-theme="dark"] .combo-agefilter-note strong{ color:var(--ds-text); }
  html[data-theme="dark"] .combo-agefilter-toggle{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border-strong); color:var(--ds-primary); }
  html[data-theme="dark"] .combo-agefilter-toggle:hover{ background-color:var(--ds-surface-emphasis); background-image:none; border-color:var(--ds-primary); }
  html[data-theme="dark"] .combo-agefilter-toggle:focus-visible{ outline-color:var(--ds-ring-width) var(--ds-primary-ring); }
  html[data-theme="dark"] .ds-patient-field.is-wanted{ border-color:rgba(255,190,185,0.34); }
  html[data-theme="dark"] .ds-patient-field.is-wanted .ds-patient-field-input{ border-color:rgba(255,190,185,0.28) !important; }
  html[data-theme="dark"] .ds-patient-field.is-pulsing{ border-color:var(--ds-primary); }
  @media (prefers-reduced-motion: reduce){
    html[data-theme="dark"] .ds-patient-field.is-pulsing{ border-color:var(--ds-primary); box-shadow:0 0 0 3px var(--ds-primary-tint); }
  }
  html[data-theme="dark"] .home-dial-ring{ border-color:var(--ds-border); background:radial-gradient(closest-side, rgba(77,80,84,0.25) 58%, rgba(92,95,99,0.7) 100%); }
  html[data-theme="dark"] .home-dial-ring::before{ border-color:var(--ds-border-subtle); }
  html[data-theme="dark"] .home-dial-track{ fill:none; stroke:var(--ds-border-subtle); }
  html[data-theme="dark"] .home-dial-tick{ stroke:var(--ds-border-strong); }
  html[data-theme="dark"] .home-dial-tick.is-major{ stroke:var(--ds-text-subtle); }
  html[data-theme="dark"] .home-dial-num{ fill:var(--ds-text-faint); }
  html[data-theme="dark"] .home-dial-num.is-on{ fill:var(--ds-primary); }
  html[data-theme="dark"] .home-dial-glow{ fill:none; stroke:var(--ds-primary); }
  html[data-theme="dark"] .home-dial-hand{ stroke:var(--ds-primary); }
  html[data-theme="dark"] .home-dial-tip,
html[data-theme="dark"] .home-dial-pivot{ fill:var(--ds-primary); }
  html[data-theme="dark"] .home-dial-node{ background-color:none; background-image:none; color:var(--ds-text); }
  html[data-theme="dark"] .home-dial-dot{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border-strong); }
  html[data-theme="dark"] .home-fig .fa{ stroke:var(--ds-border); fill:none; }
  html[data-theme="dark"] .home-fig .fi{ stroke:var(--ds-text-subtle); fill:none; }
  html[data-theme="dark"] .home-fig .fk{ stroke:var(--ds-primary); fill:none; }
  html[data-theme="dark"] .home-fig .fs{ fill:var(--ds-primary); stroke:none; }
  html[data-theme="dark"] .home-fig .fb{ fill:var(--ds-text-subtle); }
  html[data-theme="dark"] .home-fig .fc{ fill:var(--ds-primary); }
  html[data-theme="dark"] .home-fig .fn{ fill:var(--ds-text-subtle); }
  html[data-theme="dark"] .home-fig .fp{ fill:var(--ds-primary); }
  html[data-theme="dark"] .home-dial-label{ color:var(--ds-text); }
  html[data-theme="dark"] .home-dial-node:hover .home-dial-dot,
html[data-theme="dark"] .home-dial-node:focus-visible .home-dial-dot{ background-color:var(--ds-primary) !important; border-color:var(--ds-primary) !important; }
  html[data-theme="dark"] .home-dial-node:hover .home-dial-label,
html[data-theme="dark"] .home-dial-node:focus-visible .home-dial-label{ color:var(--ds-primary) !important; }
  html[data-theme="dark"] .home-dial-node:focus-visible .home-dial-tag{ outline-color:var(--ds-ring-width, 2px) var(--ds-primary-ring); }
  html[data-theme="dark"] .home-dial-hub{ background:radial-gradient(circle at 50% 30%, #4B4E52 0%, #4E5155 55%, #53565A 100%); box-shadow:0 0 0 1px var(--ds-border),
    inset 0 1px 0 rgba(0,0,0,0.6),
    0 28px 60px -26px rgba(0,0,0,0.6),
    0 3px 8px rgba(0,0,0,0.12); }
  html[data-theme="dark"] .home-dial-hub::after{ border-color:var(--ds-border-subtle); }
  html[data-theme="dark"] .home-dial-hub-title{ color:var(--ds-text); }
  html[data-theme="dark"] .home-dial-hub-title em{ color:var(--ds-primary); }
  html[data-theme="dark"] .home-dial-hub-hint{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .home-dial-hub-idx{ color:var(--ds-primary); }
  html[data-theme="dark"] .home-dial-hub-idx span{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .home-dial-hub-fig .home-fig .fa{ stroke:var(--ds-border-strong); }
  html[data-theme="dark"] .home-dial-hub-name{ color:var(--ds-text); }
  html[data-theme="dark"] .home-dial-desc{ color:var(--ds-text-muted); }
  html[data-theme="dark"] .home-dial-node[data-on] .home-dial-dot{ background-color:var(--ds-primary) !important; border-color:var(--ds-primary) !important; box-shadow:0 0 0 6px rgba(179,209,241,0.12) !important; }
  html[data-theme="dark"] .home-dial-node[data-on] .home-dial-label{ color:var(--ds-primary) !important; }
  @media (max-width:760px){
    html[data-theme="dark"] .home-dial-hub{ background-color:none; background-image:none; box-shadow:none; }
    html[data-theme="dark"] .home-dial-node{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border); box-shadow:0 1px 4px rgba(0,0,0,0.12); }
    html[data-theme="dark"] .home-dial-node:focus-visible{ outline-color:var(--ds-ring-width, 2px) var(--ds-primary-ring); }
  }
  html[data-theme="dark"] .tour-spot{ box-shadow:0 0 0 2px rgba(77,80,84,0.9),
    0 0 0 4px rgba(179,209,241,0.45),
    0 0 0 9999px rgba(0,0,0,0.7); }
  html[data-theme="dark"] .tour-card{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border); box-shadow:0 24px 60px -20px rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.2); color:var(--ds-text); }
  html[data-theme="dark"] .tour-peek{ border-color:var(--ds-border); background-color:var(--ds-surface-subtle); background-image:none; }
  html[data-theme="dark"] .tour-peek .tp-top b{ color:var(--ds-text); }
  html[data-theme="dark"] .tour-peek .tp-top span{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .tour-peek .tp-actions span{ border-color:var(--ds-border-strong); color:var(--ds-text-muted); background-color:var(--ds-surface); background-image:none; }
  html[data-theme="dark"] .tour-peek .tp-actions .is-primary{ background-color:var(--ds-text); background-image:none; border-color:var(--ds-text); color:var(--ds-surface); }
  html[data-theme="dark"] .tour-peek .tp-sheet{ background-color:#4A4D51; background-image:none; border-color:var(--ds-border-subtle); }
  html[data-theme="dark"] .tour-peek .tp-num{ color:var(--ds-text); }
  html[data-theme="dark"] .tour-peek .tp-title{ background-color:var(--ds-text-faint); background-image:none; }
  html[data-theme="dark"] .tour-peek .tp-rule{ background-color:var(--ds-text); background-image:none; }
  html[data-theme="dark"] .tour-peek .tp-row i{ background-color:var(--ds-border-strong); background-image:none; }
  html[data-theme="dark"] .tour-peek .tp-row.tp-head i{ background-color:var(--ds-text-subtle); background-image:none; }
  html[data-theme="dark"] .tour-peek .tp-note{ background-color:var(--ds-border); background-image:none; }
  html[data-theme="dark"] .tour-count{ color:var(--ds-primary); }
  html[data-theme="dark"] .tour-skip{ background-color:none; background-image:none; color:var(--ds-text-subtle); }
  html[data-theme="dark"] .tour-skip:hover{ color:var(--ds-text); }
  html[data-theme="dark"] .tour-body{ color:var(--ds-text-muted); }
  html[data-theme="dark"] .tour-keys{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .tour-dots i{ background-color:var(--ds-border-strong); background-image:none; }
  html[data-theme="dark"] .tour-dots i.is-on{ background-color:var(--ds-primary); background-image:none; }
  html[data-theme="dark"] .tour-back{ border-color:var(--ds-border-strong); background-color:var(--ds-surface); background-image:none; color:var(--ds-text); }
  html[data-theme="dark"] .tour-back:hover{ border-color:var(--ds-text-subtle); }
  html[data-theme="dark"] .tour-next{ border-color:var(--ds-text); background-color:var(--ds-text); background-image:none; color:var(--ds-surface); }
  html[data-theme="dark"] .tour-next:hover{ background-color:var(--ds-primary); background-image:none; border-color:var(--ds-primary); }
  html[data-theme="dark"] .tour-skip:focus-visible,
html[data-theme="dark"] .tour-back:focus-visible,
html[data-theme="dark"] .tour-next:focus-visible{ outline-color:var(--ds-primary-ring); }
  html[data-theme="dark"] #profile > .section-desc{ color:var(--ds-text-subtle) !important; }
  html[data-theme="dark"] .prof-strip{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border); box-shadow:var(--ds-shadow-1); }
  html[data-theme="dark"] .prof-insts{ border-bottom-color:var(--ds-border); background-color:var(--ds-surface-sunken, transparent); background-image:none; }
  html[data-theme="dark"] .prof-inst{ background-color:transparent; background-image:none; color:var(--ds-text-muted); }
  html[data-theme="dark"] .prof-inst:hover{ color:var(--ds-text); }
  html[data-theme="dark"] .prof-inst.prof-on{ background-color:#575A5F; background-image:none; color:var(--ds-text); }
  html[data-theme="dark"] .prof-inst.prof-on::after{ background-color:var(--ds-primary); background-image:none; }
  html[data-theme="dark"] .prof-strip-head{ border-bottom-color:var(--ds-border); }
  html[data-theme="dark"] .prof-lvls{ background-color:var(--ds-surface-emphasis, #575A5F); background-image:none; border-color:var(--ds-border); }
  html[data-theme="dark"] .prof-lvl{ background-color:transparent; background-image:none; color:var(--ds-text-muted); }
  html[data-theme="dark"] .prof-lvl.prof-on{ background-color:var(--ds-surface); background-image:none; color:var(--ds-text); box-shadow:0 1px 0 rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.16); }
  html[data-theme="dark"] .prof-crit{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .prof-crit select{ border-color:var(--ds-border-strong); background-color:var(--ds-surface); background-image:none; color:var(--ds-text); }
  html[data-theme="dark"] .prof-chip{ border-color:var(--ds-border-strong); background-color:var(--ds-surface); background-image:none; color:var(--ds-text); }
  html[data-theme="dark"] .prof-chip:hover{ background-color:var(--ds-surface-subtle); background-image:none; }
  html[data-theme="dark"] .prof-chip.prof-low{ border-color:var(--ds-destructive); background-color:var(--ds-destructive-tint); background-image:none; color:var(--ds-destructive); }
  html[data-theme="dark"] .prof-chip.prof-low b{ color:var(--ds-destructive); }
  html[data-theme="dark"] .prof-chip.prof-off{ background-color:transparent; background-image:none; color:var(--ds-text-faint); }
  html[data-theme="dark"] .prof-chip.prof-off b{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .prof-foot{ border-top-color:var(--ds-border); background-color:var(--ds-surface-subtle); background-image:none; color:var(--ds-text-subtle); }
  html[data-theme="dark"] .prof-foot-link{ color:var(--ds-text); text-decoration-color:var(--ds-border-strong); }
  html[data-theme="dark"] .prof-card{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border); box-shadow:var(--ds-shadow-1); }
  html[data-theme="dark"] .prof-card-label{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .prof-card-of{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .prof-card-lede{ color:var(--ds-text-muted); }
  html[data-theme="dark"] .prof-card.prof-quiet .prof-card-n{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .prof-dist-title{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .prof-bars{ border-bottom-color:var(--ds-border-strong); }
  html[data-theme="dark"] .prof-bar{ background-color:var(--ds-border); background-image:none; }
  html[data-theme="dark"] .prof-bar.prof-tail{ background-color:var(--pw-fail-tint); background-image:none; }
  html[data-theme="dark"] .prof-bar.prof-here{ background-color:var(--pw-fail); background-image:none; }
  html[data-theme="dark"] .prof-xaxis span{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .prof-xaxis span.prof-here{ color:var(--pw-fail); }
  html[data-theme="dark"] .prof-xaxis span.prof-here::before{ border-left-color:transparent; border-right-color:transparent; border-bottom-color:var(--pw-fail); }
  html[data-theme="dark"] .prof-tailbar{ background-color:var(--ds-surface-emphasis); background-image:none; }
  html[data-theme="dark"] .prof-tailbar-fill{ background-color:var(--pw-fail); background-image:none; }
  html[data-theme="dark"] .prof-read{ color:var(--ds-text-muted); }
  html[data-theme="dark"] .prof-read b{ color:var(--ds-text); }
  html[data-theme="dark"] .prof-read-none{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .prof-se{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .prof-caveat{ border-left-color:var(--ds-border-strong); background-color:var(--ds-surface-subtle); background-image:none; }
  html[data-theme="dark"] .prof-caveat p{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .prof-details > summary{ color:var(--ds-text); border-color:var(--ds-border-strong); background-color:var(--ds-surface); background-image:none; }
  html[data-theme="dark"] .prof-details > summary:hover{ background-color:var(--ds-surface-emphasis); background-image:none; }
  html[data-theme="dark"] .prof-table th,
html[data-theme="dark"] .prof-table td{ border-bottom-color:var(--ds-border-subtle); }
  html[data-theme="dark"] .prof-table th{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .prof-td-na{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .prof-td-hit{ color:var(--pw-fail); }
  html[data-theme="dark"] .prof-precision{ color:var(--ds-text-faint); }
  html[data-theme="dark"] .prof-empty,
html[data-theme="dark"] .viz-empty-card{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border); box-shadow:var(--ds-shadow-1); }
  html[data-theme="dark"] .prof-empty-p,
html[data-theme="dark"] .viz-empty-p{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] .prof-empty-purpose{ color:var(--ds-text); }
  html[data-theme="dark"] .prof-empty-inline{ color:var(--ds-text-subtle); }
  html[data-theme="dark"] body .site-footer{ background:linear-gradient(to bottom, transparent, var(--ds-bg) 70%) !important; }
  html[data-theme="dark"] .footer-menu-btn{ background-color:transparent; background-image:none; color:var(--ds-text-muted); }
  html[data-theme="dark"] .footer-menu-btn:hover,
html[data-theme="dark"] .footer-menu-btn[aria-expanded="true"]{ color:var(--ds-text); background-color:var(--ds-surface-emphasis); background-image:none; }
  html[data-theme="dark"] .footer-menu-list{ background-color:#4A4D51; background-image:none; border-color:var(--ds-border); box-shadow:0 8px 24px rgba(0,0,0,0.24), 0 1px 3px rgba(0,0,0,0.16); }
  html[data-theme="dark"] .footer-menu-list .footer-menu-item:hover,
html[data-theme="dark"] .footer-menu-list .footer-menu-item:focus-visible{ background-color:var(--ds-surface-emphasis) !important; background-image:none !important; }
  html[data-theme="dark"] .footer-menu-sep{ background-color:var(--ds-border); background-image:none; }
  html[data-theme="dark"] .footer-menu-theme{ background-color:transparent; background-image:none; color:var(--ds-text-muted); }
  html[data-theme="dark"] .footer-switch{ background-color:var(--ds-border-strong); background-image:none; }
  html[data-theme="dark"] .footer-switch::after{ background-color:#4A4D51; background-image:none; box-shadow:0 1px 2px rgba(0,0,0,0.5); }
  html[data-theme="dark"] .footer-menu-theme[aria-checked="true"] .footer-switch{ background-color:var(--ds-text); background-image:none; }
  html[data-theme="dark"] body .rb-root.is-open .rb-drawer{ border-left-color:var(--ds-border) !important; box-shadow:-1px 0 0 rgba(0,0,0,0.04) !important; }
  html[data-theme="dark"] body .rb-root.is-overlay .rb-drawer{ box-shadow:-12px 0 32px rgba(0,0,0,0.28) !important; }
  html[data-theme="dark"] .change-formula-line{ color:var(--ds-text-muted); }
  html[data-theme="dark"] body #change-analysis .add-row-actions{ border-top-color:rgba(255,255,255,0.06) !important; }
  html[data-theme="dark"] body #change-analysis .add-row-actions .btn-clear{ color:#D1D2D4 !important; background-color:transparent !important; background-image:none !important; border-color:rgba(255,255,255,0.1) !important; }
  html[data-theme="dark"] body #change-analysis .add-row-actions .btn-clear:hover{ color:#B3D1F1 !important; border-color:rgba(179,209,241,0.3) !important; background-color:rgba(179,209,241,0.04) !important; background-image:none !important; }
  html[data-theme="dark"] .pvt-desc-line{ color:var(--ds-text-muted); }
  html[data-theme="dark"] body .topbar-row-main{ background-color:#4A4D51; background-image:none; border-bottom-color:#5B5E62; }
  html[data-theme="dark"] body .topbar-row-main .topbar-brand{ border-right-color:var(--ds-border); }
  html[data-theme="dark"] body .topbar-row-main .topnav-item::after{ background-color:var(--ds-primary); background-image:none; }
  html[data-theme="dark"] body .topbar .ds-patient-field{ background-color:transparent; background-image:none; border-color:transparent; }
  html[data-theme="dark"] body .topbar .ds-patient-field-label{ color:var(--ds-text-muted); }
  html[data-theme="dark"] body .topbar input.ds-patient-field-input,
html[data-theme="dark"] body .topbar input[type="number"].ds-patient-field-input{ border-color:var(--ds-border-strong) !important; background-color:#4A4D51 !important; background-image:none !important; }
  html[data-theme="dark"] body .topbar input.ds-patient-field-input::placeholder{ color:#C5C7C8; }
  html[data-theme="dark"] body .topbar .ds-patient-field.is-wanted{ border-color:transparent; }
  html[data-theme="dark"] body .topbar .ds-patient-field.is-wanted input.ds-patient-field-input{ border-color:rgba(255,190,185,0.55) !important; }
  html[data-theme="dark"] .topbar-icon-btn{ color:var(--ds-text); background-color:#4A4D51; background-image:none; border-color:var(--ds-border-strong); }
  html[data-theme="dark"] .topbar-icon-btn:hover{ background-color:#505358; background-image:none; }
  html[data-theme="dark"] .topbar-icon-btn:focus-visible{ outline-color:var(--ds-primary-ring, rgba(179,209,241,0.4)); }
  html[data-theme="dark"] .topbar-icon-btn.is-danger{ color:var(--pw-fail); }
  html[data-theme="dark"] body .topbar{ background-color:transparent !important; background-image:none !important; border-bottom-color:transparent !important; box-shadow:none !important; }
  html[data-theme="dark"] body .topbar-row-main{ background-color:transparent; background-image:none; border-bottom-color:transparent; }
  html[data-theme="dark"] body .topbar::before,
html[data-theme="dark"] body .topbar::after{ background-color:#4A4D51; background-image:none; box-shadow:inset 0 -1px 0 var(--ds-border),
    inset 0 -2px 0 rgba(0,0,0,0.6),
    0 1px 0 rgba(0,0,0,0.08); }
  html[data-theme="dark"] body.on-home .topbar-row-main .topbar-brand{ border-right-color:transparent; }
  html[data-theme="dark"] body .topbar-row-main .topbar-brand-home.nav-item.active{ background-color:transparent; background-image:none; }
  html[data-theme="dark"] .edge-drawer{ background-color:var(--ds-surface); background-image:none; border-color:var(--ds-border); box-shadow:var(--ds-shadow-3); }
  html[data-theme="dark"] .edge:not(.is-open):not(.is-peek) .edge-drawer{ box-shadow:none; }
  html[data-theme="dark"] .edge.is-docked .edge-drawer{ box-shadow:var(--ds-shadow-1); }
  html[data-theme="dark"] .edge-drawer-head{ border-bottom-color:var(--ds-border); }
  html[data-theme="dark"] .edge-drawer-title{ color:var(--ds-text); }
  html[data-theme="dark"] .edge-close{ border-color:var(--ds-border); background-color:var(--ds-surface); background-image:none; color:var(--ds-text-muted); }
  html[data-theme="dark"] .edge-close:hover{ background-color:var(--ds-surface-emphasis); background-image:none; color:var(--ds-text); }
  html[data-theme="dark"] .edge-close:focus-visible{ box-shadow:0 0 0 2px var(--ds-primary-ring); }
  html[data-theme="dark"] .edge-drawer-body{ color:var(--ds-text); }
  html[data-theme="dark"] .edge-tab{ background-color:var(--ds-text); background-image:none; color:#4A4D51; box-shadow:-2px 0 10px rgba(0,0,0,0.28); }
  html[data-theme="dark"] .edge-tab:hover{ background-color:#F3F3F3; background-image:none; }
  html[data-theme="dark"] .edge-tab:focus-visible{ box-shadow:0 0 0 3px var(--ds-primary-ring); }
  html[data-theme="dark"] .edge-drawer-body .pvt-panel{ background-color:transparent; background-image:none; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table){ background-color:#4A4D51 !important; background-image:none !important; color:#FFFFFF !important; }
  html[data-theme="dark"] body :is(#change-analysis, #battery) .paper-sheet{ background-color:#4A4D51; background-image:none; border-color:#5B5E63; box-shadow:0 1px 2px rgba(0,0,0,0.1), 0 10px 30px rgba(0,0,0,0.14); }
  html[data-theme="dark"] body :is(#change-analysis, #battery) .paper-sheet > .table-viewport{ background-color:transparent !important; background-image:none !important; box-shadow:none !important; }
  html[data-theme="dark"] .paper-caption{ color:#FFFFFF; }
  html[data-theme="dark"] .paper-caption-title,
html[data-theme="dark"] .paper-caption-input{ color:#FFFFFF; }
  html[data-theme="dark"] body .paper-caption .paper-caption-input{ background-color:transparent !important; background-image:none !important; border-bottom-color:transparent !important; box-shadow:none !important; }
  html[data-theme="dark"] body .paper-caption .paper-caption-input:hover{ border-bottom-color:#D2D3D4 !important; }
  html[data-theme="dark"] body .paper-caption .paper-caption-input:focus{ border-bottom-color:#B3D1F1 !important; }
  html[data-theme="dark"] body :is(#change-analysis, #battery) .paper-sheet > .add-row-actions{ background-color:transparent !important; background-image:none !important; box-shadow:none !important; }
  html[data-theme="dark"] body :is(#change-analysis, #battery) .paper-sheet > .add-row-actions :is(.add-row-btn, .btn){ background-color:none !important; background-image:none !important; box-shadow:none !important; color:#B3D1F1 !important; }
  html[data-theme="dark"] body :is(#change-analysis, #battery) .paper-sheet > .add-row-actions :is(.btn-clear, [data-clear], #bat-clear, .bat-clear-btn){ color:#D4D5D6 !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) thead tr{ background-color:#4A4D51 !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) thead th{ color:#FFFFFF !important; background-color:transparent !important; background-image:none !important; box-shadow:none !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) thead tr:first-child th{ border-top-color:#FFFFFF !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) thead tr:last-child th{ background-image:linear-gradient(#FFFFFF, #FFFFFF) !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) thead .table-group-row th:not(:empty){ background-image:linear-gradient(#FFFFFF, #FFFFFF) !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) tbody td{ background-color:transparent !important; box-shadow:none !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) tbody tr:hover td{ background-color:transparent !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) tbody tr{ background-color:transparent !important; }
  html[data-theme="dark"] body :is(#change-analysis, #battery) .paper-sheet > .table-viewport{ border-bottom-color:#FFFFFF !important; }
  html[data-theme="dark"] body :is(#change-analysis, #battery) .paper-sheet > .table-viewport.paper-more::after{ background:linear-gradient(rgba(74,77,81,0), #4A4D51); }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) td.sig-no{ color:#E0E1E2 !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) :is(td, th).row-num{ color:transparent !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) td.row-num .bat-row-type-tag{ color:#D4D5D6 !important; background-color:none !important; background-image:none !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) tbody tr.group-header .type-badge{ color:#D4D5D6 !important; background-color:none !important; background-image:none !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) tbody tr.group-header td,
html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) tbody tr.group-col-header td{ color:#FFFFFF !important; background-color:transparent !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) :is(td.ca-score, th.d1-head, th.d2-head, th:has(> input.change-date-head-input), td:has(> input[data-f="t1"]), td:has(> input[data-f="t2"]), td.bat-raw-cell, th.bat-raw-head, th.bat-score-head, td:has(> input[data-f="score"])){ background-color:#525559 !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) :is(td.ca-norm, th.ca-norm){ background-color:#515459 !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table){ background-image:var(--paper-lanes, none) !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) tbody :is(td.ca-norm, td.ca-score, td:has(> input[data-f="t1"]), td:has(> input[data-f="t2"]), td.bat-raw-cell, td:has(> input[data-f="score"])){ background-color:transparent !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) tbody tr.ca-norms-strip td{ background-color:#4A4D51 !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) thead .table-group-row th{ background-color:transparent !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) tbody td input{ color:#FFFFFF !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) tbody td input[data-f="name"]{ background-color:transparent !important; background-image:none !important; border-color:transparent !important; box-shadow:none !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) tbody td input[data-f="name"]:hover{ border-bottom-color:#D2D3D4 !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) tbody :is(td.ca-norm, td.ca-score, td:has(> input[data-f="t1"]), td:has(> input[data-f="t2"]), td.bat-raw-cell, td:has(> input[data-f="score"])) input{ background-color:transparent !important; box-shadow:none !important; background-image:linear-gradient(transparent, transparent) !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) tbody :is(td.ca-norm, td.ca-score, td:has(> input[data-f="t1"]), td:has(> input[data-f="t2"]), td.bat-raw-cell, td:has(> input[data-f="score"])) input:placeholder-shown{ background-image:linear-gradient(#9EA0A3, #9EA0A3) !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) tbody td.ca-norm input:placeholder-shown{ background-image:linear-gradient(#8A8D90, #8A8D90) !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) tbody :is(td.ca-norm, td.ca-score, td:has(> input[data-f="t1"]), td:has(> input[data-f="t2"]), td.bat-raw-cell, td:has(> input[data-f="score"])) input:hover:not(:disabled){ background-image:linear-gradient(#D6D7D8, #D6D7D8) !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) tbody td input:focus{ background-color:#4A4D51 !important; box-shadow:none !important; background-image:linear-gradient(#B3D1F1, #B3D1F1) !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) .ca-norms-btn{ color:#D4D5D6 !important; background-color:none !important; background-image:none !important; border-color:transparent !important; box-shadow:none !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) thead th .change-date-head-input:is(:hover, :focus){ border-bottom-color:#D2D3D4 !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) thead th .change-date-head-input{ background-color:transparent !important; background-image:none !important; border-bottom-color:transparent !important; box-shadow:none !important; color:#FFFFFF !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) .ca-norms-btn:hover:not(:disabled){ color:#FFFFFF !important; border-color:#606468 !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) .ca-norms-btn.is-open{ color:#B3D1F1 !important; }
  html[data-theme="dark"] .ca-norms-strip-inner{ color:#E9EAEA; }
  html[data-theme="dark"] .ca-norms-strip-title{ color:#DEDFE0; }
  html[data-theme="dark"] .ca-norms-field-label{ color:#FFFFFF; }
  html[data-theme="dark"] .ca-norms-strip-source{ color:#D4D5D6; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) tbody tr.ca-norms-strip td input{ background-color:#515459 !important; background-image:none !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) tbody tr.ca-norms-strip td input:focus{ background-color:#4A4D51 !important; background-image:none !important; outline-color:#B3D1F1 !important; }
  html[data-theme="dark"] body :is(#change-analysis .table-viewport table.paper-table, #battery .table-viewport table#bat-table.paper-table) tbody tr td input.ca-norm-input.ca-norm-mine{ border-color:#B3D1F1 !important; }
  html[data-theme="dark"] body #battery .bat-table-block:has(> .paper-sheet){ background-color:transparent !important; background-image:none !important; border-color:transparent !important; box-shadow:none !important; }
  html[data-theme="dark"] body #change-analysis .change-method-body > .change-method-panel.active{ background-color:transparent !important; background-image:none !important; border-color:transparent !important; box-shadow:none !important; }
  html[data-theme="dark"] body #change-analysis .change-method-tabs{ border-color:#5B5E63 !important; background-color:#4A4D51 !important; background-image:none !important; }
  html[data-theme="dark"] body :is(#change-analysis, #battery) .ds-inline-bar.paper-bar{ background-color:transparent !important; background-image:none !important; box-shadow:none !important; }
  html[data-theme="dark"] body :is(#change-analysis, #battery) .ds-inline-bar.paper-bar .ds-inline-bar-label{ color:#DEDFE0 !important; }
  html[data-theme="dark"] body :is(#change-analysis, #battery) .ds-inline-bar.paper-bar input[type="text"].ds-inline-bar-input{ border-color:rgba(179,209,241,0.45) !important; color:#FFFFFF !important; }
  html[data-theme="dark"] body :is(#change-analysis, #battery) .ds-inline-bar.paper-bar .ds-inline-bar-input::placeholder{ color:#E9EAEA !important; }
  html[data-theme="dark"] body :is(#change-analysis, #battery) .ds-inline-bar.paper-bar .ds-inline-bar-search > svg{ color:#B3D1F1 !important; }
  html[data-theme="dark"] body :is(#change-analysis, #battery) .ds-inline-bar.paper-bar.is-start input[type="text"].ds-inline-bar-input{ border-color:#B3D1F1 !important; background-color:#4E5256 !important; background-image:none !important; box-shadow:0 0 0 3px rgba(179,209,241,0.12) !important; }
  html[data-theme="dark"] body :is(#change-analysis, #battery) .ds-inline-bar.paper-bar input[type="text"].ds-inline-bar-input:focus{ border-color:#B3D1F1 !important; background-color:#4A4D51 !important; background-image:none !important; box-shadow:0 0 0 3px rgba(179,209,241,0.16) !important; }
  html[data-theme="dark"] .paper-qa-key{ color:#DEDFE0; background-color:#4E5155; background-image:none; border-color:#7B7E82; }
  html[data-theme="dark"] .pta-btn{ background-color:none; background-image:none; box-shadow:none; color:#E9EAEA; }
  html[data-theme="dark"] .pta-btn svg{ color:#B3D1F1; }
  html[data-theme="dark"] .pta-btn:hover{ color:#B3D1F1; }
  html[data-theme="dark"] .pta-btn:focus-visible{ outline-color:#B3D1F1; }
  html[data-theme="dark"] .pta-btn.is-copied{ color:#B8DCBB; }
  html[data-theme="dark"] body :is(#change-analysis, #battery) .paper-sheet > .add-row-actions > .page-table-actions{ border-right-color:#5B5E63; }
  html[data-theme="dark"] body #profile .prof-foot > .page-table-actions{ border-right-color:#5B5E63; }
  html[data-theme="dark"] body #change-analysis .paper-sheet > .change-formula-line{ color:#FFFFFF !important; background-color:none !important; background-image:none !important; }
  html[data-theme="dark"] body #battery .ds-inline-bar-prem .ds-prem-card-header{ background-color:none !important; background-image:none !important; }
  html[data-theme="dark"] body #change-analysis .paper-sheet > .add-row-actions .ca-tour-link{ background-color:none !important; background-image:none !important; box-shadow:none !important; color:#D4D5D6 !important; }
  html[data-theme="dark"] body #change-analysis .paper-sheet > .add-row-actions .ca-tour-link:hover{ color:#FFFFFF !important; }

/* ---- from index.html ---- */
  html[data-theme="dark"] .change-context-panel,
html[data-theme="dark"] .change-setup-grid > .autofill-panel{ border-color:var(--border-soft); background-color:transparent; background-image:none; }
  html[data-theme="dark"] .change-context-panel{ border-color:var(--border-soft) !important; background-color:rgba(79,82,86,0.28); background-image:none; box-shadow:none !important; }
  html[data-theme="dark"] .change-panel-title{ color:var(--muted); }
  html[data-theme="dark"] .change-context-panel label{ color:var(--muted); }
  html[data-theme="dark"] .change-context-panel input,
html[data-theme="dark"] .change-context-panel select{ background-color:var(--paper); background-image:none; }
  html[data-theme="dark"] .change-date-head-input{ border-color:var(--border); background-color:#4A4D51; background-image:none; color:var(--ink-2); box-shadow:0 1px 0 rgba(0,0,0,0.06); }
  html[data-theme="dark"] #change-analysis .input-table th:has(.change-date-head-input){ background-color:transparent !important; background-image:none !important; }
  html[data-theme="dark"] #change-analysis .input-table th .change-date-head-input{ background-color:#4A4D51 !important; background-image:none !important; background-color:#4A4D51 !important; color:var(--muted); }
  html[data-theme="dark"] .change-date-head-input:hover,
html[data-theme="dark"] .change-date-head-input:focus{ border-color:rgba(179,209,241,0.42); background-color:#4A4D51 !important; background-image:none !important; }
  html[data-theme="dark"] .change-method-tabs{ border-top-color:var(--border); border-bottom-color:var(--border); background-color:transparent; background-image:none; box-shadow:none; }
  html[data-theme="dark"] .change-method-tab{ border-color:transparent; border-right-color:var(--border-soft); background-color:var(--paper); background-image:none; color:var(--ink-2); }
  html[data-theme="dark"] .change-method-tab:focus-visible{ box-shadow:inset 0 0 0 2px rgba(179,209,241,0.22); }
  html[data-theme="dark"] .change-method-tab:hover{ background-color:var(--paper); background-image:none; box-shadow:inset 0 1px 0 rgba(0,0,0,0.26); }
  html[data-theme="dark"] .change-method-tab.active{ background-color:rgba(179,209,241,0.035); background-image:none; border-color:transparent; border-right-color:var(--border-soft); box-shadow:inset 0 1px 0 var(--accent); }
  html[data-theme="dark"] .change-method-num{ color:var(--faint); }
  html[data-theme="dark"] .change-method-label{ color:var(--ink); }
  html[data-theme="dark"] .change-method-meta{ color:var(--muted); }
  html[data-theme="dark"] .change-stack-pill{ border-color:var(--border); color:var(--muted); background-color:rgba(79,82,86,0.66); background-image:none; }
  html[data-theme="dark"] .change-method-tab.active .change-stack-pill{ border-color:rgba(179,209,241,0.28); color:var(--accent); background-color:rgba(179,209,241,0.055); background-image:none; }
  html[data-theme="dark"] .change-adjustment-key{ color:var(--muted); }
  html[data-theme="dark"] .change-adjustment-key-title{ color:var(--faint); }
  html[data-theme="dark"] .change-adjustment-key strong{ color:var(--ink-2); }
  html[data-theme="dark"] .change-method-tab.active .change-method-label,
html[data-theme="dark"] .change-method-tab.active .change-method-num{ color:var(--accent); }
  html[data-theme="dark"] .change-method-tab.active .change-method-pill{ color:var(--accent); border-color:rgba(179,209,241,0.3); background-color:var(--paper); background-image:none; }
  html[data-theme="dark"] .change-method-body{ background-color:transparent; background-image:none; box-shadow:none; }
  html[data-theme="dark"] .change-active-copy{ color:var(--ink-2); }
  html[data-theme="dark"] .change-method-panel > .panel,
html[data-theme="dark"] .change-method-panel > .autofill-panel{ background-color:rgba(79,82,86,0.74); background-image:none; border-color:var(--border-soft); }
  html[data-theme="dark"] .change-setup-grid > .autofill-panel{ background-color:rgba(83,86,90,0.82); background-image:none; border-color:var(--border-soft) !important; box-shadow:none; }
  html[data-theme="dark"] #change-analysis .autofill-panel .autofill-row > .field > label{ color:var(--ink); }
  html[data-theme="dark"] #change-analysis .autofill-panel .hint{ color:var(--muted); }
  html[data-theme="dark"] #change-analysis .autofill-panel .combo-input{ background-color:var(--paper); background-image:none; border-color:var(--border); box-shadow:none; }
  html[data-theme="dark"] #change-analysis .autofill-panel .combo-input:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-tint); }
  html[data-theme="dark"] #change-analysis .autofill-panel .combo-list{ background-color:#4A4D51; background-image:none; border-color:var(--border); box-shadow:0 12px 26px rgba(0,0,0,0.22); }
  html[data-theme="dark"] #change-analysis .autofill-panel .combo-item:hover,
html[data-theme="dark"] #change-analysis .autofill-panel .combo-item.highlight{ background-color:var(--accent-tint); background-image:none; color:var(--accent); }
  html[data-theme="dark"] .change-method-panel > .block-title{ border-bottom-color:var(--border); }
  html[data-theme="dark"] .change-method-panel .input-table{ background-color:var(--paper); background-image:none; border-color:var(--border-soft); }

/* ---- SVG colour attributes written by the scripts ---- */
  html[data-theme="dark"] [fill="#000" i]{ fill:#FFFFFF; }
  html[data-theme="dark"] [stroke="#000" i]{ stroke:#FFFFFF; }
  html[data-theme="dark"] [stop-color="#000" i]{ stop-color:#FFFFFF; }
  html[data-theme="dark"] [fill="#1A1410" i]{ fill:#FFFFFF; }
  html[data-theme="dark"] [stroke="#1A1410" i]{ stroke:#FFFFFF; }
  html[data-theme="dark"] [stop-color="#1A1410" i]{ stop-color:#FFFFFF; }
  html[data-theme="dark"] [fill="#1A1A1A" i]{ fill:#FDFDFD; }
  html[data-theme="dark"] [stroke="#1A1A1A" i]{ stroke:#FDFDFD; }
  html[data-theme="dark"] [stop-color="#1A1A1A" i]{ stop-color:#FDFDFD; }
  html[data-theme="dark"] [fill="#1A5430" i]{ fill:#B9DBC1; }
  html[data-theme="dark"] [stroke="#1A5430" i]{ stroke:#B9DBC1; }
  html[data-theme="dark"] [stop-color="#1A5430" i]{ stop-color:#B9DBC1; }
  html[data-theme="dark"] [fill="#2A6640" i]{ fill:#B7DCC1; }
  html[data-theme="dark"] [stroke="#2A6640" i]{ stroke:#B7DCC1; }
  html[data-theme="dark"] [stop-color="#2A6640" i]{ stop-color:#B7DCC1; }
  html[data-theme="dark"] [fill="#2E2E2E" i]{ fill:#F5F5F6; }
  html[data-theme="dark"] [stroke="#2E2E2E" i]{ stroke:#F5F5F6; }
  html[data-theme="dark"] [stop-color="#2E2E2E" i]{ stop-color:#F5F5F6; }
  html[data-theme="dark"] [fill="#333" i]{ fill:#F3F3F4; }
  html[data-theme="dark"] [stroke="#333" i]{ stroke:#F3F3F4; }
  html[data-theme="dark"] [stop-color="#333" i]{ stop-color:#F3F3F4; }
  html[data-theme="dark"] [fill="#3D7550" i]{ fill:#B9DBC2; }
  html[data-theme="dark"] [stroke="#3D7550" i]{ stroke:#B9DBC2; }
  html[data-theme="dark"] [stop-color="#3D7550" i]{ stop-color:#B9DBC2; }
  html[data-theme="dark"] [fill="#3d7550" i]{ fill:#B9DBC2; }
  html[data-theme="dark"] [stroke="#3d7550" i]{ stroke:#B9DBC2; }
  html[data-theme="dark"] [stop-color="#3d7550" i]{ stop-color:#B9DBC2; }
  html[data-theme="dark"] [fill="#5A564F" i]{ fill:#E6E7E8; }
  html[data-theme="dark"] [stroke="#5A564F" i]{ stroke:#E6E7E8; }
  html[data-theme="dark"] [stop-color="#5A564F" i]{ stop-color:#E6E7E8; }
  html[data-theme="dark"] [fill="#666" i]{ fill:#E1E2E2; }
  html[data-theme="dark"] [stroke="#666" i]{ stroke:#E1E2E2; }
  html[data-theme="dark"] [stop-color="#666" i]{ stop-color:#E1E2E2; }
  html[data-theme="dark"] [fill="#6B6660" i]{ fill:#E1E1E2; }
  html[data-theme="dark"] [stroke="#6B6660" i]{ stroke:#E1E1E2; }
  html[data-theme="dark"] [stop-color="#6B6660" i]{ stop-color:#E1E1E2; }
  html[data-theme="dark"] [fill="#6B6760" i]{ fill:#E0E1E2; }
  html[data-theme="dark"] [stroke="#6B6760" i]{ stroke:#E0E1E2; }
  html[data-theme="dark"] [stop-color="#6B6760" i]{ stop-color:#E0E1E2; }
  html[data-theme="dark"] [fill="#6B6B6B" i]{ fill:#DFE0E1; }
  html[data-theme="dark"] [stroke="#6B6B6B" i]{ stroke:#DFE0E1; }
  html[data-theme="dark"] [stop-color="#6B6B6B" i]{ stop-color:#DFE0E1; }
  html[data-theme="dark"] [fill="#6B7A5C" i]{ fill:#D3E4C3; }
  html[data-theme="dark"] [stroke="#6B7A5C" i]{ stroke:#D3E4C3; }
  html[data-theme="dark"] [stop-color="#6B7A5C" i]{ stop-color:#D3E4C3; }
  html[data-theme="dark"] [fill="#7a8a9a" i]{ fill:#C8D9EB; }
  html[data-theme="dark"] [stroke="#7a8a9a" i]{ stroke:#C8D9EB; }
  html[data-theme="dark"] [stop-color="#7a8a9a" i]{ stop-color:#C8D9EB; }
  html[data-theme="dark"] [fill="#888" i]{ fill:#D6D7D8; }
  html[data-theme="dark"] [stroke="#888" i]{ stroke:#D6D7D8; }
  html[data-theme="dark"] [stop-color="#888" i]{ stop-color:#D6D7D8; }
  html[data-theme="dark"] [fill="#8A867E" i]{ fill:#D6D7D8; }
  html[data-theme="dark"] [stroke="#8A867E" i]{ stroke:#D6D7D8; }
  html[data-theme="dark"] [stop-color="#8A867E" i]{ stop-color:#D6D7D8; }
  html[data-theme="dark"] [fill="#9A968D" i]{ fill:#D1D2D4; }
  html[data-theme="dark"] [stroke="#9A968D" i]{ stroke:#D1D2D4; }
  html[data-theme="dark"] [stop-color="#9A968D" i]{ stop-color:#D1D2D4; }
  html[data-theme="dark"] [fill="#9C3D2A" i]{ fill:#B3D1F1; }
  html[data-theme="dark"] [stroke="#9C3D2A" i]{ stroke:#B3D1F1; }
  html[data-theme="dark"] [stop-color="#9C3D2A" i]{ stop-color:#B3D1F1; }
  html[data-theme="dark"] [fill="#A88818" i]{ fill:#E3D099; }
  html[data-theme="dark"] [stroke="#A88818" i]{ stroke:#E3D099; }
  html[data-theme="dark"] [stop-color="#A88818" i]{ stop-color:#E3D099; }
  html[data-theme="dark"] [fill="#A8A29E" i]{ fill:#CDCED0; }
  html[data-theme="dark"] [stroke="#A8A29E" i]{ stroke:#CDCED0; }
  html[data-theme="dark"] [stop-color="#A8A29E" i]{ stop-color:#CDCED0; }
  html[data-theme="dark"] [fill="#B5631C" i]{ fill:#FAC49F; }
  html[data-theme="dark"] [stroke="#B5631C" i]{ stroke:#FAC49F; }
  html[data-theme="dark"] [stop-color="#B5631C" i]{ stop-color:#FAC49F; }
  html[data-theme="dark"] [fill="#CFC9BF" i]{ fill:#898B8E; }
  html[data-theme="dark"] [stroke="#CFC9BF" i]{ stroke:#898B8E; }
  html[data-theme="dark"] [stop-color="#CFC9BF" i]{ stop-color:#898B8E; }
  html[data-theme="dark"] [fill="#ECDCD5" i]{ fill:#5C6064; }
  html[data-theme="dark"] [stroke="#ECDCD5" i]{ stroke:#5C6064; }
  html[data-theme="dark"] [stop-color="#ECDCD5" i]{ stop-color:#5C6064; }
  html[data-theme="dark"] [fill="#F7F4EF" i]{ fill:#505358; }
  html[data-theme="dark"] [stroke="#F7F4EF" i]{ stroke:#505358; }
  html[data-theme="dark"] [stop-color="#F7F4EF" i]{ stop-color:#505358; }
  html[data-theme="dark"] [fill="#FDFAF6" i]{ fill:#4D5054; }
  html[data-theme="dark"] [stroke="#FDFAF6" i]{ stroke:#4D5054; }
  html[data-theme="dark"] [stop-color="#FDFAF6" i]{ stop-color:#4D5054; }
  html[data-theme="dark"] [fill="#FFFFFF" i]{ fill:#4A4D51; }
  html[data-theme="dark"] [stroke="#FFFFFF" i]{ stroke:#4A4D51; }
  html[data-theme="dark"] [stop-color="#FFFFFF" i]{ stop-color:#4A4D51; }
  html[data-theme="dark"] [fill="#fff" i]{ fill:#4A4D51; }
  html[data-theme="dark"] [stroke="#fff" i]{ stroke:#4A4D51; }
  html[data-theme="dark"] [stop-color="#fff" i]{ stop-color:#4A4D51; }
  html[data-theme="dark"] [fill="rgba(156,61,42,0.035)" i]{ fill:rgba(179,209,241,0.035); }
  html[data-theme="dark"] [stroke="rgba(156,61,42,0.035)" i]{ stroke:rgba(179,209,241,0.035); }
  html[data-theme="dark"] [stop-color="rgba(156,61,42,0.035)" i]{ stop-color:rgba(179,209,241,0.035); }
  html[data-theme="dark"] [fill="rgba(156,61,42,0.055)" i]{ fill:rgba(179,209,241,0.055); }
  html[data-theme="dark"] [stroke="rgba(156,61,42,0.055)" i]{ stroke:rgba(179,209,241,0.055); }
  html[data-theme="dark"] [stop-color="rgba(156,61,42,0.055)" i]{ stop-color:rgba(179,209,241,0.055); }
  html[data-theme="dark"] [fill="rgba(156,61,42,0.13)" i]{ fill:rgba(179,209,241,0.13); }
  html[data-theme="dark"] [stroke="rgba(156,61,42,0.13)" i]{ stroke:rgba(179,209,241,0.13); }
  html[data-theme="dark"] [stop-color="rgba(156,61,42,0.13)" i]{ stop-color:rgba(179,209,241,0.13); }
  html[data-theme="dark"] [fill="rgba(156,61,42,0.22)" i]{ fill:rgba(179,209,241,0.22); }
  html[data-theme="dark"] [stroke="rgba(156,61,42,0.22)" i]{ stroke:rgba(179,209,241,0.22); }
  html[data-theme="dark"] [stop-color="rgba(156,61,42,0.22)" i]{ stop-color:rgba(179,209,241,0.22); }
  html[data-theme="dark"] [fill="rgba(156,61,42,0.28)" i]{ fill:rgba(179,209,241,0.28); }
  html[data-theme="dark"] [stroke="rgba(156,61,42,0.28)" i]{ stroke:rgba(179,209,241,0.28); }
  html[data-theme="dark"] [stop-color="rgba(156,61,42,0.28)" i]{ stop-color:rgba(179,209,241,0.28); }
  html[data-theme="dark"] [fill="rgba(156,61,42,0.30)" i]{ fill:rgba(179,209,241,0.3); }
  html[data-theme="dark"] [stroke="rgba(156,61,42,0.30)" i]{ stroke:rgba(179,209,241,0.3); }
  html[data-theme="dark"] [stop-color="rgba(156,61,42,0.30)" i]{ stop-color:rgba(179,209,241,0.3); }
  html[data-theme="dark"] [fill="rgba(156,61,42,0.42)" i]{ fill:rgba(179,209,241,0.42); }
  html[data-theme="dark"] [stroke="rgba(156,61,42,0.42)" i]{ stroke:rgba(179,209,241,0.42); }
  html[data-theme="dark"] [stop-color="rgba(156,61,42,0.42)" i]{ stop-color:rgba(179,209,241,0.42); }
  html[data-theme="dark"] [fill="rgba(20,18,14,0.03)" i]{ fill:rgba(255,255,255,0.03); }
  html[data-theme="dark"] [stroke="rgba(20,18,14,0.03)" i]{ stroke:rgba(255,255,255,0.03); }
  html[data-theme="dark"] [stop-color="rgba(20,18,14,0.03)" i]{ stop-color:rgba(255,255,255,0.03); }
  html[data-theme="dark"] [fill="rgba(20,20,20,0.18)" i]{ fill:rgba(255,255,255,0.18); }
  html[data-theme="dark"] [stroke="rgba(20,20,20,0.18)" i]{ stroke:rgba(255,255,255,0.18); }
  html[data-theme="dark"] [stop-color="rgba(20,20,20,0.18)" i]{ stop-color:rgba(255,255,255,0.18); }
  html[data-theme="dark"] [fill="rgba(20,20,20,0.85)" i]{ fill:rgba(255,255,255,0.85); }
  html[data-theme="dark"] [stroke="rgba(20,20,20,0.85)" i]{ stroke:rgba(255,255,255,0.85); }
  html[data-theme="dark"] [stop-color="rgba(20,20,20,0.85)" i]{ stop-color:rgba(255,255,255,0.85); }
  html[data-theme="dark"] [fill="rgba(244,240,232,0.82)" i]{ fill:rgba(83,86,90,0.82); }
  html[data-theme="dark"] [stroke="rgba(244,240,232,0.82)" i]{ stroke:rgba(83,86,90,0.82); }
  html[data-theme="dark"] [stop-color="rgba(244,240,232,0.82)" i]{ stop-color:rgba(83,86,90,0.82); }
  html[data-theme="dark"] [fill="rgba(250,247,241,0.28)" i]{ fill:rgba(79,82,86,0.28); }
  html[data-theme="dark"] [stroke="rgba(250,247,241,0.28)" i]{ stroke:rgba(79,82,86,0.28); }
  html[data-theme="dark"] [stop-color="rgba(250,247,241,0.28)" i]{ stop-color:rgba(79,82,86,0.28); }
  html[data-theme="dark"] [fill="rgba(250,247,241,0.66)" i]{ fill:rgba(79,82,86,0.66); }
  html[data-theme="dark"] [stroke="rgba(250,247,241,0.66)" i]{ stroke:rgba(79,82,86,0.66); }
  html[data-theme="dark"] [stop-color="rgba(250,247,241,0.66)" i]{ stop-color:rgba(79,82,86,0.66); }
  html[data-theme="dark"] [fill="rgba(250,247,241,0.74)" i]{ fill:rgba(79,82,86,0.74); }
  html[data-theme="dark"] [stroke="rgba(250,247,241,0.74)" i]{ stroke:rgba(79,82,86,0.74); }
  html[data-theme="dark"] [stop-color="rgba(250,247,241,0.74)" i]{ stop-color:rgba(79,82,86,0.74); }
  html[data-theme="dark"] [fill="rgba(60,40,20,0.11)" i]{ fill:rgba(255,244,234,0.11); }
  html[data-theme="dark"] [stroke="rgba(60,40,20,0.11)" i]{ stroke:rgba(255,244,234,0.11); }
  html[data-theme="dark"] [stop-color="rgba(60,40,20,0.11)" i]{ stop-color:rgba(255,244,234,0.11); }
}

/* ==== HAND-WRITTEN BELOW: tools/dark.js keeps everything after this line ==== */

/* Hand-written night mode: what the formula in tools/dark.js cannot judge.
   Loaded last, and each rule here is html[data-theme="dark"]-scoped. */
@media screen{
  /* Native controls, scrollbars and the like draw dark too. */
  html[data-theme="dark"]{ color-scheme: dark; }

  /* The page sits darker than its cards, as in light mode. Turned over by
     the formula, the parchment (#F2EFE9) came out lighter than the white
     cards (#FFFFFF), which reads as every card being sunk into the page. */
  html[data-theme="dark"]{ --ds-bg: #3E4145; }
  html[data-theme="dark"] body,
  html[data-theme="dark"] .main{ background-color: #3E4145; }
  /* Paper. A table in the Working Report is a picture of the document it
     will become, so it stays black on white, and so do Preview's pages. The
     generator skips their rules (PAPER in tools/dark.js); here they get their
     paper back, with the colour tokens reset to their light values inside it,
     so rules written with var() still draw dark ink. */
  html[data-theme="dark"] .rb-item-rendered,
  html[data-theme="dark"] .rb-drawer-body.is-preview-mode .rb-item,
  html[data-theme="dark"] .rb-drawer-body.is-preview-mode .rb-empty{
    --ds-bg: #F2EFE9; --ds-surface: #FDFAF6; --ds-surface-subtle: #F7F4EF; --ds-surface-emphasis: #EDE8E0;
    --ds-text: #1A1410; --ds-text-muted: #4D4840; --ds-text-subtle: #6E6860; --ds-text-faint: #9E9890;
    --ds-border: rgba(20,15,8,0.10); --ds-border-strong: rgba(20,15,8,0.18); --ds-border-subtle: rgba(20,15,8,0.06);
    --ink: #1A1410; --muted: #6E6860; --faint: #9E9890; --border: rgba(20,15,8,0.10); --border-soft: rgba(20,15,8,0.06);
    color-scheme: light;
    background-color: #FFFFFF;
    color: #000000;
  }
  html[data-theme="dark"] .rb-item-rendered{ padding: 10px 12px; border-radius: var(--ds-radius-sm); }
  html[data-theme="dark"] .rb-drawer-body.is-preview-mode .rb-item-rendered{ padding: 0; }
  /* Preview's desk: Word's print-view grey, turned dark. */
  html[data-theme="dark"] .rb-drawer-body.is-preview-mode{ background-color: #52565B; }
  /* The Quick Add box is the place to type, so it is lighter than its bar here,
     as it is whiter than its bar in light mode (owner request, 2026-10). The
     selector list matches the light rule's own, so it wins by order. */
  html[data-theme="dark"] .ds-inline-bar-input,
  html[data-theme="dark"] input.ds-inline-bar-input,
  html[data-theme="dark"] input[type="text"].ds-inline-bar-input{ background-color: #5C6066 !important; }
  /* The logo keeps its own colours, as the favicon and app icon do: turned
     over by the formula the oxblood came out salmon (#EB846E), under which
     the cream strokes all but vanished. */
  html[data-theme="dark"] .ds-brand-mark,
  html[data-theme="dark"] .ds-brand-mark::before{ background-color: #9C3D2A; }
  /* Results that reach the accent through a variable are pointed at these by
     the generator (toFailVars): the accent tokens turn steel blue, a failed
     result stays red. Soft red to match the generated fail colours. */
  html[data-theme="dark"]{ --pw-fail: #F4B4AA; --pw-fail-tint: rgba(110,36,32,0.38); --pw-fail-ring: rgba(244,180,170,0.45); }
}

