/* Shared appearance: explicit surfaces and text, never a page-wide inversion. */
:root{--app-bg:#f7f6fa;--panel-bg:#fff;--panel-soft:#f5f1fa;--text:#35283f;--text-secondary:#675472;--line:#dfd5e8;--input-bg:#fff;--accent:#7251b5}
html,body{background:var(--app-bg);color:var(--text)}
.paper textarea,.document-preview{font-size:inherit;line-height:inherit;text-align:inherit}.editor-toolbar{flex-wrap:wrap}.document-table{overflow-x:auto;margin:16px 0}.document-table table{border-collapse:collapse;width:100%;text-align:left}.document-table td,.document-table th{border:1px solid var(--line);padding:8px;min-width:80px}.document-preview blockquote{border-left:3px solid var(--accent);padding-left:18px;margin-left:0;color:var(--text-secondary)}.document-preview pre{overflow:auto;white-space:pre-wrap;background:var(--panel-soft);padding:16px;border-radius:6px}.document-preview a{color:var(--accent);text-decoration:underline}.document-preview ul,.document-preview ol{padding-left:25px}.document-preview li{margin:7px 0}.document-preview hr{border:0;border-top:1px solid var(--line);margin:20px 0}
html[data-theme=light] :is(.page-heading h1,.welcome h1,.app-card-name,.item-main strong,.editor-title,.task-title,.contact-card h3,.contact-details,.font-samples strong,.format-matrix strong,.connection strong,.history-list strong,.dialog h2,.new-grid strong,.conversation-start h3,.conversion-intro h2,.integration-empty h2,.notification-copy p,.notification-source,.day){color:var(--text)}
html[data-theme=light] :is(.muted,.page-heading .muted,.welcome p:not(.eyebrow),.app-card>span:not(.app-icon):not(.app-card-name),.app-card small,.section-heading>span,.app-footer,.item-main small,.item-date,.editor-meta,.editor-footnote,.task-card footer,.event-card p,.contact-card p,.message-meta time,.notification-copy time,.notification-sound-help,.notification-connections,.notification-empty p){color:var(--text-secondary)}
html[data-theme=light] .welcome h1 span{color:#70498e}
html[data-theme=light] :is(.spreadsheet input,.document-preview,.paper textarea){color:#35283f}
.theme-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0}.theme-choice{display:flex;flex-direction:column;gap:10px;text-align:left;border:2px solid var(--line);border-radius:12px;background:var(--panel-bg);padding:13px;color:var(--text)}.theme-choice[aria-pressed=true]{border-color:var(--accent);box-shadow:0 0 0 2px #9164cf26}.theme-choice>span:last-child{font-size:12px;line-height:1.5;color:var(--text-secondary)}.theme-preview{display:grid;grid-template-columns:22% 1fr;grid-template-rows:12px 35px;gap:7px;background:#f4f1f8;border:1px solid #d9cce5;border-radius:6px;width:100%;padding:8px}.theme-preview i:first-child{grid-row:span 2;background:#291e3b}.theme-preview i{border-radius:3px;background:#d6c8e7}.theme-choice.dark .theme-preview{background:#211b2d;border-color:#574564}.theme-choice.dark .theme-preview i{background:#72578d}.theme-choice.dark .theme-preview i:first-child{background:#110d18}.theme-choice.system .theme-preview{background:linear-gradient(115deg,#f4f1f8 50%,#211b2d 50%)}.appearance-help{margin-bottom:12px}.appearance-panel{margin-bottom:24px}.calendar-controls{display:flex;align-items:center;gap:6px}.calendar-controls .icon-button{flex:none}.message-actions{display:flex;gap:8px;align-items:center}.message-files{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}.message-files button{font-size:11px;text-align:left;max-width:100%;overflow-wrap:anywhere}.message-compose{display:flex;flex-direction:column;gap:10px;padding:0 24px 20px}.message-compose #message-form{margin:0;padding:0;display:flex;flex-direction:column}.composer-actions{display:flex;justify-content:space-between;gap:12px;align-items:center;width:100%}.attachment-picker{display:flex;flex-direction:column;gap:8px;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--panel-soft);font-size:12px}.attachment-picker label{display:flex;gap:8px;align-items:center;overflow-wrap:anywhere}.attachment-picker input{flex:none}.message-search{margin-bottom:16px;max-width:350px}.message-search input{width:100%;border:1px solid var(--line);border-radius:8px;padding:9px;background:var(--input-bg);color:var(--text)}
html[data-theme=dark]{--app-bg:#181421;--panel-bg:#241e30;--panel-soft:#2c2438;--text:#f0eaf7;--text-secondary:#c7b9d4;--line:#51425f;--input-bg:#211a2c;--accent:#b795ee;--purple:#b795ee;--purple-dark:#8f66c9;--muted:#c7b9d4;--border:#51425f;--surface:#241e30;--shadow:0 8px 28px #0003}
html[data-theme=dark] .sidebar{background:linear-gradient(166deg,#20182e,#100d17 74%);border-color:#51425f}
html[data-theme=dark] :is(.topbar,.panel,.app-card,.item-list,.connect-layout,.dialog,.task-card,.contact-card,.grid-toolbar,.sheet-bottom,.new-grid>button,.notification-trigger,.theme-choice){background:var(--panel-bg);border-color:var(--line);color:var(--text)}
html[data-theme=dark] :is(.search-trigger,.button,.format-button,.editor-toolbar,.document-canvas,.kanban-column,.file-detail code,.font-samples>div,.drop-zone,.format-matrix,.quiet-banner,.connection-icon,.attachment-picker){background:var(--panel-soft);border-color:var(--line);color:var(--text)}
html[data-theme=dark] :is(h1,h2,h3,.page-heading h1,.welcome h1,.welcome h1 span,.app-card-name,.item-main strong,.editor-title,.task-title,.task-card p,.message p,.message-meta strong,.contact-card h3,.contact-details,.font-samples strong,.format-matrix strong,.connection strong,.history-list strong,.field,.dialog h2,.new-grid strong,.conversation-start h3,.conversion-intro h2,.integration-empty h2,.notification-copy p,.notification-source,.notification-connections strong,.day){color:var(--text)}
html[data-theme=dark] :is(.muted,.small,.eyebrow,.welcome p,.app-card>span:not(.app-icon):not(.app-card-name),.app-card small,.section-heading>span,.app-footer,.item-main small,.item-date,.drive-tools,.info-line,.editor-meta,.editor-footnote,.task-card footer,.column-empty,.message-meta time,.event-card p,.contact-card p,.chat-pane>header small,.meeting-note span,.meeting-note strong,.conversation-start p,.conversion-intro p,.drop-zone span,.conversion-disclosure,.format-matrix p,.settings-list dd,.settings-list dt,.connection p,.font-panel>.small,.integration-empty p,.dialog>p,.new-grid small,.history-list small,.file-detail,.help-steps,.audit-list>div,.audit-list time,.font-samples small,.notification-controls p,.notification-sound-help,.notification-copy time,.notification-read-label,.notification-empty p,.notification-empty h3,.notification-connections,.current-app,.save-status,.notification-trigger){color:var(--text-secondary)}
html[data-theme=dark] :is(input,textarea,select,.field input,.field select,.field textarea){background:var(--input-bg);color:var(--text);border-color:var(--line)}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#ab99bd}
html[data-theme=dark] :is(.button.primary,.button.primary:hover){background:#7650ac;color:#fff;border-color:#a984d9}
html[data-theme=dark] :is(.text-button,.icon-button,.help-steps strong,.save-status.unsaved){color:#d0b0ff}
html[data-theme=dark] :is(.button.danger,.form-error){color:#ffb4c6}
html[data-theme=dark] :is(.pill,.pill.green){color:#d9c5f5;background:#3b2d4f;border-color:#66517a}
html[data-theme=dark] :is(.file-icon,.app-icon){background:#3a2b4e;color:#d7baff}
html[data-theme=dark] :is(.item-row,.settings-list>div,.connection,.audit-list>div,.chat-pane>header,.channel-list,.notification-list,.notification-row,.event-card,.history-list>div,.day,.spreadsheet td,.spreadsheet th){border-color:var(--line)}
html[data-theme=dark] :is(.item-row:hover,.day:hover,.day.is-today,.channel.active,.channel:hover,.notification-row.unread,.notification-trigger:hover,.notification-trigger[aria-expanded=true],.new-grid>button:hover){background:#382b49;color:var(--text)}
html[data-theme=dark] :is(.spreadsheet,.spreadsheet input){background:#241e30;color:#f0eaf7}
html[data-theme=dark] :is(.spreadsheet th,.spreadsheet thead th,.spreadsheet tbody th,.day small,.sheet-tab){background:#352841;color:#e1d0f1}
html[data-theme=dark] .spreadsheet input:focus{background:#3b2c50;color:#fff}
html[data-theme=dark] .spreadsheet .formula-cell{color:#d2b1ff}
html[data-theme=dark] .paper{background:#2b2337;color:#f0eaf7}
html[data-theme=dark] :is(.paper textarea,.document-preview,.document-preview h1,.document-preview h2,.document-preview h3){background:transparent;color:#f0eaf7}
html[data-theme=dark] .notification-badge{background:#49365f;color:#eee4fc}
html[data-theme=dark] .notification-badge.has-unread{background:#b795ee;color:#20132e}
html[data-theme=dark] .notification-empty{color:#b99ad8}
html[data-theme=dark] .weekday{color:#c7b9d4}
html[data-theme=dark] .floating-tag{background:#352b44;border-color:#6d5683;color:#eadcf7}
html[data-theme=dark] .orbit{border-color:#83659c66}
html[data-theme=dark] #toast{background:#ece1fa;color:#2b183c;border:1px solid #b795ee}
html[data-theme=dark] #toast.error{background:#5c2539;color:#ffe5ed}
@media(max-width:760px){.theme-choices{grid-template-columns:1fr}.theme-preview{max-width:160px}.calendar-controls{gap:3px}.calendar-controls .text-button{font-size:10px}.message-compose{padding:0 14px 14px}.composer-actions{flex-wrap:wrap}.month-panel .section-heading{gap:10px;flex-wrap:wrap}}
@media print{html[data-theme=dark],html[data-theme=dark] body,html[data-theme=dark] .paper,html[data-theme=dark] .document-preview,html[data-theme=dark] .document-preview :is(h1,h2,h3,p){background:#fff;color:#111}html[data-theme=dark] .document-canvas{background:#fff}}

.sign-in-page{min-height:100vh;display:grid;place-items:center;padding:30px;background:radial-gradient(ellipse at top,#dac6f140,transparent 65%)}.sign-in-card{width:100%;max-width:490px;padding:36px;border:1px solid var(--line);border-radius:18px;background:var(--panel-bg);box-shadow:0 18px 70px #2c14351a}.sign-in-brand{font-weight:800;letter-spacing:3px;color:var(--text);display:block;margin-bottom:30px}.sign-in-brand small{display:block;letter-spacing:4px;font-size:9px;margin-top:6px}.sign-in-card h1{font-size:28px;margin:14px 0}.sign-in-card form{margin:26px 0 16px}.sign-in-card>.small{margin-top:14px}.sign-in-card .form-error{margin:12px 0}.sign-in-card .field{font-size:13px}.beta-scope{font-size:12px;color:var(--text-secondary);line-height:1.7;margin-top:24px;border-top:1px solid var(--line);padding-top:18px}.beta-scope p{margin-top:10px}.beta-scope summary{cursor:pointer}@media(max-width:600px){.sign-in-page{padding:18px}.sign-in-card{padding:24px}}

/* Shared Corvanta surfaces. Approved product artwork remains a separate asset. */
:root{--accent:#6b37b0;--chrome-edge:#c9c5d2;--surface-shadow:0 12px 40px #30213d0b,0 1px 3px #30213d0d}
html[data-theme=light] body{background-image:radial-gradient(ellipse at 90% 0,#d9caf930,transparent 48%),radial-gradient(ellipse at 0 70%,#ffffffcc,transparent 55%);background-attachment:fixed}
:is(.panel,.app-card,.task-card,.contact-card,.chat-pane,.channel-list,.dialog,.sign-in-card){border-color:var(--chrome-edge);box-shadow:var(--surface-shadow),inset 0 1px 0 #ffffffb8}
html[data-theme=light] :is(.panel,.task-card,.contact-card,.chat-pane,.channel-list,.dialog,.sign-in-card){background:linear-gradient(150deg,#fffffffa,#fdfcfff5 68%,#f0edf6ef)}
html[data-theme=light] .sidebar{background:linear-gradient(150deg,#ffffff,#efecf4 72%,#e3deed);border-right:1px solid #c9c3d4;box-shadow:5px 0 28px #35213f09}
html[data-theme=light] .sidebar :is(.brand,.nav-item,.nav-label,.workspace-switch,.cora-callout,.local-indicator){color:#4c365c}
html[data-theme=light] .sidebar :is(.nav-item.active,.nav-item:hover){background:#ebe1f5;color:#54288b}
html[data-theme=light] .sidebar .nav-item.active{box-shadow:inset 3px 0 0 #8051bd,inset 0 1px 0 #fff}
html[data-theme=light] .sidebar :is(.workspace-switch,.cora-callout){background:#ffffffb3;border-color:#cec5dc}
html[data-theme=light] .brand strong{color:#3d2452}.brand{position:relative;min-height:68px;padding-bottom:18px}.brand:after{content:'';position:absolute;bottom:5px;left:0;right:10px;height:2px;background:linear-gradient(90deg,#7343aa,#fdfcff 42%,#b6a7cc 68%,transparent)}
.brand strong{font-size:21px;letter-spacing:2.5px}.brand small{letter-spacing:3px}
.topbar{backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border-bottom:1px solid var(--chrome-edge);box-shadow:0 5px 25px #24142e08}
html[data-theme=light] .topbar{background:#ffffffd9}
.button.primary{background:linear-gradient(145deg,#8556bc,#62328f);border:1px solid #673b95;box-shadow:inset 0 1px 0 #cfa9f399,0 5px 12px #65339424;color:#fff}
.button.primary:hover{background:linear-gradient(145deg,#9064c5,#6c3a99);box-shadow:inset 0 1px 0 #e4c6ffb3,0 7px 19px #65339430}
:is(.button,.app-card,.nav-item){transition:background .18s ease,box-shadow .18s ease,transform .18s ease,border-color .18s ease}
.app-card{position:relative;overflow:hidden;border-radius:18px}.app-card:after{content:'';position:absolute;top:0;left:8%;right:8%;height:1px;background:linear-gradient(90deg,transparent,#fff,transparent);pointer-events:none}.app-card:hover{transform:translateY(-3px);box-shadow:0 16px 34px #63458b20,inset 0 1px 0 #fff}
html[data-theme=light] .app-card{background:linear-gradient(135deg,#fff,#faf7ff 70%,#e9e3f2)}
.chrome-orb{background:radial-gradient(ellipse at 27% 20%,#ffffff 0,#e6deee 13%,#8d6bb1 27%,#eee8f6 39%,#8e7b9b 44%,#3d2058 57%,#b796d5 75%,#f4edff 87%,#5b3d77 100%);box-shadow:inset -16px -18px 35px #29173966,inset 10px 8px 22px #ffffffa6,0 32px 45px #5d347b33;animation:none}
html[data-theme=dark]{--panel-bg:#24212e;--panel-soft:#2a2536;--chrome-edge:#554a64;--surface-shadow:0 12px 35px #00000024;--text:#f2edf8;--text-secondary:#c5b8d3}
html[data-theme=dark] :is(.panel,.app-card,.task-card,.contact-card,.chat-pane,.channel-list,.dialog,.sign-in-card){background:linear-gradient(145deg,#302938,#24212e 72%,#211e29);border-color:#554a64;box-shadow:var(--surface-shadow),inset 0 1px 0 #d1bbef20}
html[data-theme=dark] .sidebar{background:linear-gradient(150deg,#2c2634,#17131f);border-right:1px solid #514360}
html[data-theme=dark] .topbar{background:#241d2cde}
html[data-theme=dark] :is(.spreadsheet th,.sheet-bottom,.grid-toolbar){background:#282131;color:#eee5f7}
.sheet-bottom{flex-wrap:wrap;gap:8px}.sheet-tab[aria-pressed=true]{background:var(--panel-soft);color:var(--accent);border-bottom:2px solid var(--accent)}
html[data-theme=dark] .sheet-tab[aria-pressed=true]{color:#dec3ff;border-color:#c6a0f3}
.connect-new-tab{text-decoration:none;display:inline-flex;align-items:center;gap:8px}
:focus-visible{outline:3px solid #a579df;outline-offset:3px}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.app-card:hover{transform:none}}
@media print{.grid-tools,.workbook-fidelity{display:none}html[data-theme=light] body,html[data-theme=dark] body{background:#fff}}

html[data-theme=light] .cora-callout strong{color:#54366e}html[data-theme=light] .cora-callout small{color:#695477}html[data-theme=light] .nav-item.active svg{color:#684096}html[data-theme=light] .theme-choice.light .theme-preview i:first-child{background:#ece5f5;border:1px solid #c6b6d8}
