:root {
  color-scheme: dark;
  --ink: #f5f7f2;
  --muted: #9fa7a1;
  --ground: #0a0d0c;
  --panel: #121715;
  --panel-2: #18201d;
  --line: #2b3531;
  --acid: #c6ff3d;
  --cyan: #61dbe8;
  --warning: #ffb84d;
  --danger: #ff6b61;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Outfit", system-ui, sans-serif;
  letter-spacing: 0;
}
button, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.page-shell { width: 100%; max-width: 100%; overflow-x: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  width: min(1500px, calc(100% - 32px));
  height: 64px;
  margin: 12px auto 0;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 13, 12, .88);
  border: 1px solid rgba(198, 255, 61, .2);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.brand-mark { width: 12px; height: 12px; background: var(--acid); box-shadow: 0 0 20px rgba(198, 255, 61, .6); }
.nav-links { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 14px; }
.nav-links a:hover { color: var(--ink); }
.icon-command, .text-command { color: var(--ink); background: transparent; display: inline-flex; align-items: center; gap: 8px; padding: 8px; }
.icon-command svg { width: 17px; height: 17px; }

.hero {
  width: min(1500px, calc(100% - 32px));
  min-height: 555px;
  margin: 0 auto;
  padding: 72px 0 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr);
  gap: clamp(48px, 7vw, 112px);
  align-items: center;
}
.hero-copy { max-width: 1100px; }
.kicker { margin: 0 0 14px; color: var(--acid); font-size: 12px; font-weight: 700; letter-spacing: 0; }
h1 { max-width: 1100px; margin: 0; font-size: clamp(3rem, 5vw, 5.5rem); line-height: .94; letter-spacing: 0; }
.hero-lede { max-width: 680px; margin: 28px 0; color: #c4cbc6; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.55; }
.proof-strip { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); width: fit-content; }
.proof-strip span { padding: 10px 14px; border-right: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; }
.proof-strip span:last-child { border-right: 0; }

.input-console { min-width: 0; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 32px 90px rgba(0,0,0,.3); }
.console-head, .console-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 12px; font-weight: 700; }
.console-head > div { display: flex; align-items: center; gap: 8px; }
.status-light { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 16px rgba(97,219,232,.7); }
.text-command { color: var(--acid); }
textarea { width: 100%; height: 266px; margin: 14px 0; padding: 16px; resize: vertical; border: 1px solid #33403b; border-radius: 3px; outline: none; background: #080b0a; color: #dce4df; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
textarea:focus { border-color: var(--acid); box-shadow: 0 0 0 2px rgba(198,255,61,.12); }
.console-actions p { margin: 0; color: var(--muted); font-weight: 400; }
.primary-command, .export-command { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border-radius: 3px; background: var(--acid); color: #11150f; font-weight: 700; }
.primary-command:hover, .export-command:hover { background: #dbff82; }
.primary-command svg, .export-command svg { width: 18px; height: 18px; }
.form-error { min-height: 20px; margin: 10px 0 0; color: var(--danger); font-size: 13px; }

.analysis { width: min(1500px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 140px; }
.analysis-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.analysis-head h2 { margin: 0; font-size: clamp(25px, 3vw, 44px); letter-spacing: 0; }
.view-tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.view-tab { min-width: 96px; padding: 11px 14px; background: transparent; color: var(--muted); border-right: 1px solid var(--line); }
.view-tab:last-child { border-right: 0; }
.view-tab.active { background: var(--ink); color: #111; }

.metric-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: dense; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.metric { grid-column: span 4; min-height: 142px; padding: 20px; background: var(--panel); }
.metric-wide { grid-column: span 7; }
.metric-accent { grid-column: span 5; background: var(--acid); color: #10150e; }
.metric > span { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; }
.metric-accent > span, .metric-accent p { color: #43502f; }
.metric strong { display: block; margin: 13px 0 7px; font-size: clamp(27px, 3vw, 42px); line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric p { margin: 0; color: var(--muted); font-size: 14px; }
.progress-track { width: 100%; height: 5px; margin: 13px 0; background: #2d3833; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--acid); transition: width .5s ease; }

.view-panel { display: none; min-height: 245px; margin-top: 24px; }
.view-panel.active { display: block; }
.panel-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.panel-title h3 { margin: 0; font-size: 22px; }
.panel-title span { color: var(--muted); font-size: 12px; }
.agent-accordion { display: flex; min-height: 230px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.agent-card { flex: 1; min-width: 0; padding: 22px; overflow: hidden; background: var(--panel); border-right: 1px solid var(--line); transition: flex .55s ease, background .4s ease; }
.agent-card:last-child { border-right: 0; }
.agent-card:hover, .agent-card.open { flex: 2.2; background: var(--panel-2); }
.agent-card button { width: 100%; padding: 0; text-align: left; background: transparent; color: inherit; }
.agent-card h4 { margin: 7px 0 0; font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-status { color: var(--cyan); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.agent-status.blocked, .agent-status.failed { color: var(--danger); }
.agent-status.complete { color: var(--acid); }
.agent-detail { opacity: .3; max-width: 380px; margin-top: 44px; transition: opacity .4s ease; }
.agent-card:hover .agent-detail, .agent-card.open .agent-detail { opacity: 1; }
.agent-detail p { margin: 0 0 12px; color: #c2cac5; font-size: 14px; line-height: 1.45; }
.agent-detail span { color: var(--muted); font-size: 12px; }

.handoff-sheet { min-height: 260px; display: grid; grid-template-columns: .72fr 1.28fr; gap: 40px; align-items: stretch; background: var(--panel); border: 1px solid var(--line); padding: 22px; overflow: hidden; }
.handoff-visual { min-height: 215px; background: linear-gradient(rgba(6,9,8,.18), rgba(6,9,8,.7)), url("https://picsum.photos/seed/security-operations/1200/900") center/cover; filter: grayscale(1) contrast(1.25); transform: scale(.92); }
.handoff-sheet h3 { margin: 0 0 12px; font-size: clamp(28px, 3vw, 50px); }
.handoff-sheet > div > p:not(.kicker) { max-width: 720px; color: #c1c9c4; }
.handoff-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 24px 0 0; background: var(--line); }
.handoff-facts div { padding: 13px; background: #0f1412; }
.handoff-facts dt { color: var(--muted); font-size: 11px; }
.handoff-facts dd { margin: 6px 0 0; font-size: 13px; }
.findings-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.finding-row { display: grid; grid-template-columns: 100px 1fr 1.4fr; gap: 16px; padding: 18px; background: var(--panel); align-items: center; }
.severity { color: var(--warning); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.severity.high, .severity.critical { color: var(--danger); }
.finding-row strong { font-size: 16px; }
.finding-row p { margin: 0; color: var(--muted); font-size: 13px; }
.empty-state { padding: 32px; background: var(--panel); color: var(--muted); }
.analysis-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; }
.analysis-actions p { color: var(--muted); font-size: 13px; }

.evidence-chapter { width: min(1500px, calc(100% - 32px)); margin: 0 auto; padding: 150px 0; display: grid; grid-template-columns: .8fr 1.2fr; gap: 10vw; }
.evidence-heading h2 { max-width: 640px; margin: 0; font-size: clamp(38px, 5vw, 74px); line-height: 1; }
.evidence-flow { display: grid; gap: 1px; background: var(--line); align-self: start; }
.evidence-flow article { min-height: 220px; padding: 28px; background: var(--panel); }
.evidence-flow span { color: var(--acid); font: 12px ui-monospace, monospace; }
.evidence-flow h3 { margin: 52px 0 10px; font-size: 28px; }
.evidence-flow p { max-width: 520px; margin: 0; color: var(--muted); line-height: 1.6; }
footer { width: min(1500px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0; display: flex; justify-content: space-between; border-top: 1px solid var(--line); }
footer p { margin: 8px 0 0; color: var(--muted); }
footer a { color: var(--acid); }

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; }
  .input-console { max-width: 760px; }
  .metric-wide, .metric-accent { grid-column: span 12; }
  .metric { grid-column: span 4; }
  .evidence-chapter { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar, .hero, .analysis, .evidence-chapter, footer { width: min(100% - 20px, 1500px); }
  .topbar { height: 56px; margin-top: 8px; padding: 0 12px; }
  .brand { font-size: 11px; }
  .nav-links > a { display: none; }
  .hero { min-height: auto; padding: 48px 0 34px; gap: 34px; }
  h1 { font-size: 48px; }
  .hero-lede { font-size: 16px; margin: 22px 0; }
  .proof-strip span { flex: 1 0 50%; border-bottom: 1px solid var(--line); }
  textarea { height: 230px; }
  .console-actions { align-items: stretch; flex-direction: column; }
  .analysis { padding-top: 30px; }
  .analysis-head { align-items: stretch; flex-direction: column; }
  .view-tabs { width: 100%; }
  .view-tab { flex: 1; min-width: 0; padding-inline: 7px; }
  .metric { grid-column: span 12; min-height: 112px; }
  .agent-accordion { flex-direction: column; }
  .agent-card { min-height: 130px; border-right: 0; border-bottom: 1px solid var(--line); }
  .agent-card:last-child { border-bottom: 0; }
  .agent-detail { margin-top: 18px; opacity: 1; }
  .handoff-sheet { grid-template-columns: 1fr; }
  .handoff-visual { min-height: 160px; }
  .handoff-facts { grid-template-columns: 1fr; }
  .finding-row { grid-template-columns: 1fr; }
  .analysis-actions { align-items: stretch; flex-direction: column; }
  .export-command { width: 100%; }
  .evidence-chapter { padding: 100px 0; }
  footer { flex-direction: column; gap: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
