/* Account-specific V3 palettes. Semantic warning/error colors remain distinct. */
body{--bg:#f4f7f3;--surface:#ffffff;--surface-soft:#eef4ec;--surface-hover:#f3f7f0;--sidebar:#edf4e9;--ink:#293c32;--muted:#63766a;--line:#dce5d8;--accent:#3b7956;--accent-hover:#2d6546;--accent-soft:#ddebd6;--accent-ink:#2c603d;--focus:#70a26c;--success:#326b49;--success-soft:#e7f2e9;--warning:#895b20;--warning-soft:#fff2de;--danger:#a24a40;--danger-soft:#fbece7;--navy:var(--accent);--navy2:var(--accent-hover);--teal:var(--accent);--mint:var(--accent-soft);--blue:var(--accent);--white:var(--surface);--shadow:0 5px 24px #17332106;color-scheme:light}
body[data-theme=pink]{--bg:#fbf5f7;--surface:#fffdfd;--surface-soft:#f7edf2;--surface-hover:#fbf1f5;--sidebar:#f8edf2;--ink:#493641;--muted:#7e6572;--line:#eadbe3;--accent:#a25378;--accent-hover:#8c4266;--accent-soft:#f1dce6;--accent-ink:#813f60;--focus:#ba7c9c}
body[data-theme=white]{--bg:#f7f8f9;--surface:#ffffff;--surface-soft:#f0f2f4;--surface-hover:#f5f6f7;--sidebar:#ffffff;--ink:#303b46;--muted:#687581;--line:#e0e5e9;--accent:#536c82;--accent-hover:#42596c;--accent-soft:#e8edf1;--accent-ink:#405a70;--focus:#8da0b0}
body[data-theme=black]{--bg:#1e2327;--surface:#272e33;--surface-soft:#2e373d;--surface-hover:#333e45;--sidebar:#242c31;--ink:#e6eceb;--muted:#b2c0bf;--line:#424f55;--accent:#a7cabb;--accent-hover:#c0dfd1;--accent-soft:#354d45;--accent-ink:#c2e1d2;--focus:#91bbaa;--success:#bedcc6;--success-soft:#304c3b;--warning:#e4c898;--warning-soft:#4a4130;--danger:#efb5af;--danger-soft:#503735;--shadow:0 5px 24px #00000014;color-scheme:dark}
body[data-theme=orange]{--bg:#fbf7f1;--surface:#fffefd;--surface-soft:#f9f0e3;--surface-hover:#fcf4e8;--sidebar:#f8efdf;--ink:#4a3d30;--muted:#7b6d5b;--line:#ecdfcb;--accent:#98602e;--accent-hover:#825025;--accent-soft:#f3dfc5;--accent-ink:#805126;--focus:#bf9161}
body[data-theme=red]{--bg:#faf5f3;--surface:#fffdfc;--surface-soft:#f7ece7;--surface-hover:#fcf0eb;--sidebar:#f7eae5;--ink:#4b3733;--muted:#806b66;--line:#ecdcd5;--accent:#a6534a;--accent-hover:#8f453d;--accent-soft:#f1dcd5;--accent-ink:#85473e;--focus:#c48376}
body[data-theme=blue]{--bg:#f3f7fa;--surface:#fdfeff;--surface-soft:#eaf2f8;--surface-hover:#eff6fb;--sidebar:#eaf2f9;--ink:#2d414f;--muted:#647b8c;--line:#d9e5ee;--accent:#3f749d;--accent-hover:#315f84;--accent-soft:#dcebf6;--accent-ink:#346082;--focus:#7ba8c8}
body{background:var(--bg);color:var(--ink)}
[hidden]{display:none!important}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid var(--focus);outline-offset:4px}
.sidebar{background:var(--sidebar);border-color:var(--line);box-shadow:none}.brand,.brand.dark,.brand strong,.breadcrumb strong,.page-heading h1{color:var(--ink)}
.brand small,.brand.dark small,.nav-heading,.sidebar-bottom,.breadcrumb,.topbar-actions .today,.user-menu small,.user-menu summary>span:last-child{color:var(--muted)}
.nav-item,.nav-item .icon{color:var(--muted)}.nav-item:hover{background:var(--surface-hover);color:var(--ink)}.nav-item.active{background:var(--accent-soft);color:var(--accent-ink);border-right-color:var(--accent)}.nav-item.active .icon{color:var(--accent-ink)}.nav-item b,.version{background:var(--accent-soft);color:var(--accent-ink)}
.sidebar-bottom,.topbar,.footer{border-color:var(--line)}.topbar{background:var(--surface);box-shadow:none}.icon-button{color:var(--muted);border-color:var(--line)}.icon-button:hover{background:var(--surface-soft)}.icon-button i{background:var(--danger)}
.avatar,.profile-initials{color:var(--accent-ink);background:var(--accent-soft);border-color:var(--line)}.user-dropdown{background:var(--surface);border-color:var(--line);box-shadow:var(--shadow)}.user-dropdown a:hover,.user-dropdown button:hover{background:var(--surface-soft);color:var(--accent-ink)}
.eyebrow,.text-link{color:var(--accent)}.page-heading p,.muted,.help,.cell-sub,.stat-note,.footer,.field .help,.instruction-list,.profile-hint,.profile-username,.pagination span{color:var(--muted)}
.button{background:var(--surface);border-color:var(--line);color:var(--ink);box-shadow:none}.button:hover{background:var(--surface-soft);border-color:var(--focus)}.button.primary,.button.navy,.login-form .button.primary{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:none}.button.primary:hover,.button.navy:hover{background:var(--accent-hover);border-color:var(--accent-hover)}.button.danger{color:var(--danger);background:var(--danger-soft);border-color:var(--line)}
body[data-theme=black] .button.primary,body[data-theme=black] .button.navy{color:#21352a}
.panel,.stat,.metric{background:var(--surface);border-color:var(--line);box-shadow:var(--shadow)}.stat{border-top-color:var(--accent-soft)}.panel-head h2,.panel-head h3,.stat-value,.cell-title,.unit-progress-heading,.priority-card h3,.form-section h2,.report-section h3,.field label,.profile-membership strong{color:var(--ink)}
.panel-head p,.stat-top,.progress-note,.priority-card p,.prose,.timeline-item p,.timeline-item small{color:var(--muted)}.stat-icon,.stat-icon.green,.step-number{background:var(--accent-soft);color:var(--accent-ink);border-color:var(--line)}.stat-icon.orange{background:var(--warning-soft);color:var(--warning)}.stat-icon.red{background:var(--danger-soft);color:var(--danger)}
.table-wrap th{background:var(--surface-soft);color:var(--muted);border-color:var(--line)}.table-wrap td{border-color:var(--line)}.table-wrap tbody tr:hover{background:var(--surface-hover)}
.tag,.importance-0,.status{background:var(--surface-soft);color:var(--muted)}.status.done,.health-good{color:var(--success)}.status.done{background:var(--success-soft)}.importance-1,.importance-2{background:var(--warning-soft);color:var(--warning)}.importance-3{background:var(--danger-soft);color:var(--danger)}.health-attention{color:var(--warning)}.health-critical,.errorlist,.required{color:var(--danger)}
.tabs a,.config-nav a{color:var(--muted)}.tabs a.selected,.config-nav a.selected,.workflow-strip .current{background:var(--accent-soft);color:var(--accent-ink)}.config-nav a:hover{background:var(--surface-soft)}
.unit-progress,.priority-card,.timeline-item{border-color:var(--line)}.progress,.workflow-strip span{background:var(--surface-soft);color:var(--muted)}.timeline-item h3{color:var(--ink)}.timeline-item:before{background:var(--accent);border-color:var(--surface);box-shadow:0 0 0 1px var(--line)}
.deadline-banner,.detail-hero{background:var(--accent-soft);border-color:var(--line);color:var(--accent-ink);box-shadow:none}.deadline-banner small,.detail-meta{color:var(--muted)}.deadline-banner .icon,.detail-hero h1{color:var(--accent-ink)}.detail-hero .tag{background:var(--surface);color:var(--accent-ink)}
input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea{background:var(--surface);color:var(--ink);border-color:var(--line)}input::placeholder,textarea::placeholder{color:var(--muted);opacity:.8}input:focus,textarea:focus,select:focus{border-color:var(--focus)}input[type=file]{background:var(--surface-soft)!important}input::file-selector-button{color:var(--accent-ink);background:var(--accent-soft)}input[type=checkbox],input[type=radio]{accent-color:var(--accent)}
.answer-box,.profile-membership{background:var(--surface-soft);border-color:var(--line)}.answer-box dt,.answer-box dd small{color:var(--muted)}.answer-box dd{color:var(--ink)}.metric h3,.metric small{color:var(--muted)}.metric strong{color:var(--accent-ink)}.empty,.empty .icon{color:var(--muted)}.empty strong{color:var(--ink)}
.flash{background:var(--success-soft);color:var(--success);border-color:var(--line)}.flash.error{color:var(--danger);background:var(--danger-soft);border-color:var(--line)}.demo-strip{background:var(--warning-soft);color:var(--warning);border-color:var(--line)}.demo-strip span{color:var(--warning)}.notification.unread{background:var(--surface-soft)}.notification small,.inline-details p{color:var(--muted)}.inline-details summary{color:var(--warning)}
.live-dot{background:var(--success);box-shadow:none}.profile-portrait,.profile-initials{border-color:var(--surface-soft);box-shadow:0 0 0 1px var(--line)}.profile-photo{border-color:var(--line)}.profile-status{background:var(--success-soft);color:var(--success)}.profile-membership small{color:var(--muted)}
/* All chart strokes and surfaces follow the user's choice; category cues stay semantic. */
.chart-section-head h2,.chart-card h3,.chart-bar-label strong,.chart-empty strong{color:var(--ink)}.chart-section-head p,.chart-status,.chart-freshness,.chart-freshness strong,.chart-card .panel-head p,.chart-bar-label,.chart-bar-label small,.trend-labels,.trend-scale,.chart-values,.chart-rate p,.chart-empty{color:var(--muted)}
.chart-icon{background:var(--accent-soft);border-color:var(--line);color:var(--accent-ink)}.chart-bar-track{background:var(--surface-soft)}.chart-bar-fill,.chart-bar-fill.green,.chart-key.green{background:var(--accent)}.chart-bar-fill.sage,.chart-key.sage{background:var(--focus)}.chart-bar-fill.amber,.chart-key.amber,.chart-bar-fill.orange,.chart-key.orange{background:#b18d57}.chart-bar-fill.red,.chart-key.red{background:#bd8078}.trend-grid{stroke:var(--line)}.trend-area{fill:var(--accent-soft)}.trend-line{stroke:var(--accent)}.trend-point{fill:var(--surface);stroke:var(--accent)}.trend-point:hover{fill:var(--accent)}.chart-rate{color:var(--muted);border-color:var(--line)}.chart-rate>strong{color:var(--accent-ink)}.chart-empty{background:var(--surface)}.chart-empty>.icon{color:var(--focus)}.chart-status-error{color:var(--warning);background:var(--warning-soft)}
/* Login remains the calm default palette until an account is authenticated. */
.login-layout,.login-panel{background:var(--surface)}.login-story{background:linear-gradient(145deg,var(--surface-soft),var(--accent-soft));border-color:var(--line);color:var(--ink)}.login-story h2,.login-form h1,.company-signature strong{color:var(--ink)}.login-story h2 span,.login-flow span{color:var(--accent-ink)}.login-story p,.story-kicker,.story-number,.company-signature small,.login-flow small,.story-footer,.login-help{color:var(--muted)}.login-flow,.story-footer{border-color:var(--line)}.login-flow b{background:var(--surface);border-color:var(--line);color:var(--accent-ink)}
/* Personal appearance picker */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.theme-picker{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:12px;border:0;padding:0;margin:0 0 22px}.theme-option{position:relative;cursor:pointer;border:1px solid var(--line);background:var(--surface);padding:14px 10px;border-radius:12px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:5px}.theme-option input{position:absolute;inset-inline-start:8px;top:9px;width:15px;height:15px}.theme-option:has(input:checked){outline:2px solid var(--accent);outline-offset:2px;background:var(--surface-soft)}.theme-option strong{font-size:14px}.theme-option small{font-size:11px;color:var(--muted)}.theme-preview{height:52px;width:60px;border:1px solid #00000010;border-radius:9px;margin:5px 0 7px;background:linear-gradient(90deg,#ffffff 63%,var(--swatch) 63%);box-shadow:inset 0 -10px 0 var(--swatch)}.theme-green{--swatch:#dcebd5}.theme-pink{--swatch:#f1dce6}.theme-white{--swatch:#e5e9ed}.theme-black{--swatch:#354d45;background:linear-gradient(90deg,#272e33 63%,#354d45 63%)}.theme-orange{--swatch:#f3dfc5}.theme-red{--swatch:#f1dcd5}.theme-blue{--swatch:#dcebf6}.theme-save-status{font-size:13px;color:var(--muted);align-self:center}.theme-save-status.error{color:var(--danger)}
/* Participant names work with hover, keyboard focus and touch. No-JS details remain usable. */
.participation-panel .panel-head{align-items:flex-start}.participation-panel table{min-width:900px}.participation-note{font-size:12px;line-height:2;color:var(--muted);padding:15px 22px;border-top:1px solid var(--line);background:var(--surface-soft)}.participant-details{display:inline-block;min-width:40px}.participant-details summary{cursor:pointer;list-style:none;border-radius:7px;display:inline-flex;align-items:center;gap:9px;padding:3px 9px;color:var(--accent-ink);background:var(--accent-soft)}.participant-details summary::-webkit-details-marker{display:none}.participant-number{font-weight:bold;font-size:15px;font-variant-numeric:tabular-nums}.participant-hint{font-size:12px;opacity:.7}.participant-popover{padding:15px;background:var(--surface);border:1px solid var(--line);border-radius:10px;min-width:260px;margin-top:8px;text-align:right}.participant-popover>strong{display:block;color:var(--ink);font-size:13px}.participant-popover>small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.participant-popover ul{list-style:none;padding:0;margin:12px 0 0;max-height:260px;overflow:auto;overscroll-behavior:contain}.participant-popover li{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:8px 0;border-bottom:1px solid var(--line);font-size:13px;white-space:normal;overflow-wrap:anywhere}.participant-popover li:last-child{border-bottom:0}.participant-popover li small{display:block;color:var(--muted);font-size:10px}.participant-popover b{white-space:nowrap;font-size:11px;font-weight:400;color:var(--accent-ink)}.participant-details.enhanced>.participant-popover{display:none}.participant-floating{position:fixed;z-index:100;max-width:calc(100vw - 24px);width:320px;box-shadow:0 12px 40px #00000020;margin:0}
@media(max-width:1200px){.theme-picker{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:760px){.nav-item.active{border-bottom-color:var(--accent)}.theme-picker{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.theme-option{padding:13px 6px}.appearance-panel .panel-head{align-items:flex-start}.participation-panel .panel-head{flex-wrap:wrap}.participation-note{padding:13px 17px}.participant-popover ul{max-height:220px}}
@media print{body{color:#222!important;background:#fff!important}.panel,.stat,.metric{background:#fff!important;color:#222!important}.theme-picker,.appearance-panel,.participant-floating,.participant-hint{display:none!important}.participant-details summary{background:none;color:inherit}.participant-details.enhanced>.participant-popover{display:none}.participation-panel table{min-width:0}}
