:root {
  --ink: #f5f7ef;
  --muted: #89908a;
  --faint: #5c645f;
  --line: rgba(213, 225, 214, 0.12);
  --panel: rgba(18, 22, 21, 0.76);
  --panel-solid: #121615;
  --lime: #c8ff4d;
  --lime-soft: rgba(200, 255, 77, 0.12);
  --coral: #ff7a5c;
  --blue: #6cc8ff;
  --background: #090c0b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--background);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--background); }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    radial-gradient(circle at 85% 4%, rgba(200,255,77,.07), transparent 26%),
    var(--background);
  background-size: 42px 42px, 42px 42px, auto, auto;
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }

.shell { width: min(1420px, calc(100% - 64px)); margin-inline: auto; }

.glow {
  position: fixed;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: .1;
  pointer-events: none;
  z-index: -1;
}
.glow-one { top: -220px; right: 4%; background: var(--lime); }
.glow-two { bottom: 2%; left: -260px; background: #218b62; }

.topbar {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  color: #0a0c0b;
  background: var(--lime);
  font-size: 20px;
  font-weight: 900;
  transform: skew(-7deg);
  box-shadow: 0 0 28px rgba(200,255,77,.18);
}
.brand strong { display: block; font-size: 15px; letter-spacing: .2em; line-height: 1; }
.brand small { display: block; margin-top: 6px; color: var(--muted); font: 9px ui-monospace, monospace; letter-spacing: .15em; }

.local-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #b3bbb5;
  font: 11px ui-monospace, monospace;
  letter-spacing: .06em;
  background: rgba(255,255,255,.025);
}
.local-badge span { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }

.hero {
  min-height: 470px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr);
  align-items: center;
  gap: clamp(48px, 8vw, 120px);
  padding: 76px 0 64px;
}

.eyebrow, .kicker {
  margin: 0 0 17px;
  color: var(--lime);
  font: 700 10px ui-monospace, "SFMono-Regular", monospace;
  letter-spacing: .2em;
}

h1 { margin: 0; max-width: 820px; font-size: clamp(46px, 5vw, 70px); line-height: .98; letter-spacing: -.055em; font-weight: 650; }
h1 em { color: var(--lime); font-style: normal; }
.hero-copy { max-width: 670px; margin: 28px 0 0; color: #a3aaa5; font-size: 15px; line-height: 1.85; word-break: keep-all; }

.scan-panel {
  position: relative;
  padding: 28px;
  border: 1px solid rgba(200,255,77,.2);
  background: linear-gradient(145deg, rgba(31,37,33,.92), rgba(13,16,15,.96));
  box-shadow: 0 28px 80px rgba(0,0,0,.32), inset 0 1px rgba(255,255,255,.035);
}
.scan-panel::before { content: ""; position: absolute; top: -1px; left: -1px; width: 72px; height: 2px; background: var(--lime); box-shadow: 0 0 14px var(--lime); }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; }
.panel-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.panel-heading .kicker { display: block; margin-bottom: 8px; }
.scan-state { padding: 6px 9px; border-radius: 3px; font: 700 10px ui-monospace, monospace; color: var(--muted); background: rgba(255,255,255,.05); }
.scan-state.running { color: var(--lime); background: var(--lime-soft); }
.scan-state.failed { color: var(--coral); background: rgba(255,122,92,.12); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0 16px; }
.form-grid label > span:first-child, .select-label > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.input-wrap { display: flex; align-items: center; border: 1px solid var(--line); background: rgba(0,0,0,.2); }
.input-wrap:focus-within { border-color: rgba(200,255,77,.55); box-shadow: 0 0 0 3px rgba(200,255,77,.06); }
.input-wrap input { width: 100%; padding: 13px 4px 13px 13px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.input-wrap b { padding: 0 13px 0 6px; color: var(--faint); font-size: 11px; font-weight: 500; }

.primary-button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 17px;
  border: 0;
  color: #0b0e0c;
  background: var(--lime);
  font-size: 13px;
  font-weight: 800;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(200,255,77,.13); }
.primary-button:disabled { cursor: wait; opacity: .45; transform: none; }
.privacy-note { display: flex; gap: 8px; align-items: center; margin: 14px 0 0; color: var(--faint); font-size: 10px; }
.privacy-note span { color: var(--lime); }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-right: 0; background: rgba(13,16,15,.64); }
.metrics article { min-height: 132px; padding: 24px 26px; border-right: 1px solid var(--line); }
.metrics article > span { display: block; color: var(--muted); font-size: 12px; }
.metrics strong { display: block; margin: 7px 0 9px; font: 500 clamp(32px, 3.2vw, 45px) ui-monospace, monospace; letter-spacing: -.08em; }
.metrics article:first-child strong { color: var(--lime); }
.metrics small { color: var(--faint); font: 9px ui-monospace, monospace; letter-spacing: .13em; }

.activity-band { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 17px; min-height: 82px; padding: 17px 22px; border: 1px solid var(--line); border-top: 0; background: rgba(255,255,255,.018); }
.activity-icon { width: 38px; height: 38px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: 10px; border: 1px solid var(--line); }
.activity-icon span { width: 3px; background: var(--lime); opacity: .8; }
.activity-icon span:nth-child(1) { height: 7px; }.activity-icon span:nth-child(2) { height: 14px; }.activity-icon span:nth-child(3) { height: 10px; }
.activity-band small { color: var(--faint); font: 9px ui-monospace, monospace; letter-spacing: .15em; }
.activity-band p { margin: 5px 0 0; color: #b6bdb8; font-size: 12px; }
.scan-progress { color: var(--lime); font: 11px ui-monospace, monospace; }

.findings-section { padding: 78px 0 96px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.section-heading .eyebrow { margin-bottom: 7px; }
.section-heading h2 { margin: 0; font-size: 32px; letter-spacing: -.04em; }
.result-count { color: var(--muted); font: 12px ui-monospace, monospace; }

.toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) 180px 180px 46px; gap: 10px; margin-bottom: 14px; }
.search-box { display: flex; align-items: center; gap: 11px; padding: 0 14px; border: 1px solid var(--line); background: var(--panel); }
.search-box span { color: var(--faint); font-size: 20px; transform: rotate(-15deg); }
.search-box:focus-within { border-color: rgba(200,255,77,.45); }
.search-box input { width: 100%; height: 46px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.search-box input::placeholder { color: var(--faint); }
.select-label { position: relative; }
.select-label > span { position: absolute; z-index: 1; top: 7px; left: 12px; margin: 0; font-size: 8px; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }
select { width: 100%; height: 46px; padding: 17px 34px 4px 11px; border: 1px solid var(--line); outline: 0; border-radius: 0; color: #c8cdc9; background: var(--panel); font-size: 11px; }
select:focus { border-color: rgba(200,255,77,.45); }
.icon-button { width: 46px; height: 46px; border: 1px solid var(--line); color: #b9c0bb; background: var(--panel); font-size: 18px; }
.icon-button:hover { color: var(--lime); border-color: rgba(200,255,77,.35); }

.table-wrap { position: relative; min-height: 210px; border: 1px solid var(--line); overflow: hidden; background: rgba(13,16,15,.7); }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th { height: 43px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--faint); background: rgba(255,255,255,.018); font: 9px ui-monospace, monospace; letter-spacing: .13em; text-align: left; text-transform: uppercase; }
th:nth-child(1) { width: 14%; } th:nth-child(2) { width: 18%; } th:nth-child(3) { width: 31%; } th:nth-child(4) { width: 13%; } th:nth-child(5) { width: 17%; } th:nth-child(6) { width: 7%; }
td { padding: 18px 16px; border-bottom: 1px solid var(--line); color: #cbd0cc; font-size: 12px; vertical-align: top; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: rgba(255,255,255,.022); }
tbody tr:last-child td { border-bottom: 0; }
.provider { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.provider-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 10px rgba(255,122,92,.5); }
.secret-mask { display: block; margin-top: 7px; color: var(--faint); font: 9px ui-monospace, monospace; letter-spacing: .07em; }
.repo-link, .file-link { display: inline-block; max-width: 100%; overflow: hidden; color: #e2e6e2; font-weight: 650; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.repo-link:hover, .file-link:hover { color: var(--lime); }
.owner-link, .line-meta, .time-sub { display: block; margin-top: 7px; color: var(--faint); font-size: 10px; text-decoration: none; }
.beginner-note { display: block; max-width: 100%; margin-top: 8px; overflow: hidden; color: #9ab468; font: 9px ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.evidence { display: block; max-width: 100%; margin-top: 8px; padding: 7px 8px; overflow: hidden; border-left: 2px solid rgba(200,255,77,.27); color: #7f8882; background: rgba(0,0,0,.22); font: 9px/1.45 ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.time-main { font: 10px ui-monospace, monospace; color: #aeb5b0; }
.status-select { height: 36px; padding: 8px 28px 8px 10px; border-color: var(--line); color: #cdd3ce; font-size: 10px; }
.open-link { width: 34px; height: 34px; display: grid; place-items: center; margin-left: auto; border: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.open-link:hover { color: #0b0e0c; border-color: var(--lime); background: var(--lime); }

.empty-state { padding: 52px 20px; text-align: center; }
.empty-state div { color: var(--lime); font-size: 30px; }
.empty-state h3 { margin: 13px 0 6px; font-size: 15px; }
.empty-state p { margin: 0; color: var(--faint); font-size: 11px; }

footer { min-height: 72px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); color: var(--faint); font: 9px ui-monospace, monospace; letter-spacing: .08em; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 5; max-width: 420px; padding: 13px 16px; border: 1px solid rgba(200,255,77,.28); color: #d9ded9; background: #171c19; box-shadow: 0 18px 50px rgba(0,0,0,.45); font-size: 12px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgba(255,122,92,.45); }
.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; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 60px; }
  .scan-panel { max-width: 620px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .toolbar { grid-template-columns: 1fr 1fr 1fr 46px; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tbody { display: grid; grid-template-columns: 1fr 1fr; }
  tbody tr { display: grid; grid-template-columns: 1fr auto; padding: 17px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  td { padding: 7px 0; border: 0; }
  td:nth-child(3), td:nth-child(4), td:nth-child(5) { grid-column: 1 / -1; }
  td:nth-child(6) { grid-column: 2; grid-row: 1; }
  .open-link { margin-top: 0; }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 28px, 1420px); }
  .topbar { height: 72px; }
  .local-badge { font-size: 0; padding: 10px; }
  .hero { padding: 48px 0; gap: 38px; }
  h1 { font-size: 43px; }
  .hero-copy { font-size: 13px; }
  .scan-panel { padding: 22px; }
  .metrics article { min-height: 112px; padding: 19px; }
  .activity-band { grid-template-columns: auto 1fr; }
  .scan-progress { grid-column: 2; }
  .findings-section { padding-top: 60px; }
  .toolbar { grid-template-columns: 1fr 1fr 46px; }
  .search-box { grid-column: 1 / -1; }
  tbody { grid-template-columns: 1fr; }
  tbody tr { border-right: 0; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 6px; }
}
