/* Canonical light/dark color contract for the Dodecahedron Tutor shell. */
:root[data-theme="dark"]{
  color-scheme:dark;
  --dodeca-shell-bg:#0d0a1f;
  --dodeca-shell-surface:#17112c;
  --dodeca-shell-surface-raised:#211936;
  --dodeca-shell-soft:#2a2041;
  --dodeca-shell-text:#f7f3ff;
  --dodeca-shell-muted:#aaa2ba;
  --dodeca-shell-line:rgba(255,255,255,.13);
  --dodeca-shell-shadow:0 22px 55px rgba(3,2,12,.52);
  --bg:var(--dodeca-shell-bg);
  --panel:var(--dodeca-shell-surface);
  --panel-alt:var(--dodeca-shell-surface-raised);
  --text:var(--dodeca-shell-text);
  --muted:var(--dodeca-shell-muted);
  --line:var(--dodeca-shell-line);
  --accent:rgba(255,143,171,.14);
}

:root[data-theme="light"]{
  color-scheme:light;
  --dodeca-shell-bg:#f5f3f8;
  --dodeca-shell-surface:#ffffff;
  --dodeca-shell-surface-raised:#fcf9fd;
  --dodeca-shell-soft:#f5edf4;
  --dodeca-shell-text:#251d30;
  --dodeca-shell-muted:#6e6578;
  --dodeca-shell-line:#ded8e4;
  --dodeca-shell-shadow:0 22px 55px rgba(57,38,70,.16);
  --kairos-bg:var(--dodeca-shell-bg);
  --kairos-bg-deep:#eeeaf2;
  --kairos-text:var(--dodeca-shell-text);
  --kairos-muted:var(--dodeca-shell-muted);
  --kairos-border:var(--dodeca-shell-line);
  --kairos-glass:rgba(255,255,255,.76);
  --bg:var(--dodeca-shell-bg);
  --panel:var(--dodeca-shell-surface);
  --panel-alt:var(--dodeca-shell-surface-raised);
  --text:var(--dodeca-shell-text);
  --muted:var(--dodeca-shell-muted);
  --line:var(--dodeca-shell-line);
  --accent:#fae8ef;
}

:root[data-theme="light"] body{
  background:radial-gradient(circle at 82% 0,rgba(255,143,171,.12),transparent 30%),linear-gradient(180deg,#faf8fb,#f1edf5) fixed!important;
  color:var(--dodeca-shell-text)!important;
}

:root[data-theme="dark"] body{
  background:radial-gradient(120% 120% at 50% 0,#1a1236 0,#0d0a1f 55%,#070511 100%) fixed!important;
}

/* Notification bell: visible icon, bounded badge and theme-correct states. */
.topbar .kairos-notif-trigger{
  display:grid;
  place-items:center;
  color:var(--dodeca-shell-text)!important;
  background:var(--dodeca-shell-surface-raised)!important;
  border-color:var(--dodeca-shell-line)!important;
  box-shadow:0 7px 18px rgba(31,20,42,.09),inset 0 1px 0 rgba(255,255,255,.08);
}
.topbar .kairos-notif-trigger svg{display:block;color:currentColor;stroke:currentColor}
.topbar .kairos-notif-trigger:hover{color:#ff8fab!important;background:var(--dodeca-shell-soft)!important;border-color:rgba(255,143,171,.5)!important}
.topbar .kairos-notif-badge{background:#ff8fab!important;color:#2b0a14!important;border:2px solid var(--dodeca-shell-surface)!important;box-shadow:0 5px 14px rgba(164,56,97,.28)!important}

/* Both dropdowns consume the same surface contract; no white-on-white or
   dark-text-on-dark-surface combinations are permitted. */
.topbar :is(.kairos-notif-dropdown,.kairos-user-dropdown){
  background:var(--dodeca-shell-surface)!important;
  border-color:var(--dodeca-shell-line)!important;
  color:var(--dodeca-shell-text)!important;
  box-shadow:var(--dodeca-shell-shadow)!important;
}
.topbar :is(.kairos-notif-header,.kairos-notif-filters,.kairos-notif-list,.kairos-notif-footer,.kairos-user-menu-header,.kairos-user-menu-list){background:var(--dodeca-shell-surface)!important;border-color:var(--dodeca-shell-line)!important}
.topbar :is(.kairos-notif-title,.kairos-notif-item-title,.kairos-notif-empty h4,.kairos-user-menu-name,.kairos-user-menu-item){color:var(--dodeca-shell-text)!important}
.topbar :is(.kairos-notif-eyebrow,.kairos-notif-time,.kairos-notif-item-body,.kairos-notif-empty p,.kairos-user-menu-role,.kairos-user-menu-item.muted){color:var(--dodeca-shell-muted)!important}
.topbar .kairos-notif-item{background:var(--dodeca-shell-surface)!important;border-color:var(--dodeca-shell-line)!important}
.topbar .kairos-notif-item:hover,.topbar .kairos-user-menu-item:hover{background:var(--dodeca-shell-soft)!important}
.topbar .kairos-notif-item.unread{background:color-mix(in srgb,#ff8fab 10%,var(--dodeca-shell-surface))!important}
.topbar .kairos-filter-chip{background:var(--dodeca-shell-soft)!important;border-color:var(--dodeca-shell-line)!important;color:var(--dodeca-shell-muted)!important}
.topbar .kairos-filter-chip.active{background:color-mix(in srgb,#ff8fab 18%,var(--dodeca-shell-surface))!important;border-color:rgba(164,56,97,.35)!important;color:#b33f68!important}
:root[data-theme="dark"] .topbar .kairos-filter-chip.active{color:#ffb3c7!important}
.topbar .kairos-user-menu-divider{background:var(--dodeca-shell-line)!important}
.topbar .kairos-user-menu-item.logout{color:#d94b62!important}
:root[data-theme="dark"] .topbar .kairos-user-menu-item.logout{color:#ff9aa9!important}
.topbar .kairos-user-box{background:var(--dodeca-shell-surface-raised)!important;border-color:var(--dodeca-shell-line)!important;color:var(--dodeca-shell-text)!important}
.topbar .kairos-user-box:hover{background:var(--dodeca-shell-soft)!important;border-color:rgba(255,143,171,.42)!important}

