/* Blog list + article styles. Loaded by the Astro Layout in astro-blog/. */

/* Blog pages drop container-large's 20px side padding entirely — the 5%
   padding-global gutter is the only side spacing. One rule for every section. */
.blog-page .container-large {
  padding-left: 0;
  padding-right: 0;
}

/* ===== List page ===== */
/* Featured is its own top section — it carries the fixed-navbar clearance.
   Decorative grid pattern (radial-fade) sits top-right behind the content. */
.blog-featured-section {
  position: relative;
  padding-top: 120px;
  padding-bottom: 0;
  background-image: url('/assets/blog/background-pattern.svg');
  background-repeat: no-repeat;
  background-position: top right;
}
.blog-featured-section > .padding-global { position: relative; z-index: 1; }
@media (max-width: 639px) {
  .blog-featured-section,
  .blog-article-hero { background-size: 140% auto; }
}
.blog-list-section {
  padding-top: 120px;
  padding-bottom: 120px;
}
.blog-list-header {
  margin: 0 0 48px;
  text-align: left;
}
.blog-list-heading {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #1f212e;
  margin: 0;
}
@media (max-width: 639px) {
  .blog-list-heading { font-size: 36px; }
  .blog-list-header { margin-bottom: 32px; }
}

/* ===== Featured (latest) post — image with drop shadow, body sits outside ===== */
.blog-featured-link {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  margin-bottom: 64px;
}
.blog-featured {
  /* Image-only wrapper. No card chrome — just the image + its drop shadow. */
}
.blog-featured-image {
  aspect-ratio: 1185 / 720;
  background: #f8f9fc;
  overflow: hidden;
  border-radius: 16px;
  box-shadow:
    0 24px 48px rgba(31, 33, 46, 0.12),
    0 8px 16px rgba(31, 33, 46, 0.06);
  transition: box-shadow 0.2s ease;
}
.blog-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-featured-link:hover .blog-featured-image {
  box-shadow:
    0 28px 60px rgba(31, 33, 46, 0.14),
    0 10px 20px rgba(31, 33, 46, 0.08);
}
.blog-featured-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.blog-featured-title {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #1f212e;
  margin: 0;
}
.blog-featured-desc {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #52577a;
  margin: 0;
}
.blog-featured-read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: #3661ed;            /* primary/500 */
}
.blog-featured-read svg { width: 20px; height: 20px; }
.blog-featured-link:hover .blog-featured-read { gap: 10px; transition: gap 0.15s ease; }
@media (max-width: 991px) {
  .blog-featured-link { grid-template-columns: 1fr; gap: 24px; }
  .blog-featured-title { font-size: 26px; }
}
@media (max-width: 639px) {
  .blog-featured-link { margin-bottom: 40px; gap: 20px; }
  .blog-featured-body { gap: 12px; }
  .blog-featured-title { font-size: 22px; }
}

/* ===== Filter chips + search ===== */
.blog-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.blog-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.blog-filter-chip {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #52577a;
  background: #f8f9fc;       /* grey/50 */
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.blog-filter-chip:hover { color: #3661ed; }       /* primary/500 */
.blog-filter-chip.is-active {
  background: #3661ed;
  color: #fff;
}
.blog-search-wrap {
  position: relative;
  flex: 1;
  display: flex;
  min-width: 0;
}
.blog-search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: none;
  color: #adb2ce;
  cursor: pointer;
  transition: color 0.15s ease;
}
.blog-search-clear:hover { color: #52577a; }
.blog-search-clear svg { width: 18px; height: 18px; }
/* respect the [hidden] attribute (display:flex would otherwise override it) */
.blog-search-clear[hidden] { display: none; }
/* hide the browser's native search clear so we don't show two X's */
.blog-search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.blog-search {
  flex: 1;
  width: 100%;
  min-width: 0;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #1f212e;
  background: #fff;
  border: 1px solid #d4d9ea;
  border-radius: 999px;
  padding: 8px 34px 8px 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.blog-search::placeholder { color: #adb2ce; }
.blog-search:focus {
  border-color: #3661ed;
  box-shadow: 0 0 0 3px rgba(54, 97, 237, 0.15);
}
@media (max-width: 639px) {
  .blog-filters {
    margin-bottom: 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .blog-filter-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .blog-filter-chip { flex-shrink: 0; }
  .blog-search { width: 100%; }
}

/* ===== Show more posts ===== */
.blog-show-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 56px;
}
.blog-show-more {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #1f212e;
  background: #fff;
  border: 1px solid #d4d9ea;
  border-radius: 999px;
  padding: 12px 24px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.blog-show-more:hover {
  background: #f5f8ff;     /* primary/50 */
  border-color: #3661ed;   /* primary/500 */
  color: #3661ed;          /* primary/500 */
}
@media (max-width: 639px) {
  .blog-show-more-wrap { margin-top: 40px; }
}

/* ===== Related blogs (article page) ===== */
.blog-related {
  background: #ffffff;
  padding-top: 64px;
  padding-bottom: 96px;
  border-top: 1px solid #d4d9ea;
}
.blog-related-heading {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #1f212e;
  margin: 0 0 40px;
}
.blog-grid--related {
  /* re-use .blog-grid columns + spacing; nothing to override unless we want it tighter */
}
@media (max-width: 639px) {
  .blog-related { padding-top: 48px; padding-bottom: 64px; }
  .blog-related-heading { font-size: 26px; margin-bottom: 24px; }
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 64px;
  row-gap: 64px;
}
@media (max-width: 991px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 639px) {
  .blog-grid { grid-template-columns: 1fr; column-gap: 24px; row-gap: 48px; }
  .blog-list-section { padding-top: 56px; padding-bottom: 64px; }
}

.blog-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  height: 100%;          /* fill the row's auto-stretched height so body can flex */
}

.blog-card-image {
  aspect-ratio: 1185 / 720;
  overflow: hidden;
  background: #f8f9fc;
  border-radius: 12px;
  box-shadow:
    0 12px 28px rgba(31, 33, 46, 0.08),
    0 4px 10px rgba(31, 33, 46, 0.04);
  transition: box-shadow 0.18s ease;
}
.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-card:hover .blog-card-image {
  box-shadow:
    0 16px 36px rgba(31, 33, 46, 0.10),
    0 6px 14px rgba(31, 33, 46, 0.06);
}

.blog-card-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.blog-card-body-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.blog-card-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.blog-card-tag {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #3661ed;
  /* No background, padding, border, or radius — plain text, no chip UI */
}
.blog-card-date {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #757a97;
}
.blog-card-tags-sep {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #adb2ce;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

/* Author + avatar in the meta row */
.blog-author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.blog-author-avatars {
  display: inline-flex;
}
.blog-author-avatars.is-multi .blog-author-avatar + .blog-author-avatar {
  margin-left: -8px;  /* slight overlap for multi-author posts */
}
.blog-author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: #f8f9fc;
  display: block;
}
.blog-author-name {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #1f212e;
}
.blog-card-title {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: #1f212e;
  margin: 0;
}
.blog-card-meta {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #757a97;
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
}

.blog-empty {
  text-align: center;
  font-family: 'Inter', sans-serif;
  color: #757a97;
  padding: 64px 0;
}

/* No-results state (client-side: filter/search returns nothing) */
.blog-no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 80px 24px;
  color: #adb2ce;
}
/* respect the [hidden] attribute (display:flex would otherwise override it) */
.blog-no-results[hidden] { display: none; }
.blog-no-results svg {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
}
.blog-no-results-title {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 20px;
  color: #1f212e;
  margin: 0;
}
.blog-no-results-sub {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: #757a97;
  margin: 0;
}

/* ===== Article page — hero (grey/50) + body (white) ===== */
.blog-article-hero {
  position: relative;
  background-color: #f8f9fc;
  background-image: url('/assets/blog/background-pattern.svg');
  background-repeat: no-repeat;
  background-position: top right;
  padding-top: 64px;
  padding-bottom: 48px;
}
.blog-article-hero > .padding-global { position: relative; z-index: 1; }
.blog-article-body {
  background: #ffffff;
  padding-top: 64px;
  padding-bottom: 96px;
}
/* Hero header — 2-col: left column has the back button (row 1) + author (row 2),
   right column has the title spanning both rows. */
.blog-post-header_component {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  column-gap: 56px;
  row-gap: 32px;
  align-items: start;
}
.blog-post-back { grid-column: 1; grid-row: 1; }
.blog-post-header-left { grid-column: 1; grid-row: 2; }
.blog-post-header-right { grid-column: 2; grid-row: 1 / span 2; }
.blog-post-header-left {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}
/* "All Articles" back button — sd-back pattern, retuned for the light hero bg.
   Skills.css ships sd-back styles assuming a dark navbar; these overrides flip
   the colors so it reads correctly on grey/50. */
.blog-post-back.sd-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #52577a;
  text-decoration: none;
  margin: 0;
  transition: color 0.18s ease;
}
.blog-post-back.sd-back:hover { color: #3661ed; }
.blog-post-back .sd-back-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #d4d9ea;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.blog-post-back.sd-back:hover .sd-back-icon {
  background: rgba(54, 97, 237, 0.10);
  border-color: rgba(54, 97, 237, 0.35);
}
.blog-post-back .sd-back-icon svg {
  width: 16px;
  height: 16px;
  color: currentColor;
}
.blog-post-written-by {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.blog-post-written-by-label {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #757a97;
}
.blog-post-header-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.blog-article-heading {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #1f212e;
  margin: 0;
}

/* TOC + content layout — left = TOC (fixed), right = tldr/body/faq (flexible).
   Same column structure as the header so TOC aligns under the back button. */
.blog-article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  column-gap: 56px;
  align-items: start;
}
.blog-article-content { grid-column: 2; }   /* always the right column */
.blog-toc { grid-column: 1; }                /* always the left column */

/* TOC (copied from success-story.css so the article page is self-contained) */
.blog-toc {
  position: sticky;
  top: 100px;
  align-self: start;
  background: #fff;
  padding: 16px 0;
  z-index: 1;
}
.blog-toc .ss-toc-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.blog-toc .ss-toc-title {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #757a97;
}
.blog-toc .ss-toc-links {
  display: flex;
  flex-direction: column;
  border-left: 1px solid #e1e4ee;
}
.blog-toc .ss-toc-link {
  position: relative;
  display: block;
  padding: 8px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: #757a97;
  text-decoration: none;
  transition: color 0.15s ease;
}
.blog-toc .ss-toc-link::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: transparent;
  transition: background 0.15s ease;
}
.blog-toc .ss-toc-link:hover { color: #2D3044; }
.blog-toc .ss-toc-link.is-active { color: #3661ed; }
.blog-toc .ss-toc-link.is-active::before { background: #3661ed; }

@media (max-width: 991px) {
  /* Below tablet: stack TOC above content, header into one column. */
  .blog-post-header_component,
  .blog-article-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  /* Reset the forced desktop column placement so items stack vertically
     (otherwise grid-column:2 spawns a phantom 2nd column on mobile). */
  .blog-article-content,
  .blog-toc { grid-column: auto; }
  /* Header on mobile: All Articles first, then title, then author. */
  .blog-post-back { grid-column: auto; grid-row: auto; order: 1; }
  .blog-post-header-right { grid-column: auto; grid-row: auto; order: 2; }
  .blog-post-header-left  { grid-column: auto; grid-row: auto; order: 3; }
  .blog-toc {
    position: static;
    background: #fff;
    border: 1px solid #eef0f7;
    border-radius: 12px;
    padding: 16px;
  }
  .blog-toc .ss-toc-links { border-left: 0; flex-direction: row; flex-wrap: wrap; gap: 6px 16px; }
  .blog-toc .ss-toc-link { padding: 6px 0; border-radius: 0; background: none; }
  .blog-toc .ss-toc-link::before { display: none; }
  .blog-toc .ss-toc-link.is-active { background: none; color: #3661ed; }
}
@media (max-width: 639px) {
  .blog-featured-section { padding-top: 104px; }
  .blog-list-section { padding-top: 40px; padding-bottom: 64px; }
  .blog-article-hero { padding-top: 48px; padding-bottom: 48px; }
  .blog-article-body { padding-top: 48px; padding-bottom: 64px; }
  .blog-post-header-left { gap: 20px; }
}

/* Smooth scroll for TOC anchor jumps (scoped to blog pages — blog.css only
   loads here). Respects reduced-motion preference. */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Anchor scroll-margin so headings clear the navbar when jumped to */
.blog-article-content h2[id] { scroll-margin-top: 100px; }

/* ===== TL;DR box — primary/100 header, primary/50 body, grey/100 border ===== */
.blog-tldr {
  border: 1px solid #EEF0F7;        /* grey/100 */
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 40px;
}
.blog-tldr-header {
  background: #E0EBFE;              /* primary/100 */
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: #232532;                  /* grey/900 */
}
.blog-tldr-header svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.blog-tldr-body {
  background: #F5F8FF;             /* primary/50 */
  padding: 24px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #2d3044;
}
.blog-tldr-body > * + * { margin-top: 1em; }
.blog-tldr-body > *:first-child { margin-top: 0; }
.blog-tldr-body > *:last-child { margin-bottom: 0; }
.blog-tldr-body ul,
.blog-tldr-body ol { padding-left: 1.4em; }
.blog-tldr-body li + li { margin-top: 0.4em; }

/* ===== FAQ section (accordion reuses .mktg-faq-* styles from marketing.css) ===== */
.blog-faq {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid #d4d9ea;
}
.blog-faq-heading {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #1f212e;
  margin: 0 0 24px;
}
/* FAQ accordion — self-contained (copied from marketing.css so blog pages
   don't need to load marketing.min.css). JS toggles .is-open (js/main.js). */
.mktg-faq-list {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.mktg-faq-item {
  border-bottom: 1px solid var(--color-neutral-300);
  padding-bottom: 32px;
}
.mktg-faq-item:last-child { border-bottom: none; padding-bottom: 0; }
.mktg-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  line-height: 24px;
  transition: color 0.15s;
}
.mktg-faq-question:hover { color: var(--color-primary-500); }
.mktg-faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--color-neutral-100);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-neutral-800);
  transition: background 0.2s ease;
}
.mktg-faq-icon .faq-icon-minus { display: none; }
.mktg-faq-item.is-open .mktg-faq-icon .faq-icon-plus { display: none; }
.mktg-faq-item.is-open .mktg-faq-icon .faq-icon-minus { display: block; }
.mktg-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, margin-top 0.25s ease;
  margin-top: 0;
}
.mktg-faq-item.is-open .mktg-faq-answer {
  max-height: 1200px;   /* generous so long imported answers don't clip */
  margin-top: 16px;
}
.mktg-faq-answer p {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 24px;
}

/* ===== Article end — copy link + author bio ===== */
.blog-article-end {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid #d4d9ea;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: flex-start;
}
.blog-copy-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #52577a;
  background: #fff;
  border: 1px solid #d4d9ea;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.blog-copy-link:hover,
.blog-copy-link.is-copied {
  color: #3661ed;
  border-color: #3661ed;
}
.blog-end-authors {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}
.blog-end-author {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.blog-end-author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #f8f9fc;
  display: block;
}
.blog-end-author-name {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: #1f212e;
}
.blog-end-author-role {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #757a97;
}

.blog-article-content {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #2d3044;
}
.blog-article-content > * + * { margin-top: 1.2em; }
.blog-article-content h2 {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #1f212e;
  margin-top: 2em;
}
.blog-article-content h3 {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 22px;
  line-height: 1.3;
  color: #1f212e;
  margin-top: 1.8em;
}
.blog-article-content a {
  color: #3661ed;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.blog-article-content ul,
.blog-article-content ol {
  padding-left: 1.4em;
}
.blog-article-content li + li { margin-top: 0.4em; }
.blog-article-content code {
  font-family: 'Geist Mono', monospace;
  font-size: 0.9em;
  background: #f8f9fc;
  padding: 2px 6px;
  border-radius: 4px;
}
.blog-article-content pre {
  background: #1f212e;
  color: #f4f5fa;
  padding: 20px 24px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  line-height: 1.6;
}
.blog-article-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}
/* Blockquotes render as the styled quote-box (gradient icon injected by the build). */
.blog-article-content blockquote {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  margin: 2em 0;
  padding: 20px 24px;
  border-radius: 16px;
  border-left: 4px solid #3661ED;
  background: #fff;
  box-shadow: 0 4px 4px 0 rgba(122, 122, 122, 0.04);
  font-style: normal;
}
.blog-article-content blockquote .blog-quote-icon {
  flex-shrink: 0;
  width: 30px;
  height: 20px;
}
.blog-article-content blockquote p {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 28px;
  color: #52577A;
}
/* When a quote has an attribution line (a 2nd+ paragraph), style it like quote-author. */
.blog-article-content blockquote p:last-child:not(:first-child) {
  font-weight: 500;
  color: #232532;
}
@media (max-width: 639px) {
  .blog-article-content blockquote { padding: 20px; gap: 10px; }
}
/* Reddit post embed: reddit's widgets.js swaps the blockquote for an iframe.
   Strip our quote-box styling off the fallback and keep the iframe in-column. */
.blog-article-content .blog-reddit-embed { margin: 2em 0; }
.blog-article-content .blog-reddit-embed iframe { max-width: 100%; }
.blog-article-content blockquote.reddit-embed-bq {
  display: block;
  margin: 0;
  padding: 16px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.blog-article-content blockquote.reddit-embed-bq .blog-quote-icon { display: none; }
.blog-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
/* Responsive 16:9 video embed (YouTube etc.) */
.blog-article-content .blog-video {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin: 2em 0;
  background: #000;
}
.blog-article-content .blog-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* Map embeds render at their own ratio (e.g. 800×600) — use 4:3 + light bg so
   there's no black letterbox bar beside the map canvas. */
.blog-article-content .blog-embed-map {
  aspect-ratio: 4 / 3;
  max-width: 100%;
  background: transparent;   /* override .blog-video's black bg */
  border: none;
}
/* The embedded map renders an 800px-wide canvas inside a cross-origin iframe we
   can't style — clip it to the iframe box so it never pushes the page wider. */
.blog-article-content .blog-embed-map iframe { max-width: 100%; }

/* ===== Callout box (dashed border, used for key takeaways / signals) ===== */
.blog-article-content .callout {
  position: relative;
  width: 100%;
  margin: 2em 0;
  padding: 20px 24px;
  background: #f8f9fc;
  border-radius: 16px;
}
.blog-article-content .callout::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Crect width='100%25' height='100%25' fill='none' stroke='%2390a6ee' stroke-width='4' stroke-dasharray='8 8' rx='16' ry='16'/%3E%3C/svg%3E");
}
.blog-article-content .callout p {
  position: relative;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 28px;
  color: #52577A;
}
@media (max-width: 639px) {
  .blog-article-content .callout { padding: 20px; }
}

/* ===== Illustration box (SVG inside a primary/500 dashed border + gradient fill) ===== */
.blog-article-content .blog-illustration {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 2em 0;
  padding: 8px 28px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f5f8ff 0%, #e0ebfe 100%);
}
.blog-article-content .blog-illustration::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Crect width='100%25' height='100%25' fill='none' stroke='%233661ED' stroke-width='4' stroke-dasharray='8 8' rx='16' ry='16'/%3E%3C/svg%3E");
}
.blog-article-content .blog-illustration img {
  position: relative;
  flex-shrink: 0;
  width: 160px;
  height: 160px;
  max-width: 100%;
  border-radius: 0;
}
.blog-article-content .blog-illustration p {
  position: relative;
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #232532;
}
.blog-article-content .blog-illustration--right {
  flex-direction: row-reverse;
}
@media (max-width: 639px) {
  .blog-article-content .blog-illustration {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 24px 20px;
  }
}

/* ===== Tables ===== */
/* The wrapper carries the grey/100 border + rounded corners and handles
   horizontal scroll on small screens. (Injected around every <table> by the build.) */
.blog-table-wrap {
  margin: 2em 0;
  max-width: 100%;
  border: 1px solid #eef0f7;     /* grey/100 */
  border-radius: 12px;
  overflow: hidden;
}
.blog-article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
}
.blog-article-content thead th {
  background: #f8f9fc;
  text-align: left;
  font-weight: 600;
  color: #1f212e;
  padding: 16px 20px;
  border-bottom: 1px solid #e3e6f0;
  vertical-align: top;
}
.blog-article-content tbody td {
  padding: 16px 20px;
  border-bottom: 1px solid #eef0f7;
  color: #52577a;
  line-height: 1.5;
  vertical-align: top;
}
.blog-article-content tbody tr:last-child td { border-bottom: none; }
.blog-article-content tbody td:first-child {
  color: #1f212e;
  font-weight: 500;
}
/* Tablet: tighten padding/type so wide tables still fit. */
@media (max-width: 991px) {
  .blog-article-content table { font-size: 14px; }
  .blog-article-content thead th,
  .blog-article-content tbody td { padding: 14px 16px; }
}
/* Mobile: let the wrapper scroll horizontally; keep a readable min column width. */
@media (max-width: 639px) {
  .blog-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  .blog-article-content table { min-width: 520px; font-size: 13px; }
  .blog-article-content thead th,
  .blog-article-content tbody td { padding: 12px 14px; }
}

.blog-article-footer {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid #e3e6f0;
}
.blog-article-back {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #3661ed;
  text-decoration: none;
}
.blog-article-back:hover { text-decoration: underline; }

@media (max-width: 639px) {
  .blog-article { padding-top: 32px; padding-bottom: 64px; }
  .blog-article-content { font-size: 16px; }
  .blog-article-cover { margin-left: 0; margin-right: 0; margin-bottom: 32px; }
}
