:root {
  color-scheme: light;
  --theme-canvas: light-dark(#f8fafc, #111827);
  --theme-panel: light-dark(#ffffff, #182235);
  --theme-raised: light-dark(#f1f5f9, #202d43);
  --theme-hover: light-dark(#e2e8f0, #27364e);
  --theme-line: light-dark(#e2e8f0, #384960);
  --theme-line-strong: light-dark(#cbd5e1, #51637e);
  --theme-ink: light-dark(#0f172a, #eef3fc);
  --theme-secondary: light-dark(#475569, #cad5e6);
  --theme-muted: light-dark(#58677d, #a8b8cf);
  --theme-blue: light-dark(#2563eb, #9ebdff);
  --theme-green: light-dark(#087762, #87dec0);
  --theme-amber: light-dark(#875600, #ffce81);
  --theme-red: light-dark(#a32940, #ff9cae);
  --theme-blue-soft: light-dark(#eff6ff, #223655);
  --theme-green-soft: light-dark(#ecfdf5, #1b3839);
  --theme-amber-soft: light-dark(#fffbeb, #3d3328);
  --theme-red-soft: light-dark(#fff1f2, #402b3c);
  --theme-violet-soft: light-dark(#f5f3ff, #302c50);
}

:root[data-theme='dark'] {
  color-scheme: dark;
}

.schedora-theme-toggle {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  min-height: 2.5rem;
  padding: 0;
  border: 1px solid var(--theme-line);
  border-radius: .625rem;
  background: var(--theme-panel);
  color: var(--theme-secondary);
  cursor: pointer;
}

.schedora-theme-toggle:hover {
  color: var(--theme-blue);
  background: var(--theme-blue-soft);
}

.schedora-theme-toggle:focus-visible {
  outline: 2px solid var(--theme-blue);
  outline-offset: 2px;
}

.schedora-theme-toggle svg {
  width: 1.125rem;
  height: 1.125rem;
}

.schedora-theme-toggle .theme-sun,
:root[data-theme='dark'] .schedora-theme-toggle .theme-moon {
  display: none;
}

:root[data-theme='dark'] .schedora-theme-toggle .theme-sun {
  display: block;
}

/* Text in the existing transparent logo is dark navy. Keep brand artwork legible. */
:root[data-theme='dark'] img:is([src='/schedora-logo.png'], [src='/schedora-horizontal-large.png']):not(.invert) {
  background-color: #f8fafc;
  border-radius: .375rem;
  padding: .125rem .375rem;
}

:root[data-theme='dark'] img[src='/menu.svg'] {
  filter: invert(1);
}
