/* Blog pages extend the existing STELLINE layout without changing the main page. */
.blog-page {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--page);
}

.blog-page main {
  flex: 0 0 auto;
}

.blog-page .site-header {
  background: rgba(244, 247, 251, 0.96);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(14px);
}

.blog-page .site-nav a {
  color: var(--ink);
  text-shadow: none;
}

.blog-page .site-nav a:hover,
.blog-page .site-nav a:focus-visible,
.blog-page .site-nav a[aria-current="page"] {
  color: var(--blue);
}

.blog-hero h1 {
  max-width: 760px;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: clamp(2.25rem, 3vw, 2.5rem);
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.blog-hero {
  padding-top: 68px;
  padding-bottom: 18px;
}

.blog-hero-copy {
  max-width: 760px;
}

.blog-hero .eyebrow {
  color: var(--deep-blue);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
}

.blog-lead {
  max-width: 64ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.94rem, 1.2vw, 1rem);
  line-height: 1.45;
  text-wrap: pretty;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.blog-filter {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.blog-filter:hover {
  border-color: rgba(47, 107, 255, 0.34);
  color: var(--deep-blue);
}

.blog-filter.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  box-shadow: none;
}

.blog-feed {
  padding-top: 10px;
  padding-bottom: 28px;
}

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

.blog-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: none;
}

.blog-card[hidden] {
  display: none;
}

.blog-card-media {
  display: block;
  width: 100%;
  min-height: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--dark-blue);
}

.blog-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center 42%;
  transition: transform 260ms ease;
}

.blog-card-media:hover img {
  transform: scale(1.015);
}

.blog-card-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 16px;
}

.blog-card-category {
  margin: 0 0 8px;
  color: var(--deep-blue);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-card h2 {
  display: -webkit-box;
  max-width: 100%;
  margin-bottom: 8px;
  overflow: hidden;
  font-size: clamp(1.38rem, 1.8vw, 1.5rem);
  line-height: 1.15;
  text-wrap: balance;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.blog-card-description {
  display: -webkit-box;
  max-width: 100%;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.42;
  text-wrap: pretty;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  margin-top: auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.blog-read-more:hover {
  background: #245bea;
  transform: translateY(-1px);
}

.blog-empty {
  margin: 0;
  color: var(--muted);
}

.blog-back {
  display: inline-flex;
  margin-bottom: 20px;
  color: var(--deep-blue);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.blog-back:hover {
  color: var(--blue);
}

.article-shell {
  padding-top: 52px;
  padding-bottom: 52px;
}

.article-header,
.article-figure,
.article-closing {
  width: min(100%, 840px);
  margin-inline: auto;
}

.article-body {
  width: min(100%, 72ch);
  margin-inline: auto;
}

.article-header h1 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: clamp(2rem, 3vw, 2.4rem);
  line-height: 1.08;
}

.article-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.4;
}

.article-figure {
  height: min(400px, calc((100vw - 32px) * 0.6667));
  margin-top: 22px;
  margin-bottom: 26px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--dark-blue);
  box-shadow: var(--shadow-sm);
}

.article-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.article-body {
  font-size: clamp(1.0625rem, 1.2vw, 1.125rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.article-body p {
  margin: 0 0 0.39em;
}

.article-body > p:last-child {
  margin-bottom: 0;
}

.article-body h2 {
  margin: 0.74em 0 0.26em;
  font-size: 1.875rem;
  line-height: 1.2;
  text-wrap: balance;
}

.article-body blockquote {
  margin: 0.72em 0;
  padding: 0 0 0 20px;
  border-left: 3px solid var(--blue);
  color: var(--deep-blue);
  font-size: 1.12em;
  font-weight: 600;
}

.article-closing {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.article-end-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-end-nav .button {
  min-height: 44px;
  padding: 9px 16px;
  font-size: 0.875rem;
}

.article-end-nav .button-primary {
  background: #245bea;
}

.article-end-nav .button-primary:hover {
  background: #1d4fd2;
}

.article-nav-secondary {
  border-color: rgba(16, 24, 39, 0.24);
  background: transparent;
  color: var(--deep-blue);
}

.article-nav-secondary:hover {
  border-color: rgba(47, 107, 255, 0.58);
  background: rgba(47, 107, 255, 0.06);
}

.article-signature {
  margin: 16px 0 0;
  color: var(--deep-blue);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0.035em;
}

.article-page .article-shell {
  padding-bottom: 14px;
}

.article-page .footer-inner.footer-inner-stelline.footer-line {
  padding-top: 4px;
  padding-bottom: 4px;
  font-size: 0.6875rem;
  line-height: 1.25;
}

@media (min-width: 700px) and (max-width: 1099px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 699px) {
  .blog-hero {
    padding-top: 48px;
    padding-bottom: 12px;
  }

  .blog-hero h1 {
    margin-bottom: 6px;
    font-size: clamp(2rem, 8.2vw, 2.25rem);
  }

  .blog-filters {
    gap: 5px;
    margin-top: 8px;
  }

  .blog-filter {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .blog-feed {
    padding-bottom: 24px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .blog-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .blog-card-media,
  .blog-card-media img {
    min-height: 0;
  }

  .blog-card-media {
    aspect-ratio: 4 / 3;
  }

  .blog-card-media img {
    aspect-ratio: auto;
  }

  .blog-card-copy {
    padding: 16px;
  }

  .blog-card h2 {
    font-size: 1.38rem;
  }

  .article-shell {
    padding-top: 48px;
    padding-bottom: 14px;
  }

  .blog-back {
    margin-bottom: 20px;
  }

  .article-header h1 {
    font-size: clamp(1.9rem, 8vw, 2.15rem);
    line-height: 1.08;
  }

  .article-figure {
    height: calc((100vw - 52px) * 0.6667);
    min-height: 0;
    margin-top: 18px;
    margin-bottom: 22px;
    border-radius: 16px;
  }

  .article-figure img {
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
  }

  .article-body {
    font-size: 1rem;
    line-height: 1.48;
  }

  .article-body h2 {
    margin-top: 0.72em;
    margin-bottom: 0.24em;
    font-size: 1.5625rem;
    line-height: 1.18;
  }

  .article-closing {
    margin-top: 10px;
    padding-top: 10px;
  }

  .article-end-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-end-nav .button {
    width: 100%;
    justify-content: center;
  }

  .article-signature {
    margin-top: 14px;
  }

  .article-page .footer-inner.footer-inner-stelline.footer-line {
    gap: 2px 6px;
    padding-top: 4px;
    padding-bottom: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-card-media img,
  .blog-read-more {
    transition: none;
  }
}
