/* Riskova legal pages (Privacy Policy, Terms and Conditions).
   Scoped to .legal so nothing here can affect the rest of the site.
   Colours come from the Riskova logo: deep purple, brand purple and gold. */
.legal {
  --ink: #151515;
  --text: #2b2833;
  --muted: #625c6c;
  --purple: #280030;
  --purple-2: #3b1450;
  --brand: #7c3288;
  --tint: #f5ecf8;
  --gold: #e0a800;
  --line: #e4dde8;
  --paper: #ffffff;
  font-family: Satoshi, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  text-align: left;
  width: 100%;
  padding-bottom: 1rem;
}
.legal *, .legal *::before, .legal *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.legal .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- header ---------- */
.legal-hero {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  padding: clamp(1.75rem, 5vw, 3.75rem);
  color: #fff;
  background:
    radial-gradient(110% 150% at 88% -20%, #6a2a86 0%, rgba(106, 42, 134, 0) 58%),
    linear-gradient(135deg, var(--purple) 0%, var(--purple-2) 100%);
}
.legal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/68889fa9e25f3d296e031536/68889fa9e25f3d296e0314fe_Hero_Background_Grid.svg") center / cover no-repeat;
  opacity: 0.1;
  mix-blend-mode: screen;
  pointer-events: none;
}
.legal-hero > * { position: relative; }
.legal-eyebrow {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.legal-eyebrow::before { content: ""; width: 2rem; height: 2px; background: var(--gold); }
.legal .legal-hero h1 {
  margin: 0.9rem 0 0.75rem;
  font-size: clamp(2.25rem, 5.4vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: #fff;
  text-wrap: balance;
}
.legal-lede {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}
.legal-meta {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.legal-meta li {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
}
.legal-meta li strong { color: #fff; font-weight: 700; }
.legal-switch {
  margin-top: 2rem;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.legal .legal-switch a {
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.88);
  transition: background 0.2s, color 0.2s;
}
.legal .legal-switch a:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.legal .legal-switch a[aria-current="page"] { background: var(--gold); color: var(--purple); }

/* ---------- layout ---------- */
.legal-shell {
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr);
  gap: 2.25rem;
  margin-top: 2rem;
  align-items: start;
}
.legal-toc { position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow: auto; }
.legal-toc-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.1rem 0.6rem 0.7rem;
}
.legal-toc-box summary {
  list-style: none;
  cursor: pointer;
  padding: 0 0.7rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.legal-toc-box summary::-webkit-details-marker { display: none; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; }
.legal .legal-toc a {
  display: grid;
  grid-template-columns: 1.7rem 1fr;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border-radius: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.35;
  text-decoration: none;
  color: var(--text);
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s;
}
.legal .legal-toc a .tn { font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.legal .legal-toc a:hover { background: var(--tint); }
.legal .legal-toc a.is-active {
  background: var(--tint);
  border-left-color: var(--brand);
  color: var(--purple);
  font-weight: 600;
}

/* ---------- document body ---------- */
.legal-body {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: clamp(1.4rem, 4vw, 3.5rem);
  box-shadow: 0 1px 2px rgba(40, 0, 48, 0.05), 0 18px 40px -22px rgba(40, 0, 48, 0.25);
}
.legal .legal-body p {
  margin: 0 0 1.05rem;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 72ch;
}
.legal .legal-body strong { color: var(--ink); font-weight: 700; }
.legal .legal-body a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}
.legal .legal-body a:hover { color: var(--purple); text-decoration-thickness: 2px; }
.legal a:focus-visible, .legal summary:focus-visible, .legal-top:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 0.35rem;
}

.legal .legal-body h2 {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 3rem 0 1.15rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--line);
  font-size: 1.55rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--purple);
  scroll-margin-top: 1.5rem;
}
.legal .legal-body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal .legal-body .sec-num {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.55rem;
  border-radius: 0.65rem;
  background: var(--tint);
  color: var(--brand);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
.legal .legal-body .sublabel {
  margin: 1.6rem 0 0.7rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}

/* numbered clauses: number hangs in its own column */
.legal .legal-body .clause {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  column-gap: 0.25rem;
}
.legal .legal-body .clause .cn {
  padding-top: 0.2rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.legal .legal-body .clause .ct { min-width: 0; }

/* conspicuous (ALL-CAPS) clauses */
.legal .legal-body .caps {
  max-width: none;
  padding: 1.1rem 1.3rem;
  background: #fcf8fd;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 0.2rem 0.75rem 0.75rem 0.2rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  letter-spacing: 0.012em;
}
.legal .legal-body .clause.caps { column-gap: 0.5rem; grid-template-columns: 3rem minmax(0, 1fr); }

.legal .legal-body ul { list-style: none; margin: 0 0 1.25rem; padding: 0; max-width: 72ch; }
.legal .legal-body li {
  position: relative;
  margin: 0 0 0.6rem;
  padding-left: 1.5rem;
  font-size: 1.0625rem;
  line-height: 1.7;
}
.legal .legal-body li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.72em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 1px;
  background: var(--gold);
  transform: rotate(45deg);
}

/* tables */
.legal .legal-body .table-wrap {
  margin: 1.25rem 0 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
}
.legal .legal-body table { width: 100%; min-width: 30rem; border-collapse: collapse; font-size: 0.9625rem; }
.legal .legal-body th {
  padding: 0.85rem 1rem;
  text-align: left;
  background: var(--tint);
  color: var(--purple);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.35;
}
.legal .legal-body td { padding: 0.85rem 1rem; vertical-align: top; line-height: 1.55; border-top: 1px solid var(--line); }
.legal .legal-body td:first-child { font-weight: 600; color: var(--ink); width: 34%; }
.legal .legal-body tbody tr:hover td { background: #fcf9fd; }

/* closing contact card */
.legal .legal-body .contact-card {
  max-width: none;
  margin: 1.25rem 0 0;
  padding: 1.5rem 1.75rem;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.85;
}
.legal .legal-body .contact-card a { color: var(--gold); text-decoration-color: rgba(224, 168, 0, 0.5); }
.legal .legal-body .contact-card a:hover { color: #fff; }

/* ---------- next steps ---------- */
.legal-next { margin-top: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.legal .legal-next a, .legal .legal-next div {
  display: block;
  padding: 1.4rem 1.6rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1rem;
  text-decoration: none;
  color: var(--text);
}
.legal .legal-next small {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}
.legal .legal-next b { display: block; font-size: 1.2rem; color: var(--purple); margin-bottom: 0.3rem; }
.legal .legal-next span { display: block; font-size: 0.95rem; line-height: 1.55; color: var(--muted); }
.legal .legal-next a { transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.legal .legal-next a:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 14px 30px -20px rgba(40, 0, 48, 0.45); }
.legal .legal-next a b::after { content: " \2192"; }
.legal .legal-next div a { display: inline; padding: 0; border: 0; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

.legal-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 2.9rem;
  height: 2.9rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #280030;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 10px 24px -8px rgba(40, 0, 48, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 20;
}
.legal-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .legal-shell { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .legal-toc { position: static; max-height: none; overflow: visible; }
  .legal-toc ol { display: grid; grid-template-columns: 1fr 1fr; column-gap: 0.5rem; }
}
@media (max-width: 640px) {
  .legal-toc ol { grid-template-columns: 1fr; }
  .legal .legal-body h2 { font-size: 1.3rem; gap: 0.7rem; }
  .legal .legal-body .sec-num { min-width: 2.2rem; height: 2.2rem; font-size: 0.95rem; }
  .legal .legal-body p, .legal .legal-body li { font-size: 1rem; }
  .legal .legal-body .clause { grid-template-columns: 2.7rem minmax(0, 1fr); }
  .legal .legal-body .caps { padding: 0.9rem 1rem; }
  .legal-next { grid-template-columns: 1fr; }
  .legal-switch { display: flex; flex-wrap: nowrap; width: 100%; }
  .legal .legal-switch a { flex: 1 1 0; min-width: 0; text-align: center; padding: 0.65rem 0.4rem; font-size: 0.8125rem; line-height: 1.2; }
}

/* ---------- print ---------- */
@media print {
  .navbar, .section-footer, .legal-toc, .legal-switch, .legal-next, .legal-top { display: none !important; }
  .hero-form { padding-top: 0 !important; }
  .legal-hero { background: none !important; color: #000; padding: 0 0 1rem; border-bottom: 2px solid #000; border-radius: 0; }
  .legal-hero::before { display: none; }
  .legal .legal-hero h1, .legal-lede, .legal-meta li, .legal-eyebrow { color: #000 !important; border-color: #999; background: none; }
  .legal-body { border: 0; box-shadow: none; padding: 0; }
  .legal .legal-body p, .legal .legal-body li { font-size: 10.5pt; }
  .legal .legal-body h2 { break-after: avoid; }
  .legal .legal-body .contact-card { background: none; color: #000; border: 1px solid #999; }
}
