/* ===================================================================
   Inkwell — legal pages (privacy notice, and anything else that is a
   long piece of prose rather than a marketing section).

   Loads AFTER hero.css and home-v2.css and inherits their tokens:
   --ink, --sea, --teal-deep, --n-*, --body-size, --body-leading,
   --h1-size, --card-shadow, .wrap and .section.
   =================================================================== */

.section-legal { padding-top: clamp(38px, 4vw, 60px); }

/* One card holds the whole notice, so the prose sits on white and the
   page field stays visible down both margins. */
.legal-card {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(26px, 3.4vw, 56px);
  background: #fff;
  border: 1px solid var(--n-200);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
}

/* ---------- prose ---------- */

.legal-card p,
.legal-card li {
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--n-700);
}

.legal-card p { margin: 0 0 1em; }

/* hero.css strips the marker off every ul on the site, which is right for
   nav and footer lists and wrong for a page that is mostly prose. Lists in
   the notice ask for their markers back. .legal-toc overrides this again
   further down, because its numbering is drawn by a counter. */
.legal-card ul,
.legal-card ol { margin: 0 0 1.2em; padding-left: 1.35em; }
.legal-card ul { list-style: disc; }
.legal-card ol { list-style: decimal; }
.legal-card li { margin-bottom: .55em; }
.legal-card li::marker { color: var(--sea); }

.legal-card strong { color: var(--n-900); font-weight: 700; }

/* hero.css resets every anchor to `color: inherit; text-decoration: none`,
   which is right for nav, footer and card links that carry their own
   affordance. In running prose a link has nothing else to signal it, so the
   notice puts the colour and the underline back. */
.legal-card a {
  color: var(--teal-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.legal-card a:hover { color: var(--blue-deep); }

/* Standfirst under the H1 — set apart by a rule, and a shade lighter than
   the body copy. Needs to outrank `.legal-card p` above to get its colour. */
.legal-card .legal-meta {
  margin: 0 0 clamp(26px, 3vw, 38px);
  padding-bottom: clamp(22px, 2.6vw, 32px);
  border-bottom: 1px solid var(--n-200);
  font-size: var(--body-size);
  line-height: 1.6;
  color: var(--n-600);
}

/* ---------- contents ---------- */

.legal-toc {
  margin: 0 0 clamp(30px, 3.4vw, 46px);
  padding: clamp(20px, 2.2vw, 28px) clamp(22px, 2.4vw, 32px);
  background: var(--n-25);
  border: 1px solid var(--n-200);
  border-radius: 12px;
}

.legal-toc h2 {
  margin: 0 0 .85em;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  columns: 2;
  column-gap: clamp(20px, 3vw, 44px);
}

.legal-toc li {
  margin: 0 0 .5em;
  break-inside: avoid;
  font-size: var(--body-sm);
  line-height: 1.4;
  counter-increment: toc;
}

.legal-toc li::before {
  content: counter(toc) ".";
  margin-right: .5em;
  font-variant-numeric: tabular-nums;
  color: var(--n-500);
}

.legal-toc a {
  color: var(--n-700);
  text-decoration: none;
}
.legal-toc a:hover { color: var(--teal-deep); text-decoration: underline; }

/* ---------- sections ---------- */

.legal-block { scroll-margin-top: calc(var(--nav-h) + 28px); }
.legal-block + .legal-block { margin-top: clamp(34px, 3.6vw, 52px); }

.legal-block h2 {
  margin: 0 0 .7em;
  font-size: clamp(21px, 1.8vw, 26px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: #111213;
}

.legal-block h3 {
  margin: 1.6em 0 .55em;
  font-size: clamp(16px, 1.3vw, 19px);
  font-weight: 700;
  color: var(--n-900);
}

/* ---------- tables ---------- */

/* Wide tables scroll inside their own box rather than pushing the page
   sideways on a phone. */
.legal-scroll {
  margin: 0 0 1.4em;
  overflow-x: auto;
  border: 1px solid var(--n-200);
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--body-sm);
  line-height: 1.5;
  text-align: left;
}

.legal-table--wide { min-width: 720px; }

.legal-table thead th {
  padding: 13px 16px;
  background: var(--n-50);
  border-bottom: 1px solid var(--n-200);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal-deep);
  white-space: nowrap;
}

.legal-table tbody th,
.legal-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--n-100);
  vertical-align: top;
  color: var(--n-700);
}

.legal-table tbody th {
  font-weight: 700;
  color: var(--n-900);
}

.legal-table tbody tr:last-child th,
.legal-table tbody tr:last-child td { border-bottom: 0; }

.legal-table tbody tr:nth-child(even) { background: var(--n-25); }

/* ---------- unfilled placeholders ---------- */

/* Marks the details that still need a real value before this notice is
   published. Deliberately loud, so nobody ships it by accident. */
.legal-todo {
  padding: .1em .45em;
  background: #FFF3D6;
  border: 1px dashed #D9A521;
  border-radius: 5px;
  font-size: .95em;
  font-weight: 600;
  color: #8A6100;
}

@media (max-width: 720px) {
  .legal-toc ol { columns: 1; }
}
