/* Day mode keeps the existing palette. Follow OS changes without JavaScript. */
:root { color-scheme: light; }
@media (prefers-color-scheme: dark) {
    :root { color-scheme: dark; }
    html, body { background:#141b1e !important; color:#e0e8e7 !important; }
    img[src="img/logo.png"] { filter:invert(1); }
    font[color="red"] { color:#ffb5a8; }
    a { color:#80d6c5 !important; }
    h1,h2,h3,h4,h5,h6,strong,label,legend { color:inherit; }
    p,small,.muted,#lastScanTime,#scanChanges small,#scanHistory small { color:#bdcbc8 !important; }
    table,thead,tbody,tr,td,th { border-color:#40514f !important; }
    table.striped > tbody > tr:nth-child(odd),tr.follower-hover { background:#202d30 !important; }
    table.highlight td a { color:#d6efff !important; }
    table.highlight td a:hover { color:#fff !important; text-decoration:underline; }
    table.highlight > tbody > tr.notfollowed { background:#383221 !important; }
    table.highlight > tbody > tr.notfollowed:hover { background:#49402a !important; }
    table.highlight > tbody > tr.unknown { background:#313b3e !important; }
    .modal-footer,aside[aria-label="New version announcement"] { background:#253a36 !important; color:#e0e8e7 !important; border-color:#47655d !important; }
    table.highlight > tbody > tr:hover { background:#30413f !important; }
    .white,.card,.card-panel,.collection,.collection-item,.dropdown-content,.modal,
    dialog,#scanNavigation,#notificationSettingsDialog,#scanPauseDialog { background:#202b2e !important; color:#e0e8e7 !important; border-color:#455552 !important; }
    #scanNavigation a[aria-current="page"] { color:#fff !important; }
    dialog::backdrop { background:#0009; }
    button,.btn,.btn-large { background:#236d60 !important; color:#f1fffb !important; border-color:#57988c !important; }
    button.secondary,#scanHistory button,.notification-close { background:#293a3c !important; color:#e0e8e7 !important; }
    #scanHistory button[aria-pressed="true"] { background:#286f61 !important; }
    .settings-tabs { border-color:#455552 !important; }
    .settings-tabs button { background:transparent !important; color:#bdcbc8 !important; border-bottom-color:transparent !important; }
    .settings-tabs button[aria-selected="true"] { color:#8ce1cf !important; border-bottom-color:#8ce1cf !important; }
    input,select,textarea { background:#192427 !important; color:#e0e8e7 !important; border-color:#5a6e69 !important; }
    input[type="checkbox"] { accent-color:#80d6c5; }
    input::placeholder,textarea::placeholder { color:#9aadaa; }
    #scanPauseNotice { background:#382a26 !important; border-color:#b77b66 !important; color:#ffd8ca !important; }
    #scanPauseNotice p { color:#f2c8b9 !important; }
    #scanPauseNotice button { background:transparent !important; color:#ffd8ca !important; }
    #errorDiv { color:#ffb5a8 !important; }
    :focus-visible { outline:2px solid #94ebd8; outline-offset:3px; }
    .disabled,button:disabled { opacity:.55; }
}
