/* legal — the privacy and cookie policies' own styles; the tokens are tokens.css, the header, footer and buttons site.css */
/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ink) var(--grain-dark); color: var(--bone); font-family: var(--f-body); font-size: var(--t-body); line-height: 1.7; overflow-x: hidden; }
/* Parchment ground — light mode only */
html:not([data-theme="dark"]) body {
  background-color: var(--ink);
  background-image:
  radial-gradient(125% 90% at 50% -8%, rgba(255,251,238,.28), transparent 58%),
  radial-gradient(110% 120% at 50% 118%, rgba(74,54,22,.045), transparent 55%);
  background-attachment: fixed, fixed;
  background-repeat: no-repeat;
}
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.15; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 2px; }

/* ============ The document ============ */
.legal { padding-block: clamp(var(--s4), 7vw, var(--s6)) var(--s6); }
.legal-doc { max-width: 78ch; }
.legal-head { padding-bottom: var(--s3); border-bottom: 1px solid var(--border); }
.legal-head .eyebrow { display: block; font-family: var(--f-title); font-size: var(--t-xs); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--btn-red); margin-bottom: 10px; }
[data-theme="dark"] .legal-head .eyebrow { color: var(--gold-hi); }
.legal-head h1 { font-family: var(--f-hero); font-weight: 400; font-size: clamp(2.5rem, 1.7rem + 3vw, 4rem); letter-spacing: .01em; line-height: 1; color: var(--bone); }
.legal-head .lead { margin-top: var(--s2); font-size: 1.1875rem; line-height: 1.6; color: var(--muted); }
.legal-head .updated { margin-top: var(--s1); font-size: var(--t-sm); color: var(--faint); }

.legal-toc { margin-top: var(--s3); padding: var(--s2) var(--s3); background: var(--surface); border: 1px solid var(--border); border-top: 2px solid color-mix(in oklab, var(--gold-hi) 55%, transparent); border-radius: 0 0 10px 10px; }
.legal-toc h2 { font-family: var(--f-title); font-size: var(--t-xs); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.legal-toc ol { margin: 0; padding-left: 1.4em; columns: 2 18rem; column-gap: var(--s3); font-size: var(--t-sm); line-height: 1.5; }
.legal-toc li { padding-block: 4px; break-inside: avoid; }
.legal-toc a { color: var(--muted); text-decoration: none; }
@media (hover: hover) { .legal-toc a:hover { color: var(--bone); text-decoration: underline; } }

.legal-sec { padding-top: var(--s4); scroll-margin-top: var(--s2); }
.legal-sec h2 { font-family: var(--f-title); font-weight: 700; font-size: clamp(1.3125rem, 1.15rem + .6vw, 1.625rem); line-height: 1.3; color: var(--bone); }
.legal-sec h3 { margin-top: var(--s3); font-family: var(--f-title); font-weight: 700; font-size: 1.125rem; line-height: 1.35; color: var(--bone); }
.legal-sec p, .legal-sec ul { margin-top: var(--s1); color: var(--muted); }
.legal-sec ul { padding-left: 1.3em; }
.legal-sec li + li { margin-top: 8px; }
.legal-sec strong { color: var(--bone); font-weight: 700; }
.legal-sec a { color: var(--bone); text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--gold-hi) 70%, transparent); text-underline-offset: 3px; }
.legal-sec code { font-size: .9em; padding: 1px 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; color: var(--bone); white-space: nowrap; }

/* a table of what is kept: on phones every row becomes a card of its own */
.legal-table { width: 100%; margin-top: var(--s2); border-collapse: collapse; font-size: var(--t-sm); line-height: 1.55; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.legal-table th, .legal-table td { padding: 12px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--border); }
.legal-table thead th { border-top: 0; font-family: var(--f-title); font-size: var(--t-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); background: var(--surface-hi); }
.legal-table td { color: var(--muted); }
.legal-table td:first-child { color: var(--bone); font-weight: 600; }

.legal-note { margin-top: var(--s2); padding: var(--s2); background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--gold-hi); border-radius: 0 10px 10px 0; color: var(--muted); }

/* ============ Responsive ============ */
@media (max-width: 767px) {
  .legal-toc { padding: var(--s2); }
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table td { display: block; width: 100%; }
  .legal-table { background: none; border: 0; }
  .legal-table thead { display: none; }
  .legal-table tr { margin-top: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
  .legal-table td { border-top: 0; padding: 4px 14px; }
  .legal-table td:first-child { padding-top: 12px; }
  .legal-table td:last-child { padding-bottom: 12px; }
  .legal-table td[data-th]::before { content: attr(data-th) ": "; font-weight: 700; color: var(--faint); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
