/* ===== Legal pages ===== */
body { background: #0E1014; color: #E9ECEE; font-family: 'Space Grotesk', system-ui, sans-serif; margin: 0; }

.legal-page { min-height: 100vh; display: flex; flex-direction: column; }

.legal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid #262C36;
  background: #15181F;
}
.legal-back {
  color: #9097A1;
  text-decoration: none;
  font-size: 14px;
  font-family: 'JetBrains Mono', monospace;
}
.legal-back:hover { color: #7CFC9B; }
.legal-brand { display: flex; align-items: center; gap: 10px; }
.legal-brand img { width: 24px; height: 24px; border-radius: 5px; }
.legal-brand b { font-family: 'JetBrains Mono', monospace; }

.legal-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 28px 80px;
  flex: 1;
  width: 100%;
}
.legal-main h1 {
  font-size: 44px;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  font-weight: 700;
}
.legal-updated {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #9097A1;
  margin: 0 0 40px;
}
.legal-main section { margin-bottom: 32px; }
.legal-main h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #262C36;
}
.legal-main p { line-height: 1.65; color: #E9ECEE; margin: 0 0 14px; }
.legal-main ul { line-height: 1.7; padding-left: 20px; }
.legal-main li { margin-bottom: 6px; }
.legal-main a { color: #7CFC9B; }
.legal-main code {
  font-family: 'JetBrains Mono', monospace;
  background: #1B1F28;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}
.legal-main kbd {
  font-family: 'JetBrains Mono', monospace;
  background: #1B1F28;
  border: 1px solid #262C36;
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 12px;
}
.legal-disclaimer {
  background: #1B1F28;
  border: 1px solid #262C36;
  border-left: 3px solid #FFB84D;
  border-radius: 8px;
  padding: 18px 22px;
}
.legal-disclaimer h2 { border-bottom: 0; padding-bottom: 0; margin-bottom: 8px; font-size: 18px; }

/* ===== Modern Footer ===== */
.site-footer {
  background: #0a0d12;
  border-top: 1px solid #262C36;
  padding: 40px 28px 24px;
  margin-top: auto;
  color: #9097A1;
}
.site-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
}
.site-footer-brand {
  display: flex; align-items: center; gap: 12px;
}
.site-footer-brand img { width: 36px; height: 36px; border-radius: 8px; }
.site-footer-brand b {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  color: #E9ECEE;
  display: block;
}
.site-footer-brand small {
  font-size: 12px;
  color: #9097A1;
  display: block;
  margin-top: 2px;
}
.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}
.site-footer-links a {
  color: #9097A1;
  text-decoration: none;
  font-size: 13px;
  transition: 0.15s;
}
.site-footer-links a:hover { color: #7CFC9B; }
.site-footer-bottom {
  max-width: 1320px;
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid #262C36;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #6b7280;
}
.site-footer-bottom .disclaimer { max-width: 640px; line-height: 1.5; }

.contrast-toggle {
  background: #1B1F28;
  color: #E9ECEE;
  border: 1px solid #262C36;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  cursor: pointer;
  transition: 0.15s;
}
.contrast-toggle:hover { border-color: #7CFC9B; color: #7CFC9B; }
.contrast-toggle[aria-pressed="true"] { background: #7CFC9B; color: #0E1014; border-color: #7CFC9B; }

/* ===== Cookie banner ===== */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 9999;
  background: #15181F;
  border: 1px solid #262C36;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  color: #E9ECEE;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  animation: cookieIn 0.3s ease-out;
}
@keyframes cookieIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}
.cookie-banner-text b { display: block; font-size: 14px; margin-bottom: 4px; }
.cookie-banner-text p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #9097A1;
  max-width: 720px;
}
.cookie-banner-text a { color: #7CFC9B; }
.cookie-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #262C36;
  transition: 0.15s;
}
.cookie-btn-decline {
  background: transparent;
  color: #9097A1;
}
.cookie-btn-decline:hover { color: #E9ECEE; border-color: #9097A1; }
.cookie-btn-accept {
  background: #7CFC9B;
  color: #0E1014;
  border-color: #7CFC9B;
}
.cookie-btn-accept:hover { box-shadow: 0 4px 16px rgba(124,252,155,0.35); }

@media (max-width: 700px) {
  .cookie-banner-inner { grid-template-columns: 1fr; }
  .cookie-banner-actions { justify-content: flex-end; }
}

@media (max-width: 700px) {
  .site-footer-inner { grid-template-columns: 1fr; }
  .legal-main h1 { font-size: 32px; }
}

/* ===== High Contrast mode ===== */
html.high-contrast,
html.high-contrast body {
  background: #000 !important;
  color: #fff !important;
}
html.high-contrast a { color: #ffff00 !important; text-decoration: underline !important; }
html.high-contrast .card,
html.high-contrast .hero,
html.high-contrast .side-block,
html.high-contrast .mod-hero,
html.high-contrast .mod-main,
html.high-contrast .results-bar,
html.high-contrast .legal-disclaimer,
html.high-contrast .site-footer,
html.high-contrast .legal-header {
  background: #000 !important;
  color: #fff !important;
  border: 2px solid #fff !important;
}
html.high-contrast .btn-primary { background: #ffff00 !important; color: #000 !important; border: 2px solid #fff !important; }
html.high-contrast .meta-pill,
html.high-contrast .chip,
html.high-contrast kbd,
html.high-contrast code {
  background: #000 !important;
  color: #fff !important;
  border: 1px solid #fff !important;
}
html.high-contrast h1,
html.high-contrast h2,
html.high-contrast h3,
html.high-contrast p,
html.high-contrast li,
html.high-contrast b,
html.high-contrast small {
  color: #fff !important;
}
html.high-contrast button:focus,
html.high-contrast a:focus,
html.high-contrast input:focus {
  outline: 3px solid #ffff00 !important;
  outline-offset: 2px !important;
}
