/* ==========================================================================
   AdaptForward — legal.css
   Shared stylesheet for privacy.html and terms-of-service.html
   Dark sky-blue legal theme. Loaded WITHOUT style.css.
   ========================================================================== */

/* Scope isolation: legal pages control their own background and colors. */
.legal-page {
  background-color: #0C1017;
  color: #E8F0F8;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

.legal-page * {
  box-sizing: border-box;
}

/* Never let a shared section id pick up the homepage section backgrounds. */
.legal-page .legal-content section {
  background-color: transparent !important;
}

.legal-page a {
  color: #38BDF8;
  text-decoration: none;
}

.legal-page a:hover {
  color: #E0F2FE;
}

.legal-page h1,
.legal-page h2,
.legal-page h3,
.legal-page p,
.legal-page ul,
.legal-page li {
  margin-top: 0;
}

/* ==========================================================================
   Legal header (a <header> element, solid background, strong h1 contrast)
   ========================================================================== */

.legal-header {
  background: #0A1A2B;
  border-bottom: 3px solid #0EA5E9;
  padding: 72px 0 56px;
}

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

.legal-header .legal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.legal-header .legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #E8F0F8;
}

.legal-header .legal-brand .mark {
  position: relative;
  width: 28px;
  height: 24px;
  flex-shrink: 0;
}

.legal-header .legal-brand .mark .wing-top {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 50%;
  background: #0EA5E9;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.legal-header .legal-brand .mark .wing-bottom {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 50%;
  background: #38BDF8;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.legal-header .back-home {
  font-size: 0.92rem;
  font-weight: 600;
  color: #E0F2FE;
  padding: 10px 18px;
  border: 1px solid #2A3C52;
  border-radius: 8px;
}

.legal-header .back-home:hover {
  border-color: #38BDF8;
  color: #E0F2FE;
}

.legal-header h1 {
  font-size: 2.6rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin: 0 0 14px;
}

.legal-header .legal-effective {
  font-size: 0.95rem;
  color: #A9C0D6;
}

/* ==========================================================================
   Table of contents
   ========================================================================== */

.legal-toc {
  background: #101A29;
  border: 1px solid #1D3147;
  border-radius: 12px;
  padding: 26px 28px;
  margin-bottom: 8px;
}

.legal-toc .toc-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #38BDF8;
  margin-bottom: 16px;
}

.legal-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
}

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

.legal-toc ol a {
  color: #A9C0D6;
  font-size: 0.94rem;
  line-height: 1.5;
}

.legal-toc ol a:hover {
  color: #E0F2FE;
}

.legal-toc ol a::before {
  content: counter(toc, decimal-leading-zero);
  color: #38BDF8;
  font-weight: 700;
  margin-right: 10px;
}

/* ==========================================================================
   Legal content
   ========================================================================== */

.legal-content {
  padding: 56px 0 32px;
}

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

.legal-content section {
  margin-bottom: 52px;
  scroll-margin-top: 32px;
}

.legal-content h2 {
  font-size: 1.6rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #E0F2FE;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #1D3147;
}

.legal-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #E8F0F8;
  margin: 24px 0 10px;
}

.legal-content p {
  color: #A9C0D6;
  font-size: 1.02rem;
  margin-bottom: 16px;
}

.legal-content ul {
  margin: 0 0 16px;
  padding-left: 22px;
  display: grid;
  gap: 10px;
}

.legal-content li {
  color: #A9C0D6;
  font-size: 1.02rem;
}

.legal-content strong {
  color: #E8F0F8;
}

.legal-content .legal-note {
  background: #101A29;
  border-left: 3px solid #0EA5E9;
  border-radius: 8px;
  padding: 20px 24px;
  margin: 20px 0;
}

.legal-content .legal-note p {
  margin-bottom: 0;
}

.legal-content a.anchor {
  color: #38BDF8;
}

/* ==========================================================================
   Legal footer
   ========================================================================== */

.legal-footer {
  background: #0C1017;
  border-top: 1px solid #1D3147;
  padding: 40px 0 48px;
}

.legal-footer .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.legal-footer p {
  color: #7E94AA;
  font-size: 0.92rem;
  margin: 0 0 14px;
  line-height: 1.7;
}

.legal-footer a {
  color: #38BDF8;
  font-weight: 600;
}

.legal-footer a:hover {
  color: #E0F2FE;
}

.legal-footer .footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
  .legal-header {
    padding: 48px 0 40px;
  }

  .legal-header h1 {
    font-size: 2rem;
  }

  .legal-toc ol {
    grid-template-columns: 1fr;
  }

  .legal-content h2 {
    font-size: 1.4rem;
  }
}
