/*
 * THE PUBLIC PAGES' ONE STYLESHEET -- index, volunteer, request_access, enroll, privacy, terms.
 *
 * Owner, 2026-10-21: "I would like to see our public facing URLs to also be updated with better contrast for
 * more readability. This isnt a constant monitoring UI like Central Control, so providing better contrast
 * using lighter colors is needed. Also, make the public facing websites be more elegant, but still simple. We
 * should have some graphics that are relevant to our EVA brand as well."
 *
 * Light ground, dark ink, the brand's blue and signal red-orange as the only accents (from the EVA mark:
 * blue route lines, red-orange warning triangle). Body text #1c2838 on white is 14.9:1; muted text
 * #47566a is 7.5:1; the blue #0a66d6 used for links and primary buttons is 5.4:1 on white, and
 * white on it the same -- every pairing above WCAG AA, most above AAA.
 *
 * NO THIRD-PARTY REQUESTS: no web fonts, no CDN. /enroll carries a credential in its address, and a page that
 * asks people for their details is better for not calling anyone else. The system font stack is used instead.
 */
:root {
    color-scheme: light;
    --bg: #f5f7fa;
    --surface: #ffffff;
    --surface-alt: #f0f4f9;
    --ink: #0f1b2d;
    --text: #1c2838;
    --muted: #47566a;
    --border: #d9e0e8;
    --border-strong: #b9c3cf;
    --blue: #0a66d6;
    --blue-hover: #0857b8;
    --blue-soft: #e8f1fd;
    --signal: #c7361f;          /* the triangle's red-orange, darkened for text contrast (5.3:1 on white) */
    --signal-soft: #fdeeea;
    --ok: #17703f;
    --ok-soft: #e7f6ed;
    --radius: 14px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.6;
}
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-hover); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }

/* ---------------- header + footer ---------------- */
/* THE HEADER IS A GRAPHIC BANNER (owner, 2026-10-22: "I would prefer to see a cool graphic banner at the top",
   replacing a plain bar whose tagline, "Emergency vehicle alerts", is not what EVA stands for). The scene is
   /ui/img/eva-banner.svg; the logo, name and links stay real text over it. Text on the banner is white on
   #071225-#0c2142: 17:1 and above. */
.site-header { background: #060f20 url(/ui/img/eva-banner.svg) 63% bottom / cover no-repeat;   /* 63%: the road vanishing point, so a narrow screen crops sky and city, not the road */ border-bottom: 0; }
.site-header .inner { min-height: 120px; padding-top: 22px; padding-bottom: 22px; }
.site-header .brand { color: #ffffff; }
.site-header .brand img { width: 52px; height: 52px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45); }
.site-header .brand-name { font-size: 30px; letter-spacing: 0.1em; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.site-header .site-nav a { color: #e6efff; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.site-header .site-nav a:hover { background: rgba(255, 255, 255, 0.12); color: #ffffff; }
.site-header .site-nav a[aria-current="page"] { color: #ffffff; background: rgba(47, 140, 255, 0.35); }
@media (max-width: 560px) {
    .site-header .inner { min-height: 96px; }
    .site-header .brand-name { font-size: 24px; }
    /* On a phone the links wrap down over the road scene; a dark backing keeps them readable over the white police car. */
    .site-header .site-nav a { background: rgba(6, 15, 32, 0.62); }
}
.site-header .inner, .site-footer .inner { max-width: 1040px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: 40px; border-radius: 10px; display: block; }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: 0.04em; line-height: 1; }
.brand-tag { display: block; font-size: 12px; font-weight: 500; letter-spacing: 0.02em; color: var(--muted); margin-top: 3px; }
.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a { color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 8px; }
.site-nav a:hover { background: var(--surface-alt); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--blue); background: var(--blue-soft); }
.site-footer { margin-top: auto; border-top: 1px solid var(--border); background: var(--surface); }
.site-footer .inner { font-size: 13px; color: var(--muted); padding-top: 18px; padding-bottom: 18px; }
.site-footer a { color: var(--muted); }

/* ---------------- page layout ---------------- */
main { width: 100%; }
.page { max-width: 720px; margin: 0 auto; padding: 44px 20px 64px; }
.page.wide { max-width: 1040px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--signal); margin: 0 0 10px; }
h1 { color: var(--ink); font-size: clamp(28px, 4.2vw, 38px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; font-weight: 800; }
h2 { color: var(--ink); font-size: 21px; letter-spacing: -0.01em; margin: 34px 0 10px; }
h3 { color: var(--ink); font-size: 17px; margin: 24px 0 8px; }
.lede { font-size: 18px; color: var(--muted); margin: 0 0 28px; max-width: 60ch; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: 0 1px 2px rgba(15, 27, 45, 0.04), 0 8px 24px rgba(15, 27, 45, 0.05); }
.card + .card { margin-top: 18px; }
.callout { border-left: 4px solid var(--blue); background: var(--blue-soft); border-radius: 0 10px 10px 0; padding: 14px 18px; margin: 0 0 26px; color: var(--text); }
.callout strong { color: var(--ink); }

/* ---------------- forms ---------------- */
fieldset { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 22px 22px 8px; margin: 0 0 18px; }
legend { padding: 0 8px; font-weight: 700; font-size: 14px; color: var(--ink); }
.field { margin-bottom: 18px; }
label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.req { color: var(--signal); }
input, textarea, select {
    width: 100%; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--text);
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px;
}
input::placeholder, textarea::placeholder { color: #5c6b7e; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10, 102, 214, 0.18); }
textarea { resize: vertical; min-height: 84px; }
.hint { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
    padding: 12px 22px; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
    font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; text-align: center;
    background: var(--blue); color: #ffffff; transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--blue-hover); color: #ffffff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.block { display: flex; width: 100%; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn.secondary:hover { background: var(--surface-alt); color: var(--ink); }

.notice { padding: 14px 16px; border-radius: 10px; font-size: 15px; margin: 0 0 18px; }
.notice.error { background: var(--signal-soft); border: 1px solid #f0b7aa; color: #8a2414; }
.notice.ok { background: var(--ok-soft); border: 1px solid #a9d9bc; color: #0f5530; }

/* ---------------- landing ---------------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 64px 20px 72px; max-width: 1040px; margin: 0 auto; }
.hero .mark { width: 88px; height: 88px; border-radius: 20px; margin-bottom: 22px; box-shadow: 0 10px 30px rgba(15, 27, 45, 0.18); }
.hero h1 { font-size: clamp(40px, 7vw, 64px); letter-spacing: 0.02em; margin-bottom: 8px; }
.hero .lede { margin-bottom: 30px; }
.hero figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 18px; box-shadow: 0 20px 50px rgba(15, 27, 45, 0.08); }
.hero figure img { width: 100%; height: auto; display: block; }
.hero figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; text-align: center; }
@media (max-width: 820px) {
    .hero { grid-template-columns: 1fr; padding-top: 36px; gap: 28px; text-align: center; }
    .hero .mark { margin-left: auto; margin-right: auto; }
    .hero .lede { margin-left: auto; margin-right: auto; }
}

/* ---------------- legal pages (generated by scripts/build_legal_pages.js) ---------------- */
.legal p, .legal li { font-size: 16px; }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin-bottom: 7px; }
.legal hr { border: none; border-top: 1px solid var(--border); margin: 30px 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 15px; }
.legal th, .legal td { text-align: left; padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.legal th { color: var(--ink); background: var(--surface-alt); font-size: 14px; }
.legal blockquote { border-left: 4px solid var(--signal); background: var(--signal-soft); padding: 14px 18px; margin: 0 0 22px; border-radius: 0 10px 10px 0; }
.legal blockquote h2, .legal blockquote h3 { margin-top: 0; color: #8a2414; }
.legal blockquote p:last-child { margin-bottom: 0; }
.legal pre { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font-size: 13px; }
.legal pre code { background: none; border: none; padding: 0; }
@media (max-width: 560px) { .legal table { font-size: 13.5px; } .legal th, .legal td { padding: 7px 6px; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
