/* Agent 16 — legal pages + 404 (privacy, terms, cookies, 404 only).
   Style-only layer on top of assets/css/main.css. No webfonts, no
   external requests, no new brand colours: every colour below reuses
   the contract anchors or the existing main.css tokens.
   Visible copy is untouched by this file; it only restyles markup
   that already exists. */
:root{
  --navy:#0B1220; --teal:#20C9C0; --blue:#0E5BD6;
  --ink:#0B1220; --muted:#5B6472; --paper:#fff; --line:#E5E7EB;
  --radius-sm:8px; --radius-md:12px; --radius-lg:18px;
  --shadow-sm:0 1px 2px rgba(11,18,32,.06);
  --shadow-md:0 8px 24px rgba(11,18,32,.08);
  --shadow-lg:0 20px 48px rgba(11,18,32,.14);
  --ease-out:cubic-bezier(.22,.61,.36,1);
  --dur-fast:.15s; --dur-normal:.35s; --dur-slow:.6s;
}

/* ---- Contract motion classes (transform + opacity only) ----
   Hidden state applies ONLY when JS ran (html.js is added by
   legal-reveal.js). Without JS, content is never hidden. */
html.js .reveal{
  opacity:0; transform:translateY(16px);
  transition:opacity var(--dur-normal) var(--ease-out),
             transform var(--dur-normal) var(--ease-out);
}
html.js .reveal.is-visible{opacity:1; transform:none}
@media (prefers-reduced-motion:reduce){
  html.js .reveal{opacity:1; transform:none; transition:none}
}

/* ---- Legal hero: abstract geometric motif, decorative only ---- */
.legal-hero{overflow:hidden}
.legal-motif{
  display:none; position:absolute; right:24px; top:50%;
  width:220px; height:220px; transform:translateY(-50%);
  pointer-events:none;
}
@media (min-width:1240px){.legal-motif{display:block}}

/* ---- Legal document layout: sticky section nav + readable column ---- */
.legal-layout{display:grid; grid-template-columns:240px minmax(0,1fr); gap:56px; align-items:start}
.legal-toc{position:sticky; top:200px} /* below the tallest sticky-header variant (~188px) */
.legal-toc ul{list-style:none; margin:0; padding:0; border-top:1px solid var(--line)}
.legal-toc li{margin:0; border-bottom:1px solid var(--line)}
.legal-toc a{
  display:block; padding:12px 14px 12px 12px; color:var(--ink);
  text-decoration:none; font-size:15px; font-weight:600; line-height:1.5;
  border-left:3px solid transparent;
  transition:border-color var(--dur-fast) var(--ease-out),
             background-color var(--dur-fast) var(--ease-out);
}
.legal-toc a:hover{background:#F2F4F7; border-left-color:var(--teal); color:var(--ink)}
.legal-toc a:focus-visible{border-left-color:var(--blue)}

.legal-doc{font-size:18px; line-height:1.8; max-width:74ch}
.legal-doc h2{font-size:clamp(28px,3.4vw,36px); margin-bottom:10px}
.legal-doc .small{font-size:15px}
.legal-doc .small::before{
  content:""; display:inline-block; width:8px; height:8px; border-radius:50%;
  background:var(--teal); margin-right:8px; vertical-align:1px;
}
.legal-doc h3{
  font-size:22px; line-height:1.35; margin:44px 0 12px;
  padding-left:16px; border-left:4px solid var(--teal);
  scroll-margin-top:200px; /* anchors land below the sticky header */
}
.legal-doc h3:first-of-type{margin-top:32px}
.legal-doc .notice{
  border-left:4px solid #E8C87A; box-shadow:var(--shadow-sm);
  font-size:17px;
}
.legal-doc ul li{margin-bottom:8px}
.legal-doc a{font-weight:600}

.legal-cta-section .legal-cta{text-align:center; padding:32px}
.legal-cta-section .legal-cta .btn{margin-top:6px}

/* ---- 404: centred, on-brand dead end (copy unchanged) ---- */
.notfound-hero{text-align:center}
.notfound-hero .wrap::before{margin-left:auto; margin-right:auto}
.notfound-hero h1, .notfound-hero p.lead{margin-left:auto; margin-right:auto}
.notfound-actions{text-align:center}
.notfound-motif{max-width:360px; margin:0 auto 8px}
.notfound-motif svg{width:100%; height:auto; display:block}
.notfound-actions h2{margin-bottom:16px}
.notfound-actions .btn{margin:4px}

/* ---- Responsive ---- */
@media (max-width:900px){
  .legal-layout{grid-template-columns:1fr; gap:28px}
  .legal-toc{position:static}
  .legal-toc ul{
    display:flex; gap:8px; overflow-x:auto; padding-bottom:8px;
    border-top:0; scrollbar-width:thin;
  }
  .legal-toc li{flex:none; border-bottom:0}
  .legal-toc a{
    border:1px solid var(--line); border-left:1px solid var(--line);
    border-radius:999px; padding:9px 14px; white-space:nowrap;
    background:#fff;
  }
  .legal-toc a:hover{border-color:var(--teal); background:#E6F7F6}
  .legal-doc{font-size:17px; line-height:1.75}
  .legal-doc h3{scroll-margin-top:100px}
  .notfound-motif{max-width:300px}
}
@media (max-width:640px){
  .legal-doc{font-size:17px}
  .legal-doc h3{padding-left:12px}
  .notfound-actions .btn{width:100%; margin:6px 0}
}

/* ---- Print: clean document, no chrome ---- */
@media print{
  header.site, footer.site, .legal-toc, .legal-cta-section,
  .legal-motif, .notfound-motif, .skip-link, .legal-hero .hero-cta{display:none !important}
  .legal-hero{background:#fff; color:#000; padding:24px 0}
  .legal-hero h1, .legal-hero p.lead, .legal-hero .eyebrow{color:#000}
  .legal-layout{display:block}
  .legal-doc{max-width:none; font-size:12pt; line-height:1.6}
  html.js .reveal{opacity:1; transform:none}
}
