/* Account palettes, based on approved-theme.css. */
:root,[data-palette=blue]{--theme-bg:#f5f7ff;--theme-surface:#fff;--theme-soft:#eef0ff;--theme-ink:#232d43;--theme-muted:#5e6a82;--theme-line:#dfe4f0;--theme-accent:#3345ef;--theme-on-accent:#fff;--theme-header:linear-gradient(110deg,#e3f5fb,#eef0ff);--theme-hero:linear-gradient(115deg,#193887,#4b209a 58%,#05889a);--theme-hero-ink:#fff;--theme-hero-muted:#d9e6ff;--theme-hero-button:#fff;--theme-hero-button-ink:#3045cd;--theme-rail:#233b87}
html[data-theme=burgundy],[data-palette=burgundy]{--theme-bg:#f8f4ee;--theme-surface:#fffdfa;--theme-soft:#f0e6dc;--theme-ink:#392b30;--theme-muted:#6e5b66;--theme-line:#e3d7cb;--theme-accent:#662e48;--theme-on-accent:#fff9ee;--theme-header:#f0e7d6;--theme-hero:#502237;--theme-hero-ink:#fff5e2;--theme-hero-muted:#ebce97;--theme-hero-button:#e7c795;--theme-hero-button-ink:#502237;--theme-rail:#502237}
html[data-theme=dark],[data-palette=dark]{color-scheme:dark;--theme-bg:#0f1726;--theme-surface:#1d2b40;--theme-soft:#27384a;--theme-ink:#edf2fa;--theme-muted:#b1bdce;--theme-line:#35475e;--theme-accent:#c4ff43;--theme-on-accent:#18221a;--theme-header:#1a273a;--theme-hero:#111c2d;--theme-hero-ink:#f5f7fb;--theme-hero-muted:#bac7d9;--theme-hero-button:#c4ff43;--theme-hero-button-ink:#18221a;--theme-rail:#162235}
html[data-theme=coral],[data-palette=coral]{--theme-bg:#fff6ee;--theme-surface:#fff;--theme-soft:#f8e7dc;--theme-ink:#302b2b;--theme-muted:#735e54;--theme-line:#eed9ca;--theme-accent:#be3c29;--theme-on-accent:#fff;--theme-header:#f5e7dc;--theme-hero:#f9eade;--theme-hero-ink:#302b2b;--theme-hero-muted:#735e54;--theme-hero-button:#be3c29;--theme-hero-button-ink:#fff;--theme-rail:#80382d}
html[data-theme]:not([data-theme=blue]){background:var(--theme-bg)!important}
html[data-theme]:not([data-theme=blue]) body .workspace-nav :is(svg,.nav-icon,[aria-hidden=true]){color:var(--theme-accent)!important}
html[data-theme]:not([data-theme=blue]) body #personalBell b{background:var(--theme-accent)!important;color:var(--theme-on-accent)!important}
html[data-theme]:not([data-theme=blue]) body{--ink:var(--theme-ink);--accent:var(--theme-accent);--paper:var(--theme-bg);--line:var(--theme-line);--soft:var(--theme-soft);--ui-ink:var(--theme-ink);--ui-accent:var(--theme-accent);--ui-muted:var(--theme-muted);--ui-line:var(--theme-line);--ui-surface:var(--theme-surface);--ui-bg:var(--theme-bg);--mobile-ink:var(--theme-ink);--mobile-muted:var(--theme-muted);--mobile-line:var(--theme-line);--mobile-accent:var(--theme-accent);--chat-ink:var(--theme-ink);--chat-muted:var(--theme-muted);--chat-border:var(--theme-line);--chat-blue:var(--theme-accent);color:var(--theme-ink)!important;background:var(--theme-bg)!important}
html[data-theme]:not([data-theme=blue]) body :is(.site-header){background:var(--theme-header)!important;border-color:var(--theme-accent)!important;color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body .app-rail{background:var(--theme-rail)!important}
html[data-theme]:not([data-theme=blue]) body :is(.workspace-nav,.mobile-work-tabs){background:var(--theme-bg)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body :is(.workspace-nav a,.mobile-work-tabs a,.site-header nav a,.site-header .brand-title){color:var(--theme-muted)}
html[data-theme]:not([data-theme=blue]) body :is(main.container,#workHome,#projectsPage){--workspace-accent:var(--theme-accent);--workspace-ink:var(--theme-ink);--workspace-muted:var(--theme-muted);--workspace-line:var(--theme-line);background:var(--theme-bg)!important;color:var(--theme-ink)}
html[data-theme]:not([data-theme=blue]) body :is(.card,.form-card,.sound-card,.quiet-window,.sound-save,.sound-page-header,.chat-shell,.chat-sidebar,.chat-list-header,.chat-list-footer,.chat-list-menu-items,.chat-dialog,.chat-dialog-header,.chat-dialog-actions,.chat-list-utilities,.message-popover,.personal-inbox-panel,.collab-composer-dialog,.flow-composer-header,.flow-composer-tabs,.flow-composer-footer,.flow-composer,.flow-feed-card,.project-detail-panel,.project-create-form,.create-actions,.employee-selector,.workspace-form-card,.mobile-project-summary,#assignedTasks,.chat-toast){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important;box-shadow:none}
html[data-theme]:not([data-theme=blue]) body :is(h1,h2,h3,h4,label,legend,summary,.school-name,.chat-room-name,.workspace-title,.flow-post-title){color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body :is(p.hint,.muted,.hint,small,.chat-room-preview,.chat-room-count,.chat-room-meta,.sound-intro,.sound-heading p,.sound-help p,.workspace-footer,.chat-confirm-text,.chat-settings-caption,.flow-field-label){color:var(--theme-muted)!important}
html[data-theme]:not([data-theme=blue]) body a{color:var(--theme-accent)}
html[data-theme]:not([data-theme=blue]) body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea,[contenteditable=true]){background-color:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important;caret-color:var(--theme-accent)}
html[data-theme]:not([data-theme=blue]) body :is(input,textarea)::placeholder{color:var(--theme-muted)!important;opacity:.85}
html[data-theme]:not([data-theme=blue]) body :is(input,button,a,textarea,select):focus-visible{outline-color:var(--theme-accent)!important}
html[data-theme]:not([data-theme=blue]) body :is(input[type=checkbox],input[type=radio],input[type=range]){accent-color:var(--theme-accent)}
html[data-theme]:not([data-theme=blue]) body :is(button,.secondary,.button,.project-company-tools a,.workspace-links a){background-color:var(--theme-soft);color:var(--theme-ink);border-color:var(--theme-line)}
html[data-theme]:not([data-theme=blue]) body :is(button.primary,button[type=submit],.workspace-create,.workspace-create-button,#chatCreate,#submitRequest,.chat-unread-badge){background:var(--theme-accent)!important;border-color:var(--theme-accent)!important;color:var(--theme-on-accent)!important}
html[data-theme]:not([data-theme=blue]) body :is(.mobile-work-tabs a[aria-current=page],.workspace-nav a[aria-current=page],.mobile-feature-icon,.chat-room-avatar,.chat-message-avatar,.employee-avatar,.message-person-avatar,.quiet-current,.message-notice,.message-reply-compose,.message-action-preview,.message-notice-body){background:var(--theme-soft)!important;color:var(--theme-accent)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body :is(.chat-dialog .chat-icon,.chat-list-icon,.message-menu-item,.message-read-tabs button,.message-quick button,.message-reaction-chips button,.chat-setting-row,.chat-setting-switch,.chat-personal-tools a,#partnerInvite){background-color:transparent!important;color:var(--theme-muted)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body :is(.chat-menu-tabs,.chat-menu-panel,#chatRenameForm,.chat-create-dialog,.chat-welcome,.chat-input,.chat-composer,.chat-messages,.flow-form-scroll){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body :is(.chat-menu-tabs button,.flow-composer-tabs button,.flow-tab){background:transparent!important;color:var(--theme-muted)!important}
html[data-theme]:not([data-theme=blue]) body :is([role=tab][aria-selected=true],.chat-menu-tabs button[aria-selected=true],.message-read-tabs button[aria-selected=true],.flow-composer-tabs button[aria-selected=true]){color:var(--theme-accent)!important;border-bottom-color:var(--theme-accent)!important}
html[data-theme]:not([data-theme=blue]) body :is(.message-bubble,.bubble){background:var(--theme-soft)!important;color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body #projectPosts .message-bubble>p{color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body :is(.message.own .bubble,.message.mine .bubble,#projectPosts [data-own='1'] .message-bubble){background:var(--theme-accent)!important;color:var(--theme-on-accent)!important}
html[data-theme]:not([data-theme=blue]) body #projectPosts [data-own='1'] .message-bubble>p{color:var(--theme-on-accent)!important}
html[data-theme]:not([data-theme=blue]) body :is(th,.table-scroll th){background:var(--theme-soft)!important;color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body :is(td,tr,hr,.sound-row,.chat-personal-tools,.chat-personal-tools a){border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body .home-hero{background:var(--theme-hero)!important;color:var(--theme-hero-ink)!important}
html[data-theme]:not([data-theme=blue]) body .home-hero h1{color:var(--theme-hero-ink)!important}
html[data-theme]:not([data-theme=blue]) body .home-hero :is(p,.eyebrow){color:var(--theme-hero-muted)!important}
html[data-theme]:not([data-theme=blue]) body .home-hero:after{display:none}
html[data-theme]:not([data-theme=blue]) body .hero-link{background:var(--theme-hero-button)!important;color:var(--theme-hero-button-ink)!important}
html[data-theme]:not([data-theme=blue]) body .home-settings-link{background:var(--theme-hero-button)!important;color:var(--theme-hero-button-ink)!important}
/* The logo PNG has a white background. A dark badge preserves its exact shape. */
html[data-theme=dark] body .brand-logo{filter:grayscale(1) invert(1) brightness(2);mix-blend-mode:screen!important}
html[data-theme]:not([data-theme=blue]) body .rail-brand{color:var(--theme-rail)!important;background:#fff!important}
html[data-theme]:not([data-theme=blue]) body .app-rail a:not(.rail-brand){color:#edf2fa!important}
html[data-theme]:not([data-theme=blue]) body :is(.sound-switch input:checked+.sound-switch-track,.sound-toggle input:checked+.sound-switch-track){background:var(--theme-accent)!important}
html[data-theme]:not([data-theme=blue]) body .chat-swipe-mute{background:var(--theme-soft)!important;color:var(--theme-accent)!important}
html[data-theme]:not([data-theme=blue]) body .chat-swipe-leave{background:var(--theme-soft)!important;color:var(--theme-muted)!important}
/* Status, warning, destructive controls and user-specified project colors keep their meaning. */
html[data-theme]:not([data-theme=blue]) body :is(.danger,.message-menu-item.danger,.chat-setting-row.danger){color:#d65c69!important}
html[data-theme]:not([data-theme=blue]) body .quiet-banner{background:#ff941f!important;color:#352509!important}
html[data-theme]:not([data-theme=blue]) body .quiet-banner :is(a,button){color:#352509!important;background:transparent!important}
body .appearance-page{max-width:900px;margin-top:32px;padding-bottom:100px}
body .appearance-heading{display:flex;align-items:center;gap:12px;background:none;border:0;padding:0;margin:0 0 20px}
body .appearance-heading h1{font-size:25px;margin:0;flex:1}
body .appearance-heading>a:first-child{font-size:32px;color:var(--theme-muted);text-decoration:none}
body .appearance-heading>a:last-child{font-size:13px;color:var(--theme-muted)}
body .appearance-intro{color:var(--theme-muted);font-size:14px;line-height:1.8;margin-bottom:28px}
body #appearanceForm{display:block;padding:0;border:0;background:none;box-shadow:none}
body #appearanceForm fieldset{border:0;margin:0;padding:0;min-width:0}
body #appearanceForm legend{font-size:14px;font-weight:600;margin-bottom:14px}
body .appearance-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
body .appearance-option{display:block!important;position:relative;margin:0!important;cursor:pointer;padding:0!important;border:1px solid var(--theme-line);border-radius:12px;overflow:hidden;background:var(--theme-surface)}
body .appearance-option:has(input:checked){outline:2px solid var(--theme-accent);outline-offset:3px}
body .appearance-option input{position:absolute!important;opacity:0;width:1px!important;height:1px!important}
body .appearance-option:focus-within{outline:3px solid var(--theme-accent);outline-offset:3px}
body .theme-sample{display:block;background:var(--theme-bg);height:165px;overflow:hidden}
body .sample-header{display:flex;align-items:center;height:29px;background:var(--theme-header);border-bottom:1px solid var(--theme-line);padding:0 12px}
body .sample-header img{width:110px;height:auto;mix-blend-mode:multiply}
body [data-palette=dark] .sample-header img{filter:grayscale(1) invert(1) brightness(2);mix-blend-mode:screen}
body .sample-content{display:block;padding:10px 12px}
body .sample-hero{display:grid;align-content:center;gap:5px;background:var(--theme-hero);height:58px;border-radius:5px;padding:8px 12px;box-sizing:border-box}
body .sample-hero i{height:4px;width:47%;background:var(--theme-hero-ink);border-radius:4px;opacity:.9}
body .sample-hero i:nth-child(2){width:33%}
body .sample-hero b{height:9px;width:33px;background:var(--theme-hero-button);border-radius:3px;margin-top:3px}
body .sample-cards{display:flex;gap:8px;margin-top:8px}
body .sample-cards i{width:50%;height:29px;background:var(--theme-surface);border:1px solid var(--theme-line);border-radius:4px}
body .sample-nav{display:flex;justify-content:space-around;border-top:1px solid var(--theme-line);padding:5px;background:var(--theme-bg)}
body .sample-nav i{width:5px;height:5px;border:1px solid var(--theme-muted);border-radius:1px}
body .theme-caption{display:grid;grid-template-columns:1fr auto;gap:5px;padding:14px 16px;color:var(--theme-ink)}
body .theme-caption strong{font-size:14px}.theme-caption small{grid-column:1/-1;font-size:12px;color:var(--theme-muted)}
body .theme-check{opacity:0;color:var(--theme-accent);font-size:16px}.appearance-option:has(input:checked) .theme-check{opacity:1}
body .appearance-note{font-size:12px;color:var(--theme-muted);line-height:1.7;margin:24px 0}
body .appearance-save{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--theme-line);padding:18px 0}
body .appearance-save p{font-size:12px;color:var(--theme-muted);margin:0;flex:1}
body .appearance-save>div{display:flex;gap:8px}.appearance-save button{margin:0!important;padding:10px 16px!important;min-height:42px!important;min-width:80px!important;width:auto!important;border-radius:8px!important;white-space:nowrap!important;font-size:13px!important}
body .appearance-links{display:grid;gap:0;border-top:1px solid var(--theme-line);margin-top:14px}
body .appearance-links a{display:flex;justify-content:space-between;padding:16px 0;border-bottom:1px solid var(--theme-line);font-size:13px;color:var(--theme-muted)}
body .sound-appearance{font-size:12px;text-align:right}
@media(max-width:760px){body .appearance-page{margin-top:18px;padding:0 20px 115px!important}body .appearance-heading{flex-direction:row!important;min-height:42px!important;padding:0!important}body .appearance-heading h1{font-size:21px!important}body .appearance-options{gap:14px}body .theme-sample{height:142px}body .sample-header img{width:84px}body .sample-hero{height:49px}body .sample-cards i{height:22px}body .theme-caption{padding:12px 10px;gap:5px}body .theme-caption strong{font-size:13px!important}body .theme-caption small{font-size:11px!important}body .appearance-save{align-items:flex-start;flex-direction:column;gap:12px}body .appearance-save>div{align-self:flex-end}body .appearance-heading>a:last-child{white-space:nowrap}}
@media print{html[data-theme] body{background:white!important;color:black!important}.appearance-save,.appearance-entry{display:none!important}}

/* Message-to-task controls use the same compact form layout in every palette. */
body.chat-app .message-task-form{display:grid;gap:16px;padding:0;border:0;background:transparent;box-shadow:none}
body.chat-app .message-task-form label{display:grid;gap:7px;font-size:13px;margin:0}
body.chat-app .message-task-form :is(input:not([type=checkbox]),select,textarea){width:100%;min-width:0;min-height:42px;padding:10px 12px;font:inherit;border:1px solid var(--theme-line);border-radius:8px}
body.chat-app .message-task-members{border:0;padding:0;margin:0;min-width:0}.message-task-members legend{font-size:13px;margin-bottom:12px}
body.chat-app .message-task-members>div{display:flex;flex-wrap:wrap;gap:10px 18px;max-height:130px;overflow:auto}
body.chat-app .message-task-members label{display:flex;align-items:center;gap:7px;flex-direction:row}.message-task-members input{width:17px!important;height:17px!important;min-height:0!important;margin:0}
.work-source-link{display:inline-flex;padding:10px 0;font-size:13px}
html[data-theme]:not([data-theme=blue]) body :is(#personalBell,.mobile-menu-toggle,.personal-profile>span,#appearanceReset){background:var(--theme-soft)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body .appearance-option .theme-caption small{color:var(--theme-muted)!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage :is(.chat-list-tools,.chat-thread,.chat-room-header,.chat-compose,.chat-swipe-row,#postForm,.chat-dialog-header,.chat-menu-tabs,.chat-menu-panel,#chatRenameForm){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage #projectCardList .project-choice{background:var(--theme-surface)!important;color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage :is(.chat-avatar-person,.chat-list-tools>button,#chatRoomSearch){background:var(--theme-soft)!important;color:var(--theme-muted)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage :is(#chatCreate,.chat-list-tools>button[aria-pressed=true],#postForm>button[type=submit]){background:var(--theme-accent)!important;color:var(--theme-on-accent)!important;border-color:var(--theme-accent)!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage #projectCardList :is(.chat-swipe-mute,.chat-swipe-leave){background:var(--theme-soft)!important;color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage #projectPosts .message-bubble>p{color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage #projectPosts [data-own='1'] .message-bubble>p{color:var(--theme-on-accent)!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage #chatRoomDialog :is(.chat-menu-tabs button,.chat-setting-row,.chat-setting-switch,.chat-personal-tools a,#partnerInvite){background:transparent!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage #chatRoomDialog .chat-setting-switch[aria-pressed=true]:after{background-color:var(--theme-accent)!important;box-shadow:inset 0 0 0 2px var(--theme-accent)}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage #chatRoomDialog .danger{color:#e98290!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage :is(#currentProject,.chat-room-header button){color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage .chat-room-subtitle{color:var(--theme-muted)!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage #projectPosts article.card{background:transparent!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectPosts .message-quoted{color:inherit!important}
.message-thread-item{border-bottom:1px solid var(--theme-line);padding:16px 0;display:grid;gap:6px}.message-thread-item small{font-size:11px;color:var(--theme-muted)}.message-thread-item p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.65;margin:0}.message-thread-list{max-height:45dvh;overflow:auto}.message-thread-list~button{margin-top:16px!important;margin-right:8px!important}
@media(max-width:760px){html[data-theme]:not([data-theme=blue]) body #workHome .cards>a.card{background:transparent!important;border:0!important}html[data-theme]:not([data-theme=blue]) body .appearance-page{padding-bottom:165px!important}}
/* Keep native form controls compact despite the older global mobile rules. */
html body.chat-app .chat-dialog.message-bridge-dialog .chat-dialog-header{flex-direction:row!important;text-align:left!important;padding:14px 20px!important;min-height:60px!important}
html body.chat-app .chat-dialog.message-bridge-dialog .chat-dialog-header h2{flex:1!important;text-align:left!important;font-size:17px!important;color:var(--theme-ink)!important}
html body.chat-app .chat-dialog.message-bridge-dialog .message-task-members label{display:flex!important;flex-direction:row!important;align-items:center!important;white-space:nowrap!important;width:auto!important;gap:8px!important;font-size:13px!important}
html body.chat-app .chat-dialog.message-bridge-dialog .message-task-members input[type=checkbox]{appearance:auto!important;width:17px!important;height:17px!important;min-width:17px!important;min-height:17px!important;flex:0 0 17px!important;padding:0!important;margin:0!important}
html body.chat-app .chat-dialog.message-bridge-dialog :is(.message-task-form,.chat-ui-body) [hidden]{display:none!important}
html body.chat-app .chat-dialog.message-bridge-dialog .chat-dialog-actions{position:sticky;bottom:-20px;padding:14px 0!important;background:var(--theme-surface)!important;z-index:2;align-items:center!important}
html body.chat-app .chat-dialog.message-bridge-dialog .chat-dialog-actions button{height:42px!important;min-height:42px!important;margin:0!important}
html body.chat-app .chat-dialog.message-bridge-dialog .message-task-form textarea{resize:vertical;min-height:80px!important}
html body.chat-app .chat-dialog.message-bridge-dialog .message-action-preview{margin:0 0 12px;font-size:13px;line-height:1.65;padding:12px 14px;overflow-wrap:anywhere}
html[data-theme]:not([data-theme=blue]) body main.container.sound-settings{background:var(--theme-bg)!important;color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body main.container.sound-settings :is(.quiet-days span,#quietAdd,#soundEnable,[data-preview]){background:var(--theme-soft)!important;color:var(--theme-muted)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body main.container.sound-settings #quietWindows .quiet-days input:checked+span{background:var(--theme-accent)!important;color:var(--theme-on-accent)!important;border-color:var(--theme-accent)!important}
html[data-theme]:not([data-theme=blue]) body main.container.sound-settings .sound-back{color:var(--theme-ink)!important}
/* Project dialogs have ID-scoped legacy rules; match that scope for all palettes. */
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail :is(.flow-write-card,.composer-header,.flow-multi-list,.flow-tools,.flow-draft-buttons,.flow-post-card,.work-detail-card,.work-assignee-chip,.work-file){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail :is(.composer-header h2,.flow-composer-project,#composerClose,#collabReadClose,.flow-post-title button){color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail #collabComposerDialog :is(.flow-composer-footer button:not([type=submit]),#ctAddSubtask,.flow-draft-buttons button){background:var(--theme-soft)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail :is(#collabTabs>button,#collabQuickCompose>button,#collabComposerDialog #composerTypeTabs>button){color:var(--theme-muted)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail :is(#collabTabs>button[aria-pressed=true],#collabComposerDialog #composerTypeTabs>button[aria-pressed=true]){color:var(--theme-accent)!important;border-bottom-color:var(--theme-accent)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail #collabComposerDialog :is(.flow-caption,.flow-date-value,.flow-event-fields,.flow-status-field){color:var(--theme-muted)!important;border-color:var(--theme-line)!important}
/* Task status pills own their colors and shaded borders in task_status.css. */
html[data-theme]:not([data-theme=blue]) body :is(.task-status-menu,.work-people-picker,.work-avatar,.work-person,.work-file-icon){background:var(--theme-soft)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body main.container.flow-detail :is(.work-detail,.work-author,.flow-audience-control>div){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body :is(.personal-inbox,.personal-inbox>header,.inbox-item){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}

/* Readability: neutral surfaces and their content must change together.
   Match legacy ID-scoped components without changing personal project/status colors. */
:root{--theme-error:#a92336;--theme-error-soft:#fff0f2}
html[data-theme=dark]{--theme-error:#ffabb7;--theme-error-soft:#442b3a}
html[data-theme] body .workspace-nav .nav-caption{color:var(--theme-muted)!important}
html[data-theme] body :is(.appearance-intro,.appearance-note,.appearance-save p){color:var(--theme-muted)!important}
html[data-theme]:not([data-theme=blue]) body :is(main.container>p,.card>p,.form-card>p,.flow-intro,.create-privacy,.sound-help p,.sound-help-link,.sound-device,#soundVolumeValue,.prototype-note,.welcome p,.recipe-panel p,.chat-list-footer a,.chat-list-footer button){color:var(--theme-muted)!important}
html[data-theme]:not([data-theme=blue]) body :is(.error,.danger,.message-menu-item.danger,.chat-setting-row.danger){color:var(--theme-error)!important}
html[data-theme]:not([data-theme=blue]) body :is(button.danger,a.danger){background:var(--theme-error-soft)!important}
html[data-theme]:not([data-theme=blue]) body :is(input,textarea)::placeholder{color:var(--theme-muted)!important;opacity:1}
html[data-theme]:not([data-theme=blue]) body :is(.workspace-links a,.project-company-tools a,.finance-flow a,.cq-links a,.review-links a,.workbook-actions a,.estimate-toolbar a,.prototype-note,.mobile-nav,.recipe-panel,#profileHero){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body :is(.workspace-links a,.project-company-tools a,.finance-flow a,.cq-links a,.review-links a,.workbook-actions a,.estimate-toolbar a):hover{background:var(--theme-soft)!important;color:var(--theme-accent)!important}
html[data-theme]:not([data-theme=blue]) body .finance-heading>span{color:var(--theme-accent)!important}
html[data-theme]:not([data-theme=blue]) body :is(.cq-file,.cq-save-guide){background:var(--theme-soft)!important;border-color:var(--theme-line)!important;color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body .cq-save-guide :is(strong,p){color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body .mobile-nav a{color:var(--theme-muted)!important}
html[data-theme]:not([data-theme=blue]) body .mobile-nav a[aria-current=page]{background:var(--theme-soft)!important;color:var(--theme-accent)!important}
html[data-theme]:not([data-theme=blue]) body #workHome :is(.card .eyebrow,.card>p,#assignedTasks p){color:var(--theme-muted)!important}
html[data-theme]:not([data-theme=blue]) body #assignedTasks :is(strong,h3){color:var(--theme-ink)!important}

html[data-theme]:not([data-theme=blue]) body #projectsPage[data-kind=project] :is(.project-color-card,.project-choice){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body #projectsPage[data-kind=project] .project-choice>span{background:var(--theme-soft)!important;color:var(--theme-accent)!important}
html[data-theme]:not([data-theme=blue]) body #projectsPage[data-kind=project] .project-choice>strong{color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body #projectsPage[data-kind=project] :is(.project-choice>small,.project-palette-picker summary){color:var(--theme-muted)!important}
html[data-theme]:not([data-theme=blue]) body #projectsPage :is(.project-create-form,.create-actions,.create-actions .secondary){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body #projectsPage :is(.create-heading h2,.project-create-form label,.project-create-form legend){color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body #projectsPage :is(.create-heading p,.create-privacy){color:var(--theme-muted)!important}
html[data-theme]:not([data-theme=blue]) body #projectsPage .project-create-form :is(input,textarea){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body #projectsPage .create-actions button[type=submit]{background:var(--theme-accent)!important;color:var(--theme-on-accent)!important;border-color:var(--theme-accent)!important}

html[data-theme]:not([data-theme=blue]) body :is(.inbox-row,.inbox-filters,.personal-inbox footer){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body :is(.inbox-row.is-unread,.inbox-row:hover){background:var(--theme-soft)!important;border-left-color:var(--theme-accent)!important}
html[data-theme]:not([data-theme=blue]) body .inbox-row :is(small,span){color:var(--theme-muted)!important}
html[data-theme]:not([data-theme=blue]) body .personal-inbox button{background:var(--theme-soft)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body :is(.sound-guide p,.estimate-heading p,.finance-heading p,.finance-flow a span,.chat-list-menu-items a,.chat-list-menu-items button){color:var(--theme-muted)!important}
html[data-theme]:not([data-theme=blue]) body #estimateMessage{background:var(--theme-soft)!important;color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body #profileHero>div{color:var(--theme-accent)!important}
/* Light palettes need readable secondary text too, including time/read badges. */
html[data-theme] body :is(.hint,.hint a,.sound-intro,.sound-help-link,.sound-heading p,.sound-help p,.sound-help summary,.sound-guide summary,.sound-toggle small,.quiet-range-hint,.quiet-times label,.quiet-window-heading button,.prototype-note,#logout){color:var(--theme-muted)!important}
html[data-theme] body #projectsPage :is(.create-heading p,.create-privacy){color:var(--theme-muted)!important}
html[data-theme] body .flow-project-switch :is(a,label){color:var(--theme-muted)!important}
html[data-theme] body .inbox-row :is(small,span){color:var(--theme-muted)!important}
html[data-theme] body.chat-app #projectsPage .chat-room-meta small{color:var(--theme-muted)!important}
html[data-theme] body.chat-app #projectsPage .chat-unread-badge{background:var(--theme-accent)!important;color:var(--theme-on-accent)!important}
html[data-theme] body.collaboration-design main.container.flow-detail :is(.flow-project-title p,#collabTabs>button,.flow-more-views summary,.flow-write-prompt,#collabReload,.flow-post-author small,.flow-post-menu summary,.work-actions small,.work-comments summary,.work-author small,.work-metadata dt,.work-file small,.work-history summary,.work-history p,.flow-feed-note,.flow-member small,.flow-composer-project,.flow-caption,.flow-selection,.flow-bottom-tools button){color:var(--theme-muted)!important}
html[data-theme] body.collaboration-design main.container.flow-detail :is(#collabTabs>button[aria-pressed=true],.flow-related a){color:var(--theme-accent)!important}
html[data-theme] body.collaboration-design main.container.flow-detail #composerTypeTabs button{color:var(--theme-muted)!important}
html[data-theme] body.collaboration-design main.container.flow-detail #composerTypeTabs button[aria-pressed=true]{color:var(--theme-accent)!important;border-bottom-color:var(--theme-accent)!important}
html[data-theme] body.collaboration-design main.container.flow-detail #composerTypeTabs .flow-action-label{color:inherit!important}
html[data-theme] body.collaboration-design main.container.flow-detail :is(.work-avatar,.flow-avatar){background:var(--theme-soft)!important;color:var(--theme-accent)!important}
html[data-theme] body.collaboration-design main.container.flow-detail #ctSubtasksSection h3{color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail :is(#flowManageMembers,#collabOriginal,.flow-post-menu>div,.work-comments,.flow-more-views>div){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail :is(.work-actions button,.work-assignees button,.flow-post-title button){background:transparent!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail .work-actions button[aria-pressed=true]{color:var(--theme-accent)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail :is(.collab-rich-body,.collab-rich-body p,.collab-rich-body li){color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail .work-mentions span{color:var(--theme-accent)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail .task-status-menu p{color:var(--theme-muted)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail :is(.flow-write-prompt,.collab-actions,.work-actions,.flow-related,.work-comments,.work-history,.collab-quick-compose,.flow-task-extras,.flow-status-field){border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail :is(.flow-template-buttons button,.composer-option-row button,.flow-project-tools button){background:var(--theme-soft)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail .flow-post-menu button{background:transparent!important;color:var(--theme-ink)!important}
html[data-theme] body.chat-app #projectsPage :is(.chat-date,.chat-read-status){color:var(--theme-muted)!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage .chat-date{background:var(--theme-soft)!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage #postForm #postBody{background:var(--theme-surface)!important;color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body #projectsPage :is(.employee-picker,.employee-result-list,.employee-result-list label){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme] body #projectsPage .employee-result-list strong{color:var(--theme-muted)!important}
html[data-theme] body.chat-app #projectsPage .chat-room-preview{color:var(--theme-muted)!important}
html[data-theme] body .site-header .personal-profile{color:var(--theme-ink)!important}
html[data-theme] body :is(.mobile-work-tabs a,.mobile-project-more,#assignedTasks>p){color:var(--theme-muted)!important}
html[data-theme] body .mobile-work-tabs a[aria-current=page]{color:var(--theme-accent)!important}
html[data-theme] body.chat-app #projectsPage #chatUnread[aria-pressed=false]{color:var(--theme-muted)!important}
html[data-theme]:not([data-theme=blue]) body #workHome :is(#assignedTasks>p,#assignedTasks article,#assignedTasksDialog,#assignedTasksDialog>header){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme] body #workHome :is(#assignedTasksDialogBody>p,#assignedTasksDialog .eyebrow,.assigned-empty p){color:var(--theme-muted)!important}
html[data-theme]:not([data-theme=blue]) body #workHome :is(#assignedTasksDialog h2,.assigned-empty strong){color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail :is(.flow-search,#collabSearch){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail .collab-card>h3>button{background:transparent!important;color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body main.finance-workspace .finance-flow>button{background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body main.finance-workspace .finance-flow>button span{color:var(--theme-muted)!important}
html[data-theme] body :is(input,textarea)::placeholder{color:var(--theme-muted)!important;opacity:1}
html[data-theme] body.collaboration-design main.container.flow-detail :is(input,textarea)::placeholder{color:var(--theme-muted)!important;opacity:1}
html[data-theme]:not([data-theme=blue]) body .site-header.mobile-tools-open>nav{background:var(--theme-surface)!important;border-color:var(--theme-line)!important}
html[data-theme] body.collaboration-design main.container.flow-detail #collabComposerDialog .composer-rich-editor:empty:before{color:var(--theme-muted)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail #collabComposerDialog :is(.composer-rich-editor,.composer-rich-editor p){color:var(--theme-ink)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail :is(.composer-formatting button,.flow-image-upload){background:var(--theme-soft)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail .flow-poll-settings .flow-toggle:checked{background:var(--theme-accent)!important}
html[data-theme]:not([data-theme=blue]) body.collaboration-design main.container.flow-detail .flow-toggle:checked:before{background:var(--theme-on-accent)!important}
html[data-theme] body :is(.message-person-time span,.message-person-time time){color:var(--theme-muted)!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage #chatRoomDialog .danger{color:var(--theme-error)!important}
html[data-theme] body.chat-app #projectsPage #chatRoomDialog :is(.chat-settings-caption,.chat-menu-tabs button){color:var(--theme-muted)!important}
html[data-theme] body.chat-app #projectsPage #chatRoomDialog #refreshPosts{color:var(--theme-muted)!important;opacity:1}
html[data-theme] body.chat-app #projectsPage #chatRoomDialog :is(#chat-tab-members,#chat-tab-search,#chat-tab-files,#chat-tab-settings)[aria-selected=true]{color:var(--theme-accent)!important;border-bottom-color:var(--theme-accent)!important}
html[data-theme] body.chat-app :is(.chat-dialog .chat-icon,.message-read-tabs button,.message-person-info small){color:var(--theme-muted)!important}
html[data-theme] body.chat-app .message-read-tabs button[aria-selected=true]{color:var(--theme-accent)!important}
html[data-theme] body.chat-app .message-person-avatar{background:var(--theme-soft)!important;color:var(--theme-accent)!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage #chatRoomDialog :is(.employee-picker,.employee-picker input,.chat-file-row){background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage #chatRoomDialog .employee-result-list button{background:var(--theme-soft)!important;color:var(--theme-accent)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage #chatRoomDialog #memberRole{background:var(--theme-surface)!important;color:var(--theme-ink)!important;border-color:var(--theme-line)!important}
html[data-theme]:not([data-theme=blue]) body.chat-app #projectsPage #chatRoomDialog #memberForm>button{background:var(--theme-accent)!important;color:var(--theme-on-accent)!important;border-color:var(--theme-accent)!important}
html[data-theme] body.collaboration-design main.container.flow-detail #collabComposerDialog :is(.flow-template-buttons button,.flow-audience-control>summary,.flow-draft-buttons button,.flow-date-value,.composer-option-row>button){color:var(--theme-muted)!important}

/* The editable quotation is a paper preview and stays light in every theme,
   including its cells and form values, so printed/PDF colors remain predictable. */
html[data-theme] body #estimateSheet{color-scheme:light;background:#fff!important;color:#243349!important;border-color:#a8b3c2!important}
html[data-theme] body #estimateSheet :is(h2,p,span,strong,td,th,label,input,textarea,select){color:#243349!important;border-color:#a8b3c2!important}
html[data-theme] body #estimateSheet :is(input,textarea,select,td){background:#fff!important}
html[data-theme] body #estimateSheet th{background:#edf1f6!important}
html[data-theme] body #estimateSheet :is(input,textarea)::placeholder{color:#58667a!important;opacity:1}
