/* Shared layout. Legacy shades keep their lightness and follow the palette hue. */
html[data-site-theme] :is(.breadcrumbs,main .kicker,.consult-refresh .consult-eyebrow) { color:var(--site-custom-muted,hsl(var(--site-palette-hue, 108) 11.235955% 34.901961%)); }
html[data-site-theme] .header .logo .owner-brand-wordmark>small { color:var(--site-custom-muted,hsl(var(--site-palette-hue, 108) 11.235955% 34.901961%)); }
html[data-site-theme] .stats-refresh .stat:not(:first-child) :is(small,span) { color:var(--site-custom-muted,hsl(var(--site-palette-hue, 108) 11.235955% 34.901961%)); }
html[data-site-theme] .products.owner-catalog .product:not([href="/insurance/osago/"]):not(.product-help) p { color:var(--site-custom-muted,hsl(var(--site-palette-hue, 108) 11.235955% 34.901961%)); }
html[data-site-theme] :is(.hero-box,.osago-note,.mortgage-help,.osago-casco,.cta) .kicker { color:var(--accent); }
html[data-site-theme] .fx-page :is(p,small,figcaption,.fx-label,.fx-label>span,.fx-eyebrow,.fx-promises>span,.fx-index a>span,.fx-service-list span,.fx-kit-visual span,.fx-included article>span,.fx-audience-number,.fx-audience-tag) { color:var(--site-custom-muted,hsl(var(--site-palette-hue, 95.555556) 15.976331% 33.137255%)); }
html[data-site-theme] .fx-page .fx-offer :is(p,small,.fx-label,.fx-label>span) { color:var(--site-custom-dark-muted,hsl(var(--site-palette-hue, 106.153846) 12.380952% 79.411765%)); }
html[data-site-theme] .fx-page .fx-offer .fx-price-card :is(p,small,span,li) { color:var(--site-custom-muted,hsl(var(--site-palette-hue, 95.555556) 15.976331% 33.137255%)); }
html[data-site-theme] :is(.section-lead,.how-intro p,.product-guide-grid p,.osago-info-accent li,.fx-hero-price span,.fx-image-caption) { color:var(--site-custom-muted,hsl(var(--site-palette-hue, 108) 11.235955% 34.901961%)); }
html[data-site-theme] .policy-examples .kicker { color:var(--accent); }
html[data-site-theme] .osago-steps p { color:var(--site-custom-muted,hsl(var(--site-palette-hue, 108) 11.235955% 34.901961%)); }
html[data-site-theme] :is(.consult-refresh p,.page-intro) { color:var(--site-custom-muted,hsl(var(--site-palette-hue, 108) 11.235955% 34.901961%)); }
html[data-site-theme] .contact-intro .page-intro { color:var(--site-dark-muted); }

html[data-site-theme] .casco-hero .btn.secondary.ui-button {
  --ui-fill: transparent; --ui-hover: var(--site-dark-panel);
  --ui-ink: var(--site-on-dark); --ui-stroke: var(--site-dark-muted);
  background:var(--ui-fill); color:var(--ui-ink);
}
html[data-site-theme] .owner-osago-caption { color:var(--site-dark-muted); }
/* Accent controls retain readable text in every palette. */
html[data-site-theme] .ui-button[data-ui-kind][data-ui-tone="accent"] {
  --ui-hover: var(--site-accent-hover); --ui-ink: var(--site-on-accent);
}
html[data-site-theme] .fx-price-card-top>b { color:var(--site-on-accent); }
html[data-site-theme]:not([data-site-theme="lime"]) .fx-hero h1>span {
  color:var(--site-link);
  background:linear-gradient(100deg,var(--site-link),var(--site-accent-deep));
  -webkit-background-clip: text; background-clip: text;
}
html[data-site-theme]:not([data-site-theme="lime"]) :is(.fx-eyebrow>span,.fx-price-card li:before) { color:var(--site-link); }
html[data-site-theme]:not([data-site-theme="lime"]) .fx-eyebrow>span { background:var(--site-link); }
html[data-site-theme]:not([data-site-theme="lime"]) .fx-promises i { color:var(--site-link); }

html[data-site-theme="blue"] { --site-palette-hue: 215; --site-art-filter: grayscale(1) sepia(.45) saturate(3) hue-rotate(175deg); }
html[data-site-theme="orange"] { --site-palette-hue: 26; --site-art-filter: grayscale(1) sepia(.45) saturate(3) hue-rotate(-30deg); }
html[data-site-theme]:not([data-site-theme="lime"]) .how-intro { background:var(--site-panel); }
html[data-site-theme]:not([data-site-theme="lime"]) .products.owner-catalog .product[href] .product-icon {
  color:var(--site-icon-ink);
  background:var(--site-icon-soft);
  border-color:var(--line);
}
html[data-site-theme]:not([data-site-theme="lime"]) .products.owner-catalog .product[href="/insurance/osago/"] .product-icon {
  color:var(--accent);
  background:var(--site-dark-panel);
}
html[data-site-theme]:not([data-site-theme="lime"]) .products.owner-catalog .product[href="/insurance/mini-casco/"] {
  background:var(--site-accent-soft);
  border-color:var(--line);
}
html[data-site-theme]:not([data-site-theme="lime"]) .products.owner-catalog .product .go { color:var(--site-link); }
html[data-site-theme]:not([data-site-theme="lime"]) .products.owner-catalog .product[href="/insurance/osago/"] .go { color:var(--accent); }
/* Repaint the template's decorative artwork, keeping photography and network logos intact. */
html[data-site-theme]:not([data-site-theme="lime"]) :is(.contact-illustration,.fx-service-art img,.fx-kit-visual img) { filter: var(--site-art-filter); }
/* The OSAGO car has silver paint in every palette. */
.owner-osago-stage>img { filter: grayscale(1); }
html[data-site-theme]:not([data-site-theme="lime"]) .site-custom-logo[src*="polis-shop-"] { filter: var(--site-art-filter); }
html[data-site-theme]:not([data-site-theme="lime"]) .fx-phone { filter: var(--site-art-filter) drop-shadow(-17px 10px 24px #00000019); }
html[data-site-theme]:not([data-site-theme="lime"]) .casco-car-layer>img { filter: var(--site-art-filter) drop-shadow(0 18px 22px #0005); }
/* Preserve the silver paint; shift the original lime details to a warm accent. */
html[data-site-theme="orange"] .casco-stage .casco-car-layer>img { filter: hue-rotate(-55deg) saturate(.85) drop-shadow(0 18px 22px #0005); }
html[data-site-theme]:not([data-site-theme="lime"]) img[src*="mini-casco-protection"] { filter: var(--site-art-filter); }
html[data-site-theme][data-site-theme="custom"] :is(.page-card,.editorial-card,.owner-carousel-card) { background:var(--paper);color:var(--ink);border-color:var(--line); }
html[data-site-theme][data-site-theme="custom"] .products.owner-catalog .product { border-color:var(--line); }
html[data-site-theme][data-site-theme="custom"] .products.owner-catalog .product:not([href="/insurance/osago/"]) { background:var(--paper); }
html[data-site-theme][data-site-theme="custom"] .products.owner-catalog .product[href="/insurance/mini-casco/"] { background:var(--site-panel); }
html[data-site-theme][data-site-theme="custom"] .products.owner-catalog .product:not([href="/insurance/osago/"]) h3 { color:var(--ink); }
html[data-site-theme][data-site-theme="custom"] .products.owner-catalog .product:not([href="/insurance/osago/"]) p { color:var(--muted); }
html[data-site-theme][data-site-theme="custom"] :is(.section-lead,.page-intro,.how-intro p,.consult-refresh p,.casco-manager-copy>p,.casco-section-heading>p,.editorial-card p) { color:var(--muted); }
html[data-site-theme][data-site-theme="custom"] .contact-intro .page-intro { color:var(--site-dark-muted); }
html[data-site-theme][data-site-theme="custom"] :is(.page-card>h1,.casco-manager h2,.casco-section-heading h2) { color:var(--ink); }
html[data-site-theme][data-site-theme="custom"] .contact-link:not([data-ui-brand]) { background:var(--paper);border-color:var(--line); }
html[data-site-theme][data-site-theme="custom"] .contact-link .icon { color:var(--site-icon-ink); }
/* Manual palettes also control text on dark or unusually light primary surfaces. */
html[data-site-theme="custom"] main :is(h1,h2,h3) { color:var(--ink); }
html[data-site-theme="custom"] :is(.hero-box,.footer,.cta,.contact-intro,.business-contact-card,.policy-examples,.mortgage-help,.osago-note,.osago-casco,.casco-hero,.fx-offer) { color:var(--site-on-dark); }
html[data-site-theme="custom"] :is(.hero-box,.cta,.contact-intro,.business-contact-card,.policy-examples,.mortgage-help,.osago-note,.osago-casco,.casco-hero,.fx-offer) :is(h1,h2,h3) { color:var(--site-on-dark); }
html[data-site-theme="custom"] .products.owner-catalog .product[href="/insurance/osago/"] h3 { color:var(--site-on-dark); }
html[data-site-theme="custom"] :is(.hero-box,.footer,.contact-intro,.casco-hero,.fx-offer) p { color:var(--site-dark-muted); }
html[data-site-theme="custom"] .ui-button[data-ui-kind][data-ui-tone="primary"] { --ui-ink:var(--site-on-dark);--ui-hover:var(--site-primary-hover); }
html[data-site-theme="custom"] .ui-button[data-ui-kind][data-ui-tone="outline"][data-ui-surface="dark"] { --ui-ink:var(--site-on-dark); }
html[data-site-theme="custom"] .ui-button[data-ui-kind][data-ui-tone="outline"][data-ui-surface="light"] { --ui-ink:var(--ink);--ui-hover:var(--site-panel);--ui-stroke:var(--line); }
html[data-site-theme="custom"] .ui-button[data-ui-kind][data-ui-tone="quiet"] { --ui-ink:var(--ink);--ui-fill:var(--site-panel); }
html[data-site-theme="custom"] .ui-button[data-ui-kind][data-ui-tone="quiet"][data-ui-surface="dark"] { --ui-ink:var(--site-on-dark);--ui-fill:var(--site-dark-panel); }
html[data-site-theme="custom"] .how .step { color:var(--site-secondary); }
html[data-site-theme="custom"] .footer .owner-brand-title { color:var(--site-on-dark); }
