/* Legal pages — aligned with site nav/footer (1100px, 5% gutters) */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --site-max: 1100px;
  --legal-accent: #e87361;
  --legal-accent-light: #fff3f1;
  --legal-accent-border: #f5d5ce;
}

.legal-page {
  background: #fafafa;
  color: #3a3a4a;
  line-height: 1.7;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --muted: #6b6b80;
  margin: 0;
}

.legal-page--secondary {
  --legal-accent: #8086ba;
  --legal-accent-light: #f3f5ff;
  --legal-accent-border: #dde0f5;
}

.legal-shell {
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
}

.legal-hero {
  padding: 2.75rem 5% 2.5rem;
  border-bottom: 1px solid var(--legal-accent-border);
  background: var(--legal-accent-light);
}

.legal-hero .doc-type {
  display: inline-block;
  background: var(--legal-accent);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.legal-hero h1 {
  font-family: "Nunito", sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 900;
  color: #1e1e2e;
  margin-bottom: 0.65rem;
  line-height: 1.15;
}

.legal-hero .meta {
  display: flex;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #6b6b80;
}

.legal-hero .meta:not(:has(span)) {
  display: block;
}

.legal-hero .meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.legal-hero .meta svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.legal-body {
  padding: 2.5rem 5% 4rem;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 84px);
  background: #ffffff;
  border: 1px solid #eceaf0;
  border-radius: 14px;
  padding: 1.1rem 1rem;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.05);
}

.legal-toc h3 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #6b6b80;
  margin-bottom: 0.85rem;
}

.legal-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.legal-toc li {
  margin-bottom: 0.15rem;
}

.legal-toc a {
  font-size: 0.82rem;
  color: #6b6b80;
  text-decoration: none;
  display: block;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition:
    color 0.2s,
    background 0.2s,
    border-color 0.2s;
  line-height: 1.45;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
  color: var(--legal-accent);
  background: var(--legal-accent-light);
  border-left-color: var(--legal-accent);
  outline: none;
}

.legal-content {
  min-width: 0;
  background: #ffffff;
  border: 1px solid #eceaf0;
  border-radius: 16px;
  padding: 1.75rem 1.85rem 2rem;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.05);
}

.legal-content--simple {
  max-width: var(--site-max);
  margin: 0 auto;
}

.legal-notice {
  background: var(--legal-accent-light);
  border-left: 4px solid var(--legal-accent);
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.15rem;
  margin-bottom: 1.75rem;
  font-size: 0.9rem;
  color: #1e1e2e;
  line-height: 1.65;
}

.legal-content h2.section-heading,
.legal-content--simple h2 {
  font-family: "Nunito", sans-serif;
  font-size: clamp(1.05rem, 2.5vw, 1.28rem);
  font-weight: 800;
  color: #1e1e2e;
  margin: 2.25rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--legal-accent-light);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 88px);
}

.legal-content h2.section-heading:first-of-type,
.legal-content--simple h2:first-of-type {
  margin-top: 0;
}

.legal-content h2 .sec-num {
  background: var(--legal-accent);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-family: "Inter", sans-serif;
  flex-shrink: 0;
}

.legal-content h3.sub-heading {
  font-family: "Nunito", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--legal-accent);
  margin: 1.5rem 0 0.5rem;
}

.legal-content p,
.legal-content--simple p {
  font-size: 0.94rem;
  color: #3a3a4a;
  margin-bottom: 0.9rem;
  line-height: 1.75;
}

.legal-content ul.doc-list {
  list-style: none;
  margin: 0.5rem 0 1rem;
  padding: 0;
}

.legal-content ul.doc-list li {
  font-size: 0.92rem;
  color: #3a3a4a;
  line-height: 1.7;
  padding: 0.4rem 0 0.4rem 1.5rem;
  position: relative;
  border-bottom: 1px solid #eceaf0;
}

.legal-content ul.doc-list li:last-child {
  border-bottom: none;
}

.legal-content ul.doc-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--legal-accent);
}

.legal-content ul.doc-list li strong {
  color: #1e1e2e;
}

.legal-content .highlight-box {
  background: var(--legal-accent-light);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: #1e1e2e;
  line-height: 1.65;
}

.legal-content .rights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.legal-content .right-card {
  background: #fafafa;
  border: 1px solid #eceaf0;
  border-radius: 12px;
  padding: 0.95rem 1rem;
}

.legal-content .right-card h4 {
  font-family: "Nunito", sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--legal-accent);
  margin-bottom: 0.3rem;
}

.legal-content .right-card p {
  font-size: 0.82rem;
  color: #6b6b80;
  margin: 0;
  line-height: 1.55;
}

.legal-content .contact-card {
  background: #fafafa;
  border: 1px solid #eceaf0;
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  margin: 1rem 0;
}

.legal-content .contact-card p {
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.legal-content a,
.legal-content--simple a {
  color: var(--legal-accent);
  text-decoration: none;
}

.legal-content a:hover,
.legal-content--simple a:hover {
  text-decoration: underline;
}

.legal-content--simple ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.legal-content--simple li {
  font-size: 0.94rem;
  margin-bottom: 0.65rem;
  line-height: 1.7;
}

.legal-mobile-jump {
  display: none;
  margin-bottom: 1.25rem;
}

.legal-mobile-jump label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #6b6b80;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.legal-mobile-jump select {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.85rem;
  border: 1px solid #eceaf0;
  border-radius: 12px;
  background: #ffffff;
  font: inherit;
  font-size: 0.92rem;
  color: #3a3a4a;
}

@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .legal-toc {
    display: none;
  }

  .legal-mobile-jump {
    display: block;
  }

  .legal-content {
    padding: 1.35rem 1.15rem 1.5rem;
    border-radius: 14px;
  }

  .legal-body {
    padding: 1.5rem 5% 3rem;
  }

  .legal-hero {
    padding: 2rem 5% 1.75rem;
  }
}

@media (max-width: 600px) {
  .legal-content .rights-grid {
    grid-template-columns: 1fr;
  }

  .legal-content h2.section-heading {
    flex-wrap: wrap;
  }
}
