@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap");

:root {
  --bg: #060807;
  --bg-2: #0a0e0c;
  --surface: #0d1210;
  --elevated: #121916;
  --line: #1b2620;
  --line-2: #26352d;
  --text: #e9f3ee;
  --muted: #8fa198;
  --faint: #56655d;
  --accent: #4ade80;
  --accent-2: #22c55e;
  --accent-3: #16a34a;
  --accent-soft: #bbf7d0;
  --critical: #fb7185;
  --high: #f87171;
  --medium: #fbbf24;
  --low: #4ade80;
  --radius: 16px;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
::selection { background: rgba(74, 222, 128, .3); }

.glow-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(600px 400px at 85% -10%, rgba(34, 197, 94, .12), transparent 70%),
    radial-gradient(500px 380px at -10% 110%, rgba(34, 197, 94, .07), transparent 70%);
}
.wrap { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.brand b { font-size: 18px; font-weight: 700; letter-spacing: -.01em; display: block; line-height: 1.1; }
.brand small { font-family: var(--mono); font-size: 10.5px; letter-spacing: .32em; color: var(--accent); display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; cursor: pointer; transition: transform .15s, box-shadow .2s, border-color .2s, background .2s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent-2), var(--accent-3)); color: #03140a; box-shadow: 0 8px 28px -10px rgba(34, 197, 94, .7); }
.btn-primary:hover { box-shadow: 0 10px 36px -8px rgba(34, 197, 94, .85); }
.btn-ghost { background: var(--elevated); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--line-2); }
.btn-danger { background: transparent; border-color: rgba(248, 113, 113, .35); color: var(--high); }
.btn-danger:hover { background: rgba(248, 113, 113, .08); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); }

/* ---------- landing ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { color: var(--muted); font-size: 14.5px; }
.nav-links a:not(.btn):hover { color: var(--text); text-decoration: none; }

.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding: 64px 0 96px; }
.hero h1 { font-size: clamp(40px, 5.4vw, 64px); line-height: 1.02; letter-spacing: -.035em; margin: 18px 0 20px; font-weight: 800; }
.hero h1 span { background: linear-gradient(120deg, var(--accent-soft), var(--accent) 45%, var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 520px; margin: 0 0 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 22px; margin-top: 26px; color: var(--faint); font-size: 13px; flex-wrap: wrap; }
.hero-meta span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: middle; }

.preview { position: relative; aspect-ratio: 1.38; border-radius: 26px; background: linear-gradient(180deg, #0b100e, #070a09); border: 1px solid var(--line); box-shadow: 0 40px 120px -40px rgba(34, 197, 94, .35), inset 0 1px 0 rgba(255,255,255,.03); overflow: hidden; }
.preview-top { position: absolute; top: 22px; left: 24px; right: 24px; display: flex; justify-content: space-between; align-items: center; }
.preview-top .x { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center; color: var(--accent); font-weight: 600; }
.rings { position: absolute; left: 50%; top: 46%; width: 200px; height: 200px; transform: translate(-50%, -50%); }
.rings::before { content: ""; position: absolute; inset: 55px; border-radius: 50%; background: radial-gradient(circle, rgba(34,197,94,.45), transparent 70%); filter: blur(14px); animation: pulse 1.6s ease-in-out infinite alternate; }
.ring { position: absolute; border-radius: 50%; border: 4px solid transparent; }
.ring.r1 { inset: 0; border-top-color: var(--accent); border-left-color: var(--accent); animation: spin 3.2s linear infinite; filter: drop-shadow(0 0 8px rgba(34,197,94,.8)); }
.ring.r2 { inset: 26px; border-top-color: #86efac; border-right-color: #86efac; animation: spin 2.4s linear infinite reverse; opacity: .8; }
.ring.r3 { inset: 52px; border-top-color: var(--accent-soft); animation: spin 1.6s linear infinite; }
.rings img { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; transform: translate(-50%, -50%); }
.preview-bottom { position: absolute; left: 28px; right: 28px; bottom: 26px; }
.preview-bottom .row { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 13px; color: #c4d2cb; }
.bar { height: 9px; margin-top: 12px; border-radius: 6px; background: #111915; border: 1px solid var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 64%; border-radius: 6px; background: linear-gradient(90deg, #15803d, #22c55e 55%, #bbf7d0); box-shadow: 0 0 14px rgba(34,197,94,.7); animation: fill 6s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { from { opacity: .35; } to { opacity: .8; } }
@keyframes fill { 0% { width: 8%; } 70% { width: 92%; } 100% { width: 100%; } }

section.block { padding: 72px 0; border-top: 1px solid var(--line); }
section.block h2 { font-size: clamp(28px, 3.2vw, 38px); letter-spacing: -.025em; margin: 12px 0 14px; }
section.block p.sub { color: var(--muted); max-width: 640px; margin: 0 0 40px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { padding: 26px; }
.step .num { font-family: var(--mono); color: var(--accent); font-size: 13px; }
.step h3 { margin: 12px 0 8px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 24px; }
.feature .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(34,197,94,.1); border: 1px solid rgba(74,222,128,.18); color: var(--accent); margin-bottom: 14px; }
.feature .ic svg { width: 20px; height: 20px; }
.feature h3 { margin: 0 0 6px; font-size: 16.5px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }
.privacy { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.privacy ul { margin: 0; padding: 22px 26px 22px 44px; color: var(--muted); }
.privacy li { margin: 6px 0; }
.privacy h3 { margin: 0; padding: 22px 26px 0; font-size: 16px; }
.cta { text-align: center; padding: 56px 24px; margin: 24px 0 72px; background: radial-gradient(500px 200px at 50% 0, rgba(34,197,94,.16), transparent 70%), var(--surface); }
.cta h2 { margin: 0 0 10px; font-size: 32px; letter-spacing: -.02em; }
.cta p { color: var(--muted); margin: 0 0 26px; }
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--faint); font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.toast { position: fixed; left: 50%; top: 20px; transform: translateX(-50%); z-index: 50; padding: 12px 18px; border-radius: 12px; background: var(--elevated); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -20px #000; font-size: 14px; }
.toast.error { border-color: rgba(248,113,113,.4); color: #fecaca; }

/* ---------- dashboard ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(6, 8, 7, .82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 70px; max-width: 1360px; }
.user { display: flex; align-items: center; gap: 12px; }
.user img, .user .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--elevated); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--accent); }
.user .name { font-weight: 600; font-size: 14px; }

.dash { display: grid; grid-template-columns: 360px 1fr; gap: 22px; padding: 26px 24px 60px; max-width: 1360px; margin: 0 auto; position: relative; z-index: 1; }
.panel { padding: 22px; }
.panel h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.01em; }
.panel .hint { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.input, .select {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus { border-color: var(--accent-3); box-shadow: 0 0 0 3px rgba(34,197,94,.15); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; }
.seg button { height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 600; font-size: 13.5px; }
.seg button.on { background: var(--elevated); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg-note { font-size: 12.5px; color: var(--faint); margin: 8px 2px 18px; }

.code-box { margin-top: 18px; padding: 18px; border-radius: 14px; background: linear-gradient(180deg, rgba(34,197,94,.08), rgba(34,197,94,.02)); border: 1px solid rgba(74,222,128,.25); }
.code-box .for { font-size: 13px; color: var(--muted); }
.code-box .code { font-family: var(--mono); font-size: 34px; font-weight: 600; letter-spacing: .08em; margin: 6px 0 10px; color: var(--accent-soft); }
.code-box .row { display: flex; gap: 8px; flex-wrap: wrap; }
.code-box .exp { font-size: 12.5px; color: var(--faint); margin-top: 10px; }

.list-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; }
.tabs button { height: 32px; padding: 0 14px; border: 0; background: transparent; color: var(--muted); border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 13px; }
.tabs button.on { background: var(--elevated); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.search { position: relative; flex: 1; max-width: 300px; min-width: 180px; }
.search .input { height: 40px; padding-left: 38px; }
.search svg { position: absolute; left: 12px; top: 11px; width: 18px; height: 18px; color: var(--faint); }

table.scans { width: 100%; border-collapse: collapse; }
table.scans th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 600; padding: 12px 20px; border-bottom: 1px solid var(--line); }
table.scans td { padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
table.scans tr.row { cursor: pointer; transition: background .15s; }
table.scans tr.row:hover { background: rgba(255,255,255,.018); }
table.scans tr:last-child td { border-bottom: 0; }
.scan-name { font-weight: 600; }
.scan-sub { font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }

.pill { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line-2); color: var(--muted); background: var(--bg-2); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.pending { color: #93c5fd; border-color: rgba(147,197,253,.25); }
.pill.running { color: var(--accent); border-color: rgba(74,222,128,.3); }
.pill.running::before { animation: pulse 1s ease-in-out infinite alternate; }
.pill.completed { color: var(--text); }
.pill.expired, .pill.abandoned { color: var(--faint); }
.pill.v-critical { color: var(--critical); border-color: rgba(251,113,133,.35); background: rgba(251,113,133,.08); }
.pill.v-high { color: var(--high); border-color: rgba(248,113,113,.35); background: rgba(248,113,113,.07); }
.pill.v-medium { color: var(--medium); border-color: rgba(251,191,36,.3); background: rgba(251,191,36,.06); }
.pill.v-low, .pill.v-clean { color: var(--low); border-color: rgba(74,222,128,.3); background: rgba(74,222,128,.06); }

.detail { padding: 0; }
.detail-head { padding: 22px 24px; border-bottom: 1px solid var(--line); display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.detail-head h1 { margin: 8px 0 4px; font-size: 26px; letter-spacing: -.02em; }
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13.5px; cursor: pointer; background: none; border: 0; padding: 0; }
.back:hover { color: var(--text); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.summary { display: grid; grid-template-columns: 220px 1fr; gap: 18px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.score { display: grid; place-items: center; padding: 18px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); text-align: center; }
.gauge { position: relative; width: 132px; height: 132px; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge .val { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.gauge .val small { display: block; font-size: 11px; color: var(--faint); font-weight: 500; letter-spacing: .05em; margin-top: -6px; }
.verdict-text { margin-top: 12px; font-size: 13px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { padding: 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.stat .k { font-size: 12px; color: var(--faint); }
.stat .v { font-size: 22px; font-weight: 700; margin-top: 2px; }
.stat.critical .v { color: var(--critical); } .stat.high .v { color: var(--high); } .stat.medium .v { color: var(--medium); } .stat.low .v { color: var(--low); }
.env { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 18px; margin-top: 14px; font-size: 13.5px; }
.env div { color: var(--muted); }
.env b { color: var(--text); font-weight: 600; }

.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.module { padding: 13px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.module .t { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.module .t i { width: 8px; height: 8px; border-radius: 50%; background: var(--low); flex: none; }
.module.critical .t i { background: var(--critical); box-shadow: 0 0 10px var(--critical); } .module.high .t i { background: var(--high); } .module.medium .t i { background: var(--medium); }
.module .c { font-size: 12px; color: var(--faint); margin-top: 6px; font-family: var(--mono); }
.module ul { margin: 6px 0 0; padding-left: 16px; font-size: 12.5px; color: var(--muted); }

.subtabs { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.subtabs button { height: 48px; padding: 0 14px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); cursor: pointer; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.subtabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.subtabs button .n { font-family: var(--mono); font-size: 11.5px; color: var(--faint); margin-left: 6px; }
.tab-body { padding: 18px 24px 24px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); cursor: pointer; font-size: 12.5px; font-weight: 600; }
.chip.on { color: var(--text); border-color: var(--line-2); background: var(--elevated); }

.finding { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.finding:last-child { border-bottom: 0; }
.finding .cat { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.finding .nm { font-weight: 600; margin: 2px 0 4px; }
.finding .dt { color: var(--muted); font-size: 13.5px; word-break: break-word; }
.finding .dt code, .mono-cell { font-family: var(--mono); font-size: 12.5px; }
.sev { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 7px; text-align: center; }
.sev.critical { background: rgba(251,113,133,.14); color: var(--critical); }
.sev.high { background: rgba(248,113,113,.12); color: var(--high); }
.sev.medium { background: rgba(251,191,36,.1); color: var(--medium); }
.sev.low { background: rgba(74,222,128,.1); color: var(--low); }
.sev.info { background: rgba(143,161,152,.1); color: var(--muted); }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; color: var(--faint); font-weight: 600; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; word-break: break-word; color: var(--muted); }
table.data td.t { color: var(--text); white-space: nowrap; }
.scroll { max-height: 620px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.notes li { color: var(--muted); margin: 6px 0; font-size: 13.5px; }
.waiting { padding: 64px 24px; text-align: center; }
.waiting .spinner { width: 46px; height: 46px; margin: 0 auto 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 40; padding: 20px; }
.modal { max-width: 420px; width: 100%; padding: 24px; }
.modal h3 { margin: 0 0 8px; }
.modal p { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.modal .actions { justify-content: flex-end; }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .steps, .features, .privacy { grid-template-columns: 1fr; }
  .dash { grid-template-columns: 1fr; }
  .summary { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .nav-links a:not(.btn) { display: none; }
  table.scans .hide-sm { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .dash { padding: 16px 16px 40px; }
  .finding { grid-template-columns: 1fr; gap: 6px; }
  .env { grid-template-columns: 1fr; }
  table.scans td, table.scans th { padding: 12px; }
}
