/* ELIS public site, sign-in and observer pages. Same tokens as the operations interface (ops.css). */
:root {
  --navy: #0A1D36; --navy-2: #163258; --navy-3: #061427; --teal: #0B7E86; --teal-b: #12B5B0; --teal-tint: #E3F5F4;
  --brand: var(--navy); --accent: var(--teal);
  --ink: #15212F; --ink-2: #3E4C5C; --muted: #62738A; --line: #D9E0E9; --line-2: #EAEEF4; --bg: #F2F5F9; --card: #fff;
  --green: #1C9B6C; --amber: #E0962A; --red: #CF3E44; --blue: #2E6BD6; --purple: #7A5AC8; --gold: #E3A72F;
  --warn-bg: #FFF4DC; --warn-ink: #6F4E00; --err: #B3262C; --ok: #0F6B49;
  --radius: 10px; --radius-lg: 18px; --shadow: 0 1px 2px rgba(10,29,54,.05), 0 8px 24px rgba(10,29,54,.06);
  --font: "Archivo", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--bg); font-variant-numeric: tabular-nums; }
a { color: #0E5E9C; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.ico { flex: none; vertical-align: -4px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 460px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 30; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brandmark { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 19px; font-stretch: 87.5%; letter-spacing: .02em; }
.brandmark img { height: 32px; }
.brandmark small { display: block; font-size: 11px; font-weight: 500; color: #8FA4C4; letter-spacing: 0; font-stretch: 100%; }
.top nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.top nav a, .top nav button { color: #DAE3F2; text-decoration: none; background: none; border: 0; font: inherit; font-size: 15px; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.top nav a:hover, .top nav button:hover { background: rgba(255,255,255,.1); color: #fff; }
.top nav .cta { background: var(--teal-b); color: #04222B; font-weight: 700; }
.top nav .cta:hover { background: #2CC9C3; color: #04222B; }

/* Generic */
main { padding: 32px 0 56px; }
h1 { font-size: 1.9rem; font-stretch: 87.5%; line-height: 1.15; margin: 0 0 8px; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; margin: 0 0 12px; }
h3 { font-size: 1.05rem; margin: 0 0 6px; }
.lead { color: var(--muted); margin: 0 0 20px; max-width: 68ch; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.stat .n { font-size: 2rem; font-weight: 700; font-stretch: 87.5%; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: .9rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #EEF2F6; color: var(--ink-2); }
.badge.active, .badge.green { background: #E2F4EC; color: var(--ok); }
.badge.closed, .badge.red { background: #FBE6E7; color: #A3252B; }
.badge.amber { background: #FFF1DB; color: #8A5300; } .badge.grey, .badge.draft { background: #EEF2F6; color: #536170; }
.badge.blue { background: #E4EDFC; color: #1D4FA6; } .badge.purple { background: #EEE8FB; color: #5A3FA0; } .badge.teal { background: var(--teal-tint); color: #0A6168; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font-size: .8rem; color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--line); }

/* Forms */
label { display: block; font-weight: 600; font-size: .92rem; margin: 0 0 6px; }
.field { margin-bottom: 16px; position: relative; }
input[type=text], input[type=email], input[type=password], input[type=tel], select, textarea {
  width: 100%; padding: 12px 13px; font: inherit; border: 1px solid #C2CCD8; border-radius: 9px; background: #fff; color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(18,181,176,.22); }
input[aria-invalid=true] { border-color: var(--err); }
.code-input { font-size: 1.7rem; letter-spacing: .5em; text-align: center; font-weight: 700; }
.pw { position: relative; }
.pw input { padding-right: 76px; }
.pw button { position: absolute; right: 6px; top: 6px; bottom: 6px; border: 0; background: var(--bg); color: var(--ink-2); font: 600 13px var(--font); border-radius: 7px; padding: 0 10px; cursor: pointer; }
.btn { display: inline-flex; gap: 8px; align-items: center; justify-content: center; padding: 12px 20px; border-radius: 9px; border: 1px solid transparent; background: var(--navy); color: #fff; font: 600 1rem/1.2 var(--font); cursor: pointer; text-decoration: none; transition: background .12s, transform .06s; }
.btn:hover { background: var(--navy-2); }
.btn:active { transform: translateY(1px); }
.btn.accent { background: var(--teal); } .btn.accent:hover { background: #096A71; }
.btn.bright { background: var(--teal-b); color: #04222B; } .btn.bright:hover { background: #2CC9C3; }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn.block { width: 100%; }
.btn.sm { padding: 6px 12px; font-size: .85rem; }
.btn[aria-busy=true] { opacity: .75; pointer-events: none; }
.btn[aria-busy=true]::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { color: var(--err); font-size: .88rem; margin-top: 6px; font-weight: 500; }
.error::before { content: "! "; font-weight: 800; }
.flash { padding: 12px 14px; border-radius: 9px; margin-bottom: 16px; background: #E4EDFC; color: #1D4A7A; border-left: 4px solid var(--blue); }
.flash.ok { background: #E2F4EC; color: var(--ok); border-left-color: var(--green); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.row2 { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: .9rem; } .kv dd { margin: 0; }
.toolbar, .actions-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.disclaimer { background: var(--warn-bg); color: var(--warn-ink); border-radius: 8px; padding: 10px 14px; font-size: .9rem; font-weight: 600; }
.acting { background: var(--gold); color: #3b2a00; font-size: .92rem; }
.acting .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; flex-wrap: wrap; }

/* Footer */
footer.site { background: var(--navy-3); color: #9FB1CC; font-size: .9rem; padding: 44px 0 28px; }
footer.site a { color: #DAE3F2; text-decoration: none; } footer.site a:hover { text-decoration: underline; }
footer.site .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 28px; }
footer.site h4 { color: #fff; font-size: .9rem; margin: 0 0 10px; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
footer.site .legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: 28px; padding-top: 18px; display: flex; gap: 8px 24px; flex-wrap: wrap; justify-content: space-between; font-size: .82rem; }
footer.site.slim { padding: 18px 0 22px; }
footer.site.slim .legal { border: 0; margin: 0; padding: 0; }

/* ── Homepage ─────────────────────────────────────────── */
.hero { background: radial-gradient(90% 120% at 85% 10%, #173E6E 0%, var(--navy) 55%, var(--navy-3) 100%); color: #fff; padding: 72px 0 0; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: end; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.04; max-width: 15ch; margin-bottom: 18px; }
.hero p { font-size: 1.14rem; max-width: 56ch; color: #C6D3E8; margin: 0 0 28px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; padding-bottom: 72px; }
.hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.35); } .hero .btn.ghost:hover { background: rgba(255,255,255,.08); }
.preview { background: #0D2444; border: 1px solid rgba(255,255,255,.12); border-bottom: 0; border-radius: 16px 16px 0 0; padding: 14px 16px 0; box-shadow: 0 -10px 60px rgba(18,181,176,.14); }
.preview .bar { display: flex; gap: 6px; align-items: center; font-size: 12px; color: #8FA4C4; margin-bottom: 10px; }
.preview .bar i { width: 8px; height: 8px; border-radius: 50%; background: #29476F; }
.preview .bar span { margin-left: auto; }
.preview .body { display: grid; grid-template-columns: 1fr 150px; gap: 12px; }
.preview svg.map path { fill: #1B4A77; stroke: #0D2444; stroke-width: 2; }
.preview svg.map path.hi { fill: var(--teal-b); }
.preview .side { display: grid; gap: 8px; align-content: start; }
.preview .sk { background: rgba(255,255,255,.06); border-radius: 8px; padding: 10px; }
.preview .sk b { display: block; height: 8px; border-radius: 4px; background: #2A4B78; margin-bottom: 6px; width: 60%; }
.preview .sk i { display: block; height: 5px; border-radius: 3px; background: #1F3A62; margin-top: 5px; }
.preview .sk.t b { background: var(--teal-b); } .preview .sk.a b { background: var(--amber); } .preview .sk.r b { background: var(--red); }
.section { padding: 64px 0; }
.section.white { background: #fff; border-block: 1px solid var(--line); }
.section.dark { background: var(--navy); color: #fff; }
.section.dark .lead, .section.dark p { color: #C6D3E8; }
.section h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-stretch: 87.5%; line-height: 1.12; margin-bottom: 10px; max-width: 24ch; }
.intro { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.intro p { font-size: 1.08rem; color: var(--ink-2); margin-top: 0; }
.caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #fff; margin-top: 28px; }
.cap { padding: 26px 24px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.cap .ico { color: var(--teal); margin-bottom: 12px; }
.cap h3 { font-size: 1.1rem; } .cap p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.flow { counter-reset: step; list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 0; grid-template-columns: repeat(5, 1fr); }
.flow li { counter-increment: step; padding: 0 18px 0 0; position: relative; }
.flow li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--teal-b); color: #04222B; font-weight: 800; margin-bottom: 14px; position: relative; z-index: 1; }
.flow li::after { content: ""; position: absolute; left: 34px; right: 0; top: 17px; height: 2px; background: rgba(255,255,255,.18); }
.flow li:last-child::after { display: none; }
.flow h3 { color: #fff; } .flow p { font-size: .93rem; margin: 0; }
.four { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); margin-top: 24px; }
.four div { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--tone, var(--teal)); padding: 16px 18px; border-radius: 0 0 10px 10px; }
.four strong { font-size: 1.1rem; display: block; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.checks li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; }
.checks .ico { color: var(--teal); margin-top: 2px; }
.checks strong { display: block; }
.viz { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); }
.viz .cap-note { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.viz .legend-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.viz .legend-row i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }
.options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.cta-band { background: linear-gradient(100deg, var(--navy) 0%, #12406B 100%); color: #fff; border-radius: var(--radius-lg); padding: 40px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 6px; } .cta-band p { margin: 0; color: #C6D3E8; }
.enquire { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: start; }

/* ── Sign-in (split screen) ─────────────────────────────── */
body.auth { background: #fff; }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: 100vh; }
.auth-brand { background: radial-gradient(110% 90% at 20% 15%, #173E6E 0%, var(--navy) 55%, var(--navy-3) 100%); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; gap: 28px; position: relative; overflow: hidden; }
.auth-brand .brandmark { font-size: 22px; }
.auth-brand h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); font-stretch: 87.5%; line-height: 1.1; max-width: 16ch; margin: auto 0 0; }
.auth-brand ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; color: #C6D3E8; font-size: .98rem; max-width: 44ch; }
.auth-brand li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; } .auth-brand li .ico { color: var(--teal-b); }
.auth-brand svg.map { position: absolute; right: -90px; top: 60px; width: 520px; opacity: .22; pointer-events: none; }
.auth-brand svg.map path { fill: none; stroke: #7FD9D5; stroke-width: 2.5; }
.auth-brand .note { font-size: 12.5px; color: #8FA4C4; position: relative; }
.auth-brand > * { position: relative; }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 40px 24px; }
.auth-form .inner { width: 100%; max-width: 440px; margin: 0 auto; }
.auth-form .inner.wide { max-width: 720px; }
.auth-form .card { box-shadow: none; border: 0; padding: 0; background: transparent; }
.auth-form .alt-links { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-2); font-size: .92rem; color: var(--muted); display: grid; gap: 6px; }

/* ── Observer (phone first) ─────────────────────────────── */
.unit-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: var(--radius); padding: 16px 18px; }
.unit-card h3 { font-size: 1.15rem; margin: 8px 0 2px; }
.unit-card .where { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; color: var(--ink-2); margin-top: 8px; }

/* ── Error and system pages ─────────────────────────────── */
.syspage { min-height: 100vh; display: grid; place-items: center; background: var(--bg); padding: 24px; }
.syspage .box { max-width: 520px; text-align: center; }
.syspage .code { font-size: 15px; font-weight: 700; color: var(--teal); }
.syspage h1 { font-size: 2rem; margin: 10px 0; }
.syspage p { color: var(--ink-2); margin: 0 0 22px; }
.syspage .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 960px) {
  .hero .wrap, .intro, .split, .enquire { grid-template-columns: 1fr; }
  .hero .actions { padding-bottom: 36px; }
  .caps, .options { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr; gap: 18px; } .flow li::after { display: none; }
  .four { grid-template-columns: 1fr 1fr; }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { padding: 22px 24px; gap: 14px; } .auth-brand h2 { margin: 0; font-size: 1.35rem; max-width: none; }
  .auth-brand ul, .auth-brand svg.map, .auth-brand .note { display: none; }
  .auth-form { justify-content: flex-start; padding-top: 28px; }
}
@media (max-width: 600px) {
  main { padding-top: 22px; }
  .hero { padding-top: 44px; } .section { padding: 44px 0; }
  .caps, .options, .four { grid-template-columns: 1fr; }
  .card { padding: 16px; } .cta-band { padding: 26px 22px; }
  .top nav a:not(.cta):not(.keep) { display: none; }
  .preview .body { grid-template-columns: 1fr; } .preview .side { display: none; }
  footer.site .cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
body:has(.wrap.home) main { padding: 0; }
.wrap.home, .wrap.home + * { }
main > .wrap.home { max-width: none; padding: 0; }
.checks li div { color: var(--ink-2); font-size: .96rem; } .checks li strong { color: var(--ink); font-size: 1rem; }

/* Observer reporting (phone first) */
.field-actions { display: grid; gap: 10px; }
.field-actions .btn { padding: 16px; font-size: 1.05rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.steps a { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; text-decoration: none; color: var(--ink); min-height: 56px; }
.steps a span span { display: block; }
.steps .tick { color: #9AA9BC; } .steps .done .tick { color: var(--green); } .steps .done a { background: #F4FBF8; border-color: #BFE3D3; }
fieldset.choices { border: 0; padding: 0; margin: 0; } fieldset.choices legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; padding: 0; }
fieldset.choices { display: flex; flex-wrap: wrap; gap: 8px; } fieldset.choices legend { flex-basis: 100%; }
fieldset.choices label { margin: 0; font-weight: 500; flex: 1 1 90px; }
fieldset.choices input { position: absolute; opacity: 0; }
fieldset.choices span { display: block; text-align: center; padding: 12px 10px; border: 1px solid #C2CCD8; border-radius: 9px; background: #fff; cursor: pointer; }
fieldset.choices input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
fieldset.choices input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.vote-row { display: grid; grid-template-columns: 1fr 120px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.vote-row label, .vote-row > span { margin: 0; } .vote-row label span, .vote-row > span span { display: block; font-weight: 400; }
.vote-row input { text-align: right; font-size: 1.15rem; font-weight: 700; }
.vote-row.total { border-bottom: 0; } .vote-row output { text-align: right; font-size: 1.3rem; font-weight: 800; }
input[type=file] { width: 100%; padding: 10px; border: 1px dashed #9AA9BC; border-radius: 9px; background: #fff; font: inherit; }
input[type=time] { width: 100%; padding: 12px 13px; font: inherit; border: 1px solid #C2CCD8; border-radius: 9px; }

/* Observer app: queue of reports waiting for signal */
.linklike{background:none;border:0;padding:0;color:inherit;text-decoration:underline;font:inherit;cursor:pointer}
#outbox strong{display:block}

/* Text pages: About, questions, legal */
.prose { max-width: 70ch; }
.prose h1 { font-size: clamp(28px, 5vw, 40px); margin-bottom: 12px; }
.prose h2 { font-size: 20px; margin: 32px 0 10px; }
.prose h3 { font-size: 17px; margin: 22px 0 8px; }
.prose p, .prose li { line-height: 1.65; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.faq { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 28px 14px 0; font-weight: 650; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 20px; font-weight: 400; color: var(--teal, #0B7E86); }
.faq[open] summary::after { content: "–"; }
.faq summary:focus-visible { outline: 3px solid #12B5B0; outline-offset: 2px; border-radius: 4px; }
.faq p { margin: 0 0 16px; }
.wrap.text, .text { max-width: 800px; }
