/* Beti Bachao — mobile-first, high-contrast, works in light & dark, RTL-aware. */
:root {
  --plum: #6d1a4a; --plum-2: #8e2462; --rose: #b3245f; --saffron: #ffb547;
  --sos: #d7193f; --sos-dark: #a40f2f; --safe: #13834a; --amber: #c97a00; --info: #2c5ea8;
  --bg: #fbf7f9; --surface: #ffffff; --ink: #1d1320; --ink-2: #5b4c5e; --line: #eadde4; --chip: #f4e9ef;
  --radius: 16px; --shadow: 0 1px 2px rgba(60, 20, 45, .06), 0 6px 20px rgba(60, 20, 45, .07);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Noto Sans Telugu", "Noto Sans Tamil", "Noto Sans Kannada", "Noto Sans Malayalam", "Noto Sans Bengali", "Noto Sans Gujarati", "Noto Nastaliq Urdu", "Noto Sans Arabic", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #150d14; --surface: #20151f; --ink: #f6edf2; --ink-2: #c2afbd; --line: #3a2836; --chip: #2d1f2b; --plum: #e06aa5; --plum-2: #f08ab9; --info: #7fb0ff; --safe: #3ccf82; --amber: #ffb547; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.5; font-size: 16px; padding-bottom: calc(72px + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; }
a { color: var(--plum); }
h1 { font-size: 1.6rem; margin: .6rem 0 1rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
h3 { font-size: 1rem; margin: .2rem 0 .5rem; }
code { background: var(--chip); padding: .1rem .35rem; border-radius: 6px; }
main { max-width: 1100px; margin: 0 auto; padding: 0 16px 24px; outline: none; }
.muted { color: var(--ink-2); }
.small, small { font-size: .85rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 8px; top: -200px; background: var(--surface); padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip-link:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }
.boot img { border-radius: 16px; }
.boot { display: grid; place-items: center; min-height: 70vh; color: var(--ink-2); }

/* top + bottom bars */
.demo-banner { background: repeating-linear-gradient(45deg, #fff2cc, #fff2cc 12px, #ffe7a3 12px, #ffe7a3 24px); color: #4a3500; text-align: center; font-size: .82rem; padding: 6px 10px; font-weight: 600; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: -.01em; }
.topbar-right { display: flex; gap: 8px; align-items: center; }
.lang-select { padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: .9rem; max-width: 130px; }
.bottom-nav { position: fixed; bottom: 0; inset-inline: 0; z-index: 20; display: flex; justify-content: space-around; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--ink-2); font-size: .75rem; padding: 4px; border-radius: 10px; }
.bottom-nav a span { font-size: 1.25rem; }
.bottom-nav a.active { color: var(--plum); font-weight: 700; background: var(--chip); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 16px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; text-align: center; transition: transform .06s ease, filter .15s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { min-height: 34px; padding: 6px 10px; font-size: .88rem; border-radius: 10px; }
.btn-lg { min-height: 54px; padding: 14px 22px; font-size: 1.05rem; }
.btn-primary { background: var(--plum); color: #fff; }
.btn-secondary { background: var(--chip); color: var(--ink); border-color: var(--line); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-danger { background: var(--sos); color: #fff; }
.btn-warn { background: #fff1d6; color: #5c3b00; border-color: #f3d18d; }
.btn-safe { background: var(--safe); color: #fff; }
.btn-dark { background: #2a1d29; color: #fff; }
.btn-light { background: #fff; color: #222; }
.btn-call { background: var(--sos); color: #fff; font-size: 1.05rem; min-height: 50px; }
.btn-call-alt { background: var(--surface); color: var(--sos); border-color: var(--sos); }
.danger-text { color: var(--sos) !important; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.row.center { justify-content: center; }
.row.space { justify-content: space-between; }

/* cards & layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; box-shadow: var(--shadow); }
.cards-3 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cards-3 .card { margin: 0; }
.narrow { max-width: 520px; margin: 0 auto; }
.hero { text-align: center; padding: 28px 8px 8px; }
.hero h1 { font-size: 2.2rem; margin: .4rem 0; }
.hero-logo { display: block; width: min(100%, 460px); height: auto; margin: 0 auto; background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 6px 10px; }
.brand-icon { border-radius: 8px; }
.lead { font-size: 1.1rem; color: var(--ink-2); max-width: 620px; margin: 0 auto 18px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.limits ul { padding-inline-start: 1.2rem; margin: 0; }
.limits li { margin: .35rem 0; }

/* forms */
.form { display: flex; flex-direction: column; gap: 12px; }
.form.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.full { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .92rem; }
input, select, textarea { font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); min-height: 44px; }
textarea { min-height: 80px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
legend { font-weight: 700; padding: 0 6px; }
label.radio, label.switch { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
label.switch input, label.radio input { min-height: auto; width: 22px; height: 22px; accent-color: var(--plum); }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.inline-form label { flex: 1 1 140px; }

/* badges, alerts, chips */
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--chip); color: var(--ink-2); margin-inline-start: 4px; vertical-align: middle; }
.badge-ok { background: #d8f5e5; color: #0b5a32; }
.badge-warn { background: #fff0cf; color: #6b4400; }
.badge-info { background: #dde9ff; color: #1f3f78; }
.badge-danger { background: #ffd9df; color: #8a0f27; }
.alert { border-radius: var(--radius); padding: 12px 14px; margin: 12px 0; border: 1px solid; }
.alert-danger { background: #fff0f2; border-color: #f3b3bf; color: #5d0a1c; }
.alert-warn { background: #fff7e6; border-color: #f3d18d; color: #4d3300; }
.alert-info { background: #eef4ff; border-color: #c4d6fb; color: #17325e; }
.alert-link { display: block; text-decoration: none; font-weight: 700; }
@media (prefers-color-scheme: dark) { .alert-danger { background: #3a1019; color: #ffd6de; border-color: #6d2534; } .alert-warn { background: #3a2a0c; color: #ffe2a8; border-color: #6b5220; } .alert-info { background: #12213c; color: #cfe0ff; border-color: #2c4372; } .btn-warn { background: #4a3510; color: #ffe2a8; border-color: #6b5220; } }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--chip); color: var(--ink); padding: 8px 12px; border-radius: 999px; font: inherit; font-size: .9rem; cursor: pointer; min-height: 40px; }
.chip-hl { border-color: var(--plum); box-shadow: 0 0 0 2px color-mix(in srgb, var(--plum) 30%, transparent); }
.demo-group h4 { margin: .6rem 0 .3rem; font-size: .85rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }

/* emergency bar */
.emergency-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: 12px 0; }
.verify-note { flex-basis: 100%; text-align: center; font-size: .78rem; color: var(--ink-2); }

/* SOS */
.sos-wrap { display: flex; flex-direction: column; align-items: center; padding: 18px 0 4px; gap: 10px; }
.sos-btn { position: relative; width: min(64vw, 250px); aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer; background: radial-gradient(circle at 35% 30%, #ff5a78, var(--sos) 55%, var(--sos-dark)); color: #fff; box-shadow: 0 10px 40px rgba(215, 25, 63, .45), inset 0 -8px 20px rgba(0, 0, 0, .2); touch-action: none; user-select: none; -webkit-user-select: none; animation: pulse 2.4s ease-in-out infinite; }
.sos-btn.holding { animation: none; transform: scale(.96); }
.sos-label { position: relative; font-size: clamp(2.6rem, 12vw, 4rem); font-weight: 900; letter-spacing: .06em; }
.sos-ring { position: absolute; inset: -10px; width: calc(100% + 20px); height: calc(100% + 20px); transform: rotate(-90deg); }
.sos-track { fill: none; stroke: rgba(215, 25, 63, .18); stroke-width: 6; }
.sos-progress { fill: none; stroke: var(--saffron); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset .05s linear; }
@keyframes pulse { 0%, 100% { box-shadow: 0 10px 40px rgba(215, 25, 63, .45), 0 0 0 0 rgba(215, 25, 63, .35); } 50% { box-shadow: 0 10px 40px rgba(215, 25, 63, .45), 0 0 0 18px rgba(215, 25, 63, 0); } }
@media (prefers-reduced-motion: reduce) { .sos-btn { animation: none; } }
.sos-hint { margin: 0; font-weight: 600; text-align: center; }
.danger-switch { background: #fff0f2; color: #5d0a1c; padding: 8px 12px; border-radius: 12px; border: 1px solid #f3b3bf; }
@media (prefers-color-scheme: dark) { .danger-switch { background: #3a1019; color: #ffd6de; border-color: #6d2534; } }
.hint-strong { font-size: .9rem; text-align: center; color: var(--ink-2); max-width: 420px; margin: 4px auto; }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.tool { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font: inherit; font-size: 1.6rem; color: var(--ink); text-decoration: none; cursor: pointer; box-shadow: var(--shadow); min-height: 88px; }
.tool span { font-size: .8rem; font-weight: 600; text-align: center; line-height: 1.2; }
.loc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.loc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.loc-grid .k { font-weight: 600; display: block; }

/* incident status */
.status-hero { border-radius: 20px; padding: 20px 16px; margin: 12px 0; color: #fff; text-align: center; box-shadow: var(--shadow); }
.status-hero h1 { margin: .3rem 0; font-size: 1.5rem; }
.status-hero p { margin: .2rem 0; opacity: .95; }
.status-RED { background: linear-gradient(160deg, #e0284d, #9e0f2d); }
.status-AMBER { background: linear-gradient(160deg, #e29400, #a85a00); }
.status-GREEN { background: linear-gradient(160deg, #1fa25c, #0d6b3a); }
.status-GREY { background: linear-gradient(160deg, #6f6470, #463d47); }
.status-hero.discreet { background: #1b1b1b; color: #9a9a9a; }
.status-dot { width: 16px; height: 16px; border-radius: 50%; background: #fff; margin: 0 auto; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.stage-bar { display: flex; gap: 6px; list-style: none; padding: 0; margin: 12px 0 0; }
.stage-bar li { flex: 1; padding: 6px; border-radius: 10px; background: rgba(255, 255, 255, .2); font-weight: 700; font-size: .85rem; }
.stage-bar li.on { background: #fff; color: var(--sos-dark); }
.stage-bar li.done { background: rgba(255, 255, 255, .45); }
.responder { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.responder:first-of-type { border-top: 0; }
.eta { font-weight: 700; text-align: end; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.action-grid .btn-lg { grid-column: 1 / -1; }
.timeline { padding-inline-start: 1.1rem; margin: .6rem 0 0; }
.timeline li { margin: .3rem 0; }
.timeline time { font-variant-numeric: tabular-nums; color: var(--ink-2); margin-inline-end: 6px; }
summary { cursor: pointer; font-weight: 700; }

/* lists */
.clip-list, .contact-list, .history, .training, .alert-list, .checklist, .ops-list ul { list-style: none; padding: 0; margin: 8px 0; }
.clip-list li, .contact-list li, .history li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.history li { display: block; }
.training li { padding: 6px 0; display: flex; gap: 8px; align-items: center; }
.checklist li { padding: 4px 0; }
.checklist li.no { color: var(--ink-2); }
.alert-item { width: 100%; display: grid; grid-template-columns: 14px 1fr; grid-template-rows: auto auto; column-gap: 10px; text-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 6px 0; font: inherit; color: var(--ink); cursor: pointer; }
.alert-item small { grid-column: 2; color: var(--ink-2); }
.alert-item.sel { border-color: var(--plum); box-shadow: 0 0 0 2px color-mix(in srgb, var(--plum) 25%, transparent); }
.alert-item .dot { grid-row: span 2; width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; background: var(--ink-2); }
.alert-item.status-RED, .alert-item.status-AMBER, .alert-item.status-GREEN, .alert-item.status-GREY { background: var(--surface); color: var(--ink); }
.alert-item.status-RED .dot { background: var(--sos); }
.alert-item.status-AMBER .dot { background: #e29400; }
.alert-item.status-GREEN .dot { background: var(--safe); }
.status-border-RED { border-inline-start: 6px solid var(--sos); }
.status-border-AMBER { border-inline-start: 6px solid #e29400; }
.status-border-GREEN { border-inline-start: 6px solid var(--safe); }
.status-text-RED { color: var(--sos); } .status-text-AMBER { color: var(--amber); } .status-text-GREEN { color: var(--safe); }
.precise { background: var(--chip); border-radius: 12px; padding: 12px; margin: 10px 0; }
.phrase { font-size: 1.4rem; font-weight: 800; text-align: center; padding: 12px; background: var(--chip); border-radius: 12px; }

/* ops */
.ops-layout { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .ops-layout { grid-template-columns: 340px 1fr; align-items: start; } .ops-list { position: sticky; top: 70px; max-height: calc(100vh - 160px); overflow: auto; } }
.ops-map { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.radar { width: min(100%, 320px); background: radial-gradient(circle, color-mix(in srgb, var(--plum) 8%, var(--surface)), var(--surface)); border-radius: 50%; border: 1px solid var(--line); }
.ring { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 4 4; }
.ring-active { stroke: var(--sos); stroke-width: 2.5; stroke-dasharray: none; }
.ring-label { font-size: 10px; fill: var(--ink-2); }
.axis { stroke: var(--line); stroke-width: .8; }
.pin { stroke: #fff; stroke-width: 2; }
.pin-incident { fill: var(--sos); }
.pin-alerted { fill: #e29400; }
.pin-assigned { fill: var(--safe); }
.pin-declined { fill: #9a8e99; }
.legend { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; }
.pin-l { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-inline-end: 6px; vertical-align: middle; }
.pin-l.pin-incident { background: var(--sos); } .pin-l.pin-alerted { background: #e29400; } .pin-l.pin-assigned { background: var(--safe); } .pin-l.pin-declined { background: #9a8e99; }
.ops-actions { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; margin: 12px 0; }
.ops-actions .card { margin: 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; display: block; overflow-x: auto; }
.tbl th, .tbl td { text-align: start; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: .78rem; text-transform: uppercase; color: var(--ink-2); letter-spacing: .04em; }
.tbl .actions { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.tab { border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tab.active { background: var(--plum); color: #fff; border-color: var(--plum); }

/* overlays */
.toasts { position: fixed; top: 64px; inset-inline: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 60; pointer-events: none; padding: 0 12px; }
.toast { background: #2a1d29; color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); max-width: 520px; font-weight: 600; pointer-events: auto; }
.toast-error { background: var(--sos); } .toast-ok { background: var(--safe); } .toast-warn { background: #8a5a00; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(20, 8, 16, .55); display: grid; place-items: end center; z-index: 50; padding: 12px; }
@media (min-width: 640px) { .modal-backdrop { place-items: center; } }
.modal { background: var(--surface); color: var(--ink); width: min(100%, 460px); border-radius: 20px; padding: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); max-height: 90vh; overflow: auto; }
.modal-body { margin: 8px 0 14px; display: flex; flex-direction: column; gap: 10px; }
.modal-actions { display: flex; flex-direction: column; gap: 8px; }
.safe-modal .modal-actions .btn { min-height: 56px; font-size: 1.05rem; }
.countdown { position: fixed; inset: 0; z-index: 70; background: var(--sos); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; }
.countdown-text { font-size: 1.6rem; font-weight: 800; max-width: 440px; }
.fake-call { position: fixed; inset: 0; z-index: 80; background: linear-gradient(180deg, #1f2b3a, #0d1218); color: #fff; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 15vh 24px 10vh; }
.fc-top { text-align: center; }
.fc-top h2 { font-size: 2rem; margin: 12px 0 4px; }
.fc-avatar { width: 96px; height: 96px; border-radius: 50%; background: #4a6078; display: grid; place-items: center; font-size: 2.6rem; margin: 0 auto; }
.fc-btns { display: flex; gap: 80px; }
.fc-btns button { width: 72px; height: 72px; border-radius: 50%; border: 0; font-size: 1.8rem; color: #fff; cursor: pointer; }
.fc-decline { background: #e5383b; } .fc-accept { background: #2bb24c; }
body.strobe::after { content: ""; position: fixed; inset: 0; z-index: 40; pointer-events: none; animation: strobe .5s steps(1) infinite; }
@keyframes strobe { 0% { background: rgba(255, 0, 40, .35); } 50% { background: rgba(255, 255, 255, .25); } }
@media (prefers-reduced-motion: reduce) { body.strobe::after { animation: none; background: rgba(255, 0, 40, .2); } }
[dir="rtl"] .sos-ring { transform: rotate(-90deg) scaleY(-1); }

.eb-title { flex-basis: 100%; text-align: center; margin: 0; font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.eb-change { font-weight: 500; margin-inline-start: 6px; }
.btn-call, .btn-call-alt { flex-direction: column; gap: 0; line-height: 1.2; }
.eb-sub { display: block; font-size: .72rem; font-weight: 500; }
.btn-call .eb-sub { color: #fff; }

.chip { display: inline-flex; flex-direction: column; align-items: flex-start; text-align: start; border-radius: 14px; line-height: 1.25; }
.chip-name { font-weight: 700; }
.chip-blurb { font-size: .75rem; color: var(--ink-2); }

.heartbeat { animation: heartbeat 1.4s ease-in-out infinite; box-shadow: 0 6px 22px color-mix(in srgb, var(--plum) 45%, transparent); }
@keyframes heartbeat { 0%, 40%, 100% { transform: scale(1); } 10% { transform: scale(1.09); } 20% { transform: scale(1); } 30% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .heartbeat { animation: none; } }
.btn-medical { border-color: #1f7a4d; color: #13683f; }
@media (prefers-color-scheme: dark) { .btn-medical { color: #5fdc9c; border-color: #3ccf82; } }

.btn-medical-solid { background: #13834a; color: #fff; }

.eb-main { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.woman-icon { width: 22px; height: 30px; fill: currentColor; flex: none; }

button.alert { width: 100%; text-align: start; font: inherit; cursor: pointer; }
.sos-incoming { animation: heartbeat 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .sos-incoming { animation: none; } }

.gmap { margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.gmap iframe { width: 100%; height: 240px; border: 0; border-radius: 12px; background: var(--chip); }
.track-list { list-style: none; padding: 0; margin: 8px 0; }
.track-row { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.track-row:first-child { border-top: 0; }
.track-row.is-you { background: color-mix(in srgb, var(--plum) 6%, transparent); border-radius: 10px; padding-inline: 6px; }
.track-dist { text-align: end; display: flex; flex-direction: column; font-size: 1.05rem; }
.track-dist small { font-size: .78rem; color: var(--ink-2); }
.pin-you { fill: var(--info); }
.pin-l.pin-you { background: var(--info); }
.legend > span { display: inline-flex; align-items: center; }

/* ---------- PPI radar scope ---------- */
.ppi-wrap { background: #000; border-radius: 18px; padding: 8px; margin: 8px 0; box-shadow: inset 0 0 0 1px #0f3a1f, 0 6px 24px rgba(0, 0, 0, .35); }
.ppi { width: 100%; max-width: 420px; display: block; margin: 0 auto; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.ppi-bezel { fill: #000; }
.ppi-scope { stroke: #1b7a3c; stroke-width: 1.5; }
.ppi-ring { fill: none; stroke: #13612f; stroke-width: 1; stroke-dasharray: 3 4; }
.ppi-ring-active { stroke: #39ff7a; stroke-dasharray: none; stroke-width: 1.4; }
.ppi-axis { stroke: #1d8a45; stroke-width: .9; }
.ppi-diag { stroke: #0e4d25; stroke-dasharray: 2 5; }
.ppi-tick { stroke: #1d8a45; stroke-width: 1; }
.ppi-brg { fill: #46e07f; font-size: 9.5px; text-anchor: middle; letter-spacing: .5px; }
.ppi-rng { fill: #2fbf63; font-size: 9px; }
.ppi-hud { fill: #46e07f; font-size: 10px; letter-spacing: 1px; }
.ppi-sweep { transform-box: view-box; transform-origin: 50% 50%; animation: ppi-rotate 4s linear infinite; }
.ppi-wedge { fill: #39ff7a; }
.ppi-beam { stroke: #8dffb4; stroke-width: 1.6; }
@keyframes ppi-rotate { to { transform: rotate(360deg); } }
.ppi-track { fill: none; stroke: #2bff88; stroke-width: 1.6; stroke-opacity: .75; stroke-linejoin: round; }
.ppi-track-dot { fill: #2bff88; fill-opacity: .7; }
.ppi-dot { fill: #2f9bff; stroke: #cfe7ff; stroke-width: 1; }
.ppi-halo { fill: none; stroke: #2f9bff; stroke-opacity: .35; stroke-width: 1.2; }
.ppi-you .ppi-dot { fill: #6cc0ff; stroke: #fff; stroke-width: 2; }
.ppi-alerted .ppi-dot { fill: none; stroke: #2f9bff; stroke-width: 1.6; }
.ppi-alerted .ppi-halo, .ppi-declined .ppi-halo { display: none; }
.ppi-declined .ppi-dot { fill: #4a5a66; stroke: #4a5a66; }
.ppi-lbl { fill: #9fd2ff; font-size: 10px; font-weight: 700; }
.ppi-sub { fill: #46e07f; font-weight: 400; }
.ppi-her { fill: #ff2448; stroke: #ffd0d8; stroke-width: 1.2; }
.ppi-her-ring { fill: none; stroke: #ff2448; stroke-width: 1.4; transform-box: fill-box; transform-origin: center; animation: ppi-ping 1.6s ease-out infinite; }
@keyframes ppi-ping { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ppi-sweep, .ppi-her-ring { animation: none; } }
.ppi-legend { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; color: #46e07f; font: 11px ui-monospace, Menlo, monospace; padding: 6px 0 2px; }
.ppi-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 5px; vertical-align: -1px; }
.ppi-legend .l-her { background: #ff2448; } .ppi-legend .l-vol { background: #2f9bff; } .ppi-legend .l-trk { background: none; border-top: 2px solid #2bff88; border-radius: 0; height: 0; width: 14px; vertical-align: 3px; } .ppi-legend .l-alert { border: 1.6px solid #2f9bff; }
.ppi-table { width: 100%; border-collapse: collapse; background: #000; color: #46e07f; font: 12px/1.3 ui-monospace, Menlo, Consolas, monospace; margin-top: 6px; }
.ppi-table th { color: #2fbf63; font-weight: 600; text-align: start; padding: 5px 6px; border-bottom: 1px solid #13612f; letter-spacing: 1px; font-size: 10.5px; }
.ppi-table td { padding: 5px 6px; border-bottom: 1px solid #0b2e17; white-space: nowrap; }
.ppi-table td:first-child { color: #9fd2ff; font-weight: 700; }
.ppi-row-you td { background: #061a2a; }
.ppi-closing { color: #39ff7a; } .ppi-opening { color: #ff9b3d; } .ppi-steady { color: #9fb3a6; }

.ppi-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.track-card .track-list { margin-top: 4px; }
.gmap iframe { height: 280px; }

.ppi-table-wrap { overflow-x: auto; }
.ppi-table { font-size: 11.5px; }
.ppi-table td, .ppi-table th { padding: 5px 4px; }
.ppi-key { color: #2fbf63; font: 10px ui-monospace, Menlo, monospace; margin: 6px 4px 2px; }
.track-card .track-row { display: block; padding: 8px 0; }

.gmap, .ppi-box { position: relative; }
.zoom-bar { position: absolute; top: 8px; inset-inline-end: 8px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.zbtn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.25rem; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); line-height: 1; }
.ppi-box .zbtn { background: #04140a; color: #46e07f; border-color: #1b7a3c; }
.ppi-title { color: #8dffb4; font: 700 .9rem ui-monospace, Menlo, monospace; margin: 4px 6px 6px; letter-spacing: .5px; }
.ppi-explain { color: #b9e8c8; font-size: .82rem; line-height: 1.45; margin: 6px 8px 4px; }
.ppi-explain b { color: #8dffb4; }
.ppi-legend .l-you { background: #6cc0ff; box-shadow: 0 0 0 2px #fff inset; } .ppi-legend .l-decl { background: #4a5a66; }

.ppi-tag { fill: rgba(0, 18, 8, .88); stroke: #2bff88; stroke-width: 1; }
.ppi-tag-moving { stroke: #8dffb4; }
.ppi-tag-txt { fill: #c9ffdc; font-size: 9.5px; text-anchor: middle; font-weight: 600; }
.ppi-tag-id { fill: #9fd2ff; font-weight: 800; }
.ppi-leader { stroke: #2bff88; stroke-width: .8; stroke-opacity: .7; }
.ppi-moving .ppi-dot { animation: ppi-blink 1s steps(2, jump-none) infinite; }
.ppi-moving .ppi-halo { animation: ppi-blink-halo 1s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ppi-blink { 0% { opacity: 1; } 50% { opacity: .15; } 100% { opacity: 1; } }
@keyframes ppi-blink-halo { from { transform: scale(.7); stroke-opacity: .8; } to { transform: scale(1.8); stroke-opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ppi-moving .ppi-dot, .ppi-moving .ppi-halo { animation: none; } }
.ppi-box .zoom-bar { top: 34px; inset-inline-end: 10px; }

.onb { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.onb-step { display: grid; grid-template-columns: 34px 1fr; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.onb-step.done { opacity: .75; }
.onb-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); font-weight: 800; }
.onb-step.done .onb-n { background: var(--safe); color: #fff; }
.stars { display: flex; flex-wrap: wrap; gap: 6px; }
.star { flex-direction: row; align-items: center; gap: 4px; color: #e6a100; font-weight: 700; }
.row-flag td { background: color-mix(in srgb, var(--sos) 7%, transparent); }
.ai-box { background: var(--chip); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.ai-text { white-space: pre-wrap; font: inherit; background: var(--surface); padding: 10px; border-radius: 10px; margin: 8px 0 4px; }

/* ---------- autonomous protection: places, travel, help, dashboards ---------- */
.contacts-now { display: block; margin: 8px auto 0; max-width: 520px; padding: 8px 12px; border-radius: 12px; background: var(--chip); color: var(--ink); text-decoration: none; font-size: .92rem; }
.fs { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; min-width: 0; }
.fs input, .contact-row input { width: 100%; min-width: 0; box-sizing: border-box; }
.fs legend { padding: 0 6px; font-weight: 700; }
.contact-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.place-card h2 { margin: 0; }
.police-card h2 { margin: 0 0 4px; font-size: 1.15rem; }
.ack-box { display: grid; gap: 8px; }
.impact-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 18px 0; }
.impact-strip div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-align: center; }
.impact-strip b { display: block; font-size: 1.8rem; line-height: 1.1; color: var(--ink); }
.impact-strip span { color: var(--ink-2); font-size: .85rem; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 8px 0 14px; }
.stat-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 14px; background: var(--chip); }
.stat-n { font-size: 1.6rem; font-weight: 800; line-height: 1.1; color: var(--ink); }
.stat-l { color: var(--ink-2); font-size: .85rem; }
.meter { width: 100%; height: 10px; display: block; margin: 6px 0 10px; }
.meter-bg { fill: var(--line); }
.meter-fg { fill: var(--safe, #1baf7a); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.blink-card video { width: 100%; max-height: 50vh; border-radius: 14px; background: #000; transform: scaleX(-1); }
.blink-status { font-size: 1.15rem; font-weight: 700; margin: 10px 0 4px; }
html.sr-user .sos-btn { width: min(78vw, 300px); height: min(78vw, 300px); }

/* charts — reference palette (validated light + dark), text stays in ink colors */
.viz, .chart, .seg-bar { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --chart-grid: #e4e1dc; --chart-axis: #52514e; }
@media (prefers-color-scheme: dark) { .viz, .chart, .seg-bar, .legend { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --chart-grid: #3a3936; --chart-axis: #c3c2b7; } }
.chart { width: 100%; height: auto; display: block; margin: 4px 0 12px; }
.ch-grid { stroke: var(--chart-grid); stroke-width: 1; }
.ch-axis { fill: var(--chart-axis); font-size: 11px; }
.ch-bar { fill: var(--series-1); }
.ch-hit { fill: transparent; }
.ch-col:hover .ch-bar, .ch-col:focus .ch-bar { opacity: .8; }
.ch-col:focus { outline: none; }
.ch-col:focus .ch-hit { stroke: var(--ink); stroke-width: 1.5; }
.seg-bar { width: 100%; height: auto; display: block; margin: 6px 0; }
.seg.s1, .sw.s1 { fill: var(--series-1); background: var(--series-1); }
.seg.s2, .sw.s2 { fill: var(--series-2); background: var(--series-2); }
.seg.s3, .sw.s3 { fill: var(--series-3); background: var(--series-3); }
.seg.s4, .sw.s4 { fill: var(--series-4); background: var(--series-4); }
.seg-t { font-size: 13px; font-weight: 700; fill: #fff; }
.seg-t.s3, .seg-t.s4 { fill: #0b0b0b; }
.legend { list-style: none; padding: 0; margin: 4px 0 10px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; color: var(--ink); --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.ch-tip { position: absolute; z-index: 60; max-width: 180px; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--surface); font-size: .82rem; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.phrase { overflow-wrap: anywhere; }
.blink-card iframe { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: 14px; background: #000; }
body.blink-frame { margin: 0; padding: 0; background: #000; }
body.blink-frame video { width: 100%; height: 100vh; object-fit: cover; transform: scaleX(-1); display: block; }
.h3 { font-size: 1.1rem; }
.offline-card p { margin: 6px 0; }
.sos-live { border: 2px solid var(--danger, #d7193f); }
.sos-words .chip { display: inline-block; padding: 2px 8px; margin: 2px; border-radius: 999px; background: var(--chip); font-size: .85rem; }
[hidden] { display: none !important; }
.contact-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; }
.contact-row .row-del[hidden] { display: inline-flex !important; visibility: hidden; }

/* Latest update banner on her SOS screen: the one line she needs, always visible */
.latest-update { display: flex; flex-direction: column; gap: 4px; background: #fff8e1; border: 3px solid var(--saffron); border-radius: var(--radius); padding: 14px 16px; margin: 12px 0; color: var(--ink); }
.latest-update strong { font-size: 1.25rem; line-height: 1.3; }
.lu-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.lu-sub { font-size: .95rem; color: var(--ink-2); }
/* Explanations only when asked for */
.info-tip { margin: 8px 6px 4px; }
.info-tip > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: inherit; opacity: .85; min-height: 44px; }
.info-tip > summary::-webkit-details-marker { display: none; }
.info-tip > summary span { font-size: .85rem; text-decoration: underline; }
.info-tip > div { padding: 4px 2px 8px; line-height: 1.45; }
.track-card .info-tip { color: #b9e8c8; }
/* Volunteer status stepper */
.vol-steps { background: var(--chip); border-radius: var(--radius); padding: 12px; margin: 10px 0 14px; }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; list-style: none; padding: 0; margin: 8px 0 12px; counter-reset: s; }
.stepper li { text-align: center; padding: 10px 4px; border-radius: 10px; background: var(--surface); border: 2px solid var(--line); font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.stepper li.done { background: #e3f4ea; border-color: var(--safe); color: var(--safe); }
.stepper li.now { background: var(--plum); border-color: var(--plum); color: #fff; }
.btn-block { display: block; width: 100%; }
.toast { font-size: 1.05rem; font-weight: 600; }
.legal { padding-bottom: 48px; } .legal h2 { margin-top: 28px; } .legal li { margin-bottom: 6px; line-height: 1.5; } .legal p { line-height: 1.6; }
