/* =============================================================
   HackKit — Unified Design System v2
   ============================================================= */

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

/* ─── Design Tokens ───────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:      #07090f;
  --bg2:     #0b0e18;
  --card:    #0f1220;
  --card2:   #141828;
  --card3:   #1a2035;

  /* Borders */
  --border:  #1e2640;
  --border2: #283050;
  --border3: #324060;

  /* Text */
  --text:    #dde2f0;
  --text2:   #aab0cc;
  --dim:     #636d94;
  --dim2:    #424d70;

  /* Accent — green (default) */
  --accent:      #00e5a0;
  --accent2:     #00c8f0;
  --accent-soft: rgba(0, 229, 160, .08);
  --accent-glow: rgba(0, 229, 160, .18);
  --accent-rgb:  0, 229, 160;

  /* Semantic colors */
  --red:    #ff3d5a;
  --orange: #ff7a28;
  --amber:  #ffb820;
  --blue:   #4d8aff;
  --violet: #9066ff;
  --pink:   #ff4d9e;
  --teal:   #00c8a8;
  --yellow: #ffd820;
  --green2: #22e87a;

  /* Typography */
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --navbar-h:  62px;
  --max-w:     1200px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,.3);
  --shadow:    0 8px 32px rgba(0,0,0,.4);
  --shadow-lg: 0 16px 64px rgba(0,0,0,.5);
}

/* Per-page accent overrides */
body.page-vulns      { --accent: #00c8f0; --accent2: #00e5a0; --accent-soft: rgba(0,200,240,.08); --accent-glow: rgba(0,200,240,.18); --accent-rgb: 0,200,240; }
body.page-recon-tools{ --accent: #22e87a; --accent2: #00e5a0; --accent-soft: rgba(34,232,122,.08); --accent-glow: rgba(34,232,122,.18); --accent-rgb: 34,232,122; }
body.page-exploit    { --accent: #ff3d5a; --accent2: #ff7a28; --accent-soft: rgba(255,61,90,.08); --accent-glow: rgba(255,61,90,.18); --accent-rgb: 255,61,90; }
body.page-postexploit{ --accent: #9066ff; --accent2: #ff4d9e; --accent-soft: rgba(144,102,255,.08); --accent-glow: rgba(144,102,255,.18); --accent-rgb: 144,102,255; }

/* ─── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--border3); }

/* ─── Ambient Glow ───────────────────────────────────────── */
.ambient {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.ambient::before {
  content: '';
  position: absolute;
  width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), .055) 0%, transparent 65%);
  top: -250px; left: -150px;
  animation: ambientDrift1 20s ease-in-out infinite alternate;
}
.ambient::after {
  content: '';
  position: absolute;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,200,240,.04) 0%, transparent 65%);
  bottom: -200px; right: -100px;
  animation: ambientDrift2 25s ease-in-out infinite alternate;
}
@keyframes ambientDrift1 { from{transform:translate(0,0)} to{transform:translate(60px,40px)} }
@keyframes ambientDrift2 { from{transform:translate(0,0)} to{transform:translate(-50px,-30px)} }

/* Noise */
.noise {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scan line */
.scanline {
  position: fixed; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), .06), transparent);
  z-index: 9999; pointer-events: none; top: 0;
  animation: scanline 12s linear infinite;
}
@keyframes scanline { 0%{top:0;opacity:1} 90%{opacity:.5} 100%{top:100vh;opacity:0} }

/* ─── Animations ──────────────────────────────────────────── */
@keyframes pulse    { 0%,100%{opacity:1} 50%{opacity:.3} }
@keyframes fadeIn   { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:none} }
@keyframes fadeUp   { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }
@keyframes slideIn  { from{opacity:0;transform:translateX(-12px)} to{opacity:1;transform:none} }
@keyframes scaleIn  { from{opacity:0;transform:scale(.96)} to{opacity:1;transform:scale(1)} }
@keyframes shimmer  { from{background-position:200% center} to{background-position:-200% center} }

/* ================================================================
   NAVBAR
   ================================================================ */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  height: var(--navbar-h);
  background: rgba(7, 9, 15, .88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  height: 100%; padding: 0 28px;
  display: flex; align-items: center; gap: 24px;
}

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.nav-brand-logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-glow);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all .25s;
}
.nav-brand:hover .nav-brand-logo {
  background: rgba(var(--accent-rgb), .14);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), .2);
}
.nav-brand-text {
  font-family: var(--font-mono);
  font-size: 15px; font-weight: 700;
  color: var(--text);
  letter-spacing: -.3px;
}
.nav-brand-text em {
  font-style: normal;
  color: var(--accent);
}

.nav-links {
  display: flex; align-items: center; gap: 2px;
  flex: 1;
}
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500;
  color: var(--dim); text-decoration: none;
  padding: 6px 14px; border-radius: var(--radius-sm);
  transition: all .2s; white-space: nowrap;
  position: relative;
}
.nav-link:hover { color: var(--text2); background: rgba(255,255,255,.04); }
.nav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.nav-link.active::after {
  content: '';
  position: absolute; bottom: -1px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px;
  background: var(--accent); border-radius: 99px;
}

.nav-badge {
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
  background: var(--accent-soft); color: var(--accent);
  letter-spacing: .5px;
}

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--border);
  color: var(--dim); padding: 7px 11px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 15px; transition: all .2s;
  line-height: 1;
}
.nav-toggle:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), .4); background: var(--accent-soft); }

/* ─── Page Container ─────────────────────────────────────── */
.page-wrap, .wrapper, .wrap, .container {
  position: relative; z-index: 1;
  max-width: var(--max-w); margin: 0 auto;
  padding: 52px 28px 120px;
}

/* ─── Chip / Badge ───────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), .3);
  padding: 6px 16px; border-radius: 99px;
  background: var(--accent-soft);
}
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: pulse 2s ease infinite; }

/* ─── Hero (page-level) ─────────────────────────────────── */
.hero {
  text-align: center;
  padding: 64px 28px 56px;
  margin-bottom: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, var(--card2) 0%, var(--bg) 100%);
  position: relative; overflow: hidden;
  animation: scaleIn .5s ease both;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent, transparent 28px,
    rgba(var(--accent-rgb), .025) 28px, rgba(var(--accent-rgb), .025) 29px
  );
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), .5), transparent);
}

/* Hero pill badges */
.hero-tag, .hero-badge, .hero-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), .3);
  padding: 7px 18px; border-radius: 99px;
  background: var(--accent-soft);
  margin-bottom: 22px;
}
.hero-label .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2s ease infinite; }

.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  font-weight: 900; letter-spacing: -2px;
  color: #fff; line-height: 1.05; margin-bottom: 16px;
}
.hero h1 span, .hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  color: var(--dim); font-size: 15px; max-width: 600px;
  margin: 0 auto; font-weight: 400; line-height: 1.7;
}

/* ─── Warning ─────────────────────────────────────────────── */
.warning {
  background: rgba(255, 61, 90, .04);
  border: 1px solid rgba(255, 61, 90, .18);
  border-left: 3px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 36px;
  font-size: 13px; color: var(--dim); line-height: 1.7;
}
.warning b { color: var(--text2); }
.warning-title {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--red); margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
}

/* ─── Tip ─────────────────────────────────────────────────── */
.tip {
  background: rgba(255, 184, 32, .04);
  border: 1px solid rgba(255, 184, 32, .15);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 16px 20px; margin: 20px 0;
}
.tip-title { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--amber); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 6px; }
.tip p { font-size: 13px; color: var(--dim); }

/* ─── Stats row ───────────────────────────────────────────── */
.stats, .stats-bar {
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 32px;
}
.stat, .stat-chip {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 28px; text-align: center;
  transition: border-color .2s;
}
.stat:hover, .stat-chip:hover { border-color: var(--border2); }
.stat .n, .stat-chip .n, .stat-num {
  font-family: var(--font-mono);
  font-size: 28px; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; display: block;
}
.stat .l, .stat-chip .l, .stat-label {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  color: var(--dim); text-transform: uppercase; letter-spacing: 1.5px; margin-top: 3px;
}

/* ─── Search ──────────────────────────────────────────────── */
.search, .search-box {
  width: 100%; display: block;
  font-family: var(--font-mono); font-size: 13px;
  padding: 13px 18px 13px 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card); color: var(--text);
  outline: none; margin-bottom: 14px;
  transition: border-color .2s, box-shadow .2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23636d94' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 14px center;
}
.search:focus, .search-box:focus {
  border-color: rgba(var(--accent-rgb), .5);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .08);
}
.search::placeholder, .search-box::placeholder { color: var(--dim2); }
input.search-box { max-width: 480px; margin: 0 auto 28px; display: block; }

/* ─── Filter chips ────────────────────────────────────────── */
.filters, .controls {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 32px;
}
.controls { justify-content: center; }

.fbtn, .filter-btn {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  padding: 7px 15px; border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--card); color: var(--dim);
  cursor: pointer; transition: all .2s; white-space: nowrap;
  line-height: 1;
}
.fbtn:hover, .filter-btn:hover {
  border-color: rgba(var(--accent-rgb), .4);
  color: var(--accent); background: var(--accent-soft);
}
.fbtn.on, .filter-btn.active {
  background: var(--accent-soft);
  border-color: rgba(var(--accent-rgb), .45);
  color: var(--accent);
}

/* ─── No Results ──────────────────────────────────────────── */
.no-results, .no-res {
  text-align: center; padding: 80px 20px;
  color: var(--dim2); font-size: 14px; display: none;
}

/* ─── Section Divider ─────────────────────────────────────── */
.section-divider {
  display: flex; align-items: center; gap: 14px;
  color: var(--dim2); font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 2.5px; margin: 48px 0 32px;
}
.section-divider::before, .section-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}


/* ================================================================
   INDEX PAGE
   ================================================================ */

/* Grid background for index */
body:not([class]) .page-wrap::before,
body.page-index .page-wrap::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: .3;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 40%, transparent 100%);
}

/* Index hero */
.idx-hero {
  position: relative; z-index: 1;
  text-align: center;
  padding: 96px 28px 80px;
}
.idx-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), .3);
  padding: 7px 18px; border-radius: 99px;
  background: var(--accent-soft);
  margin-bottom: 28px;
}
.idx-hero .eyebrow .pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); animation: pulse 2s ease infinite;
}
.idx-hero h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900; letter-spacing: -3px;
  color: #fff; line-height: .95; margin-bottom: 24px;
}
.idx-hero h1 .grad {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 60%, #fff 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: shimmer 6s linear infinite;
}
.idx-hero .sub {
  font-size: 16px; color: var(--dim); font-weight: 400;
  max-width: 560px; margin: 0 auto 44px; line-height: 1.75;
}
.idx-hero .cta-row {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.cta-primary {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  color: var(--bg); background: var(--accent);
  padding: 12px 24px; border-radius: var(--radius-sm);
  text-decoration: none; transition: all .25s;
  border: none; cursor: pointer;
}
.cta-primary:hover { background: var(--accent2); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(var(--accent-rgb), .3); }
.cta-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  color: var(--text2); background: var(--card);
  padding: 12px 24px; border-radius: var(--radius-sm);
  text-decoration: none; transition: all .25s;
  border: 1px solid var(--border2);
}
.cta-secondary:hover { border-color: rgba(var(--accent-rgb), .4); color: var(--accent); transform: translateY(-2px); }

/* Quick stats row */
.idx-stats {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1px; margin: 0 0 64px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.idx-stat {
  background: var(--card); padding: 24px 20px; text-align: center;
  transition: background .2s;
}
.idx-stat:hover { background: var(--card2); }
.idx-stat .n {
  font-family: var(--font-mono); font-size: 30px; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; display: block; line-height: 1.1;
}
.idx-stat .l {
  font-family: var(--font-mono); font-size: 9px; font-weight: 600;
  color: var(--dim); text-transform: uppercase; letter-spacing: 2px; margin-top: 4px;
}

/* Section header */
.idx-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.idx-section-title {
  font-size: 12px; font-weight: 700; font-family: var(--font-mono);
  color: var(--dim2); text-transform: uppercase; letter-spacing: 2.5px;
  display: flex; align-items: center; gap: 12px;
}
.idx-section-title::before { content: ''; display: block; width: 3px; height: 14px; background: var(--accent); border-radius: 99px; }

/* Pages grid */
.pages-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px; margin-bottom: 72px;
}

.page-card {
  display: flex; flex-direction: column;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  transition: all .28s ease;
  position: relative; overflow: hidden;
  animation: fadeIn .4s ease both;
}
.page-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--pc-color, var(--accent));
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.page-card:hover {
  border-color: var(--border2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  background: var(--card2);
}
.page-card:hover::before { transform: scaleX(1); }

.pc-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.pc-icon-wrap {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: rgba(var(--pc-rgb, var(--accent-rgb)), .1);
  border: 1px solid rgba(var(--pc-rgb, var(--accent-rgb)), .2);
  transition: all .25s;
}
.page-card:hover .pc-icon-wrap { background: rgba(var(--pc-rgb, var(--accent-rgb)), .16); box-shadow: 0 0 20px rgba(var(--pc-rgb, var(--accent-rgb)), .15); }

.pc-meta {}
.pc-phase {
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--pc-color, var(--accent));
  margin-bottom: 4px;
}
.page-card h2 { font-size: 17px; font-weight: 700; color: #fff; line-height: 1.2; }

.page-card .pc-desc {
  font-size: 13px; color: var(--dim); line-height: 1.65;
  margin-bottom: 20px; flex: 1;
}
.pc-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.pc-count {
  font-family: var(--font-mono); font-size: 11px; color: var(--dim2);
  display: flex; align-items: center; gap: 8px;
}
.pc-count strong { color: var(--pc-color, var(--accent)); font-weight: 700; }
.pc-arrow {
  font-size: 16px; color: var(--dim2); transition: all .25s;
}
.page-card:hover .pc-arrow { color: var(--pc-color, var(--accent)); transform: translateX(4px); }

/* Card color variants */
.page-card.c-green  { --pc-color: #00e5a0; --pc-rgb: 0,229,160; }
.page-card.c-cyan   { --pc-color: #00c8f0; --pc-rgb: 0,200,240; }
.page-card.c-emerald{ --pc-color: #22e87a; --pc-rgb: 34,232,122; }
.page-card.c-red    { --pc-color: #ff3d5a; --pc-rgb: 255,61,90; }
.page-card.c-violet { --pc-color: #9066ff; --pc-rgb: 144,102,255; }
.page-card.c-amber  { --pc-color: #ffb820; --pc-rgb: 255,184,32; }
.page-card.c-pink   { --pc-color: #ff4d9e; --pc-rgb: 255,77,158; }

/* Disclaimer card */
.disclaimer {
  position: relative; z-index: 1;
  background: var(--card);
  border: 1px solid rgba(255,61,90,.2);
  border-left: 3px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  font-size: 13px; color: var(--dim); line-height: 1.75;
}
.disclaimer-title {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--red); margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.disclaimer strong { color: var(--text2); }

/* ================================================================
   WEB-RECON-GUIDE PAGE
   ================================================================ */

.page-recon .hero { margin-bottom: 48px; }

/* TOC Navigation */
.toc {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px; margin-bottom: 56px;
}
.toc a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  text-decoration: none; color: var(--dim);
  font-size: 13px; font-weight: 500; transition: all .2s; cursor: pointer;
}
.toc a:hover {
  border-color: rgba(var(--accent-rgb), .4);
  color: var(--text); background: var(--card2);
  transform: translateX(3px);
}
.toc a .num {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--accent); min-width: 22px;
}

/* Section layout */
.section { margin-bottom: 64px; animation: fadeUp .5s ease both; }
.section-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 28px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.section-num {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  color: var(--bg); background: var(--accent);
  padding: 5px 11px; border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.section-title { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 800; color: #fff; }

/* Guide cards */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  margin-bottom: 14px; transition: all .2s;
}
.card:hover { border-color: var(--border2); background: var(--card2); }
.card h3 {
  font-size: 16px; font-weight: 700; color: #fff;
  margin-bottom: 8px; display: flex; align-items: center; gap: 10px;
}
.card h3 .icon { font-size: 20px; }
.card .subtitle {
  font-family: var(--font-mono); font-size: 10px; color: var(--accent);
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 12px;
}
.card p, .card li { font-size: 14px; color: var(--dim); line-height: 1.75; }
.card ul { padding-left: 20px; }
.card ul li { margin-bottom: 7px; }
.card ul li::marker { color: var(--accent); }

/* Explain block */
.explain {
  background: var(--card2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px; margin: 14px 0;
}
.explain p { font-size: 14px; color: var(--dim); }
.explain strong { color: var(--text); }

/* Guide tool grid */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.tool-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 20px; transition: all .25s;
}
.tool-card:hover {
  border-color: rgba(var(--accent-rgb), .4); background: var(--card2);
  transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.35);
}
.tool-card .tool-name { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--accent); margin-bottom: 3px; }
.tool-card .tool-type { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; font-weight: 600; }
.tool-card .tool-desc { font-size: 13px; color: var(--dim); line-height: 1.65; margin-bottom: 12px; }
.tool-card .tool-cmd {
  font-family: var(--font-mono); font-size: 12px;
  background: var(--bg); color: var(--accent2);
  padding: 9px 13px; border-radius: var(--radius-sm);
  overflow-x: auto; white-space: nowrap;
  border: 1px solid var(--border);
}

/* Phase badges */
.phase-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 4px; margin-bottom: 8px;
}
.pb-passive { background: rgba(77,138,255,.1); color: var(--blue); }
.pb-active  { background: rgba(255,61,90,.1); color: var(--red); }
.pb-osint   { background: rgba(144,102,255,.1); color: var(--violet); }
.pb-semi    { background: rgba(255,184,32,.1); color: var(--amber); }

/* Workflow */
.workflow { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; align-items: center; }
.wf-step {
  flex: 1; min-width: 130px; text-align: center;
  padding: 18px 14px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.wf-step .wf-num { font-family: var(--font-mono); font-size: 24px; font-weight: 800; color: var(--accent); }
.wf-step .wf-label { font-size: 12px; color: var(--dim); margin-top: 4px; font-weight: 500; }
.wf-arrow { display: flex; align-items: center; color: var(--dim2); font-size: 18px; }

/* Comparison table */
.comparison-table { width: 100%; border-collapse: collapse; margin: 14px 0; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.comparison-table th {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; color: var(--dim);
  padding: 13px 16px; text-align: left; background: var(--card2);
  border-bottom: 1px solid var(--border);
}
.comparison-table td {
  padding: 12px 16px; font-size: 13px; color: var(--dim);
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:hover td { background: rgba(var(--accent-rgb), .025); }
.comparison-table code {
  font-family: var(--font-mono); font-size: 11px;
  background: var(--accent-soft); color: var(--accent);
  padding: 2px 7px; border-radius: 4px;
}

/* Checklist */
.checklist { list-style: none; padding: 0; }
.checklist li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; font-size: 14px; color: var(--dim);
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.checklist li:last-child { border: none; }
.checklist .check { color: var(--accent); font-weight: 700; flex-shrink: 0; margin-top: 2px; }

/* ================================================================
   WEB-VULNERABILITIES PAGE
   ================================================================ */
.table-wrap {
  border-radius: var(--radius); border: 1px solid var(--border);
  overflow: hidden; background: var(--card);
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; }
thead th {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--dim); padding: 14px 18px; text-align: left;
  background: var(--card2); border-bottom: 1px solid var(--border);
  position: sticky; top: var(--navbar-h); z-index: 2;
  white-space: nowrap;
}
tbody tr {
  transition: background .15s; border-bottom: 1px solid rgba(255,255,255,.025);
  animation: fadeIn .3s ease both;
}
tbody tr:hover { background: rgba(var(--accent-rgb), .025); }
tbody tr:last-child { border-bottom: none; }
td { padding: 14px 18px; font-size: 13px; vertical-align: top; }
td:first-child {
  font-family: var(--font-mono); font-size: 11px; color: var(--dim2);
  font-weight: 600; width: 44px; text-align: center;
}
.vuln-name { font-weight: 700; color: var(--text); display: block; margin-bottom: 3px; }
.vuln-aka  { font-family: var(--font-mono); font-size: 10px; color: var(--dim2); }
.desc-col  { color: var(--dim); font-size: 13px; line-height: 1.55; max-width: 300px; }
.mitigation { font-size: 12px; color: var(--dim); line-height: 1.55; max-width: 240px; }
.mitigation code {
  font-family: var(--font-mono); font-size: 11px;
  background: var(--accent-soft); color: var(--accent);
  padding: 1px 5px; border-radius: 3px;
}

/* Category tags */
.cat-tag {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  padding: 4px 10px; border-radius: 5px; display: inline-block; white-space: nowrap;
}
.cat-injection { background: rgba(255,61,90,.1);   color: var(--red); }
.cat-access    { background: rgba(144,102,255,.1); color: var(--violet); }
.cat-auth      { background: rgba(255,184,32,.1);  color: var(--amber); }
.cat-client    { background: rgba(77,138,255,.1);  color: var(--blue); }
.cat-server    { background: rgba(0,229,160,.1);   color: var(--accent); }
.cat-file      { background: rgba(255,216,32,.1);  color: var(--yellow); }
.cat-data      { background: rgba(255,77,158,.1);  color: var(--pink); }
.cat-logic     { background: rgba(0,200,240,.1);   color: var(--accent2); }
.cat-infra     { background: rgba(99,109,148,.15); color: var(--dim); }

/* Severity */
.severity {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 4px; display: inline-block; white-space: nowrap;
}
.sev-critical { background: rgba(255,30,30,.15); color: #ff4444; }
.sev-high     { background: rgba(255,61,90,.12); color: var(--red); }
.sev-medium   { background: rgba(255,184,32,.12); color: var(--amber); }
.sev-low      { background: rgba(255,216,32,.12); color: var(--yellow); }

/* ================================================================
   RECON-TOOLS-ENCYCLOPEDIA PAGE
   ================================================================ */
.cat-section  { margin-bottom: 52px; }
.cat-header   {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.cat-icon  { font-size: 22px; }
.cat-title { font-size: 1.3rem; font-weight: 800; color: #fff; }
.cat-count {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent); background: var(--accent-soft);
  padding: 3px 10px; border-radius: 5px; margin-left: auto;
  border: 1px solid rgba(var(--accent-rgb), .2);
}

.tools-grid  { display: grid; gap: 14px; }
.tool {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: all .25s; animation: fadeIn .35s ease both;
}
.tool:hover { border-color: var(--border2); box-shadow: var(--shadow); background: var(--card2); }

.tool-top  { padding: 22px 22px 0; display: flex; align-items: flex-start; gap: 14px; }
.tool-badge {
  font-family: var(--font-mono); font-size: 9px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 5px; white-space: nowrap; flex-shrink: 0; margin-top: 2px;
}
.badge-passive    { background: rgba(77,138,255,.1);   color: var(--blue); }
.badge-active     { background: rgba(255,61,90,.1);    color: var(--red); }
.badge-osint      { background: rgba(144,102,255,.1);  color: var(--violet); }
.badge-semi       { background: rgba(255,184,32,.1);   color: var(--amber); }
.badge-framework  { background: rgba(255,77,158,.1);   color: var(--pink); }

.tool-info    { flex: 1; min-width: 0; }
.tool-name    { font-family: var(--font-mono); font-size: 17px; font-weight: 600; color: var(--accent); margin-bottom: 2px; }
.tool-tagline { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.tool-body    { padding: 14px 22px 22px; }
.tool-desc    { font-size: 13px; color: var(--dim); line-height: 1.7; margin-bottom: 16px; }
.tool-desc strong { color: var(--text2); }

/* Detail rows */
.detail       { display: grid; grid-template-columns: 105px 1fr; gap: 3px 12px; margin-bottom: 12px; font-size: 13px; }
.detail-label { font-family: var(--font-mono); font-size: 10px; color: var(--dim2); text-transform: uppercase; letter-spacing: 1px; padding-top: 2px; }
.detail-val   { color: var(--dim); }
.detail-val code { font-family: var(--font-mono); font-size: 11px; background: var(--accent-soft); color: var(--accent); padding: 1px 6px; border-radius: 4px; }
.detail-val a { color: var(--accent2); text-decoration: none; }
.detail-val a:hover { text-decoration: underline; }

/* Command blocks */
.cmd-block  { margin-top: 12px; }
.cmd-label  { font-family: var(--font-mono); font-size: 9px; color: var(--dim2); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 7px; font-weight: 600; }
.cmd        { font-family: var(--font-mono); font-size: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; color: var(--accent2); overflow-x: auto; white-space: nowrap; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.cmd .prompt { color: var(--dim2); user-select: none; flex-shrink: 0; }
.cmd-comment { font-family: var(--font-mono); font-size: 11px; color: var(--dim2); padding-left: 4px; margin-bottom: 4px; }

/* Flags table */
.flags       { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.flags th    { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--dim2); text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); background: var(--card2); }
.flags td    { padding: 7px 12px; border-bottom: 1px solid rgba(255,255,255,.025); color: var(--dim); vertical-align: top; }
.flags tr:last-child td { border-bottom: none; }
.flags td:first-child { font-family: var(--font-mono); color: var(--accent); white-space: nowrap; }

/* Expand */
.expand-toggle {
  font-family: var(--font-mono); font-size: 11px; color: var(--accent2);
  cursor: pointer; background: none;
  border: 1px solid rgba(0,200,240,.2);
  padding: 6px 14px; border-radius: var(--radius-sm);
  margin-top: 12px; transition: all .2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.expand-toggle:hover { background: rgba(0,200,240,.06); border-color: var(--accent2); }
.expandable { display: none; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.expandable.show { display: block; }

/* ================================================================
   EXPLOITATION-TOOLS & POST-EXPLOITATION-TOOLS
   ================================================================ */
.cat          { margin-bottom: 48px; }
.cat-hdr      {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 12px;
}
.cat-hdr .ci  { font-size: 22px; }
.cat-hdr .ct  { font-size: 1.2rem; font-weight: 800; color: #fff; flex: 1; }
.cat-hdr .cc  {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent); background: var(--accent-soft);
  padding: 3px 10px; border-radius: 5px;
  border: 1px solid rgba(var(--accent-rgb), .2);
}
.cat-desc { font-size: 13px; color: var(--dim); margin-bottom: 16px; line-height: 1.65; }

.tlist    { display: flex; flex-direction: column; gap: 12px; }
.tc       { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: all .2s; }
.tc:hover { border-color: var(--border2); background: var(--card2); }

.tc-head  { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.tb       { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; padding: 3px 9px; border-radius: 5px; }

/* Post-exploit badges */
.b-lin  { background: rgba(0,229,160,.1);   color: var(--accent); }
.b-win  { background: rgba(77,138,255,.1);  color: var(--blue); }
.b-cred { background: rgba(255,184,32,.1);  color: var(--amber); }
.b-lat  { background: rgba(144,102,255,.1); color: var(--violet); }
.b-per  { background: rgba(255,61,90,.1);   color: var(--red); }
.b-piv  { background: rgba(0,200,240,.1);   color: var(--accent2); }
.b-exf  { background: rgba(255,122,40,.1);  color: var(--orange); }
.b-eva  { background: rgba(255,77,158,.1);  color: var(--pink); }
.b-rpt  { background: rgba(0,200,168,.1);   color: var(--teal); }
.b-ad   { background: rgba(144,102,255,.1); color: var(--violet); }
.b-multi{ background: rgba(255,216,32,.1);  color: var(--yellow); }

/* Exploit badges */
.b1 { background: rgba(255,61,90,.1);   color: var(--red); }
.b2 { background: rgba(255,122,40,.1);  color: var(--orange); }
.b3 { background: rgba(255,184,32,.1);  color: var(--amber); }
.b4 { background: rgba(77,138,255,.1);  color: var(--blue); }
.b5 { background: rgba(144,102,255,.1); color: var(--violet); }
.b6 { background: rgba(0,200,240,.1);   color: var(--accent2); }
.b7 { background: rgba(34,232,122,.1);  color: var(--green2); }
.b8 { background: rgba(255,77,158,.1);  color: var(--pink); }
.b9 { background: rgba(255,216,32,.1);  color: var(--yellow); }

.tn { font-family: var(--font-mono); font-size: 17px; font-weight: 700; color: var(--accent); }
.tt { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .8px; font-weight: 600; margin-left: auto; }
.td { font-size: 13px; color: var(--dim); line-height: 1.75; margin-bottom: 12px; }
.td strong { color: var(--text2); }

/* Meta info */
.tm  { display: grid; grid-template-columns: 90px 1fr; gap: 3px 12px; font-size: 12px; margin-bottom: 14px; padding: 12px 14px; background: var(--bg); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.ml  { font-family: var(--font-mono); font-size: 10px; color: var(--dim2); text-transform: uppercase; letter-spacing: 1px; padding-top: 2px; }
.mv  { color: var(--dim); word-break: break-all; }
.mv code { font-family: var(--font-mono); font-size: 11px; background: var(--accent-soft); color: var(--accent); padding: 1px 5px; border-radius: 3px; }
.mv a { color: var(--accent2); text-decoration: none; }

/* Commands */
.cl  { font-family: var(--font-mono); font-size: 9px; color: var(--dim2); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 8px; font-weight: 600; }
.cc  { font-family: var(--font-mono); font-size: 11px; color: var(--dim2); margin-bottom: 3px; padding-left: 4px; }
.cm  { font-family: var(--font-mono); font-size: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; color: var(--accent2); overflow-x: auto; white-space: nowrap; margin-bottom: 8px; }
.cm .p { color: var(--dim2); margin-right: 8px; user-select: none; }

/* Flags */
.ft    { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.ft th { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--dim2); text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); background: var(--card2); }
.ft td { padding: 7px 12px; border-bottom: 1px solid rgba(255,255,255,.025); color: var(--dim); vertical-align: top; }
.ft tr:last-child td { border-bottom: none; }
.ft td:first-child { font-family: var(--font-mono); color: var(--accent); white-space: nowrap; }

/* Expand btn */
.eb       { font-family: var(--font-mono); font-size: 11px; color: var(--accent2); cursor: pointer; background: none; border: 1px solid rgba(0,200,240,.2); padding: 6px 14px; border-radius: var(--radius-sm); margin-top: 10px; transition: all .2s; display: inline-flex; align-items: center; gap: 6px; }
.eb:hover { background: rgba(0,200,240,.06); border-color: var(--accent2); }
.ea       { display: none; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.ea.open  { display: block; }

/* ================================================================
   FOOTER (all pages)
   ================================================================ */
.site-footer {
  position: relative; z-index: 1;
  margin-top: 80px;
  padding: 32px 0 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-brand {
  font-family: var(--font-mono); font-size: 14px; font-weight: 700;
  color: var(--accent); margin-bottom: 6px;
}
.footer-brand em { font-style: normal; color: var(--dim); font-weight: 400; }
.footer-links {
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
}
.footer-link {
  font-size: 12px; color: var(--dim2); text-decoration: none;
  padding: 4px 10px; border-radius: 6px; transition: all .2s;
}
.footer-link:hover { color: var(--accent); background: var(--accent-soft); }
.footer-copy { font-size: 11px; color: var(--dim2); font-family: var(--font-mono); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .pages-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  td, th { padding: 10px 14px; font-size: 12px; }
  .desc-col, .mitigation { max-width: none; }
  .page-wrap, .wrapper, .wrap, .container { padding: 40px 20px 100px; }
}

@media (max-width: 700px) {
  .tool-grid    { grid-template-columns: 1fr; }
  .workflow     { flex-direction: column; }
  .wf-arrow     { transform: rotate(90deg); justify-content: center; }
  .toc          { grid-template-columns: 1fr 1fr; }
  .tool-top     { flex-direction: column; gap: 8px; }
  .detail       { grid-template-columns: 1fr; }
  .detail-label { margin-top: 6px; }
  .table-wrap   { overflow-x: auto; }
  table         { min-width: 640px; }
  .pages-grid   { grid-template-columns: 1fr; }
  .idx-stats    { grid-template-columns: repeat(3, 1fr); }
  .idx-hero h1  { letter-spacing: -2px; }
}

@media (max-width: 580px) {
  .nav-links           { display: none; flex-direction: column; gap: 4px; width: 100%; padding: 10px 0 14px; border-top: 1px solid var(--border); }
  .nav-links.open      { display: flex; }
  .nav-toggle          { display: block; }
  .nav-link.active::after { display: none; }
  .nav-inner           { flex-wrap: wrap; padding: 0 16px; gap: 0; align-items: center; }
  .nav-brand           { height: var(--navbar-h); flex: 1; }
  .page-wrap, .wrapper, .wrap, .container { padding: 28px 16px 80px; }
  .tc-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .tt      { margin-left: 0; }
  .tm      { grid-template-columns: 1fr; }
  .ml      { margin-top: 6px; }
  .idx-stats { grid-template-columns: repeat(2, 1fr); }
  .toc       { grid-template-columns: 1fr; }
  .cta-row   { flex-direction: column; align-items: center; }
  .idx-hero  { padding: 60px 20px 52px; }
  .idx-hero h1 { letter-spacing: -1.5px; }
}

/* ================================================================
   LIGHT MODE
   ================================================================ */
html.light {
  --bg:      #f0f2f8;
  --bg2:     #e8eaf4;
  --card:    #ffffff;
  --card2:   #f5f6fc;
  --card3:   #eceef8;
  --border:  #d8daea;
  --border2: #c4c8de;
  --border3: #b0b6d0;
  --text:    #1a1e30;
  --text2:   #3a4060;
  --dim:     #5c6480;
  --dim2:    #8890b0;
}
html.light body { background: var(--bg); color: var(--text); }
html.light .navbar { background: rgba(240,242,248,.92); }
html.light .card, html.light .tc, html.light .tool { background: var(--card); }
html.light .ambient::before { opacity: .4; }
html.light .noise { opacity: .012; }
html.light .cmd, html.light .cm { background: var(--card3); }

/* ─── Dark/Light Toggle ────────────────────────────────────── */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent; color: var(--dim);
  cursor: pointer; transition: all .2s;
  font-size: 14px; flex-shrink: 0;
  margin-left: auto;
}
.theme-toggle:hover { color: var(--accent); border-color: rgba(var(--accent-rgb),.4); background: var(--accent-soft); }

/* ─── Bookmark button ──────────────────────────────────────── */
.bookmark-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent; color: var(--dim);
  cursor: pointer; transition: all .2s;
  font-size: 14px; flex-shrink: 0; position: relative;
}
.bookmark-btn:hover { color: var(--amber); border-color: rgba(255,184,32,.4); background: rgba(255,184,32,.06); }
.bookmark-btn.saved { color: var(--amber); border-color: rgba(255,184,32,.4); background: rgba(255,184,32,.08); }
.bookmark-count {
  position: absolute; top: -5px; right: -5px;
  background: var(--accent); color: var(--bg);
  font-family: var(--font-mono); font-size: 8px; font-weight: 700;
  width: 14px; height: 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Toast notification ───────────────────────────────────── */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--card2); border: 1px solid var(--border2);
  color: var(--text2); font-family: var(--font-mono); font-size: 12px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); z-index: 9999;
  transition: transform .3s ease, opacity .3s ease; opacity: 0;
  pointer-events: none; white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { border-color: rgba(var(--accent-rgb),.4); color: var(--accent); }
.toast.error   { border-color: rgba(255,61,90,.4); color: var(--red); }

/* ─── Keyboard shortcut hint ───────────────────────────────── */
.kbd-hint {
  font-family: var(--font-mono); font-size: 9px;
  background: var(--card2); border: 1px solid var(--border2);
  color: var(--dim2); padding: 2px 7px; border-radius: 4px;
  margin-left: 8px; letter-spacing: 0;
}

/* ─── Copy button (cheatsheets / payload) ──────────────────── */
.copy-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--accent-rgb),.25);
  background: var(--accent-soft); color: var(--accent);
  cursor: pointer; transition: all .2s;
  white-space: nowrap; flex-shrink: 0;
}
.copy-btn:hover { background: rgba(var(--accent-rgb),.14); border-color: rgba(var(--accent-rgb),.5); }
.copy-btn.copied { border-color: rgba(34,232,122,.4); color: #22e87a; background: rgba(34,232,122,.08); }

/* ─── OS Badges ────────────────────────────────────────────── */
.os-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 9px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px; white-space: nowrap;
}
.os-linux   { background: rgba(34,232,122,.1);  color: var(--green2); }
.os-windows { background: rgba(77,138,255,.1);  color: var(--blue); }
.os-mac     { background: rgba(200,200,220,.1); color: var(--text2); }
.os-cross   { background: rgba(0,229,160,.07);  color: var(--accent); }

/* ─── Install command block ────────────────────────────────── */
.install-block {
  margin-top: 10px; display: none;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden;
}
.install-block.show { display: block; }
.install-tab-bar {
  display: flex; background: var(--card2);
  border-bottom: 1px solid var(--border);
}
.install-tab {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  padding: 6px 14px; cursor: pointer; color: var(--dim2);
  border-right: 1px solid var(--border); transition: all .2s;
  text-transform: uppercase; letter-spacing: 1px;
}
.install-tab.active, .install-tab:hover { color: var(--accent); background: var(--accent-soft); }
.install-pane { display: none; padding: 12px 14px; }
.install-pane.active { display: block; }
.install-pane .cm { margin-bottom: 0; }

/* ─── PoC / Expand for vuln table ──────────────────────────── */
.poc-btn {
  font-family: var(--font-mono); font-size: 9px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 4px; cursor: pointer;
  border: 1px solid rgba(var(--accent-rgb),.2);
  background: var(--accent-soft); color: var(--accent);
  transition: all .2s; margin-top: 4px; white-space: nowrap;
}
.poc-btn:hover { background: rgba(var(--accent-rgb),.15); }
.poc-wrap { display: none; }
.poc-wrap.show { display: table-row; }
.poc-cell {
  background: var(--card2); padding: 16px 18px !important;
  border-top: 1px solid var(--border);
}
.poc-cell pre {
  font-family: var(--font-mono); font-size: 11px; color: var(--accent2);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  overflow-x: auto; white-space: pre; margin: 0;
  line-height: 1.6;
}
.poc-meta { font-size: 11px; color: var(--dim2); margin-bottom: 8px; }
.cve-tag {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  padding: 2px 7px; border-radius: 4px;
  background: rgba(255,122,40,.1); color: var(--orange);
  margin-left: 6px; letter-spacing: .5px;
}

/* Attack vector tag */
.av-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--font-mono); font-size: 9px; font-weight: 600;
  padding: 2px 7px; border-radius: 4px; white-space: nowrap;
  text-transform: uppercase; letter-spacing: .5px;
}
.av-url    { background: rgba(77,138,255,.1);  color: var(--blue); }
.av-header { background: rgba(144,102,255,.1); color: var(--violet); }
.av-body   { background: rgba(255,184,32,.1);  color: var(--amber); }
.av-cookie { background: rgba(255,77,158,.1);  color: var(--pink); }
.av-multi  { background: rgba(0,229,160,.08);  color: var(--accent); }

/* ─── Progress Tracker (recon guide) ───────────────────────── */
.progress-bar-wrap {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 18px 24px;
  margin-bottom: 32px;
}
.progress-bar-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.progress-bar-title {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--dim2); text-transform: uppercase; letter-spacing: 2px;
}
.progress-pct {
  font-family: var(--font-mono); font-size: 14px; font-weight: 700;
  color: var(--accent);
}
.progress-bar-track {
  height: 6px; background: var(--border); border-radius: 99px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px; transition: width .4s ease;
}
.progress-reset {
  font-family: var(--font-mono); font-size: 10px; color: var(--dim2);
  cursor: pointer; background: none; border: none; padding: 0;
  margin-top: 6px; transition: color .2s;
}
.progress-reset:hover { color: var(--red); }

/* Checklist items with localStorage state */
.cl-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background .15s; font-size: 14px; color: var(--dim);
}
.cl-item:hover { background: var(--accent-soft); }
.cl-item.done { color: var(--dim2); text-decoration: line-through; }
.cl-item .cl-box {
  width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; margin-top: 2px;
  border: 2px solid var(--border2); transition: all .2s;
  display: flex; align-items: center; justify-content: center;
}
.cl-item.done .cl-box {
  background: var(--accent); border-color: var(--accent);
}
.cl-item.done .cl-box::after { content: '✓'; color: var(--bg); font-size: 10px; font-weight: 700; }

/* Time estimate badge */
.time-est {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  color: var(--dim2); background: var(--card2);
  border: 1px solid var(--border); border-radius: 99px;
  padding: 3px 10px; margin-left: auto;
}
.time-est svg { opacity: .6; }

/* ================================================================
   CHEATSHEETS PAGE
   ================================================================ */
body.page-cheatsheets { --accent: #ffb820; --accent2: #ff7a28; --accent-soft: rgba(255,184,32,.08); --accent-glow: rgba(255,184,32,.18); --accent-rgb: 255,184,32; }

.cheat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
  gap: 20px; margin-bottom: 40px;
}
.cheat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  animation: fadeIn .35s ease both;
}
.cheat-card-header {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--card2);
}
.cheat-card-icon { font-size: 20px; }
.cheat-card-title { font-size: 15px; font-weight: 700; color: #fff; flex: 1; }
.cheat-card-count {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb),.2);
  padding: 2px 8px; border-radius: 5px;
}
.cheat-cmd-list { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.cheat-cmd-item {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.cheat-cmd-label {
  font-size: 11px; color: var(--dim); padding: 6px 12px;
  border-bottom: 1px solid var(--border); background: var(--card2);
  font-weight: 500;
}
.cheat-cmd-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
}
.cheat-cmd-code {
  font-family: var(--font-mono); font-size: 12px; color: var(--accent2);
  flex: 1; overflow-x: auto; white-space: nowrap; padding-right: 8px;
}

/* ================================================================
   PAYLOAD LIBRARY PAGE
   ================================================================ */
body.page-payloads { --accent: #ff4d9e; --accent2: #9066ff; --accent-soft: rgba(255,77,158,.08); --accent-glow: rgba(255,77,158,.18); --accent-rgb: 255,77,158; }

.payload-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: 20px; margin-bottom: 40px;
}
.payload-section {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.payload-section-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 22px; background: var(--card2);
  border-bottom: 1px solid var(--border);
}
.payload-section-title { font-size: 15px; font-weight: 700; color: #fff; flex: 1; }
.payload-list { padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.payload-item {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  transition: border-color .2s;
}
.payload-item:hover { border-color: rgba(var(--accent-rgb),.3); }
.payload-context {
  font-size: 10px; color: var(--dim2); font-family: var(--font-mono);
  margin-bottom: 4px; text-transform: uppercase; letter-spacing: .8px;
}
.payload-code {
  font-family: var(--font-mono); font-size: 11px; color: var(--accent2);
  word-break: break-all; flex: 1; line-height: 1.5;
}

/* ================================================================
   CTF METHODOLOGY PAGE
   ================================================================ */
body.page-ctf { --accent: #9066ff; --accent2: #ff4d9e; --accent-soft: rgba(144,102,255,.08); --accent-glow: rgba(144,102,255,.18); --accent-rgb: 144,102,255; }

.ctf-flow {
  display: flex; flex-direction: column; gap: 0;
  margin-bottom: 48px; position: relative;
}
.ctf-flow::before {
  content: '';
  position: absolute; left: 27px; top: 48px; bottom: 20px; width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
  z-index: 0;
}
.ctf-step {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 0 0 24px; position: relative; z-index: 1;
  animation: fadeIn .4s ease both;
}
.ctf-step-num {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  background: var(--card); border: 2px solid rgba(var(--accent-rgb),.4);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 18px; font-weight: 800;
  color: var(--accent);
}
.ctf-step-body {
  flex: 1; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px; margin-top: 6px;
  transition: all .2s;
}
.ctf-step-body:hover { border-color: var(--border2); background: var(--card2); }
.ctf-step-title { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.ctf-step-desc { font-size: 13px; color: var(--dim); line-height: 1.7; margin-bottom: 14px; }
.ctf-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ctf-tag {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  padding: 3px 10px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb),.25);
}
.ctf-checklist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ctf-checklist li {
  font-size: 13px; color: var(--dim); display: flex; align-items: flex-start; gap: 8px;
  padding: 4px 0;
}
.ctf-checklist li::before { content: '→'; color: var(--accent); font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.ctf-pattern {
  background: var(--bg); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px; font-size: 13px; color: var(--dim); line-height: 1.7;
}
.ctf-pattern strong { color: var(--text2); }
.ctf-pattern code {
  font-family: var(--font-mono); font-size: 11px;
  background: var(--accent-soft); color: var(--accent);
  padding: 1px 5px; border-radius: 3px;
}

/* ================================================================
   PRINT STYLES
   ================================================================ */
@media print {
  .navbar, .noise, .ambient, .scanline, .theme-toggle,
  .bookmark-btn, .copy-btn, .poc-btn, .eb, .expand-toggle,
  .filter-btn, .search-box, .cta-row, .ctf-flow::before { display: none !important; }
  body { background: #fff !important; color: #000 !important; font-size: 11pt; }
  .hero, .card, .tc, .tool, .cheat-card, .payload-section { background: #f8f8f8 !important; border-color: #ccc !important; }
  .hero h1, .page-card h2 { color: #000 !important; -webkit-text-fill-color: #000 !important; }
  .page-wrap, .wrapper, .wrap, .container { padding: 20px !important; max-width: 100% !important; }
  a { color: #333 !important; text-decoration: none !important; }
  .site-footer { margin-top: 20px !important; }
  @page { margin: 1.5cm; }
}

/* ================================================================
   RESPONSIVE ADDITIONS
   ================================================================ */
@media (max-width: 700px) {
  .cheat-grid    { grid-template-columns: 1fr; }
  .payload-grid  { grid-template-columns: 1fr; }
  .ctf-flow::before { left: 23px; }
  .ctf-step-num  { width: 46px; height: 46px; font-size: 15px; }
  .progress-bar-wrap { padding: 14px 16px; }
}
@media (max-width: 580px) {
  .nav-actions   { gap: 6px; }
  .theme-toggle, .bookmark-btn { width: 30px; height: 30px; font-size: 13px; }
}
