:root {
  --bg: #0a0e0a;
  --bg-alt: #0f1410;
  --panel: #131a14;
  --border: #1f2a20;
  --text: #d6e4d6;
  --muted: #7a8a7a;
  --accent: #00ff88;
  --accent-dim: #00b362;
  --warn: #ffb454;
  --danger: #ff5555;
  --mono: "JetBrains Mono", "Fira Code", "Cascadia Code", "Consolas", "Menlo", monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --maxw: 1100px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  background-image:
    radial-gradient(ellipse at top, rgba(0,255,136,0.04), transparent 60%),
    repeating-linear-gradient(
      0deg,
      rgba(0,255,136,0.015) 0px,
      rgba(0,255,136,0.015) 1px,
      transparent 1px,
      transparent 3px
    );
  min-height: 100vh;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

a { color: var(--accent); text-decoration: none; border-bottom: 1px dashed transparent; transition: border-color .15s; }
a:hover { border-bottom-color: var(--accent); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 10, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  border: none;
}
.cursor {
  display: inline-block;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}
.site-header nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.site-header nav a {
  color: var(--muted);
  border: none;
}
.site-header nav a:hover { color: var(--accent); }

/* Hero */
.hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(0,255,136,0.08), transparent 50%);
  pointer-events: none;
  z-index: 1;
}
#matrix-rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}
.hero .wrap {
  position: relative;
  z-index: 2;
}
.prompt {
  font-family: var(--mono);
  color: var(--accent-dim);
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
}
.typed::after {
  content: "_";
  animation: blink 1s steps(2) infinite;
  color: var(--accent);
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.05;
  margin: 0 0 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.accent { color: var(--accent); }
.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 65ch;
  margin: 0 0 2rem;
}
.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  background: var(--accent);
  color: #001a0d;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--accent);
  border-radius: 2px;
  transition: transform .1s, box-shadow .15s;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(0,255,136,0.35);
  border-bottom-color: var(--accent);
}
.btn.ghost {
  background: transparent;
  color: var(--accent);
}
.btn.small {
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
}

/* Sections */
.section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}
.section.alt {
  background: var(--bg-alt);
}
.section h2 {
  font-family: var(--mono);
  font-size: 1.75rem;
  margin: 0 0 1.5rem;
  font-weight: 700;
}
.hash { color: var(--accent); margin-right: 0.25rem; }
.section h3 {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--text);
  margin: 1.5rem 0 0.5rem;
}

/* Grid */
.grid { display: grid; gap: 1.5rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 1.5rem;
  border-radius: 2px;
  position: relative;
}
.card h3 { margin-top: 0; }
.card ul { padding-left: 1.2rem; margin: 0.5rem 0; }
.card li { margin-bottom: 0.5rem; }
.card.numbered::before {
  content: attr(data-num);
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--mono);
  color: var(--accent-dim);
  font-size: 0.85rem;
  opacity: 0.6;
}

/* Steps */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
}
.steps > li {
  counter-increment: step;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 1.5rem 1.5rem 1.5rem 4.5rem;
  margin-bottom: 1rem;
  position: relative;
  border-radius: 2px;
}
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 1.5rem;
  top: 1.4rem;
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
}
.steps h3 { margin: 0 0 0.5rem; }
.steps p { margin: 0; color: var(--muted); }
.steps a { color: var(--accent); }

/* Brokers */
.brokers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.broker {
  display: flex;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color .15s, transform .1s;
}
.broker:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}
.bnum {
  background: #0a120a;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.4rem;
  padding: 1.5rem 1rem;
  display: flex;
  align-items: flex-start;
  border-right: 1px solid var(--border);
  min-width: 60px;
}
.bbody {
  padding: 1.25rem;
  flex: 1;
}
.bbody h3 { margin: 0 0 0.5rem; }
.bbody p { margin: 0 0 1rem; color: var(--muted); font-size: 0.92rem; }
.footnote {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

/* Templates */
.template {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 2px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.tmpl-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #0a120a;
  border-bottom: 1px solid var(--border);
}
.tmpl-head h3 { margin: 0; font-size: 0.95rem; }
.copy-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 0.35rem 0.85rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 2px;
  transition: background .15s, color .15s;
}
.copy-btn:hover { background: var(--accent); color: #001a0d; }
.copy-btn.copied { background: var(--accent); color: #001a0d; }

pre {
  margin: 0;
  padding: 1.25rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text);
  background: #060a06;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: auto;
}

/* Standalone pre (in osint section) */
.section pre {
  border: 1px solid var(--border);
  border-radius: 2px;
  margin: 0.75rem 0 1.5rem;
}

.warn {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 180, 84, 0.06);
  border-left: 3px solid var(--warn);
  color: var(--warn);
  font-size: 0.92rem;
  border-radius: 2px;
}

/* Footer */
.site-footer {
  padding: 3rem 0;
  background: #060a06;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer p { margin: 0.25rem 0; }
.site-footer .muted { font-size: 0.8rem; }

/* Mobile */
@media (max-width: 600px) {
  .hero { padding: 3rem 0 2.5rem; }
  .section { padding: 3rem 0; }
  .site-header nav { gap: 0.85rem; font-size: 0.8rem; }
  .steps > li { padding-left: 3.5rem; }
}
