/* Shared theme tokens + chrome used by index + privacy. Keep product one-offs in page.css. */

html[data-theme="dark"],
html:not([data-theme]) {
  color-scheme: dark;
  --bg: linear-gradient(160deg, #2f2d2a 0%, #272523 55%, #1f1d1b 100%);
  --bg-flat: #272523;
  --text: #f3f0e8;
  --muted: #bdb7aa;
  --faint: #8d877b;
  --surface: #35322e;
  --surface-2: #242220;
  --line: #47433d;
  --accent: #dcb44c;
  --accent-text: #d9b552;
  --accent-grad: linear-gradient(90deg, #c9992c, #f3d98b);
  --on-accent: #2a2410;
  --clip: linear-gradient(180deg, #bf9632, #9c7826);
  --clip-line: rgba(40, 25, 0, 0.4);
  --wave: #f4dd9c;
  --clip-text: #fff6dc;
  --ring: #9cc0ff;
  --ring-soft: rgba(156, 192, 255, 0.18);
  --track: #1d1b19;
  --knob: radial-gradient(circle at 35% 30%, #f6dc8a, #c9992c 70%);
  --logo: linear-gradient(90deg, #e8b330, #c9b25c 50%, #9a978f);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.18);
  --theme-knob-left: 3px;
  --theme-L: 0.8;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: linear-gradient(160deg, #f7f8fc 0%, #eef1f7 55%, #e5e9f2 100%);
  --bg-flat: #eef1f7;
  --text: #121a33;
  --muted: #545d73;
  --faint: #8a92a6;
  --surface: #ffffff;
  --surface-2: #f4f6fa;
  --line: #dde2ec;
  --accent: #2d5be3;
  --accent-text: #2346c9;
  --accent-grad: linear-gradient(90deg, #1c42b5, #3f86f0);
  --on-accent: #f5f8ff;
  --clip: linear-gradient(180deg, #2f60e2, #2147c2);
  --clip-line: rgba(10, 25, 80, 0.35);
  --wave: #a9c4ff;
  --clip-text: #eef3ff;
  --ring: #1d5fe0;
  --ring-soft: rgba(29, 95, 224, 0.15);
  --track: #eef1f7;
  --knob: radial-gradient(circle at 35% 30%, #6c9bff, #1f4fd6 70%);
  --logo: linear-gradient(90deg, #6fb86a, #3a9d93 45%, #2c4c86);
  --shadow: 0 1px 2px rgba(18, 26, 51, 0.06), 0 8px 24px rgba(18, 26, 51, 0.06);
  --theme-knob-left: 31px;
  --theme-L: 0.55;
}

html {
  background: var(--bg-flat);
  scrollbar-color: var(--line) var(--bg-flat);
}

body {
  margin: 0;
  background: var(--bg-flat);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s;
}

html::-webkit-scrollbar {
  width: 10px;
}

html::-webkit-scrollbar-track {
  background: var(--bg-flat);
}

html::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 8px;
}

image-slot[data-thumb]::part(empty) {
  display: none;
}

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

a:hover {
  color: var(--text);
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.site-header {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  pointer-events: none;
}

.brand {
  font-family: 'Lexend Exa', sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.32em;
  background: var(--logo);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.theme-toggle {
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 18px 4px 4px;
  border-radius: 999px;
  border: 2px solid var(--ring);
  background: var(--surface);
  color: var(--text);
  font-family: 'Lexend Exa', sans-serif;
  font-size: 13px;
  letter-spacing: 0.14em;
  transition: background 0.4s, border-color 0.4s;
}

.theme-toggle:hover {
  box-shadow: 0 0 0 4px var(--ring-soft);
}

.theme-track {
  position: relative;
  display: block;
  width: 58px;
  height: 30px;
  border-radius: 999px;
  background: var(--track);
  box-shadow: inset 0 0 0 1px var(--line);
}

.theme-knob {
  position: absolute;
  top: 3px;
  left: var(--theme-knob-left);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--knob);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: left 0.35s cubic-bezier(0.6, 0, 0.2, 1);
}

.theme-label {
  min-width: 44px;
  text-align: left;
}
