/* Appearance controls use explicit semantic tokens. Legacy palettes are scoped to screen only. */
:root {
    --csd-control-surface: #fff;
    --csd-control-soft: #f2f5f9;
    --csd-control-text: #26364c;
    --csd-control-muted: #64748b;
    --csd-control-line: #dce4ed;
    --csd-control-active: #e9f1ff;
    --csd-control-accent: #2359ac;
}
html[data-csd-theme] { color-scheme: light; }
[data-theme-preserve] { color: #212529; color-scheme: light; }
:is([data-theme-preserve], .simple-editor, .note-editable, .mandate-paper__page) {
    color-scheme: light;
    --bs-body-bg: #fff; --bs-body-color: #212529; --bs-heading-color: #212529;
    --bs-border-color: #dee2e6; --bs-secondary-color: #6c757d;
}
/* Paper owns its document palette, even when the surrounding workspace is dark. */
.offer-document-preview[data-theme-preserve] {
    --offer-ink: #162033; --offer-muted: #667085; --offer-line: #dbe4ef;
    --offer-soft: #f5f8fc; --offer-brand: #123047; --offer-teal: #1d7a86; --offer-gold: #dca43a;
}
html[data-csd-theme] :is([data-theme-preserve], .simple-editor, .note-editable, .mandate-paper__page) .table { color: #212529; }
html[data-csd-theme] :is([data-theme-preserve], .simple-editor, .note-editable, .mandate-paper__page) .text-muted { color: #6c757d !important; }
/* The added preferences remain reachable on short screens and at text zoom. */
.dropdown-menu.profile-dropdown { max-height: calc(100dvh - 80px); overflow-y: auto; overscroll-behavior: contain; }
@media screen {
    /* Small white labels need sufficient contrast in both appearance modes. */
    html[data-csd-theme="light"] .main-sidebar .nav-sidebar > .nav-item > .nav-link.active:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #fff; background-color: #1d4ed8; }
    html[data-csd-theme="dark"] {
        color-scheme: dark;
        --csd-control-surface: #182333;
        --csd-control-soft: #111b2b;
        --csd-control-text: #e5edf7;
        --csd-control-muted: #b3c1d3;
        --csd-control-line: #39495e;
        --csd-control-active: #233b5c;
        --csd-control-accent: #a4caff;
        background: #0f1724;
    }
    html[data-csd-theme="dark"] body:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #e5edf7; background-color: #0f1724; }
    /* Bootstrap pagination also appears in the bounded Activity result list. */
    html[data-csd-theme="dark"] .pagination .page-link:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: var(--csd-control-accent); background-color: var(--csd-control-surface); border-color: var(--csd-control-line); }
    html[data-csd-theme="dark"] .pagination .page-link:is(:hover, :focus):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: var(--csd-control-text); background-color: var(--csd-control-active); }
    html[data-csd-theme="dark"] .pagination .page-item.active .page-link:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #fff; background-color: #1d4ed8; border-color: #1d4ed8; }
    html[data-csd-theme="dark"] .pagination .page-item.disabled .page-link:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: var(--csd-control-muted); background-color: var(--csd-control-soft); }
    html[data-csd-theme="dark"] :is(.content-wrapper, .wrapper):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { background-color: #0f1724; }
    html[data-csd-theme="dark"] .main-sidebar:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { background-color: #111b2b; }
    html[data-csd-theme="dark"] .main-sidebar .nav-sidebar .nav-link:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #b3c1d3; }
    html[data-csd-theme="dark"] .main-sidebar .nav-sidebar .nav-link:hover:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #e5edf7; background-color: #202d3f; }
    html[data-csd-theme="dark"] .main-sidebar .nav-sidebar > .nav-item > .nav-link.active:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #fff; background-color: #1d4ed8; }
    html[data-csd-theme="dark"] .main-sidebar .nav-treeview > .nav-item > .nav-link.active:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #e5edf7; background-color: #233b5c; }
    html[data-csd-theme] :is(.badge.bg-success, .badge-success):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #fff !important; background-color: #216840 !important; }
    html[data-csd-theme="dark"] :is(.bg-white, .bg-light, .navbar-white, .dropdown-menu, .card, .modal-content, .popover, .list-group-item):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) {
        background-color: #182333 !important;
        color: #e5edf7;
        border-color: #39495e;
    }
    html[data-csd-theme="dark"] :is(.text-dark, .text-body, .text-black-50):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #e5edf7 !important; }
    html[data-csd-theme="dark"] .text-muted:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #b3c1d3 !important; }
    html[data-csd-theme="dark"] :is(.bg-white, .bg-light):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #e5edf7 !important; }
    html[data-csd-theme="dark"] .alert-info:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #c5ebfa; background-color: #173c4c; border-color: #417f95; }
    html[data-csd-theme="dark"] :is(.client-responsibility-connection__status, .client-responsibility-connection__icon):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: color-mix(in srgb, rgb(var(--connection-rgb)) 35%, #fff); }
    html[data-csd-theme="dark"] .text-primary:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #a4caff !important; }
    html[data-csd-theme="dark"] .text-danger:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #f1ada9 !important; }
    html[data-csd-theme="dark"] :is(.form-control, .custom-select, .form-select, .input-group-text):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) {
        color: #e5edf7; background-color: #111b2b; border-color: #53657d;
    }
    html[data-csd-theme="dark"] :is(.form-control, .custom-select):disabled:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { background-color: #243044; color: #a9b6c7; }
    html[data-csd-theme="dark"] :is(.table, .dropdown-item, .nav-link, .popover-body, .modal-title):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #e5edf7; }
    html[data-csd-theme="dark"] :is(.table td, .table th, .table thead th):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { border-color: #39495e; }
    html[data-csd-theme="dark"] :is(.table-light, .table-light > td, .table-light > th):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #e5edf7; background-color: #202d3f; }
    html[data-csd-theme="dark"] .table-hover tbody tr:hover:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #e5edf7; background-color: #24344b; }
    html[data-csd-theme="dark"] .table-striped tbody tr:nth-of-type(odd):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { background-color: rgba(255,255,255,.025); }
    html[data-csd-theme="dark"] .dropdown-item:is(:hover, :focus):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { background-color: #24344b; }
    html[data-csd-theme="dark"] :is(.flatpickr-calendar, .flatpickr-months, .flatpickr-weekdays, .flatpickr-time, .select2-dropdown, .select2-search__field, .note-editor, .note-toolbar, .note-statusbar, .swal2-popup):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) {
        background: #182333; color: #e5edf7; border-color: #39495e;
    }
    html[data-csd-theme="dark"] :is(.flatpickr-day, .flatpickr-weekday, .flatpickr-current-month, .flatpickr-month, .flatpickr-time input, .flatpickr-time .flatpickr-am-pm):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #e5edf7; }
    html[data-csd-theme="dark"] .flatpickr-day:is(.prevMonthDay, .nextMonthDay, .flatpickr-disabled):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #7d8ca1; }
    html[data-csd-theme="dark"] .flatpickr-day:is(:hover, :focus):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { background: #2c3d55; border-color: #53657d; }
    html[data-csd-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { background: #182333; color: #e5edf7; }
    html[data-csd-theme="dark"] .select2-container--default :is(.select2-selection--single, .select2-selection--multiple, .select2-selection__choice):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { background: #111b2b; color: #e5edf7; border-color: #53657d; }
    html[data-csd-theme="dark"] .select2-container--default .select2-selection__rendered:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #e5edf7; }
    html[data-csd-theme="dark"] .select2-container--default .select2-results__option[aria-selected="true"]:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { background: #24344b; color: #e5edf7; }
    html[data-csd-theme="dark"] :is(.swal2-title, .swal2-html-container, .swal2-footer):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #e5edf7; }
    html[data-csd-theme="dark"] :is(.flatpickr-prev-month, .flatpickr-next-month) svg:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { fill: #e5edf7; }
    html[data-csd-theme="dark"] .fc:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { --fc-page-bg-color: #182333; --fc-neutral-bg-color: #202d3f; --fc-border-color: #39495e; --fc-today-bg-color: rgba(96,165,250,.1); }
    html[data-csd-theme="dark"] #meetingsCalendar .operational-source-meeting:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { --fc-event-bg-color: #4f46b8; --fc-event-border-color: #a5a7f5; }
    html[data-csd-theme="dark"] #meetingsCalendar .operational-source-intervention:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { --fc-event-bg-color: #923a14; --fc-event-border-color: #f5b487; }
    html[data-csd-theme="dark"] #meetingsCalendar .operational-source-task:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { --fc-event-bg-color: #146448; --fc-event-border-color: #80cdb0; }
    html[data-csd-theme="dark"] #meetingsCalendar .operational-source-ticket:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { --fc-event-bg-color: #805015; --fc-event-border-color: #eac880; }
    html[data-csd-theme="dark"] #meetingsCalendar .operational-source-ticket-urgent:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { --fc-event-bg-color: #a5262c; --fc-event-border-color: #f1ada9; }
    html[data-csd-theme="dark"] #meetingsCalendar .operational-source-maintenance:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { --fc-event-bg-color: #0c6260; --fc-event-border-color: #84cecc; }
    html[data-csd-theme="dark"] :is(.btn-light, .btn-default):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #e5edf7 !important; background-color: #24344b; border-color: #53657d; }
    html[data-csd-theme="dark"] .btn-saas-outline:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #e5edf7; border-color: #53657d; }
    html[data-csd-theme="dark"] .btn-saas-outline:hover:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #fff; background-color: #24344b; }
    html[data-csd-theme="dark"] :is(.btn-primary, .badge-primary, .badge.bg-primary):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #fff; background-color: #1d4ed8; border-color: #1d4ed8; }
    html[data-csd-theme="dark"] .btn-primary:is(:hover, :active):not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #fff; background-color: #1e40af; border-color: #1e40af; }
    html[data-csd-theme="dark"] .close:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #e5edf7; text-shadow: none; }
    html[data-csd-theme="dark"] input:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *))::placeholder,
    html[data-csd-theme="dark"] textarea:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *))::placeholder { color: #94a6bd; opacity: 1; }
    html[data-csd-theme="dark"] :not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *))::selection { color: #fff; background: #315a91; }
    html[data-csd-theme="dark"] [data-priority-tone]:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #b3c1d3 !important; background: #202d3f !important; border-color: #39495e !important; }
    html[data-csd-theme="dark"] [data-priority-tone="low"]:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #91d9b5 !important; background: #193a2d !important; border-color: #396951 !important; }
    html[data-csd-theme="dark"] [data-priority-tone="medium"]:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #a4caff !important; background: #1b304e !important; border-color: #3a5f8e !important; }
    html[data-csd-theme="dark"] [data-priority-tone="high"]:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #eac880 !important; background: #3d321d !important; border-color: #786033 !important; }
    html[data-csd-theme="dark"] [data-priority-tone="urgent"]:not(:where([data-theme-preserve], [data-theme-preserve] *, .simple-editor, .simple-editor *, .note-editable, .note-editable *, .mandate-paper__page, .mandate-paper__page *)) { color: #f1ada9 !important; background: #402626 !important; border-color: #824948 !important; }
    /* The operational TV already had a dark design. Give Luminos its own readable palette. */
    html[data-csd-theme="light"] .tv-board-body {
        --tv-bg: #f2f5f9; --tv-panel: #fff; --tv-panel-strong: #fff;
        --tv-text: #203149; --tv-muted: #596d84; --tv-line: #dce4ed;
        --tv-line-strong: #bdcbdc; --tv-accent: #236551;
        color: var(--tv-text); background: var(--tv-bg);
    }
    html[data-csd-theme="light"] .tv-board-body :is(.tv-kpi__label, .tv-priority__context, .tv-summary .is-muted b, .tv-settings legend) { color: #596d84; }
    html[data-csd-theme="light"] .tv-board-body :is(.tv-critical, .tv-settings) { color: #203149; background: #fff; border-color: #bdcbdc; }
    html[data-csd-theme="light"] .tv-board-body .tv-settings select { color: #203149; background: #f2f5f9; border-color: #bdcbdc; }
    html[data-csd-theme="light"] .tv-board-body :is(.tv-controls button[aria-pressed="true"], .tv-settings .tv-settings__save) { background: #e2f1eb; color: #215e49; border-color: #8ab7a4; }
    html[data-csd-theme="light"] .tv-board-body :is(.tv-source-note, .tv-summary-note, .tv-unavailable, .tv-settings__feedback, .tv-kpi[data-status="stale"] .tv-kpi__note, .tv-kpi[data-status="error"] .tv-kpi__note, .tv-status[data-state="stale"], .tv-status[data-state="error"]) { color: #80581b; }
    .tv-board-body > .csd-appearance-menu--floating { top: auto; bottom: 12px; }
    .tv-board-body > .csd-appearance-menu--floating .csd-appearance-menu__panel { top: auto; bottom: calc(100% + 8px); }
}
.email-show-body[data-theme-preserve] { color-scheme: light; color: #212529; background-color: #fff; }
.csd-appearance { padding: 14px 16px; color: var(--csd-control-text); font-family: inherit; }
.csd-appearance__label { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 650; letter-spacing: .015em; }
.csd-appearance__options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid var(--csd-control-line); border-radius: 13px; background: var(--csd-control-soft); }
.csd-appearance__option { appearance: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 60px; padding: 8px 4px; margin: 0; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--csd-control-muted); font: inherit; font-size: 11px; font-weight: 600; line-height: 1.3; cursor: pointer; box-shadow: none; }
.csd-appearance__option svg { display: block; width: 20px; height: 20px; flex-shrink: 0; }
.csd-appearance__option:hover { color: var(--csd-control-text); background: var(--csd-control-surface); }
.csd-appearance__option[aria-checked="true"] { color: var(--csd-control-accent); background: var(--csd-control-active); border-color: var(--csd-control-accent); }
.csd-appearance__option:focus-visible,
.csd-appearance-menu > summary:focus-visible { outline: 2px solid var(--csd-control-accent); outline-offset: 3px; }
.csd-appearance__status { display: block; min-height: 16px; margin-top: 8px; color: var(--csd-control-muted); font-size: 10px; line-height: 1.5; }
.csd-appearance-menu { position: relative; z-index: 1050; color: var(--csd-control-text); }
.csd-appearance-menu > summary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 10px; border: 1px solid var(--csd-control-line); border-radius: 12px; background: var(--csd-control-surface); color: var(--csd-control-text); font-size: 12px; font-weight: 600; line-height: 1.3; cursor: pointer; list-style: none; }
.csd-appearance-menu > summary::-webkit-details-marker { display: none; }
.csd-appearance-menu > summary svg { width: 18px; height: 18px; }
.csd-appearance-menu__panel { position: absolute; top: calc(100% + 8px); right: 0; width: 288px; max-width: calc(100vw - 24px); border: 1px solid var(--csd-control-line); border-radius: 16px; background: var(--csd-control-surface); box-shadow: 0 18px 48px rgba(0,0,0,.18); }
.csd-appearance-menu--floating { position: fixed; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
@media (max-width: 480px) { .csd-appearance-menu--floating > summary > span { display: none; } }
@media (max-width: 960px) { .header-actions .csd-appearance-menu__panel { left: 0; right: auto; } }
@media print { .csd-appearance, .csd-appearance-menu { display: none !important; } html[data-csd-theme] { color-scheme: light; } }
