/* Shared look for the Vallaera Stocks and Feedback pages (matches the wiki theme). */
:root {
  --bg: #ffffff;
  --panel: #f7f8fa;
  --panel-2: #f1f3f8;
  --border: #e4e7ee;
  --text: #1a1d26;
  --muted: #6b7384;
  --accent: hsl(258 65% 48%);
  --accent-soft: hsl(258 80% 55% / 0.09);
  --up: #14935f;
  --down: #d6384a;
  --hover: rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 10px 30px rgba(0, 0, 0, 0.1);
  --radius: 14px;
  color-scheme: light;
}

:root[saved-theme="dark"] {
  --bg: #181b21;
  --panel: #14171c;
  --panel-2: #1f232b;
  --border: #2c313c;
  --text: #e6e8ee;
  --muted: #8a92a3;
  --accent: hsl(258 90% 74%);
  --accent-soft: hsl(258 90% 65% / 0.12);
  --up: #3ecf8e;
  --down: #f0616d;
  --hover: rgba(255, 255, 255, 0.06);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 2.5rem);
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 50;
}

.site-switcher {
  position: relative;
}

.site-switcher-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  padding: 4px 8px;
  margin-left: -8px;
  border-radius: 0;
  cursor: pointer;
}

.site-switcher-btn:hover {
  background: var(--hover);
}

.site-switcher-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}

.site-switcher.open .site-switcher-btn svg {
  transform: rotate(180deg);
}

.site-switcher-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--muted);
  border-radius: 0;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.25);
  z-index: 300;
}

.site-switcher-menu[hidden] {
  display: none;
}

.site-switcher-menu li {
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.site-switcher-menu li:last-child {
  border-bottom: none;
}

.site-switcher-menu a {
  display: block;
  padding: 11px 16px;
  border-radius: 0;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.site-switcher-menu a:hover {
  background: var(--hover);
}

.site-switcher-menu a[aria-current="page"] {
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}
/* ---------- Theme switch ---------- */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
}

.theme-switch svg {
  width: 16px;
  height: 16px;
}

.theme-switch .switch {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: var(--border);
  border: 1px solid var(--muted);
}

.theme-switch .knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 0.2s ease;
}

:root[saved-theme="dark"] .theme-switch .knob {
  transform: translateX(14px);
}

/* ---------- Page ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 3vw, 2.5rem) 3rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 0.5rem;
  display: inline-block;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 0.25em;
}

.lead {
  color: var(--muted);
  margin: 0.75rem 0 2rem;
  line-height: 1.6;
}

footer.page-foot {
  padding: 0 clamp(1rem, 3vw, 2.5rem) 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 800px) {
  h1 {
    font-size: 1.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
