/* One charcoal base for the complete Dynamaxx experience.
   The routine control may update --phase-accent and --phase-button at runtime. */
:root {
  color-scheme: dark;
  --phase-accent: #f44b46;
  --phase-button: #bd2c28;
  --theme-base: #101112;
  --theme-panel: #181a1d;
  --theme-raised: #22262b;
  --theme-canvas: #181a1d;
  --theme-text: #f3f1eb;
  --theme-muted: #b9bdc3;
  --theme-secondary: #a9afb7;
  --theme-border: #30353b;
  --theme-control-border: #68717c;
  --red: var(--phase-accent, #f44b46);
  --red-dark: var(--phase-button, #bd2c28);
  --black: var(--theme-base);
  --ink: var(--theme-text);
  --muted: var(--theme-muted);
  --line: var(--theme-border);
  --paper: var(--theme-base);
  --page-surface: var(--theme-panel);
  --page-border: var(--theme-border);
}

html { background-color: var(--theme-base); scrollbar-color: #666e78 var(--theme-base); }
body { background-color: var(--theme-base); color: var(--theme-text); }
::selection { background: var(--phase-button, #bd2c28); color: #fff; }

/* Section surfaces stay continuous. Photographic backgrounds retain their images. */
main,
.announcement,
.site-header,
.site-footer,
.routine-section,
.mindset-section,
.mindset-copy,
.mindset-strip,
.closing-banner,
.program-process,
.shop-catalog,
.program-intro,
.program-benefits,
.ambassador-products,
.subscription-explainer,
.subscription-list,
.about-values,
.about-actions,
.contact-options,
.support-faq,
.support-policies,
.account-options,
.account-help,
.planned-preview,
.planned-product,
.pdp,
.product-details-section,
.related-products,
.policy-layout,
.policy-content {
  background-color: var(--theme-base);
}
.hero, .hero.program-hero, .athletic-page-hero, .about-story { background-color: var(--theme-base); }
.site-header { color: var(--theme-text); border-bottom-color: var(--theme-border); }
.announcement { color: var(--theme-muted); border-bottom: 1px solid var(--theme-border); }
.announcement a { color: var(--theme-text); }
.announcement a:hover { color: var(--phase-accent, #f44b46); }
.site-footer { border-top: 1px solid var(--theme-border); }
.mindset-strip { color: var(--theme-text); border-block: 1px solid var(--theme-border); }
.closing-banner { color: var(--theme-text); border-top: 1px solid var(--theme-border); }
.closing-banner h2 em { color: transparent; -webkit-text-stroke-color: var(--phase-accent, #f44b46); }

/* A single shared header scale; only the original monochrome logo is inverted. */
.site-header .brand { width: 238px; flex: 0 0 238px; }
.site-header .brand img { width: 238px; max-width: none; height: auto; filter: invert(1); }
.footer-brand img { filter: invert(1); }
.desktop-nav a, .account-link, .bag-toggle, .menu-toggle { color: var(--theme-text); }
.desktop-nav a::after { background-color: var(--phase-accent, #f44b46); }
.account-link:hover { color: var(--phase-accent, #f44b46); }
.bag-count { color: #fff; background: var(--phase-button, #bd2c28); }
.mobile-nav:not([hidden]) { color: var(--theme-text); background: var(--theme-base); border-top-color: var(--theme-border); box-shadow: 0 16px 30px #0006; }
.mobile-nav a[aria-current='page'] { color: var(--phase-accent, #f44b46); }
.skip-link { color: var(--theme-text); background: var(--theme-raised); border: 1px solid var(--theme-control-border); }

/* The phase accent is reserved for emphasis, stars, active controls, and focus. */
.mindset-strip svg,
.routine-line .icon,
svg:has(> use[href='#icon-star']),
use[href='#icon-star'] {
  color: var(--phase-accent, #f44b46);
}
.routine-line .icon { fill: var(--phase-accent, #f44b46); }
.red-bar { background-color: var(--phase-accent, #f44b46); }
.routine-symbol { stroke: var(--phase-accent, #f44b46); }
.format-icon, .topical-visual .format-icon, .planned-art .format-icon { color: var(--phase-accent, #f44b46); }
.text-red,
.hero h1 em,
.athletic-page-hero h1 em,
.shop-intro h1 em,
.editorial-intro h1 em,
.about-hero h1 em,
.routine-heading h2 em,
.mindset-copy h2 em,
.program-intro h2 em,
.product-details-section h2 em,
.related-heading h2 em,
.about-story h2 em,
.planned-preview h2 em,
.hero-mini-mark span { color: var(--phase-accent, #f44b46); }
.product-highlights .icon,
.program-benefits .icon,
.account-options article > .icon { color: var(--phase-accent, #f44b46); }
.hero-mini-mark, .hero h1, .athletic-page-hero h1, .about-story h2 { color: var(--theme-text); }
.hero-content > p,
.athletic-page-hero p:not(.eyebrow),
.program-hero .program-copy > p:not(.eyebrow) { color: #dedfe1; }
.hero-bottom, .hero-side-note, .photo-caption, .program-note { color: #c6c9ce; }
.athletic-page-hero .eyebrow, .program-hero .eyebrow.light { color: #dcdee1; }
.ambassador-watermark { color: #1d2024; }

/* Buttons remain visibly actionable without introducing light content blocks. */
.button-red,
.closing-banner .button-light {
  color: #fff;
  background: var(--phase-button, #bd2c28);
  border-color: var(--phase-button, #bd2c28);
}
.button-red:hover,
.closing-banner .button-light:hover {
  color: #fff;
  background: color-mix(in srgb, var(--phase-button, #bd2c28) 84%, #000);
  border-color: var(--phase-accent, #f44b46);
}
.button-dark, .button-light {
  color: var(--theme-text);
  background: #24282d;
  border-color: var(--theme-control-border);
}
.button-dark:hover, .button-light:hover { color: #fff; background: #30363d; border-color: var(--phase-accent, #f44b46); }
.button-outline, .button-outline-light { color: var(--theme-text); background: transparent; border-color: var(--theme-control-border); }
.button-outline:hover, .button-outline-light:hover { color: #fff; background: var(--theme-raised); border-color: var(--phase-accent, #f44b46); }
.hero .button-outline-light, .program-hero .button-outline-light { background: #10111270; }
.hero .button-outline-light:hover, .program-hero .button-outline-light:hover { background: #22262bd9; }
.text-link, .catalog-meta .text-link { color: var(--theme-text); border-bottom-color: #818a95; }
.text-link:hover,
.card-subscription:hover,
.product-title-row h3 button:hover,
.full-card .product-title-row a:hover,
.subscription-product:hover strong { color: var(--phase-accent, #f44b46); }
.icon-button:hover { color: #fff; background: var(--theme-raised); }
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible { outline-color: var(--phase-accent, #f44b46); }

/* Neutral product canvases; source packaging and photography are never recolored. */
.product-visual,
.on-visual,
.off-visual,
.flex-visual,
.topical-visual,
.full-card .product-visual,
.full-card .product-lights-on,
.pdp-main-image,
.pdp-main-image.product-lights-on,
.gallery-thumb,
.modal-visual,
.modal-visual.day,
.modal-visual.night,
.modal-visual.flex {
  background-color: var(--theme-canvas);
  color: var(--theme-text);
}
.full-card .product-visual, .pdp-main-image { border: 1px solid var(--theme-border); }
.off-visual > img, .modal-visual.night > img { mix-blend-mode: normal; }
.product-label,
.on-visual .product-label,
.full-card .product-label,
.pdp-main-image .product-label {
  color: var(--theme-text);
  background: #22262bf2;
  border: 1px solid #515863;
}
.quick-look, .image-expand { color: var(--theme-text); background: #23272cf5; border: 1px solid var(--theme-control-border); box-shadow: 0 3px 12px #0003; }
.quick-look:hover, .image-expand:hover { color: #fff; background: var(--phase-button, #bd2c28); border-color: var(--phase-accent, #f44b46); }
.quick-view { background: #181a1df5; color: var(--theme-text); }
.gallery-thumb { border-color: #4f5761; }
.gallery-thumb.active { border-color: var(--phase-accent, #f44b46); box-shadow: inset 0 0 0 1px var(--phase-accent, #f44b46); }
.gallery-thumb:hover { border-color: var(--phase-accent, #f44b46); }
.routine-product > img, .subscription-product img, .bag-item-image { background-color: var(--theme-canvas); }
.routine-product.planned::before { color: var(--theme-text); background: var(--theme-raised); }
.planned-art { color: var(--theme-text); background: var(--theme-panel); border: 1px solid var(--theme-border); }
.planned-art .flex-word, .modal-visual .flex-word { color: var(--theme-text); }

/* Quietly raised panels sit on the same page foundation. */
.routine-panel,
.catalog-empty,
#help-empty,
.contact-options > a,
.contact-options > a:first-child,
.account-options article,
.planned-links a {
  color: var(--theme-text);
  background: var(--theme-panel);
  border-color: var(--theme-border);
}
.routine-panel { border: 1px solid var(--theme-border); }
.contact-options > a:hover, .planned-links a:hover { border-color: var(--phase-accent, #f44b46); }
.account-options article { border-top-color: #69717c; }
.account-options article:nth-child(2) { border-top-color: var(--phase-accent, #f44b46); }
.program-benefits article { border-top-color: #69717c; }
.process-grid article { border-top-color: var(--phase-accent, #f44b46); }
.step-word, .contact-options strong, .account-options h2 { color: var(--theme-text); }
.routine-line i { background-color: #545b65; }

/* Replace inherited gray-on-white text with readable light gray. */
.section-intro p,
.product-count,
.product-info > p,
.full-card .product-info > p,
.lineup-footnote,
.card-subscription,
.fine-print,
.routine-heading > p:not(.eyebrow),
.routine-panel > p,
.routine-product span,
.mindset-copy > p:not(.eyebrow),
.ambassador-copy > p:not(.large-copy),
.faqs details p,
.sort-control label,
.catalog-meta,
.pdp-format,
.pdp-description,
.purchase-note,
.purchase-option small,
.related-heading > p,
.related-heading > span,
.program-intro > p,
.program-benefits p,
.process-grid p,
.program-apply-row > span,
.subscription-explainer p,
.subscription-product span,
.subscription-price span,
.subscription-price s,
.about-values p,
.contact-options p,
.contact-options > a:first-child p,
.account-options p,
.account-help p,
.planned-preview p:not(.eyebrow),
.planned-links span,
.planned-product p:not(.eyebrow),
#help-empty {
  color: var(--theme-muted);
}
.eyebrow,
.pdp-copy > .eyebrow,
.routine-panel-top .eyebrow,
.mindset-copy .eyebrow,
.contact-options .eyebrow,
.contact-options > a:first-child .eyebrow { color: #c5c8cd; }
.routine-product strong, .product-title-row h3, .price { color: var(--theme-text); }
.subscription-price strong { color: var(--phase-accent, #f44b46); }
.breadcrumbs { color: var(--theme-muted); }
.breadcrumbs > span:not([aria-current]) { color: #8d959f; }
.breadcrumbs [aria-current] { color: var(--theme-text); }
.breadcrumbs a:hover, .athletic-page-hero .breadcrumbs a:hover { color: var(--phase-accent, #f44b46); }
.filter, .catalog-filters .filter, .routine-tabs button { color: var(--theme-muted); }
.filter.active, .catalog-filters .filter.active { color: var(--theme-text); border-bottom-color: var(--phase-accent, #f44b46); }
.filter:hover, .catalog-filters .filter:hover, .routine-tabs button[aria-selected='true'] { color: var(--phase-accent, #f44b46); }
.routine-tabs button[aria-selected='true'] { border-color: var(--phase-accent, #f44b46); }

/* Inputs and purchase controls retain clear outlines and selected states. */
.shop-search,
.sort-control select,
.support-search input,
.quantity-input input,
.purchase-option {
  color: var(--theme-text);
  background-color: var(--theme-panel);
  border-color: var(--theme-control-border);
}
.shop-search .icon { color: #c4c9cf; }
.shop-search input { color: var(--theme-text); background: transparent; caret-color: var(--phase-accent, #f44b46); }
.shop-search:focus-within { outline-color: var(--phase-accent, #f44b46); }
.shop-search input::placeholder, .support-search input::placeholder { color: #a5acb5; opacity: 1; }
.sort-control select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23e4e5e6' stroke-width='1.5'/%3E%3C/svg%3E");
}
.sort-control option { color: var(--theme-text); background: var(--theme-panel); }
.purchase-option.selected { background: var(--theme-raised); border-color: var(--phase-accent, #f44b46); box-shadow: inset 0 0 0 1px var(--phase-accent, #f44b46); }
.purchase-option:focus-within { outline-color: var(--phase-accent, #f44b46); }
.purchase-option strong, .purchase-option > b, .purchase-options legend, .quantity-input > span { color: var(--theme-text); }
.purchase-option input { accent-color: var(--phase-accent, #f44b46); }
.pdp-status, .modal-status { color: #8ddbb6; }
input:-webkit-autofill { -webkit-text-fill-color: var(--theme-text); -webkit-box-shadow: 0 0 0 1000px var(--theme-panel) inset; caret-color: var(--theme-text); }

/* Fine separators keep the hierarchy without changing the layouts. */
.home-lineup-meta,
.product-toolbar,
.catalog-filters,
.routine-tabs,
.routine-product,
.lineup-footnote,
.faq-section,
.faqs details,
.faqs details:first-child,
.pdp-utility,
.product-details-section,
.subscription-explainer,
.subscription-explainer > div,
.subscription-row,
.subscription-row:nth-of-type(1),
.about-values article,
.planned-preview,
.policy-layout aside a,
.policy-source,
.footer-bottom,
.bag-header,
.bag-item,
.modal-facts { border-color: var(--theme-border); }

/* Policies remain comfortable to read on the same dark foundation. */
.policy-content { color: #c7cbd0; }
.policy-content > h1,
.policy-content h2,
.policy-content h3,
.policy-content strong,
.policy-content .policy-lead { color: var(--theme-text); }
.policy-layout aside a { color: var(--theme-muted); }
.policy-layout aside a:hover, .policy-layout aside a[aria-current='page'] { color: var(--phase-accent, #f44b46); }
.policy-content a:not(.button) { color: #dce0e4; text-decoration-color: #929ba7; }
.policy-content a:not(.button):hover { color: var(--phase-accent, #f44b46); text-decoration-color: currentColor; }
.policy-content th { color: var(--theme-text); background: var(--theme-panel); }
.policy-content th, .policy-content td { border-color: #4b535e; }
.policy-content td { background: transparent; }
.policy-source .text-link { color: var(--theme-muted); }

/* Native quick view, bag, and image dialogs use the same accessible palette. */
dialog,
.product-dialog,
.bag-dialog,
.image-dialog {
  color: var(--theme-text);
  background: var(--theme-panel);
  border: 1px solid var(--theme-border);
  box-shadow: 0 24px 100px #0009;
}
dialog::backdrop { background: #000b; }
.modal-copy { background-color: var(--theme-panel); }
.dialog-close, .image-dialog-close { color: var(--theme-text); background: var(--theme-raised); }
.modal-copy > .eyebrow, .bag-header .eyebrow { color: var(--theme-muted); }
.modal-copy > p:not(.eyebrow):not(.modal-subtitle),
.modal-facts,
.modal-facts p,
.bag-item p,
.bag-summary > p,
.checkout-note,
.remove-item,
.empty-bag p,
.bag-header h2 span { color: var(--theme-muted); }
.modal-subtitle, .modal-facts strong, .bag-item-top > span, .bag-subtotal { color: var(--theme-text); }
.empty-bag > .icon { color: var(--theme-secondary); }
.quantity-control { color: var(--theme-text); border-color: var(--theme-control-border); background: var(--theme-panel); }
.quantity-control button:hover { background: #2c3239; color: #fff; }
.remove-item:hover { color: var(--phase-accent, #f44b46); }
.toast { color: var(--theme-text); background: #22262b; border: 1px solid #69727d; box-shadow: 0 8px 35px #0008; }

/* Footer and small labels remain legible at every breakpoint. */
.footer-links h3 { color: var(--theme-text); }
.footer-links a, .footer-brand p, .footer-bottom, .footer-notice, .footer-region { color: var(--theme-muted); }
.footer-links a:hover, .footer-bottom a:hover { color: var(--phase-accent, #f44b46); }
.button,
.hero-buttons .button,
.product-add,
.planned-card .product-add,
.routine-tabs button,
.routine-product .text-link,
.routine-product strong,
.routine-product span,
.product-label,
.format-label,
.eyebrow,
.hero .eyebrow,
.photo-caption,
.lineup-footnote,
.routine-panel-top .eyebrow,
.routine-line > span,
.modal-copy > .eyebrow,
.bag-header .eyebrow,
.bag-header h2 span,
.quantity-control span,
.remove-item,
.checkout-note,
.hero-bottom,
.hero-side-note,
.announcement,
.announcement > span,
.announcement a,
.footer-brand p,
.footer-bottom,
.footer-region,
.footer-notice,
.toast { font-size: .875rem; }
.hero-bottom { letter-spacing: .055em; }
.hero-side-note { letter-spacing: .07em; }

@media (max-width: 600px) {
  .site-header .brand { width: 168px; flex-basis: 168px; }
  .site-header .brand img { width: 168px; }
  .announcement > span { font-size: .875rem; line-height: 1.45; }
  .hero .eyebrow { letter-spacing: .055em; }
  .hero-bottom { font-size: .875rem; letter-spacing: .02em; }
  .hero-side-note { font-size: .875rem; letter-spacing: .04em; }
  .product-label, .full-card .product-label, .format-label { font-size: .875rem; }
  .hero-buttons .button, .product-add, .planned-card .product-add { font-size: .875rem; }
  .routine-tabs button, .routine-product .text-link, .routine-product strong, .routine-product span { font-size: .875rem; }
  .quantity-control span, .remove-item, .checkout-note, .toast { font-size: .875rem; }
}

@media (prefers-reduced-motion: reduce) {
  .button, .quick-look, .image-expand { transition: none; }
}

/* Remove the logo asset's black rectangle against the shared charcoal header. */
.site-header .brand img, .footer-brand img { mix-blend-mode: screen; }

/* Readable, navigable legal text in the same site-wide color system. */
.terms-date { color: #c1c5ca; font-size: .875rem; letter-spacing: .02em; }
.terms-toc { margin: 32px 0 48px; padding: 27px 30px; border: 1px solid #3d4249; background: #181a1d; }
.policy-content .terms-toc .eyebrow { margin: 0 0 20px; color: #f5f5f3; font-size: .8125rem; }
.terms-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 38px; margin: 0; padding-left: 20px; }
.terms-toc li { margin: 0; padding-left: 3px; color: #b9bec5; font-size: .875rem; line-height: 1.65; }
.terms-toc a { color: #e2e5e9; text-underline-offset: 4px; }
.terms-toc a:hover { color: var(--phase-accent, #f44b46); }
.policy-content h2[id^="terms-"] { scroll-margin-top: 120px; }
@media(max-width:600px) {
  .terms-toc { padding: 24px 20px; margin-block: 27px 38px; }
  .terms-toc ol { grid-template-columns: 1fr; gap: 12px; }
}
