html {
  background: var(--kb-bg-main);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--kb-font-sans);
  color: var(--kb-text-main);
  background: var(--kb-bg-main);
}

.forum-app,
.admin-app {
  color: var(--kb-text-main);
  background: var(--kb-bg-main);
  color-scheme: light;
}

.forum-app.is-dark,
.admin-app.is-dark {
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

a {
  color: var(--forum-accent, var(--kb-blue));
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--forum-border);
  border-radius: 999px;
  background: var(--forum-bg-surface);
  color: var(--forum-text);
  box-shadow: var(--forum-shadow);
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  text-decoration: none;
  transform: translateY(-1px);
}

.theme-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--forum-accent-soft), var(--forum-highlight-soft-2));
  color: var(--forum-text);
  font-size: 1rem;
  flex-shrink: 0;
}

.theme-toggle__copy {
  display: grid;
  gap: 0.05rem;
  text-align: left;
}

.theme-toggle__label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--forum-text);
}

.theme-toggle__meta {
  font-size: 0.72rem;
  color: var(--forum-text-muted);
}

.theme-toggle--floating {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 40;
}

@media (max-width: 720px) {
  .theme-toggle__meta {
    display: none;
  }

  .theme-toggle--floating {
    top: 0.8rem;
    right: 0.8rem;
  }
}