/* ================================================================
   BatBMS — Premium Technology Publication
   Design System: Emerald / Slate / Orange
   Fonts: Plus Jakarta Sans + Inter
   Version: 2.0 — Full Editorial Build
================================================================ */

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

/* ─── CSS Custom Properties ──────────────────────────────────── */
:root {
  /* Brand Colors */
  --emerald-50:  #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-800: #065f46;

  /* Slate */
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Orange */
  --orange-50:  #fff7ed;
  --orange-100: #ffedd5;
  --orange-500: #f97316;
  --orange-600: #ea580c;

  /* Semantic */
  --color-primary:   var(--emerald-600);
  --color-primary-h: var(--emerald-700);
  --color-accent:    var(--orange-500);
  --color-text:      var(--slate-900);
  --color-text-2:    var(--slate-600);
  --color-text-3:    var(--slate-400);
  --color-bg:        #ffffff;
  --color-bg-2:      var(--slate-50);
  --color-bg-3:      var(--slate-100);
  --color-border:    rgba(15, 23, 42, 0.07);
  --color-border-2:  rgba(15, 23, 42, 0.12);

  /* Typography */
  --font-head: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing Scale */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --max-w:       1280px;
  --content-w:   1040px;
  --sidebar-w:   300px;
  --header-h:    72px;
  --progress-h:  3px;

  /* Effects */
  --radius-sm: 8px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.05), 0 1px 2px rgba(15,23,42,0.04);
  --shadow:    0 4px 24px rgba(15,23,42,0.06), 0 1px 4px rgba(15,23,42,0.04);
  --shadow-md: 0 8px 32px rgba(15,23,42,0.08), 0 2px 8px rgba(15,23,42,0.04);
  --shadow-lg: 0 20px 60px rgba(15,23,42,0.10), 0 4px 16px rgba(15,23,42,0.06);
  --shadow-emerald: 0 8px 32px rgba(5,150,105,0.18);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-h); }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }
ul, ol { list-style: none; }
input, textarea, select { font-family: var(--font-body); }
table { border-collapse: collapse; }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; border-radius: 4px; }

/* ─── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--slate-50); }
::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--slate-400); }

/* ─── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--slate-900);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); font-weight: 700; }
h4 { font-size: 1.125rem; font-weight: 600; }
h5 { font-size: 1rem; font-weight: 600; }
p  { color: var(--slate-700); line-height: 1.75; margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; color: var(--slate-800); }
em { font-style: italic; }
code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.875em;
  background: var(--emerald-50);
  color: var(--emerald-700);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--emerald-100);
}
pre {
  background: var(--slate-900);
  color: #e2e8f0;
  padding: var(--space-6);
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: var(--space-6) 0;
}
pre code { background: none; border: none; color: inherit; padding: 0; font-size: inherit; }
blockquote {
  border-left: 4px solid var(--emerald-500);
  padding: var(--space-4) var(--space-6);
  background: var(--emerald-50);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: var(--space-6) 0;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--slate-700);
}
blockquote cite { display: block; font-size: 0.85rem; font-style: normal; color: var(--slate-500); margin-top: var(--space-2); }
hr { border: none; border-top: 1px solid var(--color-border); margin: var(--space-8) 0; }

/* ─── Layout Utilities ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
@media (max-width: 640px) { .container { padding: 0 var(--space-4); } }

.section { padding: var(--space-16) 0; }
.section-sm { padding: var(--space-10) 0; }
.section-lg { padding: var(--space-24) 0; }
.section-alt { background: var(--slate-50); }

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-sm     { font-size: 0.875rem; }
.text-xs     { font-size: 0.75rem; }
.text-lg     { font-size: 1.125rem; }
.text-xl     { font-size: 1.25rem; }
.text-muted  { color: var(--slate-500); }
.text-accent { color: var(--color-accent); }
.text-emerald { color: var(--emerald-600); }
.font-head   { font-family: var(--font-head); }
.font-bold   { font-weight: 700; }
.font-semibold { font-weight: 600; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.wrap { flex-wrap: wrap; }
.grid { display: grid; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* ─── Reading Progress Bar ───────────────────────────────────── */
#reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: var(--progress-h);
  background: linear-gradient(90deg, var(--emerald-500), var(--emerald-700));
  z-index: 9999;
  transition: width 100ms linear;
}

/* ─── HEADER ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  height: var(--header-h);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  display: flex;
  align-items: center;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.03em;
}
.logo-mark {
  width: 36px; height: 36px;
  background: var(--emerald-600);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-emerald);
}
.logo-mark svg { width: 20px; height: 20px; fill: white; }
.logo-text-accent { color: var(--emerald-600); }

.main-nav { display: flex; align-items: center; gap: var(--space-1); }
.nav-link {
  padding: var(--space-2) var(--space-3);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate-600);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-link:hover { color: var(--emerald-600); background: var(--emerald-50); }
.nav-link.active { color: var(--emerald-600); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: var(--space-2); }

.btn-search {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--slate-500);
  transition: all var(--transition);
}
.btn-search:hover { background: var(--slate-100); color: var(--slate-700); }
.btn-search svg { width: 18px; height: 18px; }

/* Hamburger */
.menu-btn {
  display: none;
  width: 38px; height: 38px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: all var(--transition);
}
.menu-btn:hover { background: var(--slate-100); }
.menu-btn span {
  display: block;
  width: 20px; height: 2px;
  background: var(--slate-700);
  border-radius: 2px;
  transition: all var(--transition-slow);
  transform-origin: center;
}
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  padding: var(--space-8) var(--space-6);
  flex-direction: column;
  gap: var(--space-2);
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  overflow-y: auto;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav .nav-link { padding: var(--space-4); font-size: 1rem; border-radius: var(--radius); display: block; }

/* ─── HERO ───────────────────────────────────────────────────── */
.hero {
  padding: var(--space-20) 0 var(--space-16);
  background: linear-gradient(160deg, var(--slate-50) 0%, #fff 60%);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: var(--space-16);
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--emerald-50);
  color: var(--emerald-700);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 99px;
  border: 1px solid var(--emerald-100);
  margin-bottom: var(--space-5);
}
.hero-eyebrow-dot { width: 6px; height: 6px; background: var(--emerald-500); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hero h1 { margin-bottom: var(--space-5); }
.hero-lead {
  font-size: 1.15rem;
  color: var(--slate-600);
  line-height: 1.7;
  margin-bottom: var(--space-8);
  max-width: 540px;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}
.hero-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.85rem;
  color: var(--slate-500);
}
.hero-meta-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.hero-meta-sep { color: var(--slate-300); font-size: 0.75rem; }
.hero-actions { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.hero-image-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}
.hero-image-wrap img { width: 100%; height: auto; display: block; }
.hero-image-badge {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}
.hero-stat { text-align: center; flex: 1; }
.hero-stat-num { font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; color: var(--emerald-600); display: block; }
.hero-stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--slate-400); }
.hero-stat-sep { width: 1px; background: var(--color-border); align-self: stretch; }

/* Download Buttons */
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--slate-900);
  color: #ffffff;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  font-weight: 500;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
}
.download-btn:hover { background: var(--slate-800); color: #ffffff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.download-btn svg { width: 24px; height: 24px; flex-shrink: 0; fill: #ffffff; }
.download-btn-text { display: flex; flex-direction: column; gap: 1px; }
.download-btn-text small { font-size: 0.65rem; color: rgba(255,255,255,0.75); text-transform: uppercase; letter-spacing: 0.06em; display: block; }
.download-btn-text strong { font-family: var(--font-head); font-size: 0.95rem; font-weight: 700; color: #ffffff; display: block; }
/* Google Play button */
.download-btn.play { background: #1a1a2e; border-color: #333; }
.download-btn.play:hover { background: #16213e; }
/* Apple App Store button */
.download-btn.apple { background: #1c1c1e; border-color: #3a3a3c; }
.download-btn.apple:hover { background: #2c2c2e; }
/* Alt / outline button */
.download-btn.alt {
  background: #ffffff;
  color: var(--slate-800);
  border-color: var(--color-border-2);
}
.download-btn.alt:hover { background: var(--slate-50); color: var(--slate-900); border-color: var(--emerald-400); }
.download-btn.alt svg { fill: var(--slate-700); }
.download-btn.alt svg path { fill: var(--slate-700); stroke: var(--slate-700); }
.download-btn.alt .download-btn-text small { color: var(--slate-500); }
.download-btn.alt .download-btn-text strong { color: var(--slate-800); }

/* ─── OVERVIEW STATS BAR ─────────────────────────────────────── */
.overview-bar {
  background: var(--slate-900);
  color: white;
}
.overview-bar-inner {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.overview-bar-inner::-webkit-scrollbar { display: none; }
.overview-stat {
  padding: var(--space-5) var(--space-6);
  border-right: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  min-width: 140px;
}
.overview-stat:last-child { border-right: none; }
.overview-stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--slate-400); margin-bottom: var(--space-1); }
.overview-stat-value { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; color: white; }
.overview-stat-value .badge-ok { color: var(--emerald-500); }
.overview-stat-value .badge-warn { color: var(--orange-500); }

/* ─── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--emerald-600);
  color: white;
  box-shadow: 0 4px 12px rgba(5,150,105,0.25);
}
.btn-primary:hover { background: var(--emerald-700); color: white; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(5,150,105,0.3); }
.btn-secondary { background: var(--slate-100); color: var(--slate-700); }
.btn-secondary:hover { background: var(--slate-200); color: var(--slate-900); }
.btn-outline { background: transparent; color: var(--emerald-600); border-color: var(--emerald-500); }
.btn-outline:hover { background: var(--emerald-50); }
.btn-ghost { color: var(--slate-600); }
.btn-ghost:hover { background: var(--slate-100); color: var(--slate-900); }
.btn-sm { padding: var(--space-2) var(--space-4); font-size: 0.82rem; border-radius: var(--radius-sm); }
.btn-lg { padding: var(--space-4) var(--space-8); font-size: 1rem; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ─── BADGE ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-emerald { background: var(--emerald-50); color: var(--emerald-700); border: 1px solid var(--emerald-100); }
.badge-orange  { background: var(--orange-50);  color: var(--orange-600);  border: 1px solid var(--orange-100); }
.badge-slate   { background: var(--slate-100);  color: var(--slate-600);   border: 1px solid var(--slate-200);  }
.badge-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.badge-danger  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ─── CARDS ───────────────────────────────────────────────────── */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-slow);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-alt { background: var(--slate-50); }
.card-emerald { background: var(--emerald-50); border-color: var(--emerald-100); }
.card-orange { background: var(--orange-50); border-color: var(--orange-100); }
.card-dark { background: var(--slate-900); color: white; border-color: transparent; }
.card-dark p { color: var(--slate-400); }

.card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  background: var(--emerald-50);
}
.card-icon svg { width: 24px; height: 24px; }
.card-icon.orange { background: var(--orange-50); }
.card-icon.slate { background: var(--slate-100); }

/* ─── FEATURE GRID ───────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
}
.feature-card .card-icon { background: var(--emerald-50); }
.feature-card h3 { font-size: 1.05rem; margin-bottom: var(--space-2); margin-top: var(--space-3); }
.feature-card p { font-size: 0.92rem; color: var(--slate-600); margin-bottom: 0; }

/* ─── ARTICLE LAYOUT ─────────────────────────────────────────── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: var(--space-12);
  align-items: start;
}
.article-body { min-width: 0; }
.article-body h2 {
  font-size: 1.6rem;
  margin-top: var(--space-12);
  margin-bottom: var(--space-5);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  scroll-margin-top: calc(var(--header-h) + var(--space-4));
}
.article-body h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.article-body h3 {
  font-size: 1.2rem;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  scroll-margin-top: calc(var(--header-h) + var(--space-4));
}
.article-body ul, .article-body ol {
  padding-left: var(--space-5);
  margin-bottom: var(--space-5);
  list-style: initial;
}
.article-body ol { list-style: decimal; }
.article-body li { color: var(--slate-700); margin-bottom: var(--space-2); }

/* Article images */
.article-image {
  width: 100%;
  border-radius: var(--radius);
  margin: var(--space-8) 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}
.article-image-caption {
  font-size: 0.82rem;
  color: var(--slate-400);
  text-align: center;
  margin-top: calc(-1 * var(--space-6));
  margin-bottom: var(--space-8);
  font-style: italic;
}
.img-wrap { position: relative; }

/* ─── TABLE OF CONTENTS ──────────────────────────────────────── */
.toc-sidebar {
  position: sticky;
  top: calc(var(--header-h) + var(--space-6));
}
.toc-card {
  background: var(--slate-50);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.toc-title {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-400);
  margin-bottom: var(--space-4);
}
.toc-list { display: flex; flex-direction: column; gap: 2px; }
.toc-link {
  display: block;
  padding: 6px var(--space-3);
  font-size: 0.855rem;
  color: var(--slate-600);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  font-weight: 500;
  border-left: 2px solid transparent;
}
.toc-link:hover { color: var(--emerald-600); background: var(--emerald-50); border-left-color: var(--emerald-300); }
.toc-link.active { color: var(--emerald-700); background: var(--emerald-50); border-left-color: var(--emerald-500); font-weight: 600; }
.toc-link.toc-l2 { padding-left: var(--space-6); font-size: 0.82rem; font-weight: 400; }

/* ─── ARTICLE META ───────────────────────────────────────────── */
.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}
.author-chip {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.author-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--emerald-100);
}
.author-avatar-fallback {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--emerald-600);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  color: white;
  flex-shrink: 0;
}
.author-name { font-size: 0.875rem; font-weight: 600; color: var(--slate-800); }
.author-role { font-size: 0.75rem; color: var(--slate-500); }
.meta-sep { color: var(--slate-300); font-size: 0.75rem; }
.meta-item { font-size: 0.82rem; color: var(--slate-500); display: flex; align-items: center; gap: 5px; }
.meta-item svg { width: 13px; height: 13px; }

/* ─── BREADCRUMB ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.82rem;
  color: var(--slate-500);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--slate-500); }
.breadcrumb a:hover { color: var(--emerald-600); }
.breadcrumb-sep { color: var(--slate-300); }
.breadcrumb-current { color: var(--slate-700); font-weight: 500; }

/* ─── SECTION HEADINGS ───────────────────────────────────────── */
.section-header { margin-bottom: var(--space-10); }
.section-header.center { text-align: center; }
.section-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--emerald-600);
  margin-bottom: var(--space-3);
}
.section-header h2 { margin-bottom: var(--space-3); }
.section-header p { font-size: 1.05rem; color: var(--slate-600); max-width: 620px; }
.section-header.center p { margin: 0 auto; }

/* ─── CALLOUT BOXES ──────────────────────────────────────────── */
.callout {
  border-radius: var(--radius);
  padding: var(--space-5) var(--space-6);
  margin: var(--space-6) 0;
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}
.callout-icon { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; }
.callout-body p { margin-bottom: 0; font-size: 0.94rem; }
.callout-body strong { display: block; margin-bottom: var(--space-1); }
.callout-info { background: #eff6ff; border: 1px solid #bfdbfe; }
.callout-info .callout-icon path { fill: #3b82f6; }
.callout-info strong { color: #1d4ed8; }
.callout-info p { color: #1e40af; }
.callout-warning { background: #fffbeb; border: 1px solid #fde68a; }
.callout-warning .callout-icon path { fill: #d97706; }
.callout-warning strong { color: #92400e; }
.callout-warning p { color: #78350f; }
.callout-danger { background: #fef2f2; border: 1px solid #fecaca; }
.callout-danger .callout-icon path { fill: #ef4444; }
.callout-danger strong { color: #991b1b; }
.callout-danger p { color: #7f1d1d; }
.callout-success { background: var(--emerald-50); border: 1px solid var(--emerald-100); }
.callout-success .callout-icon path { fill: var(--emerald-600); }
.callout-success strong { color: var(--emerald-800); }
.callout-success p { color: var(--emerald-700); }

/* ─── PROS/CONS ──────────────────────────────────────────────── */
.pros-cons-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.pros-box, .cons-box { border-radius: var(--radius); padding: var(--space-6); }
.pros-box { background: var(--emerald-50); border: 1px solid var(--emerald-100); }
.cons-box { background: #fef2f2; border: 1px solid #fecaca; }
.pros-cons-title { font-family: var(--font-head); font-weight: 700; font-size: 1rem; margin-bottom: var(--space-4); display: flex; align-items: center; gap: var(--space-2); }
.pros-box .pros-cons-title { color: var(--emerald-800); }
.cons-box .pros-cons-title { color: #991b1b; }
.pros-cons-list { display: flex; flex-direction: column; gap: var(--space-3); list-style: none; padding: 0; }
.pros-cons-list li { display: flex; align-items: flex-start; gap: var(--space-3); font-size: 0.92rem; }
.pros-icon { color: var(--emerald-600); flex-shrink: 0; margin-top: 2px; }
.cons-icon { color: #ef4444; flex-shrink: 0; margin-top: 2px; }
.pros-cons-list li span { color: var(--slate-700); line-height: 1.5; }

/* ─── ACCORDION / FAQ ─────────────────────────────────────────── */
.accordion { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--color-border); }
.accordion-item { border-bottom: 1px solid var(--color-border); }
.accordion-item:last-child { border-bottom: none; }
.accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  background: white;
  text-align: left;
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--slate-800);
  transition: all var(--transition);
  gap: var(--space-4);
}
.accordion-btn:hover { background: var(--slate-50); color: var(--emerald-700); }
.accordion-btn.open { color: var(--emerald-700); background: var(--emerald-50); }
.accordion-chevron {
  width: 20px; height: 20px;
  flex-shrink: 0;
  transition: transform var(--transition-slow);
  color: var(--slate-400);
}
.accordion-btn.open .accordion-chevron { transform: rotate(180deg); color: var(--emerald-600); }
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 400ms cubic-bezier(0.4, 0, 0.2, 1);
}
.accordion-panel-inner {
  padding: var(--space-5) var(--space-6) var(--space-6);
  border-top: 1px solid var(--color-border);
  background: var(--slate-50);
  font-size: 0.94rem;
  color: var(--slate-700);
  line-height: 1.7;
}
.accordion-panel-inner p { margin-bottom: var(--space-3); }
.accordion-panel-inner p:last-child { margin-bottom: 0; }

/* ─── TABLES ──────────────────────────────────────────────────── */
.table-wrap { width: 100%; overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--color-border); margin: var(--space-6) 0; }
table { width: 100%; min-width: 500px; background: white; }
thead { background: var(--slate-900); }
thead th { color: white; font-family: var(--font-head); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; padding: var(--space-4) var(--space-5); text-align: left; white-space: nowrap; }
tbody tr { border-bottom: 1px solid var(--color-border); transition: background var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--slate-50); }
tbody td { padding: var(--space-4) var(--space-5); font-size: 0.9rem; color: var(--slate-700); vertical-align: middle; }
tbody td:first-child { font-weight: 500; color: var(--slate-900); }
.table-check { color: var(--emerald-600); }
.table-cross { color: #ef4444; }
.table-partial { color: var(--orange-500); }

/* ─── VERDICT / SCORE BOX ────────────────────────────────────── */
.verdict-box {
  background: var(--slate-900);
  color: white;
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  margin: var(--space-8) 0;
}
.verdict-score { display: flex; align-items: center; gap: var(--space-8); }
.score-ring { position: relative; width: 100px; height: 100px; flex-shrink: 0; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring-bg { fill: none; stroke: rgba(255,255,255,0.1); stroke-width: 8; }
.score-ring-fill { fill: none; stroke: var(--emerald-500); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.score-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: white; }
.verdict-details h3 { color: white; margin-bottom: var(--space-2); font-size: 1.2rem; }
.verdict-details p { color: var(--slate-400); font-size: 0.92rem; margin-bottom: 0; }
.verdict-tag { display: inline-block; background: var(--emerald-500); color: white; font-size: 0.72rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-3); }

/* ─── STEP GUIDE ─────────────────────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: var(--space-5); padding: var(--space-6) 0; border-bottom: 1px solid var(--color-border); }
.step:last-child { border-bottom: none; }
.step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--emerald-600);
  color: white;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(5,150,105,0.25);
}
.step-content h4 { margin-bottom: var(--space-2); font-size: 1rem; }
.step-content p { font-size: 0.9rem; color: var(--slate-600); margin-bottom: 0; }

/* ─── RELATED ARTICLES ───────────────────────────────────────── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-5);
}
.related-card {
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: all var(--transition-slow);
  background: white;
}
.related-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.related-card-img { width: 100%; height: 160px; object-fit: cover; }
.related-card-body { padding: var(--space-5); }
.related-card-cat { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--emerald-600); margin-bottom: var(--space-2); }
.related-card h4 { font-size: 0.97rem; line-height: 1.4; margin-bottom: var(--space-2); color: var(--slate-900); }
.related-card h4:hover { color: var(--emerald-600); }
.related-card-meta { font-size: 0.78rem; color: var(--slate-400); }

/* ─── ADSENSE PLACEHOLDERS ───────────────────────────────────── */
.ad-slot {
  min-height: 90px;
  background: var(--slate-50);
  border: 1px dashed var(--slate-200);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-8) 0;
  position: relative;
}
.ad-slot::before {
  content: 'Advertisement';
  position: absolute;
  top: -9px;
  background: var(--slate-50);
  padding: 0 var(--space-2);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-400);
  font-weight: 600;
}
.ad-slot-banner { min-height: 90px; }
.ad-slot-rectangle { min-height: 250px; }
.ad-slot-sidebar { min-height: 280px; }

/* ─── SEARCH OVERLAY ─────────────────────────────────────────── */
#search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-slow);
}
#search-overlay.open { opacity: 1; visibility: visible; }
.search-box {
  width: 100%;
  max-width: 640px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: scale(0.96) translateY(-10px);
  transition: transform var(--transition-slow);
}
#search-overlay.open .search-box { transform: scale(1) translateY(0); }
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}
.search-input-wrap svg { width: 20px; height: 20px; color: var(--slate-400); flex-shrink: 0; }
#search-input {
  flex: 1;
  font-size: 1.05rem;
  border: none;
  outline: none;
  color: var(--slate-900);
  background: transparent;
}
#search-input::placeholder { color: var(--slate-400); }
.search-kbd {
  font-size: 0.72rem;
  color: var(--slate-400);
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
}
.search-results { padding: var(--space-4); max-height: 400px; overflow-y: auto; }
.search-result-item { padding: var(--space-4); border-radius: var(--radius-sm); cursor: pointer; transition: background var(--transition); }
.search-result-item:hover { background: var(--slate-50); }
.search-result-item h4 { font-size: 0.92rem; color: var(--slate-900); margin-bottom: 4px; }
.search-result-item p { font-size: 0.8rem; color: var(--slate-500); margin: 0; }

/* ─── BACK TO TOP ─────────────────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  width: 44px; height: 44px;
  background: var(--emerald-600);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(5,150,105,0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all var(--transition-slow);
  z-index: 500;
}
#back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
#back-to-top:hover { background: var(--emerald-700); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(5,150,105,0.4); }
#back-to-top svg { width: 20px; height: 20px; }

/* ─── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--slate-900);
  color: var(--slate-400);
  padding: var(--space-16) 0 var(--space-8);
  margin-top: var(--space-24);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}
.footer-brand-desc { font-size: 0.88rem; color: var(--slate-500); margin-top: var(--space-4); line-height: 1.65; }
.footer-col-title { font-family: var(--font-head); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--slate-300); margin-bottom: var(--space-5); }
.footer-links { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-links a { font-size: 0.88rem; color: var(--slate-500); transition: color var(--transition); }
.footer-links a:hover { color: var(--emerald-400); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.06); padding-top: var(--space-8); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); }
.footer-bottom-links { display: flex; gap: var(--space-5); }
.footer-bottom-links a { font-size: 0.8rem; color: var(--slate-600); }
.footer-bottom-links a:hover { color: var(--slate-300); }
.footer-bottom p { font-size: 0.8rem; color: var(--slate-600); margin: 0; }
.footer-logo { display: flex; align-items: center; gap: var(--space-3); }
.footer-logo-mark { width: 32px; height: 32px; background: var(--emerald-600); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.footer-logo-mark svg { width: 18px; height: 18px; fill: white; }
.footer-logo-text { font-family: var(--font-head); font-size: 1.15rem; font-weight: 800; color: white; letter-spacing: -0.03em; }

/* ─── POLICY PAGES ───────────────────────────────────────────── */
.policy-content { max-width: var(--content-w); margin: 0 auto; }
.policy-content h2 { margin-top: var(--space-10); margin-bottom: var(--space-4); font-size: 1.4rem; }
.policy-content h3 { margin-top: var(--space-8); margin-bottom: var(--space-3); font-size: 1.15rem; }
.policy-content p, .policy-content li { color: var(--slate-700); line-height: 1.75; margin-bottom: var(--space-4); }
.policy-content ul, .policy-content ol { padding-left: var(--space-6); list-style: initial; margin-bottom: var(--space-5); }
.policy-content ol { list-style: decimal; }
.policy-updated { font-size: 0.85rem; color: var(--slate-500); background: var(--slate-50); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: var(--space-3) var(--space-5); margin-bottom: var(--space-8); display: inline-flex; align-items: center; gap: var(--space-2); }

/* ─── COMPARISON TABLE STYLE ─────────────────────────────────── */
.compare-header { background: var(--slate-900); }
.compare-header td:first-child { background: var(--slate-800); }
.compare-col-highlight { background: rgba(5,150,105,0.05); }
.compare-col-highlight td:nth-child(2) { background: rgba(5,150,105,0.04); border-left: 2px solid var(--emerald-200); border-right: 2px solid var(--emerald-200); }

/* ─── 404 PAGE ───────────────────────────────────────────────── */
.error-page { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.error-code { font-family: var(--font-head); font-size: 8rem; font-weight: 900; color: var(--slate-100); line-height: 1; }
.error-title { font-size: 1.8rem; font-weight: 700; color: var(--slate-900); margin: var(--space-4) 0 var(--space-3); }
.error-desc { color: var(--slate-600); font-size: 1rem; max-width: 400px; margin: 0 auto var(--space-8); }

/* ─── AUTHOR PAGE ─────────────────────────────────────────────── */
.author-hero { background: var(--slate-50); border-bottom: 1px solid var(--color-border); padding: var(--space-16) 0; }
.author-profile { display: flex; gap: var(--space-10); align-items: flex-start; }
.author-photo-wrap { flex-shrink: 0; }
.author-photo {
  width: 140px; height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: var(--shadow-md);
}
.author-photo-fallback {
  width: 140px; height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-size: 3rem;
  font-weight: 800;
  color: white;
  border: 4px solid white;
  box-shadow: var(--shadow-md);
}
.author-creds { display: flex; gap: var(--space-3); flex-wrap: wrap; margin: var(--space-4) 0; }
.author-stats { display: flex; gap: var(--space-6); margin-top: var(--space-5); }
.author-stat-num { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; color: var(--emerald-600); }
.author-stat-label { font-size: 0.78rem; color: var(--slate-500); }

/* ─── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--space-10); }
  .hero-image-wrap { max-width: 560px; margin: 0 auto; }
  .article-layout { grid-template-columns: 1fr; }
  .toc-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .author-profile { flex-direction: column; gap: var(--space-6); }
}
@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .menu-btn { display: flex; }
  .main-nav, .header-actions .btn { display: none; }
  .hero { padding: var(--space-12) 0 var(--space-10); }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .pros-cons-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-bottom-links { justify-content: center; }
  .hero-image-badge { display: none; }
  .overview-stat { min-width: 110px; }
  .feature-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .mobile-nav { display: flex; }
}
@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }
  .verdict-score { flex-direction: column; align-items: flex-start; }
  #back-to-top { bottom: var(--space-5); right: var(--space-5); }
}
@media print {
  .site-header, .site-footer, .toc-sidebar, #back-to-top, .ad-slot { display: none !important; }
  .article-layout { grid-template-columns: 1fr; }
}
