:root {
  --bg: #070b12;
  --card: #0f1623;
  --line: #243044;
  --text: #e8eef8;
  --muted: #8b9bb4;
  --accent: #5eead4;
  --accent2: #60a5fa;
  --high: #fb7185;
  --med: #fbbf24;
  --radius: 16px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1000px 500px at 10% -10%, rgba(94,234,212,.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(96,165,250,.1), transparent 50%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.5;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.top {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(7,11,18,.82);
  border-bottom: 1px solid var(--line);
}
.top .row { padding: .85rem 0; }
.brand { color: var(--text); font-weight: 800; letter-spacing: -.02em; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: .85rem; align-items: center; }
.row { display: flex; align-items: center; gap: .7rem; }
.between { justify-content: space-between; }
main.wrap { padding: 1.4rem 0 2.5rem; }
.hero {
  display: grid; grid-template-columns: 1.15fr .9fr; gap: 1.2rem;
  align-items: start; margin: .8rem 0 1.4rem;
}
@media (max-width: 900px) {
  .hero, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
}
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: var(--accent); font-weight: 700; }
h1 { font-size: clamp(1.7rem, 4vw, 2.35rem); letter-spacing: -.03em; line-height: 1.12; margin: .25rem 0 .7rem; }
.lead { color: var(--muted); max-width: 36rem; }
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 45%), var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem;
  box-shadow: 0 22px 50px rgba(0,0,0,.3);
}
.stack { display: grid; gap: .75rem; }
label { display: grid; gap: .35rem; font-weight: 600; font-size: .92rem; }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; color: var(--muted); }
input:not([type=radio]):not([type=checkbox]) {
  width: 100%; padding: .72rem .85rem; border-radius: 12px;
  border: 1px solid var(--line); background: #0a101a; color: var(--text); font: inherit;
}
input:focus { outline: 2px solid rgba(94,234,212,.35); border-color: var(--accent); }
.btn {
  display: inline-flex; justify-content: center; align-items: center;
  border: 0; border-radius: 999px; padding: .72rem 1.15rem; cursor: pointer;
  font-weight: 800; color: #042f2e;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}
.btn:hover { filter: brightness(1.06); }
.btn.busy { opacity: .7; pointer-events: none; }
.hint, .muted { color: var(--muted); font-size: .9rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin: 1rem 0; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin: 1rem 0; }
.stat { font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; }
.mono { font-family: var(--mono); font-size: .86rem; }
.truncate { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .5rem .35rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.table-wrap { overflow-x: auto; }
.pill {
  display: inline-block; padding: .12rem .5rem; border-radius: 999px;
  border: 1px solid var(--line); font-size: .75rem; font-weight: 700; color: var(--muted);
}
.pill.engine { color: var(--accent); border-color: rgba(94,234,212,.35); }
.risk-high, .level-high { color: #fecdd3; }
.risk-medium, .level-medium, .risk-elevated { color: #fde68a; }
.risk-low { color: #a7f3d0; }
.risk-badge {
  min-width: 110px; text-align: center; border-radius: 16px; padding: .8rem;
  border: 1px solid var(--line); background: var(--card);
}
.risk-badge.risk-high { border-color: rgba(251,113,133,.5); }
.risk-badge.risk-medium, .risk-badge.risk-elevated { border-color: rgba(251,191,36,.45); }
.risk-badge.risk-low { border-color: rgba(52,211,153,.45); }
.findings { display: grid; gap: .55rem; }
.finding { border: 1px solid var(--line); border-radius: 12px; padding: .65rem .75rem; background: rgba(0,0,0,.16); }
.finding.level-high { border-color: rgba(251,113,133,.4); }
.finding.level-medium { border-color: rgba(251,191,36,.35); }
.clean { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.snippet {
  background: #0a101a; border-radius: 10px; padding: .75rem; color: var(--muted);
  border: 1px solid var(--line); white-space: pre-wrap;
}
.dim { opacity: .65; }
.head-row { margin-bottom: 1rem; }
.footer {
  border-top: 1px solid var(--line); padding: 1.1rem 0 2rem;
  color: var(--muted); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .86rem;
}

/* fake browser chrome */
.browser-chrome {
  padding: 0;
  overflow: hidden;
  max-width: 100%;
  border-radius: var(--radius);
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.chrome-bar {
  display: flex; align-items: center; gap: .55rem;
  padding: .65rem .8rem; background: #161d2b; border-bottom: 1px solid var(--line);
  flex-wrap: nowrap;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.dots { display: flex; gap: .35rem; flex: 0 0 auto; }
.dots span { width: 10px; height: 10px; border-radius: 50%; background: #334155; }
.dots span:nth-child(1) { background: #f87171; }
.dots span:nth-child(2) { background: #fbbf24; }
.dots span:nth-child(3) { background: #34d399; }
.omnibox {
  flex: 1; min-width: 0; background: #0a101a; border: 1px solid var(--line); border-radius: 999px;
  padding: .4rem .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chrome-title {
  padding: .35rem .9rem; font-size: .85rem; color: var(--muted);
  border-bottom: 1px solid var(--line); background: #121925;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 100%;
}
.chrome-stage {
  background: #0a0f18;
  min-height: 280px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  position: relative;
}
.shot {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(640px, 65vh);
  object-fit: contain;
  object-position: top center;
  background: #fff;
  min-width: 0;
}
.pad { padding: 1.5rem; }

/* tabs */
.tab-bar { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .9rem; border-bottom: 1px solid var(--line); padding-bottom: .5rem; }
.tab {
  background: transparent; border: 1px solid transparent; color: var(--muted);
  border-radius: 999px; padding: .35rem .8rem; cursor: pointer; font: inherit; font-weight: 700;
}
.tab.active { color: var(--text); border-color: var(--line); background: rgba(255,255,255,.04); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.console-line {
  font-family: var(--mono); font-size: .82rem; padding: .35rem .5rem;
  border-bottom: 1px solid var(--line); color: var(--muted);
}
.console-line.type-error, .console-line.type-assert { color: #fecdd3; }
.console-line.type-warning { color: #fde68a; }
.console-line.type-log { color: var(--text); }

/* live interactive */
.live-shell { margin-bottom: 1rem; max-width: 100%; min-width: 0; }
.live-chrome {
  padding: 0 !important;
  overflow: hidden !important;
  max-width: 100%;
  border-radius: var(--radius);
  isolation: isolate;
  contain: paint;
}
.nav-btns { display: flex; gap: .25rem; flex: 0 0 auto; }
.icon-btn {
  background: #1a2333; border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; width: 2rem; height: 2rem; cursor: pointer; font: inherit;
  flex: 0 0 auto;
}
.icon-btn:hover { border-color: var(--accent); }
.omnibox-form { flex: 1 1 auto; margin: 0; min-width: 0; max-width: 100%; }
.omnibox-input {
  width: 100%; max-width: 100%; box-sizing: border-box;
  background: #0a101a; border: 1px solid var(--line); border-radius: 999px;
  padding: .45rem .9rem; color: var(--text); font-family: var(--mono); font-size: .86rem;
}
.live-stage {
  position: relative;
  background: #111827;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 240px;
  max-height: min(70vh, 720px);
  overflow: hidden;
  display: block;
  cursor: crosshair;
  user-select: none;
  border-radius: 0;
}
.live-frame {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: min(70vh, 720px);
  object-fit: contain;
  object-position: top center;
  background: #fff;
  cursor: crosshair;
  min-width: 0 !important;
  vertical-align: top;
}
.stage-msg {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); pointer-events: none; background: rgba(7,11,18,.55);
  z-index: 2;
}
.kbd-bar {
  display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
  padding: .65rem .8rem; border-top: 1px solid var(--line); background: #121925;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
}
.kbd-bar input[type="text"] {
  flex: 1; min-width: 120px; max-width: 100%; margin: 0;
}
.btn-sm { padding: .45rem .8rem; font-size: .85rem; border-radius: 999px; }
.btn-ghost {
  background: transparent; color: var(--text); border: 1px solid var(--line);
  border-radius: 999px; padding: .55rem 1rem; cursor: pointer; font-weight: 700;
}
.tiny { font-size: .8rem; }
.live-hint { padding: .5rem .9rem .85rem; }
.console-box {
  max-height: 220px; overflow: auto; font-size: .82rem;
  background: #0a101a; border-radius: 10px; border: 1px solid var(--line); padding: .4rem;
}
.gap { gap: .5rem; }
.wrap-any { overflow-wrap: anywhere; }

/* keep main column from being blown out by wide screenshots */
main.wrap, .live-shell, .card {
  max-width: 100%;
  min-width: 0;
}
.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  max-width: 100%;
  box-sizing: border-box;
}
