:root {
  /* Swap these 4 variables to match the real company logo. */
  --brand-primary: #00d1ff;
  --brand-secondary: #7c3aed;
  --brand-accent: #22c55e;
  --brand-danger: #ef4444;
  --bg: #080d1a;
  --bg-2: #111827;
  --panel: rgba(17, 24, 39, 0.82);
  --panel-solid: #111827;
  --line: rgba(148, 163, 184, 0.25);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --muted-2: #64748b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--sans); }
body { margin: 0; min-height: 100%; background:
  radial-gradient(circle at 12% 10%, rgba(0, 209, 255, .22), transparent 28rem),
  radial-gradient(circle at 82% 0%, rgba(124, 58, 237, .26), transparent 24rem),
  linear-gradient(135deg, #070b14 0%, #0d1426 55%, #070b14 100%);
}

a { color: inherit; text-decoration: none; }
button, select, input, textarea { font: inherit; }
code { font-family: var(--mono); color: #bae6fd; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: .85rem clamp(1rem, 2.5vw, 2rem);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 13, 26, 0.78);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: .75rem; min-width: 0; }
.brand-logo { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 0 24px rgba(0,209,255,.25); }
.brand strong { display: block; line-height: 1; }
.brand small { display: block; margin-top: .25rem; color: var(--muted); font-size: .78rem; }
.topnav { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: flex-end; }
.topnav a { color: var(--muted); font-size: .93rem; padding: .45rem .7rem; border: 1px solid transparent; border-radius: 999px; }
.topnav a:hover, .topnav a.active { color: var(--text); border-color: var(--line); background: rgba(255,255,255,.05); }

.shell { width: min(1440px, 100%); margin: 0 auto; padding: clamp(1rem, 2vw, 2rem); }
.landing { display: grid; gap: 1rem; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.glass { backdrop-filter: blur(18px); }
.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: 2rem; padding: clamp(1.25rem, 4vw, 3rem); overflow: hidden; }
.eyebrow { color: var(--brand-primary); text-transform: uppercase; letter-spacing: .16em; font-size: .77rem; font-weight: 800; }
h1, h2, h3 { margin: 0 0 .65rem; line-height: 1.05; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 6vw, 4.7rem); max-width: 980px; }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); }
h3 { font-size: 1.02rem; }
p { color: var(--muted); line-height: 1.6; }
.lead { font-size: clamp(1rem, 2vw, 1.25rem); max-width: 860px; }
.action-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.07);
  color: var(--text);
  border-radius: 14px;
  padding: .75rem 1rem;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.button:hover { transform: translateY(-1px); border-color: rgba(0,209,255,.55); background: rgba(255,255,255,.11); }
.button.primary { background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary)); color: white; border-color: transparent; font-weight: 800; }
.button.warn { background: rgba(239, 68, 68, .14); border-color: rgba(239, 68, 68, .45); color: #fecaca; }
.button.good { background: rgba(34, 197, 94, .14); border-color: rgba(34, 197, 94, .45); color: #bbf7d0; }
.button.full { width: 100%; }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.hero-card { min-height: 360px; position: relative; border-radius: 28px; overflow: hidden; border: 1px solid rgba(255,255,255,.12); background: #0b1224; display: grid; place-items: end center; padding: 1.25rem; }
.hero-card p { position: relative; z-index: 2; text-align: center; color: #cbd5e1; margin: 0; }
.scan-grid { position: absolute; inset: 0; background:
    linear-gradient(rgba(0,209,255,.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,209,255,.13) 1px, transparent 1px),
    radial-gradient(circle at 50% 60%, rgba(34,197,94,.2), transparent 25%),
    linear-gradient(180deg, rgba(124,58,237,.24), transparent 55%);
  background-size: 38px 38px, 38px 38px, auto, auto;
  transform: perspective(600px) rotateX(54deg) scale(1.8);
  transform-origin: 50% 90%;
}
.radar-dot { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--brand-primary); box-shadow: 0 0 28px var(--brand-primary); }
.radar-dot.d1 { left: 28%; top: 45%; }
.radar-dot.d2 { left: 63%; top: 36%; background: var(--brand-accent); box-shadow: 0 0 28px var(--brand-accent); }
.radar-dot.d3 { left: 74%; top: 58%; background: #f59e0b; box-shadow: 0 0 28px #f59e0b; }

.cards.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.card { padding: 1.25rem; display: flex; flex-direction: column; }
.card p { flex: 0; }
.tag { align-self: start; color: var(--brand-primary); background: rgba(0,209,255,.08); border: 1px solid rgba(0,209,255,.28); border-radius: 999px; padding: .3rem .65rem; font-size: .8rem; font-weight: 700; margin-bottom: .85rem; }
.checklist { margin: 1rem 0 1.25rem; padding: 0; list-style: none; color: #cbd5e1; display: grid; gap: .55rem; }
.checklist li { padding-left: 1.55rem; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--brand-accent); font-weight: 900; }
.notes { padding: 1.25rem; }
.footer { color: var(--muted-2); text-align: center; padding: 1rem 1rem 2rem; font-size: .9rem; }

.app-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1rem; align-items: start; }
.stage { padding: .75rem; }
.video-wrap { position: relative; width: 100%; min-height: 56vw; max-height: calc(100vh - 180px); aspect-ratio: 16/9; background: #020617; border-radius: calc(var(--radius) - 6px); overflow: hidden; border: 1px solid var(--line); }
.video-wrap video, .video-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.video-wrap video { z-index: 1; transform: translateZ(0); }
.video-wrap canvas { z-index: 2; pointer-events: auto; }
.status-pill { position: absolute; left: .75rem; top: .75rem; z-index: 5; padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(8,13,26,.72); backdrop-filter: blur(10px); color: #cbd5e1; font-size: .82rem; }
.stage-controls { display: flex; gap: .55rem; flex-wrap: wrap; margin-top: .75rem; }
.side { display: grid; gap: 1rem; }
.side .panel, .stage .panel { padding: 1rem; }
.control-grid { display: grid; gap: .65rem; }
.control-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label.field { display: grid; gap: .35rem; color: var(--muted); font-size: .82rem; }
select, input, textarea { width: 100%; color: var(--text); background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 12px; padding: .65rem .7rem; outline: none; }
input[type="range"] { padding: 0; accent-color: var(--brand-primary); }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.metric { background: rgba(255,255,255,.055); border: 1px solid var(--line); border-radius: 14px; padding: .75rem; min-height: 76px; }
.metric strong { display: block; font-size: 1.12rem; color: #fff; margin-top: .25rem; overflow-wrap: anywhere; }
.metric small { color: var(--muted); }
.logbox { max-height: 180px; overflow: auto; background: rgba(2,6,23,.55); border: 1px solid var(--line); border-radius: 14px; padding: .75rem; font-family: var(--mono); font-size: .75rem; color: #cbd5e1; white-space: pre-wrap; }
.packet { min-height: 170px; }
.path-decision { display: grid; gap: .6rem; }
.bar { display: grid; grid-template-columns: 72px 1fr 52px; gap: .5rem; align-items: center; color: #cbd5e1; font-size: .86rem; }
.track { background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 999px; height: 12px; overflow: hidden; }
.fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--brand-accent), #f59e0b, var(--brand-danger)); }
.suggestion { padding: .85rem; border-radius: 16px; border: 1px solid rgba(34,197,94,.35); background: rgba(34,197,94,.1); color: #dcfce7; font-weight: 800; text-align: center; }
.suggestion.stop { border-color: rgba(239,68,68,.55); background: rgba(239,68,68,.12); color: #fee2e2; }
.suggestion.caution { border-color: rgba(245,158,11,.55); background: rgba(245,158,11,.12); color: #ffedd5; }

.dual-view { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.mini-video { position: relative; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; background: #020617; border: 1px solid var(--line); }
.mini-video video, .mini-video canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.mini-video span { position: absolute; left: .5rem; top: .5rem; z-index: 5; color: #cbd5e1; font-size: .75rem; background: rgba(2,6,23,.6); padding: .25rem .45rem; border-radius: 999px; }

.diagram-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.diagram-card { border: 1px solid var(--line); background: rgba(255,255,255,.045); border-radius: 16px; padding: .6rem; }
.diagram-card img { width: 100%; display: block; border-radius: 12px; background: #020617; }
.diagram-card p { margin: .5rem 0 0; font-size: .82rem; line-height: 1.4; }

.report-list { display: grid; gap: .5rem; max-height: 240px; overflow: auto; }
.report-item { border: 1px solid var(--line); background: rgba(255,255,255,.05); border-radius: 14px; padding: .65rem; font-size: .86rem; color: #cbd5e1; }
.report-item strong { color: #fff; }

.notice { border: 1px solid rgba(245,158,11,.34); background: rgba(245,158,11,.1); border-radius: 16px; padding: .85rem; color: #ffedd5; }
.notice p { margin: 0; color: inherit; }
.kbd { font-family: var(--mono); font-size: .8rem; border: 1px solid var(--line); background: rgba(255,255,255,.08); padding: .12rem .35rem; border-radius: .35rem; }

@media (max-width: 1050px) {
  .hero, .cards.two, .app-grid { grid-template-columns: 1fr; }
  .video-wrap { min-height: auto; max-height: none; }
}
@media (max-width: 640px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .topnav { justify-content: flex-start; }
  .brand-logo { width: 36px; height: 36px; }
  .stage { padding: .5rem; }
  .side .panel, .stage .panel { padding: .85rem; }
  .control-grid.two, .metric-grid, .dual-view, .diagram-grid { grid-template-columns: 1fr; }
  .button { width: 100%; }
}
