/* Phase 3: white light, shared web/desktop, glass only behind a trusted preload. */
:root[data-theme=dark]{--ivy-rgb:234,243,244;--ivy-signal:#e4edef;--blue:#d8e8ed;--blue-soft:#182126;--ivy-violet-rgb:197,218,224;--bg:#090c10;--surface:#11171c;--surface-alt:#182027;--ivy-panel:#11171c;--line:#2a333a;--muted:#a5b1b9;--core-hero:#0a0e12;--core-line:#242e35}
body{font-family:'DM Sans','Segoe UI',Arial,sans-serif}h1,h2,h3{font-family:Manrope,'Segoe UI',Arial,sans-serif}
#neural-home-hero{display:flex;flex-direction:column;min-height:660px;border:0;background:transparent;overflow:visible;position:relative}
#neural-home-hero::before,#neural-home-hero::after{display:none}.neural-hero-copy{padding:20px 24px 0;align-self:center;text-align:center;z-index:2}
#neural-home-hero h1{font-size:clamp(24px,2.5vw,36px);letter-spacing:-1px;line-height:1.25;margin:12px 0 8px}#neural-home-hero h1 br{display:none}#neural-home-hero h1 span{display:inline;color:var(--text)}
#neural-home-hero .neural-hero-copy>p{font-size:13px;max-width:none}.hero-caption{display:none}.core-talk-hint{color:var(--muted);font-size:11px!important}
#neural-home-hero .neural-orb{height:clamp(350px,52vh,680px);min-height:300px;max-width:900px;width:100%;margin:0 auto;align-self:center}
#neural-home-hero .dali-core-control{width:100%;min-width:0;max-width:100%;border-radius:0;background:none}#neural-home-hero .neural-orb{grid-template-columns:minmax(0,1fr);padding-inline:0}.neural-orb canvas{filter:none!important}.coordinate-top{top:8%;font-size:9px;letter-spacing:3px;opacity:.6}.coordinate-bottom{bottom:6%;font-size:10px;letter-spacing:1px}
#neural-home-hero .hero-bottom{position:relative;width:100%;margin-top:auto;background:none;font-size:9px}.orb-core,.orb-ring{opacity:0!important}[data-renderer=css-fallback] .orb-ring{opacity:.3!important;border-color:var(--text)}[data-renderer=css-fallback] .orb-core{opacity:.4!important}
#ivy-voice-dock{width:max-content;position:fixed;bottom:18px;left:50%;transform:translateX(-50%);display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:5px;z-index:39;padding:6px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:0 10px 35px #0005;max-width:calc(100% - 24px)}
#ivy-voice-dock button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;border-radius:7px;font-size:11px;padding:7px 12px;color:var(--text)}#ivy-voice-dock svg{width:18px;height:18px}#ivy-voice-dock>button:first-child{background:var(--surface-alt);border:1px solid var(--line)}
.app-footer{padding-bottom:100px}#local-ivy-dialog,#desktop-setup-wizard{width:min(760px,calc(100vw - 28px));max-height:88dvh;padding:24px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--text);overflow:auto}
#local-ivy-dialog::backdrop,#desktop-setup-wizard::backdrop{background:#0008;backdrop-filter:blur(6px)}#local-ivy-dialog header{display:flex;justify-content:space-between;align-items:center;gap:16px}#local-ivy-dialog p,#desktop-setup-wizard p{font-size:13px}#local-ivy-dialog .toolbar{margin:12px 0;flex-wrap:wrap}#local-ivy-history{max-height:240px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}#local-ivy-history p{padding:12px;border-left:2px solid var(--line);background:var(--surface-alt)}#local-ivy-input{width:100%}meter[data-live-audio]{width:100%;height:10px}#desktop-notice{min-height:30px;color:var(--amber)}#desktop-settings pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:340px;overflow:auto;font:12px/1.7 monospace;padding:18px;background:var(--surface-alt);border:1px solid var(--line);border-radius:8px}#desktop-settings h3{margin-top:26px}#desktop-settings .toolbar{flex-wrap:wrap;margin:12px 0}#desktop-settings form{margin:22px 0}#desktop-settings input:not([type=checkbox]),#desktop-settings select{max-width:100%}
#desktop-titlebar{height:38px;position:fixed;inset:0 0 auto;z-index:99;display:flex;justify-content:space-between;align-items:center;padding-left:16px;background:#11181de0;color:#edf3f5;user-select:none;app-region:drag;-webkit-app-region:drag;font:10px monospace;letter-spacing:2px}#desktop-titlebar nav{display:flex;app-region:no-drag;-webkit-app-region:no-drag}#desktop-titlebar button{border:0;border-radius:0;min-height:38px;width:48px;padding:0;background:transparent;color:white;font:18px sans-serif}#desktop-titlebar button:last-child:hover{background:#973b47}
html[data-desktop=true] body{padding-top:38px}html[data-desktop=true] .sidebar{top:38px;height:calc(100dvh - 38px)}html[data-desktop=true] #ivy-settings{display:none}
/* One design system for every desktop surface. Alpha belongs to backgrounds,
   never text, content parents, images in records, or the foreground core. */
html[data-desktop=true]{--glass-foundation-alpha:.954;--glass-panel-alpha:.965;--glass-overlay-alpha:.997;--glass-art-alpha:.008;--glass-blur:50px;--text:#f4f5f6;--muted:#becad3;--line:#ffffff26;--bg:#090d13;--surface:rgba(13,18,25,var(--glass-panel-alpha));--surface-alt:rgba(22,29,38,var(--glass-panel-alpha));--ivy-panel:var(--surface);--ivy-signal:#edf5f7;--glass-overlay:rgba(13,18,25,var(--glass-overlay-alpha));background:transparent!important}
html[data-desktop=true][data-glass=solid]{--glass-foundation-alpha:1!important;--glass-panel-alpha:1!important;--glass-overlay-alpha:1!important;--glass-blur:0px}
html[data-desktop=true] body{min-height:100dvh;background:rgba(6,10,16,var(--glass-foundation-alpha))!important;color:var(--text)}
html[data-desktop=true] .app-shell{background:transparent;opacity:1}
html[data-desktop=true] .topbar{height:auto;min-height:78px;flex-wrap:wrap;padding-block:10px}
html[data-desktop=true] .topbar-actions{flex-wrap:wrap;max-width:100%;min-width:0}
html[data-desktop=true] :is(.panel-header,.record-row,.agenda-card-heading){flex-wrap:wrap}
html[data-desktop=true] :is(.tag,.record-row>*,.panel-header>*){min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
html[data-desktop=true] #main-content{container-type:inline-size;container-name:evie-content}
@container evie-content (max-width:600px){.dashboard-grid,.briefing-grid,.summary-grid,.form-grid,.numeric-stats,.agenda-week{grid-template-columns:minmax(0,1fr)!important}.page-heading{flex-wrap:wrap}.heading-actions{max-width:100%}.bank-card{max-width:100%}}
html[data-desktop=true] :is(.panel,.stat-card,.detail-card,.topbar,.sidebar,.ivy-intelligence,.rancho-hero,.rancho-rail,.rancho-animal,.agenda-day,.agenda-week,.agenda-list,.agenda-timeline,.bank-card,.client-card,.journal-card,.alvento-editorial,.tabs,.mobile-nav,.today-strip,.next-actions,.ivy-production-rail,.neural-stage-rail>article,#ivy-voice-dock,#desktop-titlebar){background:var(--surface)!important;backdrop-filter:blur(var(--glass-blur));-webkit-backdrop-filter:blur(var(--glass-blur));border-color:var(--line);box-shadow:inset 0 1px #ffffff0b}
html[data-desktop=true] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,select,option,.input,.select,.form-details,.choice-card,pre,.record-row,.task-row){background:var(--surface-alt)!important;color:var(--text)}
html[data-desktop=true] :is(dialog,[role=dialog],[role=menu],[role=listbox],[role=tooltip],.dropdown,.dropdown-menu,.tooltip,.toast,.dialog-header,.form-footer,#dali-core-menu.ivy-dialog,#local-ivy-dialog,#desktop-setup-wizard){background:var(--glass-overlay)!important;color:var(--text);backdrop-filter:blur(var(--glass-blur));-webkit-backdrop-filter:blur(var(--glass-blur))}
html[data-desktop=true] :is(.neural-module-art,.textile-field),html[data-desktop=true] body::before{opacity:var(--glass-art-alpha)!important;animation:none!important;pointer-events:none}
html[data-desktop=true] #neural-home-hero{background:transparent!important;opacity:1;isolation:isolate}
html[data-desktop=true] :is(.neural-orb,.neural-orb canvas,.neural-hero-copy,#dali-core-control){opacity:1!important;filter:none;z-index:2}
html[data-desktop=true] .neural-hero-copy{background:transparent}
html[data-desktop=true] .neural-view-enter{animation:none}
@supports not (backdrop-filter:blur(1px)){html[data-desktop=true]{--glass-foundation-alpha:1!important;--glass-panel-alpha:1!important;--glass-overlay-alpha:1!important}}

.pig-hologram{display:block;width:100%;max-width:100%;height:300px;background:transparent}.rancho-silhouette[hidden]{display:none!important}.rancho-visual{position:relative}.rancho-visual::after{content:'';position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(transparent 0 7px,#ddfff204 8px 9px)}
.page-heading .neural-module-art{display:grid;position:relative;inset:auto;width:70px;height:70px;flex-shrink:0;opacity:.3;border:1px solid var(--line);border-radius:50%;box-shadow:0 0 20px #fff05;animation:module-hologram 8s ease-in-out infinite}.page-heading .neural-module-art svg{width:30px;height:30px}@keyframes module-hologram{50%{transform:translateY(-4px) rotateY(28deg);opacity:.55}}
html[data-low-glow=true] *{text-shadow:none!important;box-shadow:none!important}html[data-motion=reduced] .neural-module-art,html[data-paused=true] .neural-module-art{animation:none!important}
@media(prefers-reduced-motion:reduce){.neural-module-art{animation:none!important}}
@media(max-width:767px){#neural-home-hero{min-height:500px}.neural-hero-copy{padding:16px 12px 0}#neural-home-hero h1{font-size:27px;margin:12px 0 7px}#neural-home-hero .neural-orb{height:330px;min-height:260px;margin:0 auto}.coordinate-bottom{font-size:9px}#ivy-voice-dock{bottom:calc(65px + env(safe-area-inset-bottom));padding:4px;gap:2px}#ivy-voice-dock .button{font-size:10px;padding:6px 8px}#ivy-voice-dock button{font-size:10px;white-space:normal;min-width:0;max-width:100%}#local-ivy-dialog{padding:17px}.app-footer{padding-bottom:165px}.page-heading .neural-module-art{width:45px;height:45px}.page-heading .neural-module-art svg{width:23px}.pig-hologram{height:230px}}
#desktop-confirmation[open]{position:fixed;inset:60px 20px auto auto;margin:0;width:min(580px,calc(100vw - 28px));max-height:80dvh;overflow:auto;padding:24px;z-index:110;background:var(--glass-overlay,var(--surface));border:1px solid var(--amber)}
#desktop-confirmation pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:40dvh;overflow:auto;font-size:12px;background:var(--surface-alt);padding:16px}
#desktop-confirmation .toolbar{flex-wrap:wrap}
.desktop-app-card{display:flex;gap:14px;padding:16px 0;border-bottom:1px solid var(--line)}.desktop-app-card section{min-width:0}.desktop-app-card small{overflow-wrap:anywhere}.desktop-app-icon{width:32px;min-width:32px;height:32px;border:1px solid var(--line);display:grid;place-items:center;font-size:11px}.desktop-app-icon img{width:24px;height:24px}#desktop-app-catalog{max-height:540px;overflow:auto;overscroll-behavior:contain;padding:8px}
/* Conversation is nonmodal so the same core remains clickable to stop. */
#local-ivy-dialog[open]{position:fixed;inset:auto 20px 90px auto;margin:0;width:min(410px,calc(100vw - 28px));max-height:65dvh;z-index:70;box-shadow:0 18px 60px #0008}
#local-ivy-dialog[open] #local-ivy-history{max-height:160px}
@media(max-width:767px){#local-ivy-dialog[open]{right:14px;bottom:135px;max-height:55dvh}}
@media print{#ivy-voice-dock,#desktop-titlebar,.pig-hologram{display:none!important}}
