:root {
  --bg: #0b1020;
  --bg2: #0e1428;
  --surface: #161d33;
  --surface2: #1e2742;
  --line: #2a3354;
  --text: #eef2ff;
  --muted: #8e97b5;
  --lime: #ccff00;
  --green: #18d98a;
  --radius: 18px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body.legal-page {
  font-family: 'Outfit', system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(204, 255, 0, 0.1), transparent 60%),
    radial-gradient(900px 500px at 100% 110%, rgba(24, 217, 138, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.legal-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 72px,
    rgba(255, 255, 255, 0.014) 72px 144px
  );
}

#legal-root {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
}

.legal-shell {
  background: linear-gradient(180deg, var(--surface), var(--bg2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px 22px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8);
}

.legal-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.legal-header-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 12px;
  font-weight: 600;
}

.legal-nav a {
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.legal-nav a:hover,
.legal-nav a.is-active {
  color: var(--lime);
}

.legal-nav a.is-active {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-nav a:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
  border-radius: 4px;
}

.legal-brand {
  display: inline-block;
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  font-size: clamp(28px, 7vw, 36px);
  line-height: 0.95;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.02em;
}

.legal-brand .pop {
  color: var(--lime);
}

.legal-brand:hover {
  filter: brightness(1.06);
}

.legal-brand:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 4px;
  border-radius: 6px;
}

.legal-content h1.legal-title {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  font-size: clamp(22px, 5.5vw, 28px);
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0 0 8px;
  color: var(--text);
}

.legal-meta {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.legal-content h2 {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
  font-weight: 700;
  margin: 1.75rem 0 0.65rem;
}

.legal-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.25rem 0 0.45rem;
}

.legal-content p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0.65rem 0;
}

.legal-content a {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.legal-content ul,
.legal-content ol {
  padding-left: 1.25em;
  margin: 0.5em 0 1em;
  color: var(--muted);
  font-size: 14px;
}

.legal-content li {
  margin: 0.4em 0;
}

.legal-content li::marker {
  color: var(--lime);
}

.legal-content code {
  font-size: 0.92em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--surface2);
  border: 1px solid var(--line);
  color: var(--text);
}

.legal-content strong {
  color: var(--text);
  font-weight: 600;
}

.how-step {
  margin: 1em 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.how-step strong {
  display: block;
  margin-bottom: 0.35em;
  color: var(--text);
}

.legal-shell .site-foot {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.legal-shell .site-foot-links {
  font-size: 12px;
  margin-bottom: 6px;
}

.legal-shell .site-foot-links a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-shell .site-foot-links a:hover,
.legal-shell .site-foot-links a.is-active {
  color: var(--text);
}

.legal-shell .site-foot-links a.is-active {
  font-weight: 600;
  text-decoration: none;
}

.legal-shell .site-foot-copy {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 4px;
}

.legal-shell .site-foot-disc {
  font-size: 10px;
  line-height: 1.45;
  color: var(--muted);
  opacity: 0.9;
  margin: 0;
  max-width: 36rem;
  margin-inline: auto;
}

.legal-back {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.legal-back a {
  color: var(--lime);
  text-decoration: none;
}

.legal-back a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-back a:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 430px) {
  .legal-shell {
    padding: 20px 16px;
  }
}

/* Cookie / AdSense consent (shared with quiz app) */
.cookie-consent {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 200;
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.cookie-consent.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.cookie-consent-text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  margin: 0 0 12px;
}

.cookie-consent-text a {
  color: var(--lime);
}

.cookie-consent-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.cookie-btn {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
  background: var(--lime);
  color: #0a0e18;
}

.cookie-btn--ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}
