/* Appearance preferences. No video filters or extra camera rendering work. */
/* Owner-selected palette: #032f3c sampled from the supplied swatches.
   Replace white workspace surfaces only. Auth layout and Dark remain intact. */
html[data-theme=light] body:not(.auth-gate){
 --canvas:#032f3c;--deep:#032f3c;--ink:#eaf6f7;--muted:#b5d2d8;
 --line:#34606b;--royal:#9fd9ed;--teal:#79d5ce;
 --petrol-surface:#083f4b;--petrol-soft:#063542;
 background:var(--canvas)!important;color:var(--ink);
}
html[data-theme=light] body:not(.auth-gate) .aurora{background:radial-gradient(ellipse at 82% 8%,#02474e,transparent 48%),var(--canvas)}
html[data-theme=light] body:not(.auth-gate) .aurora i{opacity:.08}
html[data-theme=light] body:not(.auth-gate) .sidebar{background:linear-gradient(180deg,#02474e,#032f3c);border-color:var(--line)}
html[data-theme=light] body:not(.auth-gate) .side-nav a{color:#c8e4e8}
html[data-theme=light] body:not(.auth-gate) .side-nav b{color:#94c7d0}
html[data-theme=light] body:not(.auth-gate) .side-nav a:is(:hover,.active){background:#115761;color:#f2fcfd}
html[data-theme=light] body:not(.auth-gate) .side-nav a.active b{text-shadow:none;color:#79e0d9}
html[data-theme=light] body:not(.auth-gate) :is(.breadcrumb,.breadcrumb strong,.date-chip){color:var(--muted);border-color:var(--line)}
html[data-theme=light] body:not(.auth-gate) :is(.interface-controls button,.theme-options button,.ghost,.history-actions button,.language-switch,.phrase-library button,.translation-direction,.recognition-mode-switch,.p8-dashboard-entry){background:var(--petrol-surface);color:var(--ink);border-color:var(--line)}
html[data-theme=light] body:not(.auth-gate) :is(.interface-controls button:hover,.theme-options button:hover){background:#115761;border-color:#79d5ce}
html[data-theme=light] body:not(.auth-gate) :is(.secure-chip,.camera-status,.camera-status.active){background:#0c4d54;color:#a4eee1;border-color:#367a7e}
html[data-theme=light] body:not(.auth-gate) :is(.vision-panel,.outcome-panel,.lab-card,.library-card,.history-card,.account-card,.guidance-card,.emergency-card,.accessibility-card,.practice-card,.training-card,.training-safety,.digits-capture-card,.digits-dashboard-card,.conversation-compose,.conversation-thread,.confusion-card,.architecture-card,.model-admin-grid>article,.model-admin-kpis>div,.dashboard-card,.evaluation-card,.institution-card,.institution-message,.stat-card,.text-sign-copy,.sign-output-card,.dashboard-kpis>div,.dashboard-detail,.insight-card){background:var(--petrol-surface);color:var(--ink);border-color:var(--line);box-shadow:0 12px 30px #001a2426}
html[data-theme=light] body:not(.auth-gate) :is(.screen-intro h1,.section-header h2,.profile-summary h2,.setting-row strong,.dashboard-kpis strong,.dashboard-detail strong,.insight-card strong){color:var(--ink)}
html[data-theme=light] body:not(.auth-gate) :is(.screen-intro>p,.section-copy,.setting-row p,.profile-summary p,.dashboard-card p,.p8-dashboard-entry span){color:var(--muted)}
html[data-theme=light] body:not(.auth-gate) .translation-direction button{color:var(--muted)}
html[data-theme=light] body:not(.auth-gate) .translation-direction button>span{background:#11525c;color:#b9e6e8}
html[data-theme=light] body:not(.auth-gate) .translation-direction button.active{background:#036268;color:#f3ffff;box-shadow:none}
html[data-theme=light] body:not(.auth-gate) :is(.original-translator,#model-training){
 color:var(--ink);--p8-card:#083f4b;--p8-muted:#b5d2d8;--p8-border:#34606b;--p8-bg:#063542;
 --ut-ink:#eaf6f7;--ut-surface:#083f4b;--ut-muted:#b5d2d8;--ut-border:#34606b;--ut-soft:#063542;
}
html[data-theme=light] body:not(.auth-gate) .mobile-dock{background:#083f4bf5;border-color:var(--line);box-shadow:0 10px 30px #001a2444}
html[data-theme=light] body:not(.auth-gate) .mobile-dock a{color:#b5d2d8}
html[data-theme=light] body:not(.auth-gate) .mobile-dock a.active{background:#115761;color:#d4fbf6}
.interface-controls{display:flex;align-items:center;gap:6px;direction:ltr}
.interface-controls button,.theme-options button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:8px 12px;border:1px solid #ccd8eb;border-radius:12px;background:#ffffffed;color:#264574;font:700 12px/1.4 Cairo,Arial,sans-serif;cursor:pointer;box-shadow:0 2px 8px #16346a08}
.interface-controls svg,.theme-options svg{width:18px;height:18px;flex:none}
.interface-controls button:hover,.theme-options button:hover{border-color:#0d9488;background:#edf9f7}
.interface-controls button:focus-visible,.theme-options button:focus-visible{outline:3px solid #17a99b;outline-offset:3px}
.interface-controls .interface-language{min-width:66px}
.login-controls{display:none;position:absolute;inset-block-start:16px;inset-inline-end:20px;z-index:80}
body.auth-gate .login-controls{display:flex}
body.auth-gate .auth-screen{padding-block-start:80px}
.command-actions{flex-wrap:wrap;gap:8px}
.workspace-controls{margin-inline-end:6px}
.theme-options{display:flex;gap:8px;flex:none}
.theme-options button.selected{background:#1e3a8a;color:white;border-color:#1e3a8a;box-shadow:none}
.appearance-setting{flex-wrap:wrap;gap:16px;padding-block:22px;border-block-start:1px solid var(--line)}
[dir=ltr] .auth-field input{text-align:left}
[dir=ltr] .auth-submit span{display:inline-block;transform:scaleX(-1)}
[dir=ltr] .history-actions,[dir=ltr] .model-admin-actions{direction:ltr}
[dir=ltr] .screen-intro,[dir=ltr] .section-header,[dir=ltr] .auth-heading{text-align:start}
html[data-theme=dark]{color-scheme:dark;--canvas:#0d1424;--ink:#e7eefb;--muted:#a8b7ce;--line:#30405a;--royal:#91b2ff;--teal:#65d9ca;--deep:#0d1424}
html[data-theme=dark] body{background:#0d1424!important;color:#e7eefb}
html[data-theme=dark] body:not(.app-hydrated)::before{background:#0d1424;color:#e7eefb}
html[data-theme=dark] .aurora{background:radial-gradient(ellipse at 82% 8%,#1b2d50,transparent 45%),radial-gradient(ellipse at 10% 96%,#103433,transparent 40%),#0d1424}
html[data-theme=dark] .aurora i{opacity:.12}
html[data-theme=dark] .sidebar{background:linear-gradient(180deg,#172d60,#132448);border-color:#30405a}
html[data-theme=dark] .brand-glyph{box-shadow:none}
html[data-theme=dark] .side-nav a{color:#cad8f6}
html[data-theme=dark] .side-nav a.active{background:#34497b;color:#fff}
html[data-theme=dark] :is(.vision-panel,.outcome-panel,.lab-card,.library-card,.history-card,.account-card,.auth-card,.guidance-card,.emergency-card,.accessibility-card,.practice-card,.training-card,.training-safety,.digits-capture-card,.digits-dashboard-card,.conversation-compose,.conversation-thread,.confusion-card,.architecture-card,.model-admin-grid>article,.model-admin-kpis>div,.privacy-modal article,.dashboard-card,.evaluation-card,.institution-card,.institution-message,.stat-card){background:#172238;border-color:#30405a;box-shadow:0 12px 35px #00000018;color:#e7eefb}
html[data-theme=dark] .auth-screen{background:transparent}
html[data-theme=dark] .auth-screen:before{background:radial-gradient(circle at 20% 82%,#13443c,transparent 36%),radial-gradient(circle at 82% 12%,#20365b,transparent 40%),#0d1424}
html[data-theme=dark] :is(.text-sign-copy,.sign-output-card,.dashboard-kpis>div,.dashboard-detail,.insight-card){background:#172238;color:#e7eefb;border-color:#30405a;box-shadow:none}
html[data-theme=dark] :is(.history-tools label,.accessibility-grid label,.language-switch,.privacy-consent-inline,.setting-toggle,.soft-icon,.text-suggestions button){background:#1d2c46;color:#d3e1f7;border-color:#3a4d6a}
html[data-theme=dark] :is(.guidance-title>span,.history-empty>span,.sign-preview>span,.sign-video-note>span,.sign-scan-mark,.metric-mark,.research-symbol,.modal-lock,.insight-card>span,.translation-direction button>span,#signOutputStatus){background:#243c55;color:#85dccc;border-color:#3a4d6a}
html[data-theme=dark] :is(.dashboard-kpis strong,.dashboard-detail strong,.insight-card strong,.accessibility-grid label){color:#d3e1f7}
html[data-theme=dark] #emergencyButton,html[data-theme=dark] .feedback-strip button[data-feedback=correct]{background:#17423f;color:#9aecdc;border-color:#3c857b}
html[data-theme=dark] .feedback-strip button[data-feedback=incorrect]{background:#492735;color:#ffb8c7;border-color:#81495c}
html[data-theme=dark] .setting-toggle span{background:#516480}
html[data-theme=dark] .setting-toggle.is-on{background:#205551;color:#c3fff0;border-color:#6dbeb3}
html[data-theme=dark] .auth-privacy{color:#a7b8d0}
html[data-theme=dark] .auth-brand img{filter:brightness(1.45) drop-shadow(0 4px 14px #3977d93b)}
html[data-theme=dark] .forgot-link{color:#99baff}
html[data-theme=dark] :is(h1,h2,h3,h4,.result-empty strong,.prediction h2,.profile-summary h2,.digits-dashboard-card h2,.section-header h2,.auth-heading h1,.guidance-heading strong,.practice-heading strong,.setting-row strong){color:#e7eefb}
html[data-theme=dark] :is(.intro h1 em,.screen-intro h1 em){background:linear-gradient(110deg,#98b5ff,#64d6cb);background-clip:text;-webkit-background-clip:text;color:transparent}
html[data-theme=dark] :is(p,.screen-intro>p:last-child,.intro>p,.signal p,.privacy-lock p,.result-empty p,.prediction p,.auth-heading p,.auth-field>span,.auth-switch,.auth-note,.digits-dashboard-card p,.digits-dashboard-card small,.digits-picker label,.confidence-row,.breadcrumb,.breadcrumb strong,.setting-row p){color:#adbed7}
html[data-theme=dark] :is(.eyebrow,.overline,.privacy-lock strong,.prediction-label){color:#69d9cf}
html[data-theme=dark] :is(input:not([type=checkbox]):not([type=range]),textarea,select){background:#101b2e!important;color:#e7eefb!important;border-color:#3d506d!important;box-shadow:none}
html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#9caec8;opacity:1}
html[data-theme=dark] .auth-field>div{background:#101b2e;border-color:#3d506d;box-shadow:none}
html[data-theme=dark] .auth-field input{background:transparent!important}
.auth-field>div:focus-within{border-color:#0d9488;box-shadow:0 0 0 3px #0d948818}
html[data-theme=dark] .auth-field>div:focus-within{border-color:#65d9ca;box-shadow:0 0 0 3px #65d9ca22}
html[data-theme=dark] .auth-field b,html[data-theme=dark] .password-toggle{color:#9fb6da}
html[data-theme=dark] :is(.auth-switch button,.auth-forgot,.account-message,.mini-favourite,.institution-favorite){color:#99baff}
html[data-theme=dark] :is(.interface-controls button,.theme-options button,.ghost,.clear-button,.language-switch button,.translation-direction,.recognition-mode-switch,.recognition-mode-switch button,.phrase-library button,#institutionPhrases button,.mini-favourite,.history-filters,.history-actions button,.sign-preview,.metrics>div,.digits-live-stats b,.guide-metric,.letter-sequence figure,.sign-output-result,.sign-visual,.sign-video-note,.conversation-thread,.chat-system){background:#1d2c46;border-color:#3a4d6a;color:#d3e1f7}
html[data-theme=dark] :is(.primary,.auth-submit,.theme-options button.selected,.language-switch button.selected,.recognition-mode-switch button.selected,.phrase-library button.selected,.translation-direction button.active){background:linear-gradient(120deg,#3157ac,#277d85);color:#fff;border-color:#547cba;box-shadow:none}
html[data-theme=dark] .interface-controls button:hover,html[data-theme=dark] .theme-options button:hover{background:#2a3e5d;border-color:#6cd6ca}
html[data-theme=dark] :is(.mobile-dock){background:#162239f5;border-color:#384b6c;box-shadow:0 8px 30px #0004}
html[data-theme=dark] .mobile-dock a{color:#bccce3}
html[data-theme=dark] .mobile-dock a.active{color:#84e1d4;background:#193b43}
html[data-theme=dark] :is(.camera-status,.camera-status.active,.secure-chip,.guide-metric.is-ready,.speak-button,.account-state){background:#143d40;color:#8ae7d8;border-color:#397b76}
html[data-theme=dark] .recognition-feedback{background:#163e3d;border-color:#458b80}
html[data-theme=dark] .recognition-success strong,html[data-theme=dark] .recognition-success p{color:#b3f3df}
html[data-theme=dark] #recognitionSpeak{background:#1e514f;color:#d4fff1;border-color:#569e95}
html[data-theme=dark] .digits-live-stats strong,html[data-theme=dark] .digits-dashboard-card li,html[data-theme=dark] .confidence-row strong{color:#d6e6fd}
html[data-theme=dark] :is(.training-progress,.meter,.digits-dashboard-card i,.readiness-row>div){background:#31415c}
html[data-theme=dark] :is(.stop-camera,.logout-button){background:#492735;color:#ffb8c7;border-color:#81495c}
html[data-theme=dark] :is(.auth-message.error,.history-sync-message.error,.signal.is-error p,.training-message.error){color:#ffb8c7}
html[data-theme=dark] :is(.auth-message.success,.history-sync-message.success){color:#80e7b6}
html[data-theme=dark] .date-chip{color:#afc6e8;border-color:#3c506f;background:#16243b}
html[data-theme=dark] .spark-icon,html[data-theme=dark] .prediction-orbit{background:#213c64;border-color:#4a6b9b;color:#b4ceff;box-shadow:0 0 0 12px #24365955}
html[data-theme=dark] .confusion-matrix th{background:#20324f;color:#d3e1f7}
html[data-theme=dark] .privacy-modal{background:#060c1cb8}
html[data-theme=dark] body.high-contrast :is(.vision-panel,.outcome-panel,.auth-card,.training-card,.digits-capture-card,.digits-dashboard-card,.account-card){background:#080f1d;color:#fff;border-color:#8197b9}
html[data-theme=dark] body.high-contrast p{color:#e4ecf9}
@media(max-width:700px){
 .login-controls{inset-block-start:12px;inset-inline-end:12px}
 .interface-controls button{padding:8px 10px}
 .workspace-controls .interface-theme span{display:none}
 .command-actions .date-chip{display:none}
 .command-bar{flex-wrap:wrap;gap:12px}
 body.auth-gate .auth-screen{padding-block-start:76px}
 .appearance-setting{align-items:flex-start}
 .appearance-setting .theme-options{width:100%}
 .theme-options button{flex:1}
}
@media(prefers-reduced-motion:reduce){.interface-controls *,.theme-options *{transition:none!important}}
