/* ═══════════════════════════════════════════════════════════
   EQUIVEST ACADEMY — Legal Pages & Shared Footer
   Palette: Deep navy + burnished gold (matches course pages)
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg:          #060810;
  --bg2:         #0a0c18;
  --bg3:         #0e1020;
  --gold:        #C9A84C;
  --gold-bright: #E2C060;
  --gold-dim:    rgba(201,168,76,0.18);
  --gold-glow:   rgba(201,168,76,0.35);
  --gold-line:   rgba(201,168,76,0.22);
  --text:        #E8E4D8;
  --text-mid:    rgba(232,228,216,0.7);
  --text-dim:    rgba(232,228,216,0.42);
  --fn-body:     'Outfit', sans-serif;
  --fn-mono:     'JetBrains Mono', monospace;
  --radius:      10px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── LEGAL PAGE BODY ── */
.legal-page {
  font-family: var(--fn-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ── HEADER BAR ── */
.legal-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--gold-line);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.legal-header a.home-link {
  font-family: var(--fn-body);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color .2s;
}
.legal-header a.home-link:hover { color: var(--gold-bright); }
/* return button */
.legal-header a.return-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--fn-body);
  font-weight: 600;
  font-size: 0.88rem;
  color: #060810;
  background: var(--gold);
  border-radius: 7px;
  padding: 6px 16px;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: background .2s;
}
.legal-header a.return-btn:hover { background: var(--gold-bright); }
/* make any other links in header gold (e.g. contact email) */
.legal-header a:not(.home-link):not(.return-btn) {
  color: var(--gold);
  text-decoration: none;
}
.legal-header a:not(.home-link):not(.return-btn):hover { color: var(--gold-bright); }
.legal-header .breadcrumb {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ── MAIN CONTAINER ── */
.legal-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* ── PAGE TITLE ── */
.legal-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 6px;
  line-height: 1.2;
}
.legal-subtitle {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gold-line);
}
.legal-subtitle strong { color: var(--text-mid); }
.legal-subtitle a { color: var(--gold); text-decoration: none; }
.legal-subtitle a:hover { color: var(--gold-bright); }

/* ── SECTIONS ── */
.legal-section {
  margin-bottom: 40px;
}
.legal-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-bright);
  margin-bottom: 12px;
  padding-left: 14px;
  border-left: 3px solid var(--gold);
}
.legal-section h3 {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  margin: 18px 0 8px;
}
.legal-section p {
  color: var(--text-mid);
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.legal-section ul, .legal-section ol {
  color: var(--text-mid);
  font-size: 0.95rem;
  padding-left: 22px;
  margin-bottom: 10px;
}
.legal-section ul li, .legal-section ol li {
  margin-bottom: 6px;
}
.legal-section a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
}
.legal-section a:hover { color: var(--gold-bright); }

/* ── CALLOUT / WARNING BOX ── */
.legal-callout {
  background: rgba(201,168,76,0.06);
  border: 1px solid var(--gold-line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 16px 0;
  color: var(--text-mid);
  font-size: 0.92rem;
}
.legal-callout strong { color: var(--gold-bright); }

/* ── CROSS-LINK BOX (internal policy links) ── */
.policy-links-box {
  background: var(--bg2);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 32px 0;
}
.policy-links-box h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 12px;
}
.policy-links-box ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.policy-links-box ul li a {
  display: inline-block;
  background: var(--gold-dim);
  border: 1px solid var(--gold-line);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
.policy-links-box ul li a:hover {
  background: rgba(201,168,76,0.28);
  border-color: var(--gold);
}

/* ── TOOL DISCLAIMER WIDGET ── */
.tool-disclaimer {
  background: rgba(10, 12, 24, 0.9);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.84rem;
  color: var(--text-dim);
  margin-top: 24px;
  line-height: 1.6;
}
.tool-disclaimer a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tool-disclaimer a:hover { color: var(--gold-bright); }

/* ══════════════════════════════════════════════════════
   SHARED LEGAL FOOTER
══════════════════════════════════════════════════════ */
.legal-footer {
  background: var(--bg);
  border-top: 1px solid rgba(232,228,216,0.06);
  padding: 14px 24px 12px;
  font-family: var(--fn-body);
}
.legal-footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.legal-footer-brand {
  font-size: 0.72rem;
  color: rgba(232,228,216,0.22);
}
.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
}
.legal-footer-links a {
  font-size: 0.72rem;
  color: rgba(232,228,216,0.22);
  text-decoration: none;
  transition: color .2s;
  white-space: nowrap;
}
.legal-footer-links a:hover { color: rgba(201,168,76,0.7); }
.legal-footer-contact {
  font-size: 0.68rem;
  color: rgba(232,228,216,0.18);
}
.legal-footer-contact a {
  color: rgba(201,168,76,0.5);
  text-decoration: none;
}
.legal-footer-contact a:hover { color: var(--gold); }

/* ── TOC SIDEBAR LAYOUT ── */
.legal-with-toc {
  display: grid;
  grid-template-columns: 210px 1fr;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
}
.legal-toc {
  position: sticky;
  top: 24px;
  padding: 32px 18px 32px 24px;
  border-right: 1px solid var(--gold-line);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.legal-toc-title {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gold-line);
}
.legal-toc a {
  display: block;
  font-size: 0.79rem;
  color: var(--text-dim);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 2px;
  border-left: 2px solid transparent;
  line-height: 1.4;
  transition: color .15s, background .15s, border-color .15s;
}
.legal-toc a:hover { color: var(--text-mid); background: rgba(201,168,76,.06); }
.legal-toc a.toc-active {
  color: var(--gold);
  background: rgba(201,168,76,.1);
  border-left-color: var(--gold);
}
.legal-with-toc .legal-container {
  max-width: none;
  padding-left: 48px;
}

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .legal-with-toc { grid-template-columns: 1fr; }
  .legal-toc { display: none; }
  .legal-with-toc .legal-container { padding-left: 24px; }
}
@media (max-width: 600px) {
  .legal-container { padding: 36px 16px 64px; }
  .legal-header { flex-direction: column; align-items: flex-start; gap: 4px; }
  .policy-links-box ul { flex-direction: column; gap: 8px; }
}
