/* ==========================================================================
   Blog page styling — assets/css/blog.css
   Loaded on /blog, /blog/{category} and /blog/{category}/{slug} (see
   $pageStylesheet in views/blog/blog.php, category.php and post.php).

   Full visual design (typography, color, radius, shadow, hover states) for
   the blog listing and post templates — built on Webmicron's own brand
   tokens (defined once in views/includes/head.php's critical CSS and used
   sitewide) rather than the usamahabib.com reference site's palette, so
   the blog matches the rest of webmicron.pk exactly.

   Reuses existing site components instead of duplicating them:
     .section-inner                  → max-width content wrapper (global.css)
     .btn-primary / .btn-secondary   → buttons (global.css)
     .faq-item / .faq-btn / .faq-panel → accordion, incl. its toggle script (global.css + faq.php)
   Border/shadow values below match the site's own card language
   (.blog-card, .cs-card, .trust-card, .faq-badge in global.css) rather
   than inventing a new palette.
   ========================================================================== */

:root {
  --measure: 870px;
  /* article reading measure */
  --header-h: 64px;
  /* matches .nav height in head.php's critical CSS */
  --blog-border: #ece9e4;
  /* the site's standard card/divider border */
  --blog-soft-bg: #fff8f5;
  /* soft accent background (.blog-badge / .faq-badge) */
  --blog-soft-border: #ffdac7;
  /* soft accent border (.blog-badge / .faq-badge) */
  --blog-shadow: 0 10px 32px rgba(0, 0, 0, .08);
  /* matches .cs-card:hover */
}

/* --------------------------------------------------------------------------
   RESET (additions not already covered by global.css)
   -------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Type scale (page-specific — home.css sets its own the same way) */
h1,
h2,
h3,
h4 {
  color: var(--color-text);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(1.4rem, 4vw, 2rem);
}

h2 {
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
}

h3 {
  font-size: 1.1rem;
  letter-spacing: -.01em;
}

h4 {
  font-size: 1rem;
  letter-spacing: -.01em;
}

p {
  color: var(--color-text);
  line-height: 1.7;
  margin: 0 0 1rem;
}

.muted {
  color: var(--color-text-muted);
}

.mb-0 {
  margin-bottom: 0;
}

a {
  color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
.section {
  padding-block: 24px;
}



.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid {
    gap: 32px;
  }
}

/* --------------------------------------------------------------------------
   UTILITIES
   -------------------------------------------------------------------------- */
.mt-3 {
  margin-top: 12px
}

.mt-8 {
  margin-top: 48px
}

.mt-9 {
  margin-top: 64px
}

.mb-3 {
  margin-bottom: 12px
}

.mb-4 {
  margin-bottom: 16px
}

.mb-6 {
  margin-bottom: 32px
}

.flex {
  display: flex
}

.gap-3 {
  gap: 12px
}

.wrap {
  flex-wrap: wrap
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  transition: gap .15s ease;
}

.link-arrow:hover {
  gap: 10px;
}

.link-arrow svg {
  width: 15px;
  height: 15px;
  transition: transform .15s ease;
}

/* --------------------------------------------------------------------------
   PILLS / TAGS — same soft-accent recipe as .blog-badge / .faq-badge
   -------------------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--blog-soft-bg);
  border: 1px solid var(--blog-soft-border);
  color: var(--color-primary);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  border-radius: var(--radius-base);
  text-decoration: none;
}

a.pill:hover {
  border-color: var(--color-primary);
}

.pill--muted {
  background: var(--bg-secondary);
  border-color: var(--blog-border);
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   PLACEHOLDER IMAGE BLOCKS
   -------------------------------------------------------------------------- */
.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  background: linear-gradient(145deg, var(--bg-secondary), var(--blog-border));
  color: var(--color-text-muted);
  font-size: .8rem;
  border-radius: var(--radius-lg);
}

.ph--16x9 {
  aspect-ratio: 16/9;
}

/* --------------------------------------------------------------------------
   CARDS — same recipe as .blog-card / .cs-card / .trust-card
   -------------------------------------------------------------------------- */

/* Post card */
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  border: 1.5px solid var(--blog-border);
  border-radius: var(--radius-base);
  overflow: hidden;
  transition: box-shadow .2s ease, transform .15s ease, border-color .2s ease;
}

.post-card:hover {
  box-shadow: var(--blog-shadow);
  transform: translateY(-3px);
}

.post-card .pill,
.post-card>.ph {
  margin: 16px 16px 0;
}

.post-card .pill {
  align-self: flex-start;
}

.post-card__media {
  overflow: hidden;
  margin: 0;
  border-radius: 0;
}

.post-card__media .ph {
  border-radius: 0;
}

.post-card__title {
  margin: 12px 16px 8px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__title a {
  color: var(--color-text);
  text-decoration: none;
}

.post-card:hover .post-card__title a {
  color: var(--color-primary);
}

.post-card__excerpt {
  margin: 0 16px 16px;
  color: var(--color-text-muted);
  font-size: .9rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: auto 16px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--blog-border);
  color: var(--color-text-muted);
  font-size: .78rem;
}

.post-card__meta .avatar {
  width: 24px;
  height: 24px;
  flex: none;
  background: var(--color-primary);
  border-radius: 50%;
}

/* Featured post card */
.post-featured {
  display: grid;
  gap: 32px;
  align-items: center;
  padding: 24px;
  background: var(--bg-primary);
  border: 1.5px solid var(--blog-border);
  border-radius: var(--radius-base);
}

@media (min-width: 900px) {
  .post-featured {
    grid-template-columns: 1.1fr 1fr;
    padding: 32px;
  }
}

.post-featured .ph {
  border-radius: var(--radius-lg);
}

.post-featured__title {
  margin: 12px 0;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
}

.post-featured__title a {
  color: var(--color-text);
  text-decoration: none;
}

.post-featured__title a:hover {
  color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   FORMS
   -------------------------------------------------------------------------- */
.input {
  width: 100%;
  padding: 13px 16px;
  font-family: inherit;
  font-size: .95rem;
  color: var(--color-text);
  background: var(--bg-primary);
  border: 1.5px solid var(--blog-border);
  border-radius: var(--radius-base);
  transition: border-color .15s ease;
}

.input::placeholder {
  color: var(--color-text-muted);
}

.input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   BLOG INDEX — HERO
   -------------------------------------------------------------------------- */
.blog-hero {
  padding-block: 48px 32px;
  background: var(--bg-secondary);
}

@media (min-width: 768px) {
  .blog-hero {
    padding-block: 64px 40px;
  }
}

.blog-hero__sub {
  max-width: 620px;
  font-size: 1.05rem;
  color: var(--color-text-muted);
}

.blog-hero__search {
  max-width: 480px;
  margin-top: 28px;
}

/* --------------------------------------------------------------------------
   BREADCRUMBS
   -------------------------------------------------------------------------- */
.breadcrumbs {
  margin-bottom: 16px;
  font-size: .85rem;
  color: var(--color-text-muted);
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.breadcrumbs a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--color-primary);
}

.breadcrumbs li:not(:last-child)::after {
  content: "\203A";
  margin-left: 8px;
  color: var(--blog-border);
}

/* --------------------------------------------------------------------------
   ARTICLE — 3-column layout (left TOC rail · center prose · right share)
   -------------------------------------------------------------------------- */
/* Grid math (.section-inner is 1200px, minus ~48px side padding = ~1104 usable):
   2-col @1100+ : 200 + 40 gap + 720          =  960  ✓
   3-col @1360+ : 200 + 40 + 720 + 40 + 160   = 1160  (rail hides below 1360 to stay clear)
   Do not widen the rails or the gaps — the 720px measure gets squeezed first. */
.article-layout {
  display: block;
}

@media (min-width: 1100px) {
  .article-layout {
    display: grid;
    grid-template-columns: 200px minmax(0, var(--measure));
    gap: 40px;
    justify-content: center;
  }
}

@media (min-width: 1360px) {
  .article-layout {
    grid-template-columns: 230px minmax(0, var(--measure)) 100px;
    gap: 40px;
  }
}

.article-rail {
  display: none;
}

@media (min-width: 1100px) {
  .article-rail--left {
    display: block;
  }
}

@media (min-width: 1360px) {
  .article-rail--right {
    display: block;
  }
}

.article-rail__inner {
  position: sticky;
  top: calc(var(--header-h) + 32px);
}

/* TOC — each link owns a single border-left segment (no overlapping-border trick,
   which rendered as a hairline double border at some zoom levels) */
.toc__title {
  margin-bottom: 12px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li a {
  display: block;
  padding: 7px 0 7px 14px;
  border-left: 2px solid var(--blog-border);
  color: var(--color-text-muted);
  font-size: .875rem;
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease;
}

.toc li a:hover {
  color: var(--color-text);
  border-left-color: var(--color-text-muted);
}

.toc li a.is-active {
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  font-weight: 700;
}

.toc-mobile {
  margin-bottom: 32px;
  border: 1px solid var(--blog-border);
  border-radius: var(--radius-lg);
}

@media (min-width: 1100px) {
  .toc-mobile {
    display: none;
  }
}

.toc-mobile summary {
  padding: 16px 24px;
  font-weight: 700;
  color: var(--color-text);
  cursor: pointer;
}

.toc-mobile .toc {
  padding: 0 24px 24px;
}

/* Share rail (sticky desktop sidebar + inline row use the same components) */
.share-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.share-rail--row {
  flex-direction: row;
  flex-wrap: wrap;
}

.share-rail a,
.share-rail button {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--blog-border);
  border-radius: 50%;
  color: var(--color-text-muted);
  background: var(--bg-primary);
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.share-rail a:hover,
.share-rail button:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}

@media (max-width: 767px) {
  .share-rail--row {
    display: none;
  }
}

/* Generic copy-icon swap (used by the share "copy link" buttons and the code-block copy button) */
.copy-icon {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-block;
}

.copy-icon .icon-link,
.copy-icon .icon-copy,
.copy-icon .icon-check {
  position: absolute;
  inset: 0;
  transition: opacity .15s ease;
}

.copy-icon .icon-check {
  opacity: 0;
  color: var(--color-primary);
}

.copied .icon-link,
.copied .icon-copy {
  opacity: 0;
}

.copied .icon-check {
  opacity: 1;
}

.share-copy.copied {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Fixed mobile bottom share bar */
.share-bottombar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--bg-primary);
  border-top: 1px solid var(--blog-border);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, .08);
}

@media (max-width: 767px) {
  .share-bottombar {
    display: flex;
  }
}

.share-bottombar a,
.share-bottombar button {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--blog-border);
  border-radius: 50%;
  color: var(--color-text-muted);
  background: var(--bg-primary);
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}

.share-bottombar a:hover,
.share-bottombar button:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.share-bottombar .share-copy.copied {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

@media (max-width: 767px) {
  #main {
    padding-bottom: 76px;
  }
}

/* Prose block */
.prose {
  max-width: var(--measure);
  color: var(--color-text);
  font-size: 1.05rem;
  line-height: 1.75;
}

.prose>*+* {
  margin-top: 24px;
}

.prose h2 {
  margin-top: 36px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose h3 {
  margin-top: 40px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose h4 {
  margin-top: 24px;
}

.prose p {
  margin: 0;
}



.prose li::marker {
  color: var(--color-primary);
}

.prose figure {
  margin: 32px 0;
}

.prose figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: .85rem;
  color: var(--color-text-muted);
}

.prose strong {
  color: var(--color-text);
  font-weight: 700;
}

.prose code {
  padding: 2px 6px;
  background: var(--bg-secondary);
  border-radius: 4px;
  font-size: .9em;
  color: var(--color-secondary);
}

.prose pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  background: #1a1a1a;
  color: #eee;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85rem;
  line-height: 1.6;
}

.prose pre code {
  padding: 0;
  background: none;
  color: inherit;
}

/* Code block — dark header bar (language label + copy button) wrapping .prose pre */
.code-block {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
}

.code-block__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: #242424;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: #9a9a9a;
}

.code-block__copy {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-control);
  color: #ccc;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

.code-block__copy:hover {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.code-block__copy.copied {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, .08);
  color: #fff;
}



.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  border: 1px solid #e0e0e0
}

.prose th,
.prose td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--blog-border);
}

.prose th {
  color: var(--color-text);
  font-weight: 700;
  background: var(--bg-secondary);
}

.table-scroll {
  overflow-x: auto;
}

/* Article byline (top of post): avatar · name + verified badge + role · published/updated/read-time */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.article-meta__avatar {
  width: 48px;
  height: 48px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
}

.article-meta__avatar svg {
  width: 24px;
  height: 24px;
}

.article-meta__name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  color: var(--color-text);
}

.article-meta__name a {
  color: inherit;
  text-decoration: none;
}

.article-meta__name a:hover {
  color: var(--color-primary);
}

.article-meta__role {
  margin-top: 2px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.article-meta__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-left: auto;
  padding-left: 16px;
  border-left: 1px solid var(--blog-border);
  color: var(--color-text-muted);
  font-size: .85rem;
}

@media (max-width: 640px) {
  .article-meta__stats {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
    width: 100%;
  }
}

.verified-badge {
  width: 15px;
  height: 15px;
  flex: none;
  display: inline-block;
  vertical-align: middle;
}


/* CTA  */

/* Card Container */
.post-cta {
  margin: 32px 0;
  padding: 20px 24px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background-color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Header / Eyebrow */
.post-cta__eyebrow {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

/* Copy Block */
.post-cta__content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-cta__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: #0f172a;
}

.post-cta__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
}

/* Bottom Action Row */
.post-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding-top: 4px;
}

/* Primary Button */
.post-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #0f172a;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  line-height: 1.4;
  transition: background-color 150ms ease;
}

.post-cta__btn:hover {
  background-color: #1e293b;
}

.post-cta__btn svg {
  width: 14px;
  height: 14px;
  transition: transform 150ms ease;
}

.post-cta__btn:hover svg {
  transform: translateX(2px);
}

/* Inline Proof Note */
.post-cta__micro {
  margin: 10px 0 0 0 !important;
  font-size: 12.5px;
  color: #64748b;
}




/* Base Callout Structure */
.callout {
  margin: 24px 0;
  padding: 14px 18px;
  border-left: 3px solid currentColor;
  border-radius: 0 6px 6px 0;
}

.callout__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
}

.callout__header svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.callout__text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: inherit;
  opacity: 0.88;
}

/* 1. Info (Blue) */
.callout--info {
  color: #1d4ed8;
  background-color: #eff6ff;
}

/* 2. Success (Green) */
.callout--success {
  color: #15803d;
  background-color: #f0fdf4;
}

/* 3. Warning (Orange / Amber) */
.callout--warning {
  color: #c2410c;
  background-color: #fff7ed;
}

/* 4. Danger (Red) */
.callout--danger {
  color: #b91c1c;
  background-color: #fef2f2;
}

/* Container Box */
.takeaways {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  margin: 24px 0 32px;
  overflow: hidden;
}

/* Header Banner */
.takeaways__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--color-secondary);
}

.takeaways__title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Header Icon */
.takeaways__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #0f172a;
  flex-shrink: 0;
}

.takeaways__badge svg {
  width: 13px;
  height: 13px;
}

/* List Items & Dividers */
.takeaways__list {
  list-style: none;
  margin: 0;
  padding: 0;
  background-color: #f8fafc;
}

.takeaways__list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}

.takeaways__list li:last-child {
  border-bottom: none;
}

/* Checkmark Icon */
.takeaways__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #f0fdf4;
  color: #16a34a;
  margin-top: 1.5px;
}

.takeaways__icon svg {
  width: 11px;
  height: 11px;
}

/* Numbered steps — a small vertical timeline: flat circular numerals connected by a line */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
}

.steps>li {
  counter-increment: step;
  position: relative;
  padding-left: 56px;
  padding-bottom: 32px;
}

.steps>li:last-child {
  padding-bottom: 0;
}

.steps>li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  border-radius: 50%;
}

.steps>li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: -8px;
  width: 2px;
  background: var(--blog-border);
}

.steps h3 {
  margin-top: 0 !important;
  padding-top: 0;
}

/* pros and cons */
/* Container Layout */
.proscons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 24px 0;
}

@media (min-width: 640px) {
  .proscons {
    grid-template-columns: 1fr 1fr;
  }
}

/* Card Wrapper */
.proscons__col {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  /* Keeps child header corners clean */
}

/* Dedicated Header Bar */
.proscons__header {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.proscons__header h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #0f172a;
}

/* Lists & Item Dividers */
.proscons__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.proscons__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.45;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}

/* Remove divider from the last item */
.proscons__list li:last-child {
  border-bottom: none;
}

/* Icon Badge */
.proscons__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  margin-top: 1px;
}

.proscons__icon svg {
  width: 11px;
  height: 11px;
}

/* Semantic Status Variants */
.proscons--pro .proscons__icon {
  background: #f0fdf4;
  color: #16a34a;
}

.proscons--con .proscons__icon {
  background: #fef2f2;
  color: #dc2626;
}

.screenshot-frame {
  overflow: hidden;
  border: 1px solid var(--blog-border);
  border-radius: var(--radius-lg);
}

.screenshot-frame__bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--blog-border);
}

.screenshot-frame__bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blog-border);
  display: block;
}

/* Native video embed — real iframe, browser-lazy-loaded, responsive 16:9 */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.stat-highlight {
  text-align: center;
  padding: 32px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
}

.stat-highlight__num {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}

/* Author box */
.author-box {
  display: flex;
  gap: 24px;
  padding: 24px;
  flex-wrap: wrap;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
}

.author-box__avatar {
  width: 80px;
  height: 80px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
}

.author-box__avatar svg {
  width: 40px;
  height: 40px;
}

.author-box__role {
  margin: -8px 0 12px;
  color: var(--color-text-muted);
  font-size: .85rem;
  font-weight: 600;
}

.author-box__socials {
  display: flex;
  gap: 8px;
}

.author-box__socials a {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--blog-border);
  border-radius: 50%;
  color: var(--color-text-muted);
  transition: border-color .15s ease, color .15s ease;
}

.author-box__socials a svg {
  width: 15px;
  height: 15px;
}

.author-box__socials a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Prev / next */
.prevnext {
  display: grid;
  gap: 16px;
}

@media (min-width: 640px) {
  .prevnext {
    grid-template-columns: 1fr 1fr;
  }
}

.prevnext a {
  display: block;
  padding: 24px;
  border: 1px solid var(--blog-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: border-color .15s ease;
}

.prevnext a:hover {
  border-color: var(--color-primary);
}

.prevnext .dir {
  display: block;
  margin-bottom: 6px;
  font-size: .78rem;
  color: var(--color-text-muted);
}

.prevnext .ttl {
  font-weight: 700;
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   BLOG INDEX
   -------------------------------------------------------------------------- */
.topic-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--blog-border);
}

.topic-bar__inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-block: 12px;
}

.topic-bar a {
  flex: none;
  padding: 8px 16px;
  border-radius: var(--radius-base);
  border: 1px solid var(--blog-border);
  color: var(--color-text-muted);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
}

.topic-bar a:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
}

.topic-bar a[aria-current="page"] {
  background: var(--color-text);
  border-color: var(--color-text);
  color: #fff;
}

.search-field {
  position: relative;
  max-width: 520px;
}

.search-field .input {
  padding-left: 46px;
}

.search-field__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   ICONS (sizing — color inherits currentColor from the parent)
   -------------------------------------------------------------------------- */
.ico {
  width: 20px;
  height: 20px;
  flex: none;
  display: inline-block;
  vertical-align: middle;
}

.ico--sm {
  width: 16px;
  height: 16px;
}

.pill .ico {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------------
   PAGINATION (blog listing & category pages)
   -------------------------------------------------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
}

.pagination__list {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination__btn,
.pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding-inline: 12px;
  border-radius: var(--radius-control);
  border: 1px solid var(--blog-border);
  color: var(--color-text);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--bg-primary);
}

.pagination__link {
  padding-inline: 0;
}

.pagination__btn:hover,
.pagination__link:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pagination__link.is-current {
  background: var(--color-text);
  border-color: var(--color-text);
  color: #fff;
}

.pagination__btn.is-disabled {
  opacity: .4;
  pointer-events: none;
}

.pagination__ellipsis {
  color: var(--color-text-muted);
  padding-inline: 4px;
}