html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0b1120;
    --surface: #111827;
    --surface-2: #1e293b;
    --text: #e2e8f0;
    --heading: #f8fafc;
    --muted: #94a3b8;
    --faint: #64748b;
    --border: #1f2937;
    --border-strong: #334155;
    --input-bg: #0b1120;
    --input-text: #ffffff;
    --link: #4ade80;
    --hover: #ffffff;
    --thumb-from: #1e293b;
    --thumb-to: #0f172a;
    --day: #334155;
    --day-open: #22c55e;
    --lock-bg: rgba(11, 17, 32, 0.55);
    --lock-icon-bg: #1e293b;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    --modal-backdrop: rgba(0, 0, 0, 0.65);
    --quote-bg: #052e16;
    --quote-text: #bbf7d0;
    --alert-success-bg: #14532d;
    --alert-success-text: #bbf7d0;
    --alert-success-border: #166534;
    --alert-error-bg: #450a0a;
    --alert-error-text: #fecaca;
    --alert-error-border: #7f1d1d;
    --done-bg: #1f2937;
    --done-text: #94a3b8;
    --outline-hover: #1e293b;
    --switch-bg: #0f172a;
    --switch-text: #94a3b8;
    --switch-border: #334155;
}

html[data-theme="light"] {
    color-scheme: light;
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-2: #e8eef6;
    --text: #0f172a;
    --heading: #0f172a;
    --muted: #475569;
    --faint: #64748b;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --input-bg: #ffffff;
    --input-text: #0f172a;
    --link: #047857;
    --hover: #0f172a;
    --thumb-from: #e2e8f0;
    --thumb-to: #f8fafc;
    --day: #94a3b8;
    --day-open: #059669;
    --lock-bg: rgba(15, 23, 42, 0.4);
    --lock-icon-bg: #ffffff;
    --shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
    --modal-backdrop: rgba(15, 23, 42, 0.45);
    --quote-bg: #f0fdf4;
    --quote-text: #166534;
    --alert-success-bg: #dcfce7;
    --alert-success-text: #166534;
    --alert-success-border: #86efac;
    --alert-error-bg: #fef2f2;
    --alert-error-text: #991b1b;
    --alert-error-border: #fecaca;
    --done-bg: #e5e7eb;
    --done-text: #6b7280;
    --outline-hover: #f1f5f9;
    --switch-bg: #e8eef6;
    --switch-text: #475569;
    --switch-border: #cbd5e1;
}

html, body {
    background-color: var(--bg);
    color: var(--text);
}

html:not([data-currency="usd"]) [data-money="usd"],
html[data-currency="usd"] [data-money="ugx"] {
    display: none;
}

.currency-link {
    display: inline;
    margin: 0.15rem 0 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--link);
    font-family: system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.currency-link:hover {
    color: var(--hover);
}

.theme-switch {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    padding: 2px;
    border: 1px solid var(--switch-border);
    border-radius: 999px;
    background: var(--switch-bg);
    font-family: system-ui, sans-serif;
    line-height: 1;
}

.theme-switch button {
    width: auto;
    margin: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--switch-text);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 0.4rem 0.7rem;
    cursor: pointer;
}

.theme-switch button[aria-pressed="true"] {
    background: #22c55e;
    color: #052e16;
}

.theme-switch button:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}
