:root {
  --blog-reading-width: 46rem;
  --blog-sidebar-width: 18rem;
}

.blog-hero {
  padding: clamp(4.5rem, 8vw, 7rem) 0 clamp(3.5rem, 7vw, 5.5rem);
  background:
    linear-gradient(120deg, rgba(18, 48, 71, 0.96), rgba(24, 72, 92, 0.92)),
    radial-gradient(circle at 78% 22%, rgba(226, 164, 66, 0.24), transparent 30%);
  color: #fff;
}

.blog-hero h1,
.blog-hero h2,
.blog-hero strong {
  color: #fff;
}

.blog-hero .lead {
  color: rgba(255, 255, 255, 0.84);
}

.blog-hero__content {
  max-width: 52rem;
}

.blog-hero__meta,
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  color: var(--color-text-muted);
  font-size: 0.94rem;
}

.blog-hero__meta {
  color: rgba(255, 255, 255, 0.78);
}

.blog-grid {
  display: grid;
  gap: 1.5rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
}

.post-card__visual {
  display: grid;
  min-height: 11rem;
  place-items: center;
  padding: 1.5rem;
  background:
    linear-gradient(145deg, rgba(18, 48, 71, 0.96), rgba(31, 89, 109, 0.9)),
    #123047;
  color: #fff;
}

.post-card__visual span {
  display: inline-grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
}

.post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.post-card__body h2,
.post-card__body h3,
.post-card__body p {
  margin: 0;
}

.post-card__body .post-card__link {
  margin-top: auto;
  font-weight: 750;
}

.topic-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(226, 164, 66, 0.16);
  color: #7a4b00;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.blog-note {
  border-left: 0.25rem solid var(--color-accent, #e2a442);
  padding: 1rem 1.25rem;
  background: #fff8eb;
}

.article-header {
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem);
  background: linear-gradient(180deg, #eef5f6 0%, #fff 100%);
}

.breadcrumbs {
  margin-bottom: 2rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li:not(:last-child)::after {
  margin-left: 0.55rem;
  content: "/";
  color: #8a969d;
}

.article-header__inner {
  max-width: 56rem;
}

.article-header h1 {
  max-width: 54rem;
}

.article-deck {
  max-width: 50rem;
  font-size: clamp(1.12rem, 2.2vw, 1.35rem);
  line-height: 1.65;
  color: var(--color-text-muted);
}

.article-layout {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.article-body {
  max-width: var(--blog-reading-width);
}

.article-body > * + * {
  margin-top: 1.35rem;
}

.article-body h2 {
  margin-top: 3.25rem;
  scroll-margin-top: 7rem;
}

.article-body h3 {
  margin-top: 2.25rem;
  scroll-margin-top: 7rem;
}

.article-body p,
.article-body li {
  font-size: 1.04rem;
  line-height: 1.78;
}

.article-body ul,
.article-body ol {
  padding-left: 1.35rem;
}

.article-body li + li {
  margin-top: 0.65rem;
}

.article-body a {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

.article-summary {
  margin: 0 0 2.5rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid #d7e2e6;
  border-radius: var(--radius-lg, 1rem);
  background: #f7fafb;
}

.article-summary h2 {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
}

.article-summary ul {
  margin: 0;
}

.article-sidebar {
  display: grid;
  gap: 1.25rem;
}

.article-sidebar__box {
  padding: 1.35rem;
  border: 1px solid #d7e2e6;
  border-radius: var(--radius-lg, 1rem);
  background: #fff;
}

.article-sidebar__box h2,
.article-sidebar__box h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.article-sidebar__box ul {
  margin: 0;
  padding-left: 1.1rem;
}

.article-sidebar__box li + li {
  margin-top: 0.55rem;
}

.content-warning,
.content-tip {
  margin: 2rem 0;
  padding: 1.25rem 1.4rem;
  border-radius: 0.75rem;
}

.content-warning {
  border-left: 0.3rem solid #b76b34;
  background: #fff5ed;
}

.content-tip {
  border-left: 0.3rem solid #287a65;
  background: #eff9f5;
}

.content-warning strong,
.content-tip strong {
  display: block;
  margin-bottom: 0.35rem;
}

.comparison-table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  min-width: 9rem;
  padding: 0.9rem;
  border: 1px solid #d7e2e6;
  text-align: left;
  vertical-align: top;
}

.comparison-table th {
  background: #123047;
  color: #fff;
}

.article-cta {
  margin-top: 3.5rem;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border-radius: var(--radius-lg, 1rem);
  background: #123047;
  color: #fff;
}

.article-cta h2,
.article-cta h3,
.article-cta strong {
  color: #fff;
}

.article-cta p {
  color: rgba(255, 255, 255, 0.82);
}

.author-box {
  display: grid;
  gap: 1.25rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #d7e2e6;
}

.author-box__image {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
}

.author-box h2,
.author-box p {
  margin: 0;
}

.related-posts {
  background: #f2f6f7;
}

.related-posts__grid {
  display: grid;
  gap: 1rem;
}

.related-link {
  display: block;
  height: 100%;
  padding: 1.25rem;
  border: 1px solid #d7e2e6;
  border-radius: 0.85rem;
  background: #fff;
  text-decoration: none;
}

.related-link strong {
  display: block;
  margin-bottom: 0.45rem;
  color: #123047;
}

.related-link span {
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

@media (min-width: 44rem) {
  .blog-grid,
  .related-posts__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .author-box {
    grid-template-columns: auto 1fr;
    align-items: start;
  }
}

@media (min-width: 64rem) {
  .blog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .blog-grid .post-card:first-child {
    grid-column: span 2;
  }

  .article-layout {
    grid-template-columns: minmax(0, var(--blog-reading-width)) var(--blog-sidebar-width);
  }

  .article-sidebar {
    position: sticky;
    top: 7rem;
  }

  .related-posts__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media print {
  .article-sidebar,
  .related-posts,
  .article-cta {
    display: none;
  }

  .article-layout {
    display: block;
  }
}
