/* ==========================================================================
   HydraLink — legal stylesheet (privacy.html and terms-of-service.html)
   Dark forest theme. Loaded on legal pages only, never style.css.
   ========================================================================== */

:root {
  --bg: #0C1410;
  --surface: #12241A;
  --pine: #143A26;
  --pine-deep: #1C3A2A;
  --forest: #2F7D4F;
  --forest-soft: #5FBF8B;
  --gold: #D9A441;
  --gold-soft: #E7C576;
  --ink: #EAF3EC;
  --ink-mute: #A9BFB0;
  --border: #1C3A2A;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-size: 16px;
  line-height: 1.75;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

/* Scope isolation: legal page body background and base text color */
.legal-page {
  background-color: #0C1410;
  color: #EAF3EC;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #5FBF8B;
  text-decoration: none;
}

a:hover {
  color: #E7C576;
}

/* ==========================================================================
   Legal page header — must be a div/header with solid or gradient background
   ========================================================================== */

.legal-header {
  background-color: #0C1410;
  background-image: radial-gradient(900px 480px at 50% -10%, #143A26 0%, transparent 65%);
  border-bottom: 1px solid #1C3A2A;
  padding: 72px 24px 48px;
}

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

.legal-header .legal-breadcrumb {
  display: block;
  font-size: 14px;
  color: #5FBF8B;
  margin-bottom: 18px;
}

.legal-header h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #EAF3EC;
  margin-bottom: 16px;
}

.legal-header .legal-updated {
  font-size: 15px;
  color: #D9A441;
  font-weight: 600;
}

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

.legal-toc {
  background-color: #12241A;
  border: 1px solid #1C3A2A;
  border-radius: 14px;
  padding: 28px 28px;
  margin: 40px 0 8px;
}

.legal-toc h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #D9A441;
  margin-bottom: 16px;
}

.legal-toc ol {
  list-style: none;
  counter-reset: toc;
}

.legal-toc ol li {
  counter-increment: toc;
  margin-bottom: 10px;
}

.legal-toc ol li a {
  color: #A9BFB0;
  font-size: 15px;
  display: flex;
  gap: 12px;
}

.legal-toc ol li a::before {
  content: counter(toc, decimal-leading-zero);
  color: #2F7D4F;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

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

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

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

/* Scope-isolation rule: never paint dark backgrounds over legal text */
.legal-page .legal-content section {
  background-color: transparent !important;
}

.legal-content section {
  padding: 36px 0;
  border-bottom: 1px solid #143A26;
}

.legal-content section:last-of-type {
  border-bottom: none;
}

.legal-content h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #5FBF8B;
  margin-bottom: 16px;
  scroll-margin-top: 24px;
}

.legal-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: #EAF3EC;
  margin: 20px 0 10px;
}

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

.legal-content ul,
.legal-content ol {
  margin: 0 0 18px 22px;
  color: #A9BFB0;
}

.legal-content li {
  font-size: 16px;
  margin-bottom: 8px;
}

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

.legal-content a {
  color: #5FBF8B;
  text-decoration: underline;
}

.legal-content a:hover {
  color: #E7C576;
}

/* Back to top link */
.legal-backtop {
  display: inline-block;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
}

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

.legal-footer {
  background-color: #0F1D16;
  border-top: 1px solid #2F7D4F;
  padding: 44px 24px;
  text-align: center;
  margin-top: 40px;
}

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

.legal-footer p {
  color: #A9BFB0;
  font-size: 15px;
  margin-bottom: 10px;
}

.legal-footer .legal-footer-name {
  color: #5FBF8B;
  font-weight: 700;
  font-size: 17px;
}

.legal-footer a {
  color: #5FBF8B;
}

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

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

  .legal-content h2 {
    font-size: 22px;
  }
}
