:root {
  color-scheme: light;
  --legal-ink: #31566b;
  --legal-pink: #fbe5f0;
  --legal-header: #f8d7e8;
  --legal-paper: #fff9fc;
  --legal-line: #d6afc7;
  --legal-lilac: #eee2fb;
  font-family: Arial, sans-serif;
  background: var(--legal-pink);
  color: var(--legal-ink);
}

* { box-sizing: border-box; }
html.legal-document { height: auto; min-height: 100%; overflow-y: auto; overscroll-behavior-y: auto; background: var(--legal-pink); }
body.legal-page { height: auto; min-height: 100%; margin: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: auto; background: var(--legal-pink); color: var(--legal-ink); font: 1rem/1.65 Arial, sans-serif; }
.legal-page header,
.legal-page footer { padding: 24px max(20px, calc((100% - 900px) / 2)); background: var(--legal-header); }
.legal-page header { display: flex; min-height: 88px; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.legal-brand { display: inline-flex; width: 88px; height: 47px; align-items: center; text-decoration: none; }
.legal-brand img { display: block; width: 100%; height: 100%; object-fit: contain; }
.legal-back { font-weight: 800; }
.legal-page a { color: var(--legal-ink); text-decoration: underline; text-underline-offset: 3px; }
.legal-page main { width: min(900px, calc(100% - 40px)); margin: 30px auto 80px; padding: clamp(18px, 4vw, 40px); border: 1px solid var(--legal-line); border-radius: 24px; background: var(--legal-paper); }
.legal-page h1 { margin-top: 0; font-size: clamp(2rem, 6vw, 3rem); line-height: 1.15; }
.legal-page h2 { margin-top: 30px; font-size: 1.4rem; line-height: 1.25; }
.legal-page table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.legal-page th,
.legal-page td { border: 1px solid var(--legal-line); padding: 12px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.legal-page footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.legal-updated { color: #5e7380; font-size: .92rem; font-weight: 700; }
.primary-button,
.secondary-button { display: inline-block; border: 1px solid var(--legal-ink); border-radius: 12px; padding: 13px 16px; background: #f7cfe2; color: var(--legal-ink); font: inherit; font-weight: 800; cursor: pointer; }
.privacy-settings { width: calc(100% - 32px); max-width: 600px; max-height: 85vh; overflow: auto; border: 2px solid #b293c8; border-radius: 22px; padding: 24px; background: var(--legal-lilac); color: var(--legal-ink); font: 1rem/1.5 Arial, sans-serif; }
.privacy-settings::backdrop { background: #31566b70; }
.privacy-settings label { display: flex; gap: 10px; font-weight: bold; }
.privacy-settings input { width: 20px; height: 20px; }
.privacy-settings .choice-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.privacy-banner { position: fixed; z-index: 10000; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); left: 16px; width: min(760px, calc(100% - 32px)); margin: auto; padding: 18px; border: 2px solid #b293c8; border-radius: 20px; background: var(--legal-lilac); box-shadow: 0 12px 40px #31566b40; color: var(--legal-ink); font: 1rem/1.45 Arial, sans-serif; }
.privacy-banner-copy { display: flex; gap: 12px; align-items: flex-start; }
.privacy-banner-copy p { margin: 4px 0 0; }
.privacy-cookie { font-size: 1.6rem; line-height: 1; }
.privacy-banner .choice-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.privacy-banner a,
.privacy-settings a { color: var(--legal-ink); }
.privacy-banner button,
.privacy-settings button { min-height: 46px; }
.text-link { border: 0; padding: 10px; background: transparent; color: var(--legal-ink); font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }

@media (max-width: 600px) {
  .legal-page main { width: min(100% - 24px, 900px); margin-top: 18px; padding: 18px; }
  .legal-page th,
  .legal-page td { padding: 8px; }
  .privacy-banner { right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); left: 10px; width: calc(100% - 20px); padding: 15px; }
  .privacy-banner .choice-actions > *,
  .privacy-settings .choice-actions > * { width: 100%; }
}

/* Keep solicitor tables readable on narrow screens. */
.legal-table-scroll { max-width:100%; overflow-x:auto; }
.legal-table-scroll table { min-width:600px; }
