/* The switch motion follows the day/night pattern by rishichawda on Uiverse.io.
   SVG artwork and namespaced styles are specific to KaiLog. */
.sidebar-navigation{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#76658a70 transparent}
.sidebar-navigation .category-nav{flex:none;overflow:visible;min-height:0}
.sidebar-navigation .nav-section:last-child{margin-bottom:8px}
.sidebar .sidebar-spacer{flex:0 0 4px;min-height:4px}
.theme-preference{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:0 0 auto;padding:10px 9px;margin-top:3px}
.theme-preference-copy{display:grid;gap:3px;min-width:0;font-size:11px;color:#c7c8d3}
.theme-preference-copy small{font-size:10px;color:#a3a2b5}
.theme-toggle-button{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 82px;width:82px;min-height:44px;border-radius:24px;cursor:pointer;-webkit-tap-highlight-color:transparent}
.theme-toggle-button input{position:absolute;width:1px;height:1px;opacity:0;clip-path:inset(50%);overflow:hidden}
.theme-toggle-button svg{display:block;width:82px;height:auto;overflow:visible;filter:drop-shadow(0 2px 4px #0002)}
.theme-toggle-button:has(input:focus-visible){outline:2px solid var(--purple);outline-offset:3px}
.theme-toggle-button .theme-sky,.theme-toggle-button .theme-knob,.theme-toggle-button .theme-sun,.theme-toggle-button .theme-moon,.theme-toggle-button .theme-cloud,.theme-toggle-button .theme-stars{transition:fill .25s cubic-bezier(.4,0,.2,1),opacity .25s cubic-bezier(.4,0,.2,1),transform .25s cubic-bezier(.4,0,.2,1)}
.theme-sky{fill:#87c9e7;stroke:#6babc9;stroke-width:1}
.theme-moon,.theme-stars{opacity:0}
.theme-sun,.theme-cloud{opacity:1}
.theme-toggle-button input:checked+svg .theme-sky{fill:#2b4360;stroke:#496482}
.theme-toggle-button input:checked+svg .theme-knob{transform:translateX(34px)}
.theme-toggle-button input:checked+svg :is(.theme-sun,.theme-cloud){opacity:0}
.theme-toggle-button input:checked+svg :is(.theme-moon,.theme-stars){opacity:1}

/* Light tokens are shared by every workspace and meeting component. */
:root[data-theme="light"]{
 color-scheme:light;--bg:#f5f6fb;--panel:#fff;--panel-2:#f0f2f8;--line:rgba(37,35,60,.12);
 --text:#242735;--muted:#626b7d;--soft:#465166;--purple:#7053ba;--green:#23734f;--amber:#896014;--red:#b53049;
 --ui-text:#242735;--ui-muted:#626b7d;--ui-accent:#7053ba;--ui-border:rgba(37,35,60,.12);--ui-surface:#fff;
 --theme-surface:#fff;--theme-raised:#fff;--theme-subtle:#f0f2f8;--theme-hover:#ebe7f8;--theme-border-strong:#c7ccda;--theme-accent:#7053ba;
}
:root[data-theme="light"] body{background:var(--bg);color:var(--text)}
:root[data-theme="light"] .ambient{opacity:.035}
:root[data-theme="light"] :is(button,a,summary,input,select,textarea,[tabindex]):focus-visible{outline-color:var(--theme-accent)}
:root[data-theme="light"] :is(.hero-card,.assistant-card,.panel,.stat-card,.topic-card,.inbox-card,.meeting-list,.category-parent-list,.user-table-wrap,.modal-card,.invitation-row,.profile-affiliation-entry){background:var(--theme-surface);border-color:var(--line);box-shadow:0 4px 20px #24273506}
:root[data-theme="light"] .topbar{background:#fafbffed;border-color:var(--line)}
:root[data-theme="light"] :is(.breadcrumbs,.slash,.crumb-separator,.eyebrow,.subheading,.source-tag,.step-label,.drawer-description,.form-hint,.option-copy small,.empty-state,.table-head,.user-email,.user-account-cell small,.scope-fixed-label,.affiliation-empty,.affiliation-editor p,.affiliation-option small,.profile-affiliation-heading,.profile-affiliation-entry small,.profile-unassigned){color:var(--muted)}
:root[data-theme="light"] :is(.breadcrumbs b,.empty-state b,.drawer-head h2,.profile-affiliation-entry b){color:var(--text)}
:root[data-theme="light"] :is(.crumb-link,.text-link,.topic-link,.affiliation-editor summary){color:var(--theme-accent)}
:root[data-theme="light"] :is(.crumb-link:hover,.text-link:hover,.topic-link:hover){color:#543a94}
:root[data-theme="light"] .heading-row h1{color:var(--text)}
:root[data-theme="light"] .brand-logo{content:url('/brand/kailog-logo-purple.png?v=20261027-1')}
:root[data-theme="light"] .meeting-row{border-color:var(--line)}
:root[data-theme="light"] .meeting-row:hover{background:#7053ba08}
:root[data-theme="light"] :is(.meeting-date,.meeting-detail,.row-arrow){color:var(--muted)}
:root[data-theme="light"] .meeting-date b{color:var(--text)}
:root[data-theme="light"] :is(.search-wrap,.search-wrap:focus-within,.icon-button,.help-button,.close-button){background:var(--theme-surface);color:var(--soft);border-color:var(--line)}
:root[data-theme="light"] :is(.search-icon,.search-wrap input::placeholder,.search-wrap kbd){color:var(--muted)}
:root[data-theme="light"] .search-wrap kbd{border-color:var(--line);background:var(--theme-subtle)}
:root[data-theme="light"] .button:where(:not(.primary,.recording-start-button,.ai-action)){background:var(--theme-surface);color:var(--soft);border-color:var(--theme-border-strong);box-shadow:0 1px 2px #24273505}
:root[data-theme="light"] .button:where(:not(.primary,.recording-start-button,.ai-action)):hover{background:var(--theme-subtle);border-color:#aeb6c8;color:var(--text)}
:root[data-theme="light"] .button.primary{background:linear-gradient(135deg,#8867cc,#6948b0);color:#fff;box-shadow:0 4px 14px #7053ba20}
:root[data-theme="light"] .button.primary:hover{background:linear-gradient(135deg,#7857be,#5e3d9f)}
:root[data-theme="light"] .button.ghost{background:transparent;box-shadow:none}
:root[data-theme="light"] .button.purple-outline{color:var(--theme-accent);background:#f4f0fb;border-color:#cbbce7}
:root[data-theme="light"] .button.danger{color:var(--red);background:#fff5f6;border-color:#e9b7c1}
:root[data-theme="light"] .button.danger:hover{background:#fbecef;color:#9d243e;border-color:#dca2af}
:root[data-theme="light"] .button:disabled{opacity:.58;box-shadow:none}
:root[data-theme="light"] :is(.input-field,select,select.input-field,select option,select optgroup,.category-color-picker){color-scheme:light;background:var(--theme-surface);color:var(--text);border-color:var(--theme-border-strong)}
:root[data-theme="light"] :is(.input-field::placeholder,textarea::placeholder){color:#6a7282}
:root[data-theme="light"] .input-field:focus{border-color:var(--theme-accent);box-shadow:0 0 0 3px #7053ba14}
:root[data-theme="light"] :is(select option:checked,select option:focus,select option:hover){background:#e9e1f6;color:#4f347e}
:root[data-theme="light"] .input-field:disabled{background:#edf0f6;color:var(--muted)}
:root[data-theme="light"] :is(input[type="date"],input[type="datetime-local"],.task-due-input,audio){color-scheme:light}
:root[data-theme="light"] :is(input[type="checkbox"],input[type="radio"]){accent-color:var(--theme-accent)}
:root[data-theme="light"] :is(.field-label,.option-copy b){color:var(--soft)}
:root[data-theme="light"] input::file-selector-button{background:#ebe5f6;color:#563c8d;border:0;border-radius:5px;padding:6px 10px;margin-right:10px;cursor:pointer}
:root[data-theme="light"] .overlay{background:#27253845}
:root[data-theme="light"] .drawer{background:#f9fafffa;color:var(--text);border-color:var(--line);box-shadow:-16px 0 60px #24273516}
:root[data-theme="light"] :is(.drawer-bottom,.meeting-detail-bottom){background:linear-gradient(0deg,#f9faff 86%,#f9faffed);border-color:var(--line)}
:root[data-theme="light"] .admin-page-view .drawer-bottom{background:none}
:root[data-theme="light"] .option-card{background:var(--theme-surface);border-color:var(--line)}
:root[data-theme="light"] :is(.option-card:hover,.option-card.selected){background:#f1ebfa;border-color:#bba8dd}
:root[data-theme="light"] .option-radio{border-color:#8b92a2}
:root[data-theme="light"] .option-card.selected .option-radio{border-color:var(--theme-accent)}
:root[data-theme="light"] .toast{color:var(--text);background:#fffffff7;border-color:var(--theme-border-strong);box-shadow:0 8px 35px #24273522}
:root[data-theme="light"] .toast span{color:var(--green)}
:root[data-theme="light"] .toast[role="alert"]{border-color:#db9eac;background:#fff7f8}
:root[data-theme="light"] .toast[role="alert"]>span{color:var(--red)}
:root[data-theme="light"] .skeleton{background:linear-gradient(110deg,#e9ecf3 8%,#f8f9fd 18%,#e9ecf3 33%);background-size:200% 100%}

/* A pale glass sidebar, with the same hierarchy and category accents. */
:root[data-theme="light"] .sidebar{background:linear-gradient(155deg,#f5f1fbeF,#edf0f8f2 45%,#f4f3f9f2);border-color:#d8d3e5;box-shadow:inset 1px 0 #fff,6px 0 28px #3c325008}
:root[data-theme="light"] .sidebar::before{background:linear-gradient(90deg,#fff,#fff7,transparent)}
:root[data-theme="light"] .sidebar::after{background:linear-gradient(180deg,#c0b0da66,#cbd1e344,transparent)}
:root[data-theme="light"] :is(.sidebar .brand small,.sidebar .section-label,.theme-preference-copy small){color:#60687b}
:root[data-theme="light"] .theme-preference-copy{color:#414657}
:root[data-theme="light"] :is(.sidebar .nav-item,.sidebar .tree-select,.sidebar .tree-full-name){color:#495064}
:root[data-theme="light"] :is(.sidebar .nav-icon,.sidebar .nav-trailing,.sidebar .tree-number,.sidebar .count,.sidebar .category-nav .tree-caret-toggle,.sidebar .tree-name-section small,.sidebar .profile .more){color:#667087}
:root[data-theme="light"] .sidebar .tree-name-section b{color:#343948}
:root[data-theme="light"] :is(.sidebar .nav-item:hover,.sidebar .tree-select:hover,.sidebar .admin-menu-toggle:hover,.sidebar .tree-caret-toggle:hover){background:#e7e1f1;border-color:#d3c6e8;color:#503878;box-shadow:inset 0 1px #fff}
:root[data-theme="light"] :is(.sidebar .nav-item.active,.sidebar .nav-item.active:hover){background:linear-gradient(115deg,#d9cdf0,#eae3f6 70%,#ede8f7);color:#4d347b;border-color:#cbb7e5;box-shadow:inset 0 1px #fff9,inset 2px 0 #8868c3,0 3px 10px #5842740a}
:root[data-theme="light"] :is(.sidebar .tree-select.selected,.sidebar .tree-select.selected:hover){background:linear-gradient(115deg,color-mix(in srgb,var(--category-accent,#a38af6) 23%,#fff),color-mix(in srgb,var(--category-accent,#a38af6) 9%,#f6f4fb));color:#303447;border-color:color-mix(in srgb,var(--category-accent,#a38af6) 48%,#d7d2e1);box-shadow:inset 0 1px #fffa,inset 2px 0 var(--category-accent,#a38af6),0 3px 10px #58427408}
:root[data-theme="light"] :is(.sidebar .nav-item.active .nav-trailing,.sidebar .nav-item.active .count,.sidebar .tree-select.selected .tree-number){color:#594778}
:root[data-theme="light"] .sidebar .accent-count{color:#624595;background:#ded2f2;border-color:#cbb7e5}
:root[data-theme="light"] .sidebar .category-nav{scrollbar-color:#bcb1cc transparent}
:root[data-theme="light"] .sidebar .category-nav .root-divider{border-color:var(--line)}
:root[data-theme="light"] .category-swatch{outline-color:#fff;box-shadow:0 0 0 1px #3332}
:root[data-theme="light"] .sidebar .profile{background:linear-gradient(115deg,#ffffffa8,#ffffff55);border-color:#d4cfe0;box-shadow:inset 0 1px #fff,0 2px 8px #3c325006;color:#33394b}
:root[data-theme="light"] .sidebar .profile:hover{background:#fff;border-color:#c4b5dc;box-shadow:0 3px 12px #3c325010}
:root[data-theme="light"] .sidebar .profile .avatar{background:linear-gradient(145deg,#ddd0f1,#eae3f4);border-color:#d0bfe5;color:#584178}
:root[data-theme="light"] .sidebar .profile .profile-name .profile-affiliation{color:#626b7d}
:root[data-theme="light"] .mobile-nav-backdrop{background:#27253866}

/* Color-managed tags and organisation controls use neutral, readable type. */
:root[data-theme="light"] :is(.meeting-tag,.meeting-tag-chip,.meeting-tag-option,.managed-tag-preview){background:color-mix(in srgb,var(--meeting-tag-color,#c4c6ce) 13%,#fff);border-color:color-mix(in srgb,var(--meeting-tag-color,#c4c6ce) 40%,#d4d8e1);color:color-mix(in srgb,var(--meeting-tag-color,#c4c6ce) 22%,#242735)}
:root[data-theme="light"] :is(.meeting-tag:hover,.meeting-tag-chip:hover,.meeting-tag-option:hover){background:color-mix(in srgb,var(--meeting-tag-color,#c4c6ce) 23%,#fff);color:#242735}
:root[data-theme="light"] .meeting-tag-option:has(input:checked){background:color-mix(in srgb,var(--meeting-tag-color,#c4c6ce) 26%,#fff);border-color:color-mix(in srgb,var(--meeting-tag-color,#c4c6ce) 65%,#747c90);color:#242735;box-shadow:inset 0 0 0 1px #24273518}
:root[data-theme="light"] :is(.affiliation-tag,.scope-tag,.cat-chip){color:#594479;background:#f0eafa;border-color:#d8cbea}
:root[data-theme="light"] .cat-chip[style*="--category-accent"]{color:color-mix(in srgb,var(--category-accent) 25%,#242735);background:color-mix(in srgb,var(--category-accent) 10%,#fff);border-color:color-mix(in srgb,var(--category-accent) 42%,#d4d8e1)}
:root[data-theme="light"] .affiliation-option{color:var(--soft);border-color:var(--line)}
:root[data-theme="light"] :is(.affiliation-option[data-depth="0"],.affiliation-option.has-children){color:var(--text)}
:root[data-theme="light"] .affiliation-option:hover{background:var(--theme-subtle)}
:root[data-theme="light"] :is(.affiliation-option .org-tree-branch,.category-parent-label>span,.category-drag-handle){color:#6d598d}
:root[data-theme="light"] .category-drag-handle:hover{color:var(--theme-accent);background:var(--theme-hover)}
:root[data-theme="light"] .category-root-dropzone{color:var(--theme-accent);background:#f3eefb;border-color:#b8a4d8}
:root[data-theme="light"] .category-root-dropzone.active{background:#e6dbf5;color:#4e357d;border-color:#9674c3}
:root[data-theme="light"] :is(.category-parent-row,.tag-manager-row,.user-table td){border-color:var(--line)}
:root[data-theme="light"] .category-admin-section{border-bottom-color:var(--line)}
:root[data-theme="light"] :is(.category-parent-row.drop-inside,.category-parent-row.drop-before,.category-parent-row.drop-after){background:#eee6fa}
:root[data-theme="light"] :is(.user-table th,.admin-page-view .user-table th){color:var(--muted);background:#eef0f6;border-color:var(--line)}
:root[data-theme="light"] .user-table-wrap{scrollbar-color:#b5adca #eef0f6}
:root[data-theme="light"] .admin-table-search{background:var(--theme-surface);border-color:var(--line)}
:root[data-theme="light"] :is(.status-chip,.demo-pill,.local-affiliation-tag){background:#fff3d8;color:var(--amber);border-color:#dec692}
:root[data-theme="light"] .status-chip.done{color:var(--green);background:#e7f4ed;border-color:#bddbc9}
:root[data-theme="light"] .connection-notice{color:#785316;background:#fff5df;border-color:#e1c58d}
:root[data-theme="light"] .work-notice-icon{background:#eee6fa;color:var(--theme-accent)}
:root[data-theme="light"] .publication-workspace{background:var(--theme-surface);color:var(--text)}
:root[data-theme="light"] .publication-workspace p{color:var(--soft)}
:root[data-theme="light"] :is(.publication-workspace a,.publication-private-label){color:var(--theme-accent)}

@media(prefers-reduced-motion:reduce){.theme-toggle-button *{transition:none!important}}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more){:root[data-theme="light"] :is(.sidebar,.topbar){background:#f6f4fb;backdrop-filter:none;-webkit-backdrop-filter:none}}
@media(forced-colors:active){.theme-toggle-button svg{forced-color-adjust:none}.theme-toggle-button{outline:1px solid CanvasText}:root[data-theme="light"] :is(.sidebar,.topbar,.drawer){background:Canvas;color:CanvasText;border-color:CanvasText;box-shadow:none}}
