/* ============================================================
   GSDResponse — legal.css
   Shared stylesheet for privacy.html and terms-of-service.html
   DARK theme · near-black canvas · safety orange accent
   ============================================================ */

.legal-page {
  background-color: #0E0F13;
  color: #ECEEF2;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  background-color: #0E0F13;
  color: #ECEEF2;
}

h1, h2, h3, h4 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  line-height: 1.2;
  color: #ECEEF2;
}

a {
  color: #FB923C;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #F97316;
}

p {
  color: #B7BEC9;
}

.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Legal header ---------- */
.legal-header {
  background: linear-gradient(180deg, #1A1C22 0%, #0E0F13 100%);
  border-bottom: 1px solid #262A33;
  padding: 72px 0 48px;
  text-align: center;
}

.legal-eyebrow {
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 13px;
  color: #FB923C;
  margin-bottom: 14px;
}

.legal-header h1 {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 14px;
}

.legal-updated {
  font-size: 15px;
  color: #9BA3B0;
  margin-bottom: 26px;
}

.legal-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #F97316;
  color: #1A0E02;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.legal-home:hover {
  background: #EA580C;
  color: #1A0E02;
}

/* ---------- Table of contents ---------- */
.toc {
  background: #15161B;
  border-bottom: 1px solid #262A33;
  padding: 40px 0;
}

.toc h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #FB923C;
  margin-bottom: 20px;
}

.toc ol {
  list-style: none;
  counter-reset: toc;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 32px;
}

.toc ol li {
  counter-increment: toc;
}

.toc ol a {
  display: flex;
  gap: 12px;
  color: #B7BEC9;
  font-size: 15px;
  padding: 6px 0;
  border-bottom: 1px solid #20242C;
}

.toc ol a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: "JetBrains Mono", monospace;
  color: #F97316;
  font-weight: 600;
}

.toc ol a:hover {
  color: #FB923C;
}

/* ---------- Legal content ---------- */
.legal-content {
  padding: 64px 0 24px;
}

/* Scope isolation: never let a section inherit a background */
.legal-page .legal-content section {
  background-color: transparent !important;
}

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

.legal-container section {
  padding: 40px 0;
  border-bottom: 1px solid #20242C;
}

.legal-container section:last-child {
  border-bottom: none;
}

.legal-container h2 {
  font-size: 26px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 20px;
  scroll-margin-top: 24px;
}

.legal-container p {
  font-size: 16px;
  line-height: 1.75;
  color: #B7BEC9;
  margin-bottom: 18px;
}

.legal-container p:last-child {
  margin-bottom: 0;
}

.legal-container h3 {
  font-size: 19px;
  font-weight: 600;
  color: #FB923C;
  margin: 24px 0 12px;
}

/* ---------- Legal footer ---------- */
.legal-footer {
  background: #15161B;
  border-top: 1px solid #262A33;
  padding: 28px 0;
}

.legal-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.legal-footer p {
  font-size: 14px;
  color: #9BA3B0;
}

.legal-footer .legal-home {
  background: transparent;
  color: #FB923C;
  border: 1px solid #F97316;
  padding: 9px 20px;
  font-size: 14px;
}

.legal-footer .legal-home:hover {
  background: #F97316;
  color: #1A0E02;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .toc ol {
    grid-template-columns: 1fr;
  }

  .legal-header {
    padding: 48px 0 36px;
  }

  .legal-container h2 {
    font-size: 23px;
  }
}
