/*
 * Shared look & feel for the Luci ROOT website (luci-sa.co.za). TWO page families, one brand:
 *   • Full-screen dark surface (.surface-brand) — the landing and the public alert page.
 *   • Light document (.masthead + <main>)       — terms and privacy.
 * Both share the brand vocabulary (Midnight Violet #2e1045, brand purple #a53def, Sunbeam Yellow
 * #ffd84d, Nunito, the official white wordmark). The SPA (/app) and native app have their own
 * design system; these tokens mirror it. No external requests (no web-font CDN): the alert page
 * is safety-sensitive, so nothing leaks a request to a third party when a contact opens it.
 */
:root {
  --brand-purple: #a53def;
  --brand-violet: #2e1045;
  --brand-violet-hi: #4a1a6e; /* top of the violet gradient */
  --brand-yellow: #ffd84d;
  --brand-ink: #201626;
  --text: #201626;
  --text-strong: #2e1045;
  --text-muted: #6e6577;
  --hairline: #e8e2ee;
  --bg: #ffffff;
  --card: #f7f3fb;
  --maxw: 720px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 17px;
}
a { color: var(--brand-purple); }
:focus-visible { outline: 3px solid var(--brand-purple); outline-offset: 2px; border-radius: 4px; }

/* ---- Brand lockup: the official white wordmark, 28px, same as the app's <BrandLogo onDark> ---- */
.wordmark { display: block; height: 28px; width: auto; margin: 0 0 14px; }

/* ======================================================================================
 * FULL-SCREEN DARK SURFACE — the landing and the public alert page.
 * ====================================================================================== */
.surface-brand {
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(ellipse at top, var(--brand-violet-hi) 0%, var(--brand-violet) 60%);
  color: #fff;
}
.surface-brand .inner {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(48px + env(safe-area-inset-top)) 20px calc(32px + env(safe-area-inset-bottom));
}
.surface-brand a { color: var(--brand-yellow); font-weight: 800; }
.surface-brand h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 10px; }
.surface-brand .lede { color: rgba(255, 255, 255, 0.82); margin: 0 0 18px; }
.surface-brand .muted { color: rgba(255, 255, 255, 0.72); }

/* Alert content on the dark surface */
.surface-brand .alert-meta { margin: 6px 0 2px; }
.surface-brand .alert-at { color: rgba(255, 255, 255, 0.72); }
.surface-brand .note { margin-top: 18px; }

/* Yellow "Test alert" pill (same on either family) */
.tag {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--brand-yellow);
  color: var(--brand-ink);
  font-weight: 800;
  font-size: 0.875rem;
}

/* Solid Sunbeam button. The context selector keeps its ink label from being repainted yellow by
   the `.surface-brand a` link rule (specificity). */
.btn,
.surface-brand .btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--brand-yellow);
  color: var(--brand-ink);
  font-weight: 800;
  text-decoration: none;
  padding: 14px 18px;
  border-radius: 14px;
  margin: 14px 0;
}
.btn:hover { filter: brightness(0.97); }

/* Map on the alert page */
.map {
  margin: 14px 0;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  aspect-ratio: 4 / 3;
}
.map iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ======================================================================================
 * LIGHT DOCUMENT — terms and privacy (violet masthead band + white body).
 * ====================================================================================== */
.masthead {
  background: radial-gradient(ellipse at top, var(--brand-violet-hi) 0%, var(--brand-violet) 70%);
  color: #fff;
  padding: calc(28px + env(safe-area-inset-top)) 16px 28px;
}
.masthead__inner { max-width: var(--maxw); margin: 0 auto; }
.masthead h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 6px; }
.masthead .updated { color: rgba(255, 255, 255, 0.76); font-size: 0.95rem; margin: 0; }

main { max-width: var(--maxw); margin: 0 auto; padding: 24px 16px calc(48px + env(safe-area-inset-bottom)); }
.draft {
  background: rgba(255, 216, 77, 0.18);
  border: 1px solid var(--brand-yellow);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.95rem;
  margin: 0 0 28px;
}
.draft strong { color: var(--text-strong); }
h2 { color: var(--text-strong); font-size: 1.2rem; margin: 32px 0 8px; padding-top: 8px; }
h2 .n { color: var(--brand-purple); font-variant-numeric: tabular-nums; }
p, li { color: var(--text); }
.ph { color: var(--text-muted); font-style: italic; }
ul { padding-left: 1.2em; }
li { margin: 4px 0; }
.toc {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 0 0 8px;
}
.toc h2 { margin: 0 0 8px; font-size: 1rem; padding-top: 0; }
.toc ol { margin: 0; padding-left: 1.3em; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 16px calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--hairline);
  color: var(--text-muted);
  font-size: 0.9rem;
}
