/* EDITORIAL LAYER — built on the store design system tokens (theme.css).
   No new palette, font family, radius scale or shadow scale is introduced here;
   the existing tokens are reused with editorial spacing and typography. */

.blog {
  --blog-measure: 740px;
  --blog-rail: 220px;
  --blog-gap: 40px;
  --blog-section-gap: 72px;
  --blog-eyebrow-size: 11px;
  --blog-hairline: 1px solid var(--border);
  --blog-frame-radius: 28px;
  --blog-frame-max: 1180px;
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── Layer 1: page canvas + soft brand orbs ──────────────────────
   Colors come from existing tokens only: accent, header slate (#0f172a / #1e3a5f).
   Homepage (.blog-canvas) stays quieter; article pages add --article. */

.content-page.blog-canvas {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  overflow-x: clip;
}
.content-page.blog-canvas::before,
.content-page.blog-canvas::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(120px);
  transform: translate3d(0, 0, 0);
}
.content-page.blog-canvas::before {
  width: min(780px, 85vw);
  height: min(780px, 85vw);
  top: -280px;
  right: -200px;
  background: radial-gradient(circle at 42% 40%, var(--accent) 0%, transparent 66%);
  opacity: 0.07;
}
.content-page.blog-canvas::after {
  width: min(640px, 78vw);
  height: min(640px, 78vw);
  top: 40%;
  left: -240px;
  background: radial-gradient(circle at 58% 48%, #1e3a5f 0%, transparent 70%);
  opacity: 0.05;
}
.content-page.blog-canvas--article::before { opacity: 0.11; }
.content-page.blog-canvas--article::after { opacity: 0.07; }

[data-theme="dark"] .content-page.blog-canvas::before { opacity: 0.1; }
[data-theme="dark"] .content-page.blog-canvas::after {
  background: radial-gradient(circle at 58% 48%, var(--accent) 0%, transparent 70%);
  opacity: 0.055;
}
[data-theme="dark"] .content-page.blog-canvas--article::before { opacity: 0.13; }
[data-theme="dark"] .content-page.blog-canvas--article::after { opacity: 0.07; }

.blog-article-page {
  position: relative;
}
.blog-article-page::before {
  content: '';
  position: absolute;
  width: min(400px, 58vw);
  height: min(400px, 58vw);
  right: 4%;
  bottom: 4%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, var(--accent) 0%, transparent 72%);
  opacity: 0.05;
  filter: blur(110px);
}

/* ── Layer 2: premium article surface ──────────────────────────── */

.blog-article-crumbs {
  position: relative;
  z-index: 1;
  margin-bottom: 22px;
}

.blog-frame-wrap {
  position: relative;
  z-index: 1;
  max-width: var(--blog-frame-max);
  margin: 0 auto 48px;
}
.blog-frame-wrap::before {
  content: '';
  position: absolute;
  inset: 12% 8% -4%;
  border-radius: 40px;
  background: radial-gradient(ellipse at 50% 0%, var(--accent-glow), transparent 74%);
  opacity: 0.18;
  filter: blur(36px);
  pointer-events: none;
  z-index: 0;
}

.blog-frame {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 18px 48px -32px rgba(15, 23, 42, 0.16);
}
[data-theme="dark"] .blog-frame {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 20px 52px -34px rgba(0, 0, 0, 0.5);
}

.blog-frame-body {
  padding: 44px 52px 64px;
}

.blog-article-page .blog-article-hero {
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--bg-hover);
}
.blog-article-page .blog-article-hero {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
}
.blog-article-page .blog-article-hero img {
  width: 100%;
  height: auto;
  max-height: 440px;
  min-height: 200px;
  aspect-ratio: 1200 / 560;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}
.blog-article-page .blog-article-hero figcaption {
  padding: 12px 52px;
  font-size: 12.5px;
  color: var(--text-muted);
  border-bottom: var(--blog-hairline);
  background: transparent;
}
.blog-article-page .blog-article-hero + .blog-frame-body {
  border-top: var(--blog-hairline);
}

.blog-article-page .blog-article-header {
  max-width: var(--blog-measure);
  margin: 0 auto;
  padding-bottom: 8px;
}
.blog-article-page .blog-article-h1 { margin-top: 22px; }
.blog-article-page .blog-article-deck { margin-top: 22px; }
.blog-article-page .blog-article-byline {
  margin-top: 40px;
  padding-top: 28px;
}

.blog-article-page .blog-article-layout { margin-top: 36px; }
.blog-article-main { min-width: 0; }

/* ── Shared editorial primitives ───────────────────────────────── */

.blog-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--blog-eyebrow-size);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.blog-eyebrow::before {
  content: '';
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.blog-section { margin-top: var(--blog-section-gap); }
.blog-section:first-of-type { margin-top: 0; }

.blog-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 16px;
  margin-bottom: 28px;
  border-bottom: var(--blog-hairline);
}
.blog-section-title {
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
}
.blog-section-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin: 6px 0 0;
  line-height: 1.6;
}
.blog-link-more {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none !important;
  white-space: nowrap;
  transition: gap var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.blog-link-more:hover { color: var(--accent-hover); gap: 10px; }

.blog-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}
.blog-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border-strong);
}

/* ── 1. Editorial hero ─────────────────────────────────────────── */

.blog-masthead {
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: var(--blog-hairline);
}
.blog-masthead-title {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--text-primary);
  margin: 14px 0 0;
  max-width: 16ch;
}
.blog-masthead-sub {
  font-size: clamp(15px, 14px + 0.25vw, 17px);
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 60ch;
  margin: 18px 0 0;
}
.blog-masthead-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}
.blog-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 6px 4px 18px;
  width: min(400px, 100%);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.blog-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.blog-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  padding: 9px 0;
}
.blog-search input:focus { outline: none; }
.blog-search input::placeholder { color: var(--text-muted); }
.blog-search button {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--btn-gradient);
  color: var(--cta-text);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.blog-search button:hover { transform: scale(1.06); box-shadow: 0 4px 14px var(--accent-glow); }

.blog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 18px 48px -32px rgba(15, 23, 42, 0.16);
}
[data-theme="dark"] .blog-hero {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 48px -32px rgba(0, 0, 0, 0.5);
}
.blog-hero-media {
  position: relative;
  display: grid;
  order: 2;
  align-self: stretch;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--bg-hover);
  min-height: 280px;
}
.blog-hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.blog-hero:hover .blog-hero-media img { transform: scale(1.03); }
.blog-hero-body {
  order: 1;
  min-width: 0;
  padding: 36px 40px 40px;
}
.blog-hero-title {
  font-size: clamp(1.6rem, 1.2rem + 1.9vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.14;
  margin: 16px 0 0;
}
.blog-hero-title a {
  color: var(--text-primary);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.blog-hero-title a:hover { background-size: 100% 2px; color: var(--text-primary); }
.blog-hero-excerpt {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 18px 0 0;
  max-width: 52ch;
}
.blog-hero .blog-meta { margin-top: 22px; }

/* ── 2. Featured insights (mixed weight grid) ──────────────────── */

.blog-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.blog-insights > :first-child { grid-column: span 1; }

/* ── Editorial article card ────────────────────────────────────── */

.blog-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 16px 40px -30px rgba(15, 23, 42, 0.14);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.blog-card:hover {
  border-color: var(--accent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 20px 44px -28px rgba(15, 23, 42, 0.18);
}
[data-theme="dark"] .blog-card {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 40px -30px rgba(0, 0, 0, 0.45);
}
.blog-card-media {
  position: relative;
  display: grid;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--bg-hover);
  aspect-ratio: 16 / 9;
  width: 100%;
  margin: 0;
}
.blog-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 160px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.blog-card:hover .blog-card-media img { transform: scale(1.04); }
.blog-card-text { padding: 18px 20px 20px; }
.blog-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin: 10px 0 0;
}
.blog-card-title a {
  color: var(--text-primary);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.blog-card-title a:hover { background-size: 100% 1.5px; color: var(--text-primary); }
.blog-card-excerpt {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 10px 0 0;
}
.blog-card .blog-meta { margin-top: 14px; }

/* Wide variant — used for the lead item of a cluster or list */
.blog-card--wide {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}
.blog-card--wide .blog-card-media {
  margin: 0;
  aspect-ratio: 4 / 3;
  min-height: 160px;
  border-radius: 0;
}
.blog-card--wide .blog-card-text { padding: 24px 26px; }
.blog-card--wide .blog-card-title { font-size: 1.25rem; }

/* Compact variant — framed text rows */
.blog-card--compact {
  padding: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 1px 2px rgba(15, 23, 42, 0.04);
}
.blog-card--compact .blog-card-text { padding: 16px 18px; }
.blog-card--compact .blog-card-title { font-size: 1rem; margin-top: 8px; }

/* ── 3. Explore by topic ───────────────────────────────────────── */

.blog-topics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.blog-topic {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  text-decoration: none !important;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.blog-topic:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.blog-topic-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: var(--accent-soft);
  color: var(--accent);
}
.blog-topic-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
.blog-topic-count {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── 4. Latest articles grid ───────────────────────────────────── */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 22px;
}
.blog-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ── 5. Platform cluster sections ──────────────────────────────── */

.blog-cluster + .blog-cluster { margin-top: 56px; }

/* ── 6. Featured guide (pillar) ────────────────────────────────── */

.blog-pillar {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--header-gradient);
  color: #fff;
  padding: clamp(28px, 4vw, 52px);
  box-shadow: var(--shadow-md);
}
.blog-pillar::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -8%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: var(--accent-glow);
  filter: blur(70px);
  pointer-events: none;
}
.blog-pillar-inner { position: relative; max-width: 62ch; }
.blog-pillar .blog-eyebrow { color: #fff; opacity: 0.85; }
.blog-pillar .blog-eyebrow::before { background: var(--accent); }
.blog-pillar-title {
  font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.16;
  margin: 16px 0 0;
  color: #fff;
}
.blog-pillar-text {
  font-size: 15.5px;
  line-height: 1.7;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.82);
}
.blog-pillar-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  background: var(--btn-gradient);
  color: var(--cta-text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  transition: transform var(--transition), box-shadow var(--transition);
}
.blog-pillar-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
  color: var(--cta-text);
}

/* ── 7. Newsletter (hidden until a backend exists) ─────────────── */

.blog-newsletter[hidden] { display: none; }
.blog-newsletter {
  margin-top: var(--blog-section-gap);
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--bg-card) 60%);
  text-align: center;
}
.blog-newsletter-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.blog-newsletter-text { font-size: 14px; color: var(--text-secondary); margin: 8px auto 0; max-width: 46ch; }
.blog-newsletter-form { display: flex; gap: 10px; margin: 20px auto 0; max-width: 440px; }
.blog-newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
}
.blog-newsletter-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Empty state ───────────────────────────────────────────────── */

.blog-empty {
  text-align: center;
  padding: 72px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.blog-empty i { font-size: 34px; color: var(--accent); opacity: 0.55; }
.blog-empty h2 { font-size: 1.25rem; font-weight: 800; margin: 18px 0 0; letter-spacing: -0.02em; }
.blog-empty p { font-size: 14.5px; color: var(--text-secondary); margin: 10px auto 0; max-width: 44ch; line-height: 1.65; }

/* ── Pagination ────────────────────────────────────────────────── */

.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: var(--blog-hairline);
}
.blog-pagination a,
.blog-pagination span {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none !important;
  transition: all var(--transition);
}
.blog-pagination a:hover { border-color: var(--accent); color: var(--accent); }
.blog-pagination .is-current {
  background: var(--btn-gradient);
  border-color: transparent;
  color: var(--cta-text);
}

/* ══════════════════════════════════════════════════════════════
   ARTICLE READING EXPERIENCE
   ══════════════════════════════════════════════════════════════ */

.blog-article-page { max-width: 1240px; margin: 0 auto; }

.blog-article-header {
  max-width: var(--blog-measure);
  margin: 0 auto;
  padding-bottom: 32px;
}
.blog-article-h1 {
  font-size: clamp(1.85rem, 1.35rem + 2.2vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--text-primary);
  margin: 16px 0 0;
}
.blog-article-deck {
  font-size: clamp(16px, 15px + 0.3vw, 19px);
  line-height: 1.62;
  color: var(--text-secondary);
  margin: 20px 0 0;
  max-width: 58ch;
}
.blog-article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: var(--blog-hairline);
}
.blog-author {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.blog-author-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--btn-gradient);
  color: var(--cta-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
}
.blog-author-name { font-size: 14px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.blog-author-role { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.blog-article-byline .blog-meta { margin-left: auto; }

.blog-article-hero {
  margin: 0;
  overflow: hidden;
  background: var(--bg-hover);
}
.blog-article-hero img {
  width: 100%;
  height: auto;
  min-height: 180px;
  aspect-ratio: 1200 / 560;
  display: block;
  object-fit: cover;
  object-position: center;
}
.blog-article-hero figcaption {
  padding: 12px 18px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Layout: full frame width so media can break out; type stays measured */
.blog-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--blog-gap);
}
.blog-article-rail { display: none; }

.blog-article-body {
  font-size: 17px;
  line-height: 1.78;
  color: var(--text-primary);
  min-width: 0;
}
.blog-article-body > * {
  max-width: var(--blog-measure);
  margin-left: auto;
  margin-right: auto;
}
.blog-article-body h2 {
  font-size: clamp(1.3rem, 1.15rem + 0.7vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin: 2.4em auto 0.7em;
  scroll-margin-top: 96px;
}
.blog-article-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 1.9em auto 0.55em;
  scroll-margin-top: 96px;
}
.blog-article-body p { margin: 0 auto 1.35em; }
.blog-article-body ul,
.blog-article-body ol { margin: 0 auto 1.5em; padding-left: 1.35em; }
.blog-article-body li { margin-bottom: 0.6em; }
.blog-article-body li::marker { color: var(--accent); font-weight: 700; }
.blog-article-body strong { color: var(--text-primary); font-weight: 700; }
.blog-article-body a {
  color: var(--text-primary);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size var(--transition);
  padding-bottom: 1px;
}
.blog-article-body a:hover { background-size: 100% 2px; color: var(--accent-hover); }
.blog-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin: 1.75em 0;
}
.blog-article-body figure { margin: 2em 0; }
.blog-article-body figcaption {
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
}
.blog-article-body hr { border: 0; border-top: var(--blog-hairline); margin: 2.5em 0; }

/* Wide breakout for tables, charts, figures and comparison blocks */
.blog-article-body > figure,
.blog-article-body > img,
.blog-article-body > table,
.blog-article-body > .blog-table-wrap,
.blog-article-body > .blog-wide,
.blog-article-body > .blog-proscons,
.blog-article-body > .blog-stat {
  max-width: 100%;
}
.blog-article-body .blog-wide {
  max-width: 100%;
  width: 100%;
}

/* ── Table of contents ─────────────────────────────────────────── */

.blog-toc {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  overflow: hidden;
  margin: 0 auto 32px;
  max-width: var(--blog-measure);
}
.blog-toc-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.blog-toc-summary::-webkit-details-marker { display: none; }
.blog-toc-summary i { color: var(--accent); }
.blog-toc-summary .blog-toc-chevron { margin-left: auto; transition: transform var(--transition); }
.blog-toc[open] .blog-toc-chevron { transform: rotate(180deg); }
.blog-toc-list {
  list-style: none;
  margin: 0;
  padding: 4px 18px 18px;
  counter-reset: toc;
}
.blog-toc-list li { counter-increment: toc; margin: 0; }
.blog-toc-list a {
  display: block;
  padding: 7px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 14px;
  margin-left: -2px;
  transition: color var(--transition), border-color var(--transition);
}
.blog-toc-list a::before {
  content: counter(toc) '.';
  color: var(--text-muted);
  font-weight: 700;
  margin-right: 8px;
  font-variant-numeric: tabular-nums;
}
.blog-toc-list a:hover { color: var(--accent); border-left-color: var(--accent); }
.blog-toc-list .is-sub a { padding-left: 30px; font-size: 13.5px; }
.blog-toc-list .is-sub a::before { content: none; }

/* ── Content components (authored inside article HTML) ─────────── */

.blog-callout {
  margin: 2em 0;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.blog-callout > :last-child { margin-bottom: 0; }
.blog-callout-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.blog-callout--warning { border-left-color: var(--warning); background: rgba(245, 158, 11, 0.06); }
.blog-callout--warning .blog-callout-label { color: var(--warning); }
.blog-callout--danger { border-left-color: var(--danger); background: rgba(239, 68, 68, 0.06); }
.blog-callout--danger .blog-callout-label { color: var(--danger); }
.blog-callout--definition { border-left-color: var(--border-strong); background: var(--bg-hover); }
.blog-callout--definition .blog-callout-label { color: var(--text-secondary); }

.blog-takeaways {
  margin: 0 auto 40px;
  max-width: var(--blog-measure);
  padding: 26px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--bg-card) 65%);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .blog-takeaways {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.07) 0%, var(--bg-card) 60%);
}
.blog-takeaways-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.blog-takeaways ul { list-style: none; margin: 0; padding: 0; }
.blog-takeaways li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
}
.blog-takeaways li:last-child { margin-bottom: 0; }
.blog-takeaways li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 11px;
  color: var(--accent);
}

.blog-article-body blockquote,
.blog-quote {
  margin: 2.2em 0;
  padding: 4px 0 4px 26px;
  border-left: 3px solid var(--accent);
  font-size: 1.15rem;
  line-height: 1.6;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}
.blog-quote cite {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  color: var(--text-muted);
}

.blog-stat {
  margin: 2em 0;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  text-align: center;
}
.blog-stat-value {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
}
.blog-stat-label { font-size: 14px; color: var(--text-secondary); margin-top: 10px; }

.blog-steps { counter-reset: step; list-style: none; margin: 2em 0; padding: 0; }
.blog-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 48px;
  margin-bottom: 20px;
}
.blog-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-proscons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 2em 0;
}
.blog-proscons > div {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}
.blog-proscons h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.blog-proscons .blog-pros h4 { color: var(--accent); }
.blog-proscons .blog-cons h4 { color: var(--danger); }
.blog-proscons ul { margin: 0; padding-left: 1.15em; font-size: 14.5px; line-height: 1.65; color: var(--text-secondary); }

.blog-table-wrap { margin: 2em 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.blog-article-body table,
.blog-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.blog-article-body th,
.blog-table-wrap th {
  background: var(--bg-hover);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.blog-article-body td,
.blog-table-wrap td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.blog-article-body tbody tr:last-child td { border-bottom: 0; }

/* ── Article footer sections ───────────────────────────────────── */

.blog-article-footer { max-width: var(--blog-measure); margin: 56px auto 0; }

.blog-sources {
  padding: 26px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.blog-sources-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 16px;
}
.blog-sources ol { list-style: none; counter-reset: src; margin: 0; padding: 0; }
.blog-sources li {
  counter-increment: src;
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
}
.blog-sources li:last-child { margin-bottom: 0; }
.blog-sources li::before {
  content: counter(src);
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--bg-hover);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.blog-sources a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.5;
}
.blog-sources a:hover { color: var(--accent); text-decoration: underline; }
.blog-source-host { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; font-weight: 500; }

.blog-article-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--accent-soft);
}
[data-theme="dark"] .blog-article-cta { background: rgba(45, 212, 191, 0.07); }
.blog-article-cta-text { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.blog-article-cta-sub { font-size: 13px; color: var(--text-secondary); margin-top: 3px; font-weight: 500; }

.blog-related { margin-top: var(--blog-section-gap); }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — desktop and mobile designed independently
   ══════════════════════════════════════════════════════════════ */

/* Wide desktop: sticky TOC rail beside the measured column */
@media (min-width: 1200px) {
  .blog-article-layout {
    grid-template-columns: var(--blog-rail) minmax(0, 1fr);
  }
  .blog-article-rail { display: block; }
  .blog-article-rail .blog-toc {
    position: sticky;
    top: 96px;
    margin: 0;
    max-width: none;
    border: 0;
    border-left: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
  }
  .blog-article-rail .blog-toc-summary { padding: 0 0 12px 16px; pointer-events: none; }
  .blog-article-rail .blog-toc-chevron { display: none; }
  .blog-article-rail .blog-toc-list { padding: 0 0 0 16px; max-height: calc(100vh - 220px); overflow-y: auto; }
  .blog-toc--inline { display: none; }
}

@media (max-width: 1199px) {
  .blog-article-rail { display: none; }
}

/* Laptops */
@media (max-width: 1100px) {
  .blog { --blog-section-gap: 60px; }
  .blog-hero { gap: 0; }
  .blog-insights { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .blog-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Tablets */
@media (max-width: 900px) {
  .blog { --blog-section-gap: 52px; }
  .blog-hero {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .blog-hero-media { order: 1; min-height: 200px; }
  .blog-hero-media img { min-height: 200px; aspect-ratio: 16 / 9; }
  .blog-hero-body { order: 2; padding: 24px 22px 28px; }
  .blog-hero-excerpt { max-width: none; }
  .blog-card--wide { grid-template-columns: 1fr; }
  .blog-card--wide .blog-card-media { aspect-ratio: 16 / 9; min-height: 160px; }
  .blog-masthead-title { max-width: none; }
}

/* Phones — reading-first, no compressed desktop layout */
@media (max-width: 900px) {
  .blog-frame { border-radius: 22px; }
  .blog-frame-body { padding: 32px 28px 44px; }
  .blog-article-page .blog-article-hero img { min-height: 200px; max-height: 280px; }
  .blog-article-page .blog-article-hero figcaption { padding: 10px 28px; }
}

@media (max-width: 768px) {
  .blog {
    --blog-section-gap: 44px;
    --blog-gap: 28px;
    --blog-frame-radius: 20px;
  }
  .content-page.blog-canvas {
    overflow-x: hidden;
  }
  .content-page.blog-canvas--article {
    padding-left: 12px;
    padding-right: 12px;
  }
  .content-page.blog-canvas::before,
  .content-page.blog-canvas::after {
    filter: blur(90px);
    width: 380px;
    height: 380px;
  }
  .blog-frame-wrap { margin-bottom: 28px; }
  .blog-frame-wrap::before { opacity: 0.12; }
  .blog-frame { border-radius: 20px; }
  .blog-frame-body { padding: 22px 18px 32px; }
  .blog-article-page .blog-article-hero img { min-height: 180px; max-height: 220px; }
  .blog-article-page .blog-article-hero figcaption { padding: 10px 18px; }
  .blog-article-page .blog-article-h1 { font-size: 1.7rem; }
  .blog-article-page .blog-article-deck { font-size: 16px; }
  .blog-masthead { padding-bottom: 28px; margin-bottom: 32px; }
  .blog-masthead-tools { margin-top: 20px; }
  .blog-search { width: 100%; }

  .blog-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 22px;
  }

  .blog-insights,
  .blog-grid,
  .blog-grid--three { grid-template-columns: 1fr; gap: 16px; }
  .blog-hero-body { padding: 20px 18px 24px; }
  .blog-card-text { padding: 16px 16px 18px; }
  .blog-hero { border-radius: 20px; }
  .blog-card { border-radius: 18px; }

  .blog-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .blog-topic { padding: 13px 14px; gap: 11px; }
  .blog-topic-icon { width: 34px; height: 34px; font-size: 14px; }
  .blog-topic-name { font-size: 13px; }

  .blog-pillar { padding: 26px 22px; }
  .blog-newsletter { padding: 26px 20px; }
  .blog-newsletter-form { flex-direction: column; }

  .blog-article-body { font-size: 16.5px; line-height: 1.75; }
  .blog-article-byline { gap: 14px; }
  .blog-article-byline .blog-meta { margin-left: 0; width: 100%; }
  .blog-article-layout { margin-top: 32px; }
  .blog-article-footer { margin-top: 44px; }
  .blog-takeaways { padding: 22px 20px; }
  .blog-sources { padding: 22px 20px; }
  .blog-callout { padding: 18px 20px; }
  .blog-proscons { grid-template-columns: 1fr; }
  .blog-article-cta { flex-direction: column; align-items: stretch; text-align: center; padding: 22px 20px; }
  .blog-article-cta .btn-theme { width: 100%; }
  .blog-pagination { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .blog-topics { grid-template-columns: 1fr; }
  .blog-article-body { font-size: 16px; }
  .blog-steps li { padding-left: 42px; }
  .blog-frame { border-radius: 18px; }
  .blog-frame-body { padding: 20px 16px 28px; }
}

/* Motion and touch preferences */
@media (hover: none) and (pointer: coarse) {
  .blog-card:hover .blog-card-media img,
  .blog-hero:hover .blog-hero-media img { transform: none; }
  .blog-topic:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .blog-card-media img,
  .blog-hero-media img,
  .blog-card-title a,
  .blog-hero-title a,
  .blog-topic,
  .blog-pillar-cta { transition: none !important; }
}
