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

html,
body {
  margin: 0;
  padding: 0;
  background: #0a0a0a;
  font-family: Barlow, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── Back link ──────────────────────────────────────── */

.legal-page > a[href="/"] {
  display: inline-block;
  margin: 32px 0 0 0;
  font: 500 14px/1 Barlow, sans-serif;
  color: #A99EFF;
  text-decoration: none;
  letter-spacing: 0.03em;
}

.legal-page > a[href="/"]:hover {
  color: #fff;
}

/* ─── Page shell ─────────────────────────────────────── */

.legal-page {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) clamp(20px, 6vw, 48px) 80px;
  color: #f5f1e8;
  font: 400 16px/1.7 Barlow, sans-serif;
}

/* ─── Headings ───────────────────────────────────────── */

.legal-page h1,
.legal-page h2,
.legal-page h3,
.legal-page h4 {
  color: #fff !important;
  font-family: 'Barlow Condensed', Barlow, sans-serif !important;
  background: none !important;
  margin-top: 2em;
  margin-bottom: 0.5em;
  line-height: 1.2;
}

.legal-page h1 {
  font-size: clamp(32px, 5vw, 48px) !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-top: 1em;
}

.legal-page h2 {
  font-size: 22px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid #2a2e34;
  padding-bottom: 0.35em;
}

.legal-page h3 {
  font-size: 17px !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ─── Body text ──────────────────────────────────────── */

.legal-page p,
.legal-page li,
.legal-page span,
.legal-page div {
  color: #f5f1e8 !important;
  font-size: 15px !important;
  font-family: Barlow, sans-serif !important;
  background-color: transparent !important;
}

/* Keep Plain English callout boxes legible */
.legal-page [class*="border-l-4"],
.legal-page .pl-4.border-l-4 {
  background: rgba(255, 255, 255, 0.04) !important;
  border-left-color: #d4af37 !important;
}

.legal-page p {
  margin-top: 0;
  margin-bottom: 0.9em;
}

.legal-page ul,
.legal-page ol {
  padding-left: 1.5em;
  margin-bottom: 0.9em;
}

.legal-page li {
  margin-bottom: 0.4em;
}

/* ─── Links ──────────────────────────────────────────── */

.legal-page a,
.legal-page a span {
  color: #A99EFF !important;
  text-decoration: underline;
}

.legal-page a:hover,
.legal-page a:hover span {
  color: #fff !important;
}

/* ─── Tables ─────────────────────────────────────────── */

.legal-page table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 1.5em;
  overflow-x: auto;
  display: block;
}

.legal-page th,
.legal-page td {
  padding: 10px 14px;
  border: 1px solid #2a2e34;
  text-align: left;
  vertical-align: top;
  color: #f5f1e8 !important;
  background: none !important;
}

.legal-page th {
  color: #fff !important;
  font-weight: 600;
  background: #111111 !important;
}

/* ─── Override legacy Termly/iubenda inline colours ─── */

.legal-page [style*="color: rgb(89, 89, 89)"],
.legal-page [style*="color: rgb(127, 127, 127)"],
.legal-page [style*="color: rgb(0, 0, 0)"],
.legal-page [style*="color:#000"],
.legal-page [style*="color: #000"] {
  color: #f5f1e8 !important;
}

.legal-page [style*="background-color: rgb(255, 255, 255)"],
.legal-page [style*="background: white"],
.legal-page [style*="background: #fff"],
.legal-page [style*="background-color: white"] {
  background-color: transparent !important;
}

.legal-page [style*="font-family:"],
.legal-page [style*="font-family: "] {
  font-family: Barlow, sans-serif !important;
}

/* ─── Inline SVG logo from Termly — hide cleanly ────── */

.legal-page > div > span[style*="background: url(data:image/svg"],
.legal-page span[style*="url(data:image/svg"] {
  display: none !important;
}

/* ─── Nav at bottom of legal pages ──────────────────── */

.legal-page nav[aria-label="Legal"] {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #2a2e34;
  font-size: 14px;
  color: #a1a1aa !important;
}

.legal-page nav[aria-label="Legal"] a {
  color: #A99EFF !important;
  text-decoration: none;
}

.legal-page nav[aria-label="Legal"] a:hover {
  color: #fff !important;
}
