/* Visitor preference stays on the document root through internal navigation. */
html[data-color-mode="light"]{color-scheme:light}html[data-color-mode="dark"]{color-scheme:dark;--paper:#10141b;--ink:#f3f6fa;--muted:#bbc5d3;--line:#3c4656;--soft:#202938;--white:#1b2330;--mode-surface:#1b2330;--mode-field:#111925;--mode-accent:#ff8a9e}
.color-mode-toggle{flex:none;display:inline-grid;place-items:center;width:42px;height:42px;min-width:42px;padding:0;border:1px solid #b7c0cc;border-radius:50%;background:#fff;color:#202630;font-size:24px;line-height:1;cursor:pointer}.color-mode-toggle:hover{border-color:#d90018}.color-mode-toggle:focus-visible{outline:3px solid #d90018;outline-offset:3px}
html[data-color-mode="dark"] body{background:var(--paper);color:var(--ink)}
html[data-color-mode="dark"] .site-header,html[data-color-mode="dark"] body:has(.radio-page) .site-header,html[data-color-mode="dark"] #primary-menu,html[data-color-mode="dark"] body:has(.radio-page) #primary-menu{background:#141b25;color:var(--ink);border-color:var(--line)}
html[data-color-mode="dark"] .color-mode-toggle,html[data-color-mode="dark"] .menu-toggle{background:#283346;color:var(--ink);border-color:#738299}
html[data-color-mode="dark"] .site-brand img,html[data-color-mode="dark"] .custom-logo-link img{background:#f8fafc;border-radius:7px;padding:4px}
html[data-color-mode="dark"] .reference-wordmark,html[data-color-mode="dark"] .reference-home .reference-intro,html[data-color-mode="dark"] .reference-category{color:var(--ink)}
html[data-color-mode="dark"] .reference-wordmark>span>span,html[data-color-mode="dark"] .reference-wordmark>svg,html[data-color-mode="dark"] .live-text{color:#ff536d}
html[data-color-mode="dark"] .reference-description,html[data-color-mode="dark"] .search-form span,html[data-color-mode="dark"] .card-meta,html[data-color-mode="dark"] .card-bottom,html[data-color-mode="dark"] .banner-note>span{color:var(--muted)}
html[data-color-mode="dark"] .reference-search,html[data-color-mode="dark"] .search-form,html[data-color-mode="dark"] .category-card,html[data-color-mode="dark"] .business-card,html[data-color-mode="dark"] .hero-radio,html[data-color-mode="dark"] .form-panel,html[data-color-mode="dark"] .stat-grid>div,html[data-color-mode="dark"] .owner-list,html[data-color-mode="dark"] .profile-sidebar,html[data-color-mode="dark"] .offer-card,html[data-color-mode="dark"] .empty-state{background:var(--mode-surface);border-color:var(--line);color:var(--ink)}
html[data-color-mode="dark"] .reference-search input,html[data-color-mode="dark"] .search-form input{color:var(--ink)}
html[data-color-mode="dark"] input::placeholder,html[data-color-mode="dark"] textarea::placeholder{color:#aebccd;opacity:1}
html[data-color-mode="dark"] .form-grid input,html[data-color-mode="dark"] .form-grid textarea,html[data-color-mode="dark"] .form-grid select,html[data-color-mode="dark"] .profile-sidebar textarea,html[data-color-mode="dark"] .filter-row select{background:var(--mode-field);color:var(--ink);border-color:#68798f}
html[data-color-mode="dark"] .chip,html[data-color-mode="dark"] .pagination .page-numbers,html[data-color-mode="dark"] .popular a,html[data-color-mode="dark"] .button.secondary{background:#202c3c;color:var(--ink);border-color:#68798f}
html[data-color-mode="dark"] .chip:hover,html[data-color-mode="dark"] .chip.active,html[data-color-mode="dark"] .pagination .current,html[data-color-mode="dark"] .button.secondary:hover{background:#3b4e67;color:#fff;border-color:#9cacc1}
html[data-color-mode="dark"] .business-banner{background:#1c2635}html[data-color-mode="dark"] .banner-note{background:#253143;border-color:#536177;box-shadow:9px 9px 0 #0a101a}html[data-color-mode="dark"] .banner-note>strong{color:#f3f6fa}
html[data-color-mode="dark"] .site-footer,html[data-color-mode="dark"] body:has(.radio-page) .site-footer{background:#141b25;color:var(--ink);border-color:var(--line)}
html[data-color-mode="dark"] .footer-top>div>a:not(.site-brand):not(.custom-logo-link),html[data-color-mode="dark"] .footer-bottom{color:var(--muted);border-color:var(--line)}
html[data-color-mode="dark"] .owner-list>a:hover{background:#2a374a}html[data-color-mode="dark"] .message{background:#202a38}html[data-color-mode="dark"] .message.mine{background:#392932}html[data-color-mode="dark"] .notice-success{background:#183b2c;color:#c4f0d8}
html[data-color-mode="dark"] .card-image,html[data-color-mode="dark"] .monogram{background:#263244;color:#d9e4f0}html[data-color-mode="dark"] .badge{background:#344155;color:#e1e9f4}html[data-color-mode="dark"] .badge.featured{background:#473b22;color:#ffe4a1}html[data-color-mode="dark"] .verified{color:#8ee1b8}
html[data-color-mode="dark"] .step-number,html[data-color-mode="dark"] .category-icon,html[data-color-mode="dark"] .category-card:nth-child(n) .category-icon,html[data-color-mode="dark"] .text-link:hover,html[data-color-mode="dark"] #primary-menu a:not(.button):hover,html[data-color-mode="dark"] .offer-price{color:var(--mode-accent)}
/* A consistent dark console protects the chrome, neon and playback contrast in both modes. */
html[data-color-mode="dark"] body:has(.radio-page){background:#10141b;color:#fff}html[data-color-mode="dark"] .radio-page{background:radial-gradient(ellipse at 35% 15%,#74344322,transparent 52%),#10141b}
html[data-color-mode="dark"] #primary-menu a.button:hover,html[data-color-mode="dark"] #primary-menu a.button:focus-visible{color:#bd001d;background:#fff;border-color:#ff9cac}
@media(max-width:960px){#primary-menu .color-mode-toggle{margin:8px 0 12px}}
