/* ============================================================
   AquaTracy — shared legal stylesheet
   Loaded by privacy.html and terms-of-service.html ONLY.
   Self-contained (does not rely on style.css).
   ============================================================ */

:root {
  --ink: #10222E;
  --navy: #0E3A5C;
  --ocean: #155E8F;
  --azure: #2E86C1;
  --glass: #C8E0F0;
  --mist: #E3EEF6;
  --sand: #EFE7DA;
  --white: #FFFFFF;
  --line: #D6E2EC;
  --deep: #0A2A42;
}

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

/* Legal pages define their own body background so headings stay readable */
.legal-page {
  background-color: #F7F9FC;
  color: #10222E;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.legal-page a {
  color: var(--ocean);
}

.legal-page h1,
.legal-page h2,
.legal-page h3 {
  color: var(--navy);
  line-height: 1.25;
}

/* Scope-isolation: never let homepage section styling leak onto legal text */
.legal-page .legal-content section {
  background-color: transparent !important;
  border: none !important;
}

/* ============================================================
   LEGAL HEADER (a <div>, never a <section>)
   ============================================================ */
.legal-header {
  background: linear-gradient(135deg, #0E3A5C 0%, #155E8F 100%);
  padding: 44px 24px;
  text-align: center;
  border-bottom: 4px solid var(--azure);
}

.legal-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 14px;
}

.sonar-emblem {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}
.sonar-emblem i {
  position: absolute;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-sizing: border-box;
}
.sonar-emblem i:nth-child(1) { inset: 0; }
.sonar-emblem i:nth-child(2) { inset: 7px; border-color: var(--glass); }
.sonar-emblem i:nth-child(3) { inset: 14px; border-color: #FFFFFF; }
.sonar-emblem i:nth-child(4) { inset: 16px; border: none; background-color: var(--sand); }

.legal-header h1 {
  color: #FFFFFF;
  font-size: 34px;
  margin-bottom: 10px;
}

.legal-header .legal-meta {
  color: var(--glass);
  font-size: 14px;
}

.legal-header .home-link {
  display: inline-block;
  margin-top: 16px;
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
  border-radius: 30px;
  padding: 8px 22px;
  font-weight: 700;
  font-size: 14px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.legal-header .home-link:hover {
  background-color: #FFFFFF;
  color: var(--navy);
}

/* ============================================================
   LEGAL CONTENT
   ============================================================ */
.legal-content {
  padding: 56px 0 40px;
}

/* Content container is centered and padded (max-width + auto margins) */
.legal-content .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-content .updated {
  font-size: 14px;
  color: var(--ocean);
  font-weight: 600;
  margin-bottom: 28px;
}

/* Table of contents */
.legal-content .toc {
  background-color: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--ocean);
  border-radius: 12px;
  padding: 24px 26px;
  margin-bottom: 40px;
}
.legal-content .toc h2 {
  font-size: 17px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.legal-content .toc ol {
  list-style: none;
  counter-reset: toc;
}
.legal-content .toc li {
  counter-increment: toc;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.legal-content .toc li:last-child {
  border-bottom: none;
}
.legal-content .toc li::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--ocean);
  font-weight: 700;
  font-size: 13px;
  margin-right: 12px;
}
.legal-content .toc a {
  color: var(--ink);
  font-weight: 600;
}
.legal-content .toc a:hover {
  color: var(--ocean);
}

/* Legal sections */
.legal-content section {
  margin-bottom: 34px;
}
.legal-content section h2 {
  font-size: 24px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--glass);
}
.legal-content section h3 {
  font-size: 18px;
  margin: 18px 0 8px;
}
.legal-content section p {
  margin-bottom: 14px;
}
.legal-content section ul {
  margin: 0 0 16px 22px;
}
.legal-content section li {
  margin-bottom: 8px;
}

/* ============================================================
   LEGAL FOOTER
   ============================================================ */
.legal-footer {
  background-color: var(--deep);
  color: var(--glass);
  padding: 40px 24px;
  text-align: center;
}
.legal-footer .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 12px;
}
.legal-footer p {
  font-size: 14px;
  margin-bottom: 14px;
}
.legal-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  font-size: 14px;
}
.legal-footer .footer-links a {
  color: var(--glass);
}
.legal-footer .footer-links a:hover {
  color: #FFFFFF;
}

@media (max-width: 640px) {
  .legal-header h1 {
    font-size: 28px;
  }
}
