/* One theme preference across all first-party pages and dialogs. */
html{color-scheme:light}html[data-theme="dark"]{color-scheme:dark;--ink:#f3eee3;--green:#a6c2b3;--deep:#172631;--cream:#111a24;--paper:#22303c;--line:#526675;--border:#526675;--muted:#c1cbca;--soft:#2c404c;--accent:#deb698;--rose:#ffb6a0;--gold:#d4c8b1}
.page-theme-actions{display:flex;align-items:center;justify-content:flex-end;gap:20px;flex-wrap:wrap}
.theme-toggle,html .home-page .theme-toggle{width:44px;height:44px;min-width:44px;min-height:44px;flex:none;border:1px solid var(--line,#607a70);border-radius:50%;background:var(--paper,#fffdf7);color:var(--ink,#24443a);display:inline-grid;place-items:center;position:relative;cursor:pointer;padding:0}
.theme-toggle svg{width:22px;height:22px;grid-area:1/1}.theme-toggle .theme-moon{display:none}html[data-theme="dark"] .theme-toggle .theme-sun{display:none}html[data-theme="dark"] .theme-toggle .theme-moon{display:block}
.theme-toggle:focus-visible{outline:3px solid #b47752;outline-offset:4px}
html[data-theme="dark"] body:not(.home-page){background:var(--cream);color:var(--ink)}
html[data-theme="dark"] :is(.panel,.card,.login-card,.account-card,.legal-copy,.review-card,dialog,.profile-editor,.pause-dialog){background:var(--paper);color:var(--ink);border-color:var(--line);box-shadow:0 10px 30px #0003}
html[data-theme="dark"] :is(.gift-summary,.summary,.onboard-summary,.preview-notice,.annual-review-disclosure,.checkout-notice,.account-message:not(:empty),.cancellation-note,.phone-current,.friend-preview-result,.review-note,.health-item,.notice){background:var(--soft);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){background:#172631;color:var(--ink);border-color:#657b89}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#aebdbf;opacity:1}
html[data-theme="dark"] :is(fieldset,.phone-consent-group,.facts li,.legal-copy,.review-card,.site-header){border-color:var(--line)}
html[data-theme="dark"] :is(.phone-consent-group,.choice,.interest,.editor-choice,.editor-chip,.plan-option){background:#22303c;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.choice:hover,.choice.selected,.interest.selected,.interest:hover,.editor-chip.selected,.editor-choice:has(input:checked),.plan-option:hover,.plan-option:disabled){background:#354f57;color:var(--ink);border-color:#a6c2b3}
html[data-theme="dark"] :is(.button-dark,.account-action:not(:disabled)){background:#a6c2b3;color:#172b30;border-color:#a6c2b3}
html[data-theme="dark"] :is(.button-dark:hover,.account-action:not(:disabled):hover){background:#bfd1c4;color:#172b30}
html[data-theme="dark"] .gift-header~main .button,html[data-theme="dark"] .topbar~main .button{background:#a6c2b3;color:#172b30}
html[data-theme="dark"] .gift-header~main .button.secondary{background:transparent;color:var(--ink);border-color:#91b9a7}
html[data-theme="dark"] :is(.close,.editor-close,.card-heading span,.success-mark){background:#354b55;color:var(--ink)}
html[data-theme="dark"] :is(.error,.editor-error,.required){color:#ffb6a0}html[data-theme="dark"] .error{background:#482f31}
html[data-theme="dark"] :is(.dialog-kicker,.kicker,.eyebrow){color:#deb698}
html[data-theme="dark"] :is(.gift-header, .gift-header~footer){background:#111a24;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.account-footer,.site-header,.topbar){background:#111a24;color:var(--ink)}
html[data-theme="dark"] .review-card{box-shadow:8px 10px 0 #172631}
html[data-theme="dark"] .topbar~main :is(.metric-feature,.message,.message.friend,.pill,.pill.neutral,.health-item){background:#2c404c;color:var(--ink)}
html[data-theme="dark"] .topbar~main :is(.pill.warn,.health-item.warn){background:#482f31;color:#ffb6a0}
html[data-theme="dark"] :is(tbody tr:hover,tbody tr:focus){background:#354b55}
html[data-theme="dark"] .badge{color:#172b30}html[data-theme="dark"] .skeleton{background:#2c404c}
/* Override the old homepage-only dialog palette so onboarding follows the switch. */
html[data-theme="dark"] .home-page #signup{--ink:#f3eee3;--green:#a6c2b3;--deep:#172631;--cream:#111a24;--paper:#22303c;--line:#526675;--muted:#c1cbca;background:#22303c;color:var(--ink)}
html[data-theme="dark"] .home-page #signup .button-dark{background:#a6c2b3;color:#172b30}
html[data-theme="dark"] #signup .plan-choice.recommended{background:#2c404c;border-color:#718799;box-shadow:none}
html[data-theme="dark"] #signup .plan-choice.selected{background:#354f57;border-color:#a6c2b3;box-shadow:inset 0 0 0 1px #a6c2b3}
html[data-theme="dark"] .onboard-popular{color:#172b30}
@media(max-width:700px){.page-theme-actions{gap:10px}.gift-header{flex-wrap:wrap;gap:18px}.site-header .nav{flex-wrap:wrap;row-gap:18px}.topbar-inner{height:auto;min-height:78px;flex-wrap:wrap;padding-block:16px;gap:14px}.topbar .internal-label{display:none}}
html[data-theme="dark"] .home-page #signup .button-dark:hover{background:#bfd1c4;color:#172b30}
