:root {
  --bg: #07090f;
  --bg2: #0b0f1a;
  --panel: rgba(20, 26, 40, 0.72);
  --panel-solid: #141a28;
  --panel2: rgba(28, 36, 56, 0.85);
  --border: rgba(120, 140, 190, 0.16);
  --border-bright: rgba(120, 160, 255, 0.35);
  --text: #e9eef8;
  --muted: #8d97ad;
  --accent: #4f8cff;
  --accent2: #8b5cf6;
  --green: #2dd573;
  --yellow: #f5b942;
  --red: #ff5d5d;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(139, 92, 246, 0.13), transparent 60%),
    radial-gradient(800px 500px at 0% 0%, rgba(79, 140, 255, 0.12), transparent 55%),
    linear-gradient(180deg, var(--bg2), var(--bg) 40%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(130, 150, 200, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 150, 200, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

main, .topbar, footer { position: relative; z-index: 1; }

/* ---------- header ---------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 32px;
  background: rgba(10, 13, 22, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
}
.logo::before {
  content: "◉";
  color: var(--accent);
  font-size: 16px;
  text-shadow: 0 0 14px var(--accent);
}
.logo span {
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

nav { display: flex; gap: 6px; }
nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 99px;
  transition: all .18s ease;
}
nav a:hover { color: var(--text); background: rgba(120, 150, 255, 0.1); }
nav .nav-cta {
  color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  box-shadow: 0 8px 26px rgba(79, 140, 255, 0.25);
}

main { flex: 1; max-width: 1120px; width: 100%; margin: 0 auto; padding: 36px 22px; }

footer {
  padding: 18px 32px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
  background: rgba(10, 13, 22, 0.6);
}

/* ---------- typography ---------- */

h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.6px; margin-bottom: 6px; }
h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.2px; margin: 26px 0 12px; text-transform: uppercase; color: var(--muted); font-size: 13px; }
.sub { color: var(--muted); font-size: 14.5px; margin-bottom: 22px; line-height: 1.5; }

/* ---------- cards ---------- */

.card {
  background: var(--panel);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
}

.bk-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  transition: all .18s ease;
  position: relative;
  overflow: hidden;
}
.bk-row::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity .18s ease;
}
.bk-row:hover {
  border-color: var(--border-bright);
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}
.bk-row:hover::after { opacity: 1; }
.bk-row .name { font-weight: 700; font-size: 16.5px; letter-spacing: -0.2px; }
.bk-row .name a { color: var(--text); text-decoration: none; }
.bk-row .name a:hover { color: var(--accent); }
.bk-row .meta { color: var(--muted); font-size: 13px; margin-top: 5px; line-height: 1.55; }

/* ---------- score ring ---------- */

.ring {
  --p: 50;
  --ring-color: var(--yellow);
  width: 62px;
  height: 62px;
  min-width: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(closest-side, var(--panel-solid) 79%, transparent 80% 100%),
    conic-gradient(var(--ring-color) calc(var(--p) * 1%), rgba(120, 140, 190, 0.14) 0);
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--ring-color) 35%, transparent));
}
.ring.s-high { --ring-color: var(--green); }
.ring.s-mid { --ring-color: var(--yellow); }
.ring.s-low { --ring-color: var(--red); }
.ring .val {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 19px;
  font-weight: 700;
  color: var(--ring-color);
  line-height: 1;
}
.ring .lbl { display: none; }
.ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.ring-wrap .caption { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }

.ring.lg { width: 86px; height: 86px; min-width: 86px; }
.ring.lg .val { font-size: 26px; }

/* ---------- badges ---------- */

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
  color: var(--muted);
  margin-right: 4px;
  vertical-align: middle;
  background: rgba(120, 140, 190, 0.06);
}
.badge.green { color: var(--green); border-color: color-mix(in srgb, var(--green) 50%, transparent); background: color-mix(in srgb, var(--green) 10%, transparent); }
.badge.yellow { color: var(--yellow); border-color: color-mix(in srgb, var(--yellow) 50%, transparent); background: color-mix(in srgb, var(--yellow) 10%, transparent); }
.badge.red { color: var(--red); border-color: color-mix(in srgb, var(--red) 50%, transparent); background: color-mix(in srgb, var(--red) 10%, transparent); }
.badge.demo { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* ---------- forms ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.filters select { flex: 1; min-width: 130px; }

input, select, textarea {
  background: rgba(12, 16, 28, 0.8);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.15);
}
textarea { width: 100%; min-height: 104px; resize: vertical; }
input[type="text"], input[type="password"], input[type="url"] { width: 100%; }
input[type="file"] { width: 100%; padding: 8px; }

button, .btn {
  cursor: pointer;
  background: linear-gradient(120deg, var(--accent), #3b6fe0);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  border: none;
  text-decoration: none;
  display: inline-block;
  padding: 10px 20px;
  border-radius: 10px;
  transition: all .18s ease;
  box-shadow: 0 4px 16px rgba(79, 140, 255, 0.25);
}
button:hover, .btn:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(79, 140, 255, 0.4); }
.btn-ghost { background: rgba(120, 150, 255, 0.07); color: var(--muted); border: 1px solid var(--border); box-shadow: none; }
.btn-ghost:hover { color: var(--text); border-color: var(--border-bright); box-shadow: none; }
.btn-danger { background: linear-gradient(120deg, var(--red), #d63c3c); box-shadow: 0 4px 16px rgba(255, 93, 93, 0.2); }
.btn-small { padding: 6px 13px; font-size: 12.5px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field { margin-bottom: 12px; }

.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label {
  display: flex; align-items: center; gap: 7px;
  background: rgba(12, 16, 28, 0.8);
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 99px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 0;
  transition: border-color .15s ease;
}
.checks label:hover { border-color: var(--border-bright); }

/* ---------- reviews ---------- */

.review {
  border-left: 3px solid var(--border);
  padding: 14px 18px;
  margin-bottom: 12px;
  background: var(--panel2);
  border-radius: 0 12px 12px 0;
}
.review.confirmed { border-left-color: var(--green); }
.review .head { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.review .head .user { color: var(--accent); font-weight: 700; }
.review img { max-width: 340px; border-radius: 10px; margin-top: 10px; border: 1px solid var(--border); }

.notice {
  background: color-mix(in srgb, var(--green) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--green) 45%, transparent);
  color: var(--green);
  padding: 11px 15px; border-radius: 10px; margin-bottom: 16px; font-size: 14px;
}
.section-note {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  margin: -4px 0 12px;
  max-width: 880px;
}
.error {
  background: color-mix(in srgb, var(--red) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--red) 45%, transparent);
  color: var(--red);
  padding: 11px 15px; border-radius: 10px; margin-bottom: 16px; font-size: 14px;
}

.center-box { max-width: 420px; margin: 70px auto; }
.tg-login-box { display: flex; justify-content: center; margin: 18px 0; min-height: 48px; }
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  margin: 18px 0;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.divider::before, .divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border);
}

/* ---------- tables ---------- */

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
tr:last-child td { border-bottom: none; }

.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; font-size: 14px; line-height: 1.5; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.side-by-side { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }

.mono { font-family: "JetBrains Mono", Consolas, monospace; }

/* ---------- motion landing ---------- */

.landing-page main { max-width: 1220px; }
.eyebrow, .kicker {
  color: var(--accent);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 38px;
  align-items: center;
  min-height: 620px;
}
.hero-copy h1 {
  max-width: 780px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: .94;
  letter-spacing: -3px;
  margin: 12px 0 20px;
}
.hero-copy p {
  max-width: 650px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-hint { color: var(--muted); font-size: 13px; }
.btn-primary { background: linear-gradient(120deg, var(--accent), var(--accent2)); }

.hero-panel {
  position: relative;
  min-height: 410px;
  border: 1px solid var(--border-bright);
  border-radius: 28px;
  padding: 24px;
  background:
    radial-gradient(260px 220px at 80% 20%, rgba(139, 92, 246, .28), transparent 70%),
    linear-gradient(145deg, rgba(20, 26, 40, .9), rgba(10, 13, 22, .62));
  box-shadow: 0 34px 100px rgba(0, 0, 0, .45);
  overflow: hidden;
  transform-style: preserve-3d;
}
.hero-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(110deg, transparent 10%, rgba(255,255,255,.12), transparent 38%);
  transform: translateX(-80%);
  animation: shine 6s ease-in-out infinite;
}
@keyframes shine {
  0%, 35% { transform: translateX(-90%); }
  70%, 100% { transform: translateX(90%); }
}
.scan-card {
  position: relative;
  z-index: 1;
  min-height: 250px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(7, 9, 15, .58);
  padding: 22px;
  overflow: hidden;
}
.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  top: 0;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  box-shadow: 0 0 28px var(--green);
  animation: scan 3.8s ease-in-out infinite;
}
@keyframes scan {
  0% { top: 8%; opacity: .2; }
  45% { opacity: 1; }
  100% { top: 92%; opacity: .15; }
}
.scan-card h3 { font-size: 44px; letter-spacing: -1.6px; margin: 40px 0 8px; }
.scan-card p { color: var(--muted); line-height: 1.6; }
.feed-bars { display: grid; gap: 12px; margin-top: 30px; }
.feed-bars span {
  height: 9px;
  width: var(--w);
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--green));
  box-shadow: 0 0 22px rgba(45, 213, 115, .22);
}
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; position: relative; z-index: 1; }
.mini-grid div, .feature-strip > div, .preview-card, .relation-card, .intel-tile, .app-user-card {
  background: rgba(20, 26, 40, .62);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}
.mini-grid strong { display: block; font-size: 26px; }
.mini-grid span { color: var(--muted); font-size: 12px; }

.feature-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 10px 0 58px; }
.feature-strip h3, .preview-card h3 { margin: 10px 0 8px; letter-spacing: -.4px; }
.feature-strip p, .preview-card p, .cta-panel p { color: var(--muted); line-height: 1.6; font-size: 14px; }
.landing-section, .cta-panel { margin: 54px 0; }
.section-head, .cta-panel, .detail-heading, .bk-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.section-head h2, .cta-panel h2 { color: var(--text); font-size: 30px; text-transform: none; margin: 8px 0 0; letter-spacing: -1px; }
.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.preview-card, .relation-card, .bk-card { color: var(--text); text-decoration: none; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.preview-card:hover, .relation-card:hover, .bk-card:hover { border-color: var(--border-bright); transform: translateY(-3px); box-shadow: 0 20px 55px rgba(0,0,0,.32); }
.preview-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; margin-top: 16px; }
.cta-panel {
  border: 1px solid var(--border-bright);
  border-radius: 26px;
  padding: 28px;
  background:
    radial-gradient(360px 240px at 100% 0%, rgba(79, 140, 255, .18), transparent 75%),
    rgba(20, 26, 40, .68);
}

/* ---------- app cabinet ---------- */

.app-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.app-hero h1 { font-size: clamp(32px, 5vw, 54px); letter-spacing: -1.8px; margin: 6px 0 10px; }
.app-user-card { min-width: 180px; }
.app-user-card span, .intel-tile span { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.app-user-card strong { display: block; margin-top: 5px; }
.bk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.bk-card { display: block; min-height: 270px; margin-bottom: 0; position: relative; overflow: hidden; }
.bk-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(280px 160px at 90% 0%, rgba(79,140,255,.13), transparent 70%);
  pointer-events: none;
}
.bk-card .name { font-weight: 800; font-size: 24px; letter-spacing: -.8px; }
.bk-badges { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0; }
.bk-card-metrics { display: grid; grid-template-columns: 72px 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.bk-card-metrics div { border: 1px solid var(--border); border-radius: 14px; padding: 10px; background: rgba(7,9,15,.34); min-width: 0; }
.bk-card-metrics span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.bk-card-metrics strong { display: block; margin-top: 4px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-card p { color: var(--muted); font-size: 13px; line-height: 1.55; min-height: 42px; }
.card-link { margin-top: 18px; color: var(--accent); font-weight: 800; }
.scout-panel { position: sticky; top: 86px; }
.notice.compact { font-size: 12.5px; line-height: 1.5; margin: 18px 0 0; }

/* ---------- detail intelligence ---------- */

.detail-hero { position: relative; overflow: hidden; }
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(460px 260px at 100% 0%, rgba(139,92,246,.15), transparent 70%);
  pointer-events: none;
}
.detail-heading { justify-content: flex-start; position: relative; z-index: 1; }
.detail-heading h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: clamp(32px, 5vw, 54px); letter-spacing: -1.6px; }
.detail-heading a, .sub a { color: var(--accent); text-decoration: none; }
.intel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; position: relative; z-index: 1; }
.intel-tile strong { display: block; font-size: 18px; margin: 6px 0; }
.intel-tile p, .relation-card p { color: var(--muted); line-height: 1.5; font-size: 13px; margin: 0; }
.risk-map { position: relative; z-index: 1; }
.source-cell { word-break: break-word; }
.relation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.relation-card div { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.relation-card .meta { display: block; color: var(--muted); margin-top: 12px; font-size: 12px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 820px) {
  .side-by-side, .form-grid, .hero-shell, .feature-strip, .preview-grid, .bk-grid, .intel-grid, .relation-grid { grid-template-columns: 1fr; }
  main { padding: 22px 14px; }
  .topbar { padding: 12px 16px; }
  nav { flex-wrap: wrap; justify-content: flex-end; }
  nav a { padding: 7px 10px; }
  .hero-shell { min-height: auto; }
  .hero-copy h1 { letter-spacing: -1.5px; }
  .app-hero, .section-head, .cta-panel { align-items: flex-start; flex-direction: column; }
  .bk-card-metrics { grid-template-columns: 1fr; }
}
