/* =============================================================
   FortunaGo.Me Finance — Legal / Terms & Privacy Page Styles
   Extends fin-style.css (shared tokens, header, footer, buttons)
   with the prose/table/contact-box treatment this page needs.
   ============================================================= */

.legal-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(46, 42, 92, 0.97); /* Twilight Indigo — matches the main site header */
  backdrop-filter: blur(8px);
  height: 70px;
  /* NOTE: intentionally NOT display:flex here — that was the bug.
     A flex parent forces its only child (.container) to shrink to
     its content width instead of stretching to max-width, which is
     what glued the logo and the Back link together. .container
     handles its own internal flex layout below. */
}
.legal-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  height: 100%;
}
.legal-nav .brand-wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  color: var(--off-white);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 0;
}
.legal-back {
  font-family: var(--font-market);
  font-size: 13px;
  color: var(--gold-antique);
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}
.legal-back:hover { color: var(--gold-bright); }

/* Groups the language dropdown + Back link on the right side of
   the nav, mirroring .header-actions on the main pages. Reuses
   the .lang-select / .lang-current / .lang-menu styles already
   defined in fin-style.css — no new dropdown CSS needed here.
   flex-wrap:nowrap + flex-shrink:0 on both children prevents the
   Back link from wrapping onto a second line and spilling out of
   the fixed-height nav bar (the same overflow bug fixed on the
   main site header, just not yet hardened here). */
.legal-nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.legal-wrap { max-width: 780px; margin: 0 auto; padding: 64px 24px 96px; }

.legal-header { margin-bottom: 44px; padding-bottom: 30px; border-bottom: 1px solid var(--gray-soft); }
.legal-eyebrow {
  font-family: var(--font-accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold-antique);
  display: block;
  margin-bottom: 12px;
}
.legal-header h1 {
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--purple-deep);
  line-height: 1.15;
  margin-bottom: 12px;
}
.legal-meta { font-size: 13.5px; color: #8A8A8A; }

.legal-prose h2 {
  font-family: var(--font-display);
  font-size: 23px;
  color: var(--purple-deep);
  margin-top: 44px;
  margin-bottom: 12px;
  line-height: 1.3;
}
.legal-prose h2:first-child { margin-top: 0; }
.legal-prose p { font-size: 15px; color: #4A4A4A; line-height: 1.75; margin-bottom: 15px; }
.legal-prose p:last-child { margin-bottom: 0; }
.legal-prose strong { color: var(--charcoal); font-weight: 600; }
.legal-prose ul { margin: 0 0 15px 0; display: flex; flex-direction: column; gap: 9px; }
.legal-prose ul li { font-size: 15px; color: #4A4A4A; line-height: 1.7; padding-left: 20px; position: relative; }
.legal-prose ul li::before {
  content: '\2713';
  font-size: 12px;
  font-weight: 700;
  color: var(--growth-green);
  position: absolute; left: 0; top: 2px;
}
.legal-prose a { color: var(--purple-royal); text-decoration: underline; }
.legal-prose a:hover { color: var(--purple-deep); }

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 13.5px;
}
.legal-table th {
  font-family: var(--font-market);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #8A8A8A;
  padding: 10px 14px;
  text-align: left;
  background: var(--cream);
  border-bottom: 1px solid var(--gray-soft);
}
.legal-table td {
  padding: 11px 14px;
  color: #4A4A4A;
  line-height: 1.6;
  border-bottom: 1px solid rgba(44,35,24,0.06);
  vertical-align: top;
}
.legal-table tr:last-child td { border-bottom: none; }
.legal-table td:first-child { font-weight: 600; color: var(--charcoal); white-space: nowrap; }

.legal-contact-box {
  background: var(--lavender-mist);
  border: 1.5px solid var(--emerald);
  border-radius: var(--radius-card);
  padding: 26px 30px;
  margin-top: 48px;
}
.legal-contact-box h2 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--purple-deep);
  margin-bottom: 10px;
}
.legal-contact-box p { font-size: 14px; color: #4A4A4A; line-height: 1.7; margin-bottom: 8px; }
.legal-contact-box p:last-child { margin-bottom: 0; }
.legal-contact-box a { color: var(--purple-deep); font-weight: 600; }

@media (max-width: 640px) {
  .legal-header h1 { font-size: 30px; }
  .legal-prose h2 { font-size: 20px; margin-top: 34px; }
  .legal-table { font-size: 12.5px; }
  .legal-table th, .legal-table td { padding: 9px 10px; }
  .legal-table td:first-child { white-space: normal; }
}

/* ─── Round 2: expanded green presence (matches fin-style.css) ── */
.legal-nav { border-bottom: 2px solid var(--growth-green); }
.legal-header { border-bottom-color: var(--growth-green); }
.legal-prose h2 { position: relative; padding-bottom: 10px; }
.legal-prose h2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 40px; height: 3px;
  background: var(--growth-green);
  border-radius: 2px;
}
.legal-table th { border-bottom: 2px solid var(--growth-green); }
.legal-contact-box {
  border-width: 2px;
  background: linear-gradient(135deg, var(--lavender-mist) 0%, rgba(47, 158, 118, 0.08) 100%);
}
.legal-back { position: relative; }
.legal-back:hover { color: var(--growth-green); }
