/* ============================================================
   IB Smart Path — Cybersecurity Education Platform
   Shared Stylesheet
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --bg:        #0a0e1a;
  --bg-card:   #1a1f35;
  --bg-card2:  #12172b;
  --bg-nav:    #0d1225;
  --primary:   #00ff88;
  --cyan:      #00b4d8;
  --red:       #ff4757;
  --orange:    #ffa502;
  --yellow:    #ffe066;
  --text:      #e2e8f0;
  --text-muted:#8892a4;
  --border:    #2a3050;
  --border2:   #1e2640;
  --shadow:    0 4px 24px rgba(0,0,0,0.5);
  --radius:    10px;
  --radius-sm: 6px;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-ui:   'Inter', system-ui, sans-serif;
  --transition: 0.25s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--cyan); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }

img { max-width: 100%; }

h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.5em;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }

ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.35rem; }

strong { color: var(--primary); font-weight: 600; }
em { color: var(--cyan); font-style: normal; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ---------- Selection ---------- */
::selection { background: var(--primary); color: #000; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

.nav-logo .logo-bracket { color: var(--cyan); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
}

.nav-links a {
  display: block;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: rgba(0,255,136,0.08);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ---------- Mobile Nav ---------- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.75rem 1.5rem 1rem;
    gap: 0.1rem;
    display: none;
  }

  .nav-links.open { display: flex; }
}

/* ============================================================
   MAIN CONTENT WRAPPER
   ============================================================ */
main { flex: 1; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   HERO SECTION (index.html)
   ============================================================ */
.hero {
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(0,255,136,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(0,180,216,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  display: inline-block;
  width: 30px;
  height: 1px;
  background: var(--primary);
  opacity: 0.5;
}

.hero h1 {
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 2.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,255,136,0.08);
  border: 1px solid rgba(0,255,136,0.2);
  border-radius: 2rem;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--primary);
  margin-bottom: 2.5rem;
}

/* ---------- Topic Cards Grid ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.topic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
}

.topic-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  opacity: 0;
  transition: opacity var(--transition);
}

.topic-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 40px rgba(0,255,136,0.12);
  color: var(--text);
}

.card-icon {
  font-size: 2rem;
  line-height: 1;
}

.card-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--primary);
  opacity: 0.6;
  letter-spacing: 0.1em;
}

.topic-card h3 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.topic-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
}

.card-arrow {
  align-self: flex-end;
  font-size: 1.2rem;
  color: var(--cyan);
  opacity: 0;
  transform: translateX(-8px);
  transition: all var(--transition);
}

.topic-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================================
   PAGE HEADER (inner pages)
   ============================================================ */
.page-header {
  background: linear-gradient(180deg, var(--bg-card2) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}

.page-header .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.page-header h1 {
  background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0.75rem auto 0;
}

/* ============================================================
   CONTENT LAYOUT
   ============================================================ */
.content-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  .toc { display: none; }
}

/* ---------- Table of Contents ---------- */
.toc {
  position: sticky;
  top: 80px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.toc-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li { margin: 0; }

.toc a {
  display: block;
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: all var(--transition);
  line-height: 1.3;
}

.toc a:hover,
.toc a.active {
  color: var(--primary);
  background: rgba(0,255,136,0.06);
  border-left-color: var(--primary);
}

/* ---------- Article Body ---------- */
.article {
  min-width: 0;
}

.article section {
  margin-bottom: 3rem;
  scroll-margin-top: 80px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  max-width: 60px;
}

.article h2 {
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}

.article h3 {
  color: var(--cyan);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.article h4 {
  color: var(--primary);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

/* ============================================================
   CARDS & BOXES
   ============================================================ */
.info-box, .warn-box, .tip-box, .danger-box {
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-left: 3px solid;
  font-size: 0.9rem;
}

.info-box  { background: rgba(0,180,216,0.08);  border-color: var(--cyan);   color: var(--text); }
.warn-box  { background: rgba(255,165,2,0.08);  border-color: var(--orange); color: var(--text); }
.tip-box   { background: rgba(0,255,136,0.06);  border-color: var(--primary);color: var(--text); }
.danger-box{ background: rgba(255,71,87,0.08);  border-color: var(--red);    color: var(--text); }

.info-box strong, .info-box h4  { color: var(--cyan); }
.warn-box strong, .warn-box h4  { color: var(--orange); }
.tip-box strong, .tip-box h4    { color: var(--primary); }
.danger-box strong, .danger-box h4 { color: var(--red); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.card h4 {
  margin-top: 0;
  color: var(--cyan);
}

/* ============================================================
   CODE BLOCKS
   ============================================================ */
pre {
  position: relative;
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.25rem 1.25rem 1.25rem;
  overflow-x: auto;
  margin: 1.25rem 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #e2e8f0;
}

pre .ln {
  color: #4a5568;
  user-select: none;
  margin-right: 1.25rem;
  display: inline-block;
  width: 2ch;
  text-align: right;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(0,255,136,0.06);
  border: 1px solid rgba(0,255,136,0.12);
  border-radius: 3px;
  padding: 0.1em 0.35em;
  color: var(--primary);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* Terminal style */
.terminal {
  background: #0a0e1a;
  border: 1px solid #2a3050;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 1.25rem 0;
}

.terminal-header {
  background: #1a1f35;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-dots .dot-r { background: #ff5f57; }
.terminal-dots .dot-y { background: #febc2e; }
.terminal-dots .dot-g { background: #28c840; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  color: #a8d8a8;
  overflow-x: auto;
}

.terminal-body .prompt { color: var(--primary); }
.terminal-body .cmd { color: #e2e8f0; }
.terminal-body .comment { color: #4a5568; }
.terminal-body .output { color: #8892a4; }
.terminal-body .highlight { color: var(--cyan); }
.terminal-body .error { color: var(--red); }
.terminal-body .success { color: var(--primary); }
.terminal-body .warning { color: var(--orange); }
.terminal-body .string { color: #f6ad55; }
.terminal-body .number { color: #fc8181; }
.terminal-body .keyword { color: #76e4f7; }

/* Syntax highlighting */
.sh-comment { color: #4a5568; font-style: italic; }
.sh-string   { color: #f6ad55; }
.sh-keyword  { color: #76e4f7; }
.sh-flag     { color: #d6bcfa; }
.sh-value    { color: #fc8181; }
.sh-ip       { color: var(--orange); }
.sh-proto    { color: var(--primary); }
.sh-filter   { color: var(--cyan); }

/* Copy Button */
.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 10;
}

.copy-btn:hover { color: var(--primary); border-color: var(--primary); background: rgba(0,255,136,0.06); }
.copy-btn.copied { color: var(--primary); border-color: var(--primary); }

/* ============================================================
   FLAGS TABLE (tcpdump page)
   ============================================================ */
.flags-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.875rem;
}

.flags-table th {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.6rem 1rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.flags-table td {
  border: 1px solid var(--border2);
  padding: 0.6rem 1rem;
  vertical-align: top;
}

.flags-table tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
.flags-table tr:hover td { background: rgba(0,255,136,0.04); }

.flags-table code { font-size: 0.8rem; }

/* ============================================================
   GLOSSARY PAGE
   ============================================================ */
.glossary-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 2rem 0 1.5rem;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem;
}

.search-box {
  flex: 1;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--transition);
}

.search-box:focus { border-color: var(--primary); }
.search-box::placeholder { color: var(--text-muted); }

.filter-btns {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
  font-family: var(--font-ui);
}

.filter-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: #000; font-weight: 600; }
.filter-btn[data-filter="legitimate"].active { background: var(--primary); border-color: var(--primary); color: #000; }
.filter-btn[data-filter="suspicious"].active { background: var(--orange); border-color: var(--orange); color: #000; }
.filter-btn[data-filter="malicious"].active  { background: var(--red);    border-color: var(--red);    color: #fff; }

/* ---------- Glossary Stats ---------- */
.glossary-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto 1.5rem;
  padding: 0 1.5rem;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ---------- Glossary Grid ---------- */
.glossary-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}

@media (max-width: 600px) {
  .glossary-grid { grid-template-columns: 1fr; }
}

.glossary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.glossary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.glossary-card-header {
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border2);
}

.glossary-name {
  font-weight: 600;
  font-size: 0.95rem;
  flex: 1;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 2rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.status-badge.legitimate {
  background: rgba(0,255,136,0.12);
  color: var(--primary);
  border: 1px solid rgba(0,255,136,0.2);
}

.status-badge.suspicious {
  background: rgba(255,165,2,0.12);
  color: var(--orange);
  border: 1px solid rgba(255,165,2,0.25);
}

.status-badge.malicious {
  background: rgba(255,71,87,0.12);
  color: var(--red);
  border: 1px solid rgba(255,71,87,0.25);
}

.glossary-card-body {
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  line-height: 1.55;
}

.glossary-card-body .desc {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.glossary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-card2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cyan);
}

.meta-tag .tag-label {
  color: var(--text-muted);
  font-size: 0.65rem;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.filter-snippet {
  background: #0d1117;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.4;
  overflow: hidden;
}

.filter-snippet .fs-label {
  display: block;
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.filter-snippet .fs-code {
  color: var(--cyan);
  word-break: break-all;
}

/* No results */
.no-results {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: none;
  grid-column: 1 / -1;
}

/* ============================================================
   STEP LIST (routing visualization)
   ============================================================ */
.step-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  position: relative;
}

.step-list::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: var(--border);
}

.step-list li {
  position: relative;
  padding: 0.75rem 0 0.75rem 3rem;
  margin-bottom: 0.5rem;
}

.step-list li::before {
  content: attr(data-step);
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  line-height: 32px;
}

/* Router Diagram */
.router-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
}

.router-diagram .diagram-flow {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  justify-content: center;
  min-width: 400px;
}

.diagram-node {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  min-width: 90px;
}

.diagram-node .node-label {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.85rem;
}

.diagram-node .node-ip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.diagram-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0.25rem;
  min-width: 50px;
}

.diagram-arrow .arrow-line {
  width: 50px;
  height: 2px;
  background: var(--cyan);
  position: relative;
}

.diagram-arrow .arrow-line::after {
  content: '';
  position: absolute;
  right: -6px;
  top: -8px;
  font-size: 10px;
  color: var(--cyan);
}

.diagram-arrow .arrow-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-top: 0.25rem;
}

/* ============================================================
   WIRESHARK page — filter examples
   ============================================================ */
.filter-examples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.filter-ex {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}

.filter-ex .fe-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.filter-ex code {
  display: block;
  font-size: 0.82rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-nav);
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.825rem;
  color: var(--text-muted);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo {
  font-family: var(--font-mono);
  color: var(--primary);
  font-size: 1rem;
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a { color: var(--text-muted); font-size: 0.8rem; }
.footer-links a:hover { color: var(--primary); }

.footer-copy { font-size: 0.75rem; opacity: 0.6; }

/* ============================================================
   UTILITIES
   ============================================================ */
.badge {
  display: inline-block;
  border-radius: 2rem;
  padding: 0.15rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-green  { background: rgba(0,255,136,0.12); color: var(--primary); border: 1px solid rgba(0,255,136,0.2); }
.badge-cyan   { background: rgba(0,180,216,0.12); color: var(--cyan);    border: 1px solid rgba(0,180,216,0.2); }
.badge-orange { background: rgba(255,165,2,0.12); color: var(--orange);  border: 1px solid rgba(255,165,2,0.2); }
.badge-red    { background: rgba(255,71,87,0.12); color: var(--red);     border: 1px solid rgba(255,71,87,0.2); }

.text-primary { color: var(--primary); }
.text-cyan    { color: var(--cyan);    }
.text-red     { color: var(--red);     }
.text-orange  { color: var(--orange);  }
.text-muted   { color: var(--text-muted); }
.font-mono    { font-family: var(--font-mono); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.fade-in { animation: fadeInUp 0.5s ease both; }

.cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--primary);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .cards-grid { grid-template-columns: 1fr; }
  .filter-row { grid-template-columns: 1fr; }
  .flags-table { display: block; overflow-x: auto; }
  .filter-examples { grid-template-columns: 1fr; }
  .content-wrapper { padding: 2rem 1rem 3rem; }
}
