/* Legal pages: one stylesheet for every page under /legal/.
   Tokens and nav/footer chrome mirror pricing.html. */

:root {
  --neon-pink: #FF1493;
  --neon-pink-dim: rgba(255, 20, 147, 0.15);
  --neon-pink-mid: rgba(255, 20, 147, 0.4);
  --bg-dark: #0A0A0F;
  --bg-deep: #12121A;
  --bg-panel: #0E0E18;
  --text-glow: #FCFAEE;
  --text-muted: rgba(252, 250, 238, 0.72);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(252, 250, 238, 0.14);
  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-body: 'Nunito', -apple-system, sans-serif;
  --nav-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
}

body {
  margin: 0;
  background: var(--bg-dark);
  color: var(--text-glow);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

/* ---------- Site nav (from pricing.html) ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--nav-height);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-glow);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-logo span { color: var(--neon-pink); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch,
.nav-cta {
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.lang-switch {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 13px;
}

.lang-switch:hover { color: var(--text-glow); border-color: rgba(252, 250, 238, 0.35); }

.nav-cta {
  font-size: 0.85rem;
  padding: 8px 20px;
  border-radius: 6px;
  border: 1px solid var(--neon-pink);
  color: var(--neon-pink);
}

.nav-cta:hover { background: var(--neon-pink); color: var(--bg-dark); }

/* ---------- Page layout ---------- */

.legal {
  max-width: 72ch;
  margin: 0 auto;
  padding: 48px 20px 96px;
}

.legal-head { margin-bottom: 32px; }

h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.meta span + span::before { content: "\00B7"; margin: 0 0.5em; }

/* ---------- Table of contents ---------- */

.toc {
  margin: 0 0 40px;
  padding: 16px 20px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-panel);
  font-size: 0.94rem;
}

.toc summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
}

.toc ol {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.toc li { margin: 0; }

.toc a {
  display: block;
  padding: 4px 0;
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.4;
}

.toc a:hover { color: var(--text-glow); text-decoration: underline; }

@media (min-width: 1100px) {
  .legal {
    max-width: calc(280px + 56px + 72ch);
    display: grid;
    grid-template-columns: 280px minmax(0, 72ch);
    grid-template-areas: "toc head" "toc body";
    column-gap: 56px;
    align-items: start;
  }
  .legal-head { grid-area: head; }
  .legal-body { grid-area: body; }
  .toc {
    grid-area: toc;
    position: sticky;
    top: calc(var(--nav-height) + 24px);
    max-height: calc(100vh - var(--nav-height) - 48px);
    overflow-y: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font-size: 0.85rem;
  }
  .toc summary { pointer-events: none; list-style: none; color: var(--text-muted); }
  .toc summary::-webkit-details-marker { display: none; }
}

/* ---------- Body text ---------- */

.legal-body > p:first-child { margin-top: 0; }

section { margin-top: 56px; }

h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  margin: 0 0 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border-strong);
}

h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 32px 0 8px;
}

h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin: 24px 0 4px;
  color: var(--text-muted);
}

h2, h3, h4 { break-after: avoid; page-break-after: avoid; }

p { margin: 0 0 16px; }

ul, ol { margin: 0 0 16px; padding-left: 1.4em; }

li { margin-bottom: 8px; }

li > ul, li > ol { margin: 8px 0 0; }

strong { font-weight: 700; color: var(--text-glow); }

a {
  color: var(--text-glow);
  text-decoration: underline;
  text-decoration-color: var(--neon-pink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

a:hover { text-decoration-thickness: 2px; }

a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--neon-pink);
  outline-offset: 2px;
}

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; margin: 0 0 24px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  line-height: 1.5;
}

th, td {
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  text-align: left;
  vertical-align: top;
}

th { font-family: var(--font-display); background: var(--bg-panel); }

/* ---------- Callouts and contact ---------- */

.callout {
  padding: 4px 24px 8px;
  border-left: 3px solid var(--neon-pink);
  border-radius: 0 10px 10px 0;
  background: var(--neon-pink-dim);
}

.callout > h2 { border-top: 0; }

div.callout { margin: 0 0 16px; padding-top: 16px; }

.contact {
  margin-top: 56px;
  padding: 20px 24px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-panel);
  font-style: normal;
}

.contact p:last-child { margin-bottom: 0; }

/* ---------- Site footer (from pricing.html) ---------- */

.footer {
  padding: 40px 24px;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-deep);
}

.footer-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-text + .footer-text { margin-top: 8px; }

.footer a { color: inherit; text-decoration: none; }

.footer a:hover { text-decoration: underline; }

/* ---------- Small screens ---------- */

@media (max-width: 480px) {
  body { font-size: 17px; }
  .nav { padding: 12px 16px; }
  .nav-logo { font-size: 1.1rem; }
  .nav-cta { font-size: 0.78rem; padding: 6px 14px; }
  .lang-switch { padding: 5px 10px; }
  .legal { padding-top: 32px; }
  .callout { padding: 4px 16px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Print ---------- */

@media print {
  body { background: #fff; color: #000; font-size: 11pt; line-height: 1.5; }
  header, .toc, .footer { display: none; }
  .legal { display: block; max-width: none; padding: 0; }
  h1, h2, h3, h4, strong, .meta { color: #000; }
  h2 { border-top-color: #999; }
  a { color: #000; text-decoration-color: #000; }
  .callout { background: none; border-left-color: #000; }
  .contact, th, td { border-color: #999; background: none; }
  li, tr { break-inside: avoid-page; }
  p { orphans: 3; widows: 3; }
}
