.blog-library-main {
  padding: 36px 20px 86px;
}

.blog-shell {
  max-width: 1120px;
  margin: 0 auto;
}

.blog-hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(18, 18, 18, 0.08);
  padding: 38px 34px;
  background:
    radial-gradient(circle at 8% 22%, rgba(243, 106, 28, 0.2), transparent 50%),
    radial-gradient(circle at 88% 8%, rgba(18, 18, 18, 0.08), transparent 40%),
    linear-gradient(145deg, #ffffff 8%, #f9f2ee 42%, #f5f6f9 100%);
  box-shadow: 0 16px 38px rgba(18, 18, 18, 0.08);
}

.blog-hero .eyebrow {
  margin-bottom: 10px;
}

.blog-hero h1 {
  max-width: 660px;
}

.blog-hero p {
  margin-top: 12px;
  max-width: 700px;
  color: var(--muted);
  font-size: 18px;
}

.blog-filter-shell {
  margin-top: 24px;
  border-radius: 20px;
  border: 1px solid rgba(18, 18, 18, 0.08);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(18, 18, 18, 0.07);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.blog-filter-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(360px, 100%);
  background: rgba(18, 18, 18, 0.06);
  border-radius: 999px;
  padding: 6px;
}

.blog-filter-tab {
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease;
}

.blog-filter-tab.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 5px 16px rgba(18, 18, 18, 0.12);
}

.blog-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blog-chip {
  border: 1px solid rgba(18, 18, 18, 0.14);
  background: #ffffff;
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.blog-chip:hover {
  transform: translateY(-1px);
}

.blog-chip.is-selected {
  border-color: rgba(243, 106, 28, 0.5);
  background: rgba(243, 106, 28, 0.1);
  box-shadow: inset 0 0 0 1px rgba(243, 106, 28, 0.18);
}

.blog-filter-tab:focus-visible,
.blog-chip:focus-visible,
.blog-card:focus-visible,
.blog-related-card:focus-visible,
.blog-post-back:focus-visible,
.blog-post-toc-nav a:focus-visible {
  outline: 3px solid rgba(243, 106, 28, 0.38);
  outline-offset: 2px;
}

.blog-grid {
  margin-top: 20px;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.blog-card,
.blog-related-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(18, 18, 18, 0.08);
  box-shadow: 0 12px 26px rgba(18, 18, 18, 0.06);
  padding: 18px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.blog-card:hover,
.blog-related-card:hover {
  transform: translateY(-3px);
  border-color: rgba(243, 106, 28, 0.3);
  box-shadow: 0 16px 34px rgba(18, 18, 18, 0.1);
}

.blog-card h3,
.blog-related-card h3 {
  font-size: 20px;
  line-height: 1.3;
}

.blog-card p,
.blog-related-card p {
  margin: 0;
  color: var(--muted);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.blog-meta-pill {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.blog-meta-pill--type {
  background: rgba(18, 18, 18, 0.06);
  border-color: rgba(18, 18, 18, 0.1);
}

.blog-meta-pill--topic {
  background: rgba(243, 106, 28, 0.09);
  border-color: rgba(243, 106, 28, 0.25);
  color: #7d411a;
}

.blog-card-action {
  margin-top: auto;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-orange);
}

.blog-empty-state {
  margin-top: 22px;
  border: 1px dashed rgba(18, 18, 18, 0.2);
  border-radius: 18px;
  padding: 26px;
  background: #ffffff;
}

.blog-empty-state h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.blog-empty-state p {
  color: var(--muted);
}

.blog-post-main {
  padding: 36px 20px 86px;
}

.blog-post-hero {
  border-radius: 24px;
  border: 1px solid rgba(18, 18, 18, 0.08);
  background:
    radial-gradient(circle at 94% 8%, rgba(243, 106, 28, 0.18), transparent 38%),
    linear-gradient(160deg, #ffffff 4%, #f7f8fb 100%);
  box-shadow: 0 14px 34px rgba(18, 18, 18, 0.08);
  padding: 28px;
}

.blog-post-back {
  display: inline-flex;
  margin-bottom: 14px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}

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

.blog-post-excerpt {
  margin-top: 12px;
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.blog-post-layout {
  margin-top: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 24px;
  align-items: start;
}

.blog-post-body {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(18, 18, 18, 0.08);
  box-shadow: 0 12px 28px rgba(18, 18, 18, 0.06);
  padding: 28px;
}

.blog-post-section + .blog-post-section {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(18, 18, 18, 0.08);
}

.blog-post-section h2 {
  font-size: 26px;
  margin-bottom: 10px;
}

.blog-post-section p {
  color: #333333;
  margin: 0 0 10px;
  line-height: 1.72;
  font-size: 17px;
}

.blog-post-side {
  position: sticky;
  top: 102px;
  display: grid;
  gap: 16px;
}

.blog-post-toc-card,
.blog-related {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(18, 18, 18, 0.08);
  box-shadow: 0 10px 24px rgba(18, 18, 18, 0.06);
  padding: 16px;
}

.blog-post-toc-card h2,
.blog-related h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.blog-post-toc-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.blog-post-toc-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.45;
}

.blog-related-grid {
  display: grid;
  gap: 12px;
}

.blog-post-status {
  margin-top: 18px;
  border-radius: 14px;
  border: 1px solid rgba(18, 18, 18, 0.1);
  background: #ffffff;
  padding: 14px;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .blog-chip,
  .blog-card,
  .blog-related-card,
  .blog-filter-tab {
    transition: none;
  }
}

@media (max-width: 980px) {
  .blog-post-layout {
    grid-template-columns: 1fr;
  }

  .blog-post-side {
    position: static;
    order: 2;
  }

  .blog-post-body {
    order: 1;
  }
}

@media (max-width: 640px) {
  .blog-library-main,
  .blog-post-main {
    padding: 24px 16px 68px;
  }

  .blog-hero,
  .blog-filter-shell,
  .blog-post-hero,
  .blog-post-body,
  .blog-post-toc-card,
  .blog-related,
  .blog-card,
  .blog-related-card {
    border-radius: 16px;
  }

  .blog-hero {
    padding: 28px 20px;
  }

  .blog-hero p,
  .blog-post-excerpt {
    font-size: 16px;
  }

  .blog-post-hero,
  .blog-post-body {
    padding: 20px;
  }

  .blog-post-section h2 {
    font-size: 22px;
  }

  .blog-post-section p {
    font-size: 16px;
  }
}
