/* Customer appearance is independent of the admin workspace preference.
   Product photography keeps its original colours and white background. */
html[data-storefront-theme="light"] { color-scheme: light; }
html[data-storefront-theme="dark"] {
  color-scheme: dark;
  --sf-bg: #101e28;
  --sf-panel: #172a35;
  --sf-raised: #1d3440;
  --sf-soft: #142630;
  --sf-text: #e3edf1;
  --sf-muted: #afc2cd;
  --sf-line: #38505e;
  --sf-accent: #7dd7d1;
  --sf-link: #a4e5e1;
  --lab-ink: var(--sf-text);
  --lab-muted: var(--sf-muted);
  --lab-teal: var(--sf-accent);
  --lab-blue: #94beff;
  --lab-line: var(--sf-line);
  --lab-soft: var(--sf-soft);
  background: var(--sf-bg);
}
[data-storefront-theme-toggle],
body .cp-button.cp-theme-toggle[data-storefront-theme-toggle] {
  appearance: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  flex: 0 0 44px;
  padding: 10px;
  border: 1px solid #dce7eb;
  border-radius: 9px;
  color: #294855;
  background: #fff;
  cursor: pointer;
  vertical-align: middle;
  line-height: 1;
}
[data-storefront-theme-toggle]:not([hidden]) { display: inline-flex; }
[data-storefront-theme-toggle][hidden] { display: none !important; }
[data-storefront-theme-toggle]:hover { background: #eef7f7; border-color: #aac8cc; }
[data-storefront-theme-toggle]:focus-visible { outline: 3px solid #087f83; outline-offset: 3px; }
[data-storefront-theme-toggle] svg { display: block; width: 20px; height: 20px; flex: 0 0 20px; }
[data-storefront-theme-toggle] :is(.storefront-theme-sun, .cp-theme-icon-sun) { display: none; }
html[data-storefront-theme="dark"] [data-storefront-theme-toggle] :is(.storefront-theme-sun, .cp-theme-icon-sun) { display: block; }
html[data-storefront-theme="dark"] [data-storefront-theme-toggle] :is(.storefront-theme-moon, .cp-theme-icon-moon) { display: none; }
.cp-theme-standalone { display: flex; justify-content: flex-end; gap: .6rem; margin-bottom: .75rem; }
html[data-storefront-theme="dark"] body {
  --lab-ink: var(--sf-text);
  --lab-muted: var(--sf-muted);
  --lab-teal: var(--sf-accent);
  --lab-line: var(--sf-line);
  --lab-soft: var(--sf-soft);
  --core-ink: var(--sf-text);
  --core-navy: var(--sf-text);
  --core-muted: var(--sf-muted);
  --core-line: var(--sf-line);
  --core-soft: var(--sf-soft);
  --core-logo-blue: #94beff;
  --bs-body-color: var(--sf-text);
  --bs-body-bg: var(--sf-bg);
  --bs-secondary-color: var(--sf-muted);
  --bs-border-color: var(--sf-line);
  --bs-link-color: var(--sf-link);
  --bs-link-hover-color: #cff8f4;
  color: var(--sf-text);
  background: var(--sf-bg) !important;
}
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(h1, h2, h3, h4, h5, h6) { color: var(--sf-text); }
html[data-storefront-theme="dark"] body a { color: var(--sf-link); }
html[data-storefront-theme="dark"] body a:hover { color: #cff8f4; }
html[data-storefront-theme="dark"] body :focus-visible { outline-color: var(--sf-accent); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.bg-white, .bg-light) { background: var(--sf-panel) !important; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.text-muted, .text-secondary, .cp-muted) { color: var(--sf-muted) !important; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.text-dark, .text-body, .text-body-emphasis) { color: var(--sf-text) !important; }
html[data-storefront-theme="dark"] body .text-primary { color: #a7c9ff !important; }
html[data-storefront-theme="dark"] body .text-success { color: #a3dcc0 !important; }
html[data-storefront-theme="dark"] body .text-danger { color: #ffbdb2 !important; }
html[data-storefront-theme="dark"] body .border { border-color: var(--sf-line) !important; }
html[data-storefront-theme="dark"] body hr { border-color: var(--sf-line); opacity: 1; }
/* Header chrome and navigation. */
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-nav, .precision-nav, .lab-customer-header, .lab-checkout-header, .cp-mobile-menu) {
  color: var(--sf-text);
  background: rgba(16, 30, 40, .98);
  border-color: var(--sf-line);
}
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-nav-link, .cp-mobile-menu-link, .lab-customer-nav-links a) { color: var(--sf-text); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body .cp-mobile-menu-link { background: var(--sf-panel); }
html[data-storefront-theme="dark"] body.lab-storefront .cp-mobile-menu-link:is(:hover, :focus-visible, [aria-current="page"]) { color: var(--sf-link); background: var(--sf-raised); border-color: var(--sf-accent); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-trustbar, .lab-customer-strip, .lab-order-strip, .precision-trust-strip) { color: #d3e3e9; background: #091720; border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-logo-image, .cp-logo img, .lab-customer-brand img, img[alt="Core Peptides"]) { background: #fff; border-radius: 6px; padding: 3px 8px; box-sizing: border-box; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-nav, .precision-nav, .lab-checkout-header, .lab-customer-header) [data-storefront-theme-toggle],
html[data-storefront-theme="dark"] body .cp-button.cp-theme-toggle[data-storefront-theme-toggle] { color: var(--sf-text); background: var(--sf-panel); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body .cp-button.cp-theme-toggle[data-storefront-theme-toggle]:hover { background: var(--sf-raised); border-color: #81aaa9; }
html[data-storefront-theme="dark"] body .lab-customer-header-actions a[aria-current="page"] { color: var(--sf-link); background: #25484c !important; border-color: #659a9a !important; }
/* Shared panels. These are explicit surfaces; photo areas stay white below. */
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-page, .lab-order-main, .lab-customer-main, .precision-paths, .cp-band) { background: var(--sf-bg); }
html[data-storefront-theme="dark"] body.lab-catalogue-page #catalogue { background: var(--sf-bg); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-product-card, .cp-card, .cp-panel, .cp-product-panel, .cp-coa-card, .cp-standard, .cp-guide-card, .cp-add-modal-card, .lab-documents-card, .lab-contact-channel, .account-order-card, .account-details, .account-help, .account-empty, .lab-account-tool, .account-reorder-line, .lab-summary-card, .precision-checkout-summary, .precision-code-details, .precision-empty, .cp-guide-article > header, .cp-guide-article > section, .cp-article, .quote-card) {
  color: var(--sf-text);
  border-color: var(--sf-line);
  background: var(--sf-panel);
  box-shadow: none;
}
html[data-storefront-theme="dark"] body .cp-product-card:hover { border-color: #688c99; box-shadow: 0 12px 32px #0003; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-purchase-card, .cp-storage-panel, .cp-info-box, .lab-auth-aside, .lab-verification-card, .account-address, .cp-summary-item, .lab-parcel-card, .lab-contact-email, .lab-contact-essentials, .lab-contact-scope, .lab-delivery-note, .cp-delivery-note, .cp-account-option, .account-reorder-notice, .lab-checkout-notice, .cp-guide-notice, .cp-guide-figure, .quote-meta, .research-note) {
  color: var(--sf-text);
  background: var(--sf-soft);
  border-color: var(--sf-line);
}
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.lab-verification-card, .lab-parcel-card) { border-color: var(--sf-line) !important; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.lab-reference-section > div, .lab-reference-section .border) { background: var(--sf-panel) !important; border-color: var(--sf-line) !important; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.lab-info-scope, .account-welcome) { background: #153b45; border-color: #396270; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.lab-info-scope h2, .account-welcome h1) { color: #f0f8fa; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.lab-info-scope p, .account-welcome p, .account-welcome-stats) { color: #c8dde3; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-account-benefit, .lab-info-step-number, .lab-line-icon) { color: var(--sf-link); background: var(--sf-soft); border-color: #45616f; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.account-shortcuts a, .precision-path-link) { color: var(--sf-text); background: var(--sf-panel); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.account-shortcuts a:hover, .precision-path-link:hover) { background: var(--sf-raised); border-color: #7d9ea6; }
/* Buttons keep a strong light-on-dark hierarchy in both customer flows. */
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.lab-storefront, .precision-page) { color: var(--sf-text); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page) .cp-button,
html[data-storefront-theme="dark"] body .btn-primary { color: #0c2b2f; background: var(--sf-accent); border-color: var(--sf-accent); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page) .cp-button:hover,
html[data-storefront-theme="dark"] body .btn-primary:hover { color: #082327; background: #a4e6e0; border-color: #a4e6e0; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page) .cp-button.secondary,
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.btn-outline-dark, .btn-outline-primary, .btn-outline-secondary) { color: var(--sf-text); background: var(--sf-panel); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page) .cp-button.secondary:hover,
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.btn-outline-dark:hover, .btn-outline-primary:hover, .btn-outline-secondary:hover) { color: var(--sf-link); background: var(--sf-raised); border-color: #7faaa9; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-button, .btn):disabled { opacity: .5; }
html[data-storefront-theme="dark"] body .account-signout { color: #ecf7f8; background: transparent; border-color: #6a929e; }
/* Inputs, search, variants and selected states. */
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light) :is(.form-control, .form-select, .cp-variant-select, .cp-product-search input),
html[data-storefront-theme="dark"] body input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]),
html[data-storefront-theme="dark"] body select,
html[data-storefront-theme="dark"] body textarea {
  color: var(--sf-text);
  background-color: #10232e;
  border-color: #55717f;
  caret-color: var(--sf-accent);
}
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(input, textarea)::placeholder { color: #a3b8c4; opacity: 1; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(input, select, textarea):focus { color: var(--sf-text); background-color: #142b37; border-color: var(--sf-accent); box-shadow: 0 0 0 3px #7dd7d126; }
html[data-storefront-theme="dark"] body input:autofill { box-shadow: inset 0 0 0 1000px #17323d; -webkit-text-fill-color: var(--sf-text); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.form-label, .form-check-label, .form-text, .cp-product-search svg) { color: var(--sf-muted); }
html[data-storefront-theme="dark"] body .form-check-input { background-color: #10232e; border-color: #7f9da9; }
html[data-storefront-theme="dark"] body .form-check-input:checked { background-color: #167c82; border-color: var(--sf-accent); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page) :is(.cp-filter-button, .cp-variant-button, .cp-variant-link) { color: var(--sf-text); background: var(--sf-panel); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page) :is(.cp-filter-button.active, .cp-filter-button:hover, .cp-variant-button.active, .cp-variant-link.active) { color: #d8fffa; background: #245359; border-color: #74b6b5; }
/* Legacy guide and calculator surfaces share the customer theme as well. */
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-note, .cp-planner, .cp-result, .cp-blend-panel, .cp-blend-dose > div, .cp-product-picker, .cp-product-option, .cp-selected-product) { color: var(--sf-text); background: var(--sf-panel); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-mode-switch, .cp-setup-summary span) { color: var(--sf-muted); background: var(--sf-soft); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-mode-button.active, .cp-product-option.selected, .cp-product-option:hover) { color: var(--sf-link); background: #245359; border-color: #74b6b5; }
html[data-storefront-theme="dark"] body .cp-primary-result > div { background: #183d48; color: #e8f6f8; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-product-type, .cp-kicker, .precision-kicker, .precision-path-number, .cp-eyebrow) { color: var(--sf-accent); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-primary-result strong, .cp-selected-product strong, .cp-dose-value) { color: var(--sf-text); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-note, .cp-setup-summary span) { color: var(--sf-muted); }
html[data-storefront-theme="dark"] body .precision-path-grid > a { color: var(--sf-text); background: var(--sf-panel); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body .precision-path-grid > a:nth-child(2) { background: #1b3e49; }
html[data-storefront-theme="dark"] body .precision-path-grid p { color: var(--sf-muted); }
/* Body copy that was deliberately muted in the light design. */
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page) :is(.cp-card-spec, .cp-product-spec, .cp-card-price .small, .cp-card-price .text-end, .cp-product-description, .cp-card-coa, .cp-product-research, .cp-detail-line, .cp-purchase-meta, .lab-product-spec, .lab-gallery-hint, .lab-gallery-heading, .lab-document-caption, .lab-purchase-note, .lab-research-note, .lab-hero-description, .lab-info-intro, .lab-info-principles p, .lab-info-section-copy > p, .lab-info-steps p, .lab-contact-channel > p, .lab-contact-bottom p, .lab-summary-note, .lab-research-note, .lab-payment-note, .cp-guide-article p, .cp-guide-article li) { color: var(--sf-muted); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page) .cp-card-spec { color: var(--sf-muted) !important; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page) :is(.cp-price, .cp-card-title a, .cp-product-title, .cp-section-title h2, .cp-info-box strong, .lab-catalogue-help, .lab-text-link, .lab-contact-address, .lab-table-product strong, .lab-product-name) { color: var(--sf-text); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page) :is(.cp-card-information a, .cp-card-coa a[data-variant-coa-link], .lab-document-card a, .lab-use-note a, .lab-reference-section a) { color: var(--sf-link); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page) .cp-card-price { border-color: var(--sf-line) !important; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.account-order-meta, .account-profile-form, .lab-form-section, .lab-panel-heading, .lab-summary-row, .lab-summary-total, .lab-basket-bottom, .lab-product-document, .cp-gallery-thumbs, .lab-document-card, .precision-product-details, .cp-guide-article section, .lab-info-principles, .lab-info-principles article + article, .lab-info-steps li + li, .lab-account-feature, .lab-auth-aside > p) { border-color: var(--sf-line); }
/* Stock, popularity and messages preserve distinct meanings in dark mode. */
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page) :is(.cp-badge[data-state], .cp-purchase-status, .cp-stock-status, .account-status, .lab-order-state) { color: #b6ead0; background: #173f34; border-color: #3d6d5b; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page) :is(.cp-badge[data-state="out"], .cp-purchase-status[data-state="out"], .cp-stock-status[data-state="out"]) { color: #c2cedb; background: #2a3746; border-color: #506073; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page) :is(.cp-badge[data-state="lead_time"], .cp-badge[data-state="incoming"], .cp-purchase-status[data-state="lead_time"], .cp-purchase-status[data-state="incoming"], .lab-order-state[data-state="awaiting_stock"], .precision-lead-time) { color: #f1d29c; background: #403624; border-color: #79613a; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page) .cp-popular-badge { color: #f8d29e; background: #443321; border-color: #7f5d35; }
html[data-storefront-theme="dark"] body .alert-info { color: #c6e9ee; background: #193a47; border-color: #3f6b78; }
html[data-storefront-theme="dark"] body .alert-success { color: #c5ecd7; background: #193c31; border-color: #3c6c56; }
html[data-storefront-theme="dark"] body .alert-warning { color: #f5dcad; background: #3f3523; border-color: #75613d; }
html[data-storefront-theme="dark"] body .alert-danger { color: #ffd0d3; background: #482c32; border-color: #89545f; }
html[data-storefront-theme="dark"] body .alert a { color: inherit; }
html[data-storefront-theme="dark"] body :is(.alert-light, .alert-secondary) { color: var(--sf-text); background: var(--sf-raised); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body .quote-total { color: var(--sf-text); }
html[data-storefront-theme="dark"] body .quote-meta span { color: var(--sf-muted); }
html[data-storefront-theme="dark"] body .pay-button { color: #0c2b2f; background: var(--sf-accent); }
html[data-storefront-theme="dark"] body .secondary-button { color: var(--sf-text); background: var(--sf-raised); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body.lab-checkout-page #checkout-form .form-check { color: var(--sf-text); background: var(--sf-panel); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body.lab-checkout-page #checkout-form .form-check:has(input:required) { background: var(--sf-soft); }
html[data-storefront-theme="dark"] body.lab-checkout-page #checkout-form .form-check-input:checked { background-color: #167c82; border-color: var(--sf-accent); }
html[data-storefront-theme="dark"] body.lab-checkout-page .precision-checkout-steps li::before { color: var(--sf-muted); background: var(--sf-raised); }
html[data-storefront-theme="dark"] body.lab-checkout-page .precision-checkout-steps li[aria-current="step"]::before { color: #0c2b2f; background: var(--sf-accent); }
html[data-storefront-theme="dark"] body.lab-checkout-page .lab-form-section legend span { color: var(--sf-link); background: var(--sf-soft); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body.lab-checkout-page .cp-cart-line { color: var(--sf-text); background: var(--sf-panel); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body.lab-checkout-page .lab-remove-button { color: #ffbdb2; }
html[data-storefront-theme="dark"] body.lab-checkout-page .lab-remove-button:is(:hover, :focus-visible) { color: #ffe1da; }
html[data-storefront-theme="dark"] body.lab-checkout-page .lab-summary-row.lab-summary-discount,
html[data-storefront-theme="dark"] body.lab-checkout-page .lab-summary-row.lab-summary-discount > :last-child { color: #a3dcc0; }
html[data-storefront-theme="dark"] body:has(> .cp-theme-standalone) > main { color: var(--sf-text); background: var(--sf-panel); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body:has(> .cp-theme-standalone) > main p { color: var(--sf-muted); }
html[data-storefront-theme="dark"] body > main[style]:has(> .cp-theme-standalone) { color: var(--sf-text); background: var(--sf-panel) !important; }
/* Tables use Bootstrap's table variables so rows cannot revert to white. */
html[data-storefront-theme="dark"] body .table {
  --bs-table-color: var(--sf-text);
  --bs-table-bg: var(--sf-panel);
  --bs-table-border-color: var(--sf-line);
  --bs-table-striped-color: var(--sf-text);
  --bs-table-striped-bg: #1c333e;
  --bs-table-hover-color: var(--sf-text);
  --bs-table-hover-bg: #213b47;
  color: var(--sf-text);
  border-color: var(--sf-line);
}
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.table thead th, .lab-documents-card thead th, .cp-cart-table thead th) { color: var(--sf-muted); background: var(--sf-soft); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.table td, .table th, .cp-cart-line) { border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body .table caption { color: var(--sf-muted); }
/* Full-size product images remain unfiltered for label inspection. */
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-card-visual, .cp-product-image, .cp-gallery-main, .cp-gallery-main img, .cp-gallery-thumb, .cp-mobile-image img, .precision-cart-photo, .account-order-product img, .account-reorder-line img, .cp-lightbox-image) { background: #fff; color-scheme: light; }
html[data-storefront-theme="dark"] body .cp-gallery { color: var(--sf-text); background: var(--sf-panel); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-gallery-arrow, .cp-gallery-expand, .cp-gallery-count, .cp-image-dialog-toolbar, .cp-image-dialog-controls) { color: var(--sf-text); background: var(--sf-panel); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body .cp-gallery-thumb.active { border-color: var(--sf-accent); box-shadow: 0 0 0 2px #7dd7d14a; }
html[data-storefront-theme="dark"] body .cp-mobile-image span { color: var(--sf-muted); background: var(--sf-soft); }
html[data-storefront-theme="dark"] body .cp-image-dialog { color: var(--sf-text); background: var(--sf-panel); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body .cp-image-dialog::backdrop,
html[data-storefront-theme="dark"] body .cp-add-modal { background: #030d15c9; }
/* Editorial imagery keeps its colours under a dark, readable text gradient. */
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.lab-hero, .precision-hero) { color: var(--sf-text); background: var(--sf-soft); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body .lab-hero::after { background: linear-gradient(90deg,#142630 0%,#142630 28%,#142630f2 38%,#1426308c 58%,#1426301a 80%); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.lab-hero-caption, .lab-hero-footnote) { color: #d2e4e9; }
html[data-storefront-theme="dark"] body.lab-catalogue-page #quality { background: var(--sf-soft); border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body.lab-catalogue-page #coa { background: var(--sf-bg); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-footer, .precision-footer, .lab-customer-footer, .lab-order-footer) { color: #bfd2dc; background: #0b1821; border-color: var(--sf-line); }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-footer a, .precision-footer a, .lab-customer-footer a, .lab-order-footer a, .cp-footer .small, .lab-customer-footer p) { color: #c4d7e0; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-footer h3, .cp-footer strong, .lab-customer-footer strong) { color: #f0f7fa; }
html[data-storefront-theme="dark"] body:is(.lab-storefront, .precision-page, .bg-light, :not([class])) :is(.cp-footer a:hover, .precision-footer a:hover, .lab-customer-footer a:hover, .lab-order-footer a:hover) { color: #fff; }
/* Keep the product header compact; its breadcrumb retains the category link. */
body.lab-product-page .cp-nav > .container > .d-flex { align-items: center; }
@media (max-width: 575.98px) {
  body.lab-product-page .cp-nav > .container { gap: .5rem !important; padding-inline: 14px; }
  body.lab-product-page .cp-nav .cp-nav-back { display: none; }
  body.lab-product-page .cp-nav .cp-logo { min-width: 0; flex: 1 1 auto; max-width: 145px; }
  body.lab-product-page .cp-nav .cp-logo-image { width: min(145px, calc(100vw - 200px)); max-width: 100%; height: 44px; }
  body.lab-product-page .cp-nav > .container > .d-flex { flex: 0 0 auto; gap: .4rem !important; }
  body.lab-product-page .cp-nav .cp-button:not(.cp-nav-back) { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: .6rem; flex: 0 0 44px; }
  .lab-storefront .cp-nav .cp-nav-actions [data-storefront-theme-toggle] { width: 40px; min-width: 40px; height: 42px; flex-basis: 40px; padding: 9px; }
  .lab-customer-header-actions [data-storefront-theme-toggle] { width: 42px; min-width: 42px; flex-basis: 42px; }
  html[data-storefront-theme="dark"] body .lab-hero::after { background: linear-gradient(90deg,#142630fa 0%,#142630f2 23%,#142630d9 68%,#142630b3 100%); }
}
@media (prefers-reduced-motion: reduce) {
  [data-storefront-theme-toggle] { transition: none; }
}
