/* legal.css — legalese / utility page template, Les Experts AI whiteboard system
   A quieter register of the brand: same ink + paper, less confetti.
   Loads AFTER landing-c.css + landing-fx.css. */

/* ---------- document header ---------- */
.legal-head {
  padding: 48px 0 14px;
  text-align: center;
}
.legal-cat {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 19px;
  line-height: 1;
  padding: 6px 16px 8px;
  border: 2px solid var(--ink);
  background: var(--paper);
  border-radius: 225px 12px 255px 12px / 12px 255px 12px 225px;
  box-shadow: 2px 3px 0 rgba(30, 30, 30, 0.14);
  transform: rotate(-1.2deg);
  margin-bottom: 18px;
}
.legal-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 48px;
  line-height: 1.08;
  margin: 0 0 10px;
  text-wrap: balance;
}
.legal-sub {
  font-size: 16.5px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
  text-wrap: pretty;
}
.legal-updated {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 20px;
  margin-top: 18px;
  transform: rotate(-1.5deg);
}
.legal-updated .marker-hl { padding: 1px 10px 3px; }

/* ---------- layout: sticky toc + document ---------- */
.legal-layout {
  display: grid;
  grid-template-columns: 212px 1fr;
  gap: 44px;
  align-items: start;
  padding: 36px 0 64px;
  border-top: 3px dashed color-mix(in srgb, var(--ink) 85%, transparent);
  margin-top: 34px;
}
.legal-toc {
  position: sticky;
  top: 86px;
  border: 2px solid var(--ink);
  border-radius: 15px 255px 15px 225px / 225px 15px 255px 15px;
  background: var(--paper);
  padding: 16px 18px 18px;
  box-shadow: 2px 3px 0 rgba(30, 30, 30, 0.12);
}
.legal-toc-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  margin: 0 0 10px;
  transform: rotate(-1deg);
}
.legal-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  counter-reset: toc;
}
.legal-toc li { counter-increment: toc; }
.legal-toc a {
  display: flex;
  gap: 8px;
  align-items: baseline;
  color: var(--ink);
  text-decoration: none;
  font-size: 13.5px;
  line-height: 1.3;
}
.legal-toc a::before {
  content: counter(toc);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  flex: none;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.6px solid var(--ink);
  border-radius: 52% 48% 50% 50% / 48% 52% 50% 50%;
  background: var(--c-cream);
}
.legal-toc a:hover { text-decoration: underline wavy 1px; text-underline-offset: 3px; }

/* ---------- document body ---------- */
.legal-doc { min-width: 0; max-width: 660px; }
.legal-sec { scroll-margin-top: 86px; }
.legal-sec + .legal-sec { margin-top: 40px; }
.legal-sec h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 31px;
  line-height: 1.05;
  margin: 0 0 12px;
}
.legal-sec h2 .sec-num {
  flex: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 2.2px solid var(--ink);
  border-radius: 52% 48% 50% 50% / 48% 52% 50% 50%;
  background: var(--c-cream);
}
.legal-sec h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  margin: 22px 0 8px;
  line-height: 1.1;
}
.legal-sec p { margin: 0 0 14px; font-size: 15.5px; line-height: 1.6; }
.legal-sec ul, .legal-sec ol { margin: 0 0 14px; padding-left: 22px; font-size: 15px; }
.legal-sec li { margin-bottom: 6px; }
.legal-sec a {
  color: var(--ink);
  text-decoration: underline wavy 1px;
  text-underline-offset: 3px;
}
.legal-sec a:hover { background: var(--c-cream); }

/* "in plain words" summary aside — the brand move for legalese */
.plain-words {
  margin: 16px 0 18px;
  padding: 12px 18px 13px;
  background: var(--c-cream);
  border: 2px solid var(--ink);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  font-size: 14.5px;
  line-height: 1.5;
}
.plain-words b {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 19px;
  margin-right: 6px;
}

/* warning / important callout */
.legal-important {
  margin: 16px 0 18px;
  padding: 12px 18px 13px;
  background: var(--c-pink);
  border: 2px solid var(--ink);
  border-radius: 15px 255px 15px 225px / 225px 15px 255px 15px;
  font-size: 14.5px;
}
.legal-important b { font-family: var(--font-head); font-size: 19px; margin-right: 6px; }

/* data table */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid var(--ink);
  border-radius: 12px;
  margin: 16px 0 18px;
  font-size: 14px;
  background: var(--paper);
  box-shadow: 2px 3px 0 rgba(30, 30, 30, 0.12);
}
.legal-table th {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 19px;
  text-align: left;
  padding: 9px 14px;
  border-bottom: 2.5px dashed var(--ink);
  background: var(--c-cream);
}
.legal-table td {
  padding: 9px 14px;
  border-bottom: 1.5px dashed rgba(30, 30, 30, 0.3);
  vertical-align: top;
  line-height: 1.45;
}
.legal-table tr:last-child td { border-bottom: none; }
.legal-table td:first-child { font-weight: 600; white-space: nowrap; }
.legal-table small { color: var(--muted); display: block; margin-top: 2px; font-size: 12px; }

/* contact block */
.legal-contact {
  margin-top: 44px;
  padding: 20px 24px;
  background: var(--c-blue);
  border: 2px solid var(--ink);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}
.legal-contact h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 27px;
  margin: 0 0 8px;
}
.legal-contact p { margin: 0; font-size: 15px; }

/* ---------- payment-page extras ---------- */
.country-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
  padding: 4px 12px 6px;
  border: 1.8px solid var(--ink);
  border-radius: 99px;
  background: var(--c-green);
  transform: rotate(-1deg);
  margin-left: 6px;
}
.pay-steps {
  counter-reset: pay;
  list-style: none;
  padding-left: 0 !important;
}
.pay-steps li {
  counter-increment: pay;
  position: relative;
  padding-left: 34px;
  margin-bottom: 8px;
}
.pay-steps li::before {
  content: counter(pay);
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  border: 1.8px solid var(--ink);
  border-radius: 52% 48% 50% 50% / 48% 52% 50% 50%;
  background: var(--c-cream);
}

/* ---------- mobile ---------- */
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; gap: 28px; }
  .legal-toc { position: static; }
}
@media (max-width: 760px) {
  .legal-head { padding: 36px 0 8px; }
  .legal-title { font-size: 36px; }
  .legal-sec h2 { font-size: 26px; }
  .legal-table { font-size: 13px; display: block; overflow-x: auto; }
  .legal-table td:first-child { white-space: normal; }
}

/* ---------- geo-aware region switcher (US · EU/UK · Québec) ----------
   Paired with legal-region.js. Mirrors the .lang-switch pill register
   from landing-c.css, wrapped in the whiteboard frame used by .legal-cat
   / .country-tag (2px ink border, irregular radii, offset shadow). Sits
   inside .legal-head, below the title. */
.region-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 5px 13px 6px;
  font-family: var(--font-head);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 255px 14px 225px 14px / 14px 225px 14px 255px;
  box-shadow: 2px 3px 0 rgba(30, 30, 30, 0.14);
  transform: rotate(-1deg);
}
.region-opt {
  font-family: var(--font-head);
  font-size: 17px;
  line-height: 1;
  color: var(--ink);
  background: none;
  border: none;
  padding: 2px 3px 3px;
  margin: 0;
  cursor: pointer;
  opacity: 0.42;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: opacity 0.2s ease, transform 0.12s ease;
}
.region-opt:hover { opacity: 0.78; }
.region-opt.is-active {
  opacity: 1;
  font-weight: 700;
  background-image: linear-gradient(transparent 56%, var(--c-yellow) 56%, var(--c-yellow) 92%, transparent 92%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.region-opt:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.region-sep {
  opacity: 0.38;
  font-size: 15px;
  user-select: none;
  color: var(--muted);
}

/* small disclaimer line under the switcher */
.region-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-wrap: pretty;
}

/* region content-block visibility */
.is-region-hidden { display: none !important; }
[data-region][hidden] { display: none !important; }

@media (max-width: 760px) {
  .region-switch { gap: 5px; margin-top: 14px; }
  .region-opt { font-size: 16px; }
}

