/* The theme chooser is shared by the account page and its accessible radio controls. */
.account-theme-settings > p { line-height: 1.6; }
.theme-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; min-width: 0; margin: 24px 0 0; padding: 0; border: 0; }
.theme-choices legend { margin-bottom: 12px; font-weight: 700; }
.theme-option { position: relative; display: block; margin: 0; cursor: pointer; font-weight: 400; }
.theme-option > input { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; opacity: 0; }
.theme-option-content { display: grid; gap: 10px; height: 100%; padding: 18px; border: 2px solid #d6dee6; border-radius: 16px; background: #f8fafc; color: #1f2933; }
.theme-option-content > strong { font-size: 1.1rem; }
.theme-option-content > span:last-child { line-height: 1.5; }
.theme-option > input:checked + .theme-option-content { border-color: #1e4d6b; box-shadow: 0 0 0 1px #1e4d6b; }
.theme-option > input:focus-visible + .theme-option-content { outline: 3px solid #3a7ca5; outline-offset: 4px; }
.theme-preview { display: grid; align-content: center; gap: 8px; height: 78px; padding: 14px; border: 1px solid #d6dee6; border-radius: 10px; }
.theme-preview > span { display: block; height: 5px; width: 78%; border-radius: 3px; }
.theme-preview > span:first-child { width: 48%; height: 8px; }
.theme-preview > span:last-child { width: 62%; }
.theme-preview-light { background: #fff; }
.theme-preview-light > span { background: #343a42; }
.theme-preview-dark { background: #292c31; }
.theme-preview-dark > span { background: #fff; }
.theme-status { min-height: 1.6em; margin: 18px 0 0; font-size: .95rem; color: #607080; }
@media (max-width: 480px) { .theme-choices { grid-template-columns: 1fr; } }

html[data-site-theme="light"] { color-scheme: light; }
html[data-site-theme="dark"] {
    color-scheme: dark;
    --site-theme-background: #191b1f;
    --site-theme-surface: #292c31;
    --site-theme-raised: #34383f;
    --site-theme-line: #525862;
    --ink: #fff;
    --muted: #fff;
    --paper: #292c31;
    --soft: #191b1f;
    --dark: #191b1f;
    --line: #525862;
    background: var(--site-theme-background);
}
html[data-site-theme="dark"] body {
    background: var(--site-theme-background) !important;
    color: #fff !important;
}
/* Existing pages use both inline styles and W3 utility classes. Keep every label readable. */
html[data-site-theme="dark"] body :where(h1, h2, h3, h4, h5, h6, p, a, label, legend, summary, li, dt, dd, span, small, strong, em, b, div, figcaption, blockquote, th, td, button, input, select, textarea) {
    color: #fff !important;
}
html[data-site-theme="dark"] body :where(.account-card, .auth-card, .card, .article-card, .article-gallery, .comments-card, .hero-panel, .car-card, .admin-panel, .side-panel, .photo-card, .search-panel, .empty-state, .modal-content, .auth-modal-dialog, .technical-card, .legal-card, .gallery-access-card, .containerform, .w3-white, .w3-light-grey, .w3-grey, .w3-gray, .estimation-results, .estimation-source, .estimation-range, .estimation-ad-card, .estimation-all-ads, .estimation-fees-summary) {
    background: var(--site-theme-surface) !important;
    border-color: var(--site-theme-line) !important;
}
html[data-site-theme="dark"] body :where(.site-shell, .topbar, .site-nav, .site-footer, .footer, .footerbox, .grid-containerfooter, .grid-container, .boxhead) {
    background-color: var(--site-theme-surface) !important;
    border-color: var(--site-theme-line) !important;
}
html[data-site-theme="dark"] body :where(.comment-item, .news-item, .site-news-item, .gallery-admin-collapsible, .gallery-admin-item, .switcher, .switcher button.is-active, .contact-band, .form-collapsible, .quick-spec, .quick-icon, .stat, .filter, .thumb, .gallery-thumb, .gallery-thumbs, .detail-media, .detail-specs li, .viewer-close, .viewer-nav, .word-form, .word-chip, .row, .message) {
    background: var(--site-theme-raised) !important;
    border-color: var(--site-theme-line) !important;
}
html[data-site-theme="dark"] body :where(input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]), select, textarea) {
    background: var(--site-theme-background) !important;
    border-color: var(--site-theme-line) !important;
}
html[data-site-theme="dark"] body :where(input, textarea)::placeholder { color: #c7cbd1 !important; opacity: 1; }
html[data-site-theme="dark"] body :where(input[type="radio"], input[type="checkbox"]) { accent-color: #69b8e9; }
html[data-site-theme="dark"] body :where(.btn-secondary, .button, .link-button, .button.secondary, .link-button.secondary, .vote-button.secondary, .nav a, .site-nav a, .legal-nav a, .w3-button:hover, .w3-black, .process, .estimation-hero-aside, .estimation-recommendation, .estimation-step, .eyebrow) {
    background-color: var(--site-theme-raised) !important;
    border-color: var(--site-theme-line) !important;
}
html[data-site-theme="dark"] .wizard-steps li::before,
html[data-site-theme="dark"] .form-collapsible summary::after,
html[data-site-theme="dark"] .gallery-admin-collapsible summary::after {
    background: var(--site-theme-raised) !important;
    color: #fff !important;
}
html[data-site-theme="dark"] body :where(.nav .active, .nav a:hover, .site-nav a.is-active, .site-nav a[aria-current="page"], .site-nav a:hover, .filter.active) {
    background: #1e4d6b !important;
    border-color: #69b8e9 !important;
}
html[data-site-theme="dark"] body :where(.message.success, .admin-badge, .status-badge.available, .detail-status) { background: #214b36 !important; }
html[data-site-theme="dark"] body :where(.message.error, .error-box, .danger-btn, .button.danger, .link-button.danger) { background: #6a292e !important; }
html[data-site-theme="dark"] body :where(hr, table, th, td) { border-color: var(--site-theme-line) !important; }
html[data-site-theme="dark"] body :where(.theme-option-content) { background: var(--site-theme-raised); border-color: var(--site-theme-line); }
html[data-site-theme="dark"] .theme-option > input:checked + .theme-option-content { border-color: #69b8e9; box-shadow: 0 0 0 1px #69b8e9; }
/* Keep photographs in their original colors; only dim the decorative page backdrop. */
html[data-site-theme="dark"] body::before { opacity: .12 !important; }
html[data-site-theme="dark"] body::after { background: transparent !important; }
html[data-site-theme="dark"] body a:focus-visible { outline: 3px solid #69b8e9; outline-offset: 4px; }
html[data-site-theme="dark"] .site-footer > img { filter: brightness(0) invert(1); }
