:root {
  color-scheme: light;
  --site-bg: #F8FAFC;
  --site-surface: #FFFFFF;
  --site-ink: #18181B;
  --site-muted: #52525B;
  --site-line: #DDE1E7;
  --site-control-line: #7D8795;
  --site-soft: #EEF2F7;
  --site-accent: #2563EB;
  --site-on-accent: #FFFFFF;
  --site-accent-soft: #EAF0FF;
  --site-accent-line: #B7CAFF;
  --site-danger: #B42318;
  --site-shadow: #18181B0D;
  --site-backdrop: #111214A6;
  --theme-color: var(--site-bg);
  --page-gutter: clamp(1rem, 2.5vw, 3rem);
  --layout-gap: clamp(1rem, 2.5vw, 3rem);
  --text-measure: 68ch;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --site-bg: #111214;
  --site-surface: #1B1D21;
  --site-ink: #F4F4F5;
  --site-muted: #A1A1AA;
  --site-line: #34373D;
  --site-control-line: #717784;
  --site-soft: #25282F;
  --site-accent: #93B4FF;
  --site-on-accent: #111214;
  --site-accent-soft: #202D49;
  --site-accent-line: #526EAD;
  --site-danger: #FDA4AF;
  --site-shadow: #00000033;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --site-bg: #111214;
    --site-surface: #1B1D21;
    --site-ink: #F4F4F5;
    --site-muted: #A1A1AA;
    --site-line: #34373D;
    --site-control-line: #717784;
    --site-soft: #25282F;
    --site-accent: #93B4FF;
    --site-on-accent: #111214;
    --site-accent-soft: #202D49;
    --site-accent-line: #526EAD;
    --site-danger: #FDA4AF;
    --site-shadow: #00000033;
  }
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  border-radius: 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: color-mix(in srgb, currentColor 7%, transparent); }
.theme-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-icon-sun { display: block; }
.site-header-actions { display: flex; align-items: center; justify-content: end; gap: clamp(.5rem, 1.2vw, 1.25rem); min-width: 0; }
.page-heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.expense-topbar-end { align-items: center; margin-left: auto; }
.learn-topbar-actions { display: flex; align-items: center; gap: .85rem; }
@media (max-width: 400px) {
  .site-header-actions { gap: .35rem; }
  .site-header nav a { padding-inline: .55rem; }
  .learn-topbar-actions { gap: .5rem; }
}
@media (max-width: 360px) {
  .site-header { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: .5rem 1rem; }
  .site-header-actions { display: contents; }
  .site-header .wordmark { grid-column: 1; grid-row: 1; }
  .site-header .theme-toggle { grid-column: 2; grid-row: 1; }
  .site-header nav { grid-column: 1 / -1; grid-row: 2; }
}
@media print {
  :root, :root[data-theme] { color-scheme: light !important; --site-bg: #FFFFFF; --site-surface: #FFFFFF; --site-ink: #18181B; --site-muted: #52525B; --site-line: #DDE1E7; --site-accent: #2563EB; --site-on-accent: #FFFFFF; }
  .theme-toggle { display: none !important; }
}
