.mt-theme-picker {
    margin: 0 15px 16px;
    padding: 0;
    min-width: 0;
    border: 0;
    font-weight: 700;
}
.mt-theme-picker legend { padding: 0 0 7px; }
.mt-theme-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mt-theme-options label { position: relative; cursor: pointer; }
.mt-theme-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mt-theme-options span {
    display: grid;
    min-height: 44px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--light-green);
    color: var(--ink);
    font-size: 13px;
}
.mt-theme-options input:checked + span { border-color: #a7461c; background: #a7461c; color: #fff; }
.mt-theme-options input:focus-visible + span { outline: 2px solid #a7461c; outline-offset: 2px; }

html[data-mt-theme="dark"] {
    color-scheme: dark;
    --paper: #121915;
    --mt-paper: var(--paper);
    --white: #1a251f;
    --ink: #eef4ef;
    --muted: #b3c3b8;
    --line: #41534a;
    --light-green: #24322a;
    --mt-night-accent: #ffb184;
    --mt-night-link: #b9dfc7;
    --mt-night-warm: #37291f;
}
html[data-mt-theme="dark"] body { background: var(--paper); color: var(--ink); }
html[data-mt-theme="dark"] :is(
    .product-card, .category-card, .detail-info, .detail-section, .mt-detail-delivery,
    .mt-purchase-strip, .mt-product-share, .mt-review-write, .mt-review-list li, .mt-basket-page, .mt-account-register,
    .basket-items-list-item-container, .basket-checkout-container, .mt-checkout-request,
    .mt-checkout-delivery-options li, .bx-soa-section, .bx-soa-cart-total, .mt-delivery-card,
    .mt-filters-panel, .mt-catalog-dropdown-inner, .mt-mobile-dialog-head, .mt-filter-dialog .mt-facet-actions,
    .mt-menu-sheet[open], .mt-quick-view-dialog[open], .mt-sticky-buy:not([hidden]), .mt-bottom-nav,
    .mt-blog-topic, .mt-blog-tools form, .mt-blog-card, .mt-blog-article, .mt-blog-missing,
    .m-calc-workspace, .m-calc-list, .m-calc-list-heading, .m-calc-search, .m-calc-form, .m-calc-result,
    .m-calc-share-panel, .m-calc-tile, .mt-calculator-faq,
    .mt-calculator-seo-content, .mt-app-guide__steps
) {
    background: var(--white);
    color: var(--ink);
    border-color: var(--line);
}
html[data-mt-theme="dark"] :is(
    .mt-delivery-section, .mt-mobile-search[open], .mt-filter-dialog[open],
    .mt-photo-zoom[open], .mt-point-dialog[open]
) {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--line);
}
html[data-mt-theme="dark"] :is(
    .mt-mobile-dialog-head button, .mt-quick-view-dialog [data-mt-quick-close],
    .mt-checkout-items__heading, .mt-checkout-items__total, .mt-checkout-items__table thead,
    .mt-checkout-delivery-options span, .mt-request-items, .mt-request-pickup, .mt-point-confirm,
    .mt-active-facets a, .mt-catalog-pagination a, .mt-variants-options a:not([aria-current]),
    .mt-product-share__copy, .mt-review-pick label, .mt-feedback-details[open] > summary,
    .m-calc-presets button, .m-calc-share-actions a, .m-calc-share-actions button,
    .m-calc-categories button:not(.active), .m-calc-list > button:hover, .m-calc-method, .m-calc-awaiting
) {
    background: var(--light-green);
    color: var(--ink);
    border-color: var(--line);
}
html[data-mt-theme="dark"] .mt-main :is(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="submit"]), select, textarea),
html[data-mt-theme="dark"] .mt-mobile-search-form input,
html[data-mt-theme="dark"] .mt-mobile-suggestion form select {
    background-color: var(--light-green);
    color: var(--ink);
    border-color: var(--line);
}
html[data-mt-theme="dark"] :is(
    .mt-section-heading h2, .section-heading h2, .mt-mobile-dialog-head h2, .mt-mobile-menu a,
    .mt-result-bar strong, .mt-facet-group legend, .mt-catalog-dropdown-inner :is(strong, a),
    .product-card__name, .detail-info h1, .detail-section :is(h2, h3), .detail-description,
    .mt-product-share :is(h2, a), .mt-variants-group > strong, .mt-delivery-card :is(h3, strong, address),
    .mt-checkout-delivery-options h3, .mt-checkout-items__heading a, .mt-basket-page :is(.basket-item-info-name-link, .basket-item-price-current-text),
    .mt-blog-card :is(h2, h3), .mt-blog-article :is(h1, h2, h3), .m-calc-tile-name,
    .m-calc-workspace :is(h1, h2, h3), .m-calc-list-text b, .m-calc-field-section legend, .m-calc-result-lines strong,
    .m-calc-share-panel strong
) { color: var(--ink); }
html[data-mt-theme="dark"] :is(
    .breadcrumbs, .eyebrow, .mt-section-heading p, .mt-facet-option, .mt-facet-option small,
    .mt-facet-actions a, .mt-result-bar, .mt-mobile-search-status, .product-card__eyebrow,
    .detail-perks, .mt-detail-delivery p, .mt-purchase-strip span, .mt-purchase-strip .mt-shop-choice,
    .mt-checkout-item-unit-mobile, .mt-request-method-note, .mt-request-pickup p, .mt-commerce-note,
    .mt-commerce-heading p, .mt-checkout-delivery-options p, .mt-product-share p, .mt-delivery-card p,
    .mt-feedback-note, .mt-review-list small, .mt-reviews h2 small, .mt-app-guide__meta, .mt-blog-card p,
    .m-calc-list-text small, .m-calc-tile small, .m-calc-summary, .m-calc-fields label, .m-calc-result-lines span,
    .m-calc-result-lines small, .m-calc-share-panel p, .m-calc-workspace-top small
) { color: var(--muted); }
html[data-mt-theme="dark"] :is(
    .mt-mobile-menu a, .mt-facet-group, .mt-checkout-items__table :is(th, td), .mt-checkout-items__total,
    .m-calc-field-section, .m-calc-result-lines > div, .m-calc-list > button
) { border-color: var(--line); }
html[data-mt-theme="dark"] :is(
    .price-panel, .mt-delivery-local, .mt-delivery-fivepost, .mt-restock,
    .mt-bottom-nav a[aria-current], .product-card__bottom > a, .mt-facet-option.is-selected,
    .mt-review-pick label:has(input:checked), .mt-review-pick label:has(~ label input:checked),
    .m-calc-list > button.active, .m-calc-error
) { background: var(--mt-night-warm); border-color: var(--line); color: var(--mt-night-accent); }
html[data-mt-theme="dark"] :is(
    .mt-delivery-local p, .mt-delivery-fivepost p, .mt-restock p, .mt-mobile-menu a span,
    .mt-card-price, .mt-sticky-buy-info strong, .mt-purchase-strip strong,
    .price-panel :is(strong, a, .mt-detail-price), .mt-facet-option:hover, .mt-delivery-card > a
) { color: var(--mt-night-accent); }
html[data-mt-theme="dark"] :is(.detail-description .mt-inline-product-link, .mt-review-write__heading a) { color: var(--mt-night-link); }
html[data-mt-theme="dark"] :is(
    .product-card__image, .mt-featured .product-card__image, .detail-photo, .mt-sticky-buy-photo, .mt-basket-thumbnail
) { background: #eef2ed; }
html[data-mt-theme="dark"] .category-card img {
    mix-blend-mode: normal;
    background: #fff;
    border-radius: 6px;
}
html[data-mt-theme="dark"] .mt-theme-options input:checked + span { border-color: var(--mt-night-accent); background: var(--mt-night-warm); color: var(--mt-night-accent); }
html[data-mt-theme="dark"] .mt-theme-options input:focus-visible + span { outline-color: var(--mt-night-accent); }

/* Mobile blog and calculator text on the reading surfaces. */
:root {
    --mt-reading-secondary: #53665b;
    --mt-reading-accent: #a14924;
    --mt-reading-link: #25563f;
}
html[data-mt-theme="dark"] {
    --mt-reading-secondary: var(--muted);
    --mt-reading-accent: var(--mt-night-accent);
    --mt-reading-link: var(--mt-night-link);
}
:is(
    .mt-blog-section-head p, .mt-blog-topic small, .mt-blog-card p, .mt-blog-crumbs, .mt-blog-missing p,
    .mt-blog-tools nav a:not(.is-active, :hover),
    .m-calc-section-heading p, .m-calc-category-section-heading :is(p, b),
    .m-calc-usage small, .m-calc-popular > p, .m-calc-empty, .m-calc-summary,
    .m-calc-tile-top small, .m-calc-tile-bottom .pending, .mt-calc-breadcrumb,
    .mt-calculator-seo-links span
) { color: var(--mt-reading-secondary); }
:is(
    .mt-blog-section-head > span, .mt-blog-card-body > small, .mt-blog-read, .mt-blog-clear, .mt-blog-article-back,
    .m-calc-section-heading > div > span, .m-calc-workspace-top span,
    .m-calc-usage > div:first-child > span, .m-calc-popular > button strong
) { color: var(--mt-reading-accent); }
:is(.mt-blog-crumbs a, .mt-blog-article-body > p > a, .m-calc-tile-bottom .ready, .mt-calc-breadcrumb a, .mt-calculator-back) {
    color: var(--mt-reading-link);
}
.mt-blog-article-body > p > a { text-decoration: underline; text-underline-offset: .15em; }
:is(.mt-blog-tools input, .m-calc-search input, .m-calc-fields input)::placeholder {
    color: var(--mt-reading-secondary);
    opacity: 1;
}
.m-calc-category-card {
    background-image: linear-gradient(130deg, var(--tone-dark), color-mix(in srgb, var(--tone) 72%, black));
}
.m-calc-category-card small { color: #fff; }
html[data-mt-theme="dark"] :is(
    .mt-blog-section-head h2, .mt-blog-card h3 a, .mt-blog-article-body, .mt-blog-missing :is(h1, h3),
    .m-calc-section-heading h2, .m-calc-category-section-heading h3, .m-calc-usage > div:first-child > strong,
    .mt-calculator-seo-content :is(h2, summary)
) { color: var(--ink); }
html[data-mt-theme="dark"] :is(.mt-blog-card h3 a:hover, .mt-blog-crumbs a:hover, .m-calc-popular > button:hover) {
    color: var(--mt-reading-accent);
}
html[data-mt-theme="dark"] :is(.mt-calculator-seo-content :is(p, li), .m-calc-popular > b, .m-calc-popular > button) {
    color: var(--mt-reading-secondary);
}
html[data-mt-theme="dark"] .m-calc-usage { background: var(--white); border-color: var(--line); }
html[data-mt-theme="dark"] :is(.mt-blog-article .mt-compatible-suggestion, .m-calc-category-section-heading > b, .mt-calculator-seo-links a) {
    background: var(--light-green);
    color: var(--ink);
    border-color: var(--line);
}
html[data-mt-theme="dark"] .mt-blog-article .mt-compatible-suggestion a { color: var(--mt-reading-link); }
