/* ============================================================
   SECURITY RESEARCH BLOG — DARK THEME
   ============================================================ */

:root {
  --bg-primary:    #0d1117;
  --bg-secondary:  #161b22;
  --bg-card:       #1c2128;
  --bg-hover:      #21262d;
  --text-primary:  #e6edf3;
  --text-muted:    #7d8590;
  --text-link:     #58a6ff;
  --accent:        #58a6ff;
  --accent-hover:  #79b8ff;
  --accent-danger: #f85149;
  --accent-warn:   #d29922;
  --accent-green:  #3fb950;
  --accent-orange: #e3b341;
  --border:        #30363d;
  --border-muted:  #21262d;
  --code-bg:       #161b22;
  --font-mono:     'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
  --font-sans:     'Inter', system-ui, -apple-system, sans-serif;
  --radius:        6px;
  --radius-lg:     10px;
  --shadow:        0 1px 3px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.3);
  --transition:    0.15s ease;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-main {
  flex: 1;
  padding: 2rem 0 4rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
}

@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════
   NAVIGATION — modern glassmorphism dark bar
   ══════════════════════════════════════════════════════════ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(22, 27, 34, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(48, 54, 61, 0.6);
  box-shadow: 0 1px 0 rgba(88, 166, 255, 0.04),
              0 4px 24px rgba(0, 0, 0, 0.35);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 0.5rem;
}

/* ── Brand ─────────────────────────────────────────────────── */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  margin-right: 0.25rem;
  letter-spacing: -0.01em;
}

.nav-brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--accent) 0%, #a371f7 100%);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #000;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(88, 166, 255, 0.35);
}

.nav-brand-text {
  color: var(--text-primary);
  transition: color var(--transition);
}

.nav-brand:hover .nav-brand-text { color: var(--accent); }

/* ── Separator ─────────────────────────────────────────────── */
.nav-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Link strip ────────────────────────────────────────────── */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.05rem;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-width: 0;
}
.nav-menu::-webkit-scrollbar { display: none; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius);
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link:hover::after { transform: translateX(-50%) scaleX(1); }

.nav-link.active {
  color: var(--accent);
  background: rgba(88, 166, 255, 0.08);
}
.nav-link.active::after { transform: translateX(-50%) scaleX(1); }

/* ── Dropdown ──────────────────────────────────────────────── */
.nav-dropdown {
  position: relative;
  flex-shrink: 0;
}

.nav-caret {
  font-size: 0.65rem;
  opacity: 0.6;
  transition: transform 0.2s;
}

.nav-dropdown:hover .nav-caret,
.nav-dropdown.open .nav-caret {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  background: rgba(22, 27, 34, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,.5), 0 0 0 1px rgba(88,166,255,.06);
  padding: 0.4rem;
  z-index: 300;
  flex-direction: column;
  gap: 0.1rem;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-dropdown-item:hover {
  background: rgba(88, 166, 255, 0.1);
  color: var(--text-primary);
}

/* Mobile: flatten dropdown into list */
@media (max-width: 960px) {
  .nav-dropdown-menu {
    display: flex !important;
    position: static;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    padding: 0 0 0 1rem;
    gap: 0;
  }

  .nav-dropdown-item {
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    border-left: 2px solid var(--border);
    border-radius: 0;
  }

  .nav-caret { display: none; }
}

/* ── Right actions ─────────────────────────────────────────── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* Search pill */
.nav-search {
  display: flex;
  align-items: center;
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.3rem 0.75rem;
  gap: 0.4rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.nav-search:focus-within {
  border-color: var(--accent);
  background: rgba(13, 17, 23, 0.9);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.12);
}

.nav-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.8rem;
  width: 140px;
  font-family: var(--font-sans);
}
.nav-search input::placeholder { color: var(--text-muted); }

.nav-search button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}
.nav-search button:hover { color: var(--accent); }

/* Small icon-style action buttons */
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  font-family: var(--font-sans);
  padding: 0.32rem 0.65rem;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  letter-spacing: 0.02em;
}
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(88, 166, 255, 0.4);
  color: var(--text-primary);
}
.nav-btn.active {
  background: rgba(88, 166, 255, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

/* Register CTA — gradient pill */
.nav-btn-register {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: linear-gradient(135deg, var(--accent) 0%, #a371f7 100%);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-sans);
  padding: 0.38rem 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  letter-spacing: 0.02em;
  box-shadow: 0 0 14px rgba(88, 166, 255, 0.25);
}
.nav-btn-register:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(88, 166, 255, 0.4);
  color: #fff;
}

/* User avatar chip */
.nav-avatar-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.22rem 0.65rem 0.22rem 0.3rem;
  cursor: default;
  text-decoration: none;
}

.nav-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #a371f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
  font-family: var(--font-mono);
}

.nav-avatar-name {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Translate globe */
.nav-btn-ar {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-sans);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.nav-btn-ar:hover  { background: rgba(255,255,255,.05); border-color: rgba(88,166,255,.4); color: var(--text-primary); }
.nav-btn-ar.active { background: rgba(88,166,255,.1); border-color: var(--accent); color: var(--accent); }

/* ── Hamburger ─────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.nav-hamburger:hover { background: rgba(255,255,255,.08); border-color: rgba(88,166,255,.4); }

.nav-hamburger span {
  width: 16px;
  height: 1.5px;
  background: var(--text-muted);
  border-radius: 2px;
  display: block;
  transition: transform 0.25s, opacity 0.2s, background 0.2s;
  transform-origin: center;
}

/* Animate to X when open */
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); background: var(--accent); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); background: var(--accent); }

/* ── Mobile drawer ─────────────────────────────────────────── */
.nav-mobile-drawer {
  display: contents; /* transparent wrapper on desktop */
}

@media (max-width: 960px) {
  .nav-inner { height: 60px; }
  .nav-hamburger { display: flex; }

  /* Hide desktop layout */
  .nav-menu    { display: none; }
  .nav-actions { display: none; }
  .nav-sep     { display: none; }

  /* The wrapper becomes the real drawer on mobile/tablet */
  .nav-mobile-drawer {
    display: none;
    position: absolute;
    top: 60px;
    left: 0; right: 0;
    flex-direction: column;
    background: rgba(22, 27, 34, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 201;
    box-shadow: 0 8px 24px rgba(0,0,0,.45);
  }

  .nav-mobile-drawer.open {
    display: flex;
  }

  /* Menu links section */
  .nav-mobile-drawer .nav-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem 1rem;
    gap: 0.1rem;
    border-bottom: 1px solid rgba(48,54,61,0.5);
  }

  .nav-mobile-drawer .nav-menu .nav-link {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius);
  }

  .nav-mobile-drawer .nav-menu .nav-link::after { display: none; }

  /* Actions section */
  .nav-mobile-drawer .nav-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .nav-search { flex: 1; border-radius: var(--radius); min-width: 160px; }
  .nav-search input { width: 100%; }
}

/* ── Hide Google Translate toolbar ─────────────────────────── */
.goog-te-banner-frame,
.skiptranslate { display: none !important; }
body { top: 0 !important; }

/* ── RTL (Arabic) ──────────────────────────────────────────── */
[dir="rtl"] .nav-inner  { flex-direction: row-reverse; }
[dir="rtl"] .nav-menu   { flex-direction: row-reverse; }
[dir="rtl"] .two-col { direction: rtl; }
[dir="rtl"] .prose { direction: rtl; text-align: right; }
[dir="rtl"] .post-card { direction: rtl; }
[dir="rtl"] .cve-strip { direction: ltr; } /* Keep CVE IDs LTR */
[dir="rtl"] .prose pre,
[dir="rtl"] .prose code { direction: ltr; text-align: left; }

/* ── Messages ─────────────────────────────────────────────── */
.messages { padding: 0.75rem 0; }
.message {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.message.success { background: rgba(63,185,80,.15); border: 1px solid var(--accent-green); color: var(--accent-green); }
.message.error   { background: rgba(248,81,73,.15); border: 1px solid var(--accent-danger); color: var(--accent-danger); }
.message.info    { background: rgba(88,166,255,.15); border: 1px solid var(--accent); color: var(--accent); }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  gap: 0.3rem;
}

.badge-category { background: rgba(88,166,255,.15); color: var(--accent); border: 1px solid rgba(88,166,255,.3); }
.badge-green    { background: rgba(63,185,80,.15);  color: var(--accent-green); border: 1px solid rgba(63,185,80,.3); }
.badge-blue     { background: rgba(88,166,255,.15); color: var(--accent); border: 1px solid rgba(88,166,255,.3); }
.badge-orange   { background: rgba(210,153,34,.15); color: var(--accent-warn); border: 1px solid rgba(210,153,34,.3); }
.badge-red      { background: rgba(248,81,73,.15);  color: var(--accent-danger); border: 1px solid rgba(248,81,73,.3); }
.badge-gray     { background: rgba(125,133,144,.15); color: var(--text-muted); border: 1px solid rgba(125,133,144,.3); }
.badge-cve      { background: rgba(248,81,73,.1); color: var(--accent-danger); border: 1px solid rgba(248,81,73,.25); font-family: var(--font-mono); }

/* ── Post Cards ───────────────────────────────────────────── */
.post-grid {
  display: grid;
  gap: 1.25rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
  display: grid;
  grid-template-columns: auto 1fr;
}

.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.post-card-img {
  width: 180px;
  height: 140px;
  object-fit: cover;
}

.post-card-img-placeholder {
  width: 180px;
  height: 140px;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.post-card-body {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.post-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.post-card-title a { color: var(--text-primary); }
.post-card-title a:hover { color: var(--accent); }

.post-card-excerpt {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.post-card-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.tag-link {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-hover);
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: color var(--transition), border-color var(--transition);
}
.tag-link:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 600px) {
  .post-card { grid-template-columns: 1fr; }
  .post-card-img, .post-card-img-placeholder { width: 100%; height: 160px; }
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.sidebar-widget h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
  font-weight: 600;
}

.category-list { list-style: none; display: flex; flex-direction: column; gap: 0.3rem; }

.category-list a {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  padding: 0.3rem 0.4rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  transition: background var(--transition), color var(--transition);
}

.category-list a:hover { background: var(--bg-hover); color: var(--text-primary); }
.category-list a span { font-size: 0.75rem; color: var(--text-muted); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 2.5rem;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0 0.5rem;
}

.pagination a {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  transition: background var(--transition), border-color var(--transition);
}

.pagination a:hover { background: var(--bg-hover); border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); color: #000; font-weight: 700; }

/* ── Post Detail ──────────────────────────────────────────── */
.post-hero { margin-bottom: 2rem; }

.post-hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.post-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.post-meta-item {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.post-meta-sep { color: var(--border); }

/* ── CVE Strip ────────────────────────────────────────────── */
.cve-strip {
  background: rgba(248,81,73,.07);
  border: 1px solid rgba(248,81,73,.3);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cve-strip-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-danger);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.cve-strip a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-danger);
  background: rgba(248,81,73,.1);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(248,81,73,.2);
}

.cve-strip a:hover { background: rgba(248,81,73,.2); }

/* ── Disclaimer Block ─────────────────────────────────────── */
.disclaimer-block {
  background: rgba(210,153,34,.07);
  border: 1px solid rgba(210,153,34,.35);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.disclaimer-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}

.disclaimer-header:hover { background: rgba(210,153,34,.1); }

.disclaimer-icon { font-size: 1.1rem; }

.disclaimer-header strong {
  color: var(--accent-warn);
  font-size: 0.9rem;
  flex: 1;
}

.disclaimer-toggle {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.disclaimer-body {
  padding: 0 1rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.disclaimer-body p { margin-bottom: 0.5rem; }

.disclaimer-block.collapsed .disclaimer-body { display: none; }
.disclaimer-block.collapsed .disclaimer-toggle::after { content: ' [+]'; }

/* ── GitHub PoC Button ───────────────────────────────────── */
.poc-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.poc-banner-text { font-size: 0.875rem; color: var(--text-muted); }
.poc-banner-text strong { color: var(--text-primary); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
  text-decoration: none;
}

.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: var(--accent-hover); color: #000; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── Prose / Post Content ─────────────────────────────────── */
.prose {
  max-width: 72ch;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.8;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  scroll-margin-top: 72px;
}

.prose h1 { font-size: 1.9rem; border-bottom: 1px solid var(--border); padding-bottom: 0.4rem; }
.prose h2 { font-size: 1.45rem; border-bottom: 1px solid var(--border-muted); padding-bottom: 0.3rem; }
.prose h3 { font-size: 1.2rem; }
.prose h4 { font-size: 1rem; color: var(--text-muted); }

.prose p { margin-bottom: 1.1rem; }

.prose ul, .prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.1rem;
}

.prose li { margin-bottom: 0.3rem; }

.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 1rem;
  margin: 1.25rem 0;
  background: var(--bg-secondary);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}

.prose th, .prose td {
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  text-align: left;
}

.prose th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prose tr:nth-child(even) { background: rgba(255,255,255,.02); }

/* ── Code Blocks ──────────────────────────────────────────── */
.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15em 0.4em;
  color: #ff7b72;
}

.prose pre {
  background: var(--code-bg) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.25rem 0;
  position: relative;
}

.prose pre code {
  background: none !important;
  border: none;
  padding: 1.1rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-primary);
  display: block;
}

/* Copy button */
.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-sans);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  z-index: 2;
}

.copy-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.copy-btn.copied { color: var(--accent-green); border-color: var(--accent-green); }

/* Language label */
.code-lang-label {
  position: absolute;
  top: 0.5rem;
  left: 0.75rem;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: lowercase;
  pointer-events: none;
  z-index: 2;
}

/* ── Table of Contents ────────────────────────────────────── */
.toc-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: sticky;
  top: 80px;
}

.toc-widget h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.toc-widget ul { list-style: none; padding: 0; }

.toc-widget li { margin-bottom: 0.25rem; }

.toc-widget a {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
  display: block;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius);
  border-left: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.toc-widget a:hover { color: var(--accent); border-left-color: var(--accent); }

.toc-widget li li { padding-left: 0.75rem; }
.toc-widget li li li { padding-left: 1.5rem; }

/* ── Tags Post Detail ─────────────────────────────────────── */
.post-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 2rem 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}

/* ── Related Posts ────────────────────────────────────────── */
.related-posts { margin-top: 2.5rem; }
.related-posts h2 { font-size: 1.1rem; margin-bottom: 1rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; font-size: 0.8rem; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

@media (max-width: 700px) {
  .related-grid { grid-template-columns: 1fr; }
}

.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  transition: border-color var(--transition);
}

.related-card:hover { border-color: var(--accent); }
.related-card h4 { font-size: 0.9rem; line-height: 1.4; margin-bottom: 0.5rem; }
.related-card h4 a { color: var(--text-primary); }
.related-card h4 a:hover { color: var(--accent); }
.related-card .post-meta-item { font-size: 0.78rem; }

/* ── Comments ─────────────────────────────────────────────── */
.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.comments-section h2 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.comment {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.85rem;
}

.comment-reply {
  margin-left: 2rem;
  margin-top: 0.5rem;
  border-left: 2px solid var(--border);
  padding-left: 1rem;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.comment-author {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  font-family: var(--font-mono);
}

.comment-date { font-size: 0.78rem; color: var(--text-muted); }

.comment-body { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }

.reply-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  margin-top: 0.5rem;
  padding: 0;
  text-decoration: underline;
}

.reply-btn:hover { color: var(--accent); }

/* ── Comment Form ─────────────────────────────────────────── */
.comment-form-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.comment-form-section h3 { font-size: 1rem; margin-bottom: 1rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input, .form-textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 0.6rem 0.85rem;
  outline: none;
  transition: border-color var(--transition);
}

.form-input:focus, .form-textarea:focus { border-color: var(--accent); }
.form-textarea { resize: vertical; min-height: 100px; }

.form-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }

.errorlist { list-style: none; color: var(--accent-danger); font-size: 0.82rem; margin-top: 0.3rem; }

/* ── Newsletter Strip ─────────────────────────────────────── */
.newsletter-strip {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.newsletter-text h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.newsletter-text p { color: var(--text-muted); font-size: 0.875rem; }

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.newsletter-input {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9rem;
  padding: 0.55rem 0.85rem;
  outline: none;
  min-width: 220px;
  transition: border-color var(--transition);
}

.newsletter-input:focus { border-color: var(--accent); }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
}
.footer-links a {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }
.footer-links a i { font-size: .85rem; }

/* ── About / Lab Setup Pages ──────────────────────────────── */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.page-header p { color: var(--text-muted); }

.pgp-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.pgp-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pgp-block-header h4 { font-size: 0.85rem; color: var(--accent-green); font-family: var(--font-mono); }

.pgp-key {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.5;
}

/* ── Search Results ───────────────────────────────────────── */
.search-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.search-count { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.4rem; }

.no-results {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-muted);
}

.no-results h3 { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--text-primary); }

/* ── Utility ──────────────────────────────────────────────── */
.text-muted  { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.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; }
.font-mono { font-family: var(--font-mono); }

/* ── Auth forms ───────────────────────────────────────────── */
.auth-card {
  max-width: 460px;
  margin: 2rem auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

/* ── Courses / Lessons ────────────────────────────────────── */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  margin-bottom: 1.5rem;
}

.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

@media (max-width: 700px) {
  .lesson-grid { grid-template-columns: 1fr !important; }
}
