/* EnlytiX dossier
   Direction: a control room built from safety signage. Cool concrete and night-shift ink,
   one signal cyan for the product, and the severity ladder (slate, blue, amber, red)
   as the only other colours. The camera wall is the one loud element. */

:root {
  --bg: #E7EBEE;
  --surface: #F5F7F8;
  --surface-2: #FFFFFF;
  --ink: #0F1D28;
  --ink-2: #47596A;
  --ink-3: #6C7F8E;
  --line: #CAD3DA;
  --line-2: #DCE3E8;
  --accent: #0A8296;
  --accent-soft: #D3ECF0;
  --on-accent: #FFFFFF;
  --s0: #708797;
  --s1: #3A78DF;
  --s2: #C77F00;
  --s3: #D63B41;
  --s0-bg: #E3E9ED;
  --s1-bg: #E2ECFB;
  --s2-bg: #FBF0D9;
  --s3-bg: #FBE3E3;
  --monitor: #0C151C;
  --shadow: 0 1px 0 rgba(15, 29, 40, .04), 0 8px 24px -12px rgba(15, 29, 40, .18);
  --r-hw: 4px;
  --r-panel: 10px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --f: 'Archivo', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --f-bn: 'Noto Sans Bengali', 'Archivo', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0A131A; --surface: #101C26; --surface-2: #152532; --ink: #E4EDF2; --ink-2: #9DB0BE; --ink-3: #74899A;
  --line: #213443; --line-2: #1A2B38; --accent: #2BC3D5; --accent-soft: #10323B; --on-accent: #04151B;
  --s0: #8EA3B2; --s1: #6BA2FF; --s2: #F2AC1C; --s3: #FF6369;
  --s0-bg: #18262F; --s1-bg: #14243D; --s2-bg: #2C2310; --s3-bg: #331719;
  --monitor: #05090D; --shadow: 0 1px 0 rgba(0,0,0,.3), 0 12px 30px -14px rgba(0,0,0,.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f); font-size: 16px; line-height: 1.55; font-stretch: 100%;
  overflow-x: hidden;
}
:lang(bn), .bn { font-family: var(--f-bn); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }
/* grid and flex children may shrink below their image or text width */
.view :is(div, section, article, aside, figure, form, li, label, fieldset), .view button { min-width: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { margin-top: clamp(48px, 7vw, 88px); }
.muted { color: var(--ink-2); margin: 4px 0 14px; }
.small { font-size: 13px; }
.gap { margin-top: 28px; }

/* ---------- type ---------- */
.display {
  font-size: clamp(34px, 5.4vw, 66px); line-height: 1.02; letter-spacing: -.02em;
  font-weight: 800; font-stretch: 118%; margin: 10px 0 20px; text-wrap: balance;
}
.h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.06; font-weight: 800; font-stretch: 115%; letter-spacing: -.015em; margin: 0 0 12px; text-wrap: balance; }
.h2 { font-size: clamp(23px, 2.6vw, 32px); line-height: 1.15; font-weight: 750; font-stretch: 110%; letter-spacing: -.01em; margin: 0 0 10px; }
.h3 { font-size: 17px; line-height: 1.3; font-weight: 700; margin: 0 0 6px; }
.sub { color: var(--ink-2); max-width: 70ch; margin: 0 0 22px; font-size: 17px; }
.lede { font-size: clamp(16px, 1.4vw, 18.5px); color: var(--ink-2); max-width: 58ch; margin: 0 0 26px; }
.kicker { color: var(--accent); font-weight: 600; margin: 0; font-size: 15px; }
.big { font-size: clamp(34px, 4vw, 52px); font-weight: 800; font-stretch: 120%; line-height: 1; display: block; margin-bottom: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-weight: 650; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-solid { background: var(--accent); color: var(--on-accent); }
.btn-solid:hover { filter: brightness(1.08); }
.btn-line { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-line:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  display: inline-grid; place-items: center; cursor: pointer; flex: none;
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px;
  padding: 10px var(--gutter); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); flex: none; }
.brand-word { font-weight: 800; font-stretch: 120%; font-size: 21px; letter-spacing: -.01em; }
.brand-word span { color: var(--accent); }
.tabs { flex: 1; min-width: 0; position: relative; }
.tabs::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 28px; background: linear-gradient(90deg, transparent, var(--bg)); pointer-events: none; }
.tabs-track { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 2px 24px 2px 2px; }
.tabs-track::-webkit-scrollbar { display: none; }
.tab { font-size: 14px;
  flex: none; padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2);
  text-decoration: none; white-space: nowrap;
}
.tab:hover { color: var(--ink); background: var(--surface); }
.tab[aria-current="page"] { color: var(--on-accent); background: var(--accent); }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }

/* ---------- views ---------- */
.view { padding-bottom: 24px; }
.view-head { padding-top: clamp(28px, 5vw, 56px); padding-bottom: 8px; }
.view.enter > * { animation: viewIn .35s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- hero + camera wall ---------- */
.hero {
  max-width: 1440px; margin: 0 auto; padding: clamp(28px, 5vw, 64px) var(--gutter) clamp(36px, 5vw, 64px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 56px); align-items: center;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.hero-facts { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hero-facts b { display: block; font-size: 20px; font-stretch: 112%; font-weight: 750; }
.hero-facts span { color: var(--ink-2); font-size: 14px; line-height: 1.35; display: block; }

.wall-wrap { background: var(--monitor); border-radius: 8px; padding: 6px; box-shadow: var(--shadow); }
.wall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.cam { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border-radius: 2px; cursor: pointer; border: 0; padding: 0; }
.cam img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) brightness(.92); transition: filter .4s; }
.cam .osd { position: absolute; left: 6px; top: 5px; right: 6px; display: flex; justify-content: space-between; font: 500 10px/1 var(--f-mono); color: #E8F2F6; text-shadow: 0 1px 2px #000; pointer-events: none; }
.cam .osd .rec::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #FF4D4D; margin-right: 4px; vertical-align: 1px; }
.cam .tagline { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 7px 5px; font-size: 11px; font-weight: 650; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.78)); opacity: 0; transform: translateY(4px); transition: .3s; text-align: left; }
.cam.hot img { filter: saturate(1.05) brightness(1); }
.cam.hot .tagline { opacity: 1; transform: none; }
.cam.hot { outline: 2px solid var(--sevc, #F2AC1C); outline-offset: -2px; }

/* reticle boxes: corner brackets only */
.boxes { position: absolute; inset: 0; pointer-events: none; }
.bx { position: absolute; --c: #F2AC1C; }
.bx::before, .bx::after { content: ''; position: absolute; inset: 0; border: 2px solid var(--c); }
.bx::before { clip-path: polygon(0 0, 22% 0, 22% 2px, 2px 2px, 2px 22%, 0 22%, 0 78%, 2px 78%, 2px calc(100% - 2px), 22% calc(100% - 2px), 22% 100%, 0 100%); }
.bx::after { clip-path: polygon(78% 0, 100% 0, 100% 22%, calc(100% - 2px) 22%, calc(100% - 2px) 2px, 78% 2px, 78% calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) 78%, 100% 78%, 100% 100%, 78% 100%); }
.bx span { position: absolute; left: -2px; top: -18px; background: var(--c); color: #111; font: 600 10.5px/1 var(--f-mono); padding: 3px 5px; white-space: nowrap; }
.bx.in { animation: bxIn .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes bxIn { from { transform: scale(1.25); opacity: 0; } to { transform: none; opacity: 1; } }
.bx-big span { font-size: 12px; top: -21px; }

.wall-rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 4px; }
.rail-step { background: #0F1A22; color: #9FB3C1; padding: 9px 10px 10px; border-radius: 2px; min-height: 74px; transition: background .3s; }
.rail-step.on { background: #12303A; color: #E4F3F7; }
.rail-k { display: block; font: 600 11px/1 var(--f-mono); color: #2BC3D5; margin-bottom: 6px; }
.rail-v { font-size: 13px; line-height: 1.35; display: block; }

/* ---------- overview blocks ---------- */
.band { background: var(--surface); border-block: 1px solid var(--line); padding: clamp(40px, 6vw, 72px) 0; }
.problem { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: 18px; }
.problem-item p { margin: 0; color: var(--ink-2); max-width: 36ch; }
.problem-item .big { color: var(--s3); }

.tiers { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: stretch; }
.tier { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 22px 24px; }
.tier-2 { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.tier-head { display: flex; align-items: baseline; gap: 12px; }
.tier-head h3 { font-size: 22px; font-stretch: 112%; margin: 0; }
.tier-n { font: 500 12px var(--f-mono); color: var(--accent); }
.tier p { color: var(--ink-2); margin: 6px 0 12px; }
.tier-arrow { display: grid; place-items: center; align-content: center; gap: 6px; color: var(--ink-3); font-size: 12px; text-align: center; }
.tier-arrow svg { width: 60px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 2; }

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding-left: 22px; margin: 7px 0; }
.ticks li::before { content: ''; position: absolute; left: 2px; top: .55em; width: 9px; height: 5px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

.loop { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: s; border-top: 2px solid var(--ink); }
.loop li { counter-increment: s; padding: 18px 24px 0 0; position: relative; }
.loop li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.loop li::before { content: counter(s); font: 500 13px var(--f-mono); color: var(--accent); }
.loop h3 { font-size: 24px; font-stretch: 115%; margin: 4px 0 8px; }
.loop p { color: var(--ink-2); margin: 0; max-width: 40ch; }

.index { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 32px; }
.index a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.index a:hover { color: var(--accent); }
.index a small { color: var(--ink-3); font-size: 13px; text-align: right; }

/* ---------- panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: clamp(16px, 2.2vw, 24px); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.grid-2 > .panel { min-width: 0; }

/* ---------- severity ---------- */
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; padding: 3px 8px; border-radius: 3px; line-height: 1.2; white-space: nowrap; }
.tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tag-0, .tag-normal { color: var(--s0); background: var(--s0-bg); }
.tag-1, .tag-monitor { color: var(--s1); background: var(--s1-bg); }
.tag-2, .tag-alert { color: var(--s2); background: var(--s2-bg); }
.tag-3, .tag-critical { color: var(--s3); background: var(--s3-bg); }
.tag-3::before { animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.ladder { list-style: none; padding: 0; margin: 0; }
.ladder li { padding: 8px 0 8px 14px; border-left: 4px solid; margin: 6px 0; color: var(--ink-2); font-size: 14px; }
.ladder b { color: var(--ink); display: block; }
.ladder .sev-0 { border-color: var(--s0); } .ladder .sev-1 { border-color: var(--s1); }
.ladder .sev-2 { border-color: var(--s2); } .ladder .sev-3 { border-color: var(--s3); }

/* ---------- live ops ---------- */
.ops { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.ops-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.seg { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg-label { font-size: 13px; color: var(--ink-2); padding: 0 8px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--bg); }

.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ev {
  display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 14px; padding: 10px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--evc, var(--line)); cursor: pointer; text-align: left; width: 100%;
}
.ev:hover { border-color: var(--accent); border-left-color: var(--evc, var(--accent)); }
.ev.sev-2 { --evc: var(--s2); background: color-mix(in srgb, var(--s2-bg) 55%, var(--surface)); }
.ev.sev-3 { --evc: var(--s3); background: color-mix(in srgb, var(--s3-bg) 60%, var(--surface)); }
.ev.sev-1 { --evc: var(--s1); }
.ev.sev-0 { --evc: var(--s0); }
.ev.new { animation: evIn .5s ease both; }
@keyframes evIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.ev-thumb { position: relative; aspect-ratio: 16/9; border-radius: 4px; overflow: hidden; background: #000; }
.ev-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ev-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 3px; }
.ev-cam { font: 500 12px var(--f-mono); color: var(--ink-3); }
.ev h4 { margin: 0 0 3px; font-size: 16px; font-weight: 700; }
.ev p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev .pending { color: var(--ink-3); font-style: italic; }
.ev .pending::after { content: ''; display: inline-block; width: 12px; height: 12px; margin-left: 8px; border: 2px solid var(--ink-3); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.ev .muted-ev { opacity: .55; }

.ops-side { display: grid; gap: 14px; }
.counters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.counter { padding: 10px 12px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-2); }
.counter b { display: block; font-size: 26px; font-stretch: 115%; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.counter span { font-size: 13px; color: var(--ink-2); }
.counter.c3 b { color: var(--s3); } .counter.c2 b { color: var(--s2); }
.steps-mini { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 14.5px; }
.steps-mini li { margin: 8px 0; }
.steps-mini b { color: var(--ink); }
.channels { list-style: none; padding: 0; margin: 0; }
.channels li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
.channels li:last-child { border: 0; }
.channels small { color: var(--ink-3); }
.blip { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; margin-right: 8px; }
.channels li.fired .blip { animation: blip .9s ease 2; background: var(--s2); }
@keyframes blip { 50% { transform: scale(1.9); } }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 16px; top: 72px; z-index: 60; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.toast { background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--tc, var(--accent)); border-radius: 8px; padding: 10px 12px; box-shadow: var(--shadow); display: grid; grid-template-columns: 72px 1fr; gap: 10px; animation: evIn .35s ease both; cursor: pointer; }
.toast img { width: 72px; aspect-ratio: 16/9; object-fit: cover; border-radius: 3px; }
.toast b { display: block; font-size: 14px; }
.toast span { font-size: 12.5px; color: var(--ink-2); }
.toast.out { opacity: 0; transform: translateX(20px); transition: .3s; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal-back { position: absolute; inset: 0; background: rgba(4, 10, 14, .72); }
.modal-card { position: relative; width: min(1040px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.modal-x { position: absolute; right: 12px; top: 12px; z-index: 2; }
.detail { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.detail-media { position: relative; background: #000; align-self: start; }
.detail-media img { width: 100%; }
.detail-body { padding: 22px 22px 24px; }
.detail-body h2 { font-size: 22px; font-stretch: 110%; margin: 8px 0 4px; padding-right: 40px; }
.meta { font: 500 12.5px var(--f-mono); color: var(--ink-3); }
.read { margin: 14px 0; padding: 12px 14px; background: var(--surface-2); border-radius: 6px; border: 1px solid var(--line-2); }
.read q { quotes: none; font-size: 15px; }
.read small { display: block; color: var(--ink-3); font-size: 12px; margin-bottom: 4px; }
.analysis h3 { font-size: 14px; margin: 14px 0 3px; color: var(--accent); }
.analysis p { margin: 0; font-size: 15px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.seg-hint { font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }
.detail-media .bx { pointer-events: auto; cursor: pointer; }
.bx.sel::before, .bx.sel::after { border-color: var(--accent); }
.mask { position: absolute; background: color-mix(in srgb, var(--accent) 34%, transparent); border-radius: 40% 40% 30% 30%; outline: 2px solid var(--accent); animation: bxIn .35s ease both; pointer-events: none; }

/* ---------- zero-shot ---------- */
.chips, .preset-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.chip { border: 1px solid var(--line); background: var(--surface); padding: 7px 13px; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink-2); text-align: left; }
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip[aria-selected="true"], .chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.preset-row .chip { font-weight: 500; font-size: 13.5px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.shot { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer; text-align: left; padding: 0; display: flex; flex-direction: column; }
.shot:hover { border-color: var(--accent); }
.shot-media { position: relative; aspect-ratio: 16/9; background: #000; }
.shot-media img { width: 100%; height: 100%; object-fit: cover; }
.shot-body { padding: 12px 14px 14px; }
.shot-body h3 { font-size: 16px; margin: 6px 0 4px; }
.shot-body p { font-size: 14px; color: var(--ink-2); margin: 0; }
.shot-body p::before { content: 'Read: '; color: var(--ink-3); }

.lab { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px; align-items: start; }
.lab-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: clamp(18px, 2.4vw, 28px); }
.lab-out { background: var(--monitor); color: #DDE9EF; border-radius: var(--r-panel); padding: clamp(18px, 2.4vw, 28px); min-height: 100%; }
.lab-empty { color: #9FB3C1; max-width: 44ch; }
.lab-empty b { color: #E4F3F7; }
.field { display: grid; gap: 6px; margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.field > span, .field legend { font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 0; }
.field.inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
input[type="text"], input[type="search"], select, textarea {
  width: 100%; padding: 11px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
}
textarea { resize: vertical; }
input[type="range"] { accent-color: var(--accent); flex: 1; min-width: 140px; }
.lab-step { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid #1E3442; opacity: 0; transform: translateY(4px); transition: .35s; }
.lab-step.on { opacity: 1; transform: none; }
.lab-step i { font: 500 12px var(--f-mono); color: #2BC3D5; font-style: normal; padding-top: 2px; }
.lab-step b { color: #fff; display: block; margin-bottom: 2px; }
.lab-step p { margin: 0; color: #A9BCC9; font-size: 14px; }
.cpt { display: inline-block; margin: 4px 4px 0 0; padding: 2px 8px; border-radius: 3px; background: #12303A; color: #9EE7F0; font-size: 12.5px; }
.cpt.new { background: #2BC3D5; color: #04151B; font-weight: 650; }
.lab-frames { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.lab-frame { position: relative; aspect-ratio: 16/9; overflow: hidden; border-radius: 3px; background: #000; }
.lab-frame img { width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.lab-frame.hit img { opacity: 1; }
.lab-frame.hit { outline: 2px solid #F2AC1C; outline-offset: -2px; }
.lab-frame em { position: absolute; left: 4px; bottom: 4px; font: 600 10.5px var(--f-mono); font-style: normal; background: rgba(0,0,0,.7); color: #fff; padding: 2px 5px; }
.lab-frame.hit em { background: #F2AC1C; color: #111; }

.profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.profile { border-top: 3px solid var(--ink); padding-top: 12px; }
.profile h3 { font-size: 17px; margin: 0 0 8px; }
.profile ul { margin: 0 0 8px; padding-left: 18px; color: var(--ink-2); font-size: 14.5px; }
.profile .q { font-size: 13.5px; color: var(--ink-2); margin: 6px 0 0; }
.profile .q b { color: var(--ink); font-weight: 600; }
.profile .univ { font-size: 13px; color: var(--ink-3); }

/* ---------- agent ---------- */
.chat-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.chat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); display: flex; flex-direction: column; height: min(72vh, 760px); min-height: 480px; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; }
.msg-user { justify-content: flex-end; }
.bubble { max-width: min(640px, 92%); padding: 11px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); }
.msg-user .bubble { background: var(--accent); color: var(--on-accent); border-color: transparent; border-bottom-right-radius: 3px; }
.msg-bot .bubble { border-bottom-left-radius: 3px; }
.bubble p { margin: 0 0 8px; } .bubble p:last-child { margin: 0; }
.trace { font: 500 12.5px/1.6 var(--f-mono); color: var(--ink-3); margin: 0 0 8px; padding: 0; list-style: none; }
.trace li::before { content: '\2713  '; color: var(--accent); }
.trace li.run::before { content: '\25CB  '; color: var(--ink-3); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 8px 0; }
.mini { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface); cursor: pointer; padding: 0; text-align: left; }
.mini:hover { border-color: var(--accent); }
.mini img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.mini div { padding: 6px 8px 8px; font-size: 12.5px; line-height: 1.3; }
.mini .tag { margin-bottom: 4px; font-size: 11px; }
.bars { margin: 8px 0; display: grid; gap: 5px; }
.bar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 44px; gap: 8px; align-items: center; font-size: 13px; }
.bar i { display: block; height: 10px; background: var(--accent); border-radius: 0 3px 3px 0; transform-origin: left; animation: grow .6s ease both; }
.bar em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
@keyframes grow { from { transform: scaleX(0); } }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: center; }
.chat-input input { flex: 1; min-width: 0; }
.mic.listening { color: var(--s3); border-color: var(--s3); animation: pulse 1s infinite; }
.chat-side .agrp { font-size: 12.5px; color: var(--ink-3); margin: 12px 0 6px; font-weight: 600; }
.chat-side .chip { display: block; width: 100%; margin-bottom: 6px; border-radius: 8px; font-weight: 500; font-size: 13.5px; }
.tools-list { padding-left: 18px; color: var(--ink-2); font-size: 14px; margin: 0; }
.typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); margin-right: 3px; animation: pulse 1s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 600; color: var(--ink-2); padding: 8px 10px; border-bottom: 1.5px solid var(--ink); white-space: nowrap; font-size: 13px; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl td.num { font-variant-numeric: tabular-nums; text-align: right; }
.bubble .tbl { margin: 6px 0; font-size: 13px; }
.plate { font-family: var(--f-bn); font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); padding: 2px 6px; border-radius: 3px; white-space: nowrap; }

/* ---------- search ---------- */
.search-modes { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.search-modes button { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.search-modes button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.searchbar { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 16px; }
.searchbar:focus-within { border-color: var(--accent); }
.searchbar svg { width: 20px; height: 20px; fill: none; stroke: var(--ink-3); stroke-width: 2; flex: none; }
.searchbar input { border: 0; background: transparent; padding: 8px 0; flex: 1; min-width: 0; outline: none; }
.searchbar .preview-face { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.search-meta { color: var(--ink-3); font: 500 13px var(--f-mono); min-height: 20px; margin: 4px 0 12px; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.result { position: relative; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); cursor: pointer; padding: 0; text-align: left; animation: evIn .4s ease both; }
.result:hover { border-color: var(--accent); }
.result img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.result .r-body { padding: 8px 10px 10px; font-size: 13.5px; }
.result .score { position: absolute; right: 6px; top: 6px; font: 600 11.5px var(--f-mono); background: rgba(0,0,0,.72); color: #9EE7F0; padding: 3px 6px; border-radius: 3px; }
.result .rank { position: absolute; left: 6px; top: 6px; font: 600 11.5px var(--f-mono); background: var(--accent); color: var(--on-accent); padding: 3px 6px; border-radius: 3px; }
.result.person img { aspect-ratio: 3/4; object-position: top; }
.photo-pick { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; align-items: center; }
.photo-pick button { border: 2px solid var(--line); border-radius: 6px; padding: 0; background: none; cursor: pointer; overflow: hidden; width: 64px; height: 86px; }
.photo-pick button img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.photo-pick button[aria-pressed="true"] { border-color: var(--accent); }
.sighting { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px; grid-column: 1 / -1; }
.scrub { position: relative; height: 34px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; margin: 10px 0; }
.scrub i { position: absolute; top: 4px; bottom: 4px; width: 6px; background: var(--s2); border-radius: 2px; cursor: pointer; }
.scrub span { position: absolute; bottom: -18px; font: 500 11px var(--f-mono); color: var(--ink-3); }

/* ---------- people ---------- */
.matches { display: grid; gap: 10px; }
.match { display: grid; grid-template-columns: 76px 76px 1fr; gap: 10px; align-items: center; padding: 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-2); }
.match img { width: 76px; height: 76px; object-fit: cover; border-radius: 4px; }
.match figure { margin: 0; position: relative; }
.match figcaption { position: absolute; left: 3px; bottom: 3px; font: 600 9.5px var(--f-mono); background: rgba(0,0,0,.7); color: #fff; padding: 1px 4px; border-radius: 2px; }
.match b { display: block; }
.match small { color: var(--ink-3); display: block; font-size: 12.5px; }
.conf { height: 6px; border-radius: 3px; background: var(--line-2); margin-top: 6px; overflow: hidden; }
.conf i { display: block; height: 100%; background: var(--accent); }
.match.review .conf i { background: var(--s2); }
.clusters { display: grid; gap: 10px; }
.cluster { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); animation: evIn .3s ease both; }
.cluster-faces { display: flex; gap: 4px; flex-wrap: wrap; }
.cluster-faces img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; }
.cluster b { font-size: 14px; display: block; text-align: right; }
.cluster small { color: var(--ink-3); font-size: 12px; }
#clusterOut { font-size: 13px; font-weight: 600; min-width: 70px; }
.reid svg { width: 100%; height: auto; display: block; }
.reid .room { fill: var(--surface-2); stroke: var(--line); }
.reid .rlabel { font: 600 11px var(--f); fill: var(--ink-2); }
.reid .path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 6 5; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -22; } }
.reid .camnode { cursor: pointer; }
.reid .camnode circle { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.reid .camnode.on circle { fill: var(--accent); }
.reid .camnode text { font: 600 10px var(--f-mono); fill: var(--ink); }
.reid-info { display: grid; grid-template-columns: 90px 1fr; gap: 12px; align-items: center; margin-top: 10px; min-height: 120px; }
.reid-info img { width: 90px; height: 120px; object-fit: cover; object-position: top; border-radius: 4px; }
.attr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.attr { position: relative; border-radius: 6px; overflow: hidden; border: 2px solid transparent; background: #000; aspect-ratio: 3/4; transition: opacity .3s, border-color .3s; }
.attr img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.attr.dim { opacity: .25; }
.attr.hit { border-color: var(--accent); }
.attr em { position: absolute; left: 0; right: 0; bottom: 0; font: 600 10px var(--f-mono); font-style: normal; padding: 3px 4px; background: rgba(0,0,0,.72); color: #fff; }
.attr.breach { border-color: var(--s2); }
.attr.breach em { background: var(--s2); color: #111; }
.split-list { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); }

/* ---------- safety ---------- */
.ppe { display: grid; gap: 14px; }
.ppe-row h4 { margin: 0 0 6px; font-size: 14.5px; }
.ppe-items { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ppe-item { font-size: 12.5px; color: var(--ink-2); }
.ppe-item b { display: block; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.ppe-item .conf i { background: var(--s0); }
.ppe-item.low b { color: var(--s2); }
.ppe-item.low .conf i { background: var(--s2); }
.dwell { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.dw { display: grid; grid-template-columns: 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.dw-media { position: relative; aspect-ratio: 16/9; background: #000; }
.dw-media img { width: 100%; height: 100%; object-fit: cover; }
.dw-body { padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.dw-body b { font-size: 15px; }
.dw-timer { font: 600 22px var(--f-mono); font-variant-numeric: tabular-nums; color: var(--s2); text-align: right; }
.dw-body small { color: var(--ink-3); font-size: 12.5px; }
.dw-life { grid-column: 1 / -1; height: 8px; background: var(--line-2); border-radius: 4px; position: relative; margin-top: 6px; overflow: hidden; }
.dw-life i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--s2); }
.dw-life u { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); }
.dw-stats { display: flex; flex-direction: column; gap: 10px; justify-content: center; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.dw-stats div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line-2); padding-bottom: 8px; }
.dw-stats b { font-variant-numeric: tabular-nums; }
.heat { overflow-x: auto; }
.heat svg { min-width: 520px; width: 100%; display: block; }
.heat text { font: 500 10px var(--f-mono); fill: var(--ink-3); }
#thermo svg { width: 100%; display: block; }
#thermo text { font: 500 10px var(--f-mono); fill: var(--ink-3); }
.sop { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sop-q { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.sop-q p { margin: 0 0 8px; font-weight: 600; }
.sop-q small { color: var(--ink-2); display: block; }
.sop-q .silent { color: var(--s2); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 12px; }
.kv div { padding: 10px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-2); }
.kv b { display: block; font-size: 22px; font-stretch: 112%; font-weight: 800; font-variant-numeric: tabular-nums; }
.kv span { font-size: 12.5px; color: var(--ink-2); }

/* ---------- site ---------- */
.draw { position: relative; border-radius: 6px; overflow: hidden; background: #000; }
.draw svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.draw .roi { fill: rgba(43, 195, 213, .14); stroke: #2BC3D5; stroke-width: .35; stroke-dasharray: 1.2 .8; }
.draw .cross { stroke: #F2AC1C; stroke-width: .6; }
.draw .lbl { font: 600 2.4px var(--f); fill: #fff; paint-order: stroke; stroke: #000; stroke-width: .5px; }
.gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.gauge { text-align: center; }
.gauge svg { width: 100%; max-width: 160px; }
.gauge .trk { fill: none; stroke: var(--line-2); stroke-width: 10; }
.gauge .val { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray .8s; }
.gauge b { display: block; font-size: 14px; }
.gauge small { color: var(--ink-3); }
.sensor { list-style: none; padding: 0; margin: 0; }
.sensor li { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); align-items: center; font-size: 14.5px; }
.sensor li:last-child { border: 0; }
.sensor .ic { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); }
.sensor .ic svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sensor small { color: var(--ink-3); display: block; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot.ok { background: #2DB37A; } .dot.warn { background: var(--s2); } .dot.bad { background: var(--s3); }

/* ---------- reports ---------- */
.report-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.radio-cards { display: grid; gap: 8px; }
.rc { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); cursor: pointer; }
.rc:has(input:checked) { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.rc input { accent-color: var(--accent); margin-top: 4px; }
.rc b { display: block; font-size: 14.5px; }
.rc small { color: var(--ink-2); font-size: 13px; display: block; }
.progress { height: 6px; background: var(--line-2); border-radius: 3px; margin-top: 14px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--accent); transition: width .25s; }
.report-side { display: grid; gap: 20px; grid-template-columns: 1fr; }
.route td, .route th { text-align: center; }
.route td:first-child, .route th:first-child { text-align: left; }
.on-dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.off-dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); vertical-align: middle; }
.route button { border: 0; background: none; padding: 4px; cursor: pointer; }
.phone { width: 270px; margin: 0 auto; border-radius: 34px; padding: 12px; background: #0E171E; box-shadow: var(--shadow); position: relative; }
.phone-notch { width: 90px; height: 20px; background: #000; border-radius: 0 0 12px 12px; margin: -12px auto 0; }
.phone-screen { height: 380px; border-radius: 24px; background: linear-gradient(160deg, #173947, #0B1A22 60%); padding: 30px 10px 10px; overflow: hidden; display: flex; flex-direction: column; gap: 8px; }
.phone-time { color: #fff; text-align: center; font-size: 40px; font-weight: 300; font-stretch: 90%; margin-bottom: 8px; }
.push { background: rgba(255,255,255,.88); color: #0F1D28; border-radius: 14px; padding: 9px 10px; font-size: 12px; display: grid; grid-template-columns: 1fr 54px; gap: 8px; animation: evIn .4s ease both; }
.push b { display: block; font-size: 12.5px; }
.push img { width: 54px; height: 40px; object-fit: cover; border-radius: 6px; }
.push small { color: #47596A; display: block; margin-bottom: 2px; font-size: 10.5px; }

/* report document preview */
.doc { background: #fff; color: #17222B; padding: clamp(20px, 4vw, 44px); font-size: 14px; }
.doc h1 { font-size: 26px; font-stretch: 112%; margin: 4px 0; }
.doc h2 { font-size: 16px; margin: 22px 0 8px; border-bottom: 2px solid #17222B; padding-bottom: 4px; }
.doc .doc-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-bottom: 1px solid #CAD3DA; padding-bottom: 12px; }
.doc .doc-head img { width: 40px; }
.doc .doc-meta { color: #47596A; font-size: 13px; }
.doc .doc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.doc .doc-kpis div { border: 1px solid #DCE3E8; padding: 8px; border-radius: 4px; }
.doc .doc-kpis b { display: block; font-size: 22px; }
.doc .doc-ev { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.doc .doc-ev figure { margin: 0; font-size: 11.5px; }
.doc .doc-ev img { aspect-ratio: 16/9; object-fit: cover; width: 100%; border-radius: 3px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 13px; }
.doc td, .doc th { border-bottom: 1px solid #DCE3E8; padding: 6px; text-align: left; }
.doc svg text { font: 500 10px var(--f); fill: #47596A; }
.doc-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 22px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 1; }
.doc-bar { padding-right: 64px; }

/* ---------- insights ---------- */
.insights { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
#graph { width: 100%; height: auto; display: block; }
#graph .edge { stroke: var(--line); stroke-width: 1.2; transition: stroke .2s, opacity .2s; }
#graph .edge.hot { stroke: var(--accent); stroke-width: 2.2; }
#graph .node { cursor: pointer; }
#graph .node circle { stroke: var(--surface); stroke-width: 2; transition: r .2s; }
#graph .node text { font: 600 10.5px var(--f); fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
#graph .node.dim, #graph .edge.dim { opacity: .18; }
#graph .n-cam circle { fill: var(--s1); } #graph .n-zone circle { fill: var(--ink); } #graph .n-cat circle { fill: var(--s2); } #graph .n-ent circle { fill: var(--accent); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }

/* ---------- use cases ---------- */
.usecases { display: grid; gap: 0; }
.uc { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: clamp(18px, 3vw, 40px); padding: 28px 0; border-top: 1px solid var(--line); align-items: start; }
.uc-media { position: relative; border-radius: 6px; overflow: hidden; aspect-ratio: 16/9; background: #000; }
.uc-media img { width: 100%; height: 100%; object-fit: cover; }
.uc h2 { font-size: clamp(21px, 2.2vw, 27px); font-stretch: 112%; margin: 0 0 6px; }
.uc .uc-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 12px; }
.uc h3 { font-size: 13.5px; color: var(--ink-3); margin: 0 0 4px; font-weight: 600; }
.uc ul { margin: 0; padding-left: 18px; font-size: 14.5px; }
.uc li { margin: 4px 0; }
.benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.benefits > div { padding: 18px 0; border-top: 2px solid var(--ink); }
.benefits h3 { font-size: 18px; margin: 0 0 6px; }
.benefits p { margin: 0; color: var(--ink-2); }

/* ---------- deploy ---------- */
.arch { display: grid; grid-template-columns: 1fr 90px 1.2fr 90px 1fr; gap: 0; align-items: stretch; }
.arch-col { display: flex; flex-direction: column; gap: 8px; }
.arch-col h3 { font-size: 14px; color: var(--ink-3); margin: 0 0 2px; font-weight: 600; }
.arch-box { padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-weight: 600; font-size: 14.5px; }
.arch-box small { display: block; font-weight: 400; color: var(--ink-2); font-size: 13px; }
.arch-box.strong { border-width: 1.5px; border-color: var(--ink); }
.arch-box.accent { border-color: var(--accent); background: var(--accent-soft); }
.arch-link { display: grid; place-items: center; position: relative; }
.arch-link::before { content: ''; position: absolute; left: 8px; right: 8px; top: 50%; border-top: 2px dashed var(--accent); }
.arch-link span { position: relative; background: var(--bg); padding: 4px; font-size: 11.5px; color: var(--ink-2); text-align: center; line-height: 1.3; }
.hw { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hw-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); }
.hw-card h3 { font-size: 18px; font-stretch: 110%; margin: 0 0 2px; }
.hw-brand { color: var(--accent); font-weight: 600; font-size: 14px; margin: 0 0 8px; }
.hw-card > p:not(.hw-brand) { color: var(--ink-2); font-size: 14.5px; margin: 0 0 10px; }
.hw-card .ticks { font-size: 14px; }
.timeline { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; }
.timeline::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; border-top: 2px solid var(--ink); }
.timeline li { position: relative; padding: 28px 20px 0 0; }
.timeline li::before { content: ''; position: absolute; left: 0; top: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.timeline .when { font: 500 13px var(--f-mono); color: var(--accent); }
.timeline h3 { margin: 4px 0; font-size: 18px; }
.timeline p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.cta-panel { background: var(--monitor); color: #E4EDF2; border-color: transparent; }
.cta-panel p { color: #A9BCC9; }
.cta-panel a:not(.btn) { color: #6FE0EC; }
.contact { list-style: none; padding: 0; margin: 12px 0 18px; }
.contact li { display: grid; grid-template-columns: 80px 1fr; padding: 6px 0; border-bottom: 1px solid #1E3442; }
.contact span { color: #74899A; font-size: 13.5px; }
.cta-panel .btn-solid { background: #2BC3D5; color: #04151B; }

/* ---------- deck ---------- */
.deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.slide { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface); cursor: zoom-in; padding: 0; text-align: left; }
.slide:hover { border-color: var(--accent); }
.slide img { aspect-ratio: 1707/960; width: 100%; object-fit: cover; }
.slide span { display: block; padding: 8px 12px 10px; font-size: 14px; font-weight: 600; }
.lightbox { background: #000; }
.lightbox img { width: 100%; }
.lightbox-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); }
.lightbox-bar b { font-size: 14.5px; }

/* ---------- pager & footer ---------- */
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 20px; padding-bottom: 20px; border-top: 1px solid var(--line); }
.pager a { display: grid; text-decoration: none; color: var(--ink); padding: 8px 0; max-width: 48%; }
.pager a small { color: var(--ink-3); font-size: 13px; }
.pager a b { font-size: 18px; font-stretch: 110%; }
.pager a:hover b { color: var(--accent); }
.pager .next { text-align: right; margin-left: auto; }
.foot { border-top: 1px solid var(--line); padding: 22px 0 34px; color: var(--ink-3); font-size: 13.5px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.foot-in p { margin: 0; max-width: 70ch; }
.foot-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 650; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hw { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops { grid-template-columns: minmax(0, 1fr); }
  .ops-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat-wrap { grid-template-columns: minmax(0, 1fr); }
  .insights { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .hide-sm { display: none; }
  .tiers { grid-template-columns: 1fr; }
  .tier-arrow { transform: rotate(90deg); padding: 6px 0; }
  .tier-arrow span { display: none; }
  .problem, .loop, .benefits, .timeline { grid-template-columns: 1fr; }
  .loop li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); margin-top: 16px; }
  .timeline::before { display: none; }
  .timeline li { padding: 0 0 18px 28px; }
  .timeline li::before { top: 4px; }
  .grid-2, .lab, .report-wrap, .split-list, .uc, .uc .uc-cols, .detail, .sighting { grid-template-columns: minmax(0, 1fr); }
  .arch { grid-template-columns: 1fr; }
  .arch-link { height: 46px; }
  .arch-link::before { left: 50%; right: auto; top: 4px; bottom: 4px; border-top: 0; border-left: 2px dashed var(--accent); }
  .ops-side { grid-template-columns: 1fr; }
  .ppe-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .topbar { gap: 8px; flex-wrap: wrap; padding-bottom: 6px; }
  .tabs { order: 3; flex-basis: 100%; }
  .top-actions { margin-left: auto; }
  .hero-facts { grid-template-columns: 1fr; gap: 10px; }
  .hero-facts li { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: baseline; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wall .cam:nth-child(n+7) { display: none; }
  .wall-rail { grid-template-columns: 1fr; }
  .rail-step { min-height: 0; }
  .ev { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
  .field-row { grid-template-columns: 1fr; }
  .hw { grid-template-columns: 1fr; }
  .lab-frames { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc .doc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc .doc-ev { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .match { grid-template-columns: 60px 60px 1fr; }
  .match img { width: 60px; height: 60px; }
  .dwell { grid-template-columns: 1fr; }
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result .r-body { font-size: 12.5px; }
  .seg-label { flex-basis: 100%; padding: 4px 8px; }
  .seg { border-radius: 12px; }
  .bar { grid-template-columns: 90px 1fr 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

@media print {
  .topbar, .pager, .foot, .toasts, .modal-back, .modal-x, .doc-bar { display: none !important; }
}
.bx.top span { top: 2px; left: 2px; }
@media (max-width: 560px) { .toasts { top: auto; bottom: 16px; } }
@media (max-width: 1320px) { .hide-sm { display: none; } }

/* PPE frame viewer */
.ppe-view { position: relative; border-radius: 6px; overflow: hidden; background: #000; }
.ppe-view .bx span { font-size: 10px; top: -17px; }
.ppe-view .bx.bx-ok { --c: #2DB37A; }
.ppe-view .bx.bx-bad { --c: #FF6369; }
.ppe-view .bx.dim { opacity: .25; }
.ppe-view .bx { transition: opacity .25s; }
.ppe-pick { display: flex; gap: 8px; margin: 8px 0 4px; }
.ppe-pick button { padding: 0; border: 2px solid var(--line); border-radius: 4px; overflow: hidden; width: 84px; background: none; cursor: pointer; }
.ppe-pick button[aria-pressed="true"] { border-color: var(--accent); }
.attr-grid .attr.breach img { object-fit: cover; }

/* use cases: tier split and "works anywhere" */
.uc-tiers { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.uc-tiers > div:last-child { border-left: 3px solid var(--accent); padding-left: 14px; }
.uc-tiers h3 { font-size: 13.5px; color: var(--ink-3); margin: 0 0 4px; font-weight: 600; }
.uc-tiers ul { margin: 0; font-size: 14.5px; }
.env { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(18px, 3vw, 40px); align-items: start; }
.env-lines { margin: 0 0 10px; padding-left: 18px; }
.env-lines li { margin: 6px 0; font-size: 16px; }
@media (max-width: 860px) { .env, .uc-tiers { grid-template-columns: minmax(0, 1fr); } .uc-tiers > div:last-child { border-left: 0; padding-left: 0; } }

/* use cases: one or two media per row, product screenshots shown uncropped */
.uc-col { display: grid; gap: 12px; align-content: start; }
.uc-media[data-scene] { cursor: pointer; }
.uc-shot { margin: 0; }
.uc-shot button { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; cursor: zoom-in; }
.uc-shot button:hover { border-color: var(--accent); }
.uc-shot img { width: 100%; }
.uc-shot figcaption { font-size: 13px; color: var(--ink-2); margin-top: 6px; }

/* dwell compliance evidence */
.dw-ev { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; }
.dw-ev-img { border-radius: 6px; overflow: hidden; background: #000; }
.dw-ev-img img { width: 100%; }
.dw-ev-main .muted { margin-top: 10px; }
.dw-ev-main .muted b { color: var(--ink); }
/* count */
.count { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; }
.count-zoom { display: block; width: 100%; max-width: 640px; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; cursor: zoom-in; }
.count-zoom:hover { border-color: var(--accent); }
.count-side .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 14px; }
@media (max-width: 860px) { .dw-ev, .count { grid-template-columns: minmax(0, 1fr); } }
.tab { padding: 7px 10px; }
