/* ============================================================
   post.css — navtutorial.com article-template styles
   Externalised from post.php's inline <style> for cross-page caching.
   Loads after style-core.css / style-shared.css (cascade preserved).
   ============================================================ */

/* ═══════════════════════════════════════════════════════════
   HARD RESET — ZERO ANIMATIONS, ZERO TRANSITIONS, ZERO MOVEMENT
═══════════════════════════════════════════════════════════ */
*, *::before, *::after {
  transition: none !important;
  animation: none !important;
  animation-duration: 0s !important;
  animation-delay: 0s !important;
  transition-duration: 0s !important;
  transition-delay: 0s !important;
}
/* Kill every movement on EVERY interaction state — no exceptions */
*:hover, *:focus, *:active, *:focus-visible, *:focus-within {
  transform: none !important;
  translate: none !important;
  scale: none !important;
  rotate: none !important;
  outline-offset: 2px !important;
}
/* Belt-and-braces: specific offenders that browsers may override */
a:hover, button:hover, input:hover, [role="button"]:hover,
.shr-btn:hover, .sb-nav-btn:hover, .sb-lesson:hover,
.lesson-nav-btn:hover, .toc-link:hover,
.wa-main-btn:hover, .wa-placement-btn:hover,
.udemy-cta-btn:hover, .udemy-sidebar-btn:hover,
.post-tag:hover, .related-card:hover, .mc-btn:hover,
.back-to-top:hover, .sticky-wa-btn:hover, .sh-btn:hover {
  transform: none !important;
  translate: none !important;
  scale: none !important;
  box-shadow: inherit !important;
}
#read-progress { display: none !important; }

/* ════════════════════════════════════════════════════════════
   PAGE LAYOUT
════════════════════════════════════════════════════════════ */
.post-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 880px) minmax(0, 1fr);
  grid-template-areas: "leftad main rightad";
  gap: 24px;
  max-width: 1600px;
  margin: 0 auto;
  min-height: 100vh;
  align-items: start;
}
/* Content keeps its comfortable width; rails flex to fill the sides (ad capped at 300px, centered) */
.post-rail { grid-area: leftad; align-self: start; min-width: 0; padding-top: 20px; }
.post-rail-right { grid-area: rightad; }
.post-rail .rail-sticky { position: sticky; top: 20px; max-width: 300px; margin: 0 auto; }
.rail-ad { min-height: 600px; text-align: center; }
.rail-ad ins { display: block; }
.rail-label { display: block; font-size: 9px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: #94a3b8; margin-bottom: 6px; }

/* ════════════════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════════════════ */
.lesson-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 320px; height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f1f4f9;
  border-right: 1px solid #d8e0ec;
  overflow: hidden;
  z-index: 9994;
  transform: translateX(-100%);
  transition: transform .25s ease;
  box-shadow: 4px 0 32px rgba(0,0,0,.18);
}
.lesson-sidebar.mobile-open, .lesson-sidebar.open { transform: none; }

/* ── Sidebar Header ── */
.sb-header {
  padding: 16px 14px 12px;
  border-bottom: 1px solid #d8e0ec;
  flex-shrink: 0;
  background: #e8edf6;
}
.sb-course-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 12px;
}
.sb-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #eef0ff, #dde1ff);
  border: 1px solid #b8c0f0;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.sb-course-name {
  font-size: 13px; font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}
.sb-course-sub {
  font-size: 10.5px;
  color: #475569;
  margin-top: 2px;
  font-weight: 600;
}
.sb-progress-row {
  display: flex; align-items: center; gap: 8px;
}
.sb-progress-track {
  flex: 1; height: 5px;
  background: #c8d2e4;
  border-radius: 99px; overflow: hidden;
}
.sb-progress-fill {
  height: 100%;
  background: #4f46e5;
  border-radius: 99px;
}
.sb-progress-label {
  font-size: 10px; font-weight: 800;
  color: #4f46e5;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
}

/* ── Sidebar Search ── */
.sb-search {
  padding: 8px 10px;
  border-bottom: 1px solid #d8e0ec;
  flex-shrink: 0;
  background: #e8edf6;
}
.sb-search-inner {
  position: relative;
}
.sb-search-icon {
  position: absolute; left: 9px; top: 50%;
  transform: translateY(-50%) !important;
  width: 13px; height: 13px;
  color: #64748b; pointer-events: none; flex-shrink: 0;
}
.sb-search input {
  width: 100%; height: 30px;
  border: 1px solid #c0ccde;
  border-radius: 7px;
  padding: 0 9px 0 28px;
  font-size: 11.5px;
  font-weight: 500;
  background: #fff;
  color: #1e293b;
  outline: none;
}
.sb-search input:focus { border-color: #6366f1; }
.sb-search input::placeholder { color: #94a3b8; }

/* ── Section labels ── */
.sb-section-label {
  padding: 9px 12px 3px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #64748b;
  flex-shrink: 0;
}

/* ── Lesson list ── */
.sb-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 7px 8px;
  scrollbar-width: thin;
  scrollbar-color: #c0ccde transparent;
}
.sb-list::-webkit-scrollbar { width: 3px; }
.sb-list::-webkit-scrollbar-track { background: transparent; }
.sb-list::-webkit-scrollbar-thumb { background: #c0ccde; border-radius: 3px; }

.sb-divider {
  height: 1px;
  background: #d0d8e8;
  margin: 5px 0;
}

.sb-lesson {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  text-decoration: none;
  position: relative;
}
.sb-lesson:hover { background: #dde4f0 !important; }
.sb-lesson.is-active { background: #e0e4ff !important; }
.sb-lesson.sb-hidden { display: none; }

/* Lesson number */
.sb-lesson-num {
  font-size: 10px; font-weight: 700;
  color: #94a3b8;
  width: 16px; text-align: right;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}
.sb-lesson.is-active .sb-lesson-num { color: #4f46e5; }
.sb-lesson.is-done   .sb-lesson-num { color: #64748b; }

/* Status circle */
.sb-status {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid #b8c8da;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 8px;
  color: transparent;
}
.sb-lesson.is-done .sb-status {
  background: #f0fdf4; border-color: #86efac; color: #16a34a;
}
.sb-lesson.is-active .sb-status {
  background: #eef0ff; border-color: #a5b4fc; color: #4f46e5;
}

/* Lesson title — dark bold */
.sb-lesson-title {
  flex: 1; min-width: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-lesson.is-done   .sb-lesson-title { color: #334155; font-weight: 700; }
.sb-lesson.is-active .sb-lesson-title { color: #3730a3; font-weight: 800; }
.sb-lesson:hover     .sb-lesson-title { color: #0f172a !important; }
.sb-lesson.is-active:hover .sb-lesson-title { color: #3730a3 !important; }

/* Difficulty dot */
.sb-diff-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sb-diff-dot.beginner     { background: #22c55e; }
.sb-diff-dot.intermediate { background: #f59e0b; }
.sb-diff-dot.advanced     { background: #ef4444; }
.sb-diff-dot.unknown      { background: #94a3b8; }

/* Estimated time */
.sb-lesson-time {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}
.sb-lesson.is-active .sb-lesson-time { color: #4f46e5; }

/* ── Sidebar Footer ── */
.sb-footer {
  padding: 9px 9px 11px;
  border-top: 1px solid #d8e0ec;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #e8edf6;
}
.sb-nav-btn {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 8px 0;
  border-radius: 8px;
  border: 1px solid #c0ccde;
  background: #ffffff;
  font-size: 11.5px; font-weight: 700;
  color: #334155;
  text-decoration: none;
  cursor: pointer;
}
.sb-nav-btn:hover { background: #dde4f0 !important; border-color: #9da8c8 !important; color: #1e293b !important; }
.sb-nav-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.sb-nav-btn.next {
  background: #eef0ff;
  border-color: #a5b4fc;
  color: #3730a3;
}
.sb-nav-btn.next:hover { background: #e0e4ff !important; border-color: #818cf8 !important; color: #1e1b8e !important; }
.sb-nav-btn.disabled { opacity: .35; pointer-events: none; }

/* ── Mobile toggle ── */
.sb-mobile-btn {
  display: flex;
  position: fixed; bottom: 80px; left: 14px; z-index: 9996;
  align-items: center; gap: 6px;
  background: #4f46e5; color: #fff;
  border: none; border-radius: 11px;
  padding: 9px 15px;
  font-size: 12.5px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(79,70,229,.4);
}
.sb-mobile-btn svg { width: 14px; height: 14px; }
.sb-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 9993;
  background: rgba(15,23,42,.45);
}
.sb-overlay.open { display: block; }

/* ── Mark as Complete sticky button ── */
#mark-complete-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9989;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  padding: 10px 20px;
  align-items: center; justify-content: center; gap: 14px;
  box-shadow: 0 -4px 20px rgba(6,16,31,.08);
}
#mark-complete-bar.show { display: flex; }
#mark-complete-bar .mc-text {
  font-size: 13px; font-weight: 600; color: #334155;
}
#mark-complete-bar .mc-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: #4f46e5; color: #fff;
  border: none; border-radius: 10px;
  padding: 10px 22px; font-size: 13px; font-weight: 800;
  cursor: pointer;
}
#mark-complete-bar .mc-btn svg { width: 15px; height: 15px; }
#mark-complete-bar .mc-btn.done { background: #16a34a; }
#mark-complete-bar .mc-dismiss {
  background: none; border: none; cursor: pointer;
  font-size: 18px; color: #94a3b8; padding: 0 4px;
}

/* ════════════════════════════════════════════════════════════
   MAIN CONTENT AREA
════════════════════════════════════════════════════════════ */
.post-main-area { grid-area: main; min-width: 0; }

/* ════════════════════════════════════════════════════════════
   HERO
════════════════════════════════════════════════════════════ */
.post-hero {
  background: #f1f4f9;
  position: relative; overflow: hidden;
  padding: 48px 0 40px;
  border-bottom: 1px solid #d8e0ec;
}
.post-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 80% at 50% -10%, rgba(99,102,241,.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 0% 100%, rgba(139,92,246,.04) 0%, transparent 55%);
}
.post-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(99,102,241,.07) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 100% 100% at 50% 0%, black 0%, transparent 80%);
}
.ph-top-line {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed, #db2777, #0891b2);
}
.ph-inner {
  position: relative; z-index: 2;
  max-width: 860px; margin: 0 auto; padding: 0 28px;
}

/* Lesson pill */
.ph-lesson-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: #eef0ff; border: 1px solid #a5b4fc;
  border-radius: 100px; padding: 4px 12px;
  font-size: 11px; font-weight: 800; color: #3730a3;
  margin-bottom: 12px;
}
.ph-lesson-pill svg { width: 11px; height: 11px; }

/* Breadcrumb */
.ph-breadcrumb {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: 12px; font-weight: 600; color: #64748b;
}
.ph-breadcrumb a { color: #4f46e5; text-decoration: none; font-weight: 700; }
.ph-breadcrumb a:hover { color: #3730a3 !important; text-decoration: underline; }
.ph-breadcrumb .sep { color: #94a3b8; }
.ph-breadcrumb .cur { color: #334155; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Hero badge row — category + difficulty inline chip */
.ph-badges {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.ph-cat {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 100px;
  background: #eef0ff; border: 1px solid #a5b4fc;
  font-size: 11px; font-weight: 800; color: #3730a3;
  text-transform: uppercase; letter-spacing: .6px; text-decoration: none;
}
.ph-cat:hover { background: #e0e4ff !important; }

/* Inline difficulty chip — sits next to category in the badges row */
.ph-diff-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 100px;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px;
}
.ph-diff-chip .diff-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.ph-diff-chip.beginner {
  background: #f0fdf4; border: 1px solid #86efac; color: #15803d;
}
.ph-diff-chip.beginner .diff-dot { background: #22c55e; }
.ph-diff-chip.intermediate {
  background: #fffbeb; border: 1px solid #fcd34d; color: #b45309;
}
.ph-diff-chip.intermediate .diff-dot { background: #f59e0b; }
.ph-diff-chip.advanced {
  background: #fff1f2; border: 1px solid #fca5a5; color: #b91c1c;
}
.ph-diff-chip.advanced .diff-dot { background: #ef4444; }

/* Title */
.ph-title {
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 900; line-height: 1.08; letter-spacing: -1.5px;
  color: #0f172a; margin-bottom: 12px;
}
.ph-excerpt {
  font-size: 15.5px; color: #475569; line-height: 1.75;
  max-width: 660px; margin-bottom: 22px;
  font-weight: 500;
}

/* Meta pill strip */
.ph-meta {
  display: inline-flex; align-items: center; flex-wrap: wrap;
  background: #ffffff;
  border: 1px solid #c8d4e8;
  border-radius: 100px; overflow: hidden;
  box-shadow: 0 1px 6px rgba(15,23,42,.06);
}
.ph-meta-item {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px;
  font-size: 12px; font-weight: 600; color: #334155;
  border-right: 1px solid #d8e4f0; white-space: nowrap;
}
.ph-meta-item:last-child { border-right: none; }
.ph-meta-item svg { width: 12px; height: 12px; color: #4f46e5; flex-shrink: 0; }
.ph-meta-item strong { color: #0f172a; font-weight: 800; }

/* ── Ad slots ── */
.ad-strip {
  background: var(--bg-alt, #edf1f8);
  border-top: 1px solid var(--hr, #d8e0ec);
  border-bottom: 1px solid var(--hr, #d8e0ec);
  padding: 14px 0; text-align: center;
}
.ad-label {
  display: block; font-size: 9px; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: #94a3b8; margin-bottom: 6px;
}
.ad-in-content {
  margin: 44px 0; padding: 8px 0; text-align: center;
}
.ad-post-article {
  margin: 0 0 24px; padding: 8px 0; text-align: center;
}

/* ════════════════════════════════════════════════════════════
   WHATSAPP PLACEMENT BUTTON
════════════════════════════════════════════════════════════ */
.wa-placement-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 18px; overflow: hidden; margin-bottom: 16px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.05);
}
.wa-placement-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #25d366, #4f46e5, #7c3aed);
}
.wa-placement-inner {
  padding: 24px 28px;
  display: flex; align-items: center; gap: 20px;
}
.wa-placement-icon {
  width: 56px; height: 56px; border-radius: 16px; flex-shrink: 0;
  background: linear-gradient(135deg, #25d366, #1a9e56);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  box-shadow: 0 6px 20px rgba(37,211,102,.35);
  position: relative;
}
.wa-placement-icon::after {
  content: '🎯';
  position: absolute; bottom: -4px; right: -4px;
  width: 20px; height: 20px;
  background: #4f46e5; border-radius: 6px;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}
.wa-placement-text { flex: 1; min-width: 0; }
.wa-placement-eyebrow {
  font-size: 10px; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase; color: #a5b4fc; margin-bottom: 5px;
}
.wa-placement-title {
  font-size: 18px; font-weight: 900; color: #fff;
  letter-spacing: -.3px; line-height: 1.2; margin-bottom: 6px;
}
.wa-placement-desc {
  font-size: 13px; color: rgba(255,255,255,.55); line-height: 1.55;
  margin-bottom: 16px;
}
.wa-placement-perks {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px;
}
.wa-placement-perk {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 100px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  font-size: 11px; font-weight: 600; color: rgba(255,255,255,.7);
}
.wa-placement-perk svg { width: 11px; height: 11px; color: #4ade80; flex-shrink: 0; }
.wa-placement-btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: linear-gradient(135deg, #25d366, #1a9e56);
  color: #fff; font-size: 14px; font-weight: 900;
  padding: 13px 26px; border-radius: 12px; border: none;
  cursor: pointer; text-decoration: none;
  box-shadow: 0 6px 20px rgba(37,211,102,.4);
  white-space: nowrap;
}
.wa-placement-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.wa-placement-btn:hover { background: #1a9e56 !important; }
.wa-placement-note {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; font-size: 11px; color: rgba(255,255,255,.35);
}
.wa-placement-note svg { width: 11px; height: 11px; color: #4ade80; flex-shrink: 0; }

/* ════════════════════════════════════════════════════════════
   UDEMY AFFILIATE BANNER
════════════════════════════════════════════════════════════ */
.udemy-banner {
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 16px; overflow: hidden; margin-bottom: 16px;
  box-shadow: 0 2px 16px rgba(6,16,31,.06);
  position: relative;
}
.udemy-banner::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #a435f0, #ec4899);
}
.udemy-inner {
  padding: 20px 24px;
  display: flex; align-items: center; gap: 18px;
}
.udemy-logo-wrap {
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #a435f0, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 16px rgba(164,53,240,.25);
}
.udemy-text { flex: 1; min-width: 0; }
.udemy-eyebrow {
  font-size: 9.5px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: #a435f0; margin-bottom: 4px;
}
.udemy-title {
  font-size: 15px; font-weight: 800; color: #0f172a;
  line-height: 1.3; margin-bottom: 5px;
}
.udemy-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.udemy-stars { color: #f59e0b; font-size: 12px; letter-spacing: 1px; }
.udemy-rating { font-size: 11.5px; font-weight: 700; color: #0f172a; }
.udemy-students { font-size: 11px; color: #64748b; }
.udemy-price-row { display: flex; align-items: center; gap: 10px; }
.udemy-price-sale {
  font-size: 20px; font-weight: 900; color: #0f172a;
}
.udemy-price-orig {
  font-size: 13px; color: #94a3b8; text-decoration: line-through;
}
.udemy-discount {
  font-size: 11px; font-weight: 800; color: #16a34a;
  background: #f0fdf4; border: 1px solid #86efac;
  padding: 2px 8px; border-radius: 100px;
}
.udemy-cta-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: #a435f0; color: #fff;
  padding: 10px 18px; border-radius: 10px; border: none;
  font-size: 12.5px; font-weight: 800; text-decoration: none;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(164,53,240,.3);
}
.udemy-cta-btn:hover { background: #8b2fd1 !important; }
.udemy-cta-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.udemy-disclaimer {
  padding: 8px 24px;
  font-size: 10px; color: #94a3b8;
  border-top: 1px solid #f1f5f9;
  display: flex; align-items: center; gap: 5px;
}
.udemy-disclaimer svg { width: 10px; height: 10px; flex-shrink: 0; }

/* Compact Udemy strip for sidebar */
.udemy-sidebar-strip {
  margin: 10px 8px;
  background: linear-gradient(135deg, #fdf4ff, #f5f0ff);
  border: 1px solid #ddd6fe;
  border-radius: 12px; overflow: hidden;
}
.udemy-sidebar-inner {
  padding: 12px 12px 10px;
}
.udemy-sidebar-label {
  font-size: 8.5px; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: #a435f0; margin-bottom: 6px;
}
.udemy-sidebar-title {
  font-size: 11.5px; font-weight: 700; color: #1e1b4b;
  line-height: 1.3; margin-bottom: 8px;
}
.udemy-sidebar-btn {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  background: #a435f0; color: #fff;
  padding: 7px 12px; border-radius: 8px;
  font-size: 11px; font-weight: 800; text-decoration: none;
  width: 100%;
}
.udemy-sidebar-btn:hover { background: #8b2fd1 !important; }
.udemy-sidebar-btn svg { width: 11px; height: 11px; flex-shrink: 0; }

/* ── AdSense in-content 3 ── */
.ad-in-content-3 {
  margin: 44px 0; padding: 8px 0; text-align: center;
}

/* ── Sidebar AdSense box ── */
.sb-ad-box {
  margin: 8px 8px 0; padding: 4px;
  text-align: center; flex-shrink: 0;
}
.sb-ad-label {
  font-size: 8px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: #94a3b8; display: block; margin-bottom: 5px;
}

/* ── Cover image (framed, full — no crop for 1200×630 cards) ── */
.post-cover {
  max-width: 940px;
  margin: 0 auto;
  padding: 26px 20px 0;
}
.post-cover-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 1200 / 630;               /* matches generated covers exactly → zero crop */
  background: #0b1220;                     /* only shows if a non-16:8.4 image is letterboxed */
  border: 1px solid rgba(148,163,184,.20);
  box-shadow: 0 14px 40px rgba(2,8,23,.20), 0 3px 10px rgba(2,8,23,.12);
}
.post-cover-frame img {
  width: 100%; height: 100%;
  object-fit: cover;                        /* exact fit for 1200×630, graceful for photos */
  display: block;
}
.post-cover-frame::after {                  /* subtle inner ring for a premium edge */
  content: ""; position: absolute; inset: 0;
  border-radius: 16px; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
@media (max-width: 640px) {
  .post-cover { padding: 16px 14px 0; }
  .post-cover-frame { border-radius: 12px; }
}

/* ── Post outer / inner ── */
.post-outer { background: var(--bg, #f0f4f9); }
.post-inner { max-width: 860px; margin: 0 auto; padding: 0 20px 120px; }

/* ── Prev/Next nav ── */
.lesson-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 20px;
}
.lesson-nav-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-radius: 12px;
  background: #fff;
  border: 1px solid #d0daea;
  text-decoration: none; color: inherit;
  min-width: 0;
}
.lesson-nav-btn.next { justify-content: flex-end; text-align: right; }
.lesson-nav-btn:hover { border-color: #4f46e5 !important; background: #f5f5ff !important; }
.lnb-arrow {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  background: #eef0ff; border: 1px solid #c7d2fe;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #4f46e5;
}
.lnb-text { min-width: 0; }
.lnb-label { font-size: 10px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: .7px; display: block; margin-bottom: 2px; }
.lnb-title { font-size: 12.5px; font-weight: 700; color: #1e293b; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 200px; }

/* ── TOC ── */
.toc-box {
  background: #fff;
  border: 1px solid rgba(79,70,229,.18);
  border-left: 3px solid #4f46e5;
  border-radius: 0 12px 12px 0;
  padding: 16px 20px; margin-bottom: 36px;
}
.toc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.toc-head-left {
  display: flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.4px; color: #4f46e5;
}
.toc-toggle { background: #eef2ff; border: 1px solid #e0e7ff; cursor: pointer; font-size: 18px; font-weight: 800; color: #4f46e5; line-height: 1; width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; transition: all .15s ease; padding: 0; }
.toc-toggle:hover { background: #4f46e5; color: #fff; transform: scale(1.05); }
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.toc-list.hidden { display: none; }
.toc-link { display: block; font-size: 13px; font-weight: 600; color: #334155; padding: 5px 0; text-decoration: none; }
.toc-link:hover, .toc-link.active { color: #4f46e5 !important; }
.toc-link.active { font-weight: 800; }
.toc-lvl3 .toc-link { padding-left: 14px; font-size: 12.5px; color: #64748b; }
.toc-lvl4 .toc-link { padding-left: 26px; font-size: 12px; color: #94a3b8; }

/* ── Article card ── */
.post-card {
  background: #fff;
  border: 1px solid #d0daea;
  border-radius: 18px; overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 2px 16px rgba(6,16,31,.05);
}

/* ── Content typography ── */
.post-content-wrap { padding: 32px 40px 0; }
.post-content { font-size: 17px; line-height: 1.9; color: var(--mid, #3a4a62); }
.post-content h2 {
  font-size: clamp(19px, 2.2vw, 25px); font-weight: 900;
  color: var(--ink, #06101f); letter-spacing: -.4px; line-height: 1.2;
  margin: 58px 0 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--hr, #eef0f8); position: relative;
}
.post-content h2::after {
  content: ''; position: absolute; bottom: -1px; left: 0; width: 48px; height: 2px;
  background: linear-gradient(90deg, #4f46e5, #db2777); border-radius: 2px;
}
.post-content h3 {
  font-size: clamp(15px, 1.9vw, 20px); font-weight: 800;
  color: var(--ink2, #1a2a46); letter-spacing: -.2px; line-height: 1.3;
  margin: 38px 0 12px; display: flex; align-items: center; gap: 10px;
}
.post-content h3::before {
  content: ''; width: 4px; height: 18px; border-radius: 4px; flex-shrink: 0;
  background: linear-gradient(180deg, #4f46e5, #7c3aed);
}
.post-content h4 { font-size: 16px; font-weight: 800; color: var(--ink, #06101f); margin: 28px 0 10px; }
.post-content p { margin-bottom: 24px; }
.post-content a { color: #4f46e5; font-weight: 600; border-bottom: 1.5px solid rgba(79,70,229,.26); text-decoration: none; }
.post-content a:hover { color: #3730a3 !important; border-bottom-color: rgba(55,48,163,.4) !important; }
.post-content strong { font-weight: 800; color: var(--ink, #06101f); }
.post-content em { font-style: italic; color: var(--muted, #7c8fa6); }
.post-content img { border-radius: 12px; box-shadow: 0 8px 32px rgba(6,16,31,.09); margin: 28px auto; display: block; max-width: 100%; }
.post-content hr { border: none; border-top: 1px solid var(--hr, #eef0f8); margin: 40px 0; }
.post-content ul, .post-content ol { list-style: none; padding-left: 0; margin-bottom: 24px; }
.post-content ul li, .post-content ol li { position: relative; padding: 5px 0 5px 32px; color: var(--mid, #3a4a62); }
.post-content ul li::before {
  content: ''; position: absolute; left: 9px; top: 15px;
  width: 6px; height: 6px; border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.post-content ol { counter-reset: oc; }
.post-content ol li { counter-increment: oc; }
.post-content ol li::before {
  content: counter(oc); position: absolute; left: 0; top: 7px;
  width: 21px; height: 21px; border-radius: 6px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff; font-size: 10.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.post-content blockquote {
  border-left: none; margin: 32px 0; padding: 22px 26px;
  border-radius: 12px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(79,70,229,.06), rgba(124,58,237,.03));
  border: 1px solid rgba(79,70,229,.14);
  color: var(--mid, #3a4a62); font-style: italic; font-size: 16px; line-height: 1.75;
}
.post-content blockquote::before {
  content: '"'; position: absolute; top: -14px; left: 16px;
  font-size: 88px; line-height: 1; color: rgba(79,70,229,.1);
  font-style: normal; font-weight: 900;
}
.post-content table {
  width: 100%; border-collapse: collapse; margin: 28px 0;
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(6,16,31,.06), 0 0 0 1px #dde8f0;
}
.post-content thead th {
  background: linear-gradient(135deg, #3730a3, #4f46e5);
  color: #fff; padding: 12px 16px; font-size: 11px; font-weight: 800;
  letter-spacing: .4px; text-transform: uppercase; text-align: left;
}
.post-content tbody tr { border-bottom: 1px solid #eef4ff; }
.post-content tbody tr:hover { background: rgba(79,70,229,.025) !important; }
.post-content tbody td { padding: 12px 16px; font-size: 14px; color: var(--mid, #3a4a62); }
.post-content tbody tr:last-child { border-bottom: none; }
.post-content code:not(pre code) {
  font-family: 'JetBrains Mono', monospace; font-size: .83em;
  background: rgba(79,70,229,.07); border: 1px solid rgba(79,70,229,.16);
  color: #4f46e5; padding: 2px 6px; border-radius: 5px;
}
.code-block-wrap {
  position: relative; margin: 36px 0; border-radius: 12px; overflow: hidden;
  box-shadow: 0 8px 36px rgba(0,0,0,.18), 0 0 0 1px rgba(255,255,255,.04);
}
.code-block-header {
  display: flex; align-items: center; justify-content: space-between;
  background: #0d1117; padding: 0 14px; height: 36px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.code-lang-label {
  font-size: 10px; font-weight: 700; color: #7dd3fc;
  text-transform: uppercase; letter-spacing: 1.3px;
  display: flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
}
.code-lang-label::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #4f46e5; box-shadow: 0 0 8px rgba(79,70,229,.7); display: inline-block;
}
.code-copy-btn {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.35); padding: 3px 10px; border-radius: 5px;
  font-size: 10px; font-weight: 700; cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
}
.code-copy-btn:hover { background: rgba(79,70,229,.16) !important; color: #a5b4fc !important; border-color: rgba(79,70,229,.35) !important; }
.code-copy-btn.copied { background: rgba(16,185,129,.14) !important; color: #6ee7b7 !important; border-color: rgba(16,185,129,.3) !important; }
.post-content pre,
.post-content pre[class*="language-"] {
  background: #0d1117 !important; border: none !important; border-radius: 0 !important;
  padding: 20px 22px 18px !important; overflow-x: auto; margin: 0 !important;
  font-size: 13.5px !important; line-height: 1.8 !important; text-shadow: none !important;
}
.post-content pre code { background: none !important; border: none !important; color: inherit !important; padding: 0 !important; font-family: 'JetBrains Mono', monospace !important; }
.token.comment,.token.prolog,.token.doctype,.token.cdata{color:#586e96;font-style:italic}
.token.punctuation{color:#8899bb}
.token.property,.token.tag,.token.boolean,.token.number,.token.constant,.token.symbol{color:#fb923c}
.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin{color:#4ade80}
.token.operator,.token.entity,.token.url{color:#22d3ee}
.token.atrule,.token.attr-value,.token.keyword{color:#a78bfa}
.token.function,.token.class-name{color:#60a5fa}
.token.regex,.token.important,.token.variable{color:#fbbf24}

/* ── Author card ── */
/* ── Author card ── */
.author-card {
  padding: 0;
  border-top: 1px solid #d8e4f0;
  background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%);
  position: relative;
  overflow: hidden;
}
.author-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed, #db2777);
}
.author-card-inner {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 28px 30px 24px;
  position: relative; z-index: 1;
}
.author-avatar-wrap { flex-shrink: 0; position: relative; }
.author-avatar {
  width: 72px; height: 72px; border-radius: 18px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  box-shadow: 0 8px 24px rgba(79,70,229,.35);
  border: 3px solid #fff;
}
.author-avatar img {
  width: 72px; height: 72px; border-radius: 18px;
  object-fit: cover; display: block;
}
.author-verified {
  position: absolute; bottom: -5px; right: -5px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #4f46e5; border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #fff;
}
.author-body { flex: 1; min-width: 0; }
.author-eyebrow {
  font-size: 9.5px; font-weight: 800; letter-spacing: 1.4px;
  text-transform: uppercase; color: #6366f1; margin-bottom: 5px;
}
.author-name {
  font-size: 18px; font-weight: 900; color: #0f172a;
  letter-spacing: -.3px; margin-bottom: 3px;
  display: flex; align-items: center; gap: 8px;
}
.author-handle {
  font-size: 11.5px; font-weight: 600; color: #64748b;
  margin-bottom: 10px;
}
.author-handle a { color: #4f46e5; text-decoration: none; font-weight: 700; }
.author-handle a:hover { text-decoration: underline; }
.author-bio {
  font-size: 13.5px; color: #475569; line-height: 1.65;
  margin-bottom: 14px; max-width: 560px; font-weight: 500;
}
.author-stats {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.author-stat { text-align: center; }
.author-stat-n {
  font-size: 16px; font-weight: 900; color: #0f172a;
  font-family: 'JetBrains Mono', monospace; line-height: 1;
}
.author-stat-l {
  font-size: 10px; font-weight: 600; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .6px; margin-top: 2px;
}
.author-stat-div {
  width: 1px; height: 28px; background: #d8e4f0; flex-shrink: 0;
}
.author-socials { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.author-social-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 13px; border-radius: 9px;
  font-size: 11.5px; font-weight: 700; text-decoration: none;
  border: 1.5px solid transparent; white-space: nowrap;
}
.author-social-btn.linkedin { background: #eef6ff; border-color: #bfdbfe; color: #1d4ed8; }
.author-social-btn.github   { background: #f6f8fa; border-color: #d1d5db; color: #1f2937; }
.author-social-btn.twitter  { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.author-social-btn.website  { background: #fdf4ff; border-color: #e9d5ff; color: #7c3aed; }
.author-social-btn svg { width: 12px; height: 12px; flex-shrink: 0; }
.author-social-btn:hover { filter: brightness(.94); }
.author-meta-row { display: none; } /* hide old meta row */
.author-updated {
  font-size: 10.5px; font-weight: 700; color: #4f46e5;
  background: rgba(79,70,229,.08); border: 1px solid rgba(79,70,229,.18);
  padding: 3px 10px; border-radius: 100px; white-space: nowrap;
  display: inline-block; margin: 0 30px 16px;
}

/* Dark mode */
[data-theme="dark"] .author-card         { background: linear-gradient(135deg, #0d1526 0%, #0f1635 100%); }
[data-theme="dark"] .author-name         { color: #f0f6ff; }
[data-theme="dark"] .author-bio          { color: #64748b; }
[data-theme="dark"] .author-handle       { color: #475569; }
[data-theme="dark"] .author-stat-n       { color: #e2e8f0; }
[data-theme="dark"] .author-stat-div     { background: #1e293b; }
[data-theme="dark"] .author-social-btn.linkedin { background: rgba(29,78,216,.1); border-color: rgba(29,78,216,.3); }
[data-theme="dark"] .author-social-btn.github   { background: rgba(255,255,255,.04); border-color: #334155; color: #94a3b8; }
[data-theme="dark"] .author-social-btn.twitter  { background: rgba(22,163,74,.08); border-color: rgba(22,163,74,.25); }
[data-theme="dark"] .author-social-btn.website  { background: rgba(124,58,237,.08); border-color: rgba(124,58,237,.25); }
[data-theme="dark"] .author-updated      { background: rgba(79,70,229,.09); border-color: rgba(79,70,229,.2); }

@media (max-width: 600px) {
  .author-card-inner { flex-direction: column; align-items: center; text-align: center; padding: 24px 20px 20px; }
  .author-stats { justify-content: center; }
  .author-socials { justify-content: center; }
  .author-bio { text-align: left; }
}

/* ── Tags ── */
.post-tags {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 16px 26px; border-top: 1px solid #d8e4f0;
}
.tag-label { font-size: 10.5px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: .8px; }
.post-tag {
  padding: 3px 11px; border-radius: 100px;
  background: rgba(79,70,229,.07); border: 1px solid rgba(79,70,229,.18);
  color: #4f46e5; font-size: 11.5px; font-weight: 700; text-decoration: none;
}
.post-tag:hover { background: #4f46e5 !important; color: #fff !important; border-color: #4f46e5 !important; }

/* ── Share ── */
.share-section { padding: 22px 26px; border-top: 1px solid #d8e4f0; }
.share-heading {
  font-size: 13px; font-weight: 800; color: #0f172a;
  margin-bottom: 14px; display: flex; align-items: center; gap: 7px;
}
.share-heading small { font-size: 10.5px; font-weight: 600; color: #64748b; background: rgba(79,70,229,.07); border: 1px solid rgba(79,70,229,.15); padding: 2px 8px; border-radius: 100px; }
.share-btns { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.shr-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: 9px;
  font-size: 11.5px; font-weight: 700; cursor: pointer;
  border: 1.5px solid transparent;
  white-space: nowrap; font-family: inherit; text-decoration: none;
}
.shr-btn svg { width: 12px; height: 12px; flex-shrink: 0; }
.shr-btn:hover { filter: brightness(.92); }
.shr-btn.whatsapp { background: #25d366; color: #fff; }
.shr-btn.twitter  { background: #000; color: #fff; }
.shr-btn.linkedin { background: #0a66c2; color: #fff; }
.shr-btn.facebook { background: #1877f2; color: #fff; }
.shr-btn.reddit   { background: #ff4500; color: #fff; }
.shr-btn.telegram { background: #229ed9; color: #fff; }
.shr-btn.copy     { background: #fff; color: #334155; border-color: #c8d4e8; }
.shr-btn.copy:hover { border-color: #4f46e5 !important; color: #4f46e5 !important; }
.shr-btn.copy.copied { background: rgba(16,185,129,.07) !important; color: #059669 !important; border-color: rgba(16,185,129,.3) !important; }
.share-url-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share-url-box {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0;
  background: #f5f8ff; border: 1.5px solid #c8d4e8;
  border-radius: 9px; padding: 7px 12px; max-width: 440px;
}
.share-url-text { font-size: 11.5px; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; font-family: 'JetBrains Mono', monospace; }
.share-url-copy { background: none; border: none; cursor: pointer; font-size: 11px; font-weight: 700; color: #4f46e5; padding: 0; }
.share-print {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; color: #475569; cursor: pointer;
  background: #fff; border: 1.5px solid #c8d4e8;
  border-radius: 9px; padding: 7px 13px;
}
.share-print:hover { border-color: #4f46e5 !important; color: #4f46e5 !important; }

/* ── WhatsApp CTA ── */
.wa-cta-card {
  background: #fff; border: 1.5px solid #9FE1CB;
  border-radius: 16px; overflow: hidden; margin-bottom: 14px;
  box-shadow: 0 4px 20px rgba(29,158,117,.09);
  position: relative;
}
.wa-cta-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #25d366, #1D9E75);
}
.wa-cta-inner { padding: 22px 26px; display: flex; align-items: flex-start; gap: 18px; }
.wa-icon-wrap {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(135deg, #25d366, #1D9E75);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  box-shadow: 0 5px 16px rgba(37,211,102,.3);
}
.wa-text { flex: 1; min-width: 0; }
.wa-title { font-size: 16px; font-weight: 900; color: #06101f; margin-bottom: 6px; letter-spacing: -.2px; }
.wa-desc { font-size: 13.5px; color: #3a5a46; line-height: 1.6; margin-bottom: 16px; }
.wa-main-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #25d366, #1D9E75);
  color: #fff; font-size: 13.5px; font-weight: 800;
  padding: 11px 22px; border-radius: 11px; border: none; cursor: pointer;
  text-decoration: none; box-shadow: 0 4px 14px rgba(37,211,102,.3);
}
.wa-main-btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.wa-social-proof { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 11.5px; color: #3a7a56; font-weight: 600; }
.wa-avatars { display: flex; margin-right: 2px; }
.wa-avatars span {
  width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, #1D9E75, #25d366);
  border: 2px solid #fff; margin-right: -5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; color: #fff; font-weight: 700;
}

/* ── Related posts ── */
.related-box {
  background: #020817; border: 1px solid rgba(255,255,255,.05);
  border-radius: 18px; overflow: hidden; margin-bottom: 14px;
  box-shadow: 0 12px 48px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.04);
  position: relative;
}
.related-box::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 55% 45% at 85% 0%, rgba(79,70,229,.1) 0%, transparent 55%),
              radial-gradient(ellipse 45% 45% at 15% 100%, rgba(124,58,237,.07) 0%, transparent 55%);
}
.related-top-line { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg,#4f46e5,#7c3aed,#db2777); }
.related-head {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 12px;
  padding: 18px 24px; border-bottom: 1px solid rgba(255,255,255,.04);
}
.related-head-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg,#4f46e5,#7c3aed);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  box-shadow: 0 4px 14px rgba(79,70,229,.35);
}
.related-head-title { font-size: 13.5px; font-weight: 900; color: #fff; }
.related-head-sub { font-size: 11px; font-weight: 500; color: rgba(255,255,255,.24); margin-top: 2px; }
.related-head-badge {
  margin-left: auto; font-size: 10px; font-weight: 800; color: #a5b4fc;
  background: rgba(79,70,229,.13); border: 1px solid rgba(165,180,252,.2);
  padding: 3px 10px; border-radius: 100px;
}
.related-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; background: rgba(255,255,255,.04); }
.related-card {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 16px 20px; background: #020817; text-decoration: none;
}
.related-card:hover { background: rgba(79,70,229,.06) !important; }
.rthumb {
  width: 50px; height: 50px; border-radius: 10px; overflow: hidden; flex-shrink: 0;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
}
.rthumb img { width: 100%; height: 100%; object-fit: cover; }
.rno-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 20px; background: linear-gradient(135deg,rgba(79,70,229,.13),rgba(124,58,237,.08)); }
.rinfo { flex: 1; min-width: 0; }
.rmeta-row { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; flex-wrap: wrap; }
.rcat { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: #a5b4fc; }
.rbadge { font-size: 8.5px; font-weight: 700; padding: 1px 6px; border-radius: 100px; }
.rbadge-tag  { background: rgba(79,70,229,.16); color: #a5b4fc; border: 1px solid rgba(79,70,229,.26); }
.rbadge-cat  { background: rgba(6,182,212,.13);  color: #67e8f9; border: 1px solid rgba(6,182,212,.22); }
.rbadge-diff { background: rgba(245,158,11,.13);  color: #fcd34d; border: 1px solid rgba(245,158,11,.22); }
.rbadge-hot  { background: rgba(239,68,68,.13);   color: #fca5a5; border: 1px solid rgba(239,68,68,.22); }
.rtitle { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.6); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-card:hover .rtitle { color: #c7d2fe !important; }
.rstats { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.rdate, .rviews { font-size: 10px; color: rgba(255,255,255,.18); }
.rviews::before { content: '·'; margin-right: 7px; }
.rarrow {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.18); font-size: 13px; margin-top: 1px;
}
.related-card:hover .rarrow { background: rgba(79,70,229,.16) !important; border-color: rgba(165,180,252,.26) !important; color: #a5b4fc !important; }

/* ── Sticky bar ── */
#sticky-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9990;
  background: rgba(255,255,255,.97);
  border-top: 1px solid #d0daea;
  padding: 9px 18px;
  display: none; align-items: center; gap: 10px;
  box-shadow: 0 -4px 24px rgba(6,16,31,.08);
}
#sticky-bar.show { display: flex; }
.sticky-ad-zone { flex: 1; min-width: 0; text-align: center; }
.sticky-wa-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #25d366, #1D9E75);
  color: #fff; font-size: 12.5px; font-weight: 800;
  padding: 9px 18px; border-radius: 11px; border: none; cursor: pointer;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37,211,102,.3);
}
.sticky-wa-btn svg { width: 15px; height: 15px; }
.sticky-close {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: #f0f4fa; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #64748b;
}

/* ── Back to top ── */
#back-to-top {
  position: fixed; bottom: 74px; right: 22px; z-index: 9991;
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff; border: none; font-size: 16px; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(79,70,229,.4);
}
#back-to-top.show { display: flex; }

/* ── Language tab group ── */
.lang-tab-group { margin: 32px 0; }
.lang-tab-group .code-block-wrap { margin: 0 !important; border-radius: 0 0 12px 12px !important; }
.lang-tab-bar {
  display: flex; gap: 2px; background: #111827;
  border-radius: 12px 12px 0 0; padding: 8px 12px 0;
  border: 1px solid rgba(255,255,255,.05); border-bottom: none;
}
.lang-tab-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px;
  border-radius: 7px 7px 0 0; border: none;
  background: rgba(255,255,255,.04); color: rgba(255,255,255,.32);
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700;
  cursor: pointer; position: relative; bottom: -1px;
}
.lang-tab-btn:hover { background: rgba(255,255,255,.08) !important; color: rgba(255,255,255,.6) !important; }
.lang-tab-btn--active { background: #1a2235 !important; color: #7dd3fc !important; border: 1px solid rgba(255,255,255,.05); border-bottom: 1px solid #1a2235; }
.ltb-flag { font-size: 12px; line-height: 1; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */
/* Hide ad rails and go single-column before content gets cramped */
@media (max-width: 1280px) {
  .post-page-layout { grid-template-columns: 1fr; grid-template-areas: "main"; max-width: 920px; gap: 0; }
  .post-rail { display: none; }
}
@media (max-width: 600px) {
  .ph-title { letter-spacing: -1.2px; }
  .ph-meta { flex-wrap: wrap; border-radius: 12px; }
  .ph-meta-item { border-right: none; border-bottom: 1px solid #d8e4f0; padding: 8px 14px; }
  .post-content { font-size: 16px; }
  .post-content-wrap { padding: 22px 18px 0; }
  .author-card, .post-tags, .share-section { padding-left: 18px; padding-right: 18px; }
  .wa-cta-inner { flex-direction: column; gap: 12px; }
  .wa-icon-wrap { width: 42px; height: 42px; font-size: 20px; }
  .related-grid { grid-template-columns: 1fr; }
  .shr-btn { padding: 6px 10px; font-size: 11px; }
  .post-content pre { font-size: 12px !important; padding: 14px !important; }
  .lesson-nav { grid-template-columns: 1fr; }
  .lesson-nav-btn.next { justify-content: flex-start; text-align: left; }
  #mark-complete-bar { flex-wrap: wrap; gap: 8px; }
}

/* ════════════════════════════════════════════════════════════
   DARK MODE — sidebar + hero stay light/gray
════════════════════════════════════════════════════════════ */
[data-theme="dark"] .lesson-sidebar          { background: #f1f4f9; border-right-color: #d8e0ec; }
[data-theme="dark"] .sb-header               { background: #e8edf6; border-bottom-color: #d8e0ec; }
[data-theme="dark"] .sb-footer               { background: #e8edf6; border-top-color: #d8e0ec; }
[data-theme="dark"] .sb-search               { background: #e8edf6; border-bottom-color: #d8e0ec; }
[data-theme="dark"] .sb-course-name          { color: #0f172a; }
[data-theme="dark"] .sb-course-sub           { color: #475569; }
[data-theme="dark"] .sb-lesson-title         { color: #1e293b; }
[data-theme="dark"] .sb-lesson.is-done .sb-lesson-title  { color: #334155; }
[data-theme="dark"] .sb-lesson.is-active .sb-lesson-title { color: #3730a3; }
[data-theme="dark"] .sb-nav-btn              { background: #fff; border-color: #c0ccde; color: #334155; }
[data-theme="dark"] .sb-nav-btn.next         { background: #eef0ff; border-color: #a5b4fc; color: #3730a3; }
[data-theme="dark"] .sb-divider              { background: #d0d8e8; }
[data-theme="dark"] .sb-section-label        { color: #64748b; }
[data-theme="dark"] .sb-lesson:hover         { background: #dde4f0 !important; }
[data-theme="dark"] .sb-lesson.is-active     { background: #e0e4ff !important; }
[data-theme="dark"] .post-hero               { background: #f1f4f9; border-bottom-color: #d8e0ec; }
[data-theme="dark"] .ph-title                { color: #0f172a; }
[data-theme="dark"] .ph-excerpt              { color: #475569; }
[data-theme="dark"] .ph-meta                 { background: #fff; border-color: #c8d4e8; }
[data-theme="dark"] .ph-meta-item            { color: #334155; border-right-color: #d0dcea; }
[data-theme="dark"] .ph-meta-item strong     { color: #0f172a; }
[data-theme="dark"] .ph-breadcrumb           { color: #64748b; }
[data-theme="dark"] .ph-breadcrumb .cur      { color: #334155; }
[data-theme="dark"] .post-outer              { background: #030712; }
[data-theme="dark"] .post-cover-frame        { background:#0b1220; border-color:rgba(148,163,184,.14); box-shadow:0 14px 40px rgba(0,0,0,.45),0 3px 10px rgba(0,0,0,.35); }
[data-theme="dark"] .post-card               { background: #0d1526; border-color: #1e293b; }
[data-theme="dark"] .post-content            { color: #8899b5; }
[data-theme="dark"] .post-content h2         { color: #e2e8f0; border-bottom-color: #1e293b; }
[data-theme="dark"] .post-content h3         { color: #cbd5e1; }
[data-theme="dark"] .post-content h4         { color: #94a3b8; }
[data-theme="dark"] .post-content p          { color: #8899b5; }
[data-theme="dark"] .post-content strong     { color: #e2e8f0; }
[data-theme="dark"] .post-content a          { color: #a5b4fc; border-bottom-color: rgba(165,180,252,.26); }
[data-theme="dark"] .post-content ul li,
[data-theme="dark"] .post-content ol li      { color: #8899b5; }
[data-theme="dark"] .post-content blockquote { background: rgba(79,70,229,.07); border-color: rgba(79,70,229,.2); color: #8899b5; }
[data-theme="dark"] .post-content hr         { border-top-color: #1e293b; }
[data-theme="dark"] .post-content code:not(pre code) { background: rgba(79,70,229,.1); border-color: rgba(79,70,229,.22); color: #a5b4fc; }
[data-theme="dark"] .post-content table      { box-shadow: 0 4px 20px rgba(0,0,0,.28), 0 0 0 1px #1e293b; }
[data-theme="dark"] .post-content tbody td   { color: #8899b5; }
[data-theme="dark"] .post-content tbody tr:hover { background: rgba(79,70,229,.04) !important; }
[data-theme="dark"] .toc-box                 { background: #111827; border-color: #1e293b; }
[data-theme="dark"] .toc-toggle              { background: #1e293b; border-color: #334155; color: #a5b4fc; }
[data-theme="dark"] .toc-toggle:hover        { background: #4f46e5; color: #fff; }
[data-theme="dark"] .toc-link               { color: #64748b; }
[data-theme="dark"] .toc-link:hover,
[data-theme="dark"] .toc-link.active        { color: #a5b4fc !important; }
[data-theme="dark"] .author-card            { background: #0d1526; border-top-color: #1e293b; }
[data-theme="dark"] .author-name            { color: #f0f6ff; }
[data-theme="dark"] .author-meta-item       { color: #475569; }
[data-theme="dark"] .author-updated         { background: rgba(79,70,229,.09); border-color: rgba(79,70,229,.2); }
[data-theme="dark"] .post-tags              { border-top-color: #1e293b; }
[data-theme="dark"] .post-tag               { background: rgba(79,70,229,.09); border-color: rgba(79,70,229,.18); }
[data-theme="dark"] .post-tag:hover         { background: #4f46e5 !important; border-color: #4f46e5 !important; }
[data-theme="dark"] .share-section          { border-top-color: #1e293b; }
[data-theme="dark"] .share-heading          { color: #f0f6ff; }
[data-theme="dark"] .shr-btn.copy           { background: #1e293b; border-color: #334155; color: #94a3b8; }
[data-theme="dark"] .shr-btn.copy:hover     { border-color: #a5b4fc !important; color: #a5b4fc !important; }
[data-theme="dark"] .share-url-box          { background: #0a0f1e; border-color: #334155; }
[data-theme="dark"] .share-url-text         { color: #475569; }
[data-theme="dark"] .share-print            { background: #1e293b; border-color: #334155; color: #64748b; }
[data-theme="dark"] .wa-cta-card            { background: #0a1f15; border-color: #1D9E75; }
[data-theme="dark"] .wa-title               { color: #f0fdf6; }
[data-theme="dark"] .wa-desc               { color: #4ade80; }
[data-theme="dark"] .wa-social-proof        { color: #4ade80; }
[data-theme="dark"] .ad-in-content         { background: #0d1526; border-color: rgba(79,70,229,.15); }
[data-theme="dark"] .ad-post-article       { background: #0d1526; border-color: #1e293b; }
[data-theme="dark"] .ad-strip              { background: #0d1526; border-color: #1e293b; }
[data-theme="dark"] #sticky-bar            { background: rgba(10,15,30,.97); border-top-color: rgba(255,255,255,.07); }
[data-theme="dark"] .lesson-nav-btn        { background: #0d1526; border-color: #1e293b; }
[data-theme="dark"] .lesson-nav-btn:hover  { border-color: #4f46e5 !important; background: rgba(79,70,229,.07) !important; }
[data-theme="dark"] .lnb-label             { color: #475569; }
[data-theme="dark"] .lnb-title             { color: #e2e8f0; }
[data-theme="dark"] #mark-complete-bar     { background: rgba(10,15,30,.97); border-top-color: rgba(255,255,255,.07); }
[data-theme="dark"] #mark-complete-bar .mc-text { color: #cbd5e1; }
[data-theme="dark"] .udemy-banner          { background: #0d1526; border-color: #1e293b; }
[data-theme="dark"] .udemy-title           { color: #e2e8f0; }
[data-theme="dark"] .udemy-price-sale      { color: #e2e8f0; }
[data-theme="dark"] .udemy-disclaimer      { border-top-color: #1e293b; color: #475569; }
[data-theme="dark"] .sb-ad-box             { background: #0d1526; border-color: #1e293b; }

/* ── CLS: reserve ad space so async AdSense doesn't shift the page ── */
/* Strips are horizontal banners (~90px); in-article/sidebar are rectangles (~250px). */
.ad-strip        { min-height: 100px; }
.ad-in-content,
.ad-in-content-3,
.ad-post-article,
.sb-ad-box       { min-height: 250px; }

/* ── Primary "Next lesson" CTA (end of article) ── */
.next-lesson-cta{display:flex;align-items:center;gap:16px;flex-wrap:wrap;
  margin:30px 0;padding:20px 24px;border-radius:16px;text-decoration:none;position:relative;overflow:hidden;
  background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;
  box-shadow:0 14px 32px -16px rgba(79,70,229,.75);transition:transform .14s ease,box-shadow .14s ease}
.next-lesson-cta:hover{transform:translateY(-2px);box-shadow:0 18px 40px -16px rgba(79,70,229,.85)}
.next-lesson-cta::after{content:"";position:absolute;inset:0;
  background:radial-gradient(60% 120% at 92% 0%,rgba(255,255,255,.16),transparent 60%);pointer-events:none}
.next-lesson-cta .nlc-eyebrow{flex:1 1 100%;font:800 11px/1.3 'Poppins',system-ui,sans-serif;
  letter-spacing:.1em;text-transform:uppercase;color:rgba(255,255,255,.78)}
.next-lesson-cta .nlc-title{flex:1 1 60%;min-width:200px;font:800 18px/1.3 'Poppins',system-ui,sans-serif;color:#fff}
.next-lesson-cta .nlc-go{flex:0 0 auto;margin-left:auto;padding:10px 18px;border-radius:11px;
  background:#0f172a;color:#fff;font:800 14px/1 'Poppins',system-ui,sans-serif;white-space:nowrap}
.next-lesson-cta.done{background:linear-gradient(135deg,#0ea5e9,#4f46e5)}
@media (max-width:600px){
  .next-lesson-cta{padding:18px}
  .next-lesson-cta .nlc-title{font-size:16px;flex-basis:100%}
  .next-lesson-cta .nlc-go{margin-left:0;flex-basis:100%;text-align:center}
}

/* ── Content alignment: figures, captions, media ── */
.post-content figure { margin: 28px auto; text-align: center; max-width: 100%; }
.post-content figure img { margin: 0 auto 10px; }
.post-content figcaption { font-size: 13px; color: #64748b; text-align: center; line-height: 1.5; }
.post-content img { height: auto; }
.post-content p { text-align: left; }
.post-content table { max-width: 100%; }

/* Wide content tables → horizontally scrollable (wrapped by JS on load).
   Normal tables that fit stay at 100% and look identical; only oversized
   tables push past the edge and scroll instead of clipping. */
.post-content .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 28px 0;
  border-radius: 12px; box-shadow: 0 4px 20px rgba(6,16,31,.06), 0 0 0 1px #dde8f0; }
.post-content .table-scroll > table { margin: 0 !important; max-width: none; overflow: visible;
  border-radius: 0; box-shadow: none; }
