/* Tanzania Police Digital OB concept demo. Palette from the national flag. */
:root {
  --green: #1eb53a; --green-ink: #0b6e2c; --green-deep: #08521f; --green-50: #eaf7ee; --green-100: #d3efdc;
  --yellow: #fcd116; --yellow-50: #fff8d6; --yellow-ink: #6b5600;
  --blue: #00a3dd; --blue-ink: #00628a; --blue-50: #e5f6fc;
  --black: #000; --ink: #121512; --ink-2: #384038; --muted: #5d665e; --line: #e2e6e2; --line-2: #cfd5cf;
  --bg: #f5f6f3; --surface: #fff; --red: var(--bus-red, #C8102E); --red-50: #fdecee; --amber: #b45309; --amber-50: #fff4e5;
  --radius: 12px; --radius-sm: 8px; --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 4px 16px rgb(0 0 0 / .06);
  --ease-out: cubic-bezier(.23, 1, .32, 1); --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --slab: "Roboto Slab", "Rockwell", "Zilla Slab", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --stripe: linear-gradient(100deg, var(--green) 0 44%, var(--yellow) 44% 46.5%, var(--black) 46.5% 53.5%, var(--yellow) 53.5% 56%, var(--blue) 56% 100%);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
body { margin: 0; font: 15px/1.5 var(--sans); color: var(--ink); background: var(--bg); min-height: 100dvh; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; text-wrap: balance; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; text-wrap: pretty; }
a { color: var(--blue-ink); }
button, a, [role="button"], label, summary { touch-action: manipulation; }
button, [role="button"], .tab, .chip { user-select: none; -webkit-user-select: none; }
input, textarea, select { font: inherit; font-size: 16px; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack > * + * { margin-top: .75rem; }
.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }

/* ---------- Branding header (mirrors polisi.go.tz layout) ---------- */
.topbar { background: var(--black); color: #fff; font-size: .85rem; padding-top: env(safe-area-inset-top); }
.topbar .inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: flex-end; align-items: center; gap: 1rem; padding: .35rem 1rem; }
.topbar a, .topbar button { color: #fff; background: none; border: 0; padding: .25rem .1rem; cursor: pointer; font: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; min-height: 32px; }
.topbar button[aria-label] { min-width: 32px; justify-content: center; }
.topbar .sep { width: 1px; height: 14px; background: rgb(255 255 255 / .35); flex: none; }
.topbar .tb-group { display: inline-flex; align-items: center; gap: 1rem; }
@media (max-width: 640px) { .topbar .inner { gap: .75rem; } .topbar .tb-group { gap: .75rem; } }
.topbar button[aria-pressed="true"] { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--yellow); }
.brand { background: #fff; }
.brand .inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: .75rem 1rem; }
.brand img { height: 92px; width: auto; }
.brand .titles { text-align: center; color: var(--ink); }
.brand .t1, .brand .t2 { font-family: var(--slab); letter-spacing: .08em; font-size: .82rem; text-transform: uppercase; color: var(--ink-2); }
.brand .t3 { font-family: var(--slab); font-weight: 800; font-size: clamp(1.15rem, 3.4vw, 2.1rem); letter-spacing: .04em; margin-top: .2rem; color: var(--black); text-transform: uppercase; }
.flagstripe { height: 8px; background: var(--stripe); }
.pubnav { background: var(--green-ink); }
.pubnav .inner { max-width: 1200px; margin: 0 auto; display: flex; gap: .25rem; justify-content: center; flex-wrap: wrap; padding: 0 .5rem; }
.pubnav a { color: #fff; text-decoration: none; font-family: var(--slab); padding: .8rem .9rem; border-bottom: 3px solid transparent; }
.pubnav a[aria-current="page"] { border-bottom-color: var(--yellow); }
@media (hover: hover) and (pointer: fine) { .pubnav a:hover { background: var(--green-deep); } }
.concept { background: var(--yellow); color: var(--black); font-size: .82rem; text-align: center; padding: .35rem 1rem; font-weight: 600; }
.concept b { font-weight: 800; }
@media (max-width: 640px) {
  .brand img { height: 56px; }
  .brand .t1, .brand .t2 { font-size: .6rem; letter-spacing: .04em; }
  .brand .inner { gap: .5rem; padding: .5rem .75rem; }
}

/* ---------- Public pages ---------- */
.page { max-width: 1200px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.narrow { max-width: 720px; }
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.25rem; align-items: stretch; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.hero-main { background: linear-gradient(135deg, var(--green-deep), var(--green-ink) 60%, #0a5c7a); color: #fff; border-radius: var(--radius); padding: 2rem; position: relative; overflow: hidden; }
.hero-main::after { content: ""; position: absolute; inset: auto -40px -40px auto; width: 220px; height: 220px; background: url(/img/police-logo.png) center/contain no-repeat; opacity: .1; }
.hero-main h1 { font-family: var(--slab); font-size: clamp(1.5rem, 3.6vw, 2.3rem); }
.hero-main p { max-width: 46ch; opacity: .95; }
.service-grid { display: grid; gap: .75rem; }
.service { display: flex; gap: .9rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; text-decoration: none; color: inherit; transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.service:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .service:hover { box-shadow: var(--shadow); } }
.service .ic { flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--green-50); color: var(--green-ink); }
.service strong { display: block; font-family: var(--slab); font-size: 1.02rem; }
.section-title { font-family: var(--slab); color: var(--green-ink); text-align: center; margin: 2rem 0 1rem; font-size: 1.4rem; }
.section-title::after { content: ""; display: block; width: 64px; height: 3px; background: var(--stripe); margin: .5rem auto 0; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; }
.feature h3 { font-family: var(--slab); }
.footer { background: var(--black); color: #ddd; font-size: .85rem; padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom)); }
.footer .inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer a { color: #fff; }

/* ---------- Staff app shell ---------- */
.appbar { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.appbar .inner { display: flex; align-items: center; gap: .6rem; padding: .45rem .9rem; }
.appbar .logo { height: 40px; width: auto; }
.appbar .name { line-height: 1.15; min-width: 0; }
.appbar .name b { font-family: var(--slab); font-size: .98rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar .name span { font-size: .75rem; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar .tools { margin-left: auto; display: flex; gap: .35rem; align-items: center; }
.appbar .flagstripe { height: 4px; }
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: calc(100dvh - 60px); }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: .75rem .5rem; position: sticky; top: 62px; height: calc(100dvh - 62px); overflow-y: auto; overscroll-behavior: contain; }
.side a { display: flex; gap: .65rem; align-items: center; padding: .6rem .7rem; border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-weight: 500; }
.side a[aria-current="page"] { background: var(--green-50); color: var(--green-ink); font-weight: 700; box-shadow: inset 3px 0 0 var(--green); }
@media (hover: hover) and (pointer: fine) { .side a:hover { background: var(--bg); } }
.side .who { padding: .75rem .7rem; margin-top: 1rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.side .who b { color: var(--ink); display: block; font-size: .9rem; }
.main { padding: 1.1rem 1.25rem 6rem; min-width: 0; max-width: 1280px; }
.tabbar { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: .9rem .8rem calc(84px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; inset: auto 0 0 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: .45rem .2rem .5rem; font-size: .7rem; color: var(--muted); text-decoration: none; font-weight: 600; }
  .tabbar a[aria-current="page"] { color: var(--green-ink); }
  .tabbar a[aria-current="page"] svg { background: var(--green-50); border-radius: 999px; }
  .tabbar svg { width: 44px; height: 26px; padding: 3px 11px; transition: background-color 160ms var(--ease-out); }
  .appbar .name span { display: none; }
  .hide-sm { display: none !important; }
}
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pagehead h1 { font-family: var(--slab); margin: 0; }
.pagehead p { margin: .2rem 0 0; color: var(--muted); }

/* ---------- Components ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; min-width: 0; }
.card > h2:first-child, .card > h3:first-child { margin-bottom: .75rem; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 42px; padding: .55rem 1rem; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: transform 120ms var(--ease-out), background-color 120ms var(--ease-out), box-shadow 120ms; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--green-ink); border-color: var(--green-ink); color: #fff; }
.btn.blue { background: var(--blue-ink); border-color: var(--blue-ink); color: #fff; }
.btn.dark { background: var(--black); border-color: var(--black); color: #fff; }
.btn.yellow { background: var(--yellow); border-color: #e2bb00; color: var(--black); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { min-height: 34px; padding: .3rem .7rem; font-size: .88rem; border-radius: 8px; }
.btn.icon { padding: 0; width: 40px; min-height: 40px; border-radius: 10px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--bg); } .btn.primary:hover { background: var(--green-deep); } .btn.blue:hover { background: #004f70; }
  .btn.dark:hover { background: #222; } .btn.yellow:hover { background: #f2c600; } .btn.ghost:hover { background: var(--bg); }
}
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.green { background: var(--green-50); color: var(--green-ink); border-color: var(--green-100); }
.badge.blue { background: var(--blue-50); color: var(--blue-ink); border-color: #c4e9f7; }
.badge.yellow { background: var(--yellow-50); color: var(--yellow-ink); border-color: #f5e08a; }
.badge.red { background: var(--red-50); color: var(--red); border-color: #f6c3ca; }
.badge.amber { background: var(--amber-50); color: var(--amber); border-color: #fcd9a8; }
.badge.dark { background: var(--black); color: #fff; border-color: var(--black); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }

/* Forms */
.field { display: grid; gap: .3rem; min-width: 0; }
.field > span { font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.field small { color: var(--muted); font-size: .8rem; }
.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  width: 100%; min-height: 44px; padding: .55rem .75rem; border: 1px solid var(--line-2); border-radius: 10px; background: #fff;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: 3px solid color-mix(in srgb, var(--blue) 35%, transparent); border-color: var(--blue-ink); }
.input-group { display: flex; gap: .4rem; } .input-group > input { flex: 1; min-width: 0; }
.check { display: flex; gap: .6rem; align-items: flex-start; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: .1rem 0 0; accent-color: var(--green-ink); flex: none; }
.check:has(input:checked) { border-color: var(--green-100); background: var(--green-50); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; background: #fff; gap: 2px; flex-wrap: wrap; }
.seg button, .seg a { border: 0; background: none; padding: .4rem .75rem; border-radius: 7px; font: inherit; font-weight: 600; font-size: .88rem; color: var(--muted); cursor: pointer; text-decoration: none; }
.seg [aria-pressed="true"], .seg [aria-current="page"] { background: var(--green-ink); color: #fff; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: .35rem .8rem; font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--green-ink); border-color: var(--green-ink); color: #fff; }
.error { color: var(--red); font-weight: 600; font-size: .88rem; }

/* Tables and lists */
.table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: .55rem .8rem; border-bottom: 1px solid var(--line); background: #fafbf9; white-space: nowrap; }
td { padding: .65rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.link { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { tr.link:hover td { background: #fafbf9; } }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list-item { display: flex; gap: .8rem; align-items: flex-start; padding: .75rem 1rem; text-decoration: none; color: inherit; min-width: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; overflow-wrap: anywhere; }
.list-item .meta { font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
a.list-item:active { background: var(--bg); }
@media (hover: hover) and (pointer: fine) { a.list-item:hover { background: #fafbf9; } }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: .35rem 1rem; font-size: .92rem; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }

/* KPI tiles */
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; position: relative; overflow: hidden; }
.kpi::before { content: none; }
.kpi.blue::before { background: var(--blue); } .kpi.yellow::before { background: var(--yellow); } .kpi.dark::before { background: var(--black); } .kpi.red::before { background: var(--red); }
.kpi .v { font-size: 1.85rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .l { font-size: .8rem; color: var(--muted); font-weight: 600; }

/* Alerts */
.alert { display: flex; gap: .7rem; align-items: flex-start; padding: .75rem .9rem; border-radius: 10px; border: 1px solid; font-size: .92rem; }
.alert.red { background: var(--red-50); border-color: #f6c3ca; color: #7d0a1c; }
.alert.amber { background: var(--amber-50); border-color: #fcd9a8; color: #6b3306; }
.alert.green { background: var(--green-50); border-color: var(--green-100); color: var(--green-deep); }
.alert.blue { background: var(--blue-50); border-color: #c4e9f7; color: #00445f; }
.alert svg { flex: none; margin-top: 2px; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 1rem 1.6rem; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: -4px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--green); }
.timeline li.k-statement::after { border-color: var(--blue); } .timeline li.k-exhibit::after { border-color: var(--yellow); } .timeline li.warn::after { border-color: var(--red); }
.timeline .when { font-size: .78rem; color: var(--muted); }
.exhibit-img { margin-top: .4rem; max-width: 260px; border-radius: 8px; border: 1px solid var(--line); }

/* Custody clock */
.clock { display: grid; gap: .3rem; }
.clock .bar { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.clock .fill { height: 100%; background: var(--green); border-radius: 99px; transition: width 400ms var(--ease-out); }
.clock.near .fill { background: #e8a200; } .clock.over .fill { background: var(--red); }
.clock .lbl { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .85rem; }
.cellboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: .75rem; }
.detainee { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; display: grid; gap: .6rem; text-decoration: none; color: inherit; transition: transform 140ms var(--ease-out); }
.detainee:active { transform: scale(.985); }
.detainee.over { border-color: #f1a3ae; background: #FFFBFA; }
.detainee.near { border-color: #f5cf7a; background: #FFFDF5; }

/* Dialogs and toasts */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 1.5rem)); max-height: min(88dvh, 820px); box-shadow: 0 20px 60px rgb(0 0 0 / .3); color: var(--ink); overscroll-behavior: contain; }
dialog::backdrop { background: rgb(10 20 12 / .45); }
dialog[open] { animation: pop 200ms var(--ease-out); }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px); } }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.dlg-head h2 { margin: 0; font-family: var(--slab); }
.dlg-body { padding: 1rem; }
.dlg-foot { display: flex; gap: .5rem; justify-content: flex-end; padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); position: sticky; bottom: 0; background: #fff; flex-wrap: wrap; }
@media (max-width: 640px) {
  dialog.sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 18px 18px 0 0; max-height: 92dvh; }
  dialog.sheet[open] { animation: up 260ms var(--ease-out); }
}
@keyframes up { from { transform: translateY(100%); } }
.toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: calc(90px + env(safe-area-inset-bottom)); display: grid; gap: .5rem; width: min(460px, calc(100vw - 1.5rem)); pointer-events: none; }
.toast { pointer-events: auto; background: var(--black); color: #fff; padding: .7rem .9rem; border-radius: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / .25); display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; animation: toast-in 240ms var(--ease-out); }
.toast.leave { animation: toast-out 180ms ease-in forwards; }
.toast .bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--green); flex: none; }
.toast.sms .bar { background: var(--blue); } .toast.warn .bar { background: var(--yellow); } .toast.err .bar { background: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* Simulated phone */
.phone-fab { position: fixed; z-index: 40; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); }
.fab { width: 54px; height: 54px; border-radius: 18px; border: 0; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 20px rgb(0 0 0 / .22); transition: transform 140ms var(--ease-out); position: relative; }
.fab:active { transform: scale(.94); }
.fab.voice { background: var(--green-ink); color: #fff; }
.fab.tel { background: var(--black); color: #fff; }
.fab .count { position: absolute; top: -5px; right: -5px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--yellow); color: #000; font-size: .75rem; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
.fab.ping { animation: ping 600ms var(--ease-out); }
@keyframes ping { 30% { transform: scale(1.12); } }
.fabs { position: fixed; z-index: 40; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); display: grid; gap: .6rem; }
@media (max-width: 860px) { .fabs { bottom: calc(80px + env(safe-area-inset-bottom)); } }
.phone { width: 340px; max-width: 100%; margin: 0 auto; background: #0d0f0d; border-radius: 38px; padding: 12px; box-shadow: inset 0 0 0 2px #2b2f2b; }
.phone .screen { background: #eef1ed; border-radius: 28px; overflow: hidden; height: min(560px, 62dvh); display: flex; flex-direction: column; }
.phone .status { display: flex; justify-content: space-between; padding: .45rem 1.1rem .2rem; font-size: .72rem; font-weight: 700; }
.phone .thread-head { background: #fff; padding: .5rem .8rem; border-bottom: 1px solid var(--line); display: flex; gap: .55rem; align-items: center; }
.phone .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--green-ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .8rem; flex: none; }
.phone .msgs { flex: 1; overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .5rem; overscroll-behavior: contain; }
.bubble { background: #fff; border-radius: 16px 16px 16px 4px; padding: .55rem .75rem; font-size: .86rem; max-width: 88%; box-shadow: 0 1px 1px rgb(0 0 0 / .06); overflow-wrap: anywhere; }
.bubble.new { animation: bubble 300ms var(--ease-out); }
@keyframes bubble { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.bubble .t { font-size: .68rem; color: var(--muted); margin-top: .2rem; }
.bubble.voice { background: var(--green-50); border: 1px solid var(--green-100); }
.bubble.voice .vh { display: flex; gap: .4rem; align-items: center; font-weight: 700; color: var(--green-ink); font-size: .8rem; margin-bottom: .25rem; }

/* Voice sheet */
.mic-ring { width: 96px; height: 96px; border-radius: 50%; margin: .5rem auto 1rem; display: grid; place-items: center; background: var(--green-50); color: var(--green-ink); border: 0; cursor: pointer; }
.mic-ring.on { background: var(--green-ink); color: #fff; animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--green) 20%, transparent); } }
.cmd-list { display: grid; gap: .35rem; font-size: .88rem; }
.cmd-list code { background: var(--bg); padding: .1rem .4rem; border-radius: 6px; }

/* Keypad (IVR) */
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; max-width: 280px; margin: 0 auto; }
.keypad button { height: 58px; border-radius: 50%; width: 58px; justify-self: center; border: 0; background: #fff; font-size: 1.35rem; font-weight: 600; cursor: pointer; box-shadow: 0 1px 2px rgb(0 0 0 / .1); transition: transform 100ms var(--ease-out), background-color 100ms; }
.keypad button:active { transform: scale(.92); background: var(--green-50); }

/* Story (guided demo) panel */
.story { position: fixed; z-index: 45; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: min(400px, calc(100vw - 32px)); background: #fff; border-radius: 16px; box-shadow: 0 16px 48px rgb(0 0 0 / .25); border: 1px solid var(--line); overflow: hidden; animation: pop 220ms var(--ease-out); }
.story .sh { background: var(--black); color: #fff; padding: .7rem .9rem; display: flex; align-items: center; gap: .6rem; }
.story .sh b { font-family: var(--slab); flex: 1; }
.story .sh button { color: #fff; }
.story .sb { padding: .9rem; max-height: 46dvh; overflow-y: auto; overscroll-behavior: contain; }
.story .steps { display: flex; gap: 4px; margin-bottom: .7rem; }
.story .steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.story .steps i.done { background: var(--green); } .story .steps i.cur { background: var(--yellow); }
.story .sf { display: flex; gap: .5rem; padding: .7rem .9rem; border-top: 1px solid var(--line); justify-content: space-between; flex-wrap: wrap; }
.story.min .sb, .story.min .sf { display: none; }
@media (max-width: 860px) { .story { bottom: calc(76px + env(safe-area-inset-bottom)); left: 8px; width: calc(100vw - 86px); } }

/* Offline */
.offline-banner { background: var(--black); color: var(--yellow); text-align: center; font-size: .85rem; font-weight: 700; padding: .4rem 1rem; }
.switch { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 99px; background: var(--line-2); position: relative; margin: 0; cursor: pointer; transition: background-color 160ms var(--ease-out); }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 200ms var(--ease-out); box-shadow: 0 1px 2px rgb(0 0 0 / .2); }
.switch input:checked { background: var(--black); }
.switch input:checked::after { transform: translateX(16px); }

/* Charts */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: .5rem; }
.bars .b { flex: 1; background: var(--green); border-radius: 4px 4px 0 0; position: relative; min-height: 2px; }
.bars .b:last-child { background: var(--blue); }
.bars-x { display: flex; gap: 4px; font-size: .68rem; color: var(--muted); margin-top: 4px; }
.bars-x span { flex: 1; text-align: center; }
.hbar { display: grid; grid-template-columns: 9.5rem 1fr 2.5rem; gap: .5rem; align-items: center; font-size: .85rem; margin-bottom: .35rem; }
.hbar .track { background: var(--bg); border-radius: 4px; height: 12px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--blue-ink); border-radius: 4px; }
.hbar .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
#map { height: 420px; border-radius: 0 0 var(--radius) var(--radius); z-index: 0; }
@media (max-width: 640px) { #map { height: 320px; } }
.leaflet-container { font: inherit; }
.pulse-marker { width: 18px; height: 18px; border-radius: 50%; background: var(--red); border: 3px solid #fff; box-shadow: 0 0 0 0 rgb(200 16 46 / .6); animation: pulse 1.6s ease-out 4; }
@keyframes pulse { to { box-shadow: 0 0 0 22px rgb(200 16 46 / 0); } }

/* Integrity */
.hash { font-family: var(--mono); font-size: .75rem; color: var(--muted); overflow-wrap: anywhere; }
.seal { display: flex; gap: .9rem; align-items: center; padding: 1rem; border-radius: 12px; }
.seal.ok { background: var(--green-50); color: var(--green-deep); } .seal.bad { background: var(--red-50); color: #7d0a1c; }
.seal .big { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.seal.ok .big { background: var(--green-ink); color: #fff; } .seal.bad .big { background: var(--red); color: #fff; }

/* Printable documents */
.doc { background: #fff; max-width: 800px; margin: 1rem auto; padding: 2rem; border: 1px solid var(--line); position: relative; overflow: hidden; }
.doc .dh { display: grid; grid-template-columns: 80px 1fr 80px; gap: 1rem; align-items: center; text-align: center; border-bottom: 3px solid; border-image: var(--stripe) 1; padding-bottom: .8rem; }
.doc .dh img { width: 80px; height: auto; }
.doc .dh div { font-family: var(--slab); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.doc .dh strong { display: block; font-size: 1.15rem; margin-top: .2rem; }
.doc h1 { text-align: center; font-family: var(--slab); margin: 1.2rem 0; font-size: 1.3rem; text-transform: uppercase; letter-spacing: .05em; }
.doc .qr { display: flex; gap: 1rem; align-items: center; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px dashed var(--line-2); }
.doc .qr svg, .doc .qr img { width: 130px; height: 130px; flex: none; }
.doc .wm { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font-size: 4.2rem; font-weight: 900; color: rgb(200 16 46 / .07); transform: rotate(-24deg); text-align: center; line-height: 1; }
.verify-ok { border-color: #ABEFC6; } .verify-bad { border-color: #FECDCA; }
@media print {
  body { background: #fff; }
  .topbar, .brand, .flagstripe, .pubnav, .footer, .noprint, .fabs, .story, .toasts, .concept { display: none !important; }
  .doc { border: 0; margin: 0; max-width: none; }
}

/* Skeleton */
.skel { background: linear-gradient(90deg, #eceeea, #f6f7f4, #eceeea); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 8px; height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Demo data toggle (break-ui) */
.demo-toggle { position: fixed; top: calc(70px + env(safe-area-inset-top)); right: 12px; z-index: 35; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.chip:has(input:checked) { background: var(--green-ink); border-color: var(--green-ink); color: #fff; }
.chip input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.leaflet-container img { max-width: none !important; display: inline; }
.chip { position: relative; }
.appbar .seg { flex-wrap: nowrap; }
.appbar .seg button { padding: .3rem .55rem; }
.pagehead h1[style*="mono"] { font-size: 1.45rem; }
@media (max-width: 860px) { .fab { width: 48px; height: 48px; border-radius: 16px; } }

/* =====================================================================
   v2: premium shell + command centre
   ===================================================================== */
:root { --cc-bg: #040a07; --cc-ink: #e9f1eb; --cc-mute: #8fa397; --cc-line: rgb(255 255 255 / .08); --cc-panel: rgb(255 255 255 / .035); --glow-g: rgb(30 181 58 / .35); --glow-b: rgb(0 163 221 / .3); --glow-y: rgb(252 209 22 / .35); }
body { font-feature-settings: "cv11", "ss01"; letter-spacing: -.005em; }
.card, .kpi, .detainee { border-radius: 14px; box-shadow: 0 1px 0 rgb(0 0 0 / .03), 0 8px 24px -16px rgb(0 0 0 / .18); }
@media (hover: hover) and (pointer: fine) { a.detainee:hover, a.service:hover { box-shadow: 0 2px 0 rgb(0 0 0 / .03), 0 18px 36px -20px rgb(0 0 0 / .35); } }

/* Dark navigation rail */
.side { background: linear-gradient(180deg, #07130c 0%, #040a07 100%); border-right: 0; color: #cfdcd3; padding-top: 1rem; }
.side a { color: #b9c9be; position: relative; transition: background-color 160ms ease, color 160ms ease; }
.side a svg { opacity: .8; }
.side a[aria-current="page"] { background: rgb(30 181 58 / .14); color: #fff; box-shadow: none; }
.side a[aria-current="page"]::before { content: ""; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--stripe); background: linear-gradient(var(--green), var(--yellow), var(--blue)); }
.side a[aria-current="page"] svg { opacity: 1; color: var(--yellow); }
@media (hover: hover) and (pointer: fine) { .side a:hover { background: rgb(255 255 255 / .06); color: #fff; } }
.side .who { border-top-color: rgb(255 255 255 / .08); color: #8fa397; }
.side .who b { color: #fff; }
.side .who .btn { background: rgb(255 255 255 / .06); border-color: rgb(255 255 255 / .12); color: #e9f1eb; }
.side .who .btn.ghost { background: transparent; border-color: transparent; }
.side-brand { display: flex; align-items: center; gap: .6rem; padding: .2rem .7rem 1rem; margin-bottom: .5rem; border-bottom: 1px solid rgb(255 255 255 / .08); }
.side-brand b { font-family: var(--slab); color: #fff; font-size: .9rem; line-height: 1.15; }
.side-brand small { display: block; color: var(--yellow); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.side-sec { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: #5f7466; font-weight: 700; padding: .9rem .7rem .3rem; }
.appbar { background: rgb(255 255 255 / .86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }

/* View entrance: one quick rise per top-level block, lightly staggered */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
#view.enter > * { animation: rise 280ms var(--ease-out) both; }
#view.enter > *:nth-child(2) { animation-delay: 40ms; } #view.enter > *:nth-child(3) { animation-delay: 75ms; }
#view.enter > *:nth-child(4) { animation-delay: 105ms; } #view.enter > *:nth-child(n+5) { animation-delay: 130ms; }

@media (prefers-reduced-motion: reduce) {
  .live-dot::after, .inc-new { animation: none; }
}
.pipe { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.pipe .p .l { overflow-wrap: anywhere; hyphens: auto; }
.cc-skel { height: 120px; border-radius: 16px; background: linear-gradient(90deg, rgb(255 255 255 / .03), rgb(255 255 255 / .07), rgb(255 255 255 / .03)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.list-item .title, .list-item .meta { display: block; }

/* =====================================================================
   v3: AXURE platform look (matches voice.krenshaw.net) with TZ flag accents
   Navy menu, white work area, (type later replaced by Public Sans + Source Serif 4 in v6),
   ink primary buttons, quiet borders and layered shadows.
   ===================================================================== */
:root {
  --night: #070C16; --night-2: #0C1424; --navy: var(--t-navy-2, #0A1622); --navy-2: #0f2035;
  --ink: #0A1220; --ink-2: #18233A; --muted: #5B6576; --soft: #8A93A3; --line: #E2E6ED; --line-2: #CDD3DD; --field: #FAFBFC; --bg: #F6F8FB;
  --brand: #0E7BB5; --ring: rgb(14 123 181 / .16);
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Instrument Serif", Georgia, serif;
  --slab: "Source Serif 4", Georgia, serif;
  --elev-2: 0 1px 2px rgb(16 24 40 / .05), 0 1px 3px rgb(16 24 40 / .06);
  --elev-3: 0 4px 12px -2px rgb(16 24 40 / .08), 0 2px 4px -2px rgb(16 24 40 / .05);
  --elev-4: 0 16px 32px -8px rgb(16 24 40 / .16), 0 4px 8px -4px rgb(16 24 40 / .06);
  --cc-bg: var(--night); --cc-ink: #E8EEF6; --cc-mute: #8A93A3;
}
body { font-family: var(--sans); color: var(--ink); background: var(--bg); font-feature-settings: "cv11", "ss01", "ss03"; }
h1, h2, h3 { letter-spacing: -.02em; font-weight: 700; }
.pagehead h1 { font-family: var(--sans); font-size: 1.65rem; letter-spacing: -.025em; }
.pagehead h1[style*="mono"] { font-family: var(--mono) !important; letter-spacing: -.01em; }
.kicker { display: inline-flex; align-items: center; gap: .55rem; font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--brand); }
.kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.serif-accent { font-family: var(--display); font-style: italic; font-weight: 400; background: linear-gradient(90deg, #45C1F5, #7DC242 70%, #FCD116); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Surfaces */
.card, .kpi, .detainee, .feature, .service { border-color: var(--line); border-radius: 14px; box-shadow: var(--elev-2); }
.card-head, .dlg-head, .dlg-foot { border-color: var(--line); }
th { background: var(--field); color: var(--muted); border-color: var(--line); font-size: .7rem; letter-spacing: .08em; }
td { border-color: #EEF1F5; }
.kpi::before { width: 3px; }
.kpi .v { letter-spacing: -.03em; }

/* Controls */
.btn { border-radius: 10px; border-color: var(--line-2); font-weight: 600; letter-spacing: .005em; box-shadow: 0 1px 2px rgb(16 24 40 / .05); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), 0 1px 2px rgb(10 18 32 / .2), 0 8px 20px -8px rgb(10 18 32 / .45); }
.btn.blue { background: var(--brand); border-color: var(--brand); }
@media (hover: hover) and (pointer: fine) { .btn.primary:hover { background: #18233A; } .btn:hover { background: var(--field); } .btn.primary:hover, .btn.blue:hover, .btn.dark:hover { filter: none; } }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea { background: var(--field); border-color: var(--line); border-radius: 10px; transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--ring); }
.chip { border-color: var(--line); background: #fff; }
.chip[aria-pressed="true"], .chip:has(input:checked), .seg [aria-pressed="true"], .seg [aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg { border-color: var(--line); background: var(--field); }
.check { border-color: var(--line); background: var(--field); }
.check:has(input:checked) { background: #ECFDF3; border-color: #ABEFC6; }
.badge { border-radius: 6px; font-weight: 600; letter-spacing: .01em; }
.alert { border-radius: 12px; }
::selection { background: rgb(41 171 226 / .28); }

/* Navy menu (as AXURE) with a flag edge */
.side { background: linear-gradient(180deg, var(--navy) 0%, var(--night) 100%); }
.side a[aria-current="page"] { background: rgb(255 255 255 / .07); }
.side a[aria-current="page"] svg { color: #45C1F5; }
.side-brand small { color: #7DC242; }
.side-sec { color: rgb(255 255 255 / .32); }
.appbar .name b { font-family: var(--sans); font-weight: 700; letter-spacing: -.01em; }

/* Public site: keep the polisi.go.tz header, AXURE finish below it */
.brand .t3 { font-family: Georgia, "Times New Roman", serif; font-weight: 700; letter-spacing: .03em; }
.brand .t1, .brand .t2 { font-family: Georgia, serif; }
.pubnav { background: var(--navy); }
.pubnav a { font-family: var(--sans); font-weight: 600; font-size: .92rem; }
.pubnav a[aria-current="page"] { border-bottom-color: #7DC242; }
@media (hover: hover) and (pointer: fine) { .pubnav a:hover { background: rgb(255 255 255 / .06); } }
.hero-main { background: radial-gradient(700px 360px at 0% 0%, rgb(41 171 226 / .28), transparent 60%), radial-gradient(600px 300px at 100% 100%, rgb(125 194 66 / .22), transparent 60%), var(--night); border-radius: 18px; padding: 2.4rem; }
.hero-main h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -.01em; line-height: 1.02; }
.section-title { font-family: var(--display); font-weight: 400; color: var(--ink); font-size: clamp(1.7rem, 3vw, 2.3rem); }
.feature h3, .service strong { font-family: var(--sans); font-weight: 700; letter-spacing: -.01em; }
.service { border-left-width: 1px; position: relative; overflow: hidden; }
.footer { background: var(--night); }

/* AXURE-style sign-in */
.wave { display: flex; align-items: center; gap: 3px; height: 34px; }
.wave i { width: 3px; border-radius: 3px; background: linear-gradient(#45C1F5, #7DC242); animation: wave 1.6s var(--ease-in-out) infinite; animation-delay: calc(var(--i) * -90ms); height: var(--h); transform-origin: center; }
@keyframes wave { 50% { transform: scaleY(.45); } }
.numfeat { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgb(255 255 255 / .08); }
.numfeat > div { padding: .9rem .9rem .9rem 0; border-bottom: 1px solid rgb(255 255 255 / .08); display: grid; grid-template-columns: auto 1fr; gap: .2rem .7rem; }
.numfeat > div:nth-child(odd) { border-right: 1px solid rgb(255 255 255 / .08); }
.numfeat > div:nth-child(even) { padding-left: .9rem; }
.numfeat em { font-style: normal; font-family: var(--mono); font-size: .72rem; color: #45C1F5; grid-row: span 2; padding-top: .15rem; }
.numfeat b { color: #fff; font-size: .9rem; font-weight: 600; }
.numfeat span { color: #8A93A3; font-size: .8rem; line-height: 1.4; }
.trust { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .76rem; color: #8A93A3; margin-top: auto; }
.trust span { display: inline-flex; gap: .4rem; align-items: center; } .trust svg { color: #7DC242; }
@media (max-width: 860px) { .numfeat { grid-template-columns: 1fr; } .numfeat > div:nth-child(odd) { border-right: 0; } .numfeat > div:nth-child(even) { padding-left: 0; } }

@media (prefers-reduced-motion: reduce) { .wave i { animation: none; } }

/* =====================================================================
   v4: AXURE Voice layout, matched to voice.krenshaw.net screenshots
   ===================================================================== */
:root { --ax-blue: #2B8ACB; --ax-blue-d: #1F74AE; --ax-green: #3F7D17; --menu: var(--t-navy, #0D1B2A); --menu-2: var(--t-navy-2, #0A1622); }
/* Pages are opened dozens of times a day: no entrance fade (Emil: don't animate high-frequency views) */
#view.enter > * { animation: none; }

/* ---------- Shell ---------- */
.ax { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }
.ax.min { grid-template-columns: 76px minmax(0, 1fr); }
.ax-side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: .75rem; padding: 1rem .75rem .75rem; background: var(--menu); color: #fff; overflow: hidden; z-index: 20; }
.ax-brand { display: flex; align-items: center; gap: .65rem; padding: .25rem .25rem .5rem; }
.ax-brand img { width: 38px; height: 38px; flex: none; }
.ax-bt { min-width: 0; line-height: 1.15; flex: 1; }
.ax-bt b { font-size: 1.02rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.ax-bt b span { color: #45C1F5; font-weight: 600; }
.ax-bt small { display: block; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: rgb(255 255 255 / .4); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-collapse { flex: none; width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgb(255 255 255 / .12); background: rgb(255 255 255 / .04); color: rgb(255 255 255 / .7); display: grid; place-items: center; cursor: pointer; transition: transform 200ms var(--ease-out), background-color 150ms ease; }
.ax-collapse:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .ax-collapse:hover { background: rgb(255 255 255 / .1); color: #fff; } }
.ax.min .ax-collapse svg { transform: rotate(180deg); }
.ax-chips { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: .45rem; }
.ax-chips div { border: 1px solid rgb(255 255 255 / .1); background: rgb(255 255 255 / .03); border-radius: 9px; padding: .45rem .55rem; min-width: 0; }
.ax-chips small { display: block; font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; color: #45C1F5; font-weight: 700; }
.ax-chips .g small { color: #7DC242; }
.ax-chips b { font-size: .8rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ax-find { display: flex; align-items: center; gap: .5rem; border: 1px solid rgb(255 255 255 / .1); background: rgb(255 255 255 / .03); border-radius: 9px; padding: 0 .65rem; color: rgb(255 255 255 / .45); }
.ax-find input { flex: 1; min-width: 0; background: none; border: 0; color: #fff; padding: .55rem 0; font-size: .86rem; outline: none; }
.ax-find input::placeholder { color: rgb(255 255 255 / .38); }
.ax-find:focus-within { border-color: #45C1F5; box-shadow: 0 0 0 3px rgb(69 193 245 / .2); }
.ax-nav { flex: 1; overflow-y: auto; overscroll-behavior: contain; margin: 0 -.25rem; padding: 0 .25rem; scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .15) transparent; }
.ax-sec { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: rgb(255 255 255 / .36); font-weight: 700; padding: 1rem .6rem .35rem; white-space: nowrap; }
.ax-nav a, .ax-off { display: flex; align-items: center; gap: .7rem; padding: .62rem .7rem; border-radius: 9px; color: rgb(255 255 255 / .78); text-decoration: none; font-size: .9rem; font-weight: 500; position: relative; white-space: nowrap; transition: background-color 150ms ease, color 150ms ease; }
.ax-nav a svg, .ax-off svg { flex: none; color: rgb(255 255 255 / .62); }
.ax-nav a[aria-current="page"] { background: rgb(41 171 226 / .14); color: #fff; font-weight: 600; box-shadow: inset -2px 0 0 #45C1F5; }
.ax-nav a[aria-current="page"] svg { color: #fff; }
.ax-nav a em { margin-left: auto; font-style: normal; min-width: 20px; height: 20px; border-radius: 99px; background: #E5484D; color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
@media (hover: hover) and (pointer: fine) { .ax-nav a:hover, .ax-off:hover { background: rgb(255 255 255 / .06); color: #fff; } }
.ax-off { cursor: pointer; }
.ax-off input { margin-left: auto; appearance: none; width: 34px; height: 20px; border-radius: 99px; background: rgb(255 255 255 / .18); position: relative; cursor: pointer; transition: background-color 160ms ease; flex: none; }
.ax-off input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform 200ms var(--ease-out); }
.ax-off input:checked { background: var(--yellow); } .ax-off input:checked::after { transform: translateX(14px); background: #000; }
.ax-user { display: flex; align-items: center; gap: .6rem; border-top: 1px solid rgb(255 255 255 / .08); padding: .8rem .25rem 0; }
.ax-user .av { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #3F7D17, #7DC242); display: grid; place-items: center; font-weight: 700; font-size: .78rem; flex: none; }
.ax-ut { min-width: 0; flex: 1; line-height: 1.2; }
.ax-ut b { display: block; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-ut small { display: block; font-size: .72rem; color: rgb(255 255 255 / .45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-out { flex: none; width: 34px; height: 34px; border-radius: 9px; border: 0; background: var(--ax-blue); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform 120ms var(--ease-out); }
.ax-out:active { transform: scale(.94); }
/* collapsed rail */
.ax.min .ax-bt, .ax.min .ax-chips, .ax.min .ax-find, .ax.min .ax-sec, .ax.min .ax-nav a span, .ax.min .ax-off span, .ax.min .ax-ut, .ax.min .ax-nav a em { display: none; }
.ax.min .ax-brand { flex-direction: column; }
.ax.min .ax-nav a, .ax.min .ax-off { justify-content: center; padding: .7rem; }
.ax.min .ax-off input { display: none; }
.ax.min .ax-user { flex-direction: column; }
/* main column */
.ax-main { min-width: 0; display: flex; flex-direction: column; background: #fff; }
.ax-main .main { padding: 1.75rem 2rem 6rem; max-width: 1480px; width: 100%; }
.ax-concept { display: flex; align-items: center; gap: .6rem; padding: .45rem 2rem; font-size: .76rem; color: #5B6576; border-bottom: 1px solid var(--line); background: #FBFCFD; }
.ax-concept .flagdot { width: 26px; height: 6px; border-radius: 3px; background: var(--stripe); flex: none; }
.ax-lang { margin-left: auto; display: inline-flex; gap: .2rem; }
.ax-lang button { border: 0; background: none; font: inherit; font-size: .78rem; color: #5B6576; padding: .2rem .45rem; border-radius: 6px; cursor: pointer; }
.ax-lang button[aria-pressed="true"] { color: var(--ink); font-weight: 700; background: #EEF1F5; }
.ax-mtop { display: none; }
@media (max-width: 860px) {
  .ax, .ax.min { grid-template-columns: 1fr; }
  .ax-side { display: none; }
  .ax-mtop { display: flex; position: sticky; top: 0; z-index: 30; align-items: center; gap: .5rem; padding: calc(.5rem + env(safe-area-inset-top)) .9rem .5rem; background: var(--menu); color: #fff; }
  .ax-mtop .ax-mlogo { display: flex; align-items: center; gap: .5rem; color: #fff; text-decoration: none; margin-right: auto; }
  .ax-mtop b { font-weight: 700; } .ax-mtop b span { color: #45C1F5; font-weight: 600; }
  .ax-mtop .seg { background: rgb(255 255 255 / .06); border-color: rgb(255 255 255 / .12); }
  .ax-mtop .seg button { color: rgb(255 255 255 / .7); } .ax-mtop .seg [aria-pressed="true"] { background: #fff; color: var(--ink); }
  .ax-mtop .btn.icon { color: #fff; }
  .ax-concept { padding: .45rem .9rem; } .ax-concept .ax-lang { display: none; }
  .ax-main .main { padding: 1.1rem .9rem calc(88px + env(safe-area-inset-bottom)); }
}

/* ---------- Shared AXURE components ---------- */
.ax-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 2px rgb(16 24 40 / .04); min-width: 0; }
.ax-card.flush { overflow: hidden; }
.ax-pad { padding: 1.4rem 1.5rem; }
.ax-card h2 { font-size: 1.12rem; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.ax-card-h { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); }
.ax-card-h > :last-child:not(:first-child) { flex: none; white-space: nowrap; }
.ax-badge { display: inline-flex; align-items: center; padding: .16rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 600; border: 1px solid; white-space: nowrap; }
.ax-badge.green { color: #067647; background: #ECFDF3; border-color: #ABEFC6; } .ax-badge.blue { color: #175CD3; background: #EFF8FF; border-color: #B2DDFF; }
.ax-badge.red { color: #B42318; background: #FEF3F2; border-color: #FECDCA; } .ax-badge.amber { color: #B54708; background: #FFFAEB; border-color: #FEDF89; }
.ax-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; border: 1px solid; }
.ax-ic.sm { width: 34px; height: 34px; border-radius: 10px; }
.ax-ic.blue { color: var(--ax-blue); background: #EFF8FF; border-color: #D1E9FF; } .ax-ic.green { color: var(--ax-green); background: #F3FAEB; border-color: #DCEFC7; }
.ax-ic.amber { color: #DC6803; background: #FFFAEB; border-color: #FEF0C7; } .ax-ic.red { color: #D92D20; background: #FEF3F2; border-color: #FEE4E2; }
.ax-ic.purple { color: #6D4BD8; background: #F4F3FF; border-color: #E4E0FF; } .ax-ic.navy { color: #fff; background: var(--menu); border-color: var(--menu); }
.btn.ax-blue { background: var(--ax-blue); border-color: var(--ax-blue); color: #fff; border-radius: 12px; min-height: 46px; padding: .6rem 1.15rem; box-shadow: 0 1px 2px rgb(16 24 40 / .08), 0 6px 14px -8px rgb(16 24 40 / .35); }
@media (hover: hover) and (pointer: fine) { .btn.ax-blue:hover { background: var(--ax-blue-d); } }

/* ---------- Dashboard ---------- */
.ax-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: -1.75rem -2rem 1.75rem; padding: 1.4rem 2rem; border-bottom: 1px solid var(--line); }
.ax-head h1 { font-size: 1.65rem; letter-spacing: -.03em; margin: 0; }
.ax-head p { margin: .25rem 0 0; color: #18233A; font-size: .95rem; }
.ax-head-r { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ax-pill { display: inline-flex; align-items: center; gap: .5rem; min-height: 46px; padding: 0 1rem; border-radius: 12px; background: #F3FAEB; border: 1px solid #DCEFC7; color: var(--ax-green); font-weight: 700; font-variant-numeric: tabular-nums; }
.ax-pill i { width: 9px; height: 9px; border-radius: 50%; background: #7DC242; }
.ax-bell { width: 46px; min-height: 46px; border-radius: 12px; position: relative; }
.ax-bell em { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; border-radius: 99px; background: #E5484D; color: #fff; font-size: .68rem; font-style: normal; font-weight: 700; display: grid; place-items: center; padding: 0 5px; border: 2px solid #fff; }
.ax-scope { min-height: 46px; width: auto; border-radius: 12px; }
@media (max-width: 860px) { .ax-head { margin: -1.1rem -.9rem 1.1rem; padding: 1.1rem .9rem; } .ax-head h1 { font-size: 1.35rem; } .ax-head-r { width: 100%; } .ax-head-r .ax-blue { flex: 1; } }
.ax-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; margin-bottom: 1.1rem; }
@media (max-width: 1180px) { .ax-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .ax-kpis { grid-template-columns: 1fr; } }
.ax-kpi { padding: 1.4rem 1.4rem 1.2rem; }
.ax-kpi .l { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: #18233A; font-weight: 600; margin-bottom: .7rem; }
.ax-kpi .v { font-size: 2.6rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: .45rem; }
.ax-kpi .v.g { color: var(--ax-green); }
.ax-kpi .v small { font-size: .95rem; letter-spacing: 0; font-weight: 600; color: var(--ink); }
.ax-kpi .v.sm { font-size: 1.45rem; letter-spacing: -.02em; line-height: 1.2; }
.ax-kpi p { margin: .9rem 0 0; font-size: .92rem; color: #18233A; }
.ax-kpi p b.up { color: var(--ax-green); } .ax-kpi p b.down { color: #B42318; }
.ax-kpi.bump .v span { animation: bump 320ms var(--ease-out); }
.ax-mini { display: flex; align-items: flex-end; gap: 4px; height: 46px; width: 92px; }
.ax-mini i { flex: 1; border-radius: 3px; background: #5AAEE6; transform-origin: bottom; animation: growY 480ms var(--ease-out) both; animation-delay: calc(var(--i) * 40ms + 100ms); }
.ax-mini i:last-child { background: var(--ax-blue); }
.ax-strip { display: flex; align-items: center; gap: 1.1rem; padding: 1.2rem 1.4rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.ax-strip .grow { flex: 1; min-width: 240px; }
.ax-strip h2 { font-size: 1.1rem; }
.ax-strip p { margin: .3rem 0 0; color: #18233A; font-size: .92rem; }
.ax-stats { display: flex; gap: 2.2rem; padding: 0 .5rem; }
.ax-stats div { text-align: center; } .ax-stats b { display: block; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ax-stats b.red { color: #C2362F; } .ax-stats b.amber { color: #DC6803; }
.ax-stats span { font-size: .78rem; color: #18233A; }
.ax-stats span { display: block; line-height: 1.3; text-wrap: balance; }
@media (max-width: 860px) { .ax-strip { align-items: flex-start; } .ax-stats { width: 100%; justify-content: space-around; gap: 1rem; padding: .3rem 0; } .ax-stats div { flex: 1; } .ax-strip .ax-blue { width: 100%; } }
.ax-actions { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1.1rem; }
@media (max-width: 1180px) { .ax-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ax-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ax-act { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; text-decoration: none; color: var(--ink); transition: transform 140ms var(--ease-out), box-shadow 160ms ease, border-color 160ms ease; }
.ax-act b { font-weight: 600; font-size: .95rem; line-height: 1.25; }
.ax-act:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .ax-act:hover { border-color: #CDD3DD; box-shadow: 0 6px 16px -8px rgb(16 24 40 / .18); } }
.ax-row { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 1.1rem; margin-bottom: 1.1rem; align-items: start; }
@media (max-width: 1100px) { .ax-row { grid-template-columns: 1fr; } }
.ax-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .88rem; color: #18233A; margin-top: .45rem; }
.ax-legend span { display: inline-flex; align-items: center; gap: .45rem; } .ax-legend i { width: 10px; height: 10px; border-radius: 3px; }
.ax-seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 12px; background: #F6F8FB; border: 1px solid var(--line); }
.ax-seg button { border: 0; background: none; font: inherit; font-weight: 700; font-size: .86rem; color: #18233A; padding: .5rem .95rem; border-radius: 9px; cursor: pointer; transition: background-color 150ms ease, color 150ms ease; }
.ax-seg button[aria-pressed="true"] { background: var(--ax-blue); color: #fff; box-shadow: 0 1px 2px rgb(16 24 40 / .15); }
.ax-chart-box { position: relative; margin-top: 1rem; touch-action: pan-y; }
.ax-chart { width: 100%; height: auto; display: block; overflow: visible; }
.ax-chart .grid { stroke: #EEF1F5; stroke-width: 1; }
.ax-chart .yl { fill: #5B6576; font-size: 11px; text-anchor: end; font-family: var(--sans); }
.ax-chart .xl { fill: #5B6576; font-size: 11px; font-family: var(--sans); }
.ax-chart .cursor { stroke: #8A93A3; stroke-dasharray: 3 4; }
.ax-chart .ax-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: axdraw 900ms var(--ease-out) forwards; }
.ax-chart .ax-fade { animation: fadeIn 600ms ease 250ms both; }
@keyframes axdraw { to { stroke-dashoffset: 0; } }
.ax-tip { position: absolute; top: 0; min-width: 150px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .65rem .8rem; box-shadow: 0 10px 24px -10px rgb(16 24 40 / .25); font-size: .84rem; pointer-events: none; transition: left 120ms var(--ease-out); }
.ax-tip b { display: block; margin-bottom: .35rem; font-weight: 600; }
.ax-tip div { display: flex; align-items: center; gap: .45rem; } .ax-tip div span { margin-left: auto; font-weight: 700; padding-left: 1rem; font-variant-numeric: tabular-nums; }
.ax-tip i { width: 9px; height: 9px; border-radius: 2px; }
.ax-big { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.ax-big > span { font-size: 2.7rem; font-weight: 800; letter-spacing: -.04em; color: var(--ax-green); font-variant-numeric: tabular-nums; }
.ax-big small { font-size: .95rem; font-weight: 600; color: var(--ink); }
.ax-stack { display: flex; gap: 3px; height: 12px; margin: 1.1rem 0 1.3rem; border-radius: 99px; overflow: hidden; }
.ax-stack i { min-width: 4px; transform-origin: left; animation: growX 600ms var(--ease-out) both; animation-delay: calc(var(--i) * 70ms + 150ms); }
.ax-outl { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.05rem; }
.ax-outl li { display: grid; grid-template-columns: 12px 1fr auto 4.2rem; gap: .8rem; align-items: center; font-weight: 600; font-size: .95rem; }
.ax-outl i { width: 10px; height: 10px; border-radius: 3px; } .ax-outl b { font-variant-numeric: tabular-nums; } .ax-outl em { font-style: normal; color: #18233A; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.ax-map { height: 400px; background: #EEF1F5; z-index: 0; }
@media (max-width: 640px) { .ax-map { height: 300px; } }
.ax-pin { background: var(--menu); color: #fff; border-radius: 8px; padding: 3px 4px 3px 7px; font: 700 11px var(--sans); white-space: nowrap; display: inline-flex; gap: 5px; align-items: center; box-shadow: 0 4px 12px rgb(10 18 32 / .35); }
.ax-pin span { background: #7DC242; color: #0A1220; border-radius: 5px; padding: 0 5px; }
.ax-new { width: 14px; height: 14px; border-radius: 50%; background: #E5484D; border: 2px solid #fff; box-shadow: 0 0 0 0 rgb(229 72 77 / .6); animation: axping 1.4s var(--ease-out) 5; }
@keyframes axping { to { box-shadow: 0 0 0 20px rgb(229 72 77 / 0); } }
.ax-list { list-style: none; margin: 0; padding: 0; max-height: 470px; overflow-y: auto; overscroll-behavior: contain; }
.ax-list li { display: flex; align-items: center; gap: .8rem; padding: .9rem 1.25rem; border-bottom: 1px solid #EEF1F5; }
.ax-list li:last-child { border-bottom: 0; }
.ax-list .grow { flex: 1; min-width: 0; } .ax-list b { display: block; font-weight: 600; } .ax-list small { display: block; color: #18233A; font-size: .82rem; }
.ax-cell-bar { display: grid; grid-template-columns: 2rem 1fr; gap: .6rem; align-items: center; min-width: 120px; }
.ax-cell-bar span { font-weight: 700; font-variant-numeric: tabular-nums; }
.ax-cell-bar i { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--ax-blue), #7DC242); transform-origin: left; animation: growX 600ms var(--ease-out) both; }
.seal.ok { background: #ECFDF3; color: #054F31; border: 1px solid #ABEFC6; } .seal.ok .big { background: var(--ax-green); }
.seal.bad { background: #FEF3F2; color: #7A271A; border: 1px solid #FECDCA; }

/* ---------- Full-screen sign-in (as voice.krenshaw.net/login) ---------- */
.ax-login { display: grid; grid-template-columns: 1.12fr 1fr; min-height: 100dvh; background: #fff; }
.ax-login-art { background: radial-gradient(700px 420px at 0% 0%, rgb(41 171 226 / .1), transparent 60%), #070C16; color: #E8EEF6; display: flex; flex-direction: column; padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1.5rem, 5vw, 4.5rem); }
.ax-login-art .brandrow { display: flex; align-items: center; gap: .65rem; }
.ax-login-art .brandrow img { width: 40px; height: 40px; }
.ax-login-art .brandrow b { color: #fff; font-weight: 700; font-size: 1.05rem; } .ax-login-art .brandrow b span { color: #45C1F5; font-weight: 600; }
.ax-login-art .brandrow small { display: block; font-size: .64rem; letter-spacing: .22em; text-transform: uppercase; color: #8A93A3; font-weight: 600; }
.ax-login-mid { margin: auto 0; padding: 2.5rem 0; max-width: 560px; display: grid; gap: 1.5rem; }
.ax-login-art .kicker { color: #B7C0CE; letter-spacing: .2em; } .ax-login-art .kicker::before { background: #45C1F5; }
.ax-login-art h1 { font-family: var(--display); font-weight: 400; color: #fff; font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1; letter-spacing: -.015em; margin: 0; }
.ax-login-art .lead { color: #B7C0CE; font-size: 1.02rem; line-height: 1.6; margin: 0; max-width: 46ch; }
.ax-login-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; color: #8A93A3; font-size: .78rem; }
.ax-login-foot b { color: #E8EEF6; font-weight: 600; }
.ax-login-pane { display: flex; flex-direction: column; padding: 1.25rem clamp(1.25rem, 4vw, 3rem); }
.ax-login-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.ax-login-top a { color: #5B6576; text-decoration: none; }
.ax-login-form { width: 100%; max-width: 400px; margin: auto; padding: 2rem 0; }
.ax-login-form .kicker::before { display: none; }
.ax-login-form h2 { font-size: 2.05rem; letter-spacing: -.035em; margin: .55rem 0 0; font-weight: 700; }
.ax-login-form p.muted { margin: .45rem 0 0; color: #5B6576; font-size: 1rem; }
.ax-login-form .field > span a { font-weight: 500; color: var(--ax-blue); text-decoration: none; }
.ax-login-form .field input { min-height: 50px; border-radius: 10px; }
.pw { position: relative; } .pw input { padding-right: 4.5rem !important; }
.pw-show { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); border: 0; background: none; font: inherit; font-size: .84rem; font-weight: 600; color: #18233A; padding: .4rem .5rem; border-radius: 6px; cursor: pointer; }
.ax-check { display: flex; align-items: center; gap: .6rem; font-size: .95rem; cursor: pointer; }
.ax-check input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.ax-submit { width: 100%; min-height: 52px; font-size: 1rem; border-radius: 10px; }
.ax-divider { display: flex; align-items: center; gap: .9rem; margin: 1.6rem 0 .8rem; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: #8A93A3; font-weight: 600; }
.ax-divider::before, .ax-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ax-accts { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ax-accts li + li { border-top: 1px solid #EEF1F5; }
.ax-accts button { width: 100%; display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem; background: #fff; border: 0; font: inherit; text-align: left; cursor: pointer; transition: background-color 150ms ease; }
.ax-accts button:active { background: #F6F8FB; }
@media (hover: hover) and (pointer: fine) { .ax-accts button:hover { background: #F6F8FB; } }
.ax-accts .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: #F3FAEB; color: var(--ax-green); border: 1px solid #DCEFC7; flex: none; }
.ax-accts .tx { flex: 1; min-width: 0; } .ax-accts b { display: block; font-size: .9rem; font-weight: 600; } .ax-accts small { display: block; font-size: .78rem; color: #5B6576; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-login-bottom { display: flex; justify-content: space-between; gap: 1rem; font-size: .76rem; color: #8A93A3; flex-wrap: wrap; }
.ax-login-bottom span { display: inline-flex; align-items: center; gap: .35rem; }
@media (max-width: 960px) {
  .ax-login { grid-template-columns: 1fr; }
  .ax-login-art { padding: calc(1.25rem + env(safe-area-inset-top)) 1.25rem 1.5rem; }
  .ax-login-mid { padding: 1.25rem 0 0; gap: 1rem; } .ax-login-art .numfeat, .ax-login-art .wave, .ax-login-foot { display: none; }
  .ax-login-art h1 { font-size: 2.4rem; }
  .ax-login-pane { padding-bottom: calc(1.25rem + env(safe-area-inset-bottom)); }
  .ax-login-form { padding: 1.5rem 0; }
}
/* Floating buttons sit above the AXURE content, smaller on desktop */
.fabs { right: 20px; }
/* Every page header matches the AXURE dashboard header */
.ax-main .pagehead { margin: -1.75rem -2rem 1.5rem; padding: 1.4rem 2rem; border-bottom: 1px solid var(--line); align-items: center; }
.ax-main .pagehead h1 { font-size: 1.65rem; }
.ax-main .pagehead p { color: #18233A; }
@media (max-width: 860px) { .ax-main .pagehead { margin: -1.1rem -.9rem 1.1rem; padding: 1.1rem .9rem; } .ax-main .pagehead h1 { font-size: 1.35rem; } }
.ax-main .card { border-radius: 16px; }
.ax-main .btn.primary { border-radius: 10px; }
.ax-pin { position: relative; }
.ax-pin::after { content: ""; position: absolute; left: 14px; bottom: -5px; width: 10px; height: 10px; background: var(--menu); transform: rotate(45deg); border-radius: 2px; z-index: -1; }
.ax-map .leaflet-tile { width: 256.5px !important; height: 256.5px !important; }
@media (max-width: 860px) { .ax-scope { width: 100%; } }
@media (max-width: 560px) {
  .ax-pill { display: none; }
  .ax-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .ax-kpi { padding: 1rem; } .ax-kpi .l { font-size: .64rem; letter-spacing: .1em; margin-bottom: .5rem; }
  .ax-kpi .v { font-size: 2rem; } .ax-kpi .v small { font-size: .8rem; } .ax-kpi .v.sm { font-size: 1.1rem; }
  .ax-kpi p { font-size: .8rem; margin-top: .6rem; } .ax-mini { width: 56px; height: 34px; gap: 3px; }
  .ax-pad { padding: 1.1rem; } .ax-act { padding: .75rem; gap: .6rem; } .ax-act b { font-size: .85rem; }
  .ax-list li { padding: .8rem 1rem; flex-wrap: wrap; } .ax-list .grow { flex-basis: calc(100% - 50px); }
  .ax-seg button { padding: .45rem .7rem; }
}

/* =====================================================================
   v5: display settings (boxed / full width), dark theme, PWA boot screen
   ===================================================================== */
.boot { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: .8rem; background: var(--t-navy, #0D1B2A); color: #fff; font: 700 1.1rem "Noto Sans", system-ui, sans-serif; }
.boot img { animation: bootp 1.2s ease-in-out infinite; }
@keyframes bootp { 50% { opacity: .55; } }

/* Layout width */
.ax-main .main { margin-inline: auto; }
html[data-layout="boxed"] .ax-main .main { max-width: 1320px; }
html[data-layout="full"] .ax-main .main { max-width: none; }
html[data-layout="full"] .page, html[data-layout="full"] .brand .inner, html[data-layout="full"] .topbar .inner, html[data-layout="full"] .pubnav .inner, html[data-layout="full"] .footer .inner { max-width: none; }
html[data-layout="full"] .page { padding-inline: clamp(1rem, 3vw, 2.5rem); }

/* Settings dialog */
.pref-group { border: 0; padding: 0; margin: 0; }
.pref-group legend, .pref-group > b { font-weight: 700; font-size: .92rem; margin-bottom: .6rem; display: block; }
.pref-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.pref-row.three { grid-template-columns: repeat(3, 1fr); }
.pref-opt { position: relative; display: grid; gap: .5rem; padding: .7rem; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: .86rem; font-weight: 600; text-align: center; transition: border-color 150ms ease, box-shadow 150ms ease, transform 120ms var(--ease-out); }
.pref-opt:active { transform: scale(.98); }
.pref-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pref-opt:has(input:checked) { border-color: var(--ax-blue); box-shadow: 0 0 0 3px rgb(43 138 203 / .18); }
.pref-opt:has(input:focus-visible) { outline: 2px solid var(--ax-blue); outline-offset: 2px; }
.pv { display: flex; height: 58px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #F6F8FB; }
.pv .s { width: 22%; background: var(--t-navy, #0D1B2A); }
.pv .c { flex: 1; display: grid; gap: 4px; padding: 7px; align-content: start; }
.pv .c b { height: 9px; border-radius: 3px; background: #DCE3EC; }
.pv-layout .c { margin: 0 18%; } .pv-layout.full .c { margin: 0; }
.pv-theme.dark { background: #070C16; } .pv-theme.dark .c b { background: #1E2A40; }
.pv-theme.system { background: linear-gradient(135deg, #F6F8FB 50%, #070C16 50%); }
.pv-theme.system .c b { background: #8A93A3; opacity: .5; }

/* ---------- Dark theme (AXURE dark navy) ---------- */
html[data-theme="dark"] {
  --ink: #E8EEF6; --ink-2: #C3CCD8; --muted: #8A93A3; --soft: #6B7587;
  --line: rgb(255 255 255 / .09); --line-2: rgb(255 255 255 / .16); --field: #0F1A2C; --bg: #070C16; --surface: #0C1424;
  --ring: rgb(69 193 245 / .25); --brand: #45C1F5; --ax-blue: #2B8ACB; --ax-green: #8FDB4F;
  --green-50: rgb(125 194 66 / .12); --green-100: rgb(125 194 66 / .3); --blue-50: rgb(41 171 226 / .12); --yellow-50: rgb(252 209 22 / .1); --red-50: rgb(229 72 77 / .12); --amber-50: rgb(251 191 36 / .1);
  --green-ink: #8FDB4F; --blue-ink: #45C1F5; --yellow-ink: #FCD34D;
  color-scheme: dark;
}
html[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
html[data-theme="dark"] .ax-main, html[data-theme="dark"] .ax-login, html[data-theme="dark"] .ax-login-pane { background: var(--bg); }
html[data-theme="dark"] .ax-side { background: #050912; border-right: 1px solid var(--line); }
html[data-theme="dark"] .ax-concept { background: #0A1220; color: var(--muted); }
html[data-theme="dark"] .ax-lang button { color: var(--muted); } html[data-theme="dark"] .ax-lang button[aria-pressed="true"] { background: rgb(255 255 255 / .08); color: #fff; }
html[data-theme="dark"] :is(.ax-card, .card, .kpi, .detainee, .feature, .service, .story, .tabbar, .ax-accts button, .ax-tip, .keypad button, .chip, dialog, .dlg-head, .dlg-foot, .brand, .phone-card) { background: var(--surface); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .brand .titles, html[data-theme="dark"] .brand .t3 { color: #fff; } html[data-theme="dark"] .brand .t1, html[data-theme="dark"] .brand .t2 { color: var(--ink-2); }
html[data-theme="dark"] :is(.ax-head p, .ax-kpi .l, .ax-kpi p, .ax-strip p, .ax-stats span, .ax-legend, .ax-outl em, .ax-list small, .ax-main .pagehead p, .ax-act, .ax-kpi .v small, .ax-big small, .ax-login-form p.muted, .ax-accts small, .ax-chips b) { color: var(--ink-2); }
html[data-theme="dark"] .ax-kpi .v { color: #fff; } html[data-theme="dark"] .ax-kpi .v.g, html[data-theme="dark"] .ax-big > span { color: #8FDB4F; }
html[data-theme="dark"] :is(.ax-head, .ax-card-h, .ax-list li, td, th, .list > li, .ax-accts li + li, .card-head, .ax-main .pagehead) { border-color: var(--line); }
html[data-theme="dark"] th { background: #0A1220; color: var(--muted); }
html[data-theme="dark"] :is(.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea) { background: var(--field); border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] :is(.field input, .field select, .field textarea, .input):focus { background: #13213A; }
html[data-theme="dark"] .ax-find { background: rgb(255 255 255 / .04); }
html[data-theme="dark"] .btn { background: rgb(255 255 255 / .05); border-color: var(--line-2); color: var(--ink); box-shadow: none; }
html[data-theme="dark"] .btn.primary { background: #fff; border-color: #fff; color: #0A1220; }
html[data-theme="dark"] .btn.ax-blue, html[data-theme="dark"] .btn.blue { background: var(--ax-blue); border-color: var(--ax-blue); color: #fff; }
html[data-theme="dark"] .btn.yellow { background: var(--yellow); color: #000; } html[data-theme="dark"] .btn.dark { background: #000; color: #fff; border-color: var(--line-2); }
html[data-theme="dark"] .btn.danger { background: #E5484D; border-color: #E5484D; color: #fff; }
html[data-theme="dark"] .btn.ghost { background: transparent; border-color: transparent; }
@media (hover: hover) and (pointer: fine) { html[data-theme="dark"] .btn:hover { background: rgb(255 255 255 / .1); } html[data-theme="dark"] .btn.primary:hover { background: #E8EEF6; } html[data-theme="dark"] .btn.ax-blue:hover { background: var(--ax-blue-d); } html[data-theme="dark"] a.list-item:hover, html[data-theme="dark"] tr.link:hover td { background: rgb(255 255 255 / .04); } }
html[data-theme="dark"] :is(.chip[aria-pressed="true"], .chip:has(input:checked), .seg [aria-pressed="true"], .seg [aria-current="page"]) { background: #fff; color: #0A1220; border-color: #fff; }
html[data-theme="dark"] .seg, html[data-theme="dark"] .ax-seg { background: var(--field); border-color: var(--line); }
html[data-theme="dark"] .ax-seg button { color: var(--ink-2); } html[data-theme="dark"] .ax-seg button[aria-pressed="true"] { color: #fff; }
html[data-theme="dark"] .check { background: var(--field); border-color: var(--line); } html[data-theme="dark"] .check:has(input:checked) { background: rgb(125 194 66 / .1); border-color: rgb(125 194 66 / .35); }
html[data-theme="dark"] .ax-badge.green, html[data-theme="dark"] .badge.green { color: #8FDB4F; background: rgb(125 194 66 / .12); border-color: rgb(125 194 66 / .3); }
html[data-theme="dark"] .ax-badge.blue, html[data-theme="dark"] .badge.blue { color: #7DD3FC; background: rgb(41 171 226 / .12); border-color: rgb(41 171 226 / .3); }
html[data-theme="dark"] .ax-badge.red, html[data-theme="dark"] .badge.red { color: #FDA29B; background: rgb(229 72 77 / .14); border-color: rgb(229 72 77 / .35); }
html[data-theme="dark"] .ax-badge.amber, html[data-theme="dark"] .badge.amber, html[data-theme="dark"] .badge.yellow { color: #FCD34D; background: rgb(251 191 36 / .12); border-color: rgb(251 191 36 / .3); }
html[data-theme="dark"] .badge { background: rgb(255 255 255 / .06); border-color: var(--line); color: var(--ink-2); }
html[data-theme="dark"] .ax-ic { background: rgb(255 255 255 / .05); border-color: var(--line); }
html[data-theme="dark"] .ax-ic.blue { color: #7DD3FC; } html[data-theme="dark"] .ax-ic.green { color: #8FDB4F; } html[data-theme="dark"] .ax-ic.amber { color: #FCD34D; } html[data-theme="dark"] .ax-ic.red { color: #FDA29B; } html[data-theme="dark"] .ax-ic.purple { color: #C4B5FD; }
html[data-theme="dark"] .ax-ic.navy { background: #fff; color: #0A1220; }
html[data-theme="dark"] .ax-pill { background: rgb(125 194 66 / .1); border-color: rgb(125 194 66 / .28); color: #8FDB4F; }
html[data-theme="dark"] .ax-bell em { border-color: var(--bg); }
html[data-theme="dark"] .alert.red { background: rgb(229 72 77 / .12); border-color: rgb(229 72 77 / .35); color: #FECDCA; }
html[data-theme="dark"] .alert.amber { background: rgb(251 191 36 / .1); border-color: rgb(251 191 36 / .3); color: #FDE68A; }
html[data-theme="dark"] .alert.green { background: rgb(125 194 66 / .1); border-color: rgb(125 194 66 / .3); color: #C7F0A4; }
html[data-theme="dark"] .alert.blue { background: rgb(41 171 226 / .1); border-color: rgb(41 171 226 / .3); color: #BAE6FD; }
html[data-theme="dark"] .seal.ok { background: rgb(125 194 66 / .1); color: #C7F0A4; border-color: rgb(125 194 66 / .3); }
html[data-theme="dark"] .seal.bad { background: rgb(229 72 77 / .12); color: #FECDCA; border-color: rgb(229 72 77 / .35); }
html[data-theme="dark"] .detainee.over { background: rgb(229 72 77 / .07); border-color: rgb(229 72 77 / .4); }
html[data-theme="dark"] .detainee.near { background: rgb(251 191 36 / .06); border-color: rgb(251 191 36 / .35); }
html[data-theme="dark"] .timeline li::after { background: var(--surface); } html[data-theme="dark"] .timeline li::before { background: var(--line); }
html[data-theme="dark"] .clock .bar { background: rgb(255 255 255 / .06); border-color: var(--line); }
html[data-theme="dark"] .skel { background: linear-gradient(90deg, #111C30, #18263F, #111C30); background-size: 200% 100%; }
html[data-theme="dark"] .ax-chart .grid { stroke: rgb(255 255 255 / .07); } html[data-theme="dark"] :is(.ax-chart .yl, .ax-chart .xl) { fill: var(--muted); }
html[data-theme="dark"] .ax-chart .dot { fill: var(--bg); }
html[data-theme="dark"] .ax-map { background: #1B1F24; }
html[data-theme="dark"] .leaflet-popup-content-wrapper, html[data-theme="dark"] .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
html[data-theme="dark"] .leaflet-popup-content a { color: #7DD3FC; }
html[data-theme="dark"] .leaflet-bar a { background: var(--surface); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .leaflet-control-attribution { background: rgb(0 0 0 / .5); color: var(--muted); }
html[data-theme="dark"] .ax-cell-bar i { opacity: .9; }
html[data-theme="dark"] .mic-ring { background: rgb(125 194 66 / .12); color: #8FDB4F; }
html[data-theme="dark"] .ax-check input { accent-color: #fff; }
html[data-theme="dark"] .pv { border-color: var(--line); }
html[data-theme="dark"] .ax-login-art { background: #03060C; }
html[data-theme="dark"] .ax-divider::before, html[data-theme="dark"] .ax-divider::after { background: var(--line); }
html[data-theme="dark"] .ax-accts .ic { background: rgb(125 194 66 / .1); border-color: rgb(125 194 66 / .25); color: #8FDB4F; }
html[data-theme="dark"] .pw-show { color: var(--ink-2); }
html[data-theme="dark"] .tabbar a { color: var(--muted); } html[data-theme="dark"] .tabbar a[aria-current="page"] { color: #fff; } html[data-theme="dark"] .tabbar a[aria-current="page"] svg { background: rgb(255 255 255 / .1); }
html[data-theme="dark"] .hero-main { box-shadow: inset 0 0 0 1px var(--line); }
html[data-theme="dark"] .section-title { color: var(--ink); }
html[data-theme="dark"] .service .ic { background: rgb(255 255 255 / .06); }
html[data-theme="dark"] .kv dt { color: var(--muted); }
html[data-theme="dark"] .exhibit-img { border-color: var(--line); }
html[data-theme="dark"] dialog::backdrop { background: rgb(0 0 0 / .6); }
html[data-theme="dark"] a { color: #7DD3FC; }
html[data-theme="dark"] :is(.ax-nav a, .ax-act, .tabbar a, .btn, .pubnav a, .topbar a, .ax-login-top a, .list-item, .service, .detainee, .fa) { color: inherit; }
html[data-theme="dark"] .ax-nav a { color: rgb(255 255 255 / .78); }
html[data-theme="dark"] .error { color: #FDA29B; }
html[data-theme="dark"] .hash { color: var(--muted); }
/* Printed documents are paper: always light */
html[data-theme="dark"] .doc { background: #fff; color: #121512; border-color: #e2e6e2; }
html[data-theme="dark"] .doc .kv dt { color: #5d665e; }
[data-prefs] > * + * { margin-top: 1.25rem !important; }

/* =====================================================================
   v6: Type system — authority + service
   Source Serif 4 (institutional, like statute books and gazettes) carries
   headings and the force name; Public Sans (designed for public-service
   websites: plain, warm, highly legible in Kiswahili and English) carries
   everything people read and use.
   ===================================================================== */
:root {
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --slab: "Source Serif 4", Georgia, serif;
}
body { font-family: var(--sans); font-feature-settings: "kern", "liga", "tnum" 0; letter-spacing: 0; }
h1, h2, h3, .pagehead h1, .ax-head h1, .ax-card h2, .dlg-head h2 { font-family: var(--display); font-weight: 650; letter-spacing: -.012em; font-optical-sizing: auto; }
.ax-head h1, .ax-main .pagehead h1, .pagehead h1 { font-weight: 650; letter-spacing: -.015em; }
.ax-kpi .v, .ax-big > span, .ax-stats b, .kpi .v, .num, .mono { font-family: var(--sans); font-variant-numeric: tabular-nums; }
.ax-kpi .v { letter-spacing: -.03em; font-weight: 800; }
.kicker, .ax-kpi .l, .ax-sec, .ax-chips small, th, .ax-divider { font-family: var(--sans); font-weight: 700; }
.serif-accent { font-family: var(--display); font-style: italic; font-weight: 500; }
.ax-login-art h1, .hero-main h1, .section-title { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; }
.ax-login-form h2 { font-family: var(--display); font-weight: 650; letter-spacing: -.02em; }
.brand .t3 { font-family: var(--display); font-weight: 700; letter-spacing: .04em; }
.brand .t1, .brand .t2 { font-family: var(--display); font-weight: 500; letter-spacing: .1em; }
.ax-bt b, .ax-mtop b, .ax-login-art .brandrow b { font-family: var(--display); font-weight: 700; letter-spacing: 0; }
.btn, .ax-nav a, .field > span, .chip, .seg button, .ax-seg button, .badge, .ax-badge { font-family: var(--sans); }
.btn { font-weight: 600; letter-spacing: 0; }
.ax-card h2 { font-size: 1.15rem; }
.ax-strip h2 { font-size: 1.15rem; }

/* Developer portal */
.dev-hero { margin: -1.75rem -2rem 1.5rem; padding: 2rem 2rem 1.6rem; border-bottom: 1px solid var(--line); background: radial-gradient(600px 240px at 0% 0%, rgb(43 138 203 / .1), transparent 60%); }
.page .dev-hero { margin: 0 0 1.5rem; border: 1px solid var(--line); border-radius: 16px; }
.dev-hero h1 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin: .4rem 0 .3rem; }
.dev-hero p { max-width: 70ch; color: var(--ink-2); }
.dev-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .6rem; margin-top: 1.2rem; }
.dev-facts div { border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem; background: var(--surface, #fff); min-width: 0; }
.dev-facts b { display: block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dev-facts code { font-size: .82rem; overflow-wrap: anywhere; }
.dev-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.dev-nav { position: sticky; top: 1rem; display: grid; gap: .15rem; }
.dev-nav input { margin-bottom: .5rem; }
.dev-nav a { display: flex; justify-content: space-between; padding: .45rem .6rem; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: .9rem; }
.dev-nav a span { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .dev-nav a:hover { background: var(--field); } }
@media (max-width: 960px) { .dev-grid { grid-template-columns: 1fr; } .dev-nav { position: static; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
.dev-sec { margin-bottom: 2rem; scroll-margin-top: 1rem; }
.dev-sec > h2, .dev-sec .spread h2 { font-size: 1.25rem; margin-bottom: .75rem; }
.dev-op { border: 1px solid var(--line); border-radius: 12px; margin-bottom: .55rem; background: var(--surface, #fff); }
.dev-op summary { display: flex; align-items: center; gap: .65rem; padding: .7rem .9rem; cursor: pointer; list-style: none; flex-wrap: wrap; }
.dev-op summary::-webkit-details-marker { display: none; }
.dev-op .meth { min-width: 58px; justify-content: center; font-family: var(--mono); font-size: .72rem; }
.dev-op .path { font-family: var(--mono); font-size: .88rem; font-weight: 600; }
.dev-op .sum { color: var(--ink-2); font-size: .9rem; flex: 1; min-width: 160px; }
.dev-op[open] summary { border-bottom: 1px solid var(--line); }
.dev-body { padding: .9rem; display: grid; gap: .8rem; }
.dev-body p { margin: 0; color: var(--ink-2); }
.dev-params td, .dev-params th { padding: .45rem .6rem; font-size: .85rem; }
.dev-params .req { color: #D92D20; }
.dev-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .6rem; }
.dev-try { display: grid; gap: .7rem; }
.dev-code, .dev-out { margin: 0; padding: .8rem .9rem; border-radius: 10px; background: #0A1220; color: #D7E3F0; font-family: var(--mono); font-size: .8rem; line-height: 1.5; overflow: auto; max-height: 420px; white-space: pre; }
.dev-out[data-status="ok"] { outline: 1px solid rgb(125 194 66 / .5); } .dev-out[data-status="err"] { outline: 1px solid rgb(229 72 77 / .6); }
html[data-theme="dark"] :is(.dev-op, .dev-facts div) { background: var(--surface); }
html[data-theme="dark"] .dev-code, html[data-theme="dark"] .dev-out { background: #03060C; border: 1px solid var(--line); }

/* RBAC module */
.rb-tabs { flex-wrap: wrap; }
.rb-matrix-wrap { max-height: 70vh; overflow: auto; }
.rb-matrix { border-collapse: separate; border-spacing: 0; font-size: .86rem; }
.rb-matrix thead th { position: sticky; top: 0; z-index: 2; background: var(--field); vertical-align: bottom; text-transform: none; letter-spacing: 0; font-size: .8rem; color: var(--ink); min-width: 104px; }
.rb-matrix th.perm, .rb-matrix td.perm { position: sticky; left: 0; z-index: 1; background: var(--surface, #fff); min-width: 260px; }
.rb-matrix thead th.perm { z-index: 3; background: var(--field); }
.rb-matrix td.perm b { font-weight: 600; } .rb-matrix td.perm code { display: block; font-size: .72rem; color: var(--muted); }
.rb-role { display: block; font-weight: 700; line-height: 1.2; } .rb-meta { display: flex; gap: .25rem; align-items: center; color: var(--muted); font-weight: 500; font-size: .72rem; margin-top: .25rem; }
.rb-matrix tr.grp td { background: var(--field); font-weight: 700; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); position: sticky; left: 0; }
.rb-matrix td.cell { text-align: center; }
.rb-matrix td.cell.changed { background: rgb(43 138 203 / .1); }
.rb-sens { color: #DC6803; }
.rb-cb { display: inline-grid; place-items: center; width: 34px; height: 34px; cursor: pointer; border-radius: 8px; }
.rb-cb input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rb-cb span { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2); display: grid; place-items: center; transition: background-color 120ms ease, border-color 120ms ease, transform 120ms var(--ease-out); }
.rb-cb input:checked + span { background: var(--ax-green); border-color: var(--ax-green); }
.rb-cb input:checked + span::after { content: ""; width: 10px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.rb-cb:active span { transform: scale(.9); }
.rb-cb input:focus-visible + span { outline: 2px solid var(--ax-blue); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .rb-cb:hover { background: var(--field); } }
.rb-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1rem; }
.rb-perm-chips { display: flex; flex-wrap: wrap; gap: .3rem; } .rb-perm-chips .badge { font-family: var(--mono); font-weight: 500; font-size: .7rem; }
.rb-diff { padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: .4rem; }
.rb-sel { min-height: 36px; padding: .3rem .5rem; width: auto; max-width: 220px; }
.rb-inactive td { opacity: .55; }
.rb-switch { padding: 0; color: var(--ink); gap: .5rem; }
.rb-switch input { margin-left: 0; background: var(--line-2); }
.rb-switch input:checked { background: var(--ax-green); } .rb-switch input:checked::after { background: #fff; }
.rb-can { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; font-size: .9rem; max-height: 260px; overflow: auto; }
.rb-can li { display: flex; gap: .4rem; align-items: center; } .rb-can svg { color: var(--ax-green); flex: none; }
html[data-theme="dark"] .rb-matrix td.perm, html[data-theme="dark"] .rb-matrix th.perm { background: var(--surface); }
html[data-theme="dark"] .rb-matrix thead th, html[data-theme="dark"] .rb-matrix tr.grp td { background: #0A1220; }

/* =====================================================================
   Njia ya Haki: daladala route board (signature of the staff app)
   ===================================================================== */
:root { --board: #F2C200; --board-ink: #0A0A0A; --route-green: #0B6B3A; --bus-red: #C8102E; }
.route { background: var(--board); color: var(--board-ink); border-radius: 16px; padding: 1rem 1.4rem 1.2rem; margin-bottom: 1.1rem; box-shadow: 0 1px 2px rgb(16 24 40 / .08), 0 10px 24px -14px rgb(120 90 0 / .5); position: relative; overflow: hidden; }
.route-head { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem 1.5rem; flex-wrap: wrap; margin-bottom: .9rem; }
.route-title { font: 800 .82rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.route-rb { font-family: var(--mono); letter-spacing: 0; text-transform: none; font-weight: 700; }
.route-now { font: 600 .9rem var(--sans); } .route-now b { font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.route-track { position: relative; }
.route-line { position: absolute; top: 15px; left: calc(50% / var(--n)); right: calc(50% / var(--n)); height: 6px; border-radius: 6px; background: repeating-linear-gradient(90deg, rgb(10 10 10 / .32) 0 10px, transparent 10px 16px); }
.route-line i { position: absolute; inset: 0 auto 0 0; width: calc(var(--done) / (var(--n) - 1) * 100%); background: var(--route-green); border-radius: 6px; }
.route-bus { position: absolute; top: -12px; left: calc((var(--from) + .5) / var(--n) * 100%); transform: translateX(-50%); z-index: 2; filter: drop-shadow(0 2px 2px rgb(0 0 0 / .25)); }
.route-track.moving .route-bus { transition: left 520ms cubic-bezier(.23, 1, .32, 1); }
.route-stops { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); position: relative; z-index: 1; }
.stop { display: grid; justify-items: center; text-align: center; gap: .3rem; padding: 0 .25rem; min-width: 0; }
.stop > a { display: grid; justify-items: center; gap: .25rem; color: inherit; text-decoration: none; border-radius: 10px; padding: 0 .25rem .2rem; }
.stop .disc { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--board); border: 3px solid var(--board-ink); position: relative; top: 0; }
.stop.s-done .disc { background: var(--route-green); border-color: var(--route-green); width: 30px; height: 30px; margin: 3px 0; }
.stop.s-current .disc { background: var(--board-ink); border-color: var(--board-ink); box-shadow: 0 0 0 4px var(--board), 0 0 0 6px var(--board-ink); }
.stop.s-ahead .disc { width: 24px; height: 24px; margin: 6px 0; background: var(--board); }
.stop.s-skipped .disc { width: 24px; height: 24px; margin: 6px 0; border-style: dashed; border-color: rgb(10 10 10 / .45); }
.stop.late .disc { background: var(--bus-red); border-color: var(--bus-red); }
.stop .name { font: 800 .78rem/1.15 var(--sans); letter-spacing: .05em; text-transform: uppercase; overflow-wrap: anywhere; }
.stop.s-ahead .name, .stop.s-skipped .name { opacity: .6; }
.stop .meta { display: grid; gap: .1rem; font: 500 .72rem/1.3 var(--sans); color: rgb(10 10 10 / .75); }
.stop .meta .who { overflow-wrap: anywhere; }
.stop .flag { font-style: normal; font-weight: 800; color: #fff; background: var(--bus-red); border-radius: 5px; padding: .05rem .4rem; justify-self: center; white-space: nowrap; }
.route-cmd .stop .disc { width: 22px; height: 22px; margin: 7px 0; background: var(--route-green); border-color: var(--route-green); }
.route-cmd .stop.late .disc { width: 30px; height: 30px; margin: 3px 0; background: var(--bus-red); border-color: var(--bus-red); }
.route-cmd .count { font: 800 2rem/1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: .2rem; }
.route-cmd .stop > a:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .route-cmd .stop > a:hover { background: rgb(10 10 10 / .07); } }
.route-cmd .stop > a:focus-visible { outline: 2px solid var(--board-ink); outline-offset: 2px; }
/* Phones: the board turns vertical, like a route list painted down a board */
@media (max-width: 640px) {
  .route { padding: 1rem 1rem 1.1rem; }
  .route-line { top: calc(50% / var(--n)); bottom: calc(50% / var(--n)); left: 17px; right: auto; width: 6px; height: auto; background: repeating-linear-gradient(180deg, rgb(10 10 10 / .32) 0 10px, transparent 10px 16px); }
  .route-line i { inset: 0 0 auto 0; width: auto; height: calc(var(--done) / (var(--n) - 1) * 100%); }
  .route-bus { top: calc((var(--from) + .5) / var(--n) * 100%); left: 46px; transform: translateY(-50%); }
  .route-track.moving .route-bus { transition: top 520ms cubic-bezier(.23, 1, .32, 1); }
  .route-stops { grid-template-columns: 1fr; grid-auto-rows: 1fr; gap: .2rem; }
  .stop, .stop > a { grid-template-columns: 36px 1fr; justify-items: start; text-align: left; column-gap: .9rem; align-items: center; }
  .stop .disc { grid-row: span 2; justify-self: center; }
  .stop .name { align-self: end; padding-left: 42px; } .stop .meta { align-self: start; padding-left: 42px; justify-items: start; }
  .stop .flag { justify-self: start; }
  .route-cmd .count { grid-row: span 2; font-size: 1.5rem; justify-self: end; order: 3; }
  .route-cmd .stop > a { grid-template-columns: 36px 1fr auto; width: 100%; }
  .route-cmd .stop .name, .route-cmd .stop .meta { padding-left: 0; }
  .route-cmd .route-bus { display: none; }
}
/* Mini route in list rows */
.mini-route { display: inline-flex; align-items: center; gap: 0; }
.mini-route i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--line-2); background: transparent; position: relative; }
.mini-route i + i { margin-left: 8px; }
.mini-route i + i::before { content: ""; position: absolute; right: 100%; top: 50%; width: 8px; height: 2px; background: var(--line-2); margin-right: 2px; transform: translateY(-50%); }
.mini-route i.m-done { background: var(--route-green); border-color: var(--route-green); }
.mini-route i.m-done + i::before { background: var(--route-green); }
.mini-route i.m-current { width: 13px; height: 13px; background: var(--board); border-color: var(--board-ink); }
.mini-route i.m-skipped { border-style: dashed; }
.mini-route i.late { background: var(--bus-red); border-color: var(--bus-red); }
html[data-theme="dark"] .route { box-shadow: 0 1px 0 rgb(255 255 255 / .06), 0 12px 28px -16px rgb(0 0 0 / .9); }
html[data-theme="dark"] .mini-route i.m-current { border-color: #fff; }
.stage-cell { display: grid; gap: .4rem; justify-items: start; }
@media (max-width: 640px) {
  .stop .name, .stop .meta { padding-left: 0; min-width: 0; }
  .stop > *, .stop > a > * { min-width: 0; }
  .route-bus { left: auto; right: 0; }
}
/* Finish-review fixes: current stop = yellow disc in an ink ring with the bus seated above it */
.route-head { margin-bottom: 1.5rem; }
.stop.s-current .disc { background: var(--board); border: 4px solid var(--board-ink); box-shadow: 0 0 0 3px var(--board), 0 0 0 5px var(--board-ink); }
.route-bus { top: -27px; }
.stop .remand { font-weight: 700; color: var(--board-ink); overflow-wrap: anywhere; }
/* Command board: counts are not "passed", so stops are ink rings; red only when late */
.route-cmd .stop .disc { background: var(--board); border: 3px solid var(--board-ink); width: 22px; height: 22px; margin: 7px 0; }
.route-cmd .stop.late .disc { background: var(--bus-red); border-color: var(--bus-red); width: 30px; height: 30px; margin: 3px 0; }
.back { display: inline-flex; align-items: center; gap: .3rem; }
.trend { display: inline-flex; align-items: center; gap: .2rem; }
@media (max-width: 640px) {
  /* Bus rides the vertical line beside the current stop; keep the right edge clear of the floating buttons */
  .route { padding-right: 4rem; }
  .route-bus { right: auto; left: 40px; top: calc((var(--from) + .5) / var(--n) * 100%); transform: translateY(-50%); }
  .stop, .stop > a { column-gap: 3.25rem; }
  .route-head { margin-bottom: 1rem; }
}
@media (max-width: 640px) {
  /* Only the current row makes room for the bus; other names sit close to their stop */
  .stop, .stop > a { column-gap: .9rem; }
  .stop.s-current { column-gap: 3.25rem; }
}
.route-cmd .stop > a[aria-disabled="true"] { cursor: default; }

/* =====================================================================
   Public site: "Hati ya Taifa" — police service as a national security document
   Passport navy covers, security-stock ground with authored guilloche,
   serial red numbers, cover gold seal, entry-stamp inks, MRZ strips.
   ===================================================================== */
:root { --pp-navy: #13294B; --pp-navy-2: #0D1E38; --pp-mint: #EEF4EF; --pp-mint-2: #E2ECE4; --pp-rose: #C98B78; --serial: #B3261E; --gold: #B58B2A; --ink-green: #1F6B3A; --ink-blue: #1D4E9E; --ink-violet: #5B3A8E; --ink-red: #B3261E; }
body:has(.page) { background: var(--pp-mint); }
.page { max-width: 1240px; }
.pubnav { background: var(--pp-navy); }
.pubnav a[aria-current="page"] { border-bottom-color: var(--gold); }
.footer { background: var(--pp-navy-2); }
.serial { font-family: var(--mono); color: var(--serial); font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; }

/* Buttons in this world */
.btn.doc-primary { background: var(--pp-navy); border-color: var(--pp-navy); color: #fff; min-height: 50px; padding: .7rem 1.25rem; border-radius: 10px; box-shadow: 0 1px 2px rgb(13 30 56 / .2), 0 8px 18px -10px rgb(13 30 56 / .55); }
.btn.doc-secondary { background: #fff; border-color: #C9D3CC; color: var(--pp-navy); min-height: 50px; padding: .7rem 1.1rem; border-radius: 10px; }
@media (hover: hover) and (pointer: fine) { .btn.doc-primary:hover { background: var(--pp-navy-2); } .btn.doc-secondary:hover { background: var(--pp-mint); } }

/* Hero */
.doc-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding: clamp(1.5rem, 4vw, 3.5rem) 0 clamp(2rem, 5vw, 4rem); }
.doc-hero h1 { font-family: var(--display); font-weight: 650; font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.06; letter-spacing: -.02em; color: var(--pp-navy); margin: 0 0 1rem; max-width: 18ch; }
.doc-hero .lead { font-size: 1.1rem; line-height: 1.6; color: #2A3B33; max-width: 52ch; margin: 0 0 1.6rem; }
.doc-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.doc-voice { display: inline-flex; align-items: center; gap: .6rem; margin-top: 1.2rem; color: var(--pp-navy); text-decoration: none; font-size: .95rem; }
.doc-voice b { font-family: var(--mono); font-size: 1.05rem; margin-right: .3rem; }
.doc-voice svg { color: var(--ink-green); }

/* The passport spread */
.passport { display: grid; grid-template-columns: 1fr 1fr; background: var(--pp-navy); padding: 12px; border-radius: 18px; box-shadow: 0 2px 4px rgb(13 30 56 / .2), 0 30px 60px -30px rgb(13 30 56 / .7); position: relative; }
.passport::after { content: ""; position: absolute; top: 12px; bottom: 12px; left: 50%; width: 2px; background: linear-gradient(rgb(0 0 0 / .25), rgb(0 0 0 / .1)); transform: translateX(-1px); }
.pp-page { position: relative; min-height: 420px; padding: 1.1rem 1.1rem 0; display: flex; flex-direction: column; background: var(--pp-mint) url(/img/guilloche.svg) center / 480px 160px; overflow: hidden; color: #12201A; }
.pp-data { border-radius: 10px 2px 2px 10px; }
.pp-visa { border-radius: 2px 10px 10px 2px; background-color: #F3EFE4; }
.pp-head { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: center; text-align: center; padding-bottom: .5rem; border-bottom: 1px solid rgb(19 41 75 / .2); }
.pp-head small { display: block; font: 600 .56rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #3B4D44; }
.pp-head b { font: 700 .82rem/1.2 var(--display); color: var(--pp-navy); letter-spacing: .04em; text-transform: uppercase; }
.pp-title { font: 800 .6rem/1.3 var(--sans); letter-spacing: .14em; color: var(--pp-navy); margin: .7rem 0 .5rem; }
.pp-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem .9rem; margin: 0; position: relative; z-index: 1; }
.pp-fields.wide { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 1rem 0; }
.pp-fields dt { font: 600 .58rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #4A5B52; }
.pp-fields dd { margin: .15rem 0 0; font: 600 .92rem/1.25 var(--sans); color: #0E1A15; overflow-wrap: anywhere; }
.pp-status { color: var(--ink-green) !important; font-weight: 800 !important; letter-spacing: .04em; }
.pp-seal { position: absolute; right: -40px; bottom: 34px; width: 210px; height: 210px; background: url(/img/rosette.svg) center / contain no-repeat; opacity: .8; pointer-events: none; }
.pp-seal::after { content: ""; position: absolute; inset: 70px; background: url(/img/police-logo.png) center / contain no-repeat; opacity: .16; filter: grayscale(1) sepia(1) hue-rotate(5deg) saturate(3); }
.pp-specimen { position: absolute; top: 46%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg); font: 800 2.6rem/1 var(--sans); letter-spacing: .2em; color: rgb(179 38 30 / .12); pointer-events: none; }
.mrz { margin: auto -1.1rem 0; padding: .55rem 1.1rem .65rem; background: rgb(255 255 255 / .55); border-top: 1px solid rgb(19 41 75 / .15); display: grid; gap: .1rem; font: 600 clamp(.52rem, 1.05vw, .72rem)/1.25 var(--mono); letter-spacing: .12em; color: #0E1A15; overflow: hidden; white-space: nowrap; }
.pp-visa-head { display: flex; justify-content: space-between; align-items: center; font: 800 .6rem/1 var(--sans); letter-spacing: .16em; color: #5A4B2F; padding-bottom: .55rem; border-bottom: 1px solid rgb(90 75 47 / .25); }
.pp-stamps { flex: 1; display: grid; grid-template-rows: repeat(3, 1fr); align-items: center; justify-items: center; padding: .6rem 0; }
.stamp-slot:nth-child(1) { justify-self: start; margin-left: .4rem; } .stamp-slot:nth-child(2) { justify-self: end; margin-right: .3rem; } .stamp-slot:nth-child(3) { justify-self: center; }
.pp-note { display: flex; gap: .4rem; align-items: center; font-size: .72rem; color: #5A4B2F; margin: 0 0 .9rem; }

/* Entry stamps (ink on paper) */
.stamp { --c: var(--ink-green); display: inline-grid; justify-items: center; gap: .1rem; padding: .45rem .8rem .5rem; border: 2.5px solid var(--c); border-radius: 6px; color: var(--c); transform: rotate(var(--rot)); background: transparent; mix-blend-mode: multiply; text-align: center; box-shadow: inset 0 0 0 2px transparent, inset 0 0 0 3.5px var(--c); }
.stamp b { font: 800 .82rem/1 var(--sans); letter-spacing: .12em; }
.stamp small { font: 700 .62rem/1.1 var(--mono); letter-spacing: .06em; }
.stamp.round { border-radius: 50%; width: 96px; height: 96px; place-content: center; padding: .4rem; }
.stamp.blue { --c: var(--ink-blue); } .stamp.violet { --c: var(--ink-violet); } .stamp.red { --c: var(--ink-red); } .stamp.green { --c: var(--ink-green); }
/* Signature: stamps press onto the facing page once per visit */
.passport .stamp-slot { opacity: 0; }
.passport.stamped .stamp-slot { opacity: 1; }
.passport.stamping .stamp-slot { animation: press 420ms cubic-bezier(.23, 1, .32, 1) both; animation-delay: calc(500ms + var(--i) * 380ms); }
@keyframes press { 0% { opacity: 0; transform: scale(1.35); filter: blur(2px); } 60% { opacity: 1; transform: scale(.97); filter: blur(0); } 100% { opacity: 1; transform: scale(1); } }

/* Services as an official index, not tiles */
.doc-services { padding: clamp(1.5rem, 4vw, 3rem) 0; }
.doc-services h2, .doc-close h2 { font-family: var(--display); font-weight: 650; font-size: clamp(1.5rem, 2.6vw, 2.1rem); color: var(--pp-navy); margin: 0 0 1.2rem; letter-spacing: -.015em; }
.svc-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--pp-navy); }
.svc-list li { border-bottom: 1px solid #C9D3CC; }
.svc-list a { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 28px; gap: 1.1rem; align-items: center; padding: 1.15rem .4rem; text-decoration: none; color: inherit; transition: background-color 160ms ease; }
.svc-list a:active { background: var(--pp-mint-2); }
@media (hover: hover) and (pointer: fine) { .svc-list a:hover { background: rgb(255 255 255 / .6); } .svc-list a:hover .svc-go { transform: translateX(3px); } }
.svc-ic { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: var(--pp-navy); color: #fff; }
.svc-body b { display: block; font: 700 1.12rem/1.25 var(--display); color: var(--pp-navy); }
.svc-body span { display: block; color: #33453C; font-size: .95rem; margin-top: .2rem; max-width: 62ch; }
.svc-chans { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.svc-chans em { font-style: normal; font: 700 .7rem/1 var(--mono); letter-spacing: .04em; color: var(--pp-navy); border: 1px solid #B9C6BE; border-radius: 6px; padding: .3rem .45rem; background: #fff; white-space: nowrap; }
.svc-go { color: var(--pp-navy); transition: transform 180ms cubic-bezier(.23, 1, .32, 1); }

/* Authority band on passport navy */
.doc-authority { margin: clamp(1.5rem, 4vw, 3rem) calc(50% - 50vw); background: var(--pp-navy) url(/img/guilloche.svg) center / 480px 160px; background-blend-mode: soft-light; color: #E9EEF5; }
.doc-authority-in { max-width: 1240px; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) 1rem; }
.doc-authority h2 { font-family: var(--display); font-weight: 650; font-size: clamp(1.7rem, 3.2vw, 2.6rem); color: #fff; margin: 0 0 .8rem; letter-spacing: -.015em; }
.doc-authority .lead { color: #C4CFDD; max-width: 70ch; font-size: 1.05rem; line-height: 1.6; margin: 0 0 2rem; }
.sec-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 0; border-top: 1px solid rgb(255 255 255 / .18); }
.sec-features li { padding: 1.3rem 1.2rem 1.3rem 0; border-bottom: 1px solid rgb(255 255 255 / .12); display: grid; gap: .45rem; align-content: start; }
.sf-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--gold); color: #E8C46A; }
.sec-features b { font: 700 1.05rem/1.25 var(--display); color: #fff; }
.sec-features span { color: #C4CFDD; font-size: .92rem; line-height: 1.5; }
.demo-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1rem 2rem; margin-top: 2.2rem; padding-top: 1.6rem; border-top: 1px solid rgb(255 255 255 / .18); }
.demo-figures b { display: block; font: 800 clamp(2rem, 3.4vw, 2.8rem)/1 var(--sans); letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums; }
.demo-figures span { display: block; color: #C4CFDD; font-size: .9rem; margin-top: .35rem; }
.demo-note { grid-column: 1 / -1; margin: .4rem 0 0; font-size: .78rem; color: #9FB0C6; }

/* Close */
.doc-close { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem; align-items: center; padding: clamp(1.5rem, 4vw, 3rem) 0 1rem; }
.doc-close p { color: #33453C; margin: 0; max-width: 60ch; }

/* Service pages and result documents */
.svc-page { max-width: 820px; margin: 0 auto; padding: clamp(1rem, 3vw, 2rem) 0; display: grid; gap: 1.1rem; }
.svc-head h1 { font-family: var(--display); font-weight: 650; font-size: clamp(1.7rem, 3vw, 2.3rem); color: var(--pp-navy); margin: 0 0 .35rem; letter-spacing: -.015em; }
.svc-head p { color: #33453C; margin: 0; max-width: 62ch; }
.form-doc { background: #fff; border: 1px solid #C9D3CC; border-radius: 12px; padding: 1.3rem; box-shadow: 0 1px 2px rgb(13 30 56 / .06); }
.form-doc .field > span { color: var(--pp-navy); text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; }
.svc-alt { display: flex; gap: .5rem; align-items: center; color: #33453C; font-size: .92rem; margin: 0; }
.doc-sheet { position: relative; background: var(--pp-mint) url(/img/guilloche.svg) center / 480px 160px; border: 1px solid #B9C6BE; border-radius: 12px; padding: 1.2rem 1.3rem 0; overflow: hidden; display: flex; flex-direction: column; gap: .2rem; box-shadow: 0 1px 2px rgb(13 30 56 / .08), 0 16px 32px -24px rgb(13 30 56 / .45); }
.doc-sheet > .mrz { margin: 1rem -1.3rem 0; }
.doc-sheet-head { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding-bottom: .7rem; border-bottom: 1px solid rgb(19 41 75 / .2); }
.doc-sheet-head small { display: block; font: 600 .62rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #3B4D44; }
.doc-sheet-head b { font: 700 1.1rem/1.2 var(--display); color: var(--pp-navy); }
.verdict { display: flex; gap: 1.2rem; align-items: center; margin: 1rem 0 .4rem; flex-wrap: wrap; }
.verdict b { display: block; font: 700 1.15rem/1.25 var(--display); color: var(--pp-navy); } .verdict span { color: #33453C; font-size: .92rem; }
.verdict.bad b { color: var(--ink-red); }
.stamp-trail { display: grid; gap: .3rem; margin: .4rem 0 .6rem; }
.trail-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 1rem; align-items: center; padding: .55rem 0; border-top: 1px dashed rgb(19 41 75 / .2); }
.trail-row .stamp { justify-self: start; max-width: 170px; }
.trail-row .stamp b { white-space: normal; }
.trail-row p { margin: 0; color: #1C2B24; }
.doc-foot { font-size: .88rem; color: #33453C; margin: .2rem 0 0; }
@media (max-width: 860px) {
  .doc-hero { grid-template-columns: 1fr; }
  .passport { max-width: 560px; }
  .doc-close { grid-template-columns: 1fr; }
  .svc-list a { grid-template-columns: 44px minmax(0, 1fr) 22px; } .svc-chans { grid-column: 2; justify-content: flex-start; } .svc-ic { width: 44px; height: 44px; }
}
@media (max-width: 560px) {
  .passport { grid-template-columns: 1fr; padding: 10px; } .passport::after { display: none; }
  .pp-data { border-radius: 10px 10px 2px 2px; } .pp-visa { border-radius: 2px 2px 10px 10px; min-height: 0; }
  .pp-stamps { grid-template-rows: none; grid-template-columns: repeat(3, auto); gap: .5rem; padding: 1rem 0; } .stamp-slot:nth-child(n) { justify-self: center; margin: 0; }
  .stamp.round { width: 80px; height: 80px; } .pp-page { min-height: 0; padding-bottom: 0; }
  .pp-fields { gap: .5rem .7rem; } .trail-row { grid-template-columns: 1fr; gap: .4rem; }
}
/* Dark theme keeps the documents as paper; only the surrounding ground darkens */
html[data-theme="dark"] body:has(.page) { background: #0A1324; }
html[data-theme="dark"] .doc-hero h1, html[data-theme="dark"] .doc-services h2, html[data-theme="dark"] .doc-close h2, html[data-theme="dark"] .svc-head h1, html[data-theme="dark"] .svc-body b { color: #E9EEF5; }
html[data-theme="dark"] .doc-hero .lead, html[data-theme="dark"] .svc-body span, html[data-theme="dark"] .doc-close p, html[data-theme="dark"] .svc-head p, html[data-theme="dark"] .svc-alt { color: #B9C4D4; }
html[data-theme="dark"] .doc-voice, html[data-theme="dark"] .svc-go { color: #E9EEF5; }
html[data-theme="dark"] .svc-list { border-top-color: #E9EEF5; } html[data-theme="dark"] .svc-list li { border-color: rgb(255 255 255 / .12); }
html[data-theme="dark"] .svc-chans em { background: transparent; color: #E9EEF5; border-color: rgb(255 255 255 / .25); }
html[data-theme="dark"] .svc-ic { background: #fff; color: var(--pp-navy); }
html[data-theme="dark"] .btn.doc-primary { background: #fff; color: var(--pp-navy); border-color: #fff; }
html[data-theme="dark"] .btn.doc-secondary { background: transparent; color: #E9EEF5; border-color: rgb(255 255 255 / .3); }
html[data-theme="dark"] .form-doc { background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] .form-doc .field > span { color: #C4CFDD; }
html[data-theme="dark"] .doc-sheet, html[data-theme="dark"] .pp-page { color: #12201A; }
html[data-theme="dark"] .doc-sheet .btn.doc-secondary { background: #fff; color: var(--pp-navy); border-color: #C9D3CC; }
@media (prefers-reduced-motion: reduce) { .passport .stamp-slot { opacity: 1; animation: none !important; } }
/* Refinement after first look: a larger, more legible passport */
.doc-hero { grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); }
.pp-page { min-height: 470px; padding: 1.3rem 1.3rem 0; }
.pp-head img { width: 42px; height: 42px; }
.pp-head small { font-size: .62rem; } .pp-head b { font-size: .95rem; }
.pp-title { font-size: .66rem; margin: .9rem 0 .7rem; }
.pp-fields { gap: .75rem 1rem; } .pp-fields dt { font-size: .62rem; } .pp-fields dd { font-size: 1rem; }
.pp-fields dd.serial { font-size: .92rem; white-space: nowrap; letter-spacing: .02em; }
.pp-seal { width: 170px; height: 170px; right: 14px; bottom: 64px; opacity: .55; }
.pp-seal::after { inset: 52px; }
.pp-specimen { font-size: 2.2rem; color: rgb(179 38 30 / .1); }
.mrz { margin: auto -1.3rem 0; padding: .6rem 1.3rem .7rem; }
.stamp b { font-size: .9rem; } .stamp small { font-size: .66rem; }
.stamp.round { width: 104px; height: 104px; }
@media (max-width: 1100px) { .doc-hero { grid-template-columns: 1fr; } .passport { max-width: 680px; } }
@media (max-width: 760px) {
  .doc-hero h1 { font-size: 1.9rem; }
}
@media (max-width: 560px) {
  .pp-page { min-height: 0; }
  .pp-data { min-height: 380px; }
  .pp-stamps { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem .8rem; padding: 1rem 0 .4rem; }
  .stamp { padding: .35rem .6rem .4rem; } .stamp b { font-size: .78rem; } .stamp.round { width: 84px; height: 84px; }
}
/* MRZ always fits its page: 44 characters sized to the page width */
.pp-page, .doc-sheet { container-type: inline-size; }
.mrz { font-size: min(.78rem, calc((100cqw - 2.6rem) / 30)); letter-spacing: .06em; }

/* ---- Public finish-review fixes ---- */
/* Visa page on mint-family stock; hero actions stay one set */
.pp-visa { background-color: #E4EFE7; }
.pp-visa-head, .pp-note { color: #2F4A3B; } .pp-visa-head { border-bottom-color: rgb(47 74 59 / .25); }
@media (min-width: 1101px) { .doc-hero { grid-template-columns: minmax(0, .95fr) minmax(0, 1.2fr); } .doc-hero .doc-actions { flex-wrap: nowrap; } .doc-hero .doc-actions .btn { padding: .7rem .9rem; font-size: .93rem; } }
/* Gold belongs to the seal: issuing seal on the data page */
.pp-seal { background-image: url(/img/seal.svg); opacity: .95; width: 150px; height: 150px; right: 16px; bottom: 70px; }
.pp-seal::after { inset: 44px; opacity: .3; filter: sepia(1) saturate(2.2) hue-rotate(-12deg) brightness(.9); }
.pubnav a[aria-current="page"] { border-bottom-color: #fff; }
/* Inked rubber stamps */
.stamp { box-shadow: none; border-width: 3px; outline: 1.5px solid var(--c); outline-offset: 2px; mix-blend-mode: multiply; }
.ink-1 { filter: url(#ink-1); } .ink-2 { filter: url(#ink-2); } .ink-3 { filter: url(#ink-3); }
.stamp-round { --c: var(--ink-green); display: inline-block; width: 108px; height: 108px; color: var(--c); transform: rotate(var(--rot)); mix-blend-mode: multiply; }
.stamp-round svg { width: 100%; height: 100%; display: block; }
.stamp-round.blue { --c: var(--ink-blue); } .stamp-round.violet { --c: var(--ink-violet); } .stamp-round.red { --c: var(--ink-red); }
.stamp-pending { display: inline-grid; gap: .15rem; justify-items: center; padding: .45rem .8rem; border: 2px dashed rgb(19 41 75 / .35); border-radius: 6px; color: rgb(19 41 75 / .6); font: 800 .8rem/1 var(--sans); letter-spacing: .12em; justify-self: start; }
.stamp-pending small { font: 600 .62rem var(--sans); letter-spacing: .04em; text-transform: none; }
/* Channel chips: words in Public Sans, codes in mono */
.svc-chans em { font: 600 .74rem/1 var(--sans); letter-spacing: .01em; }
.svc-chans em.code { font-family: var(--mono); letter-spacing: .03em; }
/* Document masthead (no eyebrow): issuer line centred between the arms, then the title alone */
.doc-mast { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; text-align: center; padding-bottom: .65rem; border-bottom: 2px solid var(--pp-navy); font: 700 .74rem/1.35 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--pp-navy); }
.doc-title { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; padding: .8rem 0 .2rem; }
.doc-title h2 { margin: 0; font: 700 1.35rem/1.2 var(--display); color: var(--pp-navy); }
/* Security-features leaf: a magnified specimen with lettered callouts */
.leaf { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; margin-bottom: 2.5rem; }
.leaf-specimen { margin: 0; }
.leaf-paper { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; background: var(--pp-mint) url(/img/guilloche.svg) center / 360px 120px; overflow: hidden; box-shadow: 0 2px 4px rgb(0 0 0 / .25), 0 24px 48px -24px rgb(0 0 0 / .6); container-type: inline-size; display: flex; flex-direction: column; }
.leaf-paper .mrz { margin: auto 0 0; padding: .6rem 1rem .7rem; }
.leaf-serial { position: absolute; top: 9%; left: 7%; font-size: clamp(1rem, 4.2cqw, 1.6rem); }
.leaf-seal { position: absolute; top: 18%; right: 8%; width: 34%; aspect-ratio: 1; background: url(/img/seal.svg) center / contain no-repeat; }
.leaf-seal::after { content: ""; position: absolute; inset: 28%; background: url(/img/police-logo.png) center / contain no-repeat; opacity: .32; filter: sepia(1) saturate(2.2) hue-rotate(-12deg) brightness(.9); }
.leaf-stamp { position: absolute; left: 8%; top: 32%; } .leaf-stamp .stamp-round { width: clamp(84px, 24cqw, 130px); height: auto; aspect-ratio: 1; }
.leaf-qr { position: absolute; right: 9%; bottom: 30%; width: 18%; aspect-ratio: 1; background: #fff; padding: 4px; border-radius: 4px; }
.leaf-qr svg { width: 100%; height: 100%; display: block; }
.pin { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: #1A1300; font: 800 .8rem/1 var(--sans); font-style: normal; box-shadow: 0 0 0 3px rgb(19 41 75 / .9); }
.leaf-paper .pin { position: absolute; z-index: 2; }
.leaf-paper .p1 { top: 4%; left: 3%; } .leaf-paper .p2 { top: 14%; right: 4%; } .leaf-paper .p3 { top: 28%; left: 3%; } .leaf-paper .p4 { bottom: 26%; right: 4%; }
.leaf-callouts { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.2rem; }
.leaf-callouts li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: .9rem; align-items: start; }
.leaf-callouts b { display: block; font: 700 1.08rem/1.25 var(--display); color: #fff; } .leaf-callouts span { color: #C4CFDD; font-size: .93rem; line-height: 1.5; }
/* Statistics return issued as a document */
.doc-sheet.register { color: #12201A; max-width: 760px; }
.register-table { width: 100%; border-collapse: collapse; margin: .8rem 0; font-size: 1rem; }
.register-table th { text-align: left; font: 500 .98rem/1.35 var(--sans); color: #1C2B24; background: none; text-transform: none; letter-spacing: 0; padding: .7rem 0; border-bottom: 1px dashed rgb(19 41 75 / .25); }
.register-table td { text-align: right; padding: .7rem 0; border-bottom: 1px dashed rgb(19 41 75 / .25); font-size: clamp(1.3rem, 2.4vw, 1.8rem); white-space: nowrap; }
.register-foot { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; } .register-foot p { margin: 0; font-size: .82rem; color: #33453C; }
@media (max-width: 860px) { .leaf { grid-template-columns: 1fr; } }
/* Phones: the document reaches the first screen */
@media (max-width: 560px) {
  .topbar .inner { padding: .2rem .8rem; }
  .brand .inner { padding: .4rem .7rem; } .brand img { height: 44px; width: 44px; }
  .brand .t1, .brand .t2 { font-size: .52rem; letter-spacing: .04em; } .brand .t3 { font-size: 1rem; margin-top: .1rem; }
  .concept { font-size: .68rem; padding: .25rem .8rem; line-height: 1.3; }
  .doc-hero { display: flex; flex-direction: column; gap: 1rem; padding-top: 1rem; }
  .doc-hero-copy { display: contents; }
  .doc-hero h1 { order: 1; font-size: 1.6rem; margin: 0; }
  .doc-hero .passport { order: 2; }
  .doc-hero .lead { order: 3; margin: 0; font-size: 1rem; }
  .doc-hero .doc-actions { order: 4; } .doc-hero .doc-voice { order: 5; margin-top: 0; }
  .doc-hero .doc-actions .btn { flex: 1 1 auto; }
  .fabs.defer { transition: opacity 200ms ease, transform 200ms cubic-bezier(.23, 1, .32, 1); }
  .fabs.defer:not(.show) { opacity: 0; pointer-events: none; transform: translateY(12px); }
}
@media (min-width: 1101px) { .doc-hero { grid-template-columns: minmax(0, .82fr) minmax(0, 1.3fr); } }
.pp-fields dd { font-size: .95rem; } .pp-status { white-space: nowrap; }
.pp-seal { width: 118px; height: 118px; right: 12px; bottom: 58px; }
.pp-seal::after { inset: 34px; }
@media (max-width: 560px) { .doc-hero { align-items: stretch; } .doc-hero .passport { width: 100%; max-width: none; } .doc-hero h1 { max-width: none; } }
/* Register paired with its explanation (no empty half on desktop) */
.register-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.register-row .doc-sheet.register { max-width: none; }
.register-copy h3 { font: 700 clamp(1.3rem, 2.2vw, 1.7rem)/1.2 var(--display); color: #fff; margin: 0 0 .7rem; }
.register-copy p { color: #C4CFDD; line-height: 1.6; margin: 0 0 1.2rem; max-width: 52ch; }
.btn.doc-ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / .35); min-height: 46px; }
@media (hover: hover) and (pointer: fine) { .btn.doc-ghost:hover { background: rgb(255 255 255 / .08); } }
@media (max-width: 860px) { .register-row { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  /* Citizens on phones: actions and the voice line first, the specimen peeks below */
  .doc-hero .doc-actions { order: 2; } .doc-hero .doc-voice { order: 3; } .doc-hero .passport { order: 4; } .doc-hero .lead { order: 5; }
  .doc-hero .doc-actions .doc-primary { flex: 1 1 100%; }
  .doc-hero .doc-actions .doc-secondary { flex: 1 1 0; min-height: 44px; padding: .55rem .6rem; font-size: .9rem; }
  /* Floating buttons are removed (not faded) until the visitor scrolls past the first screen */
  .fabs.defer:not(.show) { display: none; }
}

/* ---- Older public screens in the national-document style ---- */
.svc-page.wide { max-width: 1100px; }
.ivr-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(1.2rem, 3vw, 2.5rem); align-items: start; }
@media (max-width: 860px) { .ivr-grid { grid-template-columns: 1fr; } }
.ivr-steps { list-style: none; counter-reset: s; margin: .8rem 0 1rem; padding: 0; display: grid; gap: .1rem; }
.ivr-steps li { counter-increment: s; display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: .8rem; padding: .7rem 0; border-top: 1px dashed rgb(19 41 75 / .22); }
.ivr-steps li::before { content: counter(s); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--pp-navy); color: var(--pp-navy); display: grid; place-items: center; font: 800 .85rem var(--sans); }
.ivr-steps b { font: 700 1rem/1.3 var(--display); color: var(--pp-navy); } .ivr-steps span { color: #33453C; font-size: .9rem; }
.ivr-phone { background: var(--pp-navy); border-radius: 38px; padding: 12px; box-shadow: 0 2px 4px rgb(13 30 56 / .25), 0 30px 60px -30px rgb(13 30 56 / .7); max-width: 360px; justify-self: center; width: 100%; }
.ivr-screen { border-radius: 28px; background: var(--pp-mint) url(/img/guilloche.svg) center / 480px 160px; display: flex; flex-direction: column; min-height: 560px; overflow: hidden; }
.ivr-status { display: flex; justify-content: space-between; padding: .7rem 1.2rem .3rem; font: 700 .72rem var(--sans); color: var(--pp-navy); letter-spacing: .04em; }
.ivr-display { text-align: center; padding: 1rem 1rem .5rem; }
.ivr-number { font-size: 1.6rem; display: block; }
.ivr-state { font-size: .82rem; color: #33453C; min-height: 1.4em; margin-top: .3rem; }
.ivr-said { margin: .8rem auto 0; max-width: 28ch; font: 600 .9rem/1.45 var(--sans); color: var(--pp-navy); min-height: 4.4em; }
.ivr-digits { font: 700 1.2rem var(--mono); color: var(--serial); min-height: 1.5em; letter-spacing: .1em; }
.ivr-keys { margin-top: auto; padding: 0 1rem 1.2rem; }
.ivr-screen .keypad button { background: #fff; color: var(--pp-navy); box-shadow: 0 1px 0 rgb(19 41 75 / .15), 0 2px 6px -2px rgb(19 41 75 / .25); }
.ivr-screen .keypad button:active { background: var(--pp-mint-2); }
.ivr-call { display: flex; justify-content: center; gap: .8rem; margin-top: 1rem; }
.btn.ivr-btn { border-radius: 999px; min-width: 120px; min-height: 48px; color: #fff; border: 0; }
.btn.ivr-btn.call { background: var(--ink-green); } .btn.ivr-btn.hang { background: var(--serial); }
@media (hover: hover) and (pointer: fine) { .btn.ivr-btn.call:hover { background: #185730; } .btn.ivr-btn.hang:hover { background: #941f18; } }
/* GePG bill */
.gepg-bill { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; padding: 1rem 1.1rem; margin: .4rem 0 .2rem; border: 1.5px dashed rgb(19 41 75 / .4); border-radius: 10px; background: rgb(255 255 255 / .6); }
.gepg-label { display: block; font: 700 .64rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #4A5B52; margin-bottom: .3rem; }
.gepg-cn { font-size: clamp(1.25rem, 3vw, 1.7rem); letter-spacing: .08em; }
.gepg-amt { font: 800 clamp(1.25rem, 3vw, 1.7rem)/1 var(--sans); color: var(--pp-navy); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .gepg-bill { grid-template-columns: 1fr; } }
/* PF3 */
.pf3-narr { margin: .2rem 0 .6rem; color: #1C2B24; line-height: 1.55; }
.doc-note { display: flex; gap: .5rem; align-items: flex-start; padding: .7rem .9rem; border: 1px solid #B9C6BE; border-radius: 10px; background: rgb(255 255 255 / .6); color: #1C2B24; font-size: .92rem; margin: .4rem 0 .8rem; }
.doc-note svg { color: var(--ink-green); flex: none; margin-top: 2px; }
.pf3-sheet form .field > span { color: var(--pp-navy); text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; }
/* Printable document */
.doc-print-bar { display: flex; justify-content: center; gap: .6rem; padding: 1.2rem; flex-wrap: wrap; }
.doc-printable { max-width: 820px; margin: 0 auto 2rem; padding: 2rem 2.2rem 0; }
.doc-printable .doc-mast { font-size: .82rem; } .doc-printable .doc-mast img { width: 64px; height: 64px; }
.doc-printable .doc-title h2 { font-size: 1.6rem; }
.doc-printable > .mrz { margin: 1.2rem -2.2rem 0; padding: .7rem 2.2rem .8rem; }
.doc-print-seal { display: flex; align-items: center; gap: 1rem; margin: .6rem 0; }
.print-seal { width: 110px; height: 110px; background: url(/img/seal.svg) center / contain no-repeat; position: relative; }
.print-seal::after { content: ""; position: absolute; inset: 32px; background: url(/img/police-logo.png) center / contain no-repeat; opacity: .35; filter: sepia(1) saturate(2.2) hue-rotate(-12deg) brightness(.9); }
.doc-printable .qr { border-top: 1px dashed rgb(19 41 75 / .3); }
.doc-printable .wm { z-index: 0; }
@media print {
  .doc-printable { box-shadow: none; border: 0; max-width: none; background: #fff url(/img/guilloche.svg) center / 480px 160px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc-printable .mrz { background: #fff; }
}
.doc-printable { position: relative; overflow: hidden; }
.doc-printable > * { position: relative; z-index: 1; }
.doc-printable .wm { position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; pointer-events: none; font: 900 clamp(2.6rem, 8vw, 4.6rem)/1 var(--sans); color: rgb(179 38 30 / .07); transform: rotate(-24deg); text-align: center; letter-spacing: .04em; }
.doc-printable .qr { display: flex; gap: 1.1rem; align-items: center; margin-top: 1rem; padding: 1rem 0 1.2rem; }
.doc-printable .qr svg, .doc-printable .qr img { width: 120px; height: 120px; flex: none; background: #fff; padding: 6px; border: 1px solid #C9D5CD; border-radius: 6px; }
.doc-printable .qr b { font: 700 1rem var(--display); color: var(--pp-navy); }
.doc-printable .break { word-break: break-all; }
@media (max-width: 520px) { .doc-printable { padding: 1.3rem 1.1rem 0; } .doc-printable > .mrz { margin: 1rem -1.1rem 0; padding-inline: 1.1rem; } .doc-printable .qr svg { width: 96px; height: 96px; } }

/* ======================================================================
   Role desks (staff app). Same AXURE + Njia ya Haki world: a navy duty
   board with the shift painted as a route, a service ledger, worklists.
   ====================================================================== */
.dk-head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id time" "shift shift"; gap: 1.1rem 2rem; align-items: end;
  margin: 0 0 1rem; padding: 1.6rem 1.8rem 0; border-radius: 18px; overflow: hidden; color: #fff;
  background: radial-gradient(520px 240px at 100% 0%, rgb(43 138 203 / .22), transparent 70%), linear-gradient(180deg, var(--t-navy, #0D1B2A) 0%, var(--t-navy-2, #0A1622) 100%);
  box-shadow: 0 1px 2px rgb(16 24 40 / .1), 0 18px 36px -24px rgb(10 22 34 / .8); }
.dk-head.dk-skel { min-height: 170px; display: block; padding-bottom: 1.6rem; }
.dk-id { grid-area: id; min-width: 0; }
.dk-plate { display: inline-block; background: var(--board); color: var(--board-ink); font: 800 .7rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: .42rem .6rem .38rem; border-radius: 4px; box-shadow: inset 0 -2px 0 rgb(0 0 0 / .18); }
.dk-head h1 { font: 650 clamp(1.5rem, 2.6vw, 2.1rem)/1.15 var(--display); letter-spacing: -.015em; margin: .7rem 0 .35rem; color: #fff; text-wrap: balance; }
.dk-head p { margin: 0; color: #B7C3D3; font-size: .93rem; }
.dk-mono { font-family: var(--mono); font-size: .88em; color: #fff; }
.dk-time { grid-area: time; text-align: right; display: grid; justify-items: end; gap: .2rem; }
.dk-clock { font: 600 clamp(2.2rem, 4vw, 3rem)/1 var(--display); font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.02em; }
.dk-clock::after { content: " EAT"; font: 700 .7rem var(--sans); letter-spacing: .1em; color: #8FA3BA; vertical-align: .9em; margin-left: .25rem; }
.dk-time .dk-date { color: #B7C3D3; font-size: .88rem; }
/* the shift as a route: yellow board, green progress, bus at "now" */
.dk-shift { grid-area: shift; margin: .4rem -1.8rem 0; padding: .75rem 1.8rem .55rem; background: var(--board); color: var(--board-ink); }
.dk-shift-name { display: block; font-size: .8rem; font-weight: 600; margin-bottom: .55rem; }
.dk-shift-name b { font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-right: .3rem; }
.dk-shift-track { position: relative; display: block; height: 34px; }
.dk-shift-line { position: absolute; left: 0; right: 0; top: 8px; height: 6px; border-radius: 6px; background: rgb(10 10 10 / .18); }
.dk-shift-line i { position: absolute; inset: 0 auto 0 0; width: calc(var(--f) * 100%); background: var(--route-green); border-radius: 6px; }
.dk-shift-bus { position: absolute; top: -8px; left: calc(var(--f) * 100%); transform: translateX(-50%); z-index: 2; filter: drop-shadow(0 2px 2px rgb(0 0 0 / .25)); }
.dk-shift ol { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; }
.dk-shift li { position: relative; font: 700 .68rem/1 var(--mono); padding-top: 20px; width: 0; display: flex; justify-content: center; white-space: nowrap; }
.dk-shift li span { position: absolute; top: 5px; left: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--board); border: 3px solid var(--board-ink); }
.dk-shift li:first-child { justify-content: flex-start; } .dk-shift li:first-child span { left: 0; }
.dk-shift li:last-child { justify-content: flex-end; } .dk-shift li:last-child span { left: auto; right: 0; }
/* alert ribbon */
.dk-alert { display: flex; align-items: center; gap: .7rem; padding: .85rem 1.1rem; margin: 0 0 1rem; border-radius: 12px; background: var(--red-50); color: #8E1022; border: 1px solid rgb(200 16 46 / .25); font-weight: 600; text-decoration: none; }
.dk-alert span { flex: 1; }
/* service ledger */
.dk-ledger { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 1.2rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; }
.dk-cell { padding: 1.05rem 1.25rem 1.1rem; display: grid; gap: .3rem; align-content: start; position: relative; }
.dk-cell + .dk-cell { border-left: 1px solid var(--line); }
.dk-cell::before { content: ""; position: absolute; left: 1.25rem; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--route-green); }
.dk-cell.warn::before { background: #C98A0B; } .dk-cell.bad::before { background: var(--bus-red); } .dk-cell.ok::before { background: var(--ax-blue); }
.dk-n { font: 650 clamp(1.7rem, 2.6vw, 2.2rem)/1 var(--display); font-variant-numeric: tabular-nums lining-nums; color: var(--t-navy, #0D1B2A); letter-spacing: -.02em; }
.dk-cell.bad .dk-n:not([data-to="0"]) { color: var(--bus-red); }
.dk-l { font-size: .82rem; color: #3A475C; line-height: 1.3; }
@media (max-width: 860px) { .dk-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dk-cell:nth-child(3) { border-left: 0; } .dk-cell:nth-child(n+3) { border-top: 1px solid var(--line); } }
/* body grid */
.dk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.2rem; align-items: start; }
.dk-queues { display: grid; gap: 1.2rem; min-width: 0; }
.dk-aside { display: grid; gap: 1.2rem; position: sticky; top: 1rem; }
@media (max-width: 1100px) { .dk-grid { grid-template-columns: 1fr; } .dk-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
.dk-count { min-width: 26px; height: 26px; padding: 0 .5rem; border-radius: 999px; background: var(--t-navy, #0D1B2A); color: #fff; display: inline-grid; place-items: center; font: 700 .78rem var(--sans); font-variant-numeric: tabular-nums; }
.dk-list { list-style: none; margin: 0; padding: 0; }
.dk-list li + li { border-top: 1px solid var(--line); }
.dk-row { display: flex; align-items: center; gap: 1rem; padding: .85rem 1.25rem; color: inherit; text-decoration: none; min-height: 60px; }
a.dk-row { transition: background-color 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { a.dk-row:hover { background: #F5F8FB; } a.dk-row:hover .dk-go { transform: translateX(2px); color: var(--t-navy, #0D1B2A); } }
a.dk-row:active { background: #EEF3F8; }
.dk-go { flex: none; color: #9AA6B6; transition: transform 160ms var(--ease-out), color 160ms; }
.dk-main { flex: 1; min-width: 0; display: grid; gap: .18rem; }
.dk-main b { font-weight: 650; font-size: .95rem; color: var(--t-navy, #0D1B2A); overflow-wrap: anywhere; }
.dk-ref { font: 600 .72rem var(--mono); color: #5B6779; letter-spacing: .02em; }
.dk-sub { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; color: #4A566A; font-size: .82rem; }
.dk-side { flex: none; display: flex; align-items: center; justify-content: flex-end; text-align: right; color: #4A566A; font-size: .8rem; }
.dk-masked { display: inline-flex; align-items: center; gap: .2rem; color: #7A2E8E; font-weight: 600; }
.dk-warn-t { color: #A0390B; font-weight: 600; }
.dk-tag { display: inline-flex; align-items: center; padding: .15rem .5rem; border-radius: 999px; font: 700 .68rem/1.4 var(--sans); letter-spacing: .02em; background: #EEF2F7; color: #334155; white-space: nowrap; vertical-align: .1em; }
.dk-tag.warn { background: #FFF4DB; color: #8A5A00; } .dk-tag.bad { background: var(--red-50); color: #A10E26; } .dk-tag.ok { background: #E8F4EC; color: var(--route-green); }
.dk-due { font-style: normal; font-weight: 650; color: #334155; white-space: nowrap; } .dk-due.warn { color: #8A5A00; } .dk-due.bad { color: var(--bus-red); }
.dk-num { display: grid; justify-items: end; font: 650 1.35rem/1 var(--display); font-variant-numeric: tabular-nums; color: var(--t-navy, #0D1B2A); }
.dk-num small { font: 600 .7rem var(--sans); color: #5B6779; margin-top: .25rem; display: inline-flex; align-items: center; gap: .15rem; }
.dk-num small.up { color: var(--bus-red); } .dk-num small.down { color: var(--route-green); }
.dk-num.bad { color: var(--bus-red); } .dk-num.ok { color: var(--route-green); }
.dk-date { display: grid; justify-items: end; } .dk-date b { color: var(--t-navy, #0D1B2A); font-weight: 650; } .dk-date small { color: #5B6779; }
/* the legal-limit clock bar (CPA 24 h for custody, 12 h for firearms) */
.dk-limit { display: inline-grid; grid-template-columns: 92px auto auto; align-items: center; gap: .45rem; font-variant-numeric: tabular-nums; }
.dk-limit-bar { height: 8px; border-radius: 8px; background: #E6EBF1; overflow: hidden; }
.dk-limit-bar i { display: block; height: 100%; border-radius: 8px; background: var(--route-green); }
.dk-limit.warn .dk-limit-bar i { background: #D99A0B; } .dk-limit.bad .dk-limit-bar i { background: var(--bus-red); }
.dk-limit b { font: 700 .9rem var(--mono); color: var(--t-navy, #0D1B2A); } .dk-limit.bad b { color: var(--bus-red); }
.dk-limit small { color: #6B7587; font: 600 .72rem var(--mono); }
.dk-empty { display: flex; align-items: center; gap: .5rem; margin: 0; padding: 1.2rem 1.25rem; color: #3A475C; font-size: .9rem; }
.dk-empty svg { color: var(--route-green); flex: none; }
.dk-more { border-top: 1px solid var(--line); padding: .7rem 1.25rem; }
.dk-more a { display: inline-flex; align-items: center; gap: .3rem; font-weight: 650; font-size: .85rem; color: var(--ax-blue-d); text-decoration: none; }
/* actions */
.dk-actions ul, .dk-chan ul { list-style: none; margin: 0; padding: .6rem; display: grid; gap: .35rem; }
.dk-act { display: flex; align-items: center; gap: .75rem; padding: .8rem .85rem; border-radius: 12px; color: var(--t-navy, #0D1B2A); text-decoration: none; font-weight: 650; font-size: .93rem; border: 1px solid var(--line); transition: background-color 160ms var(--ease-out), border-color 160ms, transform 120ms var(--ease-out); }
.dk-act span { flex: 1; } .dk-act > svg:first-child { color: var(--ax-blue-d); flex: none; }
.dk-act.primary { background: var(--t-navy, #0D1B2A); color: #fff; border-color: var(--t-navy, #0D1B2A); } .dk-act.primary > svg:first-child, .dk-act.primary .dk-go { color: var(--board); }
@media (hover: hover) and (pointer: fine) { .dk-act:not(.primary):hover { background: #F5F8FB; border-color: #C9D3DF; } .dk-act.primary:hover { background: #13263B; } .dk-act:hover .dk-go { transform: translateX(2px); } }
.dk-act:active { transform: scale(.98); }
.dk-chan li { display: grid; grid-template-columns: 18px minmax(0, 7.5rem) minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .45rem .5rem; font-size: .88rem; color: #1E2A3D; }
.dk-chan li > svg { color: #5B6779; }
.dk-chan-bar { height: 8px; border-radius: 8px; background: #E6EBF1; overflow: hidden; } .dk-chan-bar i { display: block; height: 100%; background: var(--ax-blue); border-radius: 8px; }
.dk-chan li b { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--t-navy, #0D1B2A); }
.dk-pledge { display: flex; gap: .55rem; align-items: flex-start; margin: 0; padding: .9rem 1rem; border-radius: 12px; background: #F2F6F3; border: 1px solid rgb(11 107 58 / .22); color: #24342A; font-size: .86rem; line-height: 1.45; }
.dk-pledge svg { color: var(--route-green); flex: none; margin-top: 1px; }
/* phones */
@media (max-width: 640px) {
  .dk-head { grid-template-columns: 1fr; grid-template-areas: "id" "time" "shift"; padding: 1.2rem 1.1rem 0; gap: .8rem; border-radius: 14px; }
  .dk-time { text-align: left; justify-items: start; grid-auto-flow: column; align-items: baseline; justify-content: start; gap: .7rem; }
  .dk-clock { font-size: 1.7rem; }
  .dk-shift { margin-inline: -1.1rem; padding-inline: 1.1rem; }
  .dk-shift li:nth-child(even) { color: transparent; }
  .dk-row { padding: .8rem 1rem; gap: .7rem; align-items: flex-start; flex-wrap: wrap; }
  .dk-main { flex-basis: calc(100% - 40px); }
  .dk-side { flex-basis: 100%; justify-content: flex-start; text-align: left; order: 3; padding-right: 26px; }
  .dk-row > .dk-go { order: 2; margin-top: 2px; }
  .dk-num, .dk-date { justify-items: start; }
  .dk-limit { grid-template-columns: minmax(80px, 1fr) auto auto; width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .dk-shift-line i { animation: dk-grow 700ms var(--ease-out) both; transform-origin: left; }
  .dk-shift-bus { animation: dk-drive 700ms var(--ease-out) both; }
  .dk-ledger .dk-cell { animation: dk-rise 420ms var(--ease-out) both; } .dk-cell:nth-child(2) { animation-delay: 40ms; } .dk-cell:nth-child(3) { animation-delay: 80ms; } .dk-cell:nth-child(4) { animation-delay: 120ms; }
}
@keyframes dk-grow { from { transform: scaleX(0); } }
@keyframes dk-drive { from { left: 0; } }
@keyframes dk-rise { from { opacity: 0; transform: translateY(6px); } }
/* dark */
html[data-theme="dark"] .dk-head { background: radial-gradient(520px 240px at 100% 0%, rgb(43 138 203 / .16), transparent 70%), linear-gradient(180deg, #0C1626 0%, #08101C 100%); border: 1px solid var(--line); }
html[data-theme="dark"] :is(.dk-ledger) { background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] :is(.dk-cell + .dk-cell, .dk-list li + li, .dk-more, .dk-act:not(.primary)) { border-color: var(--line); }
html[data-theme="dark"] :is(.dk-n, .dk-main b, .dk-num, .dk-date b, .dk-limit b, .dk-chan li b, .dk-act:not(.primary)) { color: #fff; }
html[data-theme="dark"] :is(.dk-l, .dk-sub, .dk-side, .dk-ref, .dk-empty, .dk-chan li, .dk-num small, .dk-date small) { color: var(--muted); }
html[data-theme="dark"] :is(.dk-limit-bar, .dk-chan-bar) { background: rgb(255 255 255 / .08); }
html[data-theme="dark"] .dk-act.primary { background: #1A2C44; border-color: #2A4060; }
html[data-theme="dark"] .dk-pledge { background: rgb(11 107 58 / .14); color: var(--ink-2); }
html[data-theme="dark"] .dk-tag { background: rgb(255 255 255 / .07); color: var(--ink-2); }
html[data-theme="dark"] .dk-alert { background: rgb(200 16 46 / .14); color: #FFB4BE; border-color: rgb(200 16 46 / .35); }
html[data-theme="dark"] .dk-count { background: var(--board); color: var(--board-ink); }
@media (hover: hover) and (pointer: fine) { html[data-theme="dark"] a.dk-row:hover, html[data-theme="dark"] .dk-act:not(.primary):hover { background: rgb(255 255 255 / .04); } }

/* Inner staff pages: one authoritative header. Kicker names the section,
   the title is set in the statute serif, a short board + route stripe
   ties every page back to the desk and the case route. */
.ax-main .pagehead { position: relative; background: linear-gradient(180deg, #FBFCFD, #fff); }
.ax-main .pagehead > div:first-child { display: grid; gap: .1rem; min-width: 0; }
.ax-main .pagehead::after { content: ""; position: absolute; left: 2rem; bottom: -2px; width: 72px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--board) 0 50%, var(--route-green) 50% 100%); }
.ax-main .pagehead h1 { font-size: clamp(1.45rem, 2.2vw, 1.85rem); line-height: 1.15; color: var(--t-navy, #0D1B2A); text-wrap: balance; }
.ax-main .pagehead p { font-size: .93rem; color: #3A475C; }
.ax-main .pagehead .back, .ax-main .pagehead > div > a.small:first-child { order: -1; display: inline-flex; align-items: center; gap: .3rem; width: max-content; font-weight: 650; font-size: .8rem; color: var(--ax-blue-d); text-decoration: none; margin-bottom: .25rem; }
@media (max-width: 860px) { .ax-main .pagehead::after { left: .9rem; } }
html[data-theme="dark"] .ax-main .pagehead { background: linear-gradient(180deg, #0A1220, var(--bg)); }
html[data-theme="dark"] .ax-main .pagehead h1 { color: #fff; }
html[data-theme="dark"] .ax-main .pagehead .back { color: var(--brand); }

/* Type v7: "badge and counter". Roboto Slab carries authority (engraved
   station plates, badges, gazette headings); Noto Sans carries service
   (open, plain, legible on low-cost phones, built for every script). */
:root {
  --sans: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Roboto Slab", "Rockwell", Georgia, serif;
  --slab: "Roboto Slab", "Rockwell", Georgia, serif;
}
body { font-family: var(--sans); }
h1, h2, h3, .pagehead h1, .ax-head h1, .ax-card h2, .dlg-head h2, .dk-head h1 { letter-spacing: -.01em; }
.rb-reserved { display: inline-block; margin-left: .35rem; padding: .05rem .4rem; border-radius: 999px; background: var(--t-navy, #0D1B2A); color: var(--board); font: 700 .62rem/1.5 var(--sans); letter-spacing: .04em; vertical-align: .15em; white-space: nowrap; }
.dev-private { display: flex; gap: .5rem; align-items: flex-start; max-width: 62ch; margin: .2rem 0 1rem; padding: .7rem .9rem; border-radius: 10px; background: rgb(242 194 0 / .12); border: 1px solid rgb(242 194 0 / .45); font-size: .9rem; }
.dev-private svg { flex: none; margin-top: 2px; }

/* Station jails: each station's lock-up as cells with seats (one seat = one place) */
.jails { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; }
.jails-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; flex-wrap: wrap; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); }
.jails-head h2 { margin: 0; font-size: 1.15rem; }
.jails-head p { margin: .2rem 0 0; color: #3A475C; font-size: .88rem; }
.jails-totals { display: flex; gap: 1.6rem; margin: 0; flex-wrap: wrap; }
.jails-totals div { display: grid; gap: .1rem; }
.jails-totals dt { font-size: .72rem; color: #4A566A; max-width: 14ch; line-height: 1.2; }
.jails-totals dd { margin: 0; font: 650 1.4rem/1 var(--display); font-variant-numeric: tabular-nums; color: var(--t-navy, #0D1B2A); }
.jails-totals .bad dd { color: var(--bus-red); }
.jails-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1px; background: var(--line); }
.jail { background: #fff; padding: 1rem 1.15rem; display: grid; gap: .6rem; align-content: start; }
.jail > header { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.jail > header > b { font-weight: 650; color: var(--t-navy, #0D1B2A); overflow-wrap: anywhere; }
.jail-occ { font-variant-numeric: tabular-nums; color: #4A566A; font-size: .85rem; white-space: nowrap; } .jail-occ b { font: 650 1.15rem var(--display); color: var(--t-navy, #0D1B2A); }
.jail-bar { height: 6px; border-radius: 6px; background: #E6EBF1; overflow: hidden; } .jail-bar i { display: block; height: 100%; background: var(--route-green); border-radius: 6px; }
.jail.flag .jail-bar i { background: var(--bus-red); }
.jail-cells { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.cell-t { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; align-items: center; gap: .55rem; font-size: .8rem; }
.cell-code { font: 700 .74rem var(--mono); color: var(--t-navy, #0D1B2A); }
.cell-seats { display: flex; flex-wrap: wrap; gap: 3px; }
.cell-seats i { width: 10px; height: 10px; border-radius: 3px; border: 1.5px solid #C3CDD9; }
.cell-seats i.on { background: var(--t-navy, #0D1B2A); border-color: var(--t-navy, #0D1B2A); }
.k-female .cell-seats i.on { background: #5B3A8E; border-color: #5B3A8E; }
.k-juvenile .cell-seats i.on { background: var(--ax-blue); border-color: var(--ax-blue); }
.cell-seats i.over { background: var(--bus-red); border-color: var(--bus-red); }
.cell-n { font: 600 .74rem var(--mono); color: #4A566A; font-variant-numeric: tabular-nums; }
.cell-t.full .cell-n { color: #8A5A00; } .cell-t.bad .cell-n, .cell-t.bad .cell-code { color: var(--bus-red); }
.cell-t em { grid-column: 2 / -1; font-style: normal; font-weight: 650; color: var(--bus-red); font-size: .74rem; }
.jail > footer { display: flex; gap: .4rem; flex-wrap: wrap; }
.jail-tag { padding: .12rem .5rem; border-radius: 999px; font: 700 .7rem/1.5 var(--sans); background: #FFF4DB; color: #8A5A00; }
.jail-tag.bad { background: var(--red-50); color: #A10E26; }
.jail-ok { font-size: .78rem; color: var(--route-green); font-weight: 600; }
html[data-theme="dark"] :is(.jails, .jail) { background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] .jails-grid { background: var(--line); }
html[data-theme="dark"] :is(.jails-head) { border-color: var(--line); }
html[data-theme="dark"] :is(.jails-totals dd, .jail > header > b, .jail-occ b, .cell-code) { color: #fff; }
html[data-theme="dark"] :is(.jails-head p, .jails-totals dt, .jail-occ, .cell-n) { color: var(--muted); }
html[data-theme="dark"] .jail-bar { background: rgb(255 255 255 / .08); }
html[data-theme="dark"] .cell-seats i { border-color: rgb(255 255 255 / .22); }
html[data-theme="dark"] .cell-seats i.on { background: #E8EEF6; border-color: #E8EEF6; }

/* ======================================================================
   National Public Safety Brief (presidential dashboard). Hati ya Taifa
   world: passport navy bar, security-stock cover with guilloche, gold
   seal only on the masthead, statute slab headline, ruled register.
   ====================================================================== */
body.nb-body { background: var(--pp-mint-2); }
.nb { min-height: 100dvh; display: flex; flex-direction: column; color: #13202E; }
.nb-loading { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: .8rem; color: var(--pp-navy); font-weight: 600; }
.nb-loading img { animation: nb-breathe 1.6s ease-in-out infinite; } @keyframes nb-breathe { 50% { opacity: .55; } }
.nb-denied { max-width: 520px; margin: 18vh auto; text-align: center; display: grid; gap: 1rem; justify-items: center; }
.nb-bar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem clamp(1rem, 3vw, 2.4rem); background: linear-gradient(var(--gold), var(--gold)) left bottom / 100% 3px no-repeat, var(--pp-navy); color: #fff; padding-top: max(.7rem, env(safe-area-inset-top)); }
.nb-bar-id { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.nb-bar-id span { display: grid; min-width: 0; } .nb-bar-id small { font: 700 .62rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #C9D6E8; }
.nb-bar-id b { font: 700 1.02rem/1.25 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-bar-r { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.nb-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .14); }
.nb-seg a, .nb-seg button { appearance: none; border: 0; background: none; color: #DDE6F2; font: 650 .8rem var(--sans); padding: .42rem .7rem; border-radius: 7px; text-decoration: none; cursor: pointer; min-height: 34px; display: inline-flex; align-items: center; transition: background-color 160ms var(--ease-out), color 160ms; }
.nb-seg [aria-current="true"], .nb-seg [aria-pressed="true"] { background: #fff; color: var(--pp-navy); }
.nb-btn { appearance: none; display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; padding: 0 .8rem; border-radius: 10px; border: 1px solid rgb(255 255 255 / .22); background: transparent; color: #fff; font: 650 .82rem var(--sans); text-decoration: none; cursor: pointer; transition: background-color 160ms var(--ease-out), transform 120ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .nb-seg a:not([aria-current="true"]):hover, .nb-seg button:not([aria-pressed="true"]):hover { background: rgb(255 255 255 / .1); color: #fff; } .nb-btn:hover { background: rgb(255 255 255 / .1); } }
.nb-btn:active { transform: scale(.97); }
.nb-doc { width: min(1240px, 100%); margin: 0 auto; padding: clamp(1rem, 3vw, 2.2rem) clamp(.8rem, 3vw, 2.4rem) 2rem; display: grid; gap: 1.2rem; flex: 1; }
/* cover: the memo on security stock */
.nb-cover { position: relative; overflow: hidden; border-radius: 6px; padding: clamp(1.4rem, 4vw, 2.8rem) clamp(1.2rem, 4vw, 3.2rem) clamp(1.4rem, 3vw, 2.2rem); background: var(--pp-mint) url(/img/guilloche.svg) center / 520px 170px; border: 1px solid #C8D6CC; box-shadow: 0 1px 0 rgb(255 255 255 / .8) inset, 0 24px 48px -32px rgb(19 41 75 / .45); }
.nb-cover::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgb(19 41 75 / .18); border-radius: 3px; pointer-events: none; }
.nb-cover-mast { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; text-align: center; padding-bottom: 1rem; border-bottom: 2px solid var(--pp-navy); }
.nb-cover-mast div { display: grid; gap: .15rem; font: 700 clamp(.7rem, 1.4vw, .86rem)/1.3 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--pp-navy); }
.nb-cover-mast div span:last-child { font-size: 1.25em; letter-spacing: .04em; }
.nb-memo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem 2rem; margin: 1.1rem 0 1.3rem; }
.nb-memo div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .6rem; align-items: baseline; padding-bottom: .4rem; border-bottom: 1px dashed rgb(19 41 75 / .25); }
.nb-memo dt { font: 800 .66rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #4A5B52; }
.nb-memo dd { margin: 0; font-weight: 600; color: #13202E; font-size: .92rem; }
.nb-serial { font-family: var(--mono) !important; color: var(--serial) !important; letter-spacing: .04em; }
.nb-headline { font: 700 clamp(1.55rem, 3.4vw, 2.6rem)/1.18 var(--display); color: var(--pp-navy); margin: 0; max-width: 30ch; text-wrap: balance; letter-spacing: -.012em; }
.nb-sub { margin: .8rem 0 0; max-width: 68ch; font-size: clamp(.95rem, 1.4vw, 1.06rem); line-height: 1.55; color: #24342A; }
.nb-cover-stamps { position: absolute; right: clamp(1rem, 4vw, 3rem); bottom: clamp(1rem, 3vw, 2rem); display: flex; align-items: center; gap: .8rem; pointer-events: none; }
.nb-cover-stamps .stamp-round { width: 96px; height: 96px; }
@media (max-width: 860px) { .nb-memo { grid-template-columns: 1fr; } .nb-cover-stamps { position: static; margin-top: 1rem; } .nb-cover-mast img { width: 48px; height: 48px; } }
/* key figures: a ruled register */
.nb-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #fff; border: 1px solid #C8D6CC; border-radius: 6px; overflow: hidden; }
.nb-fig { position: relative; padding: 1.2rem 1.25rem 1.2rem; display: grid; gap: .35rem; align-content: start; }
.nb-fig::before { content: ""; position: absolute; left: 1.25rem; top: 0; width: 32px; height: 3px; background: var(--pp-navy); }
.nb-fig + .nb-fig { border-left: 1px solid #DCE5DF; }
.nb-fig.warn::before { background: #C98A0B; }
.nb-fig-l { font: 800 .68rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #4A5B52; }
.nb-fig-v { font: 700 clamp(2rem, 3.6vw, 2.9rem)/1 var(--display); color: var(--pp-navy); font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.02em; }
.nb-fig-f { font-size: .82rem; color: #33453C; line-height: 1.35; }
.nb-delta { display: inline-flex; align-items: center; gap: .25rem; font-weight: 650; color: #33453C; } .nb-delta.good { color: var(--ink-green); } .nb-delta.bad { color: var(--serial); } .nb-delta.flat { font-weight: 500; color: #5A6B62; }
@media (max-width: 960px) { .nb-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nb-fig:nth-child(3) { border-left: 0; } .nb-fig:nth-child(n+3) { border-top: 1px solid #DCE5DF; } }
@media (max-width: 460px) { .nb-figs { grid-template-columns: 1fr; } .nb-fig + .nb-fig { border-left: 0; } }
/* panels */
.nb-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
@media (max-width: 960px) { .nb-cols { grid-template-columns: 1fr; } }
.nb-panel { background: #fff; border: 1px solid #C8D6CC; border-radius: 6px; padding: 1.2rem 1.3rem 1.3rem; min-width: 0; }
.nb-panel > header { display: flex; justify-content: space-between; align-items: baseline; gap: .4rem 1rem; flex-wrap: wrap; padding-bottom: .7rem; margin-bottom: .9rem; border-bottom: 2px solid var(--pp-navy); }
.nb-panel h2 { margin: 0; font: 700 1.12rem/1.25 var(--display); color: var(--pp-navy); }
.nb-panel > header p { margin: 0; color: #4A5B52; font-size: .82rem; }
.nb-h3 { font: 800 .7rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #4A5B52; margin: 1.2rem 0 .5rem; }
.nb-chart { position: relative; }
.nb-svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.nb-grid { stroke: #E3EAE5; stroke-width: 1; } .nb-tick { font: 500 11px var(--sans); fill: #5A6B62; }
.nb-line { fill: none; stroke: var(--pp-navy); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.nb-area { fill: rgb(19 41 75 / .08); }
.nb-cross { stroke: #8FA195; stroke-width: 1; stroke-dasharray: 3 3; } .nb-dot { fill: var(--pp-navy); stroke: #fff; stroke-width: 2; }
.nb-tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--pp-navy); color: #fff; padding: .45rem .65rem; border-radius: 8px; font-size: .8rem; display: grid; gap: .1rem; text-align: center; pointer-events: none; white-space: nowrap; box-shadow: 0 8px 20px -10px rgb(0 0 0 / .5); }
.nb-tip b { font: 700 1.05rem var(--display); } .nb-tip span { color: #C9D6E8; font-size: .74rem; }
.nb-table { margin-top: .8rem; font-size: .85rem; } .nb-table summary { cursor: pointer; color: var(--ink-blue); font-weight: 650; width: max-content; }
.nb-table table { width: 100%; border-collapse: collapse; margin-top: .6rem; } .nb-table :is(th, td) { padding: .35rem .5rem; border-bottom: 1px solid #E3EAE5; text-align: left; } .nb-table .n { text-align: right; font-variant-numeric: tabular-nums; }
.nb-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.nb-bars li { display: grid; grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr) 3rem 3.4rem; align-items: center; gap: .7rem; font-size: .86rem; }
.nb-bar-l { color: #13202E; font-weight: 600; overflow-wrap: anywhere; line-height: 1.25; } .nb-bar-l em { font-style: normal; font: 700 .6rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--serial); margin-left: .2rem; white-space: nowrap; }
.nb-bar-t { height: 12px; background: #EEF3EF; border-radius: 0 4px 4px 0; overflow: hidden; } .nb-bar-t i { display: block; height: 100%; background: var(--pp-navy); border-radius: 0 4px 4px 0; }
.nb-bars b { text-align: right; font-variant-numeric: tabular-nums; color: #13202E; }
.nb-bar-d { text-align: right; font: 650 .78rem var(--mono); color: #5A6B62; } .nb-bar-d.up { color: var(--serial); } .nb-bar-d.down { color: var(--ink-green); }
@media (max-width: 520px) { .nb-bars li { grid-template-columns: minmax(0, 1fr) 2.6rem 3rem; } .nb-bar-t { grid-column: 1 / -1; order: 4; } }
.nb-st { width: 100%; border-collapse: collapse; font-size: .86rem; }
.nb-st th { text-align: left; font: 800 .66rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #4A5B52; padding: 0 .4rem .5rem; }
.nb-st td { padding: .55rem .4rem; border-top: 1px solid #E3EAE5; vertical-align: middle; }
.nb-st td b { display: block; font-weight: 650; } .nb-st td small { color: #5A6B62; }
.nb-st .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; } .nb-st td.bad { color: var(--serial); font-weight: 700; }
.nb-mini { display: inline-block; width: 64px; height: 8px; background: #EEF3EF; border-radius: 4px; overflow: hidden; vertical-align: middle; margin-right: .5rem; } .nb-mini i { display: block; height: 100%; background: var(--pp-navy); border-radius: 4px; }
.nb-mini.wide { width: auto; margin: 0; }
.nb-route-wrap .route { margin-bottom: .6rem; }
.nb-note { margin: 0; font-size: .86rem; color: #33453C; }
.nb-svc { display: grid; gap: 0; margin: 0; }
.nb-svc div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed #D3DED6; }
.nb-svc dt { color: #24342A; font-size: .88rem; } .nb-svc dd { margin: 0; font: 700 1.25rem var(--display); color: var(--pp-navy); font-variant-numeric: tabular-nums; }
.nb-ch { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.nb-ch li { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) auto; gap: .7rem; align-items: center; font-size: .86rem; } .nb-ch b { font-variant-numeric: tabular-nums; }
.nb-why { background: var(--pp-navy); color: #fff; border-color: var(--pp-navy); }
.nb-why > header { border-bottom-color: var(--gold); } .nb-why h2 { color: #fff; }
.nb-why ol { list-style: none; counter-reset: w; margin: 0; padding: 0; display: grid; gap: .9rem; }
.nb-why li { counter-increment: w; display: grid; grid-template-columns: 2rem minmax(0, 1fr); column-gap: .7rem; }
.nb-why li::before { content: counter(w); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--gold); color: #F3E3B5; display: grid; place-items: center; font: 700 .82rem var(--display); }
.nb-why li b { font: 700 1rem/1.3 var(--display); } .nb-why li span { color: #C9D6E8; font-size: .88rem; line-height: 1.5; }
.nb-scope { display: flex; gap: .5rem; align-items: flex-start; margin: 1.2rem 0 0; padding-top: .9rem; border-top: 1px solid rgb(255 255 255 / .16); color: #C9D6E8; font-size: .82rem; } .nb-scope svg { flex: none; margin-top: 2px; }
.nb-foot { background: var(--pp-navy-2); color: #C9D6E8; padding-bottom: env(safe-area-inset-bottom); }
.nb-foot .mrz { margin: 0; } .nb-foot p { margin: 0; padding: .7rem clamp(1rem, 3vw, 2.4rem) 1rem; font-size: .78rem; }
@media (max-width: 720px) {
  .nb-bar { flex-wrap: wrap; } .nb-bar-id b { font-size: .92rem; } .nb-bar-id img { width: 36px; height: 36px; }
  .nb-bar-r { width: 100%; justify-content: space-between; } .nb-btn span { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .nb-figs .nb-fig, .nb-cover { animation: dk-rise 480ms var(--ease-out) both; } .nb-fig:nth-child(2) { animation-delay: 50ms; } .nb-fig:nth-child(3) { animation-delay: 100ms; } .nb-fig:nth-child(4) { animation-delay: 150ms; }
  .nb-line { stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: nb-draw 1.1s var(--ease-out) forwards; } @keyframes nb-draw { to { stroke-dashoffset: 0; } }
  .nb-bar-t i, .nb-mini i { transform-origin: left; animation: dk-grow 700ms var(--ease-out) both; }
}
@media print { .nb-bar, .fabs { display: none !important; } body.nb-body { background: #fff; } .nb-panel, .nb-figs, .nb-cover { break-inside: avoid; box-shadow: none; } }
/* dark: the document turns to night stock; navy stays the ink of authority */
html[data-theme="dark"] body.nb-body { background: #08101C; }
html[data-theme="dark"] .nb { color: var(--ink); }
html[data-theme="dark"] :is(.nb-panel:not(.nb-why), .nb-figs) { background: #0C1626; border-color: rgb(255 255 255 / .1); }
html[data-theme="dark"] .nb-cover { background: #0E1B2E url(/img/guilloche.svg) center / 520px 170px; background-blend-mode: soft-light; border-color: rgb(255 255 255 / .12); }
html[data-theme="dark"] :is(.nb-headline, .nb-fig-v, .nb-panel h2, .nb-svc dd, .nb-cover-mast div) { color: #fff; }
html[data-theme="dark"] :is(.nb-memo dd, .nb-bar-l, .nb-bars b, .nb-sub) { color: var(--ink-2); }
html[data-theme="dark"] :is(.nb-memo dt, .nb-fig-l, .nb-fig-f, .nb-panel > header p, .nb-st th, .nb-st td small, .nb-svc dt, .nb-note, .nb-h3) { color: var(--muted); }
html[data-theme="dark"] :is(.nb-panel > header, .nb-cover-mast) { border-color: #6F8CB8; }
html[data-theme="dark"] :is(.nb-bar-t, .nb-mini) { background: rgb(255 255 255 / .07); }
html[data-theme="dark"] :is(.nb-bar-t i, .nb-mini i) { background: #8FB0DE; }
html[data-theme="dark"] .nb-line { stroke: #8FB0DE; } html[data-theme="dark"] .nb-area { fill: rgb(143 176 222 / .12); } html[data-theme="dark"] .nb-grid { stroke: rgb(255 255 255 / .08); } html[data-theme="dark"] .nb-tick { fill: var(--muted); }
html[data-theme="dark"] :is(.nb-fig + .nb-fig, .nb-st td, .nb-svc div, .nb-memo div) { border-color: rgb(255 255 255 / .1); }
html[data-theme="dark"] .nb-why { background: var(--pp-navy, #13294B); }
.nb-tip[hidden] { display: none; }
@media (max-width: 720px) { .nb-bar { position: static; } .nb-bar-r { gap: .4rem; } .nb-seg a, .nb-seg button { padding: .4rem .55rem; } }

/* ======================================================================
   Digital modules (staff): INTERPOL gateway, body cams + evidence vault,
   e-citations, tips. AXURE cards, route-board colours for state.
   ====================================================================== */
.dg-ledger { margin-bottom: 1.2rem; }
.dg-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.2rem; align-items: start; margin-bottom: 1.2rem; }
.dg-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .dg-grid, .dg-grid.two { grid-template-columns: 1fr; } }
.dg-block { margin-bottom: 1.2rem; }
.dg-form { padding: 1.1rem 1.25rem; display: grid; gap: .8rem; }
.dg-seg { background: #F1F4F8; border-color: var(--line); width: max-content; max-width: 100%; flex-wrap: wrap; }
.dg-seg label { position: relative; }
.dg-seg input { position: absolute; opacity: 0; pointer-events: none; }
.dg-seg span { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .8rem; border-radius: 7px; font: 650 .84rem var(--sans); color: #334155; cursor: pointer; min-height: 36px; transition: background-color 160ms var(--ease-out); }
.dg-seg input:checked + span { background: var(--t-navy, #0D1B2A); color: #fff; }
.dg-seg input:focus-visible + span { outline: 2px solid var(--ax-blue); outline-offset: 2px; }
.dg-hint { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-size: .8rem; color: #4A566A; }
.dg-hint .chip { font: 600 .76rem var(--mono); padding: .2rem .55rem; min-height: 28px; cursor: pointer; }
.dg-dbs { list-style: none; margin: 0; padding: .4rem 1.25rem; }
.dg-dbs li { display: grid; gap: .1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); } .dg-dbs li:last-child { border: 0; }
.dg-dbs b { font: 700 .82rem var(--mono); color: var(--t-navy, #0D1B2A); } .dg-dbs span { font-size: .84rem; color: #4A566A; }
.dg-note { display: flex; gap: .5rem; margin: 0; padding: .9rem 1.25rem 1.1rem; border-top: 1px solid var(--line); font-size: .82rem; color: #3A475C; } .dg-note svg { flex: none; margin-top: 2px; color: var(--route-green); }
[data-out] { padding: 0 1.25rem 1.25rem; } [data-out]:empty { padding: 0; }
.ip-wait { display: flex; align-items: center; gap: .7rem; padding: 1rem; border-radius: 12px; background: #F5F8FB; color: #334155; font-weight: 600; font-size: .9rem; }
.ip-pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--ax-blue); animation: ip-pulse 1s ease-in-out infinite; } @keyframes ip-pulse { 50% { opacity: .3; transform: scale(.7); } }
.ip-result { display: grid; gap: .8rem; }
.ip-summary { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin: 0; padding: .75rem .95rem; border-radius: 12px; font-size: .88rem; }
.ip-result.bad .ip-summary { background: var(--red-50); color: #8E1022; } .ip-result.ok .ip-summary { background: #E8F4EC; color: var(--route-green); }
.ip-hit { border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; display: grid; gap: .55rem; background: #fff; }
.ip-hit > header { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; align-items: center; }
.ip-tag { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .6rem; border-radius: 999px; font: 800 .7rem/1.3 var(--sans); letter-spacing: .04em; text-transform: uppercase; background: var(--red-50); color: #A10E26; }
.t-yellow .ip-tag { background: #FFF4DB; color: #8A5A00; } .t-blue .ip-tag { background: #E6F1FA; color: #1F5F8F; }
.ip-hit { border-color: rgb(200 16 46 / .35); background: #FFFBFB; } .ip-hit.t-yellow { border-color: rgb(217 154 11 / .45); background: #FFFCF4; } .ip-hit.t-blue { border-color: rgb(43 138 203 / .4); background: #F8FBFE; }
.ip-ref { font: 600 .74rem var(--mono); color: #5B6779; }
.ip-hit h3 { margin: 0; font-size: 1.15rem; color: var(--t-navy, #0D1B2A); }
.ip-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .4rem 1rem; margin: 0; }
.ip-kv div { display: grid; } .ip-kv dt { font: 700 .66rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #5B6779; } .ip-kv dd { margin: 0; font-size: .88rem; color: #1E2A3D; }
.ip-hit p { margin: 0; color: #334155; font-size: .9rem; line-height: 1.5; }
.ip-hit footer { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; padding-top: .55rem; border-top: 1px dashed var(--line); font-size: .78rem; color: #8E1022; font-weight: 600; }
/* body-worn cameras */
.bwc-grid { list-style: none; margin: 0; padding: 1rem 1.25rem 1.25rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.bwc { border: 1px solid var(--line); border-radius: 14px; padding: .85rem .95rem; display: grid; gap: .3rem; background: #fff; }
.bwc > header { display: flex; justify-content: space-between; align-items: center; gap: .4rem; font-size: .74rem; color: #5B6779; }
.bwc-st { display: inline-flex; align-items: center; gap: .3rem; font: 700 .7rem var(--sans); color: #334155; }
.s-recording .bwc-st { color: var(--bus-red); }
.rec { width: 8px; height: 8px; border-radius: 50%; background: var(--bus-red); animation: ip-pulse 1.2s ease-in-out infinite; }
.bwc > b { font-weight: 650; color: var(--t-navy, #0D1B2A); font-size: .92rem; overflow-wrap: anywhere; } .bwc > small { color: #5B6779; font-size: .76rem; }
.bwc-bars { display: grid; gap: .25rem; margin-top: .25rem; }
.bwc-bars > span { display: grid; grid-template-columns: 3.6rem 1fr 2.6rem; align-items: center; gap: .4rem; font: 600 .7rem var(--mono); color: #4A566A; }
.bwc-bars .bar { height: 6px; border-radius: 6px; background: #E6EBF1; overflow: hidden; } .bwc-bars .bar i { display: block; height: 100%; background: var(--route-green); border-radius: 6px; } .bwc-bars .bar.low i { background: var(--bus-red); }
.bwc > footer { display: flex; justify-content: space-between; align-items: center; gap: .4rem; margin-top: .3rem; font-size: .72rem; color: #5B6779; }
.s-docked { background: #FAFBFC; }
/* evidence */
.dg-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.dg-table th { text-align: left; padding: .65rem 1rem; font: 700 .68rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #5B6779; background: #F7F9FB; }
.dg-table td { padding: .7rem 1rem; border-top: 1px solid var(--line); vertical-align: middle; } .dg-table td small { display: block; color: #5B6779; font-size: .74rem; }
.dg-table tr[data-ev] { cursor: pointer; transition: background-color 140ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .dg-table tr[data-ev]:hover { background: #F5F8FB; } }
.dg-table tr[data-ev]:focus-visible { outline: 2px solid var(--ax-blue); outline-offset: -2px; }
.dg-table td:first-child { display: flex; gap: .7rem; align-items: center; min-width: 260px; }
.ev-k { width: 34px; height: 34px; border-radius: 10px; background: var(--t-navy, #0D1B2A); color: var(--board); display: grid; place-items: center; flex: none; }
.ev-t { display: grid; min-width: 0; } .ev-t b { font-weight: 650; color: var(--t-navy, #0D1B2A); }
.ev-detail { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.2rem; }
@media (max-width: 760px) { .ev-detail { grid-template-columns: 1fr; } }
.ev-media { border-radius: 12px; overflow: hidden; background: #0A0F14; } .ev-media img, .ev-frame { display: block; width: 100%; height: auto; }
.ev-meta h3 { margin: 0 0 .6rem; font-size: 1.05rem; }
.ev-hash { display: grid; gap: .2rem; margin: .8rem 0; padding: .6rem .75rem; border-radius: 10px; background: #F5F8FB; }
.ev-hash span { font: 700 .66rem var(--sans); letter-spacing: .1em; color: #5B6779; } .ev-hash code { font: 600 .72rem/1.45 var(--mono); word-break: break-all; color: var(--t-navy, #0D1B2A); }
.ev-verdict { display: flex; align-items: center; gap: .45rem; margin: .7rem 0 0; padding: .6rem .8rem; border-radius: 10px; font-weight: 600; font-size: .86rem; }
.ev-verdict.ok { background: #E8F4EC; color: var(--route-green); } .ev-verdict.bad { background: var(--red-50); color: #8E1022; }
.ev-chain { grid-column: 1 / -1; } .ev-chain h4 { margin: 0 0 .6rem; font-size: .95rem; }
.ev-chain ol { list-style: none; margin: 0; padding: 0; position: relative; }
.ev-chain li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: .6rem; padding-bottom: .8rem; position: relative; }
.ev-chain li:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.ev-dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--route-green); margin-top: 3px; }
.a-viewed .ev-dot { border-color: #9AA6B6; } .a-shared .ev-dot { border-color: var(--ax-blue); } .a-verify_failed .ev-dot { border-color: var(--bus-red); }
.ev-chain li b { font-weight: 650; font-size: .88rem; } .ev-chain li span { display: block; font-size: .78rem; color: #4A566A; }
.dg-receipt { margin-top: .8rem; }
/* tips */
.tip-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.tip { padding: 1rem 1.15rem; display: grid; gap: .5rem; align-content: start; }
.tip > header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.tip p { margin: 0; color: #1E2A3D; line-height: 1.5; } .tip small { color: #5B6779; }
.tip.s-new { box-shadow: inset 0 0 0 1.5px #D99A0B; }
.tip-act { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .4rem; margin-top: .3rem; }
.tip-act select, .tip-act input { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 .5rem; font: inherit; font-size: .82rem; background: #fff; color: inherit; min-width: 0; }
@media (max-width: 520px) { .tip-list { grid-template-columns: 1fr; } .tip-act { grid-template-columns: 1fr; } }
html[data-theme="dark"] :is(.ip-hit, .bwc, .ip-wait) { background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] .s-docked { background: rgb(255 255 255 / .02); }
html[data-theme="dark"] :is(.ip-hit h3, .bwc > b, .ev-t b, .dg-dbs b, .ev-hash code) { color: #fff; }
html[data-theme="dark"] :is(.ip-kv dd, .ip-hit p, .tip p) { color: var(--ink-2); }
html[data-theme="dark"] :is(.dg-table th, .ev-hash, .dg-seg) { background: rgb(255 255 255 / .04); }
html[data-theme="dark"] .dg-seg span { color: var(--ink-2); } html[data-theme="dark"] .dg-seg input:checked + span { background: #fff; color: var(--t-navy, #0D1B2A); }
html[data-theme="dark"] :is(.dg-table td, .dg-dbs li, .dg-note) { border-color: var(--line); }
html[data-theme="dark"] .bwc-bars .bar { background: rgb(255 255 255 / .08); }
html[data-theme="dark"] .tip-act :is(select, input) { background: var(--field); border-color: var(--line); }

/* ---- Public: fines, anonymous tips, missing & wanted (Hati ya Taifa) ---- */
.tip-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 860px) { .tip-grid { grid-template-columns: 1fr; } }
.tip-cats { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tip-cats legend { font: 700 .82rem var(--sans); color: var(--pp-navy); margin-bottom: .45rem; padding: 0; }
.tip-cats label { position: relative; } .tip-cats input { position: absolute; opacity: 0; pointer-events: none; }
.tip-cats span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 .8rem; border-radius: 6px; border: 1.5px solid #B9C6BE; background: #fff; font-size: .86rem; font-weight: 600; color: #1C2B24; cursor: pointer; transition: background-color 140ms var(--ease-out), border-color 140ms; }
.tip-cats input:checked + span { background: var(--pp-navy); border-color: var(--pp-navy); color: #fff; }
.tip-cats input:focus-visible + span { outline: 2px solid var(--ink-blue); outline-offset: 2px; }
.tip-follow .doc-title h2 { font-size: 1.1rem; }
.tip-receipt { margin-top: 1.2rem; }
.tip-pin { font-size: 1.6rem !important; letter-spacing: .2em; color: var(--serial) !important; }
.fine + .fine { margin-top: 1rem; }
.wb-demo { display: inline-flex; align-items: center; gap: .4rem; margin-top: .5rem !important; padding: .35rem .7rem; border-radius: 6px; background: rgb(179 38 30 / .08); color: var(--serial) !important; font-weight: 600; font-size: .84rem !important; }
.wb-h { display: flex; align-items: baseline; gap: .5rem; margin: 1.6rem 0 .8rem; font: 700 1.25rem var(--display); color: var(--pp-navy); padding-bottom: .5rem; border-bottom: 2px solid var(--pp-navy); }
.wb-h span { font: 700 .8rem var(--mono); color: #4A5B52; }
.wb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.wb-card { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 1rem; padding: 1rem; border-radius: 6px; background: #fff; border: 1px solid #C8D6CC; position: relative; overflow: hidden; }
.wb-card { border-color: rgb(179 38 30 / .3); } .wb-card.n-yellow { border-color: rgb(217 154 11 / .45); }
.wb-sil { width: 92px; height: 110px; color: var(--pp-navy); border-radius: 4px; }
.wb-tag { display: inline-block; font: 800 .68rem var(--sans); letter-spacing: .14em; color: var(--serial); } .n-yellow .wb-tag { color: #8A5A00; }
.wb-card h3 { margin: .15rem 0; font: 700 1.08rem/1.25 var(--display); color: var(--pp-navy); }
.wb-meta { margin: 0 0 .35rem !important; font-size: .8rem !important; color: #4A5B52 !important; }
.wb-card p { margin: 0; font-size: .86rem; line-height: 1.45; color: #24342A; }
.wb-ref { display: block; margin-top: .4rem; font: 600 .7rem var(--mono); color: #5A6B62; }
.wb-cta { margin-top: 1.6rem; }
.nb-dig { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; }
.nb-dig > div { padding: .3rem 1.1rem .4rem; display: grid; gap: .25rem; align-content: start; }
.nb-dig > div + div { border-left: 1px solid #DCE5DF; }
.nb-dig dt { font: 800 .66rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #4A5B52; }
.nb-dig dd { margin: 0; font: 700 clamp(1.4rem, 2.4vw, 1.9rem)/1.05 var(--display); color: var(--pp-navy); font-variant-numeric: tabular-nums; } .nb-dig dd small { font-size: .55em; color: #5A6B62; margin-left: .2rem; }
.nb-dig p { margin: 0; font-size: .8rem; color: #33453C; line-height: 1.4; }
@media (max-width: 960px) { .nb-dig { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1rem; } .nb-dig > div:nth-child(3) { border-left: 0; } }
@media (max-width: 460px) { .nb-dig { grid-template-columns: 1fr; } .nb-dig > div + div { border-left: 0; border-top: 1px solid #DCE5DF; padding-top: .8rem; } }
html[data-theme="dark"] .nb-dig dd { color: #fff; } html[data-theme="dark"] :is(.nb-dig dt, .nb-dig p) { color: var(--muted); } html[data-theme="dark"] .nb-dig > div + div { border-color: rgb(255 255 255 / .1); }
.bwc-bars em { font: 600 .68rem var(--sans); font-style: normal; color: #5B6779; }

/* ---- 112 control room, ANPR, rosters ---- */
.cr-grid { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 1.2rem; margin-bottom: 1.2rem; align-items: stretch; }
@media (max-width: 1100px) { .cr-grid { grid-template-columns: 1fr; } }
.cr-queue { display: flex; flex-direction: column; min-height: 0; }
.cr-list { list-style: none; margin: 0; padding: .7rem; display: grid; gap: .6rem; overflow: auto; max-height: 620px; }
.cr-call { border: 1px solid var(--line); border-radius: 14px; padding: .8rem .9rem; display: grid; gap: .4rem; background: #fff; }
.cr-call.p1 { border-color: rgb(200 16 46 / .4); background: #FFFBFB; } .cr-call.s-en_route { border-color: rgb(217 154 11 / .45); background: #FFFCF4; } .cr-call.s-on_scene { border-color: rgb(11 107 58 / .35); background: #F6FBF8; }
.cr-call > header { display: flex; align-items: center; gap: .5rem; }
.cr-call > header b { flex: 1; font-weight: 700; color: var(--t-navy, #0D1B2A); }
.cr-pri { font: 800 .7rem var(--mono); padding: .15rem .4rem; border-radius: 6px; background: var(--t-navy, #0D1B2A); color: #fff; } .p1 .cr-pri { background: var(--bus-red); } .p2 .cr-pri { background: #B7791F; }
.cr-age { font: 700 .76rem var(--mono); color: #4A566A; }
.cr-call p { margin: 0; font-size: .88rem; color: #1E2A3D; line-height: 1.45; }
.cr-loc { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; color: #4A566A; }
.cr-call > footer { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; padding-top: .45rem; border-top: 1px dashed var(--line); }
.cr-st { font-size: .8rem; color: #334155; font-weight: 600; }
.cr-pick:empty { display: none; } .cr-pick-h { margin: .3rem 0; font: 700 .7rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #5B6779; }
.cr-pick ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.cr-opt { width: 100%; display: grid; grid-template-columns: 5rem 1fr auto auto; gap: .6rem; align-items: center; text-align: left; padding: .55rem .7rem; border-radius: 10px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: .82rem; color: inherit; cursor: pointer; transition: background-color 140ms var(--ease-out), border-color 140ms, transform 120ms var(--ease-out); }
.cr-opt.best { border-color: var(--route-green); background: #F1F8F3; } .cr-opt:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .cr-opt:hover { border-color: var(--t-navy, #0D1B2A); } }
.cr-closef { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .4rem; align-items: center; font-size: .8rem; }
.cr-closef input[name=outcome] { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 .55rem; font: inherit; }
.cr-mapwrap { position: relative; overflow: hidden; min-height: 460px; }
.cr-map { position: absolute; inset: 0 0 38px 0; }
.cr-legend { position: absolute; left: 0; right: 0; bottom: 0; height: 38px; display: flex; gap: 1rem; align-items: center; padding: 0 1rem; margin: 0; list-style: none; font-size: .76rem; color: #4A566A; border-top: 1px solid var(--line); background: #fff; flex-wrap: wrap; }
.cr-legend li { display: inline-flex; align-items: center; gap: .35rem; } .cr-legend i { width: 12px; height: 12px; border-radius: 4px; }
.cr-unit { display: grid; place-items: center; height: 22px; padding: 0 .45rem; border-radius: 6px; font: 700 .68rem var(--mono); color: #fff; white-space: nowrap; box-shadow: 0 2px 6px rgb(0 0 0 / .3); border: 1.5px solid #fff; }
.cr-unit.u-available, .cr-legend .u-available { background: var(--route-green); } .cr-unit.u-en_route, .cr-legend .u-en_route { background: #B7791F; } .cr-unit.u-on_scene, .cr-legend .u-on_scene { background: var(--t-navy, #0D1B2A); }
.cr-pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); display: grid; place-items: center; background: var(--bus-red); color: #fff; font: 800 .74rem var(--sans); border: 2px solid #fff; box-shadow: 0 3px 8px rgb(0 0 0 / .35); }
.cr-pin.p2 { background: #B7791F; } .cr-pin.p3 { background: var(--t-navy, #0D1B2A); } .cr-legend .c-pin { background: var(--bus-red); border-radius: 50%; }
/* ANPR */
.an-cams { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; }
.an-cam { padding: .85rem .95rem; display: grid; gap: .2rem; }
.an-cam > header { display: flex; justify-content: space-between; font-size: .72rem; color: #5B6779; }
.an-st { font-weight: 700; color: var(--route-green); } .an-cam.offline .an-st { color: var(--bus-red); } .an-cam.offline { opacity: .7; }
.an-cam > b { font-weight: 650; color: var(--t-navy, #0D1B2A); } .an-cam small { color: #5B6779; font-size: .76rem; }
.an-nums { display: flex; gap: 1rem; margin: .3rem 0 .1rem; font-size: .76rem; color: #4A566A; } .an-nums b { font: 650 1.1rem var(--display); color: var(--t-navy, #0D1B2A); } .an-nums .bad b { color: var(--bus-red); }
.plate { display: inline-block; width: max-content; padding: .12rem .5rem; border-radius: 4px; background: var(--board); color: var(--board-ink); border: 1.5px solid var(--board-ink); font: 800 .82rem var(--mono); letter-spacing: .06em; }
.an-feed { list-style: none; margin: 0; padding: .3rem 0; max-height: 520px; overflow: auto; }
.an-feed li { display: grid; grid-template-columns: 7.5rem 4.4rem 2.8rem minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .45rem 1.1rem; font-size: .8rem; color: #4A566A; border-bottom: 1px solid var(--line); }
.an-feed li.hit.bad { background: var(--red-50); color: #8E1022; } .an-feed li.hit.warn { background: #FFF8E8; color: #8A5A00; }
.an-feed time { font: 600 .74rem var(--mono); }
@media (max-width: 560px) { .an-feed li { grid-template-columns: auto 1fr auto; } .an-feed li > span:nth-child(2), .an-feed li > span:nth-child(3) { display: none; } }
/* roster */
.rs-weeks a { color: #334155; } .rs-weeks [aria-current="true"] { background: var(--t-navy, #0D1B2A); color: #fff; }
.rs-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.rs-table th, .rs-table td { padding: .45rem .5rem; border-top: 1px solid var(--line); text-align: center; }
.rs-table thead th { font: 700 .7rem var(--sans); text-transform: uppercase; letter-spacing: .06em; color: #5B6779; background: #F7F9FB; border-top: 0; white-space: nowrap; }
.rs-table tbody th { text-align: left; min-width: 190px; } .rs-table tbody th b { display: block; font-weight: 650; color: var(--t-navy, #0D1B2A); } .rs-table tbody th small { color: #5B6779; font-size: .74rem; font-weight: 500; }
.rs-table .today { background: rgb(242 194 0 / .12); }
.rs-chip { display: inline-grid; place-items: center; width: 36px; height: 30px; border-radius: 8px; border: 0; font: 800 .8rem var(--mono); cursor: pointer; transition: transform 120ms var(--ease-out); }
.rs-chip:disabled { cursor: default; } .rs-chip:not(:disabled):active { transform: scale(.94); }
.rs-chip.s-morning { background: #FFF1B8; color: #5C4600; } .rs-chip.s-afternoon { background: #DCEBF7; color: #1F4E7A; } .rs-chip.s-night { background: var(--t-navy, #0D1B2A); color: var(--board, #F2C200); } .rs-chip.s-off { background: #EEF1F4; color: #8A94A3; }
.rs-chip.absent { box-shadow: inset 0 0 0 2px var(--bus-red); }
.rs-key { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0; padding: .8rem 1.25rem 1rem; font-size: .78rem; color: #4A566A; } .rs-key span { display: inline-flex; align-items: center; gap: .4rem; } .rs-key .rs-chip { width: 28px; height: 22px; font-size: .7rem; cursor: default; }
.rs-train { list-style: none; margin: 0; padding: .4rem 1.25rem; }
.rs-train li { display: grid; gap: .35rem; padding: .6rem 0; border-bottom: 1px solid var(--line); } .rs-train li > b { font-weight: 650; font-size: .88rem; }
.rs-train li > span { display: flex; flex-wrap: wrap; gap: .3rem; }
.rs-cert { padding: .12rem .5rem; border-radius: 999px; font: 600 .7rem/1.5 var(--sans); background: #E8F4EC; color: var(--route-green); }
.rs-cert.expiring { background: #FFF4DB; color: #8A5A00; } .rs-cert.expired { background: var(--red-50); color: #A10E26; }
.rs-add { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto; align-items: center; border-top: 1px solid var(--line); }
.rs-add select, .rs-add input { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 .5rem; font: inherit; font-size: .82rem; background: #fff; min-width: 0; }
@media (max-width: 640px) { .rs-add { grid-template-columns: 1fr 1fr; } }
.nb-dig-2 { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed #D3DED6; }
html[data-theme="dark"] :is(.cr-call, .cr-opt, .cr-legend) { background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] .cr-call.p1 { background: rgb(200 16 46 / .08); } html[data-theme="dark"] .cr-call.s-en_route { background: rgb(217 154 11 / .07); } html[data-theme="dark"] .cr-call.s-on_scene { background: rgb(11 107 58 / .1); }
html[data-theme="dark"] :is(.cr-call > header b, .an-cam > b, .an-nums b, .rs-table tbody th b) { color: #fff; } html[data-theme="dark"] :is(.cr-call p, .cr-st) { color: var(--ink-2); }
html[data-theme="dark"] :is(.rs-table thead th) { background: rgb(255 255 255 / .04); } html[data-theme="dark"] :is(.rs-table th, .rs-table td, .rs-train li, .an-feed li) { border-color: var(--line); }
html[data-theme="dark"] .rs-chip.s-off { background: rgb(255 255 255 / .06); } html[data-theme="dark"] .rs-chip.s-night { background: var(--board, #F2C200); color: var(--t-navy, #0D1B2A); }
html[data-theme="dark"] .rs-add :is(select, input), html[data-theme="dark"] .cr-closef input[name=outcome] { background: var(--field); border-color: var(--line); color: var(--ink); }

/* ======================================================================
   IGP command centre. Dark navy ground with surface steps for depth, one
   lit colour (board yellow) for the active thing, route green / bus red
   for good / bad. Every panel cross-filters; numbers roll; the trend scrubs.
   ====================================================================== */
body.ig-body { background: #060D18; color-scheme: dark; }
.ig { --g0: #060D18; --g1: #0B1626; --g2: #102035; --g3: #172B45; --ln: rgb(255 255 255 / .08); --ink: #E8EEF6; --mute: #8E9BB0; --lit: var(--board, #F2C200); --ok: #3FBF7F; --bad: #FF5A5F;
  min-height: 100dvh; display: flex; flex-direction: column; color: var(--ink); background: radial-gradient(900px 420px at 80% -10%, rgb(43 138 203 / .14), transparent 70%), var(--g0); }
.ig.busy .ig-main { opacity: .72; transition: opacity 160ms; } .ig .ig-main { transition: opacity 260ms; }
.ig-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem clamp(1rem, 2.6vw, 2rem); padding-top: max(.7rem, env(safe-area-inset-top)); background: rgb(6 13 24 / .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--ln); }
.ig-id { display: flex; align-items: center; gap: .7rem; min-width: 0; } .ig-id span { display: grid; min-width: 0; }
.ig-id small { font: 700 .6rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); } .ig-id b { font: 700 1.02rem/1.25 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-ctl { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; justify-content: flex-end; }
.ig-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--g1); border: 1px solid var(--ln); }
.ig-seg button { appearance: none; border: 0; background: none; color: var(--mute); font: 650 .78rem var(--sans); padding: .4rem .65rem; border-radius: 7px; min-height: 34px; cursor: pointer; transition: background-color 160ms var(--ease-out), color 160ms; }
.ig-seg [aria-pressed="true"] { background: var(--g3); color: #fff; }
@media (hover: hover) and (pointer: fine) { .ig-seg button:not([aria-pressed="true"]):hover { color: #fff; } .ig-btn:hover, .ig-present:hover { background: var(--g3); } }
.ig-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--ln); background: var(--g1); color: var(--ink); cursor: pointer; transition: background-color 160ms, transform 120ms var(--ease-out); } .ig-btn:active { transform: scale(.96); }
.ig-present { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: 0 .9rem; border-radius: 10px; border: 1px solid rgb(242 194 0 / .5); background: var(--g1); color: var(--lit); font: 700 .82rem var(--sans); cursor: pointer; transition: background-color 160ms, transform 120ms var(--ease-out); }
.ig-present:active { transform: scale(.97); } .ig-present.on { background: var(--lit); color: #0A0A0A; }
.ig-filters { display: flex; gap: .35rem; } .ig-filters:empty { display: none; }
.ig-chip { display: inline-flex; align-items: center; gap: .35rem; min-height: 34px; padding: 0 .7rem; border-radius: 999px; border: 0; background: var(--lit); color: #0A0A0A; font: 700 .78rem var(--sans); cursor: pointer; animation: ig-in 260ms var(--ease-out); }
@keyframes ig-in { from { opacity: 0; transform: translateY(-4px) scale(.96); } }
.ig-main { width: min(1440px, 100%); margin: 0 auto; padding: clamp(1rem, 2.4vw, 1.8rem) clamp(.8rem, 2.6vw, 2rem) 1.5rem; display: grid; gap: 1rem; flex: 1; }
/* hero: the headline and four rolling figures */
.ig-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.6fr); gap: 1rem 2rem; align-items: end; padding: .4rem 0 .6rem; }
@media (max-width: 1100px) { .ig-hero { grid-template-columns: 1fr; } }
.ig-live { display: inline-flex; align-items: center; gap: .4rem; font: 800 .66rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ok); }
.ig-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.ig-head h1 { margin: .45rem 0 .35rem; font: 700 clamp(1.6rem, 2.9vw, 2.45rem)/1.12 var(--display); letter-spacing: -.015em; color: #fff; text-wrap: balance; }
.ig-head p { margin: 0; color: var(--mute); font-size: .9rem; }
.ig-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--g1); border: 1px solid var(--ln); border-radius: 16px; overflow: hidden; }
@media (max-width: 760px) { .ig-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ig-kpi:nth-child(3) { border-left: 0; } .ig-kpi:nth-child(n+3) { border-top: 1px solid var(--ln); } }
.ig-kpi { padding: 1rem 1.1rem 1.05rem; display: grid; gap: .3rem; align-content: start; } .ig-kpi + .ig-kpi { border-left: 1px solid var(--ln); }
.ig-kpi-l { font: 700 .66rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.ig-kpi-v { display: flex; align-items: baseline; gap: .2rem; font: 700 clamp(1.7rem, 2.8vw, 2.4rem)/1 var(--display); color: #fff; } .ig-kpi-v small { font: 700 .9rem var(--sans); color: var(--mute); }
.ig-kpi-f { font-size: .76rem; color: var(--mute); line-height: 1.35; } .ig-kpi-f.bad { color: var(--bad); } .ig-kpi-f.good { color: var(--ok); }
/* rolling digits */
.rl { display: inline-flex; font-variant-numeric: tabular-nums lining-nums; }
.rl-d { display: inline-block; height: 1em; overflow: hidden; line-height: 1; }
.rl-d > span { display: flex; flex-direction: column; transition: transform 560ms cubic-bezier(.45, 0, .1, 1); } .rl-d i { display: block; height: 1em; font-style: normal; }
.rl-c { display: inline-block; }
/* grid */
.ig-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
.ig-card { background: var(--g1); border: 1px solid var(--ln); border-radius: 16px; padding: 1rem 1.1rem 1.1rem; min-width: 0; position: relative; }
.ig-card > header { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem 1rem; margin-bottom: .8rem; flex-wrap: wrap; }
.ig-card h2 { margin: 0; font: 700 1rem/1.25 var(--display); color: #fff; } .ig-card header p { margin: .15rem 0 0; font-size: .78rem; color: var(--mute); }
.ig-map-card { grid-column: span 8; padding: 0; overflow: hidden; } .ig-map-card > header { position: absolute; z-index: 500; left: 1rem; top: .9rem; right: 1rem; pointer-events: none; text-shadow: 0 1px 8px rgb(0 0 0 / .6); }
.ig-ops { grid-column: span 4; } .ig-trend { grid-column: span 8; } .ig-cats { grid-column: span 4; } .ig-route { grid-column: span 8; } .ig-ready { grid-column: span 4; } .ig-ticker { grid-column: span 12; }
@media (max-width: 1100px) { .ig-map-card, .ig-ops, .ig-trend, .ig-cats, .ig-route, .ig-ready { grid-column: span 12; } }
.ig-map { height: 440px; background: #0A121E; } .ig-map .leaflet-control-attribution { background: rgb(6 13 24 / .7); color: var(--mute); } .ig-map .leaflet-control-attribution a { color: var(--mute); }
@media (max-width: 640px) { .ig-map { height: 340px; } }
.ig-pin { width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-content: center; text-align: center; gap: 0; padding: 0; border: 2px solid rgb(255 255 255 / .85); background: rgb(23 43 69 / .92); color: #fff; cursor: pointer; box-shadow: 0 0 0 6px rgb(43 138 203 / .14), 0 6px 16px rgb(0 0 0 / .45); transition: transform 220ms var(--ease-out), background-color 220ms, opacity 220ms; }
.ig-pin b { font: 700 .82rem/1 var(--display); } .ig-pin span { font: 700 .5rem/1.2 var(--mono); color: #C9D6E8; letter-spacing: .06em; }
.ig-pin.warn { border-color: #FF9EA1; } .ig-pin.on { background: var(--lit); color: #0A0A0A; border-color: #fff; transform: scale(1.12); } .ig-pin.on span { color: #3A2E00; } .ig-pin.dim { opacity: .45; }
@media (hover: hover) and (pointer: fine) { .ig-pin:not(.on):hover { transform: scale(1.08); } }
.ig-drawer { position: absolute; z-index: 600; right: 1rem; bottom: 1rem; width: min(300px, calc(100% - 2rem)); padding: .9rem 1rem; border-radius: 14px; background: rgb(11 22 38 / .94); border: 1px solid rgb(242 194 0 / .5); backdrop-filter: blur(10px); transform: translateY(12px); opacity: 0; pointer-events: none; transition: transform 320ms var(--ease-out), opacity 240ms; }
.ig-drawer.open { transform: none; opacity: 1; pointer-events: auto; }
.ig-drawer header { display: flex; justify-content: space-between; align-items: center; } .ig-drawer header b { font: 700 1rem var(--display); color: #fff; } .ig-drawer small { color: var(--mute); }
.ig-drawer dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .7rem 0 0; } .ig-drawer dt { font-size: .66rem; color: var(--mute); line-height: 1.25; } .ig-drawer dd { margin: .15rem 0 0; font: 700 1.3rem var(--display); color: #fff; } .ig-drawer dd.bad { color: var(--bad); }
.ig-x { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 0; background: var(--g3); color: #fff; cursor: pointer; }
.ig-count { min-width: 26px; height: 26px; padding: 0 .5rem; border-radius: 999px; background: var(--lit); color: #0A0A0A; display: inline-grid; place-items: center; font: 800 .76rem var(--sans); }
.ig-h3 { display: flex; align-items: center; gap: .35rem; margin: .9rem 0 .45rem; font: 800 .64rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); } .ig-h3:first-child { margin-top: 0; }
.ig-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.ig-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .55rem .65rem; border-radius: 10px; background: var(--g2); font-size: .82rem; }
.ig-list li span:not(.plate):not(.ig-pri) { display: grid; min-width: 0; } .ig-list b { font-weight: 650; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ig-list small { color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-list em { font-style: normal; font: 700 .68rem var(--sans); color: var(--mute); white-space: nowrap; } .ig-list em.s-new { color: var(--bad); } .ig-list em.s-en_route { color: var(--lit); } .ig-list em.s-on_scene { color: var(--ok); }
.ig-pri { font: 800 .66rem var(--mono); padding: .18rem .4rem; border-radius: 6px; background: var(--g3); color: #fff; } .p1 .ig-pri, .ig-hold .ig-pri { background: var(--bad); }
.ig-anpr.interpol_smv { box-shadow: inset 0 0 0 1px rgb(255 90 95 / .45); } .ig-anpr { grid-template-columns: auto minmax(0, 1fr) !important; }
.ig-empty { display: flex; align-items: center; gap: .35rem; margin: 0; padding: .5rem 0; color: var(--ok); font-size: .8rem; }
.ig-big { font: 700 2rem/1 var(--display); color: var(--lit); }
.ig-svg { display: block; width: 100%; height: auto; touch-action: pan-y; cursor: crosshair; }
.ig-grid line.ig-grid, .ig-svg .ig-grid { stroke: rgb(255 255 255 / .06); } .ig-tick { font: 500 11px var(--sans); fill: var(--mute); }
.ig-line { fill: none; stroke: var(--lit); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; } .ig-area { fill: rgb(242 194 0 / .08); }
.ig-hair { stroke: rgb(255 255 255 / .5); stroke-width: 1; } .ig-dot { fill: var(--lit); stroke: #060D18; stroke-width: 2.5; }
.ig-scrub { transition: opacity 160ms; }
.ig-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.ig-bar { width: 100%; display: grid; grid-template-columns: minmax(6.5rem, 9rem) minmax(0, 1fr) 2.6rem; align-items: center; gap: .6rem; padding: .42rem .5rem; border-radius: 9px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: .82rem; text-align: left; cursor: pointer; transition: background-color 160ms var(--ease-out), opacity 200ms; }
.ig-bar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ig-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.ig-bar-t { height: 8px; border-radius: 0 4px 4px 0; background: rgb(255 255 255 / .06); overflow: hidden; } .ig-bar-t i { display: block; height: 100%; background: #6F8CB8; border-radius: 0 4px 4px 0; transition: width 520ms cubic-bezier(.45, 0, .1, 1), background-color 200ms; }
.ig-bar.on { background: var(--g3); } .ig-bar.on .ig-bar-t i { background: var(--lit); } .ig-bar.dim { opacity: .5; }
@media (hover: hover) and (pointer: fine) { .ig-bar:hover { background: var(--g2); } }
.ig-bar:focus-visible, .ig-pin:focus-visible, .ig-seg button:focus-visible, .ig-chip:focus-visible, .ig-present:focus-visible { outline: 2px solid var(--lit); outline-offset: 2px; }
.ig-route .route { margin: 0; }
.ig-meters { display: grid; gap: .8rem; }
.ig-meter { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: .8rem; align-items: center; }
.ig-ring { --p: 0; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ok) calc(var(--p) * 1%), rgb(255 255 255 / .08) 0); position: relative; transition: --p 600ms; }
.ig-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--g1); } .ig-ring b { position: relative; font: 700 .82rem var(--display); color: #fff; }
.ig-meter-t { display: grid; } .ig-meter-t b { font-weight: 650; font-size: .86rem; color: #fff; } .ig-meter-t small { color: var(--mute); font-size: .76rem; }
.ig-ticker ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .5rem; }
.ig-ticker li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .6rem; padding: .55rem .7rem; border-radius: 10px; background: var(--g2); font-size: .8rem; }
.ig-ticker time { grid-row: span 2; font: 700 .76rem var(--mono); color: var(--lit); } .ig-ticker b { font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ig-ticker span { color: var(--mute); font-size: .74rem; }
.ig-chain { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; color: var(--ok); }
.ig-foot { padding: .9rem clamp(1rem, 2.6vw, 2rem) calc(1rem + env(safe-area-inset-bottom)); color: var(--mute); font-size: .76rem; border-top: 1px solid var(--ln); }
/* the briefing cursor and its caption */
.ig-cursor { position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .45)); margin: -3px 0 0 -4px; }
.ig-cursor.out { opacity: 0; transition: opacity 300ms; }
.ig-tap { position: absolute; left: -10px; top: -10px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--lit, var(--board, #F2C200)); opacity: 0; transform: scale(.4); background: none; }
.ig-cursor.press svg { animation: ig-press 220ms var(--ease-out); } .ig-cursor.press .ig-tap { animation: ig-ripple 520ms var(--ease-out); }
@keyframes ig-press { 50% { transform: scale(.86); } } @keyframes ig-ripple { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.6); } }
.ig-caption { position: fixed; z-index: 9998; max-width: 360px; padding: .6rem .8rem; border-radius: 10px; background: var(--board, #F2C200); color: #0A0A0A; font: 650 .86rem/1.4 var(--sans); box-shadow: 0 10px 30px rgb(0 0 0 / .45); opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out), left 500ms cubic-bezier(.45, 0, .1, 1), top 500ms cubic-bezier(.45, 0, .1, 1); }
.ig-caption.on { opacity: 1; transform: none; }
@media (max-width: 720px) { .ig-bar { flex-wrap: wrap; position: static; } .ig-ctl { width: 100%; justify-content: space-between; } .ig-present span { display: none; } .ig-id b { font-size: .92rem; } }
@media (prefers-reduced-motion: reduce) { .rl-d > span, .ig-bar-t i, .ig-pin, .ig-drawer { transition: none; } .ig-chip { animation: none; } }
.ig-id { flex: 0 1 auto; min-width: 230px; } .ig-id small { white-space: nowrap; } .ig-ctl { flex: 1 1 auto; }
.ig-map-card { display: flex; flex-direction: column; } .ig-map { flex: 1; min-height: 440px; height: auto; }
@media (max-width: 640px) { .ig-map { min-height: 340px; } }
.ig-more { margin: .4rem 0 0; font-size: .76rem; color: var(--mute); }
.ig-caption { left: 50% !important; top: auto !important; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 8px); max-width: min(560px, calc(100vw - 32px)); text-align: center; font-size: .95rem; padding: .75rem 1.1rem; }
.ig-caption.on { transform: translate(-50%, 0); }
.ig-seg button { white-space: nowrap; }
@media (max-width: 720px) {
  .ig-bar { display: grid; grid-template-columns: 1fr; gap: .6rem; }
  .ig-id { min-width: 0; }
  .ig-ctl { width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: .4rem; }
  .ig-ctl > .ig-seg:first-child { flex: 1 1 100%; } .ig-ctl > .ig-seg:first-child button { flex: 1; padding: .4rem .3rem; }
  .ig-ctl > .ig-seg:first-child { display: flex; }
  .ig-present { flex: 1; justify-content: center; } .ig-present span { display: inline; }
}

/* ======================================================================
   Sentiment radar. Diverging mood: negative bus red, neutral slate,
   positive route green. Alerts by level: critical red, warning amber,
   watch AXURE blue.
   ====================================================================== */
.sm-gov { display: flex; gap: .5rem; align-items: flex-start; margin: 0 0 1rem; padding: .65rem .9rem; border-radius: 12px; background: #F2F6F3; border: 1px solid rgb(11 107 58 / .2); color: #24342A; font-size: .82rem; line-height: 1.45; }
.sm-gov svg { flex: none; color: var(--route-green); margin-top: 2px; }
.sm-ledger .dk-l b { font-weight: 700; margin-left: .3rem; } .sm-ledger .dk-l b.down { color: var(--bus-red); } .sm-ledger .dk-l b.up { color: var(--route-green); }
.sm-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: -.4rem 0 1rem; font-size: .8rem; color: #4A566A; }
.sm-chip { display: inline-flex; align-items: center; gap: .3rem; min-height: 30px; padding: 0 .65rem; border-radius: 999px; border: 0; background: var(--t-navy, #0D1B2A); color: #fff; font: 650 .76rem var(--sans); cursor: pointer; }
.sm-top { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.2rem; margin-bottom: 1.2rem; align-items: start; }
.sm-feedwrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.2rem; align-items: start; }
@media (max-width: 1100px) { .sm-top, .sm-feedwrap { grid-template-columns: 1fr; } }
.sm-side { display: grid; gap: 1.2rem; }
.sm-alerts { padding: .8rem; display: grid; gap: .7rem; max-height: 760px; overflow: auto; }
.sm-alert { border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; display: grid; gap: .55rem; background: #fff; }
.sm-alert.l-critical { border-color: rgb(200 16 46 / .4); background: #FFFAFA; } .sm-alert.l-warning { border-color: rgb(217 154 11 / .45); background: #FFFCF4; } .sm-alert.l-watch { border-color: rgb(43 138 203 / .35); background: #F8FBFE; }
.sm-alert.s-closed { opacity: .6; }
.sm-alert > header { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.sm-alert h3 { margin: 0; flex: 1; font-size: 1rem; color: var(--t-navy, #0D1B2A); } .sm-alert h3 span { color: #4A566A; font-weight: 600; }
.sm-lv { padding: .2rem .55rem; border-radius: 6px; font: 800 .66rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--bus-red); }
.l-warning .sm-lv { background: #B7791F; } .l-watch .sm-lv { background: var(--ax-blue-d); }
.sm-ast { font: 700 .7rem var(--sans); color: #4A566A; }
.sm-why { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.sm-why li { padding: .2rem .55rem; border-radius: 999px; background: rgb(13 27 42 / .06); font-size: .76rem; color: #334155; } .sm-why b { color: var(--t-navy, #0D1B2A); }
.sm-samples { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.sm-samples li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem; align-items: start; font-size: .82rem; color: #1E2A3D; cursor: pointer; border-radius: 8px; padding: .3rem .35rem; transition: background-color 140ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .sm-samples li:hover { background: rgb(13 27 42 / .05); } }
.sm-acts { font-size: .82rem; } .sm-acts b { display: block; font: 700 .7rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #4A566A; margin-bottom: .25rem; }
.sm-acts ol { margin: 0; padding-left: 1.1rem; display: grid; gap: .15rem; color: #1E2A3D; }
.sm-alert > footer { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; padding-top: .5rem; border-top: 1px dashed var(--line); }
.sm-log { margin-left: auto; font-size: .72rem; color: #5B6779; }
.sm-score { display: inline-grid; place-items: center; min-width: 38px; height: 24px; padding: 0 .35rem; border-radius: 6px; font: 800 .74rem var(--mono); font-variant-numeric: tabular-nums; background: #EEF1F4; color: #475569; }
.sm-score.neg { background: var(--red-50); color: #A10E26; } .sm-score.pos { background: #E8F4EC; color: var(--route-green); }
.sm-gcard { --sm-track: #E6EBF1; color: var(--t-navy, #0D1B2A); } .sm-gauge { display: block; width: 100%; max-width: 260px; margin: .6rem auto 0; }
.sm-needle { transform-origin: 110px 110px; transition: transform 900ms cubic-bezier(.45, 0, .1, 1); }
.sm-gv { font: 700 30px var(--display); fill: var(--t-navy, #0D1B2A); } .sm-gv.neg { fill: var(--bus-red); } .sm-gv.pos { fill: var(--route-green); }
.sm-gfoot { margin: 0; padding: 0 1.1rem 1rem; text-align: center; font-size: .74rem; color: #5B6779; }
.sm-int { margin: 0; padding: .4rem 1.1rem; } .sm-int div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .84rem; }
.sm-int dd { margin: 0; font-weight: 700; color: var(--t-navy, #0D1B2A); font-variant-numeric: tabular-nums; } .sm-int small { font-weight: 500; color: #5B6779; }
.sm-note { margin: 0; padding: .7rem 1.1rem 1rem; font-size: .76rem; color: #4A566A; }
.sm-heat { overflow-x: auto; padding: .4rem .8rem 1rem; }
.sm-heat table { border-collapse: separate; border-spacing: 3px; width: 100%; }
.sm-heat th { text-align: left; white-space: nowrap; padding-right: .5rem; font-weight: 500; }
.sm-heat th button { border: 0; background: none; padding: 0; font: 650 .8rem var(--sans); color: var(--t-navy, #0D1B2A); cursor: pointer; text-align: left; }
.sm-heat th small { display: block; font-size: .68rem; color: #5B6779; }
.sm-heat tr.on th button { color: var(--ax-blue-d); text-decoration: underline; text-underline-offset: 3px; }
.sm-heat td { padding: 0; } .sm-heat td i { display: block; min-width: 14px; height: 22px; border-radius: 4px; background: #E6EBF1; position: relative; overflow: hidden; }
.sm-heat td i::after { content: ""; position: absolute; inset: 0; opacity: var(--a); }
.h-neg::after { background: var(--bus-red, #C8102E); } .h-mid::after { background: #D99A0B; } .h-pos::after { background: #2B6CB0; }
.sm-map { height: 330px; } .sm-mapcard { overflow: hidden; }
.sm-pin { width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; border: 2px solid #fff; color: #fff; font: 700 .72rem var(--sans); cursor: pointer; box-shadow: 0 3px 10px rgb(0 0 0 / .3); transition: transform 180ms var(--ease-out); }
.sm-pin.neg { background: rgb(200 16 46 / .88); } .sm-pin.mid { background: rgb(183 121 31 / .9); } .sm-pin.pos { background: rgb(43 108 176 / .88); } .sm-pin.on { box-shadow: 0 0 0 4px var(--board, #F2C200), 0 3px 10px rgb(0 0 0 / .3); }
@media (hover: hover) and (pointer: fine) { .sm-pin:hover { transform: scale(1.08); } }
.sm-legend { display: inline-flex; align-items: center; gap: .35rem; font-size: .74rem; color: #4A566A; } .sm-legend i { width: 10px; height: 10px; border-radius: 3px; margin-left: .5rem; }
.sm-charts { padding: .6rem 1.1rem 1rem; } .sm-bars, .sm-line { display: block; width: 100%; height: auto; }
.b-neg { fill: var(--bus-red, #C8102E); fill-opacity: .82; } .b-neu { fill: #94A3B8; fill-opacity: .55; } .b-pos { fill: var(--route-green, #0B6B3A); fill-opacity: .8; }
.sm-legend .b-neg { background: var(--bus-red, #C8102E); } .sm-legend .b-neu { background: #94A3B8; } .sm-legend .b-pos { background: var(--route-green, #0B6B3A); }
.sm-tick { font: 500 10px var(--sans); fill: #5B6779; } .sm-ctitle { margin: .8rem 0 .2rem; font: 700 .7rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #5B6779; }
.sm-zero { stroke: #CBD5E1; stroke-dasharray: 3 4; } .sm-path { fill: none; stroke: var(--t-navy, #0D1B2A); stroke-width: 2; stroke-linejoin: round; } .sm-pt { fill: var(--t-navy, #0D1B2A); }
.sm-ff { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.sm-ff input[type=search], .sm-ff select { min-height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 .55rem; font: inherit; font-size: .8rem; background: #fff; color: inherit; }
.sm-ff input[type=search] { width: 150px; } .sm-tog { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; }
.sm-items { list-style: none; margin: 0; padding: 0; max-height: 820px; overflow: auto; }
.sm-items li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .75rem; align-items: start; padding: .75rem 1.1rem; border-top: 1px solid var(--line); cursor: pointer; transition: background-color 140ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .sm-items li:hover { background: #F7F9FB; } }
.sm-items li:focus-visible { outline: 2px solid var(--ax-blue); outline-offset: -2px; }
.sm-items li.hot { box-shadow: inset 0 0 0 1px rgb(200 16 46 / .25); background: #FFFBFB; }
.sm-items b { display: block; font-weight: 600; font-size: .9rem; color: var(--t-navy, #0D1B2A); line-height: 1.35; }
.sm-meta { display: block; margin-top: .2rem; font-size: .74rem; color: #5B6779; } .sm-meta em { color: #A10E26; font-style: normal; font-weight: 700; }
.sm-src { display: inline-block; margin-right: .35rem; padding: 0 .35rem; border-radius: 4px; font: 700 .62rem/1.6 var(--sans); text-transform: uppercase; letter-spacing: .06em; background: #E6F1FA; color: #1F5F8F; } .sm-src.social { background: #F1EDF8; color: #5B3A8E; }
.sm-tags { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .35rem; } .sm-tags button { border: 0; padding: .1rem .45rem; border-radius: 999px; background: rgb(13 27 42 / .06); font: 600 .68rem var(--sans); color: #334155; cursor: pointer; }
.sm-r { font: 800 .76rem var(--mono); color: #5B6779; min-width: 26px; text-align: right; } .hot .sm-r { color: var(--bus-red); }
.sm-watch { list-style: none; margin: 0; padding: .4rem 1.1rem; display: grid; gap: .3rem; } .sm-watch li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .5rem; align-items: center; font-size: .84rem; }
.sm-wq { border: 0; background: none; padding: 0; font: 600 .84rem var(--sans); color: var(--ax-blue-d); text-align: left; cursor: pointer; }
.sm-watch .ig-x { width: 24px; height: 24px; background: #EEF1F4; color: #334155; }
.sm-addw, .sm-play { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; padding: .6rem 1.1rem 1rem; } .sm-play { grid-template-columns: 1fr; }
.sm-addw input, .sm-play textarea { border: 1px solid var(--line); border-radius: 8px; padding: .45rem .55rem; font: inherit; font-size: .84rem; min-width: 0; resize: vertical; }
[data-playout] { padding: 0 1.1rem 1rem; } .sm-pres { font-size: .84rem; } .sm-pres p { margin: .4rem 0; display: flex; flex-wrap: wrap; gap: .25rem; } .sm-pres small { color: #5B6779; }
.sm-w { padding: .1rem .4rem; border-radius: 5px; font-size: .76rem; } .sm-w.neg { background: var(--red-50); color: #8E1022; } .sm-w.pos { background: #E8F4EC; color: var(--route-green); }
.sm-srcs { list-style: none; margin: 0; padding: .4rem 1.1rem 1rem; display: grid; gap: .5rem; }
.sm-srcs li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: .55rem; align-items: center; font-size: .8rem; }
.sm-srcs b { font-weight: 650; color: var(--t-navy, #0D1B2A); } .sm-srcs small { display: block; color: #5B6779; font-size: .7rem; } .sm-n { font-variant-numeric: tabular-nums; }
.sm-dot { width: 9px; height: 9px; border-radius: 50%; background: #CBD5E1; } .sm-dot.ok { background: var(--route-green); } .sm-dot.bad { background: var(--bus-red); } .sm-dot.sim { background: #8B6FC6; }
.sm-detail { display: grid; gap: 1rem; } .sm-dtitle { font: 650 1.05rem/1.4 var(--display); color: var(--t-navy, #0D1B2A); margin: 0; }
.sm-detail mark { padding: 0 .15rem; border-radius: 3px; } .sm-detail mark.neg { background: var(--red-50); color: #8E1022; } .sm-detail mark.pos { background: #E8F4EC; color: var(--route-green); }
.sm-dkv { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .6rem 1rem; margin: 0; } .sm-dkv dt { font: 700 .66rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #5B6779; } .sm-dkv dd { margin: .15rem 0 0; font-size: .86rem; }
.sm-risk { display: inline-block; width: 90px; height: 8px; border-radius: 8px; background: #E6EBF1; overflow: hidden; vertical-align: middle; } .sm-risk i { display: block; height: 100%; background: var(--bus-red); }
.sm-why2 b { font: 700 .7rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #5B6779; } .sm-why2 p { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0; } .sm-why2 small { color: #5B6779; }
.sm-review { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .84rem; }
.sm-review select { min-height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 .4rem; font: inherit; }
html[data-theme="dark"] .sm-gov { background: rgb(11 107 58 / .12); color: var(--ink-2); border-color: rgb(11 107 58 / .3); }
html[data-theme="dark"] :is(.sm-alert, .sm-items li.hot) { background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] .sm-alert.l-critical { background: rgb(200 16 46 / .08); } html[data-theme="dark"] .sm-alert.l-warning { background: rgb(217 154 11 / .07); } html[data-theme="dark"] .sm-alert.l-watch { background: rgb(43 138 203 / .07); }
html[data-theme="dark"] :is(.sm-alert h3, .sm-items b, .sm-int dd, .sm-srcs b, .sm-heat th button, .sm-dtitle) { color: #fff; } html[data-theme="dark"] .sm-gcard { --sm-track: rgb(255 255 255 / .1); color: #fff; } html[data-theme="dark"] .sm-gv { fill: #fff; }
html[data-theme="dark"] :is(.sm-why li, .sm-tags button) { background: rgb(255 255 255 / .07); color: var(--ink-2); } html[data-theme="dark"] .sm-heat td i { background: rgb(255 255 255 / .06); }
html[data-theme="dark"] :is(.sm-ff input, .sm-ff select, .sm-addw input, .sm-play textarea, .sm-review select) { background: var(--field); border-color: var(--line); color: var(--ink); }
html[data-theme="dark"] .sm-path, html[data-theme="dark"] .sm-pt { stroke: #E8EEF6; fill: none; } html[data-theme="dark"] .sm-pt { fill: #E8EEF6; }
.dg-seg > button, .dg-seg > a { color: #334155; } .dg-seg > [aria-pressed="true"], .dg-seg > [aria-current="true"] { background: var(--t-navy, #0D1B2A); color: #fff; }
html[data-theme="dark"] .dg-seg > button, html[data-theme="dark"] .dg-seg > a { color: var(--ink-2); } html[data-theme="dark"] .dg-seg > [aria-pressed="true"] { background: #fff; color: var(--t-navy, #0D1B2A); }

/* ---- Reports ---- */
.rp-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 1000px) { .rp-grid { grid-template-columns: 1fr; } }
.rp-cat { display: grid; gap: 1rem; position: sticky; top: 1rem; } @media (max-width: 1000px) { .rp-cat { position: static; } }
.rp-cat h3 { display: flex; align-items: center; gap: .35rem; margin: 0 0 .4rem; font: 800 .66rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #5B6779; }
.rp-cat ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.rp-type { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: .65rem; align-items: start; padding: .6rem .65rem; border-radius: 12px; border: 1px solid transparent; background: transparent; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: background-color 160ms var(--ease-out), border-color 160ms, transform 120ms var(--ease-out); }
.rp-type:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .rp-type:hover { background: #F5F8FB; } }
.rp-type[aria-pressed="true"] { background: #fff; border-color: var(--t-navy, #0D1B2A); box-shadow: 0 1px 2px rgb(16 24 40 / .06), 0 6px 16px -10px rgb(13 27 42 / .4); }
.rp-type b { display: block; font-weight: 650; font-size: .88rem; color: var(--t-navy, #0D1B2A); } .rp-type small { display: block; font-size: .74rem; color: #5B6779; line-height: 1.35; margin-top: .1rem; }
.rp-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--t-navy, #0D1B2A); color: var(--board); } .rp-ic.big { width: 56px; height: 56px; border-radius: 16px; }
.rp-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; align-items: end; padding: 1rem 1.1rem; margin-bottom: 1rem; }
.rp-presets { grid-column: 1 / -1; width: max-content; max-width: 100%; flex-wrap: wrap; }
.rp-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; } .rp-actions[hidden] { display: none; }
.rp-empty { display: grid; justify-items: center; gap: .5rem; padding: 3rem 1rem; text-align: center; color: #4A566A; } .rp-empty b { color: var(--t-navy, #0D1B2A); } .rp-empty p { margin: 0; font-size: .88rem; }
[data-out].rp-in .rp-sheet { animation: rp-rise 420ms var(--ease-out) both; } @keyframes rp-rise { from { opacity: 0; transform: translateY(10px); } }
.rp-sheet { max-width: none; padding: 1.6rem 1.8rem; }
.rp-meta { margin: .8rem 0 1rem; }
.rp-find { padding: .9rem 1rem; border-radius: 6px; background: rgb(255 255 255 / .65); border: 1px solid #C8D6CC; margin-bottom: 1rem; }
.rp-find h3 { margin: 0 0 .4rem; font: 700 .9rem var(--display); color: var(--pp-navy); } .rp-find ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .25rem; font-size: .9rem; color: #1C2B24; }
.rp-viz { margin-bottom: 1rem; }
.rp-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.rp-bars li { display: grid; grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr) 4.5rem; gap: .7rem; align-items: center; font-size: .84rem; }
.rp-bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1C2B24; } .rp-bars b { text-align: right; font-variant-numeric: tabular-nums; color: var(--pp-navy); }
.rp-bt { height: 12px; background: #E2ECE4; border-radius: 0 4px 4px 0; overflow: hidden; } .rp-bt i { display: block; height: 100%; background: var(--pp-navy); border-radius: 0 4px 4px 0; animation: dk-grow 600ms var(--ease-out) both; transform-origin: left; }
.rp-chart { display: block; width: 100%; height: auto; } .rp-axis { stroke: #C8D6CC; } .rp-line { fill: none; stroke: var(--pp-navy); stroke-width: 2; } .rp-area { fill: rgb(19 41 75 / .08); } .rp-dot { fill: var(--pp-navy); } .rp-tick { font: 500 10px var(--sans); fill: #4A5B52; }
.rp-table { width: 100%; border-collapse: collapse; font-size: .84rem; background: rgb(255 255 255 / .7); }
.rp-table th { text-align: left; padding: .55rem .6rem; font: 700 .66rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--pp-navy); }
.rp-table td { padding: .5rem .6rem; border-bottom: 1px solid #D3DED6; } .rp-table .n { text-align: right; font-variant-numeric: tabular-nums; }
.rp-table tfoot td { font-weight: 700; border-top: 2px solid var(--pp-navy); color: var(--pp-navy); }
.rp-roles { border: 0; margin: 0; padding: 0; display: grid; gap: .35rem; } .rp-roles legend { font-weight: 650; font-size: .86rem; margin-bottom: .3rem; }
.rp-history { margin-top: 1.2rem; }
@media print {
  body.rp-printing * { visibility: hidden !important; }
  body.rp-printing #rp-print, body.rp-printing #rp-print * { visibility: visible !important; }
  body.rp-printing #rp-print { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; border: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
html[data-theme="dark"] .rp-type[aria-pressed="true"] { background: var(--surface); border-color: rgb(255 255 255 / .3); } html[data-theme="dark"] .rp-type b, html[data-theme="dark"] .rp-empty b { color: #fff; }
.field[hidden] { display: none !important; }

/* ======================================================================
   Interaction polish (emil-design-eng): transitions over keyframes for
   anything triggered repeatedly, ease-out for entrances, faster exits,
   press feedback on everything pressable, hover only on fine pointers,
   one focus ring, reduced motion keeps fades and drops movement.
   ====================================================================== */
:root { --ease-out: cubic-bezier(.23, 1, .32, 1); --ease-in-out: cubic-bezier(.77, 0, .175, 1); --ease-drawer: cubic-bezier(.32, .72, 0, 1); }
/* toasts: enter with @starting-style, leave with a transition (interruptible) */
.toast { animation: none; transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out); }
@starting-style { .toast { opacity: 0; transform: translateY(12px) scale(.98); } }
.toast.leave { animation: none; opacity: 0; transform: translateY(8px) scale(.98); transition-duration: 180ms; }
/* dialogs: centred (not origin-aware), enter 220ms, exit 150ms; the backdrop fades with them */
dialog[open] { animation: pop 220ms var(--ease-out); }
dialog[open]::backdrop { animation: bd-in 220ms var(--ease-out); }
dialog[data-closing] { animation: pop-out 150ms var(--ease-out) forwards; }
dialog[data-closing]::backdrop { animation: bd-out 150ms var(--ease-out) forwards; }
@keyframes pop-out { to { opacity: 0; transform: scale(.97) translateY(4px); } }
@keyframes bd-in { from { opacity: 0; } } @keyframes bd-out { to { opacity: 0; } }
@media (max-width: 640px) { dialog.sheet[open] { animation: sheet-in 320ms var(--ease-drawer); } dialog.sheet[data-closing] { animation: sheet-out 200ms var(--ease-out) forwards; } }
@keyframes sheet-in { from { transform: translateY(100%); } } @keyframes sheet-out { to { transform: translateY(100%); } }
/* staff pages: a short, single entrance on navigation (stagger only the first three blocks) */
.ax-main #view.enter > * { animation: rise 220ms var(--ease-out) both; }
.ax-main #view.enter > *:nth-child(2) { animation-delay: 35ms; } .ax-main #view.enter > *:nth-child(3) { animation-delay: 60ms; } .ax-main #view.enter > *:nth-child(n+4) { animation-delay: 80ms; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
/* press feedback on everything pressable */
.ax-nav a, .tabbar a, .chip, .rs-chip, .sm-chip, .ig-chip, .dk-act, .rp-type, .cr-opt, .ig-bar, .sm-tags button { transition-property: transform, background-color, border-color, color, opacity; transition-duration: 160ms; transition-timing-function: var(--ease-out); }
.ax-nav a:active, .tabbar a:active, .chip:active, .sm-chip:active, .ig-chip:active, .sm-tags button:active, .ig-bar:active { transform: scale(.97); }
a.dk-row:active, .sm-items li:active, .list-item:active { background: rgb(13 27 42 / .06); }
/* one focus ring, keyboard only */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--ax-blue, var(--ax-blue, #2B8ACB)); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: fixed; left: 1rem; top: -60px; z-index: 1000; padding: .6rem 1rem; border-radius: 10px; background: var(--t-navy, #0D1B2A); color: #fff; font-weight: 700; transition: top 160ms var(--ease-out); }
.skip-link:focus { top: 1rem; }
/* reduced motion: keep fades that aid comprehension, remove movement */
@media (prefers-reduced-motion: reduce) {
  .ax-main #view.enter > *, dialog[open], dialog.sheet[open] { animation: fade-only 160ms ease both; }
  dialog[data-closing], dialog.sheet[data-closing] { animation: bd-out 120ms ease forwards; }
  .toast, .toast.leave { transform: none !important; }
  .ax-nav a:active, .tabbar a:active, .btn:active, .chip:active { transform: none; }
}
@keyframes fade-only { from { opacity: 0; } }
.ig-sent { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .6rem; align-items: center; padding: .55rem .65rem; border-radius: 10px; background: var(--g2); text-decoration: none; color: inherit; font-size: .82rem; transition: background-color 160ms var(--ease-out); }
.ig-sent span:last-child { display: grid; min-width: 0; } .ig-sent b { color: #fff; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ig-sent small { color: var(--mute); }
.ig-sent .ig-pri.bad { background: var(--bad); }
@media (hover: hover) and (pointer: fine) { .ig-sent:hover { background: var(--g3); } }

/* ---- impeccable polish pass ---- */
/* the desk name now rides the shift board instead of sitting above the greeting */
.dk-shift-name .dk-plate { display: inline-block; margin-right: .6rem; padding: .22rem .5rem .2rem; font-size: .62rem; background: var(--board-ink); color: var(--board); box-shadow: none; vertical-align: .1em; }
/* IGP live status sits in the line under the headline */
.ig-head p { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; } .ig-head p .ig-live { flex: none; }
.ig-head h1 { margin-top: 0; }
/* sign-in feature list: drawn icons instead of 01/02/03 */
.numfeat em { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgb(255 255 255 / .08); color: #8FDB4F; font-style: normal; }
/* public home headline: fewer, balanced lines beside the passport */
.doc-hero h1 { font-size: clamp(2rem, 3.2vw, 2.85rem); line-height: 1.1; text-wrap: balance; max-width: 18ch; }
/* tracking: the other channels, for people without a smartphone */
.trk-ways { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.trk-ways li { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: .7rem; row-gap: .1rem; align-items: center; padding: .9rem 1rem; border-radius: 6px; background: rgb(255 255 255 / .7); border: 1px solid #C8D6CC; }
.trk-ways b { font: 700 1.02rem var(--display); color: var(--pp-navy); font-variant-numeric: tabular-nums; } .trk-ways li > span:last-child { grid-column: 2; font-size: .84rem; color: #33453C; line-height: 1.35; }
.trk-ic { grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--pp-navy); color: #fff; }
@media (max-width: 760px) { .trk-ways { grid-template-columns: 1fr; } }
html[data-theme="dark"] .trk-ways li { background: rgb(255 255 255 / .04); border-color: rgb(255 255 255 / .12); } html[data-theme="dark"] .trk-ways b { color: #fff; } html[data-theme="dark"] .trk-ways li > span:last-child { color: var(--ink-2); }
/* browser surfaces carry the palette: selection, caret, scrollbars, numerals */
::selection { background: rgb(242 194 0 / .45); color: #0A0A0A; }
:where(input, textarea, [contenteditable]) { caret-color: var(--ax-blue, #2B8ACB); accent-color: var(--t-navy, #0D1B2A); }
html { scrollbar-color: #9AA6B6 transparent; }
html[data-theme="dark"] { scrollbar-color: #3A4A60 transparent; }
.ig, .ig * { scrollbar-color: #2A3B55 transparent; }
:where(table, .dk-num, .dk-n, .serial, time, .mono) { font-variant-numeric: tabular-nums lining-nums; }
:where(a) { text-underline-offset: .18em; text-decoration-thickness: from-font; }

/* ======================================================================
   Colour themes (Mandhari ya rangi). Jeshi is the default and defines
   nothing; the others recolour the same tokens, so every surface (rail,
   route board, desk, public document, IGP centre) follows.
   ====================================================================== */
/* Bendera: the national flag. Rail in deep flag green, yellow board, flag blue for action */
html[data-palette="bendera"] {
  --t-navy: #0E4424; --t-navy-2: #082D17; --menu: #0E4424; --menu-2: #082D17;
  --board: #FCD116; --route-green: #1A8B3A; --ax-blue: #0088C2; --ax-blue-d: #006E9C; --ax-green: #1A8B3A;
  --pp-navy: #0E4424; --pp-navy-2: #082D17; --gold: #B58B2A;
}
html[data-palette="bendera"] .ax-side, html[data-palette="bendera"] .ax-mtop { background: linear-gradient(180deg, #0E4424 0%, #082D17 100%); }
html[data-palette="bendera"] .ax-side { background: linear-gradient(90deg, #1EB53A 0 40%, #FCD116 40% 46%, #000 46% 54%, #FCD116 54% 60%, #00A3DD 60% 100%) left bottom / 100% 4px no-repeat, linear-gradient(180deg, #0E4424 0%, #082D17 100%); }
html[data-palette="bendera"] .ig { --g0: #04140A; --g1: #082214; --g2: #0D2E1B; --g3: #154126; --lit: #FCD116; --ok: #3FD26A; }
html[data-palette="bendera"] body.ig-body { background: #04140A; }
/* Usiku: night watch. Dark, warm low-glare ink and amber action, for control rooms and night shifts */
html[data-palette="usiku"] {
  --t-navy: #05070C; --t-navy-2: #030409; --menu: #05070C; --menu-2: #030409;
  --ink: #F1E4C6; --ink-2: #D9C9A6; --muted: #A8977A; --soft: #85765E; --bg: #05070C; --surface: #0B0E16; --field: #10141F;
  --line: rgb(241 228 198 / .1); --line-2: rgb(241 228 198 / .18); --ax-blue: #E3A21A; --ax-blue-d: #C4880C; --brand: #E3A21A; --board: #E3A21A; --route-green: #6FB36B;
}
html[data-palette="usiku"] body { background: #05070C; color: var(--ink); }
html[data-palette="usiku"] :is(.btn.ax-blue, .btn.primary, .dk-act.primary, .ig-present.on) { color: #140C00; }
html[data-palette="usiku"] :is(.ax-card, .dk-ledger, .ig-card, .jails, .jail, .sm-alert, .cr-call) { background: #0B0E16; border-color: rgb(241 228 198 / .1); }
html[data-palette="usiku"] .ig { --g0: #03040A; --g1: #0A0D16; --g2: #11151F; --g3: #1B2130; --ink: #F1E4C6; --mute: #A8977A; --lit: #E3A21A; }
html[data-palette="usiku"] ::selection { background: rgb(227 162 26 / .4); color: #F1E4C6; }
/* Utofauti mkubwa: high contrast for field phones in sunlight and low vision */
html[data-palette="contrast"] {
  --t-navy: #000814; --t-navy-2: #000; --menu: #000814; --menu-2: #000;
  --ink: #000; --ink-2: #111; --muted: #262E3A; --soft: #2E3846; --line: #5A6577; --line-2: #333C4A;
  --ax-blue: #0047A0; --ax-blue-d: #00347A; --route-green: #005C25; --bus-red: #A8001C; --board: #FFD000; --pp-navy: #00122E; --serial: #8E0018;
}
html[data-palette="contrast"] body { color: #000; }
html[data-palette="contrast"] :is(.ax-card, .dk-ledger, .card, .doc-sheet, .ig-card, .dk-row, input, select, textarea) { border-width: 1.5px; border-color: #333C4A; }
html[data-palette="contrast"] :is(.small, .muted, .dk-sub, .dk-l, .sm-meta, small, .pagehead p) { color: #1A202A !important; }
html[data-palette="contrast"] a:not(.btn):not(.dk-row):not(.dk-act):not([class*="ax-nav"]) { text-decoration: underline; }
html[data-palette="contrast"] :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid #000; outline-offset: 2px; box-shadow: 0 0 0 6px #FFD000; }
html[data-palette="contrast"] .ig { --g0: #000; --g1: #050A12; --g2: #0B1420; --g3: #1A2A40; --ink: #fff; --mute: #D0D8E4; --ln: rgb(255 255 255 / .35); }
/* the theme chooser in Display settings */
.pv-pal { display: grid; grid-template-columns: 30% 1fr; height: 54px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.pv-pal i { display: block; } .pv-pal .c { display: grid; grid-template-rows: 1fr 8px; background: #fff; } .pv-pal .c b { display: block; margin: 9px; height: 8px; border-radius: 4px; }
.pv-pal.jeshi .s { background: #0D1B2A; } .pv-pal.jeshi .c b { background: #2B8ACB; } .pv-pal.jeshi .c::after { content: ""; background: linear-gradient(90deg, #F2C200 50%, #0B6B3A 50%); }
.pv-pal.bendera .s { background: #0A2A17; } .pv-pal.bendera .c b { background: #0088C2; } .pv-pal.bendera .c::after { content: ""; background: linear-gradient(90deg, #1EB53A 0 40%, #FCD116 40% 46%, #000 46% 54%, #FCD116 54% 60%, #00A3DD 60%); }
.pv-pal.usiku .s { background: #05070C; } .pv-pal.usiku .c { background: #0B0E16; } .pv-pal.usiku .c b { background: #E3A21A; } .pv-pal.usiku .c::after { content: ""; background: #6FB36B; }
.pv-pal.contrast .s { background: #000; } .pv-pal.contrast .c b { background: #000; height: 10px; } .pv-pal.contrast .c::after { content: ""; background: #FFD000; }
.pref-row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } @media (max-width: 520px) { .pref-row.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Funding case: satisfaction, results, investment ---- */
.fs-dist { list-style: none; margin: 0; padding: 1rem 1.25rem 1.2rem; display: grid; gap: .5rem; }
.fs-dist li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 3rem; gap: .7rem; align-items: center; font-size: .86rem; }
.fs-k { display: flex; align-items: baseline; gap: .4rem; font: 700 1.05rem var(--display); color: var(--t-navy, #0D1B2A); } .fs-k small { font: 500 .74rem var(--sans); color: #5B6779; }
.fs-t { height: 14px; background: #EEF1F4; border-radius: 0 4px 4px 0; overflow: hidden; } .fs-t i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.fs-dist b { text-align: right; font-variant-numeric: tabular-nums; }
.s1 { background: #C8102E; } .s2 { background: #E07A3F; } .s3 { background: #C9B458; } .s4 { background: #5FA76B; } .s5 { background: var(--route-green, #0B6B3A); }
.fs-trend { padding: .6rem 1rem 1rem; } .fs-trend svg, .iv-chart svg { display: block; width: 100%; height: auto; }
.fs-grid { stroke: #E6EBF1; } .fs-tick { font: 500 10px var(--sans); fill: #5B6779; } .fs-line { fill: none; stroke: var(--t-navy, #0D1B2A); stroke-width: 2; stroke-linejoin: round; } .fs-dot { fill: var(--t-navy, #0D1B2A); }
.fs-low { display: flex; gap: .5rem; align-items: flex-start; margin: 0 0 1.2rem; padding: .7rem .9rem; border-radius: 12px; background: #FFF8E8; border: 1px solid rgb(217 154 11 / .45); color: #6B4700; font-size: .86rem; } .fs-low svg { flex: none; margin-top: 2px; }
.fs-table td b { font-weight: 650; } .fs-table .n { text-align: right; font-variant-numeric: tabular-nums; }
.fs-stack { display: flex; width: 160px; height: 10px; border-radius: 5px; overflow: hidden; gap: 1px; background: #EEF1F4; }
.fs-comments { list-style: none; margin: 0; padding: .5rem 1.25rem 1rem; display: grid; gap: .7rem; }
.fs-comments li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: .7rem; align-items: start; } .fs-comments p { margin: 0; font-size: .88rem; color: #1E2A3D; } .fs-comments small { color: #5B6779; font-size: .74rem; }
.fs-badge { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; font: 800 .86rem var(--sans); }
.fr-table td small { display: block; color: #5B6779; font-size: .72rem; margin-top: .15rem; } .fr-table .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fr-goal th { background: #F2F5F8; text-align: left; font: 700 .72rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--t-navy, #0D1B2A); padding: .55rem 1rem; }
.rp-table .fr-goal th { background: #E2ECE4; color: var(--pp-navy, #13294B); }
.fr-sdg { display: inline-block; padding: .1rem .45rem; border-radius: 6px; background: #E6F1FA; color: #1F5F8F; font: 700 .7rem var(--mono); white-space: nowrap; }
.fr-in { width: 80px; min-height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 .45rem; font: inherit; text-align: right; background: #fff; }
.fr-bar { display: block; width: 120px; height: 8px; border-radius: 8px; background: #E6EBF1; overflow: hidden; } .fr-bar i { display: block; height: 100%; background: var(--route-green, #0B6B3A); border-radius: 8px; }
.fr-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .8rem 1.25rem; border-top: 1px solid var(--line); }
.iv-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 1100px) { .iv-grid { grid-template-columns: 1fr; } }
.iv-form { padding: 1rem 1.1rem; display: grid; gap: 1rem; position: sticky; top: 1rem; max-height: calc(100dvh - 2rem); overflow: auto; } @media (max-width: 1100px) { .iv-form { position: static; max-height: none; } }
.iv-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: .45rem; } .iv-form legend { font: 700 .72rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #5B6779; margin-bottom: .3rem; }
.iv-f { display: grid; grid-template-columns: minmax(0, 1fr) 128px; gap: .6rem; align-items: center; font-size: .82rem; color: #1E2A3D; }
.iv-f input { min-height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 .5rem; font: inherit; text-align: right; font-variant-numeric: tabular-nums; background: #fff; min-width: 0; }
.iv-form footer { display: flex; gap: .5rem; flex-wrap: wrap; padding-top: .6rem; border-top: 1px solid var(--line); }
.iv-out { display: grid; gap: 1.2rem; min-width: 0; } .iv-kpis { margin: 0; }
.iv-chart { padding: .6rem 1rem 1rem; } .iv-c { fill: none; stroke: var(--bus-red, #C8102E); stroke-width: 2.2; } .iv-v { fill: none; stroke: var(--route-green, #0B6B3A); stroke-width: 2.2; } .iv-pb { stroke: var(--t-navy, #0D1B2A); stroke-dasharray: 4 4; }
.iv-legend { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; color: #4A566A; } .iv-legend i { width: 14px; height: 3px; border-radius: 2px; margin-left: .5rem; } .iv-legend .c { background: var(--bus-red, #C8102E); } .iv-legend .v { background: var(--route-green, #0B6B3A); }
.iv-table .n { text-align: right; font-variant-numeric: tabular-nums; } .iv-note { margin: 0; padding: .7rem 1.25rem 1rem; font-size: .78rem; color: #4A566A; }
.iv-h3 { font: 700 .95rem var(--display); color: var(--pp-navy, #13294B); margin: 1.2rem 0 .5rem; }
.rt-scale { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; } .rt-scale legend { font: 700 1rem var(--display); color: var(--pp-navy, #13294B); margin-bottom: .6rem; padding: 0; }
.rt-scale label { position: relative; } .rt-scale input { position: absolute; opacity: 0; }
.rt-scale span { display: grid; justify-items: center; gap: .15rem; padding: .8rem .3rem; border-radius: 8px; border: 1.5px solid #B9C6BE; background: #fff; cursor: pointer; text-align: center; transition: background-color 140ms var(--ease-out), border-color 140ms, transform 120ms var(--ease-out); }
.rt-scale span b { font: 700 1.5rem var(--display); color: var(--pp-navy, #13294B); } .rt-scale span small { font-size: .72rem; color: #33453C; }
.rt-scale input:checked + span { background: var(--pp-navy, #13294B); border-color: var(--pp-navy, #13294B); } .rt-scale input:checked + span b, .rt-scale input:checked + span small { color: #fff; }
.rt-scale input:focus-visible + span { outline: 2px solid var(--ink-blue); outline-offset: 2px; } .rt-scale span:active { transform: scale(.97); }
@media (max-width: 420px) { .rt-scale { gap: .3rem; } .rt-scale span small { display: none; } }
html[data-theme="dark"] :is(.fs-t, .fs-stack, .fr-bar) { background: rgb(255 255 255 / .08); } html[data-theme="dark"] :is(.fs-k, .fs-comments p) { color: var(--ink); } html[data-theme="dark"] .fr-goal th { background: rgb(255 255 255 / .05); color: var(--ink); }
html[data-theme="dark"] :is(.iv-f input, .fr-in) { background: var(--field); border-color: var(--line); color: var(--ink); } html[data-theme="dark"] .iv-f { color: var(--ink-2); }
.ig-menu { border-color: rgb(255 255 255 / .22); color: #fff; text-decoration: none; }

/* ---- Governance: data protection, integrity, justice chain, referrals, readiness, open data ---- */
.gv-table td { vertical-align: top; font-size: .84rem; } .gv-table td b { font-weight: 650; } .gv-table .n { text-align: right; font-variant-numeric: tabular-nums; }
.dk-side select, td select { min-height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 .4rem; font: inherit; font-size: .8rem; background: #fff; color: inherit; }
.gv-rules { list-style: none; margin: 0; padding: .6rem 1.25rem; display: grid; gap: .45rem; font-size: .86rem; } .gv-rules li { display: flex; gap: .5rem; align-items: flex-start; } .gv-rules svg { flex: none; margin-top: 2px; color: var(--route-green, #0B6B3A); }
.gv-legend { display: inline-flex; align-items: center; gap: .35rem; font-size: .74rem; color: #4A566A; flex-wrap: wrap; } .gv-legend i { width: 12px; height: 10px; border-radius: 3px; margin-left: .5rem; }
.a0 { background: #8FC9A0; } .a1 { background: #E3C35A; } .a2 { background: #E0874A; } .a3 { background: var(--bus-red, #C8102E); }
.gv-chain { list-style: none; margin: 0; padding: 1.1rem 1.25rem; display: grid; gap: 1rem; }
.gv-chain li { display: grid; gap: .4rem; position: relative; } .gv-chain header { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; } .gv-chain header b { color: var(--t-navy, #0D1B2A); } .gv-chain header small { color: #5B6779; }
.gv-age { display: flex; height: 18px; min-width: 4px; border-radius: 0 6px 6px 0; overflow: hidden; gap: 1px; background: #EEF1F4; }
.gv-arrow { display: none; }
.gv-svc { list-style: none; margin: 0; padding: 1rem 1.25rem; display: grid; gap: .7rem; }
.gv-svc li { display: grid; grid-template-columns: 11rem minmax(0, 1fr); column-gap: 1rem; row-gap: .2rem; align-items: center; font-size: .84rem; } .gv-svc li > span:last-child { grid-column: 2; color: #4A566A; font-size: .78rem; } .gv-svc em { color: #8A5A00; font-style: normal; font-weight: 600; }
.gv-sbar { height: 10px; border-radius: 0 5px 5px 0; background: #EEF1F4; overflow: hidden; } .gv-sbar i { display: block; height: 100%; background: var(--route-green, #0B6B3A); }
td small { display: block; color: #5B6779; font-size: .74rem; }
.gv-map { height: 420px; } .gv-mapcard { overflow: hidden; }
.gv-pin { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 .74rem var(--sans); border: 2px solid #fff; box-shadow: 0 3px 8px rgb(0 0 0 / .3); }
.gv-pin.p1, .gv-score.p1 b { background: var(--route-green, #0B6B3A); } .gv-pin.p2 { background: #B7791F; } .gv-pin.p3 { background: var(--bus-red, #C8102E); }
.gv-score { display: grid; justify-items: end; font: 700 1.2rem var(--display); color: var(--t-navy, #0D1B2A); margin-right: .4rem; } .gv-score small { font: 700 .66rem var(--sans); letter-spacing: .04em; } .gv-score.p1 small { color: var(--route-green, #0B6B3A); } .gv-score.p2 small { color: #8A5A00; } .gv-score.p3 small { color: var(--bus-red, #C8102E); }
.od-service { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.od-service div { display: grid; gap: .2rem; padding: 1rem; border-radius: 6px; background: rgb(255 255 255 / .75); border: 1px solid #C8D6CC; } .od-service b { font: 700 1.6rem var(--display); color: var(--pp-navy, #13294B); } .od-service span { font-size: .84rem; color: #33453C; }
@media (max-width: 760px) { .od-service { grid-template-columns: 1fr; } }
.od-gap { margin-top: 1.2rem; }
html[data-theme="dark"] :is(.gv-age, .gv-sbar) { background: rgb(255 255 255 / .08); } html[data-theme="dark"] .gv-chain header b, html[data-theme="dark"] .gv-score { color: #fff; } html[data-theme="dark"] :is(.dk-side select, td select) { background: var(--field); border-color: var(--line); color: var(--ink); }
.gv-chain li.closed .gv-age i { background: #9FB4C8; }
.foot-links { display: flex; gap: 1rem; flex-wrap: wrap; } .foot-links a { color: inherit; opacity: .85; } @media (hover: hover) and (pointer: fine) { .foot-links a:hover { opacity: 1; } }

/* ---- Civilian firearms ---- */
.cf-tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin: 0 0 1.2rem; padding: .3rem; border-radius: 12px; background: #F1F4F8; border: 1px solid var(--line); width: max-content; max-width: 100%; }
.cf-tabs a { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .8rem; border-radius: 9px; font: 650 .84rem var(--sans); color: #334155; text-decoration: none; transition: background-color 160ms var(--ease-out), color 160ms; }
.cf-tabs a[aria-current="page"] { background: var(--t-navy, #0D1B2A); color: #fff; } .cf-tabs em { font-style: normal; min-width: 20px; height: 20px; padding: 0 .35rem; border-radius: 999px; background: var(--board, #F2C200); color: #0A0A0A; display: inline-grid; place-items: center; font-size: .7rem; }
@media (hover: hover) and (pointer: fine) { .cf-tabs a:not([aria-current="page"]):hover { background: #fff; } }
.cf-cats { list-style: none; margin: 0; padding: .4rem 1.25rem 1rem; display: grid; gap: .5rem; }
.cf-cats li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; padding: .4rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; } .cf-cats b { font: 700 1.1rem var(--display); color: var(--t-navy, #0D1B2A); } .cf-cats small { grid-column: 1 / -1; color: #5B6779; font-size: .74rem; }
.cf-apps, .cf-dealers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 1rem; }
.cf-app, .cf-dealer { padding: 1rem 1.15rem; display: grid; gap: .45rem; align-content: start; }
.cf-app > header, .cf-dealer > header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cf-app h3, .cf-dealer h3 { margin: 0; font-size: 1.05rem; color: var(--t-navy, #0D1B2A); } .cf-reason { margin: 0; font-size: .86rem; color: #1E2A3D; }
.cf-checks { list-style: none; margin: .3rem 0 0; padding: 0; display: grid; gap: .3rem; }
.cf-checks li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: .45rem; align-items: center; font-size: .82rem; color: #334155; }
.cf-checks .c-pass svg { color: var(--route-green, #0B6B3A); } .cf-checks .c-fail { color: #A10E26; } .cf-checks .c-fail svg { color: var(--bus-red, #C8102E); } .cf-checks .c-todo svg { color: #9AA6B6; }
.cf-cbtn { display: inline-flex; gap: .25rem; } .cf-cbtn .btn { min-height: 28px; padding: 0 .45rem; }
.cf-app > footer, .cf-dealer > footer { display: flex; gap: .4rem; flex-wrap: wrap; padding-top: .6rem; border-top: 1px dashed var(--line); }
.cf-app.s-rejected, .cf-dealer.suspended { background: #FFFBFB; border-color: rgb(200 16 46 / .25); }
.cf-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; margin: .2rem 0; } .cf-dl dt { font-size: .7rem; color: #5B6779; } .cf-dl dd { margin: 0; font: 700 1.05rem var(--display); color: var(--t-navy, #0D1B2A); } .cf-dl dd.bad { color: var(--bus-red, #C8102E); }
.cf-insp { display: flex; gap: .4rem; align-items: flex-start; margin: 0; font-size: .78rem; color: #4A566A; } .cf-insp svg { flex: none; margin-top: 2px; color: var(--route-green, #0B6B3A); }
.cf-search input { min-height: 34px; width: 240px; max-width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 0 .6rem; font: inherit; font-size: .84rem; }
tr.cf-hot td { background: #FFF5F5; }
.cf-h2 { margin: 0; font-size: 1.1rem; } .cf-problems { list-style: none; margin: .6rem 1.1rem 1rem; padding: 0; display: grid; gap: .4rem; font-size: .86rem; color: #8E1022; } .cf-problems li { display: flex; gap: .4rem; align-items: flex-start; } .cf-left { margin: 0 1.1rem 1rem; font-size: .84rem; color: #334155; }
.dg-form [data-serialf][hidden] { display: none; }
@media (max-width: 520px) { .cf-apps, .cf-dealers { grid-template-columns: 1fr; } }
html[data-theme="dark"] .cf-tabs { background: rgb(255 255 255 / .04); } html[data-theme="dark"] .cf-tabs a { color: var(--ink-2); } html[data-theme="dark"] .cf-tabs a[aria-current="page"] { background: #fff; color: #0D1B2A; }
html[data-theme="dark"] :is(.cf-app h3, .cf-dealer h3, .cf-dl dd, .cf-cats b) { color: #fff; } html[data-theme="dark"] tr.cf-hot td { background: rgb(200 16 46 / .08); } html[data-theme="dark"] .cf-search input { background: var(--field); border-color: var(--line); color: var(--ink); }

/* ---------- Signed witness statements ---------- */
.st-list { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .75rem; }
.st-list li { border: 1px solid var(--line, #d8dde6); border-radius: 10px; padding: .75rem .85rem; display: grid; gap: .45rem; }
.st-body { margin: 0; color: var(--muted, #4a5568); }
.st-sigs { display: flex; gap: .75rem; }
.st-sigs figure { margin: 0; flex: 1; border-bottom: 1px solid var(--line, #d8dde6); }
.st-sigs img { width: 100%; height: 54px; object-fit: contain; }
.st-sigs figcaption { font-size: .72rem; color: var(--muted, #4a5568); padding: .15rem 0; }
.sig-pad { width: 100%; height: 130px; border: 1px dashed color-mix(in srgb, var(--t-navy, #0b1f3a) 35%, transparent); border-radius: 8px; background: #fff; touch-action: none; cursor: crosshair; }

/* ---------- Public nav: hamburger on phones ---------- */
.pubnav-bar, .pubnav-more { display: none; }
@media (max-width: 760px) {
  .pubnav { position: relative; z-index: 30; }
  .pubnav-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 .5rem 0 1rem; min-height: 52px; color: #fff; }
  .pubnav-here { font-weight: 600; font-size: .95rem; letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pubnav-toggle { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: 0 .85rem; border: 1px solid rgb(255 255 255 / .28); border-radius: 8px; background: transparent; color: #fff; font: 600 .9rem var(--sans); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color 160ms ease, transform 160ms cubic-bezier(.23, 1, .32, 1); }
  .pubnav-toggle:active { transform: scale(.97); }
  .pubnav.open .pubnav-toggle { background: rgb(255 255 255 / .12); }
  .burger { position: relative; width: 18px; height: 12px; display: inline-block; }
  .burger i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform 200ms cubic-bezier(.23, 1, .32, 1), opacity 150ms ease; }
  .burger i:nth-child(1) { top: 0; } .burger i:nth-child(2) { top: 5px; } .burger i:nth-child(3) { top: 10px; }
  .pubnav.open .burger i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  .pubnav.open .burger i:nth-child(2) { opacity: 0; }
  .pubnav.open .burger i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
  .pubnav .inner { position: absolute; left: 0; right: 0; top: 100%; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 0; padding: .35rem 0 .6rem; background: inherit; background-color: var(--pp-navy, #0b1f3a); box-shadow: 0 14px 28px rgb(4 12 28 / .28); max-height: calc(100dvh - 200px); overflow-y: auto; overscroll-behavior: contain;
    opacity: 0; transform: translateY(-6px); visibility: hidden; pointer-events: none; transition: opacity 180ms cubic-bezier(.23, 1, .32, 1), transform 220ms cubic-bezier(.23, 1, .32, 1), visibility 0s linear 220ms; }
  .pubnav.open .inner { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition-delay: 0s; }
  .pubnav .inner a { padding: .85rem 1.1rem; min-height: 48px; display: flex; align-items: center; border-bottom: 0; border-left: 3px solid transparent; white-space: normal; }
  .pubnav .inner a[aria-current="page"] { border-left-color: var(--gold, #c9a227); background: rgb(255 255 255 / .06); }
  .pubnav-more { display: flex; flex-direction: column; margin-top: .35rem; padding-top: .35rem; border-top: 1px solid rgb(255 255 255 / .14); }
  .pubnav-more a { font-size: .88rem; opacity: .86; }
}
@media (prefers-reduced-motion: reduce) { .pubnav .inner, .burger i { transition: none !important; } }

/* ---------- Missing-child rapid alert ---------- */
.ca-demo { margin: .25rem 0 1rem; display: flex; gap: .4rem; align-items: center; }
.ca-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.ca-card { padding: 1rem 1.1rem; display: grid; gap: .55rem; align-content: start; }
.ca-card h2 { margin: .2rem 0 0; font-size: 1.15rem; }
.ca-card p { margin: 0; }
.ca-card.active { border-color: color-mix(in srgb, var(--red, #b3261e) 45%, transparent); background: linear-gradient(color-mix(in srgb, var(--red, #b3261e) 5%, transparent), transparent 40%); }
.ca-tag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; padding: .15rem .45rem; border-radius: 4px; background: color-mix(in srgb, var(--route-green, #1f7a3a) 14%, transparent); color: var(--route-green, #1f7a3a); }
.ca-card.active .ca-tag { background: var(--red, #b3261e); color: #fff; }
.ca-clock { text-align: right; display: grid; }
.ca-clock b { font: 600 1.35rem var(--mono); font-variant-numeric: tabular-nums; }
.ca-clock span { font-size: .72rem; color: var(--muted, #4a5568); }
.ca-tl { margin: .2rem 0; padding-left: 1.1rem; display: grid; gap: .25rem; font-size: .85rem; }
.ca-out { color: var(--route-green, #1f7a3a); }
.ca-banner { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.25rem; padding: .9rem 1.1rem; border-radius: 10px; background: #8f1d17; color: #fff; }
.ca-banner > div { display: grid; gap: .2rem; }
.ca-banner span { font-size: .9rem; opacity: .92; }
@media (max-width: 560px) { .ca-grid { grid-template-columns: 1fr; } }

/* ---------- Public ward safety map ---------- */
.sf-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 1rem; align-items: start; }
.sf-mapwrap { border: 1px solid var(--line, #d8dde6); border-radius: 10px; overflow: hidden; background: #fff; }
.sf-map { height: 520px; }
.sf-legend { display: flex; gap: 1rem; padding: .55rem .8rem; font-size: .82rem; border-top: 1px solid var(--line, #d8dde6); }
.sf-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.sf-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.sf-dot.high, .sf-c.high { background: #b3261e; fill: #b3261e; stroke: #7a1712; }
.sf-dot.medium, .sf-c.medium { background: #d08a12; fill: #d08a12; stroke: #8a5a08; }
.sf-dot.low, .sf-c.low { background: #3c8d5a; fill: #3c8d5a; stroke: #24603a; }
.sf-c { fill-opacity: .45; }
.sf-list { border: 1px solid var(--line, #d8dde6); border-radius: 10px; background: #fff; max-height: 562px; overflow-y: auto; }
.sf-list h2 { position: sticky; top: 0; margin: 0; padding: .75rem .9rem; font-size: 1rem; background: inherit; border-bottom: 1px solid var(--line, #d8dde6); }
.sf-list ul { list-style: none; margin: 0; padding: 0; }
.sf-list li { padding: .55rem .9rem; border-bottom: 1px solid var(--line, #d8dde6); }
.sf-list li p { margin: .15rem 0 0; }
.sf-row { all: unset; box-sizing: border-box; width: 100%; display: flex; justify-content: space-between; align-items: center; gap: .6rem; cursor: pointer; }
.sf-row > span:first-child { display: grid; }
.sf-row:focus-visible { outline: 2px solid var(--ax-blue, #1d4ed8); outline-offset: 3px; border-radius: 4px; }
.sf-n { min-width: 2.4rem; text-align: center; font: 600 .9rem var(--mono); padding: .2rem .4rem; border-radius: 6px; color: #fff; }
.sf-n.high { background: #b3261e; } .sf-n.medium { background: #b8780c; } .sf-n.low { background: #3c8d5a; }
.sf-note { margin: 1rem 0; display: flex; gap: .4rem; align-items: flex-start; }
.sm-range { margin-top: .6rem; display: inline-flex; gap: .4rem; }
@media (max-width: 860px) { .sf-grid { grid-template-columns: 1fr; } .sf-map { height: 340px; } .sf-list { max-height: none; } }
/* Keep Leaflet's internal z-indexes inside the map so menus and dialogs sit above it */
.leaflet-container { isolation: isolate; z-index: 0; }
/* Card headers stack on phones so legends and notes never push past the screen edge */
@media (max-width: 560px) {
  .ax-card-h { flex-wrap: wrap; }
  .ax-card-h > :last-child:not(:first-child) { white-space: normal; flex: 1 1 100%; }
}
@media (max-width: 560px) {
  .register-table { table-layout: fixed; }
  .register-table th { white-space: normal; padding-right: .75rem; font-size: .9rem; }
  .register-table td { width: 38%; font-size: 1.25rem; }
}

/* ---------- Review fixes (new screens) ---------- */
html[data-theme="dark"] :is(.sf-mapwrap, .sf-list) { background: #0C1424; border-color: rgb(255 255 255 / .12); color: var(--ink, #E6EBF2); }
html[data-theme="dark"] :is(.sf-legend, .sf-list li, .sf-list h2) { border-color: rgb(255 255 255 / .12); }
.sf-n.medium { background: #8a5a08; }
.sf-list:not(.show-all) .sf-extra { display: none; }
.sf-all { margin: .75rem .9rem; }
.sm-range .btn.primary { background: var(--pp-navy); border-color: var(--pp-navy); color: #fff; }
/* Paper stays paper in dark mode */
html[data-theme="dark"] .doc-sheet .field > span { color: #12201A; }
html[data-theme="dark"] .doc-sheet :is(input, select, textarea, .input) { background: #fff; color: #12201A; border-color: #C9D3CC; }
html[data-theme="dark"] .doc-sheet .btn.doc-primary { background: var(--pp-navy); border-color: var(--pp-navy); color: #fff; }
html[data-theme="dark"] .form-doc .doc-foot { color: #C3CCD8; }
.verdict.pending b { color: #8A5A00; }
html[data-theme="dark"] .wb-h { color: #fff; border-color: rgb(255 255 255 / .4); }
html[data-theme="dark"] .wb-h span { color: #C3CCD8; }
.ca-ago { font-size: .8rem !important; opacity: .8 !important; }
/* Counts in card headers keep their size on phones */
@media (max-width: 560px) { .ax-card-h > :is(.dk-count, .dk-tag, .badge):last-child { flex: none; } }
.pubnav .inner a[aria-current="page"] { border-left-color: #fff; font-weight: 700; }
html[data-theme="dark"] .ca-out { color: #8FDB4F; }
.ca-card > header.spread { flex-wrap: nowrap; align-items: flex-start; }
.ca-clock { flex: none; }
@media (pointer: coarse) { :is(.ca-card .btn.sm, .sm-range .btn, .cf-tabs a, .cf-tabs button, .cf-cbtn .btn, .st-card .btn.sm, .st-pads .btn) { min-height: 44px; } }
@media (max-width: 560px) { .cf-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; } }
html[data-theme="dark"] .doc-sheet :is(.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea),
html[data-theme="dark"] .doc-sheet :is(.input, .field input, .field select, .field textarea):focus { background: #fff; color: #12201A; border-color: #C9D3CC; }
html[data-theme="dark"] .doc-sheet :is(.input, input, textarea)::placeholder { color: #7A8A80; }
