/* v2.58 · All product UI colors are semantic aliases of Settings > Corporate Design.
 * The eight user-selected CI fields are the only brand color inputs.
 * Focus, error and destructive actions remain visually distinguishable for accessibility.
 */
:root {
  --dtf-primary:var(--ci-primary);
  --dtf-primary-dark:var(--ci-primary-dark);
  --dtf-blue:var(--ci-primary);
  --dtf-blue-soft:var(--ci-tint-deep);
  --dtf-black:var(--ci-ink);
  --dtf-ink:var(--ci-text);
  --dtf-pale:var(--ci-background);
  --dtf-surface:var(--ci-surface);
  --dtf-muted:var(--ci-muted);
  --dtf-line:var(--ci-line);
  --green:var(--ci-primary);
  --green-700:var(--ci-primary-dark);
  --green-text:var(--ci-link);
  --green-100:var(--ci-tint-deep);
  --green-050:var(--ci-tint);
  --lime:var(--ci-primary);
  --paper:var(--ci-background);
  --soft:var(--ci-soft);
  --soft-2:var(--ci-tint-deep);
  --ink:var(--ci-ink);
  --text:var(--ci-text);
  --muted:var(--ci-muted);
  --line:var(--ci-line);
}
body.dtf-home,body.dtf-content-page,body.dtf-cart-page,body.dtf-checkout-page,
body.dtf-order-page,body.dtf-editor-page {
  background:var(--ci-background);
  color:var(--ci-text-on-background);
  font-family:var(--font-body);
}
:where(.dtf-home,.dtf-content-page,.dtf-cart-page,.dtf-checkout-page,.dtf-order-page,.dtf-editor-page)
  :is(.dtf-config-card,.dtf-template-card,.dtf-price-row,.dtf-editor-panel,.dtf-editor-stage,.dtf-account-card,
  .cart-item,.cart-totals,.checkout-card,.checkout-summary-card,.order-card,.dtf-online-card,.dtf-location-card) {
  background:var(--ci-card);color:var(--ci-text);border-color:var(--ci-line);
  box-shadow:0 10px 32px color-mix(in srgb,var(--ci-ink) 8%,transparent);
}
:where(.dtf-home,.dtf-content-page,.dtf-cart-page,.dtf-checkout-page,.dtf-order-page,.dtf-editor-page)
  :is(h1,h2,h3,h4,.cart-summary-total,.checkout-summary-total,.dtf-section-header h2,.checkout-summary-card strong) {
  color:var(--ci-text);}
:where(.dtf-home,.dtf-content-page,.dtf-cart-page,.dtf-checkout-page,.dtf-order-page,.dtf-editor-page)
  :is(p,small,.muted,.field-help,.dtf-help-text,.cart-shipping-note,.checkout-helper,.checkout-step>p,
  .dtf-editor-field-help,.dtf-template-note,.dtf-editor-hint,.dtf-editor-empty) {color:var(--ci-muted);}
/* Navigation and hero always use an explicitly tested light/dark contrast pair. */
.dtf-topbar,.dtf-footer,.dtf-hero,.dtf-public-hero,.dtf-editor-intro,
.dtf-side-block,.dtf-price-highlight {
  background:var(--ci-ink)!important;
  color:var(--ci-on-ink)!important;
}
.dtf-topbar :is(a,span,small),.dtf-footer :is(a,p,span,small),
.dtf-hero :is(h1,h2,h3,p,span,small),
.dtf-public-hero :is(h1,h2,h3,p,small),
.dtf-editor-intro :is(h1,h2,h3,p,small),
.dtf-side-block :is(h3,p,span),.dtf-price-highlight :is(span,small,strong) {
  color:var(--ci-on-ink)!important;
}
.dtf-hero h1 em,.dtf-editor-intro h1 em,.dtf-hero .dtf-eyebrow,
.dtf-public-hero .dtf-eyebrow,.dtf-editor-intro .dtf-eyebrow {color:var(--ci-on-ink)!important;}
/* Primary buttons: WCAG-calculated foreground follows configured button background. */
:where(.dtf-home,.dtf-content-page,.dtf-cart-page,.dtf-checkout-page,.dtf-order-page,.dtf-editor-page)
  :is(.dtf-button,.dtf-submit,.btn-primary,.primary-button,.checkout-submit,.dtf-editor-checkout) {
  background:var(--ci-primary)!important;
  border-color:var(--ci-primary)!important;
  color:var(--ci-on-primary)!important;
  text-decoration:none!important;
}
:where(.dtf-home,.dtf-content-page,.dtf-cart-page,.dtf-checkout-page,.dtf-order-page,.dtf-editor-page)
  :is(.dtf-button,.dtf-submit,.btn-primary,.primary-button,.checkout-submit,.dtf-editor-checkout):hover {
  background:var(--ci-primary-dark)!important;
  border-color:var(--ci-primary-dark)!important;
  color:var(--ci-on-primary-dark)!important;
}
:where(.dtf-home,.dtf-content-page,.dtf-cart-page,.dtf-checkout-page,.dtf-order-page,.dtf-editor-page)
  :is(a:not(.dtf-button):not(.btn-primary):not(.primary-button):not(.checkout-submit),
       .dtf-editor-secondary,.secondary-action-link) {color:var(--ci-link);}
/* Strong foreground on selected states and panel badges, not pale blue on white. */
.dtf-editor-panel :is(.dtf-editor-secondary,.dtf-editor-asset button),
.dtf-cart-page :is(.secondary-action-button,.secondary-action-link),
.dtf-checkout-page :is(.secondary-action-button,.secondary-action-link),
.dtf-template-card a,.dtf-location-link,
.dtf-editor-asset-fields :is(input,select),.dtf-editor-panel input[type=number] {
  color:var(--ci-link)!important;
  border-color:var(--ci-border-accent)!important;
}
.dtf-cart-page :is(.cart-coupon-box,.cart-pricing-note,.cart-delivery-note),
.dtf-checkout-page :is(.checkout-discount-row,.checkout-summary-discount,.checkout-discount,
  .checkout-summary-row.discount,.discount-notice),
.dtf-editor-page :is(.dtf-editor-total,.dtf-editor-live-price,.dtf-editor-length-status,.dtf-editor-auto-note),
.dtf-account-page :is(.dtf-account-alert.success,.dtf-saved-mark) {
  background:var(--ci-tint)!important;color:var(--ci-text)!important;
  border-color:var(--ci-line)!important;
}
.dtf-cart-page :is(.cart-coupon-box,.cart-pricing-note) *,
.dtf-checkout-page :is(.checkout-summary-row.discount,.checkout-discount,.checkout-summary-discount) *,
.dtf-editor-page :is(.dtf-editor-total,.dtf-editor-live-price,.dtf-editor-length-status) * {
  color:var(--ci-text)!important;
}
/* Main checkout/sidebar: readability and line wrapping. */
.dtf-checkout-page :is(.checkout-summary,.checkout-summary-card,.checkout-card,.checkout-step),
.dtf-cart-page :is(.cart-totals,.cart-summary,.cart-item) {color:var(--ci-text);}
.dtf-checkout-page :is(.checkout-summary-row,.checkout-summary-card td,.checkout-summary-card th,
  .checkout-summary-card p,.checkout-summary-card a),
.dtf-cart-page :is(.cart-total-row,.cart-totals p) {overflow-wrap:anywhere;}
.dtf-checkout-page :is(.checkout-summary-row,.checkout-summary-total,.checkout-grand-total),
.dtf-cart-page :is(.cart-total-row,.cart-grand-total) {gap:12px;}
.dtf-checkout-page :is(.checkout-summary-row,.checkout-summary-card),
.dtf-cart-page :is(.cart-summary-row,.cart-totals) {font-variant-numeric:tabular-nums;}
.dtf-checkout-page :is(.checkout-help,.checkout-hint,.checkout-step-description,.shipping-note),
.dtf-cart-page :is(.cart-summary-note,.cart-help) {color:var(--ci-muted)!important;}
.dtf-checkout-page :is(.checkout-option:has(input:checked),.checkout-delivery-option:has(input:checked)) {
  border-color:var(--ci-primary)!important;
  background:var(--ci-tint)!important;
  color:var(--ci-text)!important;
}
.dtf-checkout-page :is(.checkout-option:has(input:checked),.checkout-delivery-option:has(input:checked)) * {
  color:var(--ci-text)!important;
}
.dtf-checkout-page .checkout-shipping-badge {background:var(--ci-ink)!important;color:var(--ci-on-ink)!important;}
.dtf-checkout-page .checkout-shipping-badge * {color:var(--ci-on-ink)!important;}
/* Account menu is dark, its text must never inherit a dark link color. */
.dtf-account-menu {background:var(--ci-ink)!important;color:var(--ci-on-ink)!important;}
.dtf-account-menu :is(a,button,b) {color:var(--ci-on-ink)!important;}
.dtf-account-menu :is(a.current,a:hover,button:hover) {background:var(--ci-tint)!important;color:var(--ci-text)!important;}
/* Inputs and focus states share the same accessible CI palette. */
:where(.dtf-home,.dtf-content-page,.dtf-cart-page,.dtf-checkout-page,.dtf-order-page,.dtf-editor-page)
  :is(input:not([type=checkbox]):not([type=radio]),textarea,select) {
  background:var(--ci-card);color:var(--ci-text);border-color:var(--ci-line);
}
:where(.dtf-home,.dtf-content-page,.dtf-cart-page,.dtf-checkout-page,.dtf-order-page,.dtf-editor-page)
  :is(a,button,input,select,textarea,[role=button]):focus-visible {
  outline:3px solid var(--ci-focus)!important;outline-offset:3px;
}
:where(.dtf-home,.dtf-content-page,.dtf-cart-page,.dtf-checkout-page,.dtf-order-page,.dtf-editor-page)
  :is(input[type=checkbox],input[type=radio],progress) {accent-color:var(--ci-primary);}
/* Delete/errors remain distinct from ordinary blue information, not brand lime. */
.dtf-editor-alert,.dtf-account-alert.error,.dtf-form-error {color:#842C32!important;background:#FFF3F3!important;border-color:#DDA7AB!important;}

/* v2.60: explicitly separate heading/body/link/button/dark foreground roles. */
:where(.dtf-home,.dtf-content-page,.dtf-cart-page,.dtf-checkout-page,.dtf-order-page,.dtf-editor-page,.dtf-account-page)
  :is(h1,h2,h3,h4,.cart-summary-total,.checkout-summary-total) {color:var(--ci-heading)!important;}
:where(.dtf-home,.dtf-content-page,.dtf-cart-page,.dtf-checkout-page,.dtf-order-page,.dtf-editor-page,.dtf-account-page)
  :is(.dtf-hero,.dtf-public-hero,.dtf-editor-intro,.dtf-topbar,.dtf-footer,.dtf-side-block,.dtf-price-highlight,.checkout-shipping-badge)
  :is(h1,h2,h3,h4,p,span,small,strong,a) {color:var(--ci-on-ink)!important;}
:where(.dtf-home,.dtf-content-page,.dtf-cart-page,.dtf-checkout-page,.dtf-order-page,.dtf-editor-page,.dtf-account-page)
  :is(.dtf-button,.dtf-submit,.btn-primary,.primary-button,.checkout-submit,.dtf-editor-checkout)
  :is(span,strong,b,small,svg) {color:var(--ci-on-primary)!important;}
:where(.dtf-home,.dtf-content-page,.dtf-cart-page,.dtf-checkout-page,.dtf-order-page,.dtf-editor-page,.dtf-account-page)
  :is(.dtf-button,.dtf-submit,.btn-primary,.primary-button,.checkout-submit,.dtf-editor-checkout):hover
  :is(span,strong,b,small,svg) {color:var(--ci-on-primary-dark)!important;}
/* Keep the checkout and customer flows legible without overriding status/error actions. */
:where(.dtf-home,.dtf-content-page,.dtf-cart-page,.dtf-checkout-page,.dtf-order-page,.dtf-editor-page,.dtf-account-page)
  :is(.dtf-editor-panel,.dtf-config-card,.dtf-online-card,.dtf-template-card,.dtf-account-card,.cart-item,.cart-totals,.checkout-card,.checkout-summary-card)
  :is(h1,h2,h3,h4) {color:var(--ci-heading)!important;}
