/* ================================================================
   THE SEV-1 DATABASE
   AI Operations Intelligence Platform  v3.0
   ================================================================ */

/* ── 1. DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  /* Backgrounds — operational dark */
  --bg-0:       #070B14;   /* base canvas */
  --bg-1:       #070B14;   /* alias */
  --bg-panel:   #0F1724;   /* panels / sections */
  --bg-elevated:#131D2E;   /* elevated cards */
  --bg-2:       #0D1525;   /* inputs, code */
  --bg-card:    rgba(19,29,46,0.85);
  --bg-glass:   rgba(7,11,20,0.92);

  /* Borders */
  --border:        #1E2A3D;
  --border-subtle: rgba(30,42,61,0.7);
  --border-teal:   rgba(20,184,166,0.22);
  --border-blue:   rgba(59,130,246,0.2);

  /* Text */
  --text-1:    #E2E8F0;
  --text-2:    #94A3B8;
  --text-3:    #475569;
  --text-code: #7DD3FC;
  --text-primary:   #E2E8F0;
  --text-secondary: #94A3B8;
  --text-muted:     #475569;

  /* Accents */
  --blue:        #3B82F6;
  --blue-dim:    rgba(59,130,246,0.1);
  --blue-glow:   rgba(59,130,246,0.15);
  --teal:        #14B8A6;
  --teal-dim:    rgba(20,184,166,0.1);
  --teal-glow:   rgba(20,184,166,0.15);
  --violet:      #8B5CF6;
  --violet-dim:  rgba(139,92,246,0.1);
  --violet-glow: rgba(139,92,246,0.15);
  --purple:      #8B5CF6;
  --purple-dim:  rgba(139,92,246,0.1);
  --amber:       #F59E0B;
  --amber-dim:   rgba(245,158,11,0.1);
  --coral:       #F97316;
  --coral-dim:   rgba(249,115,22,0.1);
  --green:       #10B981;
  --green-dim:   rgba(16,185,129,0.1);
  --red:         #EF4444;
  --red-dim:     rgba(239,68,68,0.1);

  /* Primary accent = blue (operational intelligence) */
  --accent:     var(--blue);
  --accent-dim: var(--blue-dim);
  --accent-rgb: 59,130,246;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'JetBrains Mono', monospace;
  --font-icon: 'Material Symbols Rounded';

  /* Type scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  /* Spacing */
  --s1:  0.25rem; --s2:  0.5rem;  --s3:  0.75rem;
  --s4:  1rem;    --s5:  1.25rem; --s6:  1.5rem;
  --s8:  2rem;    --s10: 2.5rem;  --s12: 3rem;
  --s16: 4rem;    --s20: 5rem;    --s24: 6rem;

  /* Radii */
  --r-sm:  4px;   --r-md:  8px;   --r-lg: 12px;
  --r-xl:  16px;  --r-2xl: 20px;  --r-full: 9999px;

  /* Shadows / glows */
  --shadow-sm:   0 1px 4px rgba(0,0,0,0.5);
  --shadow-md:   0 4px 24px rgba(0,0,0,0.6);
  --glow-blue:   0 0 40px rgba(59,130,246,0.12);
  --glow-teal:   0 0 40px rgba(20,184,166,0.12);
  --glow-violet: 0 0 40px rgba(139,92,246,0.12);

  /* Layout */
  --max-w:        1280px;
  --max-w-narrow: 748px;
  --header-h:     60px;
  --status-h:     30px;
  --mobile-nav-h: 58px;

  /* Transitions */
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0.0, 0.0, 0.2, 1);
}

/* ── 2. RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}
body { background: var(--bg-0); min-height: 100vh; overflow-x: hidden; }
::selection { background: rgba(59,130,246,0.28); color: var(--text-1); }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg-panel); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.07); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.13); }

/* ── 3. TYPOGRAPHY ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-1);
  letter-spacing: -0.02em;
}
p   { color: var(--text-2); line-height: 1.75; }
a   { color: var(--teal); text-decoration: none; transition: color 0.18s var(--ease); }
a:hover { color: var(--text-1); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }
ul, ol { padding-left: var(--s6); }
li { color: var(--text-2); line-height: 1.75; margin-bottom: var(--s2); }
code, pre, kbd { font-family: var(--font-mono); }
code:not(pre code) {
  background: var(--bg-elevated);
  color: var(--text-code);
  padding: 0.15em 0.4em;
  border-radius: var(--r-sm);
  font-size: 0.85em;
  border: 1px solid var(--border);
}
pre {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s6);
  overflow-x: auto;
  position: relative;
  line-height: 1.65;
  font-size: var(--text-sm);
  margin: var(--s8) 0;
}
pre code { background: transparent; color: var(--text-code); padding: 0; border: none; font-size: 1em; }

/* Material Symbols icon helper */
.ms-icon {
  font-family: 'Material Symbols Rounded';
  font-weight: 300;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 20;
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
  transition: font-variation-settings 0.2s var(--ease);
}
.ms-icon--filled { font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 0, 'opsz' 20; }
.ms-icon--sm { font-size: 16px; }
.ms-icon--lg { font-size: 24px; }

/* ── 4. LAYOUT ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s6);
}
.container--narrow {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 0 var(--s6);
}

/* ── 5. KEYFRAME ANIMATIONS ───────────────────────────────────── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}
@keyframes logo-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(20,184,166,0.5); }
  50% { transform: scale(1.2); box-shadow: 0 0 0 6px rgba(20,184,166,0); }
}
@keyframes blink-cursor {
  0%, 100% { border-color: var(--teal); }
  50% { border-color: transparent; }
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes flow-right {
  from { stroke-dashoffset: 100; }
  to   { stroke-dashoffset: 0; }
}
@keyframes node-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes data-stream {
  0% { transform: translateX(-100%); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

/* ── 6. READING PROGRESS ──────────────────────────────────────── */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: transparent;
  z-index: 400;
  pointer-events: none;
}
.reading-progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(59,130,246,0.6);
}

/* ── 7. SYSTEM STATUS BAR ─────────────────────────────────────── */
.status-bar {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  height: var(--status-h);
  display: flex;
  align-items: center;
  padding: 0 var(--s6);
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-3);
  gap: var(--s5);
  overflow: hidden;
}
.status-node {
  display: flex;
  align-items: center;
  gap: var(--s2);
  white-space: nowrap;
  flex-shrink: 0;
}
.status-node__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: pulse-dot 2.2s ease-in-out infinite;
  position: relative;
}
.status-node__dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0;
  animation: pulse-ring 2.2s ease-out infinite;
}
.status-node__dot--blue  { background: var(--blue);  }
.status-node__dot--blue::after  { background: var(--blue); }
.status-node__dot--teal  { background: var(--teal);  }
.status-node__dot--teal::after  { background: var(--teal); }
.status-node__dot--amber { background: var(--amber); animation: none; }
.status-bar__divider { color: var(--border); user-select: none; flex-shrink: 0; }
.status-bar__spacer { flex: 1; }

/* ── 8. SITE HEADER ───────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(7,11,20,0.94);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  transition: all 0.3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(7,11,20,0.98);
  border-bottom-color: rgba(59,130,246,0.1);
  box-shadow: 0 1px 28px rgba(0,0,0,0.6);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s6);
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--s4);
}
.site-branding {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-shrink: 0;
}
.logo-pulse {
  width: 7px; height: 7px;
  background: var(--teal);
  border-radius: 50%;
  flex-shrink: 0;
  animation: logo-pulse 3s ease-in-out infinite;
  position: relative;
}
.logo-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0;
  animation: pulse-ring 3s ease-out infinite;
}
.site-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.02em;
}
.site-title .title-highlight { color: var(--teal); }
.header-ai-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  color: var(--violet);
  background: var(--violet-dim);
  border: 1px solid rgba(139,92,246,0.2);
  padding: 2px 7px;
  border-radius: var(--r-full);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.main-nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 var(--s3);
}
.main-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-2);
  padding: var(--s2) var(--s3);
  border-radius: var(--r-md);
  transition: all 0.15s var(--ease);
  white-space: nowrap;
  position: relative;
}
.main-nav a:hover,
.main-nav a.current-menu-item { color: var(--text-1); background: rgba(255,255,255,0.04); }
.main-nav a.current-menu-item::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%;
  transform: translateX(-50%);
  width: 12px; height: 1px;
  background: var(--teal);
  border-radius: var(--r-full);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-shrink: 0;
}
.cmd-palette-trigger {
  display: flex;
  align-items: center;
  gap: var(--s2);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 6px 10px;
  color: var(--text-3);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  transition: all 0.15s var(--ease);
  cursor: pointer;
}
.cmd-palette-trigger:hover {
  border-color: rgba(59,130,246,0.3);
  color: var(--text-2);
  background: var(--blue-dim);
}
.cmd-palette-trigger svg { width: 13px; height: 13px; opacity: 0.5; }
.cmd-kbd {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 9px;
}
.theme-toggle {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  color: var(--text-3);
  transition: all 0.15s var(--ease);
}
.theme-toggle:hover { background: rgba(255,255,255,0.05); color: var(--text-2); }
.theme-toggle svg { width: 15px; height: 15px; }
.btn-subscribe-header {
  display: flex; align-items: center; gap: var(--s2);
  background: var(--blue);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--r-full);
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.btn-subscribe-header:hover {
  background: #60A5FA;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(59,130,246,0.35);
}
.btn-subscribe-header svg { width: 13px; height: 13px; }
.menu-toggle {
  display: none;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: var(--r-md);
  color: var(--text-2);
  transition: all 0.15s var(--ease);
}
.menu-toggle:hover { background: rgba(255,255,255,0.05); }
.menu-toggle svg { width: 18px; height: 18px; }

/* ── 9. MOBILE BOTTOM NAV ─────────────────────────────────────── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--mobile-nav-h);
  background: rgba(7,11,20,0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 300;
  padding: 0 var(--s2);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mobile-bottom-nav__inner {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  height: 100%;
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  font-size: 9px;
  font-family: var(--font-mono);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.15s var(--ease);
  text-decoration: none;
  padding: var(--s1) 0;
  position: relative;
}
.mobile-nav-item .ms-icon { font-size: 20px; }
.mobile-nav-item.is-active { color: var(--teal); }
.mobile-nav-item.is-active .ms-icon { font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 0, 'opsz' 20; }
.mobile-nav-item--ai {
  color: var(--violet);
}
.mobile-nav-item--ai .ms-icon { font-size: 22px; }

/* ── 10. AI COMMAND PALETTE ───────────────────────────────────── */
.cmd-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(12px);
  z-index: 600;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: min(18vh, 110px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s var(--ease);
}
.cmd-palette-overlay.is-open { opacity: 1; pointer-events: all; }
.cmd-palette {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--r-2xl);
  width: 100%;
  max-width: 620px;
  margin: 0 var(--s6);
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), var(--glow-blue);
  overflow: hidden;
  transform: scale(0.96) translateY(-10px);
  transition: transform 0.2s var(--ease);
}
.cmd-palette-overlay.is-open .cmd-palette { transform: scale(1) translateY(0); }
.cmd-palette__search {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--border);
}
.cmd-palette__search svg { width: 17px; height: 17px; color: var(--text-3); flex-shrink: 0; }
.cmd-palette__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-1);
  font-size: var(--text-base);
}
.cmd-palette__input::placeholder { color: var(--text-3); }
.cmd-palette__esc {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 6px;
}
.cmd-palette__sections { max-height: 400px; overflow-y: auto; }
.cmd-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  padding: var(--s3) var(--s5);
  background: var(--bg-panel);
  border-top: 1px solid var(--border-subtle);
}
.cmd-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 10px var(--s5);
  cursor: pointer;
  transition: background 0.1s;
}
.cmd-item:hover, .cmd-item.is-selected { background: rgba(59,130,246,0.06); }
.cmd-item__icon {
  width: 32px; height: 32px;
  background: var(--bg-0);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}
.cmd-item__text { flex: 1; min-width: 0; }
.cmd-item__name { font-size: var(--text-sm); font-weight: 500; color: var(--text-1); }
.cmd-item__desc { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); }
.cmd-palette__footer {
  display: flex;
  align-items: center;
  gap: var(--s5);
  padding: var(--s3) var(--s5);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  background: var(--bg-panel);
}

/* ── 11. TOPOLOGY CANVAS ──────────────────────────────────────── */
.topology-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
}
.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.hero-glow-orb {
  position: absolute;
  top: -30%; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse at center,
    rgba(59,130,246,0.07) 0%,
    rgba(139,92,246,0.04) 40%,
    transparent 70%);
  pointer-events: none;
  animation: glow-pulse 6s ease-in-out infinite;
}
.hero-glow-orb--secondary {
  top: 40%; left: 20%;
  width: 400px; height: 300px;
  background: radial-gradient(ellipse at center, rgba(20,184,166,0.05) 0%, transparent 70%);
  animation: glow-pulse 8s ease-in-out infinite reverse;
}

/* ── 12. HERO — AI MISSION CONTROL ───────────────────────────── */
.site-hero {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  padding: var(--s20) 0 var(--s16);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.site-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 var(--s6);
}

/* Platform status badge */
.hero-badge,
.hero-system-status {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  background: rgba(16,185,129,0.06);
  border: 1px solid rgba(16,185,129,0.18);
  border-radius: var(--r-full);
  padding: 5px 14px 5px 9px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--green);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--s8);
}
.pulse,
.hero-system-status__dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Headline */
.hero-title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.04em;
  color: var(--text-1);
  margin-bottom: var(--s5);
}
.hero-title .teal    { color: var(--teal); }
.hero-title .accent  { color: var(--blue); }
.hero-title .accent-violet { color: var(--violet); }

/* Typewriter */
.hero-typewriter-line {
  height: 1.8em;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-3);
  margin-bottom: var(--s8);
  letter-spacing: 0.01em;
}
.hero-typewriter__static { margin-right: 4px; }
.hero-typewriter {
  color: var(--teal);
  border-right: 2px solid var(--teal);
  animation: blink-cursor 0.9s step-end infinite;
}

.hero-description,
.hero-sub {
  font-size: var(--text-base);
  color: var(--text-2);
  max-width: 540px;
  margin: 0 auto var(--s10);
  line-height: 1.7;
}

/* AI Search bar (primary CTA) */
.hero-search {
  display: flex;
  align-items: center;
  max-width: 560px;
  margin: 0 auto var(--s6);
  background: var(--bg-elevated);
  border: 1px solid var(--border-blue);
  border-radius: var(--r-full);
  padding: 5px 5px 5px 20px;
  transition: all 0.3s var(--ease);
}
.hero-search:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12), var(--glow-blue);
}
.hero-search__icon { color: var(--text-3); flex-shrink: 0; margin-right: var(--s3); }
.hero-search__icon svg { width: 16px; height: 16px; }
.hero-search__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-1);
  font-size: var(--text-sm);
  padding: 0;
  min-width: 0;
}
.hero-search__input::placeholder { color: var(--text-3); }
.hero-search__btn {
  background: var(--blue);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 9px 20px;
  border-radius: var(--r-full);
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
  display: flex; align-items: center; gap: var(--s2);
}
.hero-search__btn:hover { background: #60A5FA; color: #fff; }

/* Quick action chips */
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  margin-bottom: var(--s10);
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 3px 10px;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.hero-chip:hover {
  color: var(--blue);
  border-color: rgba(59,130,246,0.3);
  background: var(--blue-dim);
}
.hero-chip--label {
  color: var(--text-3);
  background: transparent;
  border-color: transparent;
  cursor: default;
}
.hero-chip--label:hover { color: var(--text-3); background: transparent; border-color: transparent; }

/* Hero platform stats */
.hero-platform-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s8);
  margin-bottom: var(--s10);
}
.hero-stat {
  text-align: center;
}
.hero-stat__value {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.02em;
}
.hero-stat__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hero-stat-divider {
  width: 1px; height: 32px;
  background: var(--border);
  flex-shrink: 0;
}

/* Subscribe form (secondary, for newsletter) */
.hero-subscribe-form {
  display: flex;
  align-items: center;
  max-width: 520px;
  margin: 0 auto var(--s8);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 5px 5px 5px 20px;
  transition: all 0.3s var(--ease);
}
.hero-subscribe-form:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20,184,166,0.1);
}
.hero-subscribe-form input[type="email"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-1);
  font-size: var(--text-sm);
  padding: 0;
  min-width: 0;
}
.hero-subscribe-form input::placeholder { color: var(--text-3); }
.btn-hero-subscribe {
  background: var(--teal);
  color: #000;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 9px 20px;
  border-radius: var(--r-full);
  transition: all 0.2s var(--ease);
  flex-shrink: 0;
  display: flex; align-items: center; gap: var(--s2);
}
.btn-hero-subscribe:hover { background: #5EEAD4; }

/* Trust bar */
.hero-social-proof, .hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--s4);
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
}
.proof-item { display: flex; align-items: center; gap: var(--s2); }
.proof-divider {
  width: 3px; height: 3px;
  background: var(--border);
  border-radius: 50%;
}
.company-logos {
  margin-top: var(--s10);
  padding-top: var(--s8);
  border-top: 1px solid var(--border);
  text-align: center;
}
.logos-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  font-family: var(--font-mono);
  margin-bottom: var(--s4);
}
.company-logos span:not(.logos-label) {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.1em;
  opacity: 0.32;
  margin: 0 var(--s4);
}

/* ── 13. QUICK ACCESS GRID ────────────────────────────────────── */
.quick-access {
  background: var(--bg-0);
  border-bottom: 1px solid var(--border);
  padding: var(--s5) 0;
}
.quick-access__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s3);
}
.quick-access-card {
  display: flex;
  align-items: center;
  gap: var(--s3);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: var(--s4);
  transition: all 0.2s var(--ease);
  text-decoration: none;
}
.quick-access-card:hover {
  border-color: rgba(59,130,246,0.2);
  background: rgba(59,130,246,0.04);
  transform: translateY(-1px);
}
.quick-access-card__icon {
  width: 34px; height: 34px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 17px;
}
.quick-access-card__icon--teal   { background: var(--teal-dim);  color: var(--teal);  }
.quick-access-card__icon--blue   { background: var(--blue-dim);  color: var(--blue);  }
.quick-access-card__icon--violet { background: var(--violet-dim);color: var(--violet);}
.quick-access-card__icon--coral  { background: var(--coral-dim); color: var(--coral); }
.quick-access-card__icon--purple { background: var(--violet-dim);color: var(--violet);}
.quick-access-card__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-1);
}
.quick-access-card__sub {
  display: block;
  font-size: 10px;
  color: var(--text-3);
  font-family: var(--font-mono);
}

/* ── 14. SECTION LABELS / HEADERS ─────────────────────────────── */
.section-label,
.topics-section__label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-3);
  margin-bottom: var(--s3);
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.section-label::before {
  content: '';
  width: 14px; height: 1px;
  background: var(--border);
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--s8);
  gap: var(--s4);
}
.section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.03em;
}
.section-link {
  font-size: 11px;
  color: var(--blue);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: var(--s1);
  flex-shrink: 0;
  transition: color 0.15s var(--ease);
}
.section-link:hover { color: var(--text-1); }

/* ── 15. OPERATIONAL SEVERITY BADGES ─────────────────────────── */
.sev-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: var(--r-full);
  border: 1px solid transparent;
}
.sev-badge--critical {
  background: rgba(239,68,68,0.1);
  color: #F87171;
  border-color: rgba(239,68,68,0.22);
}
.sev-badge--critical::before { content:''; width:5px;height:5px;border-radius:50%;background:#F87171;flex-shrink:0; }
.sev-badge--warning {
  background: var(--amber-dim);
  color: var(--amber);
  border-color: rgba(245,158,11,0.22);
}
.sev-badge--memory {
  background: var(--blue-dim);
  color: var(--blue);
  border-color: var(--border-blue);
}
.sev-badge--replication {
  background: var(--teal-dim);
  color: var(--teal);
  border-color: var(--border-teal);
}
.sev-badge--storage {
  background: var(--coral-dim);
  color: var(--coral);
  border-color: rgba(249,115,22,0.2);
}
.sev-badge--wal {
  background: var(--violet-dim);
  color: var(--violet);
  border-color: rgba(139,92,246,0.2);
}
.sev-badge--performance {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(16,185,129,0.2);
}
.sev-badge--info {
  background: rgba(255,255,255,0.04);
  color: var(--text-3);
  border-color: var(--border);
}

/* ── 16. ENVIRONMENT TAG PILLS ────────────────────────────────── */
.env-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.env-tag--aurora    { color: #F472B6; border-color: rgba(244,114,182,0.2); background: rgba(244,114,182,0.05); }
.env-tag--rds       { color: var(--amber); border-color: rgba(245,158,11,0.2); background: var(--amber-dim); }
.env-tag--k8s       { color: var(--blue); border-color: var(--border-blue); background: var(--blue-dim); }
.env-tag--docker    { color: #38BDF8; border-color: rgba(56,189,248,0.2); background: rgba(56,189,248,0.06); }
.env-tag--bare-metal{ color: var(--text-2); border-color: var(--border); background: var(--bg-elevated); }
.env-tag--gcp       { color: var(--teal); border-color: var(--border-teal); background: var(--teal-dim); }

/* ── 17. POST TYPE BADGES ─────────────────────────────────────── */
.post-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 2px 7px;
  border-radius: var(--r-full);
  border: 1px solid transparent;
}
.post-type-badge--incident  { background: var(--coral-dim);   color: var(--coral);   border-color: rgba(249,115,22,0.2);  }
.post-type-badge--deepdive  { background: var(--violet-dim);  color: var(--violet);  border-color: rgba(139,92,246,0.2);  }
.post-type-badge--explainer { background: var(--green-dim);   color: var(--green);   border-color: rgba(16,185,129,0.2);  }
.post-type-badge--career    { background: var(--blue-dim);    color: var(--blue);    border-color: rgba(59,130,246,0.2);  }
.post-type-badge--runbook   { background: var(--amber-dim);   color: var(--amber);   border-color: rgba(245,158,11,0.2);  }
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: var(--r-full);
  background: var(--violet-dim);
  color: var(--violet);
  border: 1px solid rgba(139,92,246,0.18);
  letter-spacing: 0.04em;
}
.ai-badge::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--violet);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}
.difficulty-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: var(--r-full);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border: 1px solid transparent;
}
.difficulty-badge--beginner     { background: var(--green-dim);   color: var(--green);   border-color: rgba(16,185,129,0.2);  }
.difficulty-badge--intermediate { background: var(--blue-dim);    color: var(--blue);    border-color: rgba(59,130,246,0.2);  }
.difficulty-badge--advanced     { background: var(--amber-dim);   color: var(--amber);   border-color: rgba(245,158,11,0.2);  }
.difficulty-badge--expert       { background: var(--red-dim);     color: var(--red);     border-color: rgba(239,68,68,0.2);   }

/* ── 18. TOPIC / FEATURE CARDS ────────────────────────────────── */
.topics-section {
  padding: var(--s16) 0;
  background: var(--bg-0);
}
.topics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s4);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s6);
}
.topic-card {
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: var(--s5);
  transition: all 0.22s var(--ease);
  position: relative;
  overflow: hidden;
}
.topic-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--card-accent, var(--blue)), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.topic-card:hover { border-color: rgba(255,255,255,0.08); background: rgba(255,255,255,0.02); transform: translateY(-2px); }
.topic-card:hover::before { opacity: 1; }
.topic-card:nth-child(1) { --card-accent: var(--coral); }
.topic-card:nth-child(2) { --card-accent: var(--blue); }
.topic-card:nth-child(3) { --card-accent: var(--green); }
.topic-card:nth-child(4) { --card-accent: var(--teal); }
.topic-card:nth-child(5) { --card-accent: var(--amber); }
.topic-card:nth-child(6) { --card-accent: var(--violet); }
.topic-card__icon {
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
}
.topic-card__icon svg { width: 18px; height: 18px; }
.topic-card:nth-child(1) .topic-card__icon { background: var(--coral-dim);   color: var(--coral);   }
.topic-card:nth-child(2) .topic-card__icon { background: var(--blue-dim);    color: var(--blue);    }
.topic-card:nth-child(3) .topic-card__icon { background: var(--green-dim);   color: var(--green);   }
.topic-card:nth-child(4) .topic-card__icon { background: var(--teal-dim);    color: var(--teal);    }
.topic-card:nth-child(5) .topic-card__icon { background: var(--amber-dim);   color: var(--amber);   }
.topic-card:nth-child(6) .topic-card__icon { background: var(--violet-dim);  color: var(--violet);  }
.topic-card__title, .topic-card__name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: var(--s2);
  line-height: 1.3;
}
.topic-card__desc {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.55;
}

/* ── 19. ARTICLE / INTELLIGENCE CARDS ────────────────────────── */
.posts-grid, .articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s4);
}
.posts-grid__ad { grid-column: 1 / -1; }
.article-card, .post-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: var(--s6);
  transition: all 0.22s var(--ease);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  position: relative;
  overflow: hidden;
}
.article-card:hover, .post-card:hover {
  border-color: rgba(59,130,246,0.18);
  background: rgba(59,130,246,0.03);
  transform: translateY(-2px);
}
.article-card::before, .post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.article-card:hover::before, .post-card:hover::before { opacity: 0.5; }
.article-card--featured, .post-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: var(--s8);
}
.article-card__meta, .post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
}
.article-card__title, .post-card__title,
.article-card__title a {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.35;
  letter-spacing: -0.02em;
  transition: color 0.18s var(--ease);
  display: block;
}
.article-card:hover .article-card__title,
.article-card:hover .article-card__title a { color: var(--blue); }
.article-card__excerpt, .post-card__excerpt {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.article-card__footer, .post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--s3);
  border-top: 1px solid var(--border-subtle);
}
.article-card__byline, .article-card__read-time {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
}
.article-card__badges { display: flex; align-items: center; gap: var(--s2); }
.article-card__read-link, .card-read-link {
  font-size: 11px;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  transition: gap 0.15s var(--ease);
}
.article-card:hover .article-card__read-link { gap: 5px; }

/* ── 20. INCIDENT CARDS ───────────────────────────────────────── */
.incident-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--coral);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  padding: var(--s4) var(--s5);
  transition: all 0.2s var(--ease);
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
}
.incident-card:hover {
  background: rgba(249,115,22,0.03);
  border-color: rgba(249,115,22,0.3);
  transform: translateX(2px);
}
.incident-card--critical { border-left-color: var(--red); }
.incident-card--warning  { border-left-color: var(--amber); }
.incident-card--resolved { border-left-color: var(--green); }
.incident-card__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  min-width: 24px;
  padding-top: 2px;
  flex-shrink: 0;
}
.incident-card__body { flex: 1; min-width: 0; }
.incident-card__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.4;
  margin-bottom: var(--s2);
  transition: color 0.15s var(--ease);
}
.incident-card:hover .incident-card__title { color: var(--coral); }
.incident-card__meta {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
}
.incident-card__trending {
  display: flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--coral);
}

/* ── 21. AI SUMMARY CARDS ─────────────────────────────────────── */
.ai-summary-card {
  background: linear-gradient(135deg, rgba(139,92,246,0.06) 0%, rgba(59,130,246,0.04) 100%);
  border: 1px solid rgba(139,92,246,0.18);
  border-radius: var(--r-xl);
  padding: var(--s5) var(--s6);
  position: relative;
  overflow: hidden;
}
.ai-summary-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--violet), transparent);
  opacity: 0.5;
}
.ai-summary-card__label {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--violet);
  margin-bottom: var(--s3);
}
.ai-summary-card__label::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--violet);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
.ai-summary-card__text {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.7;
}
.ai-summary-card__text p { color: var(--text-2); }

/* "Most likely cause" card */
.likely-cause-card {
  background: rgba(20,184,166,0.04);
  border: 1px solid rgba(20,184,166,0.14);
  border-radius: var(--r-lg);
  padding: var(--s4) var(--s5);
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  margin: var(--s4) 0;
}
.likely-cause-card__icon {
  width: 28px; height: 28px;
  background: var(--teal-dim);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}
.likely-cause-card__label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: var(--s1);
}
.likely-cause-card__text {
  font-size: var(--text-sm);
  color: var(--text-1);
  font-weight: 500;
  line-height: 1.4;
}

/* ── 22. INCIDENT TIMELINE ────────────────────────────────────── */
.incident-timeline {
  list-style: none;
  padding: 0;
  position: relative;
  margin: var(--s6) 0;
}
.incident-timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--border);
}
.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
  padding: 0 0 var(--s5) var(--s8);
  position: relative;
  margin-bottom: 0;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: 6px;
  top: 5px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--bg-0);
  flex-shrink: 0;
}
.timeline-dot--active   { background: var(--teal);   }
.timeline-dot--critical { background: var(--red);    }
.timeline-dot--warning  { background: var(--amber);  }
.timeline-dot--resolved { background: var(--green);  }
.timeline-item__time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  min-width: 50px;
  flex-shrink: 0;
}
.timeline-item__body { flex: 1; }
.timeline-item__event {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: var(--s1);
}
.timeline-item__detail {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
  line-height: 1.5;
}

/* ── 23. FAQ BLOCK ────────────────────────────────────────────── */
.faq-block {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin: var(--s8) 0;
}
.faq-block__header {
  background: var(--bg-panel);
  padding: var(--s4) var(--s6);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
}
.faq-item {
  border-bottom: 1px solid var(--border-subtle);
}
.faq-item:last-child { border-bottom: none; }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s4) var(--s6);
  background: transparent;
  text-align: left;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-1);
  cursor: pointer;
  transition: background 0.15s;
}
.faq-question:hover { background: rgba(255,255,255,0.02); }
.faq-question svg {
  width: 14px; height: 14px;
  color: var(--text-3);
  flex-shrink: 0;
  transition: transform 0.2s var(--ease);
}
.faq-question[aria-expanded="true"] svg { transform: rotate(180deg); }
.faq-answer {
  padding: 0 var(--s6) var(--s4);
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.7;
  border-top: 1px solid var(--border-subtle);
}
.faq-answer p { color: var(--text-2); }

/* ── 24. LEARNING PATHWAY CARDS ───────────────────────────────── */
.pathway-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--s5) var(--s6);
  display: flex;
  align-items: center;
  gap: var(--s5);
  transition: all 0.2s var(--ease);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.pathway-card:hover {
  border-color: rgba(59,130,246,0.2);
  background: rgba(59,130,246,0.03);
  transform: translateY(-1px);
}
.pathway-card__step {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--border);
  flex-shrink: 0;
  line-height: 1;
  min-width: 36px;
}
.pathway-card__body { flex: 1; min-width: 0; }
.pathway-card__level {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
  margin-bottom: var(--s1);
}
.pathway-card__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: var(--s1);
  line-height: 1.3;
}
.pathway-card__desc {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.45;
}
.pathway-card__count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  flex-shrink: 0;
  text-align: right;
}

/* ── 25. TRENDING FEED ────────────────────────────────────────── */
.trending-section {
  padding: var(--s12) 0;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.trending-list {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.trending-item {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s4) var(--s5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  text-decoration: none;
  transition: all 0.2s var(--ease);
}
.trending-item:hover {
  border-color: rgba(249,115,22,0.2);
  background: rgba(249,115,22,0.03);
  transform: translateX(3px);
}
.trending-item__rank {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  min-width: 20px;
  flex-shrink: 0;
}
.trending-item__body { flex: 1; min-width: 0; }
.trending-item__title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.35;
  margin-bottom: var(--s1);
  transition: color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trending-item:hover .trending-item__title { color: var(--coral); }
.trending-item__meta {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.trending-item__arrow {
  font-size: var(--text-sm);
  color: var(--text-3);
  flex-shrink: 0;
  transition: transform 0.15s;
}
.trending-item:hover .trending-item__arrow { transform: translateX(2px); color: var(--coral); }

/* ── 26. ERROR INTELLIGENCE GRID ─────────────────────────────── */
.error-intel-section {
  padding: var(--s12) 0;
  background: var(--bg-0);
}
.error-category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s4);
}
.error-category-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--s5);
  transition: all 0.2s var(--ease);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.error-category-card:hover {
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.error-category-card__icon {
  width: 42px; height: 42px;
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--s4);
  font-size: 22px;
  position: relative;
}
.error-category-card__icon--memory     { background: var(--blue-dim);    color: var(--blue);    }
.error-category-card__icon--replication{ background: var(--teal-dim);    color: var(--teal);    }
.error-category-card__icon--storage    { background: var(--coral-dim);   color: var(--coral);   }
.error-category-card__icon--wal        { background: var(--violet-dim);  color: var(--violet);  }
.error-category-card__icon--performance{ background: var(--green-dim);   color: var(--green);   }
.error-category-card__icon--security   { background: var(--amber-dim);   color: var(--amber);   }
.error-category-card__name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: var(--s2);
}
.error-category-card__count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  margin-bottom: var(--s4);
}
.error-category-card__bar {
  height: 2px;
  background: var(--border);
  border-radius: var(--r-full);
  overflow: hidden;
}
.error-category-card__bar-fill {
  height: 100%;
  border-radius: var(--r-full);
  background: var(--blue);
  transition: width 1s var(--ease-out);
}

/* ── 27. SITE LAYOUT ──────────────────────────────────────────── */
.site-layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: var(--s8);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--s10) var(--s6);
  align-items: start;
}
.site-main { min-width: 0; }

/* ── 28. SIDEBAR — INTELLIGENCE PANEL ────────────────────────── */
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + var(--s4));
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  max-height: calc(100vh - var(--header-h) - var(--s8));
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.widget {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--s5);
}
.widget-title {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: var(--s4);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.reading-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2);
}
.reading-stat {
  background: var(--bg-2);
  border-radius: var(--r-md);
  padding: var(--s3);
}
.reading-stat__value {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-1);
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: var(--s1);
}
.reading-stat__label {
  font-size: 9px;
  color: var(--text-3);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.knowledge-trail { display: flex; flex-wrap: wrap; gap: var(--s2); min-height: 20px; }
.knowledge-node {
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  color: var(--text-3);
  background: transparent;
  text-transform: lowercase;
  transition: all 0.15s var(--ease);
}
.knowledge-node--visited {
  background: var(--blue-dim);
  border-color: rgba(59,130,246,0.2);
  color: var(--blue);
}
.knowledge-node--new {
  background: var(--violet-dim);
  border-color: rgba(139,92,246,0.2);
  color: var(--violet);
  animation: node-pulse 2.5s ease-in-out infinite;
}
.widget-ai-entry {
  background: linear-gradient(135deg, rgba(139,92,246,0.06) 0%, rgba(59,130,246,0.04) 100%);
  border-color: rgba(139,92,246,0.14);
}
.ai-entry-suggestions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.ai-suggestion-chip {
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 3px 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s var(--ease);
  text-align: left;
}
.ai-suggestion-chip:hover {
  background: var(--violet-dim);
  border-color: rgba(139,92,246,0.25);
  color: var(--violet);
}
.widget-subscribe {
  background: linear-gradient(135deg, rgba(59,130,246,0.05) 0%, rgba(20,184,166,0.03) 100%);
  border-color: rgba(59,130,246,0.14);
}
.widget-subscribe__count {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--blue);
  margin-bottom: var(--s3);
}
.widget-subscribe__text {
  font-size: var(--text-sm);
  color: var(--text-2);
  margin-bottom: var(--s4);
  line-height: 1.5;
}
.btn-subscribe-sidebar {
  display: block;
  text-align: center;
  width: 100%;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: var(--text-sm);
  padding: 10px var(--s4);
  border-radius: var(--r-md);
  transition: all 0.2s var(--ease);
}
.btn-subscribe-sidebar:hover { background: #60A5FA; color: #fff; }
.popular-posts-list { display: flex; flex-direction: column; gap: var(--s3); }
.popular-post-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
}
.popular-post-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  min-width: 18px;
  padding-top: 1px;
  flex-shrink: 0;
}
.popular-post-title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.4;
  transition: color 0.15s var(--ease);
}
.popular-post-title:hover { color: var(--blue); }
.tag-list { display: flex; flex-wrap: wrap; gap: var(--s2); }
.article-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: lowercase;
  padding: 3px 8px;
  border-radius: var(--r-full);
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-3);
  transition: all 0.15s var(--ease);
}
.article-tag:hover {
  background: var(--blue-dim);
  border-color: rgba(59,130,246,0.25);
  color: var(--blue);
}
.search-form { display: flex; gap: var(--s2); }
.search-field {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px var(--s3);
  color: var(--text-1);
  font-size: var(--text-sm);
  outline: none;
  transition: border-color 0.15s var(--ease);
}
.search-field:focus { border-color: var(--blue); }
.search-submit {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: var(--text-sm);
  padding: 8px var(--s3);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.search-submit:hover { background: #60A5FA; }
.toc-widget { max-height: 280px; overflow-y: auto; }
.toc-list { list-style: none; padding: 0; display: flex; flex-direction: column; }
.toc-list li { margin: 0; }
.toc-list a {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  padding: var(--s2) var(--s3);
  border-left: 2px solid var(--border);
  font-family: var(--font-mono);
  transition: all 0.15s var(--ease);
}
.toc-list a:hover,
.toc-list a.is-active {
  color: var(--blue);
  border-left-color: var(--blue);
  background: var(--blue-dim);
}

/* ── 29. POST HEADER ──────────────────────────────────────────── */
.post-header { padding: var(--s12) 0 var(--s8); }
.post-header-meta, .post-tags {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
  margin-bottom: var(--s6);
}
.post-title {
  font-size: clamp(1.8rem, 4.5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
  margin-bottom: var(--s6);
}
.post-excerpt-lead {
  font-size: var(--text-xl);
  color: var(--text-2);
  line-height: 1.6;
  max-width: 640px;
  margin-bottom: var(--s6);
}
.post-byline {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s4) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.byline-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.byline-info { display: flex; flex-direction: column; gap: 2px; }
.byline-name { font-weight: 600; font-size: var(--text-sm); color: var(--text-1); }
.byline-meta { font-size: var(--text-xs); color: var(--text-3); font-family: var(--font-mono); }

/* ── 30. TL;DR BOX ────────────────────────────────────────────── */
.article-tldr {
  background: rgba(59,130,246,0.04);
  border: 1px solid rgba(59,130,246,0.18);
  border-radius: var(--r-lg);
  padding: var(--s5) var(--s6);
  margin: var(--s8) 0;
  display: flex;
  gap: var(--s4);
  align-items: flex-start;
}
.article-tldr__label {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue);
  background: var(--blue-dim);
  padding: 3px 8px;
  border-radius: var(--r-full);
  margin-top: 2px;
  border: 1px solid rgba(59,130,246,0.2);
}
.article-tldr__text, .article-tldr p {
  margin: 0;
  color: var(--text-2);
  font-size: var(--text-sm);
  line-height: 1.68;
}

/* ── 31. ENTRY CONTENT ────────────────────────────────────────── */
.entry-content {
  font-size: var(--text-base);
  color: var(--text-2);
  line-height: 1.85;
}
.entry-content h2, .entry-content h3, .entry-content h4 {
  margin-top: var(--s10);
  margin-bottom: var(--s4);
  color: var(--text-1);
}
.entry-content h2 {
  font-size: var(--text-2xl);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--border);
}
.entry-content h3 { font-size: var(--text-xl); }
.entry-content h4 { font-size: var(--text-lg); color: var(--text-2); }
.entry-content p  { margin-bottom: var(--s5); }
.entry-content ul, .entry-content ol { margin-bottom: var(--s5); }
.entry-content blockquote {
  border-left: 3px solid var(--blue);
  padding: var(--s4) var(--s6);
  margin: var(--s8) 0;
  background: rgba(59,130,246,0.04);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.entry-content blockquote p { color: var(--text-1); font-style: italic; margin: 0; }
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--s8) 0;
  font-size: var(--text-sm);
}
.entry-content th {
  background: var(--bg-panel);
  color: var(--text-1);
  font-weight: 600;
  padding: var(--s3) var(--s4);
  text-align: left;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.entry-content td {
  padding: var(--s3) var(--s4);
  border: 1px solid var(--border-subtle);
  color: var(--text-2);
}
.entry-content tr:hover td { background: rgba(255,255,255,0.02); }
.entry-content img {
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  margin: var(--s8) auto;
}
.entry-content hr { border: none; border-top: 1px solid var(--border); margin: var(--s12) 0; }
.entry-content a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: rgba(59,130,246,0.3);
  text-underline-offset: 2px;
}
.entry-content a:hover { color: var(--text-1); text-decoration-color: rgba(255,255,255,0.3); }

/* Code copy button */
.copy-code-btn {
  position: absolute;
  top: var(--s3); right: var(--s3);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 3px 8px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-3);
  transition: all 0.15s var(--ease);
  opacity: 0;
  cursor: pointer;
}
pre:hover .copy-code-btn { opacity: 1; }
.copy-code-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-1); }
.copy-code-btn.copied { color: var(--green); border-color: rgba(16,185,129,0.3); }

/* ── 32. POST COVER ───────────────────────────────────────────── */
.post-cover {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  margin: var(--s8) 0;
}

/* ── 33. BREADCRUMB ───────────────────────────────────────────── */
.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-3);
  margin-bottom: var(--s6);
}
.post-breadcrumb a { color: var(--text-3); }
.post-breadcrumb a:hover { color: var(--blue); }
.post-breadcrumb__sep { opacity: 0.3; }

/* ── 34. INLINE SUBSCRIBE ─────────────────────────────────────── */
.inline-subscribe {
  background: linear-gradient(135deg, rgba(59,130,246,0.06) 0%, rgba(20,184,166,0.04) 100%);
  border: 1px solid rgba(59,130,246,0.18);
  border-radius: var(--r-xl);
  padding: var(--s8);
  text-align: center;
  margin: var(--s12) 0;
  position: relative;
  overflow: hidden;
}
.inline-subscribe::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  opacity: 0.5;
}
.inline-subscribe__icon { font-size: 1.8rem; margin-bottom: var(--s4); }
.inline-subscribe__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.03em;
  margin-bottom: var(--s3);
}
.inline-subscribe__text {
  font-size: var(--text-base);
  color: var(--text-2);
  margin-bottom: var(--s6);
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}
.inline-subscribe__badges {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--s4);
  margin-top: var(--s4);
}
.inline-subscribe__badge {
  font-size: var(--text-xs);
  color: var(--text-3);
  font-family: var(--font-mono);
}

/* ── 35. POST NAVIGATION ──────────────────────────────────────── */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
  margin: var(--s12) 0;
  padding-top: var(--s8);
  border-top: 1px solid var(--border);
}
.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  transition: all 0.2s var(--ease);
}
.post-nav-link:hover {
  border-color: rgba(59,130,246,0.2);
  background: var(--blue-dim);
}
.post-nav-link--next { text-align: right; }
.post-nav-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
}
.post-nav-title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.4;
  transition: color 0.15s var(--ease);
}
.post-nav-link:hover .post-nav-title { color: var(--text-1); }

/* ── 36. RELATED POSTS ────────────────────────────────────────── */
.related-posts {
  margin: var(--s12) 0;
  padding-top: var(--s8);
  border-top: 1px solid var(--border);
}
.related-posts__title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: var(--s6);
}
.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
}
.related-post-card {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  transition: all 0.2s var(--ease);
  text-decoration: none;
}
.related-post-card:hover {
  border-color: rgba(59,130,246,0.2);
  background: var(--blue-dim);
}
.related-post-card__title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.4;
  transition: color 0.15s var(--ease);
}
.related-post-card:hover .related-post-card__title { color: var(--blue); }
.related-post-card__date {
  font-size: 10px;
  color: var(--text-3);
  font-family: var(--font-mono);
}

/* ── 37. DAILY QUIZ ───────────────────────────────────────────── */
.quiz-section {
  padding: var(--s16) 0;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.quiz-inner { max-width: 700px; margin: 0 auto; padding: 0 var(--s6); }
.quiz-widget {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  position: relative;
}
.quiz-widget::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--violet), transparent);
}
.quiz-widget__header {
  padding: var(--s4) var(--s6);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.quiz-widget__label {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--violet);
}
.quiz-widget__label::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--violet);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
.quiz-widget__date { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.quiz-widget__body { padding: var(--s6); }
.quiz-widget__question {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin-bottom: var(--s6);
}
.quiz-widget__reveal {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--violet);
  padding: 8px 18px;
  background: var(--violet-dim);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: var(--r-full);
  transition: all 0.2s var(--ease);
  cursor: pointer;
}
.quiz-widget__reveal:hover { background: rgba(139,92,246,0.14); transform: translateY(-1px); }
.quiz-widget__reveal svg { width: 14px; height: 14px; transition: transform 0.2s var(--ease); }
.quiz-widget__reveal[aria-expanded="true"] svg { transform: rotate(180deg); }
.quiz-widget__answer {
  margin-top: var(--s5);
  padding: var(--s5);
  background: rgba(139,92,246,0.04);
  border: 1px solid rgba(139,92,246,0.1);
  border-radius: var(--r-lg);
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.72;
  animation: fade-in 0.28s var(--ease);
}

/* ── 38. FLOATING AI ASSISTANT ────────────────────────────────── */
.ai-float-btn {
  position: fixed;
  bottom: var(--s6);
  right: var(--s6);
  z-index: 250;
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--violet) 0%, var(--blue) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(139,92,246,0.4), 0 0 0 0 rgba(139,92,246,0.3);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  animation: ai-float-pulse 3s ease-in-out infinite;
}
.ai-float-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 32px rgba(139,92,246,0.5), 0 0 0 8px rgba(139,92,246,0.08);
}
.ai-float-btn .ms-icon {
  color: #fff;
  font-size: 22px;
  font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}
.ai-float-btn-tooltip {
  position: absolute;
  right: 60px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.ai-float-btn:hover .ai-float-btn-tooltip { opacity: 1; }
@keyframes ai-float-pulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(139,92,246,0.4), 0 0 0 0 rgba(139,92,246,0.2); }
  50%       { box-shadow: 0 4px 24px rgba(139,92,246,0.4), 0 0 0 10px rgba(139,92,246,0); }
}

/* AI panel */
.ai-panel {
  position: fixed;
  bottom: calc(var(--s6) + 64px);
  right: var(--s6);
  z-index: 250;
  width: 320px;
  background: var(--bg-elevated);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: var(--r-2xl);
  box-shadow: 0 16px 48px rgba(0,0,0,0.6), var(--glow-violet);
  overflow: hidden;
  transform: scale(0.9) translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s var(--ease);
}
.ai-panel.is-open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}
.ai-panel__header {
  background: linear-gradient(135deg, rgba(139,92,246,0.1) 0%, rgba(59,130,246,0.06) 100%);
  border-bottom: 1px solid rgba(139,92,246,0.15);
  padding: var(--s4) var(--s5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ai-panel__title {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--violet);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ai-panel__title::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--violet);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
.ai-panel__close {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  color: var(--text-3);
  transition: all 0.15s;
  font-size: 14px;
}
.ai-panel__close:hover { background: rgba(255,255,255,0.06); color: var(--text-1); }
.ai-panel__body { padding: var(--s4) var(--s5); }
.ai-panel__hint {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
  margin-bottom: var(--s4);
  line-height: 1.5;
}
.ai-panel__actions { display: flex; flex-direction: column; gap: var(--s2); }
.ai-panel__action {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 11px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s var(--ease);
  text-align: left;
  width: 100%;
}
.ai-panel__action:hover {
  background: var(--violet-dim);
  border-color: rgba(139,92,246,0.2);
  color: var(--violet);
}
.ai-panel__action .ms-icon { font-size: 16px; flex-shrink: 0; }

/* ── 39. GUMROAD CARD ─────────────────────────────────────────── */
.gumroad-card {
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--s5);
  margin: var(--s8) 0;
}
.gumroad-card__badge {
  background: var(--amber-dim);
  color: var(--amber);
  border: 1px solid rgba(245,158,11,0.2);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--s2) var(--s4);
  border-radius: var(--r-md);
  white-space: nowrap;
  flex-shrink: 0;
}
.gumroad-card__title { font-weight: 600; color: var(--text-1); margin-bottom: var(--s2); }
.gumroad-card__desc  { font-size: var(--text-sm); }
.btn-gumroad {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  background: var(--amber);
  color: #000;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 8px var(--s4);
  border-radius: var(--r-full);
  margin-top: var(--s3);
  transition: all 0.2s var(--ease);
}
.btn-gumroad:hover { background: #FCD34D; color: #000; transform: translateY(-1px); }

/* ── 40. AD SLOTS ─────────────────────────────────────────────── */
.ad-slot { margin: var(--s8) 0; }
.ad-slot__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: var(--s2);
  opacity: 0.35;
}

/* ── 41. SCROLL TO TOP ────────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: var(--s6);
  right: calc(var(--s6) + 64px);
  z-index: 240;
  width: 36px; height: 36px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: all 0.2s var(--ease);
  color: var(--text-3);
}
.scroll-top.is-visible { opacity: 1; pointer-events: all; transform: translateY(0); }
.scroll-top:hover { background: var(--blue-dim); color: var(--blue); border-color: rgba(59,130,246,0.2); }
.scroll-top svg { width: 14px; height: 14px; }

/* ── 42. FOOTER ───────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  padding: var(--s16) 0 var(--s8);
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s10);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s6) var(--s12);
  border-bottom: 1px solid var(--border);
}
.footer-brand .site-title {
  font-size: var(--text-lg);
  color: var(--text-1);
  display: block;
  margin-bottom: var(--s3);
}
.footer-brand .site-title .title-highlight { color: var(--teal); }
.footer-desc {
  font-size: var(--text-sm);
  color: var(--text-3);
  line-height: 1.65;
  margin-bottom: var(--s5);
  max-width: 240px;
}
.footer-social {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.footer-social a {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-3);
  transition: all 0.15s var(--ease);
}
.footer-social a:hover { background: var(--blue-dim); border-color: rgba(59,130,246,0.2); color: var(--blue); }
.footer-social a svg { width: 13px; height: 13px; }
.footer-col-title {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  margin-bottom: var(--s4);
}
.footer-links { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.footer-links a {
  font-size: var(--text-sm);
  color: var(--text-3);
  transition: color 0.15s var(--ease);
}
.footer-links a:hover { color: var(--blue); }
.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--s6) var(--s6) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s4);
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}
.footer-schema-links {
  display: flex;
  align-items: center;
  gap: var(--s4);
}
.footer-schema-links a {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  transition: color 0.15s;
}
.footer-schema-links a:hover { color: var(--blue); }

/* ── 43. LIGHT MODE ───────────────────────────────────────────── */
.sev1-light {
  --bg-0:       #F8FAFC;
  --bg-panel:   #F1F5F9;
  --bg-elevated:#FFFFFF;
  --bg-2:       #F1F5F9;
  --bg-card:    rgba(255,255,255,0.9);
  --border:        #E2E8F0;
  --border-subtle: rgba(226,232,240,0.7);
  --text-1:    #0F172A;
  --text-2:    #475569;
  --text-3:    #94A3B8;
}
.sev1-light .site-header { background: rgba(248,250,252,0.96); }
.sev1-light .cmd-palette-overlay { background: rgba(255,255,255,0.6); }

/* ── 44. RESPONSIVE ───────────────────────────────────────────── */

/* 1100px — narrow desktop */
@media (max-width: 1100px) {
  .site-layout { grid-template-columns: 1fr 280px; }
  .topics-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top  { grid-template-columns: 1fr 1fr; gap: var(--s8); }
  .quick-access__grid { grid-template-columns: repeat(2, 1fr); }
  .error-category-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 900px — tablet */
@media (max-width: 900px) {
  .main-nav a:not(.current-menu-item) { display: none; }
  .menu-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(7,11,20,0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--s4) var(--s6);
    gap: var(--s2);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s var(--ease);
    z-index: 200;
  }
  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .main-nav.is-open a { display: flex; width: 100%; }
  .main-nav a { display: flex; width: 100%; }
  .site-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* 768px — tablet portrait */
@media (max-width: 768px) {
  :root { --header-h: 54px; }
  .status-bar { display: none; }
  .mobile-bottom-nav { display: flex; }
  body { padding-bottom: var(--mobile-nav-h); }

  .hero-title { font-size: clamp(2rem, 8vw, 3rem); }
  .hero-platform-stats { gap: var(--s4); }
  .hero-stat__value { font-size: var(--text-lg); }

  .topics-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .article-card--featured { flex-direction: column; }

  .quick-access__grid { grid-template-columns: repeat(2, 1fr); }
  .error-category-grid { grid-template-columns: repeat(2, 1fr); }

  .post-navigation { grid-template-columns: 1fr; }
  .related-posts__grid { grid-template-columns: 1fr; }

  .footer-top { grid-template-columns: 1fr; gap: var(--s6); }
  .footer-bottom { flex-direction: column; text-align: center; }

  .ai-float-btn { bottom: calc(var(--mobile-nav-h) + var(--s4)); }
  .ai-panel { right: var(--s4); width: calc(100vw - var(--s8)); max-width: 340px; }
  .scroll-top { bottom: calc(var(--mobile-nav-h) + var(--s4)); right: calc(var(--s6) + 64px); }
}

/* 520px — mobile */
@media (max-width: 520px) {
  .container, .container--narrow { padding: 0 var(--s4); }
  .site-layout { padding: var(--s6) var(--s4); }
  .hero-subscribe-form, .hero-search { max-width: 100%; }
  .hero-chips { gap: var(--s1); }
  .hero-platform-stats { gap: var(--s3); flex-wrap: wrap; }
  .hero-stat-divider { display: none; }

  .quick-access__grid { grid-template-columns: 1fr; }
  .error-category-grid { grid-template-columns: 1fr 1fr; }

  .trending-item__title { font-size: 12px; }
  .cmd-palette { margin: 0 var(--s3); border-radius: var(--r-xl); }

  .header-ai-badge { display: none; }
  .cmd-palette-trigger span:not(.cmd-kbd) { display: none; }
  .btn-subscribe-header { padding: 7px 12px; font-size: 12px; }
  .btn-subscribe-header svg { display: none; }

  .post-title { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .inline-subscribe { padding: var(--s6); }
  .inline-subscribe__title { font-size: var(--text-xl); }

  .topics-grid, .posts-grid { gap: var(--s3); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.1ms !important; }
}

/* Print */
@media print {
  .site-header, .sidebar, .site-footer, .mobile-bottom-nav,
  .ai-float-btn, .ai-panel, .scroll-top, .cmd-palette-overlay { display: none !important; }
  .site-layout { grid-template-columns: 1fr; }
  body { background: white; color: black; }
}
