:root {
  --bg: #0b0c10;
  --card: #16181d;
  --text: #e6e8ee;
  --muted: #a0a7b4;
  --accent: #5aa9ff;
  --border: #262a33;
  --link: #79b8ff;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --header-h: 72px;
}

:root[data-theme="light"] {
  --bg: #f7f7fb;
  --card: #ffffff;
  --text: #0c1222;
  --muted: #5a6475;
  --accent: #155eef;
  --border: #e8eaf1;
  --link: #155eef;
  --shadow: 0 8px 24px rgba(16, 24, 40, .08);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f7f7fb;
    --card: #ffffff;
    --text: #0c1222;
    --muted: #5a6475;
    --accent: #155eef;
    --border: #e8eaf1;
    --link: #155eef;
    --shadow: 0 8px 24px rgba(16, 24, 40, .08);
  }
}

@media (max-width: 700px) {
  :root { --header-h: 96px; }
}

* { box-sizing: border-box; }

html {
  scroll-padding-top: var(--header-h);
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: linear-gradient(180deg, var(--bg), color-mix(in oklab, var(--bg) 85%, #000));
  color: var(--text);
  line-height: 1.55;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.hr {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(160%) blur(8px);
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: block;
}

.brand span {
  letter-spacing: .2px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow);
  user-select: none;
  font-size: 14px;
}

.toggle input {
  appearance: none;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  outline: none;
  cursor: pointer;
}

.toggle input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text);
  transition: transform .2s ease;
}

.toggle input:checked {
  background: color-mix(in oklab, var(--accent) 75%, var(--border));
}

.toggle input:checked::after {
  transform: translateX(16px);
}

@media (max-width: 700px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
  }

  .brand {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
}

/* Page and content cards */
.page-hero { padding: 32px 24px 0; }
.page-hero .title-card {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 16px;
  padding: 18px 20px;
}
.page-hero h1 { margin: 0; font-size: clamp(22px, 2.6vw, 28px); }

section { padding: 24px; }
.section-card {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 18px;
  padding: 24px;
}

/* Footer */
.footer {
  text-align: center;
  color: var(--muted);
  padding: 40px 24px 60px;
}

.legal-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  line-height: 1.6;
}

@media (min-width: 700px) {
  .legal-links { font-size: 18px; }
}

.legal-links .sep {
  opacity: 0.6;
}