/* Schoolbrook Theme System 24.1 — component normalization. No page-specific dark overrides. */
html[data-kourse-resolved="dark"],html.kourse-dark{background:var(--sb-bg)}
body.kourse-shell-active,.schoolbrook-platform-template{background:var(--sb-bg)!important;color:var(--sb-text)!important}
body.kourse-shell-active :where(h1,h2,h3,h4,h5,h6,strong,label,legend),
.sb-platform :where(h1,h2,h3,h4,h5,h6,strong,label,legend){color:var(--sb-text)}
body.kourse-shell-active :where(p,small),.sb-platform :where(p,small){border-color:var(--sb-border)}
.sb-platform{color:var(--sb-text)!important}
.sb-pagehead{border-color:var(--sb-border)!important}.sb-pagehead p{color:var(--sb-text-muted)!important}
.sb-command input,.sb-command select,.sb-command button,.sb-studio input,.sb-studio select,.kui-field,input[type="search"]{background:var(--sb-surface-input)!important;color:var(--sb-text)!important;border-color:var(--sb-border)!important}
.sb-command input::placeholder,.kui-field::placeholder,input[type="search"]::placeholder{color:var(--sb-text-muted)!important;opacity:1}
.sb-empty,.sb-metric-grid article,.sb-table,.sb-tool-grid article,.sb-tool-grid>a,.sb-studio section,.sb-addon-card,.sb-addon-tile,.sb-addon-menu,.kui-card{background:var(--sb-surface)!important;color:var(--sb-text)!important;border-color:var(--sb-border)!important}
.sb-empty-icon,.sb-tool-icon{background:var(--sb-icon-surface)!important;color:var(--sb-icon-text)!important}
.sb-empty p,.sb-tool-grid p,.sb-addon-card p,.sb-addon-tile>p,.sb-addon-sectionhead p,.sb-addon-kicker,.sb-addon-state{color:var(--sb-text-muted)!important}
.sb-addon-tile.is-enabled{border-color:color-mix(in srgb,var(--sb-primary) 35%,var(--sb-border))!important}
.sb-addon-more>summary{color:var(--sb-text);border-color:var(--sb-border)!important;background:var(--sb-surface-raised)}
.sb-addon-menu button,.sb-addon-menu a{color:var(--sb-text)!important}.sb-addon-menu button:hover,.sb-addon-menu a:hover{background:color-mix(in srgb,var(--sb-primary) 10%,var(--sb-surface))!important}
.sb-addon-count{background:color-mix(in srgb,var(--sb-primary) 12%,var(--sb-surface))!important;color:var(--sb-primary)!important}
.sb-primary,.kui-button--primary{color:#fff!important}
.kourse-topbar,.kourse-sidebar{background:color-mix(in srgb,var(--sb-surface) 96%,transparent)!important;border-color:var(--sb-border)!important;color:var(--sb-text)!important}.kourse-brand,.kourse-sidebar a,.kourse-icon-button,.kourse-profile strong{color:var(--sb-text)!important}.kourse-profile small,.kourse-search{color:var(--sb-text-muted)!important}.kourse-search{background:var(--sb-surface-soft)!important}.kourse-search input{color:var(--sb-text)!important}
.sb-context-switch select{background:var(--sb-surface-input)!important;color:var(--sb-text)!important;border-color:var(--sb-border)!important}
/* Native browser controls follow the resolved theme. */
html.kourse-dark :where(input,select,textarea,button){color-scheme:dark}html.kourse-light :where(input,select,textarea,button){color-scheme:light}
.kourse-sidebar{background:#101b3a!important;color:#fff!important}
.kourse-sidebar a,.kourse-sidebar a span,.kourse-sidebar-apps a{color:#fff!important}
.kourse-sidebar-apps p{color:rgba(255,255,255,.62)!important}


/* 56.12.4 — authoritative app-launcher theme treatment */
.sb-launcher-panel{
  width:390px;
  padding:18px;
  background:var(--sb-surface)!important;
  color:var(--sb-text)!important;
  border:1px solid var(--sb-border)!important;
  border-radius:18px;
  box-shadow:0 24px 70px rgba(15,23,42,.22);
}
.sb-launcher-head{
  margin-bottom:14px;
  padding:0 2px 10px;
  border-bottom:1px solid var(--sb-border);
}
.sb-launcher-head strong{
  color:var(--sb-text)!important;
  font-size:14px;
  font-weight:800;
}
.sb-launcher-head a{
  color:var(--sb-primary)!important;
  font-size:12px;
  font-weight:800;
}
.sb-launcher-grid{
  gap:8px;
}
.sb-launcher-grid a{
  min-height:92px;
  padding:12px 8px;
  border:1px solid transparent;
  border-radius:14px;
  color:var(--sb-text)!important;
  transition:background .16s ease,border-color .16s ease,transform .16s ease;
}
.sb-launcher-grid a:hover,
.sb-launcher-grid a:focus-visible{
  background:var(--sb-surface-raised)!important;
  border-color:var(--sb-border)!important;
  transform:translateY(-1px);
  outline:none;
}
.sb-launcher-grid span{
  width:38px;
  height:38px;
  border:1px solid color-mix(in srgb,var(--sb-primary) 20%,var(--sb-border));
  border-radius:11px;
  background:color-mix(in srgb,var(--sb-primary) 10%,var(--sb-surface-raised))!important;
  color:var(--sb-primary)!important;
  font-size:17px;
  font-weight:800;
  box-shadow:none;
}
.sb-launcher-grid b{
  color:var(--sb-text)!important;
  font-size:12px;
  font-weight:750;
  line-height:1.25;
}

/* Dark mode: keep every app tile distinct and every glyph readable. */
html[data-kourse-resolved="dark"] .sb-launcher-panel,
html.kourse-dark .sb-launcher-panel{
  background:color-mix(in srgb,var(--sb-surface) 94%,#071225)!important;
  border-color:color-mix(in srgb,var(--sb-border) 82%,#fff 18%)!important;
  box-shadow:0 28px 80px rgba(0,0,0,.42);
}
html[data-kourse-resolved="dark"] .sb-launcher-grid a:hover,
html[data-kourse-resolved="dark"] .sb-launcher-grid a:focus-visible,
html.kourse-dark .sb-launcher-grid a:hover,
html.kourse-dark .sb-launcher-grid a:focus-visible{
  background:color-mix(in srgb,var(--sb-primary) 10%,var(--sb-surface-raised))!important;
  border-color:color-mix(in srgb,var(--sb-primary) 24%,var(--sb-border))!important;
}
html[data-kourse-resolved="dark"] .sb-launcher-grid span,
html.kourse-dark .sb-launcher-grid span{
  background:color-mix(in srgb,var(--sb-primary) 16%,var(--sb-surface-raised))!important;
  border-color:color-mix(in srgb,var(--sb-primary) 34%,var(--sb-border))!important;
  color:color-mix(in srgb,var(--sb-primary) 76%,#fff 24%)!important;
}

.sb-app-visibility,.sb-visibility-table{background:var(--sb-surface)!important;color:var(--sb-text)!important;border-color:var(--sb-border)!important}.sb-visibility-row{border-color:var(--sb-border)!important}.sb-visibility-head{background:var(--sb-surface-raised)!important}.sb-app-visibility-actions>span{color:var(--sb-text-muted)!important}
