/* MARVETO v0.5.3: priority contrast/legibility fixes, without new UI frameworks. */
:root{--mv-accent:#087a61;--mv-text:#162d41;--mv-muted:#38576a;--mv-surface:#fff;--mv-panel:#edf4f7;--mv-stroke:#b7cbd7}
html[data-theme="dark"]{--mv-accent:#7ae5b9;--mv-text:#eff8fc;--mv-muted:#bdd3e1;--mv-surface:#1d3242;--mv-panel:#172b3b;--mv-stroke:#547080}
html[data-theme="light"]{--mv-accent:#086c53;--mv-text:#163047;--mv-muted:#425a6f;--mv-surface:#fff;--mv-panel:#eff5f6;--mv-stroke:#b8cad3}
/* Make text readable without relying on inherited near-white-on-white rules. */
html[data-theme="light"] .research-section,html[data-theme="light"] .how-section,html[data-theme="light"] .method-section{background:#f5f9fa!important;color:#162d41!important}
html[data-theme="dark"] .research-section,html[data-theme="dark"] .how-section,html[data-theme="dark"] .method-section,html[data-theme="dark"] .features-band{background:#101e2b!important;color:#eff8fc!important}
html[data-theme="dark"] .research-card,html[data-theme="dark"] .research-card-head,html[data-theme="dark"] .research-row,html[data-theme="dark"] .researched-empty,html[data-theme="dark"] .method-card,html[data-theme="dark"] .roadmap-item,html[data-theme="dark"] .features-band .feature-grid{background:#203647!important;border-color:#456174!important;color:#ecf6fb!important}
html[data-theme="dark"] .research-merchant strong,html[data-theme="dark"] .research-price strong,html[data-theme="dark"] .research-card h3,html[data-theme="dark"] .research-card h2{color:#f3f9fc!important}
html[data-theme="dark"] .research-merchant span,html[data-theme="dark"] .research-price span,html[data-theme="dark"] .research-rate,html[data-theme="dark"] .research-card-head small,html[data-theme="dark"] .researched-empty{color:#c3d7e4!important}
html[data-theme="light"] .section-top h2,html[data-theme="light"] .research-section h2,html[data-theme="light"] .how-section h2,html[data-theme="light"] .method-section h2,html[data-theme="light"] .v05-categories h2,html[data-theme="light"] .account-teaser h2{color:#18354c!important}
html[data-theme="light"] .section-top p,html[data-theme="light"] .research-section .section-top p,html[data-theme="light"] .how-section p,html[data-theme="light"] .method-section p{color:#496277!important}
html[data-theme="dark"] .section-top h2,html[data-theme="dark"] .research-section h2,html[data-theme="dark"] .how-section h2,html[data-theme="dark"] .method-section h2,html[data-theme="dark"] .v05-categories h2,html[data-theme="dark"] .account-teaser h2{color:#f0f8fc!important}
html[data-theme="dark"] .section-top p,html[data-theme="dark"] .research-section .section-top p,html[data-theme="dark"] .how-section p,html[data-theme="dark"] .method-section p{color:#c2d7e3!important}
/* Dark appearance must not contain accidental white shop cards. */
html[data-theme="dark"] .showcase{background:#213b4d!important;border:1px solid #638090!important;box-shadow:0 26px 65px #060d14b3!important;color:#f3faff!important}
html[data-theme="dark"] .showcase h2,html[data-theme="dark"] .showcase-offer strong,html[data-theme="dark"] .showcase-offer span{color:#f1faff!important}
html[data-theme="dark"] .showcase-kicker,html[data-theme="dark"] .showcase-footnote{color:#c6dbe7!important}
html[data-theme="dark"] .showcase-offer{border-color:#547181!important}
html[data-theme="dark"] .showcase-footer{background:#274b46!important;color:#cbffe8!important}
html[data-theme="dark"] .showcase-footer strong{color:#b2ffdc!important}
html[data-theme="dark"] .showcase-chip{background:#274f48!important;color:#b4f3ce!important}
/* Avoid sample chip/sticker covering rows at Russian/Polish font lengths. */
.hero-visual .showcase{min-width:0;transform:rotate(-1.2deg);padding-bottom:36px}
.hero-visual .showcase-head{display:flex;gap:14px;align-items:flex-start;flex-wrap:wrap}
.hero-visual .showcase-chip{max-width:calc(100% - 35px);white-space:normal!important;min-height:34px;padding:7px 12px;line-height:1.35;overflow-wrap:break-word}
.hero-visual .showcase-footer{display:flex;align-items:center;gap:10px;justify-content:space-between;flex-wrap:wrap;line-height:1.4}
.hero-visual .showcase-footer span{min-width:0;max-width:75%;overflow-wrap:break-word}
.hero-visual .mini-sticker{position:absolute;left:-5px;bottom:-20px;max-width:56%;overflow-wrap:break-word;z-index:2}
.hero-visual .mini-sticker strong,.hero-visual .mini-sticker small{white-space:normal;line-height:1.35}
/* Cards and prices with independent foregrounds. */
html[data-theme="dark"] .product-card,html[data-theme="dark"] .product-content,html[data-theme="dark"] .product-photo{background:#213749!important;color:#ecf7fc!important;border-color:#4d6b7d!important}
html[data-theme="dark"] .product-name,html[data-theme="dark"] .market-line strong,html[data-theme="dark"] .market-line span,html[data-theme="dark"] .saving-line span:first-child,html[data-theme="dark"] .catalog-count strong{color:#f1f9fd!important}
html[data-theme="dark"] .market-line{border-color:#496374!important}
html[data-theme="dark"] .market-line.best strong{color:#8ef5ca!important}
html[data-theme="light"] .market-line strong,html[data-theme="light"] .market-line span{color:#1a374a!important}
.market-line{display:flex;justify-content:space-between;gap:12px;align-items:center;line-height:1.45;padding:9px 0}
.market-line .price-pair{display:flex;flex-direction:column;align-items:flex-end;text-align:right;gap:2px;white-space:nowrap;max-width:58%;min-width:0}
.market-line .price-pair strong{color:var(--mv-text)!important;font-weight:850;font-size:12px}
.market-line .price-pair small{display:block;color:var(--mv-muted)!important;font-size:10.5px;font-weight:650}
.market-line .market-country{font-size:11.5px;color:var(--mv-muted)!important;min-width:0;overflow-wrap:break-word}
.catalog-count strong,.research-count strong,.stats-total,.metric-value{color:var(--mv-text)!important}
/* Buttons should be discoverable, with minimum hit area */
html[data-theme="dark"] .tabs .tab,html[data-theme="dark"] .filter-row button{border-color:#68849a!important;color:#eaf5ff!important}
html[data-theme="dark"] .tabs .tab:not(.active){background:#29475a!important;color:#f0f8fc!important}
html[data-theme="light"] .tabs .tab:not(.active){background:#f3f7fa!important;color:#243e54!important;border:1px solid #b6c7d3!important}
.tabs .tab,.card-cta,.scanner-entry button,.profile-form-actions button,.btn,.nav-cta{min-height:44px}
.card-cta{background:#167f65!important;color:white!important;font-weight:750}
html[data-theme="dark"] .card-cta{background:#3eab8b!important;color:#09271d!important}
html[data-theme="dark"] .catalog-count,html[data-theme="dark"] .catalog-bottom a{color:#d3e9f4!important}
/* Remove input seam across all browsers, including WebKit search styling. */
.search-field,.search-field input,.search-field input:hover,.search-field input:focus{box-shadow:none!important;background-image:none!important;border-bottom:0!important}
.search-field{background:var(--mv-panel)!important;border:1px solid var(--mv-stroke)!important}
.search-field:focus-within{border-color:#26a685!important;box-shadow:0 0 0 3px #2ab89445!important}
.search-field input[type="search"]{appearance:none!important;-webkit-appearance:none!important;outline:0!important;border:0!important;border-radius:0!important;background:transparent!important;min-height:35px;min-width:0}
.search-field input[type="search"]::-webkit-search-decoration,.search-field input[type="search"]::-webkit-search-results-button,.search-field input[type="search"]::-webkit-search-results-decoration{display:none}
/* Support 16px input text for accessibility and mobile zoom prevention. */
.search-field input,.scanner-entry input,.scanner-panel select,.filter-select select{font-size:16px!important;color:var(--mv-text)!important}
.filter-select select{background:var(--mv-panel)!important;color:var(--mv-text)!important;border-color:var(--mv-stroke)!important;min-height:42px}
.filter-select label{color:var(--mv-muted)!important}
/* Small labels / CTA never fade into their backgrounds. */
html[data-theme="dark"] .catalog-notice{background:#29485b!important;color:#f0fafc!important}
html[data-theme="dark"] .catalog-notice *,html[data-theme="dark"] .card-cta *{color:inherit!important}
html[data-theme="dark"] .scanner-panel{background:#203648!important}
html[data-theme="dark"] .scanner-result,html[data-theme="dark"] .vat-tools{background:#172b3c!important}
html[data-theme="dark"] .scanner-panel label,html[data-theme="dark"] .scanner-panel p,html[data-theme="dark"] .scan-market small{color:#d4e6ee!important}
html[data-theme="dark"] .scan-market strong,html[data-theme="dark"] .scan-header h3{color:#f3fbfe!important}
html[data-theme="dark"] .scan-saving strong{color:#aaf1ca!important}
html[data-theme="dark"] .scanner-ready{color:#d1e4ed!important}
html[data-theme="dark"] .footer{background:#0e1c28!important}
html[data-theme="light"] .footer{background:#ebf2f5!important}
html[data-theme="dark"] .footer-pages a,html[data-theme="dark"] .footer p,html[data-theme="dark"] .footer .coverage-line{color:#d8e9f3!important}
html[data-theme="light"] .footer-pages a,html[data-theme="light"] .footer p,html[data-theme="light"] .footer .coverage-line{color:#405b70!important}
.visitor-banner #visitor-period{display:none!important}
.visitor-banner .visitor-stat small{color:var(--mv-muted)!important;font-size:13px}
.visitor-banner .visitor-stat strong{color:var(--mv-text)!important}
/* Chart: prevent legacy HTML bars CSS affecting SVG rects. */
.chart-wrap svg .chart-svg-bar{cursor:pointer;transition:opacity .15s ease}
.chart-wrap svg .chart-svg-bar:hover,.chart-wrap svg .chart-svg-point:hover{opacity:.78;filter:brightness(1.08)}
.chart-wrap svg .chart-svg-point{cursor:pointer}
.chart-wrap svg text{font-family:system-ui,Segoe UI,sans-serif;fill:var(--mv-muted)}
.chart-wrap{overflow:visible;min-height:245px}
/* Secondary pages share light/dark styling and a fixed language control. */
.subpage-locale-fixed{position:fixed;right:15px;bottom:16px;z-index:10000;padding:9px 12px;border-radius:13px;background:var(--mv-surface);color:var(--mv-text);border:1px solid var(--mv-stroke);box-shadow:0 12px 30px #0003;display:flex;gap:7px;align-items:center}
.subpage-locale-fixed label{font-size:12px;font-weight:750;color:var(--mv-muted)}
.subpage-locale-fixed select{background:var(--mv-panel);border:1px solid var(--mv-stroke);border-radius:9px;color:var(--mv-text);font-size:13px;padding:8px 7px;max-width:170px}
html[data-theme="dark"] .subpage-main,html[data-theme="dark"] .article,html[data-theme="dark"] .plan-card,html[data-theme="dark"] .profile-chart-card,html[data-theme="dark"] .profile-form-card{background:#162a3a!important;color:#ecf7fb!important}
html[data-theme="dark"] .article,html[data-theme="dark"] .plan-card,html[data-theme="dark"] .profile-chart-card,html[data-theme="dark"] .profile-form-card{background:#233b4d!important;border-color:#537082!important}
html[data-theme="dark"] .subpage-main h1,html[data-theme="dark"] .subpage-main h2,html[data-theme="dark"] .subpage-main h3{color:#f5fbfc!important}
html[data-theme="dark"] .subpage-main p,html[data-theme="dark"] .subpage-main li,html[data-theme="dark"] .subpage-main small{color:#cee2ed!important}
html[data-theme="light"] .subpage-main h1,html[data-theme="light"] .subpage-main h2{color:#153148!important}
html[data-theme="light"] .subpage-main p,html[data-theme="light"] .subpage-main li{color:#405a6c!important}
@media(max-width:640px){.hero-visual .mini-sticker{max-width:51%;left:0;bottom:-10px}.hero-visual .showcase{padding:18px 19px 31px;transform:none}.showcase h2{font-size:clamp(19px,4vw,28px)}.hero-visual .showcase-footer{gap:5px}.hero-visual .showcase-footer span{max-width:66%}.visitor-banner{padding:17px}.visitor-stat strong{font-size:26px}.market-line .market-country{font-size:11px}.market-line .price-pair strong{font-size:11px}.market-line .price-pair small{font-size:10px}.subpage-locale-fixed{right:8px;bottom:8px;padding:7px 9px}}
@media(prefers-reduced-motion:reduce){.chart-wrap svg .chart-svg-bar{transition:none}}
