/* ─── LEGAL PAGE SHARED ─── */
.legal-page { background: var(--off-white); min-height: 100vh; }

/* ─── ROOT VARIABLES ─── */
:root {
  --navy:         #1B3D7A;
  --navy-deep:    #0F2550;
  --navy-mid:     #2A4E8F;
  --teal:         #2AB5B5;
  --teal-dark:    #1E9A9A;
  --white:        #FFFFFF;
  --off-white:    #F9FAFB;
  --border:       #E4E9F0;
  --border-light: #EEF2F7;
  --text-primary: #0F1F38;
  --text-body:    #3D526B;
  --text-muted:   #7A90AA;
  --shadow-xs:    0 1px 2px rgba(15,31,56,0.06);
  --shadow-sm:    0 2px 8px rgba(15,31,56,0.08);
  --shadow-md:    0 4px 20px rgba(15,31,56,0.10);
  --radius-sm:    4px;
  --radius:       6px;
  --radius-md:    8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--off-white);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 2rem; }

/* ─── NAVIGATION ─── */
.site-nav {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-wordmark {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.25px;
}
.nav-wordmark span { color: var(--teal); }
.nav-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--navy) 100%);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-logo-icon svg { width: 18px; height: 18px; stroke: #fff; fill: none; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--navy); background: var(--off-white); }
.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 1.35rem;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1.5px solid transparent;
  font-family: inherit;
}
.btn-primary { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.btn-ghost { background: transparent; color: var(--text-body); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); background: var(--off-white); }
.btn-sm { padding: 0.42rem 0.9rem; font-size: 0.8125rem; }

/* ─── LEGAL HERO ─── */
.legal-hero {
  background: linear-gradient(105deg, var(--navy-deep) 0%, var(--navy) 60%, #1A6B8A 100%);
  padding: 3.5rem 0 3rem;
}
.legal-hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}
.legal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.85rem;
}
.legal-eyebrow::before {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
}
.legal-hero h1 {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 0.6rem;
}
.legal-hero-meta {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}
.legal-hero-meta strong { color: rgba(255,255,255,0.75); font-weight: 500; }
.legal-nav-pills {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
}
.legal-nav-pill {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  padding: 0.3rem 0.85rem;
  transition: all 0.15s;
  white-space: nowrap;
}
.legal-nav-pill:hover { background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.9); }

/* ─── LEGAL BODY ─── */
.legal-body { padding: 3rem 0 5rem; }
.legal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}

/* Sticky TOC */
.legal-toc { position: sticky; top: 120px; }
.toc-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 0.1rem; }
.toc-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.38rem 0.65rem;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: all 0.15s;
}
.toc-list a:hover {
  color: var(--navy);
  border-left-color: var(--teal);
  background: rgba(42,181,181,0.05);
}
.toc-list a.active {
  color: var(--navy);
  border-left-color: var(--teal);
  background: rgba(42,181,181,0.07);
  font-weight: 600;
}
.toc-number {
  font-size: 0.68rem;
  color: var(--teal);
  font-weight: 700;
  min-width: 16px;
}
.toc-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0.75rem 0;
}
.toc-other-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--teal-dark);
  font-weight: 500;
  padding: 0.38rem 0.65rem;
  transition: color 0.15s;
}
.toc-other-link:hover { color: var(--navy); }
.toc-other-link svg { width: 12px; height: 12px; flex-shrink: 0; }

/* Data type chips (used in "what we collect") */
.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}
.data-chip {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.data-chip-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.data-chip-label svg { width: 13px; height: 13px; color: var(--teal); flex-shrink: 0; }
.data-chip p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* Legal Content */
.legal-content {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.legal-section {
  padding: 2.25rem 2.5rem;
  border-bottom: 1px solid var(--border-light);
  scroll-margin-top: 90px;
}
.legal-section:last-child { border-bottom: none; }
.legal-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #F0FBFB;
  border: 1px solid #B2E5E5;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 0.85rem;
}
.legal-section h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  margin-bottom: 1rem;
}
.legal-section p {
  font-size: 0.875rem;
  color: var(--text-body);
  line-height: 1.82;
  margin-bottom: 0.9rem;
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul, .legal-section ol {
  padding-left: 1.35rem;
  margin-bottom: 0.9rem;
}
.legal-section li {
  font-size: 0.875rem;
  color: var(--text-body);
  line-height: 1.75;
  margin-bottom: 0.35rem;
}
.legal-section h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1.25rem 0 0.5rem;
}
.legal-highlight {
  background: #F0FBFB;
  border: 1px solid #B2E5E5;
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.9rem 1.25rem;
  margin: 1rem 0;
}
.legal-highlight p {
  margin: 0;
  font-size: 0.845rem;
  color: var(--teal-dark);
  font-weight: 500;
}
.legal-warn {
  background: #FFF8F0;
  border: 1px solid #F5D9B2;
  border-left: 3px solid #D4870A;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.9rem 1.25rem;
  margin: 1rem 0;
}
.legal-warn p {
  margin: 0;
  font-size: 0.845rem;
  color: #8C5A0E;
  font-weight: 500;
}
.legal-navy-box {
  background: var(--navy-deep);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.legal-navy-box p { margin: 0; font-size: 0.845rem; color: rgba(255,255,255,0.75); }
.legal-navy-box strong { color: var(--teal); }

/* Your rights pills */
.rights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin: 1rem 0;
}
.right-pill {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
}
.right-pill-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.right-pill-icon svg { width: 10px; height: 10px; stroke: var(--white); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.right-pill h4 { font-size: 0.8rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.15rem; }
.right-pill p { font-size: 0.75rem; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* Top summary bar */
.legal-summary-bar {
  background: var(--navy-deep);
  padding: 1.25rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.legal-summary-bar svg { width: 18px; height: 18px; stroke: var(--teal); flex-shrink: 0; }
.legal-summary-bar p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  margin: 0;
}
.legal-summary-bar strong { color: rgba(255,255,255,0.9); }

/* Contact card at bottom */
.legal-contact-card {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.legal-contact-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.legal-contact-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.legal-contact-card a {
  color: var(--teal-dark);
  font-weight: 500;
}

/* ─── FOOTER ─── */
.site-footer {
  background: var(--off-white);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy { font-size: 0.78rem; color: var(--text-muted); }
.footer-legal-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-legal-links a { font-size: 0.78rem; color: var(--text-muted); transition: color 0.15s; }
.footer-legal-links a:hover { color: var(--navy); }
.footer-legal-links a.active { color: var(--teal-dark); font-weight: 600; }

/* ─── RESPONSIVE (COMPLETE REWORK) ─── */

/* Tablet and below */
@media (max-width: 860px) {
  .container {
    padding: 0 1.5rem;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .legal-toc {
    position: static;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
  }

  /* Make TOC scrollable horizontally on mobile */
  .toc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .toc-list li {
    margin-bottom: 0;
  }

  .toc-list a {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 0.4rem 0.75rem;
    background: var(--off-white);
    border-radius: 100px;
    font-size: 0.75rem;
  }

  .toc-list a:hover {
    border-left-color: transparent;
    border-bottom-color: var(--teal);
  }

  .toc-list a.active {
    border-left-color: transparent;
    border-bottom-color: var(--teal);
    background: rgba(42,181,181,0.1);
  }

  .toc-number {
    display: none;
  }

  .toc-label {
    display: none;
  }

  .toc-divider {
    display: none;
  }

  .toc-other-link {
    display: inline-flex;
    background: var(--off-white);
    border-radius: 100px;
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    margin-top: 0.5rem;
  }

  .legal-nav-pills {
    display: none;
  }

  .legal-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .legal-hero {
    padding: 2.5rem 0 2rem;
  }

  .legal-hero h1 {
    font-size: 1.75rem;
  }

  .data-grid,
  .rights-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile devices */
@media (max-width: 600px) {
  .container {
    padding: 0 1.25rem;
  }

  /* Hide nav links on mobile */
  .nav-links {
    display: none;
  }

  /* Keep nav actions visible */
  .nav-actions {
    display: flex;
  }

  .legal-section {
    padding: 1.5rem 1.25rem;
  }

  .legal-summary-bar {
    padding: 1rem 1.25rem;
    flex-wrap: wrap;
  }

  .legal-contact-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
  }

  .legal-contact-card .btn-sm {
    width: 100%;
    justify-content: center;
  }

  .legal-hero h1 {
    font-size: 1.5rem;
  }

  .legal-eyebrow {
    font-size: 0.65rem;
  }

  .legal-hero-meta {
    font-size: 0.75rem;
  }

  .legal-body {
    padding: 2rem 0 3rem;
  }

  /* Improve TOC pills on mobile */
  .toc-list {
    gap: 0.35rem;
  }

  .toc-list a {
    padding: 0.3rem 0.65rem;
    font-size: 0.7rem;
  }

  .toc-other-link {
    font-size: 0.7rem;
    padding: 0.3rem 0.65rem;
  }

  /* Data chips */
  .data-chip {
    padding: 0.7rem 0.85rem;
  }

  .data-chip-label {
    font-size: 0.7rem;
  }

  .data-chip p {
    font-size: 0.72rem;
  }

  /* Rights pills */
  .right-pill {
    padding: 0.65rem 0.8rem;
  }

  .right-pill h4 {
    font-size: 0.75rem;
  }

  .right-pill p {
    font-size: 0.7rem;
  }

  /* Legal content text */
  .legal-section p,
  .legal-section li {
    font-size: 0.8rem;
  }

  .legal-section h2 {
    font-size: 0.95rem;
  }

  .legal-section h3 {
    font-size: 0.85rem;
  }

  .legal-highlight p,
  .legal-navy-box p,
  .legal-warn p {
    font-size: 0.78rem;
  }

  /* Footer */
  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal-links {
    justify-content: center;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .legal-hero {
    padding: 2rem 0 1.5rem;
  }

  .legal-hero h1 {
    font-size: 1.35rem;
  }

  .legal-section {
    padding: 1.25rem 1rem;
  }

  .legal-summary-bar {
    padding: 0.875rem 1rem;
  }

  .legal-summary-bar p {
    font-size: 0.75rem;
  }

  .legal-summary-bar svg {
    width: 16px;
    height: 16px;
  }

  .legal-contact-card {
    padding: 1rem;
  }

  .legal-contact-card h4 {
    font-size: 0.85rem;
  }

  .legal-contact-card p {
    font-size: 0.75rem;
  }

  /* Make buttons full width on very small screens */
  .nav-actions .btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
  }

  .nav-actions {
    gap: 0.35rem;
  }

  /* TOC pills wrap better */
  .toc-list {
    gap: 0.3rem;
  }

  .toc-list a {
    padding: 0.25rem 0.55rem;
    font-size: 0.65rem;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .legal-hero h1 {
    font-size: 1.2rem;
  }

  .legal-eyebrow {
    font-size: 0.6rem;
  }

  .legal-section p,
  .legal-section li {
    font-size: 0.75rem;
  }

  .legal-section h2 {
    font-size: 0.9rem;
  }

  .data-chip-label {
    font-size: 0.65rem;
  }

  .data-chip p {
    font-size: 0.68rem;
  }

  .right-pill h4 {
    font-size: 0.7rem;
  }

  .right-pill p {
    font-size: 0.65rem;
  }
}

/* Landscape orientation adjustments */
@media (max-width: 700px) and (orientation: landscape) {
  .legal-hero {
    padding: 1.5rem 0;
  }

  .legal-body {
    padding: 1.5rem 0 2rem;
  }

  .legal-toc {
    margin-bottom: 1rem;
  }

  .toc-list {
    flex-wrap: wrap;
  }
}

/* Touch-friendly improvements */
@media (max-width: 600px) {
  .nav-links a,
  .footer-legal-links a,
  .toc-list a,
  .legal-nav-pill,
  .btn {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .btn {
    min-height: 40px;
  }

  .toc-list a,
  .toc-other-link {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }
}

/* Improve readability on mobile */
@media (max-width: 600px) {
  .legal-highlight,
  .legal-navy-box,
  .legal-warn {
    padding: 0.75rem 1rem;
  }

  .legal-highlight p,
  .legal-navy-box p,
  .legal-warn p {
    font-size: 0.75rem;
  }

  ul, ol {
    padding-left: 1.1rem;
  }
}
