html { font-size: calc(100% * var(--tifloshop-text-scale, 1)); }

.tifloshop-a11y-toggle {
  align-items: center;
  background: #17212b;
  border: 2px solid #fff;
  border-radius: 4px 4px 0 0;
  bottom: 0;
  box-shadow: 0 0 0 1px #17212b;
  color: #fff;
  display: none;
  font-size: 0.9rem;
  font-weight: 750;
  gap: 0.5rem;
  left: 1rem;
  min-height: 46px;
  padding: 0.65rem 0.9rem;
  position: fixed;
  z-index: 99990;
}

.tifloshop-a11y-js .tifloshop-a11y-toggle { display: inline-flex; }
.tifloshop-a11y-toggle:hover { background: #004c44; }
.tifloshop-a11y-toggle--inline {
  border-radius: 10px;
  box-shadow: none;
  flex: 0 0 46px;
  height: 46px;
  min-height: 46px;
  padding: 0.5rem;
  position: static;
}
.tifloshop-a11y-toggle--inline > span:last-child {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}
.tifloshop-a11y-toggle > span:first-child { background: #fff; color: #17212b; padding: 0.1rem 0.3rem; }

.tifloshop-a11y-panel {
  background: #fff;
  border: 2px solid #17212b;
  border-radius: 18px;
  bottom: 1rem;
  box-shadow: 0 12px 32px rgb(0 0 0 / 24%);
  color: #17212b;
  left: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1rem;
  position: fixed;
  width: min(420px, calc(100vw - 2rem));
  z-index: 99999;
}

.tifloshop-a11y-panel__header { align-items: flex-start; display: flex; gap: 1rem; justify-content: space-between; }
.tifloshop-a11y-panel h2 { color: #17212b; font-size: 1.35rem; margin: 0; }
.tifloshop-a11y-close { background: #fff; border: 2px solid #17212b; border-radius: 4px; color: #17212b; flex: 0 0 44px; font-size: 1.6rem; height: 44px; line-height: 1; min-height: 44px; padding: 0; }
.tifloshop-a11y-close:hover { background: #17212b; color: #fff; }
.tifloshop-a11y-control { margin-top: 1rem; }
.tifloshop-a11y-label { display: block; font-weight: 750; margin-bottom: 0.5rem; }
.tifloshop-a11y-stepper { align-items: stretch; display: grid; grid-template-columns: 1fr 5rem 1fr; }
.tifloshop-a11y-stepper button { border-radius: 4px; min-height: 46px; }
.tifloshop-a11y-stepper output { align-items: center; background: #f3f6f7; display: flex; font-weight: 750; justify-content: center; }
.tifloshop-a11y-schemes { border: 0; margin: 1rem 0 0; padding: 0; }
.tifloshop-a11y-schemes legend { font-weight: 750; margin-bottom: 0.5rem; padding: 0; }
.tifloshop-a11y-schemes label,
.tifloshop-a11y-checks label { align-items: center; border: 1px solid #aab6bc; display: flex; gap: 0.65rem; margin: -1px 0 0; min-height: 46px; padding: 0.6rem; }
.tifloshop-a11y-schemes input,
.tifloshop-a11y-checks input { flex: 0 0 22px; height: 22px; margin: 0; width: 22px; }
.tifloshop-a11y-checks { margin-top: 1rem; }
.tifloshop-a11y-reset { margin-top: 1rem; width: 100%; }

.tifloshop-a11y-sr {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

html[data-tifloshop-scheme="light"] {
  --color-ink: #000;
  --color-muted: #242424;
  --color-paper: #fff;
  --color-surface: #f1f1f1;
  --color-surface-strong: #ddd;
  --color-brand: #0038a8;
  --color-brand-dark: #002b82;
  --color-brand-soft: #dfe9ff;
  --color-accent: #8c2d00;
  --color-border: #4a4a4a;
}

html[data-tifloshop-scheme="dark"] {
  --color-ink: #fff;
  --color-muted: #eee;
  --color-paper: #000;
  --color-surface: #171717;
  --color-surface-strong: #2b2b2b;
  --color-brand: #ffea00;
  --color-brand-dark: #ffea00;
  --color-brand-soft: #272500;
  --color-accent: #ff9d6a;
  --color-border: #fff;
}

html[data-tifloshop-scheme="dark"] body,
html[data-tifloshop-scheme="dark"] :where(.site-header, .product-card, .category-tile, .woocommerce ul.products li.product, .entry-summary-card),
html[data-tifloshop-scheme="light"] body { background: var(--color-paper); color: var(--color-ink); }
html[data-tifloshop-scheme="dark"] :where(h1, h2, h3, h4, h5, h6, a, .product-card__title a, .woocommerce ul.products li.product .woocommerce-loop-product__title, .woocommerce div.product p.price, .woocommerce div.product span.price) { color: var(--color-ink); }
html[data-tifloshop-scheme="dark"] :where(a:hover, a:focus) { color: #ffea00; }
html[data-tifloshop-scheme="dark"] :where(button, input[type="button"], input[type="submit"], .button, .wp-element-button) { background: #ffea00; border-color: #ffea00; color: #000; }
html[data-tifloshop-scheme="dark"] :where(input, select, textarea) { background: #000; border-color: #fff; color: #fff; }
html[data-tifloshop-scheme="dark"] .site-header__top,
html[data-tifloshop-scheme="dark"] .site-footer,
html[data-tifloshop-scheme="dark"] .help-band { background: #000; border-color: #fff; }

html[data-tifloshop-grayscale="true"] body { filter: grayscale(1); }
html[data-tifloshop-line-spacing="true"] body { line-height: 2 !important; }
html[data-tifloshop-line-spacing="true"] :where(p, li, dd, dt, label, input, textarea, button) { line-height: 2 !important; }
html[data-tifloshop-letter-spacing="true"] body,
html[data-tifloshop-letter-spacing="true"] :where(button, input, select, textarea) { letter-spacing: 0.08em !important; }
html[data-tifloshop-highlight-links="true"] a:not(.button):not(.wp-element-button) { background: #ffed66 !important; color: #000 !important; outline: 2px solid currentColor; text-decoration: underline !important; text-decoration-thickness: 3px !important; }
html[data-tifloshop-hide-images="true"] img { opacity: 0 !important; }
html[data-tifloshop-hide-images="true"] :where(body, section, article, div, a) { background-image: none !important; }
html[data-tifloshop-readable-font="true"] body,
html[data-tifloshop-readable-font="true"] :where(button, input, select, textarea) { font-family: Arial, Verdana, sans-serif !important; }
html[data-tifloshop-reduce-motion="true"] { scroll-behavior: auto !important; }
html[data-tifloshop-reduce-motion="true"] *,
html[data-tifloshop-reduce-motion="true"] *::before,
html[data-tifloshop-reduce-motion="true"] *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.01ms !important; }

@media (max-width: 30rem) {
  .tifloshop-a11y-toggle { left: 0.5rem; }
  .tifloshop-a11y-panel { bottom: 0.5rem; left: 0.5rem; max-height: calc(100vh - 1rem); width: calc(100vw - 1rem); }
}

@media print {
  .tifloshop-a11y-toggle, .tifloshop-a11y-panel { display: none !important; }
}

/* Explicit surfaces retain contrast when the store changes its brand palette. */
html[data-tifloshop-scheme="dark"] :where(.home-intro, .contact-card, .empty-state, .tifloshop-contact-details, .hero-art__card, .help-band__actions, .wp-block-woocommerce-empty-cart-block) { background: #000; border-color: #fff; color: #fff; }
html[data-tifloshop-scheme="dark"] :where(.home-intro .lead, .home-intro .eyebrow, .help-band .eyebrow, .lead, .text-logo__word small, .category-tile__description) { color: #eee; }
html[data-tifloshop-scheme="dark"] .home-intro .button--light,
html[data-tifloshop-scheme="dark"] .woocommerce ul.products li.product a.button { background: #ffea00; border-color: #ffea00; color: #000; }
html[data-tifloshop-scheme="dark"] :where(.search-form, .search-form input[type="search"]) { background: #000; color: #fff; border-color: #fff; }
html[data-tifloshop-scheme="dark"] .text-logo__mark,
html[data-tifloshop-scheme="dark"] .catalog-button { background: #ffea00; color: #000; }
html[data-tifloshop-scheme="dark"] .site-cart-count { background: #000; color: #fff; }
html[data-tifloshop-scheme="dark"] .woocommerce ul.products li.product a img { background: #171717; }
html[data-tifloshop-scheme="dark"] .woocommerce ul.products li.product .price { color: #fff; }
html[data-tifloshop-scheme="dark"] :where(.skip-links a, .editor-note) { background: #000; color: #fff; }
html[data-tifloshop-scheme="dark"] .tifloshop-a11y-panel :where(h2, label, legend, output) { color: #17212b; }
html[data-tifloshop-scheme="dark"] .tifloshop-a11y-panel { background: #fff; color: #17212b; }
html[data-tifloshop-scheme="dark"] :where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
html[data-tifloshop-scheme="dark"] .tifloshop-a11y-panel :focus-visible { outline-color: #103f31; }
html[data-tifloshop-scheme="light"] .category-tile { background: #fff; color: #000; }
@media (forced-colors: active) {
  .tifloshop-a11y-panel, .tifloshop-a11y-toggle, .category-tile, .empty-state { border: 2px solid CanvasText; }
}

html[data-tifloshop-scheme="dark"] .request-price { color: #ff9d6a; }
html[data-tifloshop-scheme="dark"] .woocommerce ul.products[class*="columns-"] > li.product:nth-child(n),
html[data-tifloshop-scheme="dark"] .woocommerce-page ul.products[class*="columns-"] > li.product:nth-child(n) { background: #000; border-color: #fff; color: #fff; }
