/* South Africa content pages (service pages, guides, about, partners, privacy) and the /wa page: shared layer loaded
   after each page's own inline styles, so it wins at equal specificity. Same design system as the homepage
   (src/za.css): warm off-white page, one serious green, rounded cards, calm emergency box with tel buttons, a
   readable column (17-18px, about 70 characters a line), dark theme from the visitor's own system setting.
   No web font: system fonts load instantly. */

:root {
  --za-bg: #FAF7F2;
  --za-surface: #FFFFFF;
  --za-soft: #F3EEE5;
  --za-ink: #1C2321;
  --za-text: #2A322E;
  --za-muted: #535C57;
  --za-line: #E3DCD0;
  --za-green: #0B6E4F;
  --za-green-dark: #08523B;
  --za-link: #0B6E4F;
  --za-green-tint: #E5F1EA;
  --za-on-tint: #074B35;
  --za-em: #B42318;
  --za-em-bg: #FDF1EE;
  --za-em-line: #EDC3BA;
  --za-note-bg: #FBF4E2;
  --za-note-line: #E6CF95;
  --za-focus: #1D4ED8;
  --za-shadow: none;
  --za-radius: 14px;
  /* the page's own inline variables, mapped to the same tokens (some pages had a blue palette) */
  --primary: var(--za-link);
  --primary-dark: var(--za-green-dark);
  --accent: var(--za-green);
  --text: var(--za-ink);
  --muted: var(--za-muted);
  --bg: var(--za-bg);
  --white: var(--za-surface);
  --border: var(--za-line);
  --radius: 12px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --za-bg: #121715;
    --za-surface: #1A211E;
    --za-soft: #222A26;
    --za-ink: #F0F3F1;
    --za-text: #DDE3DF;
    --za-muted: #AEB8B2;
    --za-line: #33403A;
    --za-green: #0B6E4F;
    --za-green-dark: #0D7E5B;
    --za-link: #7FD4AE;
    --za-green-tint: #183A2C;
    --za-on-tint: #BDEBD5;
    --za-em: #FF9F92;
    --za-em-bg: #2B1916;
    --za-em-line: #6A3229;
    --za-note-bg: #2A2416;
    --za-note-line: #6B5A2C;
    --za-focus: #93C5FD;
    --za-shadow: none;
  }
}

html { scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--za-bg); color: var(--za-text); font-size: 18px; line-height: 1.65; }
a { color: var(--za-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--za-focus); outline-offset: 2px; border-radius: 4px; }
.za-skip { position: absolute; left: -999px; top: 8px; z-index: 300; background: var(--za-surface); color: var(--za-ink); padding: 10px 14px; border-radius: 8px; }
.za-skip:focus { left: 8px; }
.za-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header: logo, one WhatsApp button, no one-language picker */
.lp-header { background: var(--za-surface); border-bottom: 1px solid var(--za-line); padding: 10px 20px; }
.lp-header-inner { max-width: 1040px; gap: 16px; }
@media (min-width: 900px) { .lp-header-inner { max-width: 680px; } }
.lp-logo { display: flex; align-items: center; min-height: 44px; }
.lp-logo img { height: 32px; width: auto; display: block; }
.lp-nav { gap: 18px; }
.lp-nav-link { color: var(--za-ink); font-size: 16px; font-weight: 600; text-decoration: none; padding: 10px 2px; }
.lp-nav-link:hover { color: var(--za-link); text-decoration: underline; }
/* English only: the one-language picker the shared build adds is never shown */
.lp-lang { display: none !important; }
.lp-nav-btn.za-wa, .lp-btn-primary.za-wa, .za-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--za-green) !important; color: #fff !important; border: 0; text-decoration: none !important; font-weight: 700; text-align: center; line-height: 1.25; }
.lp-nav-btn.za-wa { min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 15px; }
.lp-nav-btn.za-wa:hover, .lp-btn-primary.za-wa:hover, .za-btn:hover { background: var(--za-green-dark) !important; }
.za-wa svg { width: 20px; height: 20px; flex-shrink: 0; }
.lp-nav-btn.za-wa svg { width: 18px; height: 18px; }

/* page column: about 70 characters a line */
.lp-container { max-width: 720px; padding: 28px 20px 56px; }
.lp-breadcrumb { font-size: 15px; color: var(--za-muted); margin-bottom: 20px; }
.lp-breadcrumb a { color: var(--za-muted); display: inline-block; padding: 6px 0; }

/* hero: on the page itself, not boxed */
.lp-hero { background: none; border: 0; border-radius: 0; padding: 4px 0 32px; margin-bottom: 8px; }
.lp-badge { background: var(--za-green-tint); color: var(--za-on-tint); font-size: 14px; font-weight: 700; text-transform: none;
  letter-spacing: 0; padding: 4px 12px; border-radius: 999px; margin-bottom: 16px; }
h1 { font-size: clamp(30px, 4.6vw, 42px); line-height: 1.15; letter-spacing: -0.015em; color: var(--za-ink); margin-bottom: 16px; }
.lp-meta { font-size: 15px; color: var(--za-muted); margin-bottom: 14px; }
.lp-lead { font-size: 20px; line-height: 1.55; color: var(--za-text); margin-bottom: 26px; }
.lp-cta-row { gap: 12px 20px; align-items: center; }
.lp-btn-primary.za-wa, .za-btn { min-height: 56px; padding: 0 28px; border-radius: 12px; font-size: 18px; box-shadow: none; }
.za-next-line { font-size: 16px; color: var(--za-muted); margin: 14px 0 0; max-width: 60ch; }

/* emergency box: calm, one tap to the ambulance numbers, never hidden */
.za-em { background: var(--za-em-bg); border: 1px solid var(--za-em-line); border-radius: var(--za-radius); padding: 16px 18px; margin: 24px 0 0; color: var(--za-ink); }
.za-em-h { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; margin: 0 0 4px !important; color: var(--za-ink) !important; }
.za-em-h svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; color: var(--za-em); }
.za-em p { margin: 0 0 12px; color: var(--za-text); font-size: 17px; }
.za-tels { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 10px; }
.za-tel { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px;
  background: var(--za-surface); border: 2px solid var(--za-em); color: var(--za-em) !important; font-weight: 800; font-size: 17px; text-decoration: none !important; }
.za-tel:hover { background: var(--za-em-bg); }
.za-tel svg { width: 18px; height: 18px; flex-shrink: 0; }
.za-tel small { font-size: 15px; font-weight: 600; }
.za-em .za-em-more { font-size: 16px; margin: 0; }

/* article: one white sheet, generous rhythm, no rules above every heading */
.lp-content { background: var(--za-surface); border: 1px solid var(--za-line); border-radius: 18px; padding: 44px 48px; margin-bottom: 28px; box-shadow: var(--za-shadow); }
.lp-content h2 { font-size: 27px; line-height: 1.25; letter-spacing: -0.01em; color: var(--za-ink); border-top: 0; padding-top: 0; margin: 52px 0 14px; }
.lp-content h2:first-of-type, .lp-content > h2:first-child { margin-top: 0; }
.lp-content h3 { font-size: 20px; line-height: 1.35; color: var(--za-ink); margin: 30px 0 8px; }
.lp-content h4 { color: var(--za-ink); }
.lp-content p, .lp-content ul, .lp-content ol { color: var(--za-text); }
.lp-content p { margin-bottom: 18px; }
.lp-content ul, .lp-content ol { margin: 0 0 22px 26px; }
.lp-content li { margin-bottom: 10px; padding-left: 4px; }
.lp-content li::marker { color: var(--za-green); font-weight: 700; }
.lp-content strong { color: var(--za-ink); }
.lp-answer { background: none; border-left: 3px solid var(--za-green); border-radius: 0; padding: 2px 0 2px 18px; color: var(--za-ink) !important; font-size: 19px; line-height: 1.55; }
.lp-answer-alert { border-left-color: var(--za-em); }
.za-tels-in { margin: -4px 0 22px !important; }
.lp-redflag { background: var(--za-em-bg); border: 1px solid var(--za-em-line); border-radius: var(--za-radius); padding: 20px 22px 6px; margin: 20px 0 26px; }
.lp-redflag p, .lp-redflag li { color: var(--za-ink) !important; }
.lp-redflag h4 { color: var(--za-ink); font-size: 18px; }
.lp-redflag .lp-redflag-h { margin: 0 0 6px; font-size: 18px; }
.lp-redflag ul { margin-bottom: 14px; }
.lp-redflag li::marker { color: var(--za-em); }
.lp-box { background: var(--za-soft); border: 0; border-radius: var(--za-radius); }
.lp-note { background: var(--za-note-bg); border: 1px solid var(--za-note-line); border-radius: var(--za-radius); }
.lp-todo { background: var(--za-note-bg); color: var(--za-ink); }
.lp-copy { background: var(--za-green-tint); border: 1.5px dashed var(--za-green); border-radius: var(--za-radius); }
.lp-copy p { color: var(--za-ink) !important; }
.lp-copy-label { color: var(--za-on-tint) !important; font-size: 14px; text-transform: none; }
.lp-sources { font-size: 16px; }

/* tables (key facts) */
.lp-table-wrap { border: 1px solid var(--za-line); border-radius: 12px; }
table { font-size: 17px; }
th, td { border-bottom: 1px solid var(--za-line); padding: 14px 16px; color: var(--za-text); }
th { background: var(--za-soft); color: var(--za-ink); width: 28%; }

/* FAQ: question and answer read as one unit */
.lp-faq-item { border: 0; border-top: 1px solid var(--za-line); padding: 20px 0; }
.lp-faq-item:last-child { border-bottom: 0; }
.lp-faq-item h3 { font-size: 19px; line-height: 1.35; margin: 0 0 8px; color: var(--za-ink); }
.lp-faq-item p { font-size: 18px; color: var(--za-text); margin: 0; }
.lp-faq-section { margin-top: 44px; }

/* guides hub cards */
.guide-cards { gap: 14px; }
.guide-card { background: var(--za-surface); border: 1px solid var(--za-line); border-radius: var(--za-radius); padding: 22px; box-shadow: var(--za-shadow); }
.guide-card:hover { border-color: var(--za-green); }
.guide-card-title { font-size: 20px; color: var(--za-link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.guide-card-desc { font-size: 17px; color: var(--za-text) !important; }

/* closing block: one next step, what happens after, the emergency numbers, an address for questions */
.za-close { background: var(--za-surface); border: 1px solid var(--za-line); border-top: 4px solid var(--za-green); border-radius: 18px;
  padding: 34px 36px; margin: 0 0 28px; box-shadow: var(--za-shadow); }
.za-close h2 { font-size: 28px; line-height: 1.2; letter-spacing: -0.01em; color: var(--za-ink); margin: 0 0 10px; }
.za-close > p { margin: 0 0 20px; color: var(--za-text); }
.za-next { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; counter-reset: zanext; }
.za-next li { display: flex; gap: 14px; align-items: flex-start; color: var(--za-text); font-size: 17px; line-height: 1.5; }
.za-next li::before { counter-increment: zanext; content: counter(zanext); flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--za-green-tint); color: var(--za-on-tint); font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.za-close .za-mail { font-size: 16px; color: var(--za-muted); margin: 18px 0 0; }

/* related links */
.lp-related-guides { background: var(--za-soft); border-radius: var(--za-radius); padding: 24px 26px; margin: 0 0 24px; }
.lp-content .lp-related-guides { margin: 40px 0 0; }
.lp-related-guides h2, .lp-related-guides h3, .lp-content .lp-related-guides h2 { font-size: 19px; line-height: 1.35; color: var(--za-ink); margin: 0 0 10px; }
.lp-related-guides ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; grid-template-columns: 1fr; }
.lp-related-guides li { margin: 0; padding: 0; }
.lp-related-guides li a { display: inline-flex; align-items: center; min-height: 44px; font-size: 17px; font-weight: 600; }
.lp-page-note { font-size: 15px; line-height: 1.55; color: var(--za-muted); margin: 0 4px 8px; max-width: 64ch; }

/* footer */
.lp-footer { background: var(--za-soft); border-top: 1px solid var(--za-line); color: var(--za-text); text-align: left; font-size: 16px; padding: 36px 20px 32px; }
.lp-footer a { color: var(--za-ink); margin: 0; }
.za-foot { max-width: 1040px; margin: 0 auto; display: grid; gap: 22px; }
.za-foot-em { margin: 0; color: var(--za-ink); }
.za-foot-em strong { color: var(--za-ink); }
.za-foot .za-tels { margin: 10px 0 0; }
.za-foot nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 22px; }
.za-foot nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.za-foot p { margin: 0; }
.za-foot .za-foot-small { color: var(--za-muted); font-size: 15px; }
.za-foot .za-foot-small a { color: var(--za-link); }

/* bottom bar */
.za-sticky { display: none; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .lp-header { padding: 8px 12px !important; }
  .lp-container { padding: 20px 16px 40px !important; }
  .lp-hero { padding: 0 0 24px !important; }
  .lp-content { padding: 26px 18px !important; border-radius: 16px; }
  .lp-logo img { height: 26px; }
  h1 { font-size: 30px; }
  .lp-lead { font-size: 18px; }
  .lp-content h2 { font-size: 23px; margin-top: 44px; }
  .lp-content h3, .lp-faq-item h3 { font-size: 18px; }
  .lp-answer, .lp-faq-item p { font-size: 17px; }
  .lp-content ul, .lp-content ol { margin-left: 22px; }
  .lp-cta-row { flex-direction: column; align-items: stretch; }
  .lp-cta-row .lp-btn-primary, .za-close .za-btn { justify-content: center; width: 100%; padding: 0 16px; }
  .lp-btn-primary.za-wa, .za-btn { font-size: 17px; }
  .za-tels .za-tel { flex: 1 1 auto; justify-content: center; }
  .za-close { padding: 26px 16px; }
  .za-close h2 { font-size: 24px; }
  .za-sticky { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--za-surface); border-top: 1px solid var(--za-line); box-shadow: 0 -4px 16px rgba(0,0,0,.06);
    transform: translateY(110%); visibility: hidden; transition: transform .2s ease, visibility .2s; }
  .za-sticky.is-on { transform: none; visibility: visible; }
  .za-sticky > a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 12px;
    background: var(--za-green); color: #fff; font-weight: 700; text-decoration: none; }
  .za-sticky svg { width: 20px; height: 20px; }
  .za-sticky-em { margin: 6px 0 0; text-align: center; font-size: 15px; color: var(--za-text); }
  .za-sticky-em a { display: inline-block; padding: 4px 6px; color: var(--za-em); font-weight: 800; }
  /* key facts: label above value, easier to read at large text sizes */
  .lp-table-wrap table, .lp-table-wrap tbody, .lp-table-wrap tr { display: block; width: 100%; }
  .lp-table-wrap th[scope="row"], .lp-table-wrap th[scope="row"] + td { display: block; width: auto !important; border: 0; }
  .lp-table-wrap th[scope="row"] { padding: 12px 14px 2px !important; background: none; font-size: 15px; color: var(--za-on-tint); text-transform: none; }
  .lp-table-wrap th[scope="row"] + td { padding: 0 14px 12px !important; font-size: 17px; }
  .lp-table-wrap tr + tr { border-top: 1px solid var(--za-line); }
  .lp-footer { padding-bottom: 136px !important; }
  html { scroll-padding-bottom: 120px; }
}

@media (prefers-reduced-motion: reduce) { .za-sticky { transition: none; } }

@media print {
  .za-sticky, .lp-header .lp-nav, .za-close .za-btn { display: none !important; }
  .lp-content, .za-close { box-shadow: none; }
}

/* closing block on pages that already showed the full emergency box higher up: same buttons, no rose panel */
.za-em-quiet { background: none; border: 0; border-top: 1px solid var(--za-line); border-radius: 0; padding: 18px 0 0; }
/* header links that only fit on wider screens */
@media (max-width: 640px) { .lp-nav .za-nav-wide { display: none; } }
/* hosts page: the hero action is an in-page link, not WhatsApp */
.lp-btn-primary.za-btn-plain { background: var(--za-surface) !important; color: var(--za-link) !important; border: 2px solid var(--za-green) !important; }
.lp-btn-primary.za-btn-plain:hover { background: var(--za-green-tint) !important; }
