/* Theme contract: dark remains unchanged. Only color and control styling vary. */
:root{--em-header:#010409;--em-field:#0d1117;--em-hover:#1c2631;--em-info-bg:#142638;--em-success:#116b43;--em-warning:#865900;--em-danger:#ad3028}
.em-theme-toggle{display:inline-grid!important;place-items:center;flex:none;width:36px;height:36px;min-height:36px;padding:8px!important;border:1px solid var(--k-line,#34414e);border-radius:50%;background:transparent;color:var(--k-text,#e6edf3);cursor:pointer;box-shadow:none;touch-action:manipulation}
.em-theme-toggle svg{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.em-theme-toggle:hover{background:var(--em-hover)!important;border-color:var(--k-accent,#39bce8)}
.em-theme-toggle:focus-visible{outline:2px solid var(--k-accent,#39bce8);outline-offset:3px}
.login{position:relative}.login>.em-theme-toggle{position:absolute;right:14px;top:14px}
.sitehead>.em-theme-toggle{margin-left:12px}.sitehead>.preview-actor,.sitehead>#identity{margin-left:auto}
:root[data-theme=light]{color-scheme:light;--k-bg:#f3f6fa;--k-surface:#ffffff;--k-raised:#edf2f8;--k-text:#1b2c40;--k-text-2:#34495e;--k-muted:#526579;--k-dim:#627387;--k-line:#cbd5e1;--k-accent:#086b9b;--k-accent-text:#08628d;--kn-nav-accent:#086b9b;--k-secondary:#086b9b;--k-secondary-tint:#e3eff9;--em-header:#ffffff;--em-field:#ffffff;--em-hover:#e7eff7;--em-info-bg:#eaf3fa}
[data-theme=light] body{background:var(--k-bg);color:var(--k-text)}
[data-theme=light] a{color:var(--k-accent-text)}
[data-theme=light] p,[data-theme=light] .document-prose p,[data-theme=light] .prose li,[data-theme=light] .prose p{color:var(--k-text-2)}
[data-theme=light] small,[data-theme=light] .muted,[data-theme=light] .empty{color:var(--k-muted)}
[data-theme=light] .top,[data-theme=light] .tabs,[data-theme=light] .rail,[data-theme=light] .sitehead,[data-theme=light] .mainnav{background:var(--em-header);border-color:var(--k-line)}
[data-theme=light] .brand{color:var(--k-text)}
[data-theme=light] .panel,[data-theme=light] .table-wrap,[data-theme=light] .library-item,[data-theme=light] .login,[data-theme=light] .buyer-candidate,[data-theme=light] .ipc-supplier{background:var(--k-surface);border-color:var(--k-line)}
[data-theme=light] .panel>header,[data-theme=light] .panel-head,[data-theme=light] .buyer-candidate>header{border-color:var(--k-line)}
[data-theme=light] input,[data-theme=light] select,[data-theme=light] textarea{background:var(--em-field);border-color:var(--k-line);color:var(--k-text);accent-color:var(--k-accent)}
[data-theme=light] input::placeholder,[data-theme=light] textarea::placeholder{color:var(--k-muted);opacity:1}
[data-theme=light] .btn,[data-theme=light] .kn-btn,[data-theme=light] .sitehead button,[data-theme=light] .demo-banner button,[data-theme=light] .scenario-tabs button,[data-theme=light] .actions button,[data-theme=light] .controls button,[data-theme=light] .evidence-links button,[data-theme=light] .context-tabs a{background:var(--k-raised);color:var(--k-text);border-color:var(--k-line)}
[data-theme=light] .btn.primary,[data-theme=light] button.primary{background:#086b9b;border-color:#086b9b;color:#ffffff}
[data-theme=light] .btn:hover{filter:none;background:var(--em-hover)}
[data-theme=light] .btn.primary:hover,[data-theme=light] button.primary:hover{background:#07577f;color:#ffffff}
[data-theme=light] button:disabled{opacity:.55}
[data-theme=light] :focus-visible{outline-color:var(--k-accent)}
[data-theme=light] .rail button.active,[data-theme=light] .library-item:hover,[data-theme=light] .context-tabs a.active,[data-theme=light] .scenario-tabs button[aria-selected=true]{background:#e3eff9;color:#145b82;border-color:#6a9fbe}
[data-theme=light] .tabs button,[data-theme=light] .mainnav a{color:var(--k-muted)}
[data-theme=light] .tabs button.active,[data-theme=light] .mainnav a[aria-current]{color:var(--k-text);border-color:var(--k-accent)}
[data-theme=light] th{background:var(--k-raised);color:var(--k-muted);border-color:var(--k-line)}
[data-theme=light] td,[data-theme=light] .card,[data-theme=light] .facts>div,[data-theme=light] .activity,[data-theme=light] .checkpoint,[data-theme=light] .record,[data-theme=light] .info-table>div,[data-theme=light] .harness-grid>div,[data-theme=light] .fleet-table tr{border-color:var(--k-line)}
[data-theme=light] .markdown,[data-theme=light] .message,[data-theme=light] .document-prose pre,[data-theme=light] .document-prose code,[data-theme=light] .dialog-body pre,[data-theme=light] .token-sample{background:var(--k-raised);border-color:var(--k-line);color:var(--k-text-2)}
[data-theme=light] .note,[data-theme=light] .scope-note,[data-theme=light] .next-owner,[data-theme=light] .ipc-certificate,[data-theme=light] .storage-note{background:var(--em-info-bg);border-color:#9dbad0;color:#245572}
[data-theme=light] .error,[data-theme=light] .note.error,[data-theme=light] .danger-note{background:#fff0ed;border-color:#d6988e;color:#a12d23}
[data-theme=light] dialog,[data-theme=light] .advisor-handoff{background:var(--k-surface);color:var(--k-text);border-color:#b6c6d5}
[data-theme=light] dialog::backdrop{background:#172c4666}
[data-theme=light] .dialog-head{border-color:var(--k-line)}
[data-theme=light] #toast{background:#e4f1fa;color:#1b4b6e;border-color:#83a9c5}
[data-theme=light] .badge,[data-theme=light] .label{background:#f0f4f8;border-color:var(--k-line);color:#4b6076}
[data-theme=light] .badge.connected,[data-theme=light] .badge.completed,[data-theme=light] .badge.done,[data-theme=light] .badge.approved,[data-theme=light] .badge.available,[data-theme=light] .badge.verified_match,[data-theme=light] .label.good{color:#11663f;background:#e8f6ed;border-color:#9ac7ad}
[data-theme=light] .badge.in_progress,[data-theme=light] .badge.running{color:#075d89;background:#e6f2fa;border-color:#9fc0d6}
[data-theme=light] .badge.blocked,[data-theme=light] .badge.failed,[data-theme=light] .badge.disagreement,[data-theme=light] .badge.conflict,[data-theme=light] .label.bad{color:#a42e24;background:#fff0ed;border-color:#d6a297}
[data-theme=light] .badge.delivered,[data-theme=light] .badge.pending,[data-theme=light] .badge.submitted,[data-theme=light] .badge.missing_evidence,[data-theme=light] .label.warn{color:#7f5700;background:#fff6df;border-color:#d5be80}
[data-theme=light] .priority.blocking,[data-theme=light] .buyer-check.conflict summary>span:last-child,[data-theme=light] [data-fit-error],[data-theme=light] .form-error,[data-theme=light] .load-error,[data-theme=light] .advisor-handoff [role=alert]{color:#a42e24}
[data-theme=light] .priority.high,[data-theme=light] .avatar-wrap .time,[data-theme=light] .buyer-check.missing_evidence summary>span:last-child{color:#805700}
[data-theme=light] .priority.medium,[data-theme=light] .ipc-price,[data-theme=light] .buyer-cost-output strong{color:#08658f}
[data-theme=light] .priority.low,[data-theme=light] .label.unknown{color:#526579}
[data-theme=light] .buyer-check.verified_match summary>span:last-child{color:#11663f}
/* Board Room inherits the same token family and keeps its panel geometry. */
[data-theme=light] .em-boardroom{--ebr-line:#cbd5e1;--ebr-surface:#ffffff;--ebr-muted:#526579;--ebr-accent:#086b9b}
[data-theme=light] .ebr-summary-card{background:#ffffff}
[data-theme=light] .ebr-shared,[data-theme=light] .ebr-count{color:#365f82}
[data-theme=light] .ebr-grip{color:#586f85}
[data-theme=light] .ebr-task-row,[data-theme=light] .ebr-decision,[data-theme=light] .ebr-comment,[data-theme=light] .ebr-delivery,[data-theme=light] .ebr-workload td{border-color:#dce3eb}
[data-theme=light] .ebr-task-row:hover,[data-theme=light] .ebr-decision>summary:hover{background:#edf4fa}
[data-theme=light] .ebr-tag{color:#526579;border-color:#b9c8d8}
[data-theme=light] .ebr-tag.blocking,[data-theme=light] .ebr-tag.disagreement{color:#a42e24;border-color:#d6a297}
[data-theme=light] .ebr-tag.high,[data-theme=light] .ebr-tag.blocked,[data-theme=light] .ebr-timer,[data-theme=light] .em-boardroom .time{color:#805700;border-color:#d5be80}
[data-theme=light] .ebr-tag.in_progress,[data-theme=light] .ebr-tag.done,[data-theme=light] .ebr-tag.approved{color:#11663f;border-color:#9ac7ad}
[data-theme=light] .ebr-tag.delivered{color:#3f57a0;border-color:#aab9dd}
[data-theme=light] .ebr-elapsed .ebr-timer{color:inherit}
[data-theme=light] .ebr-period button[aria-pressed=true]{background:#deebf7;color:#174d77}
[data-theme=light] .ebr-note.proposal{background:#edf5fb;border-color:#9dbad0}
[data-theme=light] .ebr-empty>span{color:#137b80}
[data-theme=light] .ebr-panel.is-dragging{outline-color:#086b9b}
/* Gnist: neutral surfaces, readable bubbles, same real controls. */
[data-theme=light] .advisor-chat,[data-theme=light] .advisor-trigger{background:#ffffff;border-color:#afc0d1;box-shadow:0 12px 50px #17345025}
[data-theme=light] .advisor-chat>header{background:#f4f7fb}
[data-theme=light] .advisor-form{background:#f4f7fb;border-color:#a8bacb;box-shadow:0 3px 8px #17345015}
[data-theme=light] .advisor-form:focus-within{border-color:#086b9b;box-shadow:0 0 0 1px #086b9b33}
[data-theme=light] .advisor-form textarea{background:transparent;border:0;color:var(--k-text)}
[data-theme=light] .advisor-question,[data-theme=light] .advisor-typing{background:#e2edf7;color:#203f5c}
[data-theme=light] .gnist-composer-tools .advisor-share{color:#526579}
[data-theme=light] .gnist-composer-tools .advisor-share:has(input:checked){color:#075d89}
[data-theme=light] .gnist-composer-tools .advisor-share:has(input:checked) svg{background:#e0eff9;border-color:#87aec9}
[data-theme=light] .gnist-model-toggle{background:#e0eaf5;border-color:#a9bfd6;color:#234b72}
[data-theme=light] .gnist-model-toggle:hover,[data-theme=light] .gnist-model-toggle[aria-expanded=true]{background:#d0e2f2}
[data-theme=light] .gnist-model-menu{background:#ffffff;border-color:#b1c3d5;box-shadow:0 10px 30px #17345030}
[data-theme=light] .gnist-model-menu button{color:#263d55}
[data-theme=light] .gnist-model-menu button[aria-checked=true]{background:#086b9b;color:#ffffff}
[data-theme=light] .gnist-model-menu button:hover,[data-theme=light] .gnist-model-menu button:focus-visible{background:#e1edf8;color:#234b72}
[data-theme=light] .gnist-send{background:#086b9b;border-color:#086b9b;color:white}
[data-theme=light] .gnist-send:hover{background:#07577f}
[data-theme=light] .advisor-form [data-error]{color:#a42e24}
/* Industrial catalogue, performance bars and shared comparison dialog. */
[data-theme=light] .ipc-photo,[data-theme=light] .ipc-detail-photo,[data-theme=light] .pc-compare-image{background:#f5f7fa;border-color:#cbd5e1}
[data-theme=light] .ipc-select{background:#ffffff;color:#1b2c40;border-color:#aabfd2}
[data-theme=light] .ipc-bar-track{background:#e7eef5;border-color:#bfd0dd}
[data-theme=light] .ipc-bar-track>span{background:#c1def1}
[data-theme=light] .ipc-bar-track>b{color:#1e4667;text-shadow:none}
[data-theme=light] .pc-compare-dialog{background:#f3f6fa;color:#1b2c40;border-color:#adbed0}
[data-theme=light] .pc-compare-table .pc-compare-corner,[data-theme=light] .pc-compare-table .pc-compare-field,[data-theme=light] .pc-compare-table thead th,[data-theme=light] .pc-compare-group th{background:#eaf0f7;color:#34495e}
[data-theme=light] .pc-compare-table tbody tr:nth-child(even) td{background:#f5f8fc}
[data-theme=light] .pc-compare-table tbody tr:nth-child(odd) td{background:#ffffff}
[data-theme=light] .pc-compare-table .is-different td:not(.is-unknown){background:#e5f1fa}
[data-theme=light] .pc-compare-tools input[type=search],[data-theme=light] .pc-compare-category,[data-theme=light] .pc-compare-remove{background:#ffffff;color:#1b2c40;border-color:#b6c7d7}
[data-theme=light] .pc-compare-name,[data-theme=light] .pc-compare-price{color:#1b2c40}
[data-theme=light] .pc-compare-subtitle,[data-theme=light] .pc-compare-hint,[data-theme=light] .pc-compare-brand,[data-theme=light] .pc-compare-shop,[data-theme=light] .pc-compare-source,[data-theme=light] .pc-compare-unavailable,[data-theme=light] .pc-compare-loading,[data-theme=light] .pc-compare-empty,[data-theme=light] .pc-compare-status,[data-theme=light] .pc-compare-table .is-unknown{color:#526579}
[data-theme=light] .pc-compare-buy,[data-theme=light] .pc-compare-add{color:#08628d;border-color:#9fbdd1}
[data-theme=light] .pc-compare-table .is-conflict{color:#8c4b16}
[data-theme=light] .pc-compare-header,[data-theme=light] .pc-compare-table th,[data-theme=light] .pc-compare-table td,[data-theme=light] .pc-compare-button,[data-theme=light] .pc-compare-back{border-color:#cbd5e1}
/* The two standalone workflows use the same origin-local choice. */
[data-theme=light] .preview-actor label,[data-theme=light] .filterbar label,[data-theme=light] .panel-head span,[data-theme=light] label.field,[data-theme=light] .input-grid label,[data-theme=light] .roi-inputs label,[data-theme=light] .question-form label,[data-theme=light] .facts dt,[data-theme=light] .facts span,[data-theme=light] .activity time,[data-theme=light] .statline span,[data-theme=light] .dialog-body dt,[data-theme=light] .info-table span{color:#526579}
[data-theme=light] .demo-banner,[data-theme=light] .progress-steps,[data-theme=light] .statline>div,[data-theme=light] .review-card,[data-theme=light] .approval-state,[data-theme=light] .comment,[data-theme=light] .record{background:#ffffff;border-color:#cbd5e1;color:#34495e}
[data-theme=light] .demo-banner strong,[data-theme=light] .eyebrow,[data-theme=light] td button.link,[data-theme=light] .record code,[data-theme=light] .review-card summary{color:#08628d}
[data-theme=light] .alert,[data-theme=light] .incident,[data-theme=light] .notice,[data-theme=light] .banner-bottom{background:#fff6e3;color:#805700;border-color:#d8bf87}
[data-theme=light] .alert p,[data-theme=light] .incident p{color:#765820}
[data-theme=light] .actual{background:#eaf6ee;color:#206341;border-color:#9bc6ad}
[data-theme=light] .phase span,[data-theme=light] .progress-steps span{color:#526579;border-color:#bdcbd8}
[data-theme=light] .phase span.active,[data-theme=light] .progress-steps span.current{color:#08628d;border-color:#086b9b;background:#e8f2fa}
[data-theme=light] .phase span.done{color:#11663f;border-color:#11663f}
[data-theme=light] .rule-list,[data-theme=light] .question-answer,[data-theme=light] .delivery-messages pre,[data-theme=light] .review-card dt,[data-theme=light] .review-card dd,[data-theme=light] .comment p{color:#34495e}
[data-theme=light] button.danger{background:#fff0ed;border-color:#d6988e;color:#a42e24}
[data-theme=light] footer,[data-theme=light] .demo-checks{border-color:#cbd5e1;color:#526579}
@media print{.em-theme-toggle{display:none!important}}
[data-theme=light] .ebr-decision{background:#f7fafe}
[data-theme=light] .ipc-meta span:first-child{color:#08628d}
