/* Legal & compliance pages
   ---------------------------------------------------------
   Typography for long-form legal prose. Designed to be calm,
   readable, and unambiguous. No flourishes — just hierarchy.
   --------------------------------------------------------- */

.page-hero--legal {
  padding-bottom: var(--space-xl);
}
.page-hero--legal .hero-meta {
  margin-top: var(--space-md);
  font-size: 14px;
  color: var(--mid);
}
.page-hero--legal .hero-meta time {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- US / International toggle (terms page) ---------- */
.legal-toggle {
  display: inline-flex;
  background: var(--lighter);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  margin: 0 auto var(--space-2xl);
  display: flex;
  width: max-content;
}
.legal-toggle-btn {
  appearance: none;
  border: 0;
  background: transparent;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  color: var(--mid);
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: color var(--t-base) var(--ease), background var(--t-base) var(--ease);
  letter-spacing: 0.01em;
}
.legal-toggle-btn:hover {
  color: var(--ink);
}
.legal-toggle-btn--active {
  background: var(--ink);
  color: var(--white);
}
.legal-toggle-btn--active:hover {
  color: var(--white);
}

/* When the toggle is present, terms_international starts hidden */
#terms_international {
  display: none;
}

/* ---------- Container for legal prose ---------- */
.legal-section {
  background: var(--white);
  padding: var(--space-3xl) 0;
  border-top: 1px solid var(--border);
}
.legal-container {
  max-width: 760px;
  text-align: left;
}
.legal-container > .legal-toggle {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Legal prose typography ---------- */
.legal-prose {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
}

.legal-prose h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 var(--space-lg);
  line-height: 1.15;
}
.legal-prose h3,
.legal-prose h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: var(--space-2xl) 0 var(--space-sm);
  line-height: 1.3;
  scroll-margin-top: 100px;
}
.legal-prose h3:first-child,
.legal-prose h4:first-child {
  margin-top: 0;
}
.legal-prose p {
  margin: 0 0 var(--space-md);
  color: var(--ink);
}
.legal-prose p:last-child {
  margin-bottom: 0;
}

.legal-prose strong { font-weight: 600; }
.legal-prose em { font-style: italic; }

/* Lists */
.legal-prose ol,
.legal-prose ul {
  margin: 0 0 var(--space-md);
  padding-left: 1.6em;
}
.legal-prose ol > li,
.legal-prose ul > li {
  margin: 0 0 0.5em;
  padding-left: 0.3em;
}
.legal-prose ol[type="a"] > li::marker,
.legal-prose ol[type="i"] > li::marker {
  color: var(--mid);
  font-weight: 500;
}
.legal-prose ol > li::marker {
  color: var(--pink);
  font-weight: 600;
}

/* Links */
.legal-prose a,
.legal-prose a.link_color_blue,
.legal-prose a.link_color_dgrey {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--pink-soft, rgba(234, 22, 134, 0.35));
  transition: border-color var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.legal-prose a:hover {
  color: var(--pink);
  border-bottom-color: var(--pink);
}

/* Tone down screaming all-caps disclaimer paragraphs slightly while
   preserving their content verbatim. */
.legal-prose p:has(+ h4) {
  /* trailing paragraph before a new section heading */
}

/* Address/contact block at the bottom of some legal pages */
.legal-prose address {
  font-style: normal;
  padding: var(--space-lg);
  background: var(--lighter);
  border-left: 3px solid var(--pink);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: var(--space-lg) 0;
}

/* Legacy class neutralisers — content from dist/ ships with these */
.legal-prose .section_block,
.legal-prose .section_block_container,
.legal-prose .terms {
  background: transparent;
  padding: 0;
  margin: 0;
  max-width: none;
}
.legal-prose .color_pink { color: var(--pink); }
.legal-prose .color_blue { color: var(--blue); }

/* Hide the old in-content terms toggle (we render our own in the chrome) */
.legal-prose .terms_which { display: none; }

/* Generic centred PCI sub-banners that used to span the page */
.legal-prose .text-center { text-align: center; }

/* ---------- Sitemap layout ---------- */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-xl);
}
.sitemap-col {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--space-xl);
  transition: box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.sitemap-col:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.sitemap-col h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 var(--space-md);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sitemap-col h3 .fi {
  color: var(--pink);
  font-size: 20px;
}
.sitemap-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sitemap-col li { margin-bottom: 8px; }
.sitemap-col li:last-child { margin-bottom: 0; }
.sitemap-col a {
  color: var(--mid);
  text-decoration: none;
  font-size: 14px;
  display: inline-block;
  position: relative;
  padding-left: 0;
  transition: color var(--t-base) var(--ease), padding-left var(--t-base) var(--ease);
}
.sitemap-col a:hover {
  color: var(--ink);
  padding-left: 4px;
}
.sitemap-col a:hover::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--pink);
}

@media (max-width: 720px) {
  .legal-section { padding: var(--space-2xl) 0; }
  .legal-container { padding: 0 var(--space-md); }
  .legal-toggle { width: 100%; justify-content: center; }
  .legal-toggle-btn { flex: 1; padding: 10px 16px; }
}
