/* ==========================================================================
   LEGAL PAGES — privacy policy, terms of service
   ==========================================================================

   Scoped under .wm-legal with its tokens declared on the element, so nothing
   here depends on, or is overridden by, the bought template's stylesheet.

   The old pages had three problems this fixes:

   1. Bold lead-ins rendered white on white. The template sets <strong> to
      #fff inside content areas, so every "Information you give us." label
      was invisible — the paragraph just started with a mysterious indent.
   2. A stock photograph of a man in a suit headed a legal document.
   3. No way through. A 900-word policy with no contents list is a wall, and
      the one question a reader arrives with is buried in the middle of it.
   ========================================================================== */

.wm-legal {
  --azure-300: #5fcdfb;
  --azure-400: #29b6f0;
  --azure-600: #0079b8;
  --azure-700: #005f8f;
  --ink-950: #080c12;
  --ink-800: #17202b;
  --ink-700: #22303f;
  --ink-600: #35485c;
  --ink-500: #4e6479;
  --ink-300: #a8b8c8;
  --ink-100: #e4ebf1;
  --ink-50: #f2f6f9;
  --paper: #fbfcfe;

  background-color: var(--paper);
  font-family: 'Roboto', sans-serif;
  color: var(--ink-700);
  -webkit-font-smoothing: antialiased;
}

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

.wm-legal__container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, .5rem + 3vw, 2.5rem);
}

/* --- Head --------------------------------------------------------------------
   Dark band with a single azure bloom, matching the Insights section and the
   footer. No photograph: a legal page is not the place for stock imagery. */

.wm-legal__head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--ink-950);
  color: #f4f8fb;
  /* The site header is fixed and overlays this band, so the top padding has
     to clear it — otherwise the eyebrow sits underneath the navigation and
     reads as a rendering fault. */
  padding-block: calc(6.5rem + clamp(1rem, .5rem + 2vw, 2.5rem))
                 clamp(2.5rem, 1rem + 4vw, 3.5rem);
}

.wm-legal__head::before {
  content: '';
  position: absolute;
  inset-block-start: -55%;
  inset-inline-end: -10%;
  width: 42rem;
  height: 42rem;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle, rgb(41 182 240 / .15) 0%, transparent 62%);
}

.wm-legal__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 1rem;
  font-family: 'Mulish', sans-serif;
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--azure-400) !important;
}

.wm-legal__eyebrow::before {
  content: '';
  width: 2rem;
  height: 1px;
  background-color: currentColor;
  opacity: .6;
}

.wm-legal__title {
  margin: 0;
  font-family: 'Mulish', sans-serif !important;
  font-weight: 900 !important;
  font-size: clamp(2.25rem, 1.7rem + 2.7vw, 4rem) !important;
  line-height: 1.1;
  letter-spacing: -.026em;
  color: #fdfeff !important;
  max-width: 20ch;
}

.wm-legal__standfirst {
  margin: 1rem 0 0;
  font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-300) !important;
  max-width: 62ch;
}

.wm-legal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  margin-block-start: 1.75rem;
  padding-block-start: 1.25rem;
  border-top: 1px solid rgb(255 255 255 / .1);
}

.wm-legal__meta span {
  font-family: 'Mulish', sans-serif;
  font-size: .6875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-500) !important;
}

.wm-legal__meta strong { color: var(--ink-300); font-weight: 500; }

/* --- Body layout -------------------------------------------------------------
   Contents on the left, document on the right. On narrow screens the contents
   collapses to a plain list above the text rather than being hidden — on a
   phone it is more useful, not less. */

.wm-legal__body {
  display: grid;
  gap: 2.5rem;
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
}

@media (width >= 62rem) {
  .wm-legal__body {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 4rem;
    align-items: start;
  }

  .wm-legal__toc {
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
  }
}

/* --- Contents ---------------------------------------------------------------- */

.wm-legal__toc-title {
  margin: 0 0 1rem;
  font-family: 'Mulish', sans-serif;
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-500) !important;
}

.wm-legal__toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.wm-legal__toc a {
  display: flex;
  gap: .625rem;
  font-size: .8125rem;
  line-height: 1.4;
  text-decoration: none;
  color: var(--ink-600) !important;
  transition: color .15s ease;
}

.wm-legal__toc a::before {
  counter-increment: toc;
  content: counter(toc, decimal-leading-zero);
  font-family: 'Mulish', sans-serif;
  font-size: .625rem;
  letter-spacing: .08em;
  color: var(--ink-500);
  padding-block-start: .15em;
  flex-shrink: 0;
}

.wm-legal__toc a:hover { color: var(--azure-700) !important; }

/* --- Document ---------------------------------------------------------------- */

.wm-legal__doc {
  max-width: 70ch;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink-700) !important;
}

.wm-legal__doc > * + * { margin-block-start: 1.25rem; }

.wm-legal__doc h2 {
  margin-block: 3rem 1rem;
  padding-block-start: 1.75rem;
  border-top: 1px solid rgb(8 12 18 / .1);
  font-family: 'Mulish', sans-serif !important;
  font-weight: 900 !important;
  font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem) !important;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--ink-950) !important;
  /* Anchor targets clear the fixed header instead of hiding beneath it. */
  scroll-margin-top: 6rem;
}

.wm-legal__doc h2:first-child { margin-block-start: 0; border-top: 0; padding-block-start: 0; }

.wm-legal__doc h3 {
  margin-block: 2rem .5rem;
  font-family: 'Roboto', sans-serif !important;
  font-weight: 600 !important;
  font-size: 1.125rem !important;
  letter-spacing: -.011em;
  color: var(--ink-950) !important;
  scroll-margin-top: 6rem;
}

.wm-legal__doc p { margin: 0; color: var(--ink-700) !important; }

/* THE FIX. The template paints <strong> white inside content areas, which
   made every bold lead-in invisible against the card. */
.wm-legal__doc strong,
.wm-legal__doc b {
  color: var(--ink-950) !important;
  font-weight: 600;
}

.wm-legal__doc em, .wm-legal__doc i { color: var(--ink-600) !important; }

.wm-legal__doc ul,
.wm-legal__doc ol {
  margin: 0;
  padding-inline-start: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.wm-legal__doc li { color: var(--ink-700) !important; }
.wm-legal__doc li::marker { color: var(--azure-600); }

/* Text colour is capped by contrast on white, so the vivid azure goes into
   the underline — a 2px graphic only needs 3:1. */
.wm-legal__doc a {
  color: var(--azure-600) !important;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .18em;
  text-decoration-color: var(--azure-400);
  border-radius: 2px;
  transition: all .15s ease;
}

.wm-legal__doc a:hover {
  color: var(--azure-700) !important;
  background-color: #eaf7ff;
}

/* Callout for the clauses people actually need to notice. */
.wm-legal__doc blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 0;
  border-inline-start: 3px solid var(--azure-400);
  border-radius: 0 4px 4px 0;
  background-color: var(--ink-50);
  font-size: 1rem;
  color: var(--ink-800) !important;
}

.wm-legal__doc blockquote p { color: var(--ink-800) !important; }

.wm-legal__doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9375rem;
}

.wm-legal__doc th,
.wm-legal__doc td {
  text-align: left;
  padding: .75rem .875rem;
  border-bottom: 1px solid rgb(8 12 18 / .08);
  color: var(--ink-700) !important;
}

.wm-legal__doc th {
  font-family: 'Mulish', sans-serif;
  font-size: .625rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-500) !important;
}

/* --- Footer of the document --------------------------------------------------- */

.wm-legal__contact {
  margin-block-start: 3rem;
  padding: 1.5rem;
  border: 1px solid rgb(8 12 18 / .1);
  border-radius: 8px;
  background-color: var(--ink-50);
}

.wm-legal__contact h2 {
  margin: 0 0 .5rem !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: 1.125rem !important;
  font-family: 'Roboto', sans-serif !important;
  font-weight: 600 !important;
  color: var(--ink-950) !important;
}

.wm-legal__contact p { margin: 0; font-size: .9375rem; }

@media (prefers-reduced-motion: reduce) {
  .wm-legal *, .wm-legal *::before, .wm-legal *::after {
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
