.blog-main {
  padding-top: 132px;
  padding-bottom: 64px;
}

.nav-links a[aria-current="page"] {
  color: var(--text);
}

.lang-switch a.lang-btn {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.blog-hero {
  margin-bottom: 40px;
}

.blog-hero h1 {
  font-size: 2.8rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border-radius: var(--radius);
}

.post-card h2 {
  font-size: 1.2rem;
  line-height: 1.3;
}

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

.post-card h2 a:hover {
  color: var(--accent);
}

.post-card p {
  margin: 0;
  color: var(--muted);
}

.post-more {
  margin-top: auto;
  color: var(--accent);
  font-weight: 750;
  text-decoration: none;
}

.post-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 36px;
}

.breadcrumbs {
  max-width: 760px;
  margin: 0 auto 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.post,
.post-related {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
}

.post-header h1 {
  font-size: 2.6rem;
}

.post-header .post-meta {
  margin-top: 16px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.post-tags span {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.prose {
  margin-top: 32px;
  font-size: 1.06rem;
}

.prose h2 {
  margin: 44px 0 14px;
  font-size: 1.7rem;
}

.prose h3 {
  margin: 28px 0 10px;
  font-size: 1.24rem;
}

.prose p,
.prose li {
  line-height: 1.75;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose a {
  color: var(--accent);
}

.prose blockquote {
  margin: 24px 0;
  padding: 4px 20px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.prose table {
  display: block;
  width: 100%;
  margin: 24px 0;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--surface-muted);
}

.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-muted);
  font-size: 0.9em;
}

/* Wide diagrams scroll inside their box instead of stretching the page on phones. */
.prose pre {
  max-width: 100%;
  margin: 24px 0;
  padding: 16px 18px;
  overflow-x: auto;
  border-radius: 14px;
  background: var(--surface-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.prose pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}

.post-column {
  min-width: 0;
}

.post-faq {
  margin-top: 48px;
}

.post-faq h2 {
  margin-bottom: 16px;
  font-size: 1.7rem;
}

.post-faq details {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.post-faq summary {
  cursor: pointer;
  font-weight: 720;
}

.post-faq details p {
  margin: 10px 0 0;
  color: var(--muted);
}

.prose .cite {
  margin-left: 1px;
  font-size: 0.72em;
  line-height: 0;
}

.prose .cite a {
  text-decoration: none;
  font-weight: 700;
}

.post-sources {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.post-sources h2 {
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.post-sources ol {
  margin: 0;
  padding-left: 1.4em;
  color: var(--muted);
  font-size: 0.92rem;
}

.post-sources li {
  margin: 8px 0;
  line-height: 1.5;
  scroll-margin-top: 120px;
}

.post-sources li:target {
  color: var(--text);
}

.post-sources a {
  color: var(--accent);
  overflow-wrap: anywhere;
}

.post-related {
  margin-top: 48px;
  padding: 24px 32px;
  border-radius: var(--radius);
}

.post-related h2 {
  font-size: 1.2rem;
}

.post-related ul {
  margin: 12px 0 0;
  padding-left: 1.2em;
}

.post-related li {
  margin: 8px 0;
}

.post-related a {
  color: var(--text);
}

.post-thumb {
  display: block;
  margin: -24px -24px 6px;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  aspect-ratio: 16 / 9;
  background: var(--surface-muted);
}

.post-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-thumb img {
  transform: scale(1.03);
}

.post-cover,
.post-figure {
  margin: 0;
}

.post-cover {
  margin-top: 28px;
}

.post-cover img,
.post-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.post-figure {
  margin: 32px 0;
}

.post-infographic img {
  border: 1px solid var(--line);
}

.post-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

.infographic {
  margin: 36px 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.infographic .ig-title {
  margin: 0 0 20px;
  font-size: 1.15rem;
  font-weight: 750;
  line-height: 1.35;
}

.ig-process ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ig-process li {
  position: relative;
  padding: 18px 16px 16px;
  border-radius: 16px;
  background: var(--surface-solid);
  line-height: 1.45;
}

.ig-process li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 34px;
  right: -12px;
  width: 10px;
  height: 2px;
  background: var(--accent);
}

.ig-num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--surface-solid);
  font-weight: 800;
}

.ig-process strong {
  display: block;
  font-size: 0.98rem;
}

.ig-process li p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.ig-grid {
  display: grid;
  gap: 8px;
}

.ig-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) 1fr 1fr;
  gap: 8px;
  align-items: stretch;
}

.ig-row > * {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.ig-row strong {
  display: flex;
  align-items: center;
  padding-left: 0;
}

.ig-head span {
  padding-top: 0;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ig-before {
  background: var(--surface-solid);
  color: var(--muted);
}

.ig-after {
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-solid));
}

.ig-label {
  display: none;
}

/* House ads: sidebar, mid-article strip, end banner */

.promo-side {
  display: none;
}

@media (min-width: 1100px) {
  .post-layout.with-side {
    display: grid;
    grid-template-columns: minmax(0, 760px) 260px;
    justify-content: center;
    gap: 40px;
  }

  .promo-side {
    display: block;
  }

  .promo-side-card {
    position: sticky;
    top: 120px;
    margin-top: 44px;
    padding: 22px;
    border-radius: var(--radius);
  }
}

.promo-side-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
}

.promo-side-card p:not(.promo-side-title) {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.promo-side-card .btn {
  width: 100%;
  min-height: 44px;
}

.promo-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin: 32px 0;
  padding: 16px 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-solid));
}

.promo-strip p {
  margin: 0;
  font-weight: 750;
  line-height: 1.4;
}

.promo-strip .btn {
  min-height: 42px;
  font-size: 0.94rem;
  text-decoration: none;
}

.promo-end {
  max-width: 760px;
  margin: 48px auto 0;
  padding: 32px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0f766e, #134e4a);
  color: #ffffff;
}

.promo-end-title {
  margin: 0 0 10px;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
}

.promo-end p:not(.promo-end-title) {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
}

.promo-end .promo-end-btn {
  border-color: #ffffff;
  background: #ffffff;
  color: #134e4a;
}

@media (max-width: 980px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .blog-main {
    width: calc(100% - 32px);
    padding-top: 112px;
  }

  .blog-hero h1,
  .post-header h1 {
    font-size: 2rem;
  }

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

  .prose h2 {
    font-size: 1.4rem;
  }

  .post-related,
  .promo-end {
    padding: 24px 20px;
  }

  .promo-strip .btn {
    width: 100%;
  }

  .infographic {
    padding: 20px 16px;
  }

  .ig-process li:not(:last-child)::after {
    display: none;
  }

  .ig-head {
    display: none;
  }

  .ig-row {
    grid-template-columns: 1fr;
    padding-bottom: 8px;
  }

  .ig-row strong {
    padding: 4px 0 0;
  }

  .ig-label {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
}
