/* ═══════════════════════════════════════════════════════════════
   UVOE — style.css  v3.1
   Pitch black. White hairline mesh. Dotted-leader info cards.
   Aesthetic locked to reference IMG_5321.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg:        #000000;      /* true black, matches reference */
  --panel:     rgba(10, 10, 10, 0.78);
  --panel-2:   #0A0A0A;
  --accent:    #FFFFFF;       /* primary strokes are white */
  --accent-dim:rgba(255, 255, 255, 0.72);
  --accent-2:  #E5E7EB;
  --mesh:      rgba(255, 255, 255, 0.55);
  --mesh-node: rgba(255, 255, 255, 0.92);
  --text:      #F8FAFC;
  --muted:     rgba(255, 255, 255, 0.52);
  --muted-2:   rgba(255, 255, 255, 0.35);
  --ok:        #22C55E;
  --warn:      #F59E0B;
  --danger:    #EF4444;
  --border:    rgba(255, 255, 255, 0.08);
  --border-2:  rgba(255, 255, 255, 0.18);
  --shadow:    0 12px 48px rgba(0, 0, 0, 0.7);
  --radius-s:  6px;
  --radius-m:  12px;
  --radius-l:  22px;
  --font-body: "Inter", "SF Pro", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--muted); }

/* ─── Nav ─── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 40;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 17px;
  letter-spacing: 0.18em;
  color: var(--text);
  text-transform: uppercase;
}
.brand .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
.nav-actions { display: flex; gap: 10px; }
.btn-ghost {
  color: var(--muted); font-size: 13px; padding: 6px 10px;
  border-radius: var(--radius-s);
  letter-spacing: 0.04em;
}
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.04); }

/* ─── Hero (landing) ─── */
.hero {
  padding: 70px 22px 40px;
  text-align: center;
  max-width: 720px; margin: 0 auto;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 48px; line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}
.hero h1 .accent {
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
}
.hero .tag {
  display: inline-block;
  color: var(--muted);
  padding: 4px 0;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase; margin-bottom: 26px;
  position: relative;
}
.hero .tag::before, .hero .tag::after {
  content: "";
  display: inline-block;
  width: 22px; height: 1px;
  background: var(--muted-2);
  vertical-align: middle;
  margin: 0 12px;
}
.hero p.sub {
  color: var(--muted); font-size: 16px; line-height: 1.65;
  max-width: 520px; margin: 0 auto 32px;
}
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 99px;
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: var(--accent); color: #000;
  border-color: var(--accent);
}
.btn-primary:hover { background: transparent; color: var(--accent); transform: translateY(-1px); }
.btn-secondary {
  background: transparent; color: var(--text);
  border-color: var(--border-2);
}
.btn-secondary:hover { border-color: var(--accent); }

/* ─── Feature grid ─── */
.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px; padding: 30px 18px 60px; max-width: 1000px; margin: 0 auto;
  background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.card {
  background: var(--bg);
  padding: 28px 22px; border-radius: 0;
}
.card h3 {
  color: var(--text); font-size: 14px;
  font-family: var(--font-mono);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 10px;
}
.card p { color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ─── Motion / mode HUD (top-centre pill) ─── */
.motion-hud {
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  padding: 5px 14px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.12em;
  backdrop-filter: blur(10px);
  pointer-events: none;
}

/* ─── Privacy telemetry HUD (bottom-overlay on scan page) ─── */
.privacy-hud {
  position: absolute; left: 14px; bottom: 12px;
  z-index: 5;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.06em;
  backdrop-filter: blur(10px);
  pointer-events: auto;
}
.privacy-hud .bytes-label {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.14em;
}
.privacy-hud .eph-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border-2);
  border-radius: 99px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: all 0.15s ease;
}
.privacy-hud .eph-btn:hover  { color: var(--text); }
.privacy-hud .eph-btn.active {
  color: #000;
  background: var(--accent);
  border-color: var(--accent);
}

/* ─── Scan page — camera UI ─── */
.scan-shell {
  display: flex; flex-direction: column; height: 100vh;
  max-height: 100vh; overflow: hidden;
  background: #000;
}
.stage {
  position: relative; flex: 1; min-height: 0;
  background: #000; overflow: hidden;
}
.stage video,
.stage canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.stage canvas { pointer-events: none; }

/* Minimal top status bar (match reference — just mode name, no pills) */
.hud {
  position: absolute; left: 0; right: 0; top: 0;
  padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: center;
  pointer-events: none; z-index: 2;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.hud .hud-left,
.hud .hud-right {
  display: inline-flex; align-items: center; gap: 8px;
}
.hud .live-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
}

/* Corner brackets — reference frames the subject with four corner ticks */
.corners {
  position: absolute; inset: 58px 32px 220px 32px;
  pointer-events: none; z-index: 1;
}
.corners::before,
.corners::after,
.corners > .bl,
.corners > .br {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.45);
}
.corners::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.corners::after  { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.corners > .bl   { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.corners > .br   { bottom: 0; right: 0; border-left: 0; border-top: 0; }

/* ─── Observation card (match reference: top-left anchored, dotted leaders) ─── */
.observation-card {
  position: absolute; left: 16px; top: 56px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-m);
  padding: 14px 16px 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  min-width: 240px; max-width: 62%;
  transform: translateY(-6px); opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
  pointer-events: auto;
}
.observation-card.visible { transform: translateY(0); opacity: 1; }
.observation-card .icon {
  display: inline-flex;
  width: 28px; height: 28px;
  align-items: center; justify-content: center;
  margin-bottom: 10px;
  color: var(--text);
}
.observation-card .icon svg {
  width: 24px; height: 24px;
  stroke: var(--accent); stroke-width: 1.2;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
}
.observation-card .title {
  display: block;
  font-size: 11px; font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.observation-card .subject {
  display: block;
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600;
  color: var(--accent);
  margin-bottom: 2px;
}
.observation-card .subject .hint {
  color: var(--muted);
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 400;
  margin-left: 6px;
  letter-spacing: 0.04em;
}

/* Dotted-leader rows (the menu-style dots between label and value) */
.observation-card .details-list {
  display: flex; flex-direction: column;
  gap: 2px; margin-top: 10px;
}
.observation-card .details-list .kv {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 4px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}
.observation-card .details-list .kv .k {
  white-space: nowrap;
}
.observation-card .details-list .kv .dots {
  overflow: hidden;
  color: var(--muted-2);
  letter-spacing: 2px;
  padding-bottom: 2px;
  line-height: 1;
  font-size: 10px;
  white-space: nowrap;
}
.observation-card .details-list .kv .v {
  color: var(--text);
  font-family: var(--font-mono);
  white-space: nowrap;
}
.observation-card .latency {
  font-family: var(--font-mono); font-size: 10px; color: var(--muted-2);
  margin-top: 10px; display: block;
  letter-spacing: 0.05em;
}

/* Bottom shutter button (big white circle, matches reference) */
.shutter-wrap {
  position: absolute; left: 0; right: 0; bottom: 140px;
  z-index: 4; display: flex; justify-content: center;
  pointer-events: none;
}
.shutter-btn {
  pointer-events: auto;
  width: 68px; height: 68px; border-radius: 50%;
  background: #FFFFFF;
  border: none;
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.7),
    0 0 0 4px rgba(255, 255, 255, 0.35),
    0 10px 30px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
}
.shutter-btn:active { transform: scale(0.92); background: #E5E7EB; }

/* ─── Control bar (bottom) ─── */
.controls {
  position: relative; z-index: 4;
  background: #000;
  border-top: 1px solid var(--border);
  padding: 10px 14px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.mode-row {
  display: flex; gap: 6px; align-items: center;
  background: rgba(255,255,255,0.04);
  padding: 4px;
  border-radius: 99px;
}
.mode-btn {
  flex: 1; padding: 9px 12px;
  background: transparent; color: var(--muted);
  border: none; border-radius: 99px;
  font-size: 12px; font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.mode-btn.active {
  background: var(--accent); color: #000;
}
.prompt-pills {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: none;
}
.prompt-pills::-webkit-scrollbar { display: none; }
.pill {
  flex: 0 0 auto;
  padding: 7px 14px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border-2);
  border-radius: 99px;
  font-size: 12px; font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.pill:hover { color: var(--text); border-color: var(--accent); }

.chat-row {
  display: flex; gap: 8px;
}
.chat-input {
  flex: 1; padding: 11px 16px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 14px; font-family: var(--font-body);
  outline: none;
}
.chat-input::placeholder { color: var(--muted-2); }
.chat-input:focus { border-color: var(--accent); background: rgba(255,255,255,0.07); }
.send-btn {
  padding: 0 18px;
  background: var(--accent); color: #000;
  border: none; border-radius: 99px;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s ease;
}
.send-btn:hover { background: rgba(255,255,255,0.85); }
.send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Android-style nav hint bar at the very bottom (optional, for screenshot parity) */
.nav-hint {
  display: none;
  height: 28px;
  background: #000;
  border-top: 1px solid rgba(255,255,255,0.04);
  align-items: center; justify-content: space-around;
  color: var(--muted-2);
  padding: 0 24px;
}
.nav-hint span {
  display: inline-block;
  font-size: 13px;
}

/* ─── Chat response overlay ─── */
.chat-response {
  position: absolute; left: 14px; right: 14px; top: 56px; bottom: 230px;
  z-index: 5;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-m);
  padding: 20px; overflow-y: auto;
  backdrop-filter: blur(18px);
  display: none;
}
.chat-response.visible { display: block; }
.chat-response .close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: var(--muted);
  font-size: 22px; cursor: pointer;
  line-height: 1;
}
.chat-response .close:hover { color: var(--text); }
.chat-response .intent-tag {
  display: inline-block;
  background: transparent; color: var(--accent);
  padding: 2px 0;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; font-weight: 500;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-2);
  padding-bottom: 8px;
}
.chat-response .answer {
  white-space: pre-wrap; font-size: 14.5px; line-height: 1.6;
  color: var(--text);
}
.chat-response .meta {
  font-family: var(--font-mono); font-size: 10px; color: var(--muted-2);
  margin-top: 16px; padding-top: 12px;
  border-top: 1px solid var(--border);
  letter-spacing: 0.05em;
}

/* ─── Toast ─── */
.toast {
  position: fixed; bottom: 230px; left: 50%; transform: translateX(-50%) translateY(60px);
  background: rgba(0, 0, 0, 0.9);
  color: var(--text);
  padding: 10px 18px; border-radius: 99px;
  border: 1px solid var(--border-2);
  font-size: 12px; font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0; transition: all 220ms ease;
  pointer-events: none; z-index: 60;
}
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.warn { border-color: var(--warn); color: var(--warn); }
.toast.err  { border-color: var(--danger); color: var(--danger); }

/* ─── Privacy / Index body ─── */
.page {
  max-width: 680px; margin: 0 auto;
  padding: 40px 22px 80px;
}
.page h2 {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.page h3 {
  font-size: 13px; margin-top: 28px; margin-bottom: 10px;
  color: var(--text);
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.page p, .page li {
  color: var(--muted); font-size: 15px; line-height: 1.7; margin-bottom: 10px;
}
.page ul { padding-left: 20px; }
.page strong { color: var(--text); font-weight: 500; }
.page .sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.footer {
  text-align: center; padding: 24px 14px;
  color: var(--muted-2); font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  border-top: 1px solid var(--border);
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
  .hero { padding: 50px 22px 30px; }
  .hero h1 { font-size: 36px; }
  .hero p.sub { font-size: 15px; }
  .observation-card { max-width: 70%; min-width: 220px; }
  .features { grid-template-columns: 1fr; }
  .page h2 { font-size: 26px; }
}

/* ═══════════════════════════════════════════════════════════════
   UVPS v1.0.1 — Mobile-native scan UI
   ═══════════════════════════════════════════════════════════════ */

/* Hide legacy controls we're keeping only for JS binding compatibility */
.hidden-control {
  position: fixed !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Full-bleed shell */
.scan-shell {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
}

/* Camera is behind everything, edge to edge */
.scan-shell > #camera,
.scan-shell > #overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 1;
}
.scan-shell > #overlay {
  pointer-events: none;
}

/* Top HUD */
.top-hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
  pointer-events: none;
}
.top-hud > * { pointer-events: auto; }

.brand-mark {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: #F8FAFC;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #2DD4BF;
  box-shadow: 0 0 8px #2DD4BF;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.top-hud-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mode-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(248,250,252,0.7);
  background: rgba(0,0,0,0.4);
  padding: 4px 10px;
  border-radius: 10px;
  backdrop-filter: blur(8px);
}
.flip-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(248,250,252,0.2);
  color: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform 0.2s;
}
.flip-btn:active { transform: scale(0.9); }

/* Motion pill (top center, below hud) */
.motion-pill {
  position: fixed;
  top: calc(max(12px, env(safe-area-inset-top)) + 44px);
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(248,250,252,0.85);
  background: rgba(0,0,0,0.5);
  padding: 6px 14px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  z-index: 9;
  pointer-events: none;
}

/* Privacy chip (below motion pill, subtle) */
.privacy-chip {
  position: fixed;
  top: calc(max(12px, env(safe-area-inset-top)) + 76px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(248,250,252,0.6);
  background: rgba(0,0,0,0.35);
  padding: 4px 10px;
  border-radius: 10px;
  backdrop-filter: blur(8px);
  z-index: 9;
}
.eph-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(248,250,252,0.25);
  border: none;
  cursor: pointer;
  padding: 0;
}
.eph-dot.active {
  background: #2DD4BF;
  box-shadow: 0 0 6px #2DD4BF;
}

/* Observation drawer — slides up from bottom */
.obs-drawer {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 96px;
  max-height: 45vh;
  background: rgba(17,24,39,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(45,212,191,0.25);
  border-radius: 20px;
  z-index: 15;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  overflow: hidden;
}
.obs-drawer.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.drawer-handle {
  width: 36px;
  height: 4px;
  background: rgba(248,250,252,0.2);
  border-radius: 2px;
  margin: 10px auto 0;
}
.drawer-content {
  padding: 12px 18px 18px;
}
.obs-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.obs-head .icon {
  color: #2DD4BF;
  display: flex;
}
.obs-head .title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #2DD4BF;
  flex: 1;
}
.obs-head .latency {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(248,250,252,0.5);
}
.subject {
  font-size: 18px;
  font-weight: 500;
  color: #F8FAFC;
  margin-bottom: 6px;
}
.subject .hint {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: rgba(248,250,252,0.6);
  margin-top: 2px;
}
.details-list {
  font-size: 13px;
  color: rgba(248,250,252,0.85);
  line-height: 1.55;
}
.details-list > * { margin-top: 6px; }

/* AI orb — floating chat launcher */
.ai-orb {
  position: fixed;
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + 20px);
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2DD4BF, #0EA5E9);
  border: none;
  color: #0B0F14;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(45,212,191,0.5), 0 0 0 4px rgba(45,212,191,0.15);
  cursor: pointer;
  z-index: 20;
  transition: transform 0.2s;
}
.ai-orb:active { transform: scale(0.92); }

/* Chat sheet (bottom drawer) */
.chat-sheet {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(17,24,39,0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(45,212,191,0.3);
  border-radius: 24px 24px 0 0;
  z-index: 25;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.chat-sheet.open {
  transform: translateY(0);
}
.sheet-handle {
  width: 44px;
  height: 4px;
  background: rgba(248,250,252,0.25);
  border-radius: 2px;
  margin: 10px auto 0;
}
.sheet-content {
  padding: 14px 20px 24px;
}
.sheet-title {
  font-size: 16px;
  font-weight: 600;
  color: #F8FAFC;
  margin-bottom: 4px;
}
.sheet-hint {
  font-size: 12px;
  color: rgba(248,250,252,0.55);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.sheet-input-row {
  display: flex;
  gap: 10px;
}
.chat-input {
  flex: 1;
  background: rgba(11,15,20,0.8);
  border: 1px solid rgba(45,212,191,0.25);
  border-radius: 14px;
  color: #F8FAFC;
  padding: 12px 16px;
  font-size: 15px;
  font-family: Inter, sans-serif;
  outline: none;
}
.chat-input:focus {
  border-color: #2DD4BF;
}
.send-btn {
  background: #2DD4BF;
  color: #0B0F14;
  border: none;
  border-radius: 14px;
  padding: 0 22px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.send-btn:active { transform: scale(0.95); }

/* Chat response overlay (top sheet) */
.chat-response {
  position: fixed;
  top: calc(max(12px, env(safe-area-inset-top)) + 120px);
  left: 12px;
  right: 12px;
  background: rgba(17,24,39,0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(45,212,191,0.3);
  border-radius: 18px;
  padding: 16px 18px;
  z-index: 18;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  max-height: 50vh;
  overflow-y: auto;
}
.chat-response.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.chat-response .close {
  position: absolute;
  top: 10px; right: 12px;
  background: none;
  border: none;
  color: rgba(248,250,252,0.6);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.chat-response .intent-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #2DD4BF;
  margin-bottom: 6px;
}
.chat-response .answer {
  font-size: 14.5px;
  line-height: 1.55;
  color: #F8FAFC;
}
.chat-response .meta {
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: rgba(248,250,252,0.4);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(17,24,39,0.92);
  border: 1px solid rgba(45,212,191,0.3);
  color: #F8FAFC;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  z-index: 30;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.err {
  border-color: #EF4444;
  color: #FCA5A5;
}

/* Hide chat pills completely on mobile — pills container is hidden-control */

/* Safe area padding on iOS notch/home bar */
@supports (padding: env(safe-area-inset-top)) {
  .scan-shell {
    padding-top: 0;
    padding-bottom: 0;
  }
}

/* ═══════════════════════════════════════════════════════════════
   v1.0.1 UI fixes — hide global nav on /scan, force drawer above video
   ═══════════════════════════════════════════════════════════════ */

/* Hide the base.html navbar/header when inside scan-shell */
body:has(.scan-shell) > nav,
body:has(.scan-shell) > header,
body:has(.scan-shell) > .navbar,
body:has(.scan-shell) > .top-nav,
body:has(.scan-shell) > .site-header,
.scan-shell ~ nav,
.scan-shell ~ header {
  display: none !important;
}

/* Remove any top padding on body when scan-shell is active */
body:has(.scan-shell) {
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden;
}

/* Force the obs drawer ABOVE the video on mobile */
.obs-drawer {
  z-index: 30 !important;
}

/* Make drawer show immediately on first placeholder state */
.obs-drawer.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

/* The default state — drawer hidden until class "visible" applied */
.obs-drawer:not(.visible) {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

/* If :has() isn't supported (older Safari), nuke the nav explicitly via classes */
.scan-shell nav,
.scan-shell .navbar,
.scan-shell .top-nav {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   v1.0.1 patch 2: hide base nav on scan (explicit, no :has needed)
   ═══════════════════════════════════════════════════════════════ */

/* When scan shell is in the DOM, hide the base nav by structural position.
   base.html puts <nav class="nav"> before scan-shell, then footer after. */
.scan-shell ~ * { display: none !important; }
nav.nav:has(+ * .scan-shell),
nav.nav { position: relative; }
body > nav.nav { display: none !important; }
body > .footer { display: none !important; }

/* Re-enable nav on pages that DON'T have scan-shell */
body:not(:has(.scan-shell)) > nav.nav { display: flex !important; }
body:not(:has(.scan-shell)) > .footer { display: block !important; }

/* Phone-line observation rows (mobile-native) */
.details-list .phone-line {
  font-size: 14.5px;
  line-height: 1.5;
  color: #F8FAFC;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.details-list .phone-line:first-child {
  font-weight: 500;
  color: #2DD4BF;
}
.details-list .phone-line:last-child { border-bottom: none; }
