:root{--bg:#04120d;--bg2:#0e2c20;--surface:#0d2a1f;--surface2:#123826;--field:#04120d;--line:#2c4a3c;--accent:#d8b46a;--accent-ink:#1f1606;--text:#f4f1e6;--muted:#b8c6b9;--radius:10px;--font-head:"Lora", Georgia, "Times New Roman", serif;--head-weight:700}
/* SenseCore mobile — shared styles. Portal tokens (:root) are written by build_mobile.py.
   Severity colours are the same in every portal, as on the web platform. */
:root {
  --sev-P1: #ff5a5f; --sev-P2: #ff8a3d; --sev-P3: #f5c542; --sev-P4: #8f9aa8;
  --good: #3fcf8e; --danger: #ff5a5f;
  --gap: 16px; --tap: 48px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Noto Kufi Arabic", "Noto Sans Arabic", "Geeza Pro", "Segoe UI", Tahoma, sans-serif;
  color-scheme: dark;
}
@font-face { font-family: "Inter"; src: url("fonts/inter-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-600.woff") format("woff"); font-weight: 600 900; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("fonts/interdisplay-800.woff") format("woff"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/poppins-700.woff") format("woff"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "Lora"; src: url("fonts/lora-var.woff") format("woff"); font-weight: 400 700; font-display: swap; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { font: 15px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: contain; }
html[dir=rtl] body { font-family: var(--font-ar); }
h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); line-height: 1.2; margin: 0; }
html[dir=rtl] :is(h1, h2, h3) { font-family: var(--font-ar); font-weight: 700; }
h2 { font-size: 1.45rem; } h3 { font-size: 1rem; margin: 22px 0 8px; color: var(--muted); font-weight: 600; font-family: var(--font-body); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.i { inline-size: 20px; block-size: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
html[dir=rtl] .i:has(use[href="#i-back"]), html[dir=rtl] .i:has(use[href="#i-chev"]) { transform: scaleX(-1); }
.muted { color: var(--muted); } .center { text-align: center; }
[hidden] { display: none !important; }

/* ---------- layout */
#app { max-inline-size: 560px; margin: 0 auto; min-block-size: 100dvh; display: flex; flex-direction: column; background: var(--bg); position: relative; }
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) var(--gap) 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.bar-mark { border-radius: 10px; }
.bar-title { display: flex; flex-direction: column; min-inline-size: 0; }
.bar-title strong { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 1.05rem; }
.bar-title span { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-dot { margin-inline-start: auto; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 var(--good); animation: live 2.4s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
main { flex: 1; padding: 4px var(--gap) calc(96px + env(safe-area-inset-bottom)); outline: none; }
.tabs { position: fixed; inset-block-end: 0; inset-inline: 0; z-index: 30; display: flex; justify-content: center; gap: 2px; max-inline-size: 560px; margin: 0 auto;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-block-start: 1px solid var(--line); }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; min-block-size: var(--tap); border-radius: 12px; text-decoration: none; color: var(--muted); font-size: .72rem; }
.tabs a[aria-current] { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.banner { margin: 0; padding: 6px 12px; text-align: center; font-size: .78rem; background: var(--sev-P3); color: #231a00; }
.banner.offline { background: var(--surface2); color: var(--muted); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 10px; flex-wrap: wrap; }
.loading { block-size: 120px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%) 0 0 / 200% 100%; animation: shimmer 1.2s infinite; list-style: none; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty, .notice { color: var(--muted); padding: 28px 8px; text-align: center; list-style: none; }
.notice { background: var(--surface); border-radius: var(--radius); }

/* ---------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-block-size: var(--tap); padding: 10px 16px; border-radius: calc(var(--radius) * .7);
  border: 1px solid var(--line); background: var(--surface2); color: var(--text); font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.good { background: color-mix(in srgb, var(--good) 22%, var(--surface2)); border-color: color-mix(in srgb, var(--good) 55%, transparent); }
.btn.danger { color: var(--danger); background: transparent; }
.btn.ghost { background: transparent; }
.btn.small { min-block-size: 36px; padding: 6px 12px; font-size: .85rem; }
.btn.block { display: flex; inline-size: 100%; margin-block-start: 12px; }
.btn:disabled { opacity: .55; }
.link { background: none; border: 0; color: var(--accent); padding: 12px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
label { display: grid; gap: 6px; font-size: .85rem; color: var(--muted); margin-block-end: 14px; }
input, select, textarea { inline-size: 100%; min-block-size: var(--tap); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--field); color: var(--text); font-size: 16px; }
textarea { resize: vertical; }
.form-msg { min-block-size: 1.2em; color: var(--sev-P2); margin: 4px 0 10px; font-size: .9rem; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-block-end: 6px; scrollbar-width: none; }
.chip { flex: none; min-block-size: 38px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.chip[aria-selected=true] { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; }

/* ---------- severity */
.pill { display: inline-grid; place-items: center; min-inline-size: 34px; padding: 2px 8px; border-radius: 8px; font-weight: 800; font-size: .78rem; color: #1a1205; }
.pill.sev-P1 { background: var(--sev-P1); color: #fff; } .pill.sev-P2 { background: var(--sev-P2); } .pill.sev-P3 { background: var(--sev-P3); } .pill.sev-P4 { background: var(--sev-P4); }
.tally { display: flex; gap: 6px; }
.sev { font-size: .78rem; padding: 3px 8px; border-radius: 8px; background: var(--surface); color: var(--muted); }
.sev b { color: var(--text); }
.sev.sev-P1 b { color: var(--sev-P1); } .sev.sev-P2 b { color: var(--sev-P2); }

/* ---------- case list */
.cases { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.case a { position: relative; display: grid; gap: 4px; padding: 14px 14px 12px; border-radius: var(--radius); background: var(--surface); text-decoration: none; overflow: hidden; border: 1px solid var(--line); }
.case .sla { position: absolute; inset-block-start: 0; inset-inline: 0; block-size: 3px; background: color-mix(in srgb, var(--text) 8%, transparent); }
.case .sla i { display: block; block-size: 100%; background: var(--sev-P4); }
.case.sev-P1 .sla i { background: var(--sev-P1); } .case.sev-P2 .sla i { background: var(--sev-P2); } .case.sev-P3 .sla i { background: var(--sev-P3); }
.case-top { display: flex; align-items: center; gap: 10px; }
.case-top strong { flex: 1; font-size: 1rem; }
.due { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .88rem; color: var(--text); }
.due.late { color: var(--sev-P1); }
.case-who { font-weight: 600; } .case-who small { color: var(--muted); font-weight: 400; margin-inline-start: 6px; }
.case-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .8rem; }
.ticket { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .82rem; margin: 2px 0 0; }
.status { color: var(--muted); font-size: .85rem; }

/* ---------- detail */
.back { display: inline-flex; align-items: center; gap: 6px; min-block-size: 44px; color: var(--muted); text-decoration: none; }
.detail-head { display: grid; justify-items: start; gap: 6px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.detail-head h2 { font-size: 1.5rem; }
.detail-head .msg { margin: 6px 0 0; color: var(--text); }
.due.big { font-size: 1.6rem; margin: 4px 0 0; }
.profile-head { grid-template-columns: auto 1fr; align-items: center; justify-items: stretch; gap: 14px; }
.avatar { display: inline-grid; place-items: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 22%, var(--surface2)); color: var(--text); font-weight: 700; font-size: .85rem; flex: none; }
.avatar.big { inline-size: 56px; block-size: 56px; font-size: 1.1rem; }
.subject-link { display: flex; align-items: center; gap: 10px; margin-block-start: 10px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); text-decoration: none; border: 1px solid var(--line); }
.subject-link strong { flex: 1; } .subject-link small { color: var(--muted); }
.vitals { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 8px; margin-block-start: 12px; }
.vital { padding: 12px; border-radius: calc(var(--radius) * .75); background: var(--surface2); display: grid; gap: 2px; }
.vital span { font-size: .75rem; color: var(--muted); }
.vital b { font-size: 1.45rem; font-variant-numeric: tabular-nums; font-family: var(--font-head); font-weight: var(--head-weight); }
.vital small { font-size: .72rem; color: var(--muted); margin-inline-start: 4px; font-family: var(--font-body); font-weight: 400; }
.vitals-time { grid-column: 1 / -1; margin: 0; font-size: .78rem; color: var(--muted); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-block-start: 14px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 10px; }
.quick .btn span { max-inline-size: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--line); }
.timeline li { position: relative; padding: 4px 0 12px; padding-inline-start: 16px; font-size: .9rem; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: -6px; inset-block-start: 10px; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--accent); }
.timeline time { display: block; color: var(--muted); font-size: .76rem; }
.spark { margin: 12px 0 0; padding: 10px 12px; border-radius: calc(var(--radius) * .75); background: var(--surface); color: var(--accent); }
.spark figcaption { color: var(--muted); font-size: .78rem; } .spark small { color: var(--muted); }
.spark svg { inline-size: 100%; block-size: 56px; display: block; }
.kv { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); font-size: .88rem; }
.kv .ok { color: var(--good); } .kv .off { color: var(--muted); }

/* ---------- lists */
.search input { border-radius: 999px; padding-inline: 18px; }
.list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; }
.list li a, .list.compact li { display: flex; align-items: center; gap: 12px; padding: 10px 6px; min-block-size: 60px; text-decoration: none; border-block-end: 1px solid var(--line); }
.who { flex: 1; display: grid; min-inline-size: 0; } .who small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.risk { font-size: .75rem; padding: 2px 8px; border-radius: 6px; background: var(--surface2); color: var(--muted); }
.risk-high, .risk-critical { background: color-mix(in srgb, var(--sev-P2) 25%, transparent); color: var(--sev-P2); }

/* ---------- map + scan */
.map-page { margin-inline: calc(var(--gap) * -1); }
#map { block-size: calc(100dvh - 150px); min-block-size: 360px; background: var(--surface); }
.map-note { position: absolute; inset-block-start: 90px; inset-inline: 24px; text-align: center; padding: 10px; border-radius: 12px; background: var(--surface2); z-index: 500; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface2); color: var(--text); }
.viewfinder { position: relative; margin: 14px 0; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: #000; }
.viewfinder video { inline-size: 100%; block-size: 100%; object-fit: cover; }
.viewfinder .frame { position: absolute; inset: 18%; border: 3px solid var(--accent); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.manual { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.manual label { margin: 0; }

/* ---------- follower */
.follow { margin-block-start: 14px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.follow header { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.follow header p { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.follow .state { padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.follow.safe .state { background: color-mix(in srgb, var(--good) 20%, transparent); color: var(--good); }
.follow.attention { border-color: var(--sev-P1); } .follow.attention .state { background: var(--sev-P1); color: #fff; }
.follow.nosignal .state { background: var(--surface2); color: var(--muted); }
.last-alert { margin: 12px 0 0; font-size: .9rem; }
.mini-map { block-size: 150px; border-radius: calc(var(--radius) * .75); margin: 12px 0 8px; overflow: hidden; background: var(--surface2); }
.sos { position: relative; display: grid; place-items: center; gap: 2px; inline-size: 100%; margin-block-start: 16px; min-block-size: 92px; border: 0; border-radius: var(--radius);
  background: color-mix(in srgb, var(--sev-P1) 16%, var(--surface2)); color: var(--text); cursor: pointer; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.sos b { font-size: 1.6rem; letter-spacing: .08em; color: var(--sev-P1); font-family: var(--font-head); }
.sos small { color: var(--muted); }
.sos .ring { position: absolute; inset: 0; background: var(--sev-P1); transform: scaleX(0); transform-origin: inline-start; opacity: .35; }
html[dir=rtl] .sos .ring { transform-origin: right; }
.sos.holding .ring { transform: scaleX(1); transition: transform 2s linear; }
.sos.sent { background: var(--sev-P1); } .sos.sent b, .sos.sent small { color: #fff; }
.sos-help { margin: 6px 0 0; text-align: center; font-size: .78rem; color: var(--muted); }

/* ---------- me */
.kv-list { margin: 16px 0 0; display: grid; gap: 2px; }
.kv-list div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px; border-block-end: 1px solid var(--line); }
.kv-list dt { color: var(--muted); } .kv-list dd { margin: 0; display: flex; align-items: center; gap: 10px; text-align: end; }

/* ---------- auth */
.auth { min-block-size: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 24px; padding: 32px var(--gap) calc(32px + env(safe-area-inset-bottom)); }
.auth-mark { display: flex; align-items: center; gap: 16px; }
.auth-mark img { border-radius: 18px; }
.auth-mark h1 { font-size: 2rem; } .auth-mark p { margin: 4px 0 0; color: var(--muted); }
.auth-card { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.auth-card h2 { margin-block-end: 14px; }
.lang-switch { align-self: center; }

/* ---------- sheets + toast */
.sheet-wrap { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.sheet { inline-size: 100%; max-inline-size: 560px; padding: 20px var(--gap) calc(20px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--surface2); animation: up .22s ease-out; }
.sheet h3 { margin: 0 0 14px; color: var(--text); font-size: 1.15rem; font-family: var(--font-head); }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.toast { position: fixed; z-index: 1100; inset-inline: 16px; inset-block-start: calc(12px + env(safe-area-inset-top)); max-inline-size: 528px; margin: 0 auto; padding: 14px 16px; border-radius: 14px;
  background: var(--text); color: var(--bg); font-weight: 600; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.toast[data-kind=alert] { background: var(--sev-P1); color: #fff; }
.toast[data-kind=error] { background: var(--surface2); color: var(--sev-P2); border: 1px solid var(--sev-P2); }

/* =================================================================== portal signatures */
/* RIAYAH — "pulse": a live ECG trace under the header, the case's response clock as a bar */
[data-signature=pulse] .signature { block-size: 26px; margin-block-start: -4px; background: url("img/signature.svg") repeat-x 0 50% / 240px 26px; opacity: .9; animation: ecg 6s linear infinite; }
@keyframes ecg { to { background-position: -240px 50%; } }
[data-signature=pulse] .case .sla { block-size: 4px; }
[data-signature=pulse] h2 { letter-spacing: -.01em; }

/* EquiSense — "ledger": serif headings, ruled ledger rows, brass hairlines */
[data-signature=ledger] .signature { block-size: 6px; margin: 0 var(--gap); border-block: 1px solid var(--accent); opacity: .6; }
[data-signature=ledger] .cases { gap: 0; }
[data-signature=ledger] .case a { border: 0; border-block-end: 1px solid var(--line); border-radius: 0; background: transparent; padding-inline: 4px; }
[data-signature=ledger] .case .sla { inset-block-start: auto; inset-block-end: 0; block-size: 2px; background: transparent; }
[data-signature=ledger] .case-top strong { font-family: var(--font-head); font-size: 1.08rem; }
html[dir=rtl][data-signature=ledger] .case-top strong { font-family: var(--font-ar); }
[data-signature=ledger] .ticket { color: var(--accent); letter-spacing: .02em; }
[data-signature=ledger] .detail-head { background: transparent; border: 0; border-block: 3px double var(--accent); border-radius: 0; padding-inline: 0; }
[data-signature=ledger] .vital { background: transparent; border: 1px solid var(--line); }
[data-signature=ledger] .vital b { color: var(--accent); }

/* CamelSense — "sadu": woven band, generous sizes for outdoor use */
[data-signature=sadu] { --tap: 54px; }
[data-signature=sadu] body { font-size: 16px; }
[data-signature=sadu] .signature { block-size: 14px; background: url("img/signature.svg") repeat-x 0 0 / auto 14px; }
[data-signature=sadu] .case a { border-width: 2px; }
[data-signature=sadu] .case-top strong { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; }
[data-signature=sadu] .btn { border-radius: 16px; }
[data-signature=sadu] .vital b { font-size: 1.7rem; }
[data-signature=sadu] .tabs a[aria-current] { background: var(--accent); color: var(--accent-ink); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (min-width: 600px) { #app { border-inline: 1px solid var(--line); } }

/* ---- portal modules (modules.js) ---- */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-block: 6px 14px; }
.kpi { display: grid; gap: 2px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.kpi b { font-size: 1.7rem; font-family: var(--font-head); font-variant-numeric: tabular-nums; line-height: 1.1; } .kpi b small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.kpi span { color: var(--muted); font-size: .8rem; } .kpi em { font-style: normal; color: var(--sev-P1); font-weight: 700; }
.kpi.hot { border-color: color-mix(in srgb, var(--sev-P1) 60%, transparent); background: color-mix(in srgb, var(--sev-P1) 10%, var(--surface)); }
.hourly { margin: 0 0 8px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.hourly figcaption { font-size: .82rem; color: var(--muted); margin-block-end: 8px; } .hourly svg { inline-size: 100%; block-size: 70px; display: block; } .hourly rect { fill: var(--accent); }
.hourly .axis { display: flex; justify-content: space-between; color: var(--muted); font-size: .7rem; margin-block-start: 4px; direction: ltr; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-block: 8px 16px; }
.tiles.small { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { display: grid; justify-items: center; align-content: center; gap: 8px; min-block-size: 92px; padding: 10px 6px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: .8rem; text-align: center; }
.tile svg { inline-size: 26px; block-size: 26px; color: var(--accent); } .tiles.small .tile { min-block-size: 76px; font-size: .74rem; }
.meter { display: inline-block; flex: 1; min-inline-size: 60px; block-size: 8px; border-radius: 99px; background: var(--line); overflow: hidden; vertical-align: middle; }
.meter i { display: block; block-size: 100%; background: var(--accent); border-radius: inherit; }
.bars { list-style: none; margin: 6px 0 16px; padding: 0; display: grid; gap: 10px; } .bars li { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.bars li > span:first-child:not(.pill) { inline-size: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bars b { min-inline-size: 2.5em; text-align: end; font-variant-numeric: tabular-nums; }
.vital-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.vital-list a { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.vital-list li.sev-P1 a { border-color: var(--sev-P1); } .vital-list li.sev-P2 a { border-color: var(--sev-P2); }
.vital-list .mini { display: flex; gap: 10px; font-variant-numeric: tabular-nums; direction: ltr; } .vital-list .mini b { min-inline-size: 2.4em; text-align: center; font-size: .95rem; }
.ai-card { padding: 14px; margin-block-end: 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.ai-card header, .ai-card footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; } .ai-card header a { color: var(--text); text-decoration: none; }
.ai-card dl { display: grid; gap: 6px; margin: 10px 0; } .ai-card dl div { display: grid; grid-template-columns: 6.5em 1fr; align-items: center; gap: 8px; } .ai-card dt { color: var(--muted); font-size: .82rem; }
.ai-card dd { margin: 0; display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; } .ai-card footer small { color: var(--muted); } .ai-card footer span { display: flex; gap: 6px; }
.risk { padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; background: var(--surface2); text-transform: capitalize; }
.risk-high, .risk-critical { background: var(--sev-P1); color: #fff; } .risk-medium, .risk-moderate { background: var(--sev-P3); color: #1a1205; }
.factors { list-style: none; margin: 4px 0 10px; padding: 0; display: grid; gap: 6px; } .factors li { display: flex; align-items: center; gap: 10px; font-size: .85rem; } .factors li span:first-child { inline-size: 45%; text-transform: capitalize; }
.lead { color: var(--sev-P2); font-weight: 600; }
.stack { display: grid; } .check { display: flex; align-items: center; gap: 10px; color: var(--text); } .check input { inline-size: 22px; min-block-size: 22px; }
.picker { min-block-size: 140px; margin-block-end: 14px; }
.id-card { display: grid; justify-items: center; gap: 6px; padding: 20px; margin-block: 8px; border-radius: var(--radius); background: #fff; color: #111; text-align: center; }
.id-card h2 { margin: 0; color: #111; } .id-card .ticket, .id-card .muted { color: #555; } .id-card canvas { inline-size: 220px; block-size: 220px; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; word-break: break-all; direction: ltr; }
.chip.static { display: inline-block; min-block-size: 0; padding: 2px 10px; margin: 2px; font-size: .76rem; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-block-end: 1px solid var(--line); }
.rayan .chat { display: flex; flex-direction: column; gap: 8px; min-block-size: 40vh; max-block-size: calc(100dvh - 300px); overflow-y: auto; padding: 4px 0 12px; }
.msg { max-inline-size: 85%; padding: 10px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); line-height: 1.45; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); } .msg.err { color: var(--sev-P2); }
.composer { display: flex; gap: 8px; align-items: flex-end; } .composer textarea { flex: 1; min-block-size: var(--tap); }
.composer .btn.recording { color: var(--sev-P1); border-color: var(--sev-P1); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .45; } }
@media (min-width: 520px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.server-link { display: block; font-size: .8rem; color: var(--muted); }
#server h2 { margin: 0 0 6px; font-size: 1.2rem; } #server details { margin-block-end: 12px; color: var(--muted); font-size: .85rem; } #server summary { cursor: pointer; padding-block: 8px; }
.descriptor { color: var(--accent); font-weight: 600; } .auth-mark .descriptor { margin: 2px 0 4px; font-size: .95rem; }
.bar-title strong small.descriptor { font-size: .72em; font-weight: 600; margin-inline-start: 4px; }
/* notifications */
.switches { list-style: none; margin: 6px 0 14px; padding: 0; display: grid; gap: 2px; }
.switch { display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 2px; color: var(--text); font-size: .95rem; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; flex: none; inline-size: 46px; block-size: 28px; min-block-size: 0; padding: 0; border-radius: 99px; background: var(--line); border: 0; position: relative; transition: background .15s; }
.switch input::after { content: ""; position: absolute; inset-block-start: 3px; inset-inline-start: 3px; inline-size: 22px; block-size: 22px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--accent); } .switch input:checked::after { transform: translateX(18px); } [dir=rtl] .switch input:checked::after { transform: translateX(-18px); }
.switch input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; } .switch.compact { padding: 0; }
.channel-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-block-end: 1px solid var(--line); list-style: none; }
.channel-row .row-actions { display: flex; align-items: center; gap: 8px; }
.chstate { font-weight: 700; } .ch-on { color: var(--good, #3ccf91); } .ch-ready { color: var(--accent); } .ch-warn { color: var(--sev-P2); } .ch-off { color: var(--muted); }
.channel-row em { color: var(--sev-P2); font-style: normal; }
.dstat-sent { color: var(--good, #3ccf91); } .dstat-failed, .dstat-provider_not_configured { color: var(--sev-P2); } .dstat-no_device, .dstat-channel_disabled, .dstat-cancelled { color: var(--muted); }
.small-note { font-size: .85rem; margin: 10px 0; }
/* Rayan for visitors */
.guest-shell { min-block-size: 100dvh; padding: calc(16px + env(safe-area-inset-top)) var(--gap) calc(20px + env(safe-area-inset-bottom)); max-inline-size: 640px; margin: 0 auto; }
.guest-ask { margin-block-start: 6px; } .guest-ask svg { inline-size: 20px; block-size: 20px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin-block-start: 12px; } .chips.wrap .chip { flex: 0 1 auto; white-space: normal; text-align: start; }
.guest-shell .rayan .chat { max-block-size: calc(100dvh - 260px); }

/* ---- portal-parity screens ---- */
.kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } .kpis.four .kpi { padding: 10px 8px; } .kpis.four .kpi b { font-size: 1.3rem; } .kpis.four .kpi span { font-size: .72rem; }
.kpi.hot b { color: var(--sev-P1); }
.search-row { display: flex; gap: 8px; align-items: center; margin-block: 8px; } .search-row .search-input { flex: 1; min-inline-size: 0; margin: 0; }
.search-input { inline-size: 100%; box-sizing: border-box; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; margin-block: 8px; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-block: 8px; }
.filters select, .stack select, .stack input, .sheet select { inline-size: 100%; box-sizing: border-box; }
.log-row { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 12px 4px; border-block-end: 1px solid var(--line); }
.log-row .who { display: grid; gap: 3px; min-inline-size: 0; } .log-row small { color: var(--muted); overflow-wrap: anywhere; } .log-row small.err { color: var(--danger); }
.log-row .row-actions { display: grid; gap: 6px; justify-items: end; }
.route-card { padding: 12px 14px; margin-block-end: 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--sev-P4); }
.route-card.sev-P1 { border-inline-start-color: var(--sev-P1); } .route-card.sev-P2 { border-inline-start-color: var(--sev-P2); } .route-card.sev-P3 { border-inline-start-color: var(--sev-P3); }
.tiers { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.tiers li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; } .tiers li b { text-transform: capitalize; } .tiers li small { color: var(--muted); grid-column: 1; } .tiers li .btn { grid-row: 1 / span 2; grid-column: 2; }
.checks { border: 0; padding: 0; margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px 14px; } .checks legend { font-weight: 600; margin-block-end: 4px; padding: 0; }
.perm-grid { display: grid; gap: 2px; overflow-x: auto; }
.perm-row { display: grid; grid-template-columns: minmax(7.5em, 1.6fr) repeat(6, minmax(2.6em, 1fr)); align-items: center; gap: 2px; padding: 6px 0; border-block-end: 1px solid var(--line); font-size: .85rem; }
.perm-row.head { font-size: .7rem; color: var(--muted); text-align: center; } .perm-row label { display: flex; justify-content: center; } .perm-row input { inline-size: 20px; block-size: 20px; }
.dot { inline-size: 10px; block-size: 10px; border-radius: 50%; flex: none; background: var(--muted); } .dot.ok { background: var(--good, #1a7f4b); } .dot.off { background: var(--sev-P1); }
.batt { font-variant-numeric: tabular-nums; font-weight: 700; } .batt.low { color: var(--sev-P1); }
.file-pick { cursor: pointer; } .list.compact li { padding: 6px 0; font-size: .9rem; }
.factors.big li { grid-template-columns: minmax(7em, 1fr) 2fr auto; }
.meter.neg i { background: var(--good, #1a7f4b); }
.kv-list { display: grid; gap: 6px; margin: 6px 0 14px; } .kv-list div { display: grid; grid-template-columns: 9em 1fr; gap: 8px; } .kv-list dt { color: var(--muted); text-transform: capitalize; font-size: .85rem; } .kv-list dd { margin: 0; overflow-wrap: anywhere; }
.export-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-block: 8px 20px; }
.actions .btn.ghost.danger { color: var(--danger); }
.pdf-sheet { position: fixed; inset-inline-start: -10000px; inset-block-start: 0; inline-size: 1100px; padding: 24px; background: #fff; color: #111; font: 13px/1.4 system-ui, 'Segoe UI', Tahoma, sans-serif; }
.pdf-sheet h1 { font-size: 20px; margin: 0 0 4px; } .pdf-sheet p { color: #555; margin: 0 0 12px; }
.pdf-sheet table { border-collapse: collapse; inline-size: 100%; } .pdf-sheet th, .pdf-sheet td { border: 1px solid #ccc; padding: 4px 6px; text-align: start; vertical-align: top; } .pdf-sheet th { background: #f0f2f5; }
.list li small a, .list li .who small a { display: inline; padding: 0; min-block-size: 0; border: 0; color: var(--accent); text-decoration: underline; }
.list.compact li { min-block-size: 0; }

/* ---- Rayan: character, greeting, button ---- */
.rayan-head { display: flex; align-items: flex-end; gap: 12px; margin-block: 4px 10px; padding: 10px 12px 0; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface2, var(--surface)), var(--surface)); border: 1px solid var(--line); overflow: hidden; }
.rayan-head h2 { margin: 0 0 2px; } .rayan-head p { margin: 0 0 12px; font-size: .85rem; }
.rayan-character { inline-size: 92px; block-size: auto; object-fit: contain; align-self: flex-end; flex: none; }
.rayan-fab { position: fixed; inset-inline-end: 14px; inset-block-end: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 40; inline-size: 60px; block-size: 60px; border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0,0,0,.35), 0 0 0 3px var(--accent); display: grid; place-items: center; animation: rayan-pop .4s ease-out; }
.rayan-fab img { inline-size: 60px; block-size: 60px; border-radius: 50%; display: block; }
.on-rayan .rayan-fab { display: none; }
.rayan-hello { position: fixed; inset-inline: 12px; inset-block-end: calc(80px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; gap: 10px; align-items: flex-end;
  padding: 14px 14px 0 8px; border-radius: 18px; background: var(--surface); color: var(--text); border: 1px solid var(--accent); box-shadow: 0 12px 32px rgba(0,0,0,.45); animation: rayan-pop .35s ease-out; overflow: hidden; }
.rayan-hello img { inline-size: 96px; block-size: auto; flex: none; align-self: flex-end; }
.rayan-hello > div { padding-block-end: 14px; min-inline-size: 0; } .rayan-hello strong { font-size: 1.05rem; } .rayan-hello p { margin: 4px 0 10px; font-size: .88rem; color: var(--muted); }
.rayan-hello-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rayan-x { position: absolute; inset-block-start: 4px; inset-inline-end: 6px; inline-size: 36px; block-size: 36px; border: 0; background: transparent; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.rayan-hello.leaving { opacity: 0; transform: translateY(16px); transition: .25s; }
.guest-ask img { border-radius: 50%; }
.data-mic-hint { font-size: .8rem; }
.composer [data-mic].recording { background: var(--sev-P1); color: #fff; animation: mic-pulse 1.1s infinite; }
@keyframes rayan-pop { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes mic-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,80,80,.55); } 50% { box-shadow: 0 0 0 10px rgba(255,80,80,0); } }
@media (prefers-reduced-motion: reduce) { .rayan-fab, .rayan-hello, .composer [data-mic].recording { animation: none; } }
/* Arabic brand name beside the English one: EquiSense خيولي · CamelSense إبلي */
.brand-local { font-family: "Reem Kufi", "Noto Kufi Arabic", "Geeza Pro", "Segoe UI", Tahoma, sans-serif; font-weight: 700; color: var(--accent); letter-spacing: 0; margin-inline-start: .3em; font-size: 1.05em; line-height: 1; unicode-bidi: isolate; }
.auth-mark h1 .brand-local { font-size: 1.1em; }
#demoBanner { position: sticky; inset-block-start: 0; z-index: 70; padding-block-start: calc(6px + env(safe-area-inset-top, 0px)); }
#demoBanner a { color: inherit; font-weight: 700; text-decoration: underline; }

/* ---- RIAYAH for schools ---- */
.stack .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stack h3 { margin: 18px 0 4px; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hflags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.hflag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.hflag.allergy { background: rgba(255,176,32,.18); color: #ffcf70; } .hflag.chronic { background: rgba(255,84,112,.16); color: #ff9aa9; }
.student-kv .warn dd { color: #ffcf70; font-weight: 700; }
.trip-card { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid rgba(61,220,151,.45); margin-block: 6px 16px; }
.trip-card header { display: flex; justify-content: space-between; align-items: center; } .trip-card h3 { margin: 10px 0 2px; }
.trip-card .hc { font-size: 1.9rem; color: var(--sev-P1); } .trip-card .hc.all { color: #3ddc97; }
.trip-card li.warn .tstate { color: #ff8a80; } .trip-card .tstate { color: #3ddc97; font-weight: 700; font-size: .85rem; margin-inline-start: auto; }

/* ---- Health schedule and AI alerts (health.js): RIAYAH, RIAYAH Schools, EquiSense, CamelSense.
   Drawn with each app's own tokens; everything rests in its final state, motion only adds life. */
@keyframes h-trace { from { stroke-dashoffset: 640; } to { stroke-dashoffset: 0; } }
@keyframes h-ring { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: var(--off); } }
@keyframes h-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 95, .5); } 70% { box-shadow: 0 0 0 12px rgba(255, 90, 95, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 95, 0); } }
@keyframes h-rise { from { transform: translateY(8px); } to { transform: none; } }
@keyframes h-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.2); } 30% { transform: scale(1); } 45% { transform: scale(1.1); } }
@keyframes h-glow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 35%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
.h-ico { display: inline-grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 11px; color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.h-ico svg { width: 18px; height: 18px; }
.h-ring { transform: rotate(-90deg); flex: 0 0 auto; }
.h-ring circle { fill: none; stroke-width: 4; }
.h-ring .bg { stroke: color-mix(in srgb, var(--muted) 25%, transparent); }
.h-ring .fg { stroke: var(--good); stroke-linecap: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--off); animation: h-ring 1s ease both; }
.h-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-style: normal; font-size: .72rem; font-weight: 800; animation: h-pulse 1.8s ease-out infinite; }
/* family / owner card */
.h-remind { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; padding: 10px 12px; border-radius: 14px; position: relative; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface)); animation: h-rise .4s ease both; }
.h-remind small { display: block; font-size: .74rem; color: var(--muted); }
.h-remind b { display: block; font-size: .9rem; }
.h-remind .dot { position: absolute; inset-inline-end: 10px; top: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); animation: h-pulse 1.8s ease-out infinite; }
.h-chips { display: flex; gap: 8px; overflow-x: auto; margin: 10px 0 0; padding-bottom: 2px; scrollbar-width: none; }
.h-chip { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; max-width: 240px; padding: 8px 10px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--line); animation: h-rise .45s ease both; }
.h-chip small { display: block; font-size: .7rem; color: var(--muted); }
.h-chip b { display: block; font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-chip .h-ico { flex-basis: 28px; width: 28px; height: 28px; border-radius: 9px; }
.h-open, .h-card { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); text-decoration: none; font-weight: 700; }
.h-open > span:nth-child(2) { flex: 1; }
.h-open > svg, .h-card-head > svg { width: 18px; height: 18px; color: var(--muted); }
[dir="rtl"] .h-open > svg, [dir="rtl"] .h-card-head > svg { transform: scaleX(-1); }
.h-card { display: grid; gap: 8px; margin: 14px 0; }
.h-card-head { display: flex; align-items: center; gap: 10px; }
.h-card-head b { flex: 1; }
.h-card .h-chips { margin: 0; }
/* status of a calm card: a faint heartbeat line */
.follow.safe { position: relative; }
.follow.safe header .state::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-end: 6px; border-radius: 50%; background: var(--good); animation: h-glow 2.4s ease-in-out infinite; vertical-align: middle; }
.follow.attention header .state { animation: h-pulse 1.8s ease-out infinite; border-radius: 999px; }
/* the schedule screen */
.h-hero { position: relative; display: grid; gap: 6px; padding: 16px; margin: 6px 0 14px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(260px 120px at 100% 0, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), var(--surface); }
.h-hero h2 { margin: 0; }
.h-hero p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.h-eye { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; color: #a99bff; background: rgba(139, 123, 255, .16); }
.h-eye svg { width: 14px; height: 14px; }
.h-ecg { width: 100%; height: 40px; overflow: visible; }
.h-ecg path { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 640; animation: h-trace 3.2s linear infinite; }
.h-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }
.h-tabs button { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-weight: 700; }
.h-tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.h-today { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.h-today small { display: block; color: var(--muted); }
.h-today b { font-size: 1.6rem; }
.h-doses, .h-vacc, .h-fu, .h-rem { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.h-doses li, .h-vacc li, .h-fu li, .h-rem li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); animation: h-rise .4s ease both; }
.h-doses li > span:nth-child(2), .h-vacc li > span:nth-child(2), .h-rem li > span:last-child { flex: 1; display: grid; gap: 2px; min-width: 0; }
.h-doses small, .h-vacc small, .h-fu small, .h-rem small { color: var(--muted); font-size: .78rem; }
.h-doses .t { min-width: 46px; }
.h-doses li.late, .h-vacc li.late, .h-fu li.missed { border-color: color-mix(in srgb, var(--danger) 55%, var(--line)); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.h-doses li.due { border-color: color-mix(in srgb, var(--sev-P3) 60%, var(--line)); }
.h-doses li.empty, .h-vacc li.empty, .h-fu li.empty, .h-rem li.empty { display: block; color: var(--muted); }
.h-pill { padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; background: color-mix(in srgb, var(--muted) 20%, transparent); white-space: nowrap; }
.h-pill.given, .h-pill.done { background: var(--good); color: #04130d; }
.h-pill.late, .h-pill.missed { background: var(--danger); color: #fff; }
.h-pill.due { background: var(--sev-P3); color: #1b1300; animation: h-beat 1.8s ease-in-out infinite; }
.h-vacc .mark { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--accent); color: #04130d; font-weight: 900; font-size: .8rem; }
.h-vacc li.given .mark { background: var(--good); border-color: var(--good); }
.h-vacc li.late .mark { border-color: var(--danger); }
.h-fu .h-date { display: grid; place-items: center; flex: 0 0 42px; height: 46px; border-radius: 12px; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.h-fu .h-date b { font-size: 1.05rem; line-height: 1; }
.h-fu .h-date small { font-size: .66rem; text-transform: uppercase; color: inherit; }
.h-fu .who { flex: 1; display: grid; gap: 2px; min-width: 0; }
.h-rem li.new { box-shadow: inset 3px 0 0 var(--accent); }
.h-page h3 { margin: 16px 0 8px; font-size: 1rem; }
.h-page h3.h-late { color: var(--danger); }
.h-tile .h-ico { width: 40px; height: 40px; flex-basis: 40px; }
@media (prefers-reduced-motion: reduce) {
  .h-ring .fg, .h-badge, .h-remind, .h-remind .dot, .h-chip, .h-ecg path, .h-pill.due, .h-doses li, .h-vacc li, .h-fu li, .h-rem li, .follow.safe header .state::before, .follow.attention header .state { animation: none !important; }
}
