.blog-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.blog-shell,
.blog-shell button,
.blog-shell input,
.blog-shell textarea {
  font-family: var(--font-body);
}

.blog-home,
.blog-home button,
.blog-home input,
.blog-home textarea {
  font-family: var(--font-body);
}

.blog-home {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 4rem;
}

.blog-home-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border-color) 92%, transparent);
  border-radius: 1.65rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)),
    color-mix(in srgb, var(--bg-primary) 94%, var(--bg-secondary));
  box-shadow: 0 12px 30px var(--shadow-color);
}

.dark .blog-home-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    color-mix(in srgb, var(--bg-primary) 96%, var(--bg-secondary));
}

.blog-home a:not(.blog-button):not(.blog-text-link) {
  text-decoration: none;
}

.blog-home-masthead,
.blog-home-top,
.blog-home-shelf-grid,
.blog-home-archive-grid,
.blog-home-stat-row,
.blog-home-actions {
  display: grid;
  gap: 1rem;
}

.blog-home-masthead {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: start;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.blog-home-page-mark,
.blog-home-eyebrow,
.blog-home-meta-label,
.blog-home-mini-meta {
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.blog-home-page-mark,
.blog-home-eyebrow,
.blog-home-meta-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-tertiary);
}

.blog-home-title,
.blog-home-top h2,
.blog-home-shelf-header h2,
.blog-home-cta h2,
.blog-home-empty h2,
.blog-home-lead h2,
.blog-home-trending h2,
.blog-home-story h3,
.blog-home-archive-card h3 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--text-primary);
}

.blog-home-title {
  font-size: clamp(3.25rem, 7vw, 5.1rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.blog-home-deck,
.blog-home-meta-copy,
.blog-home-summary,
.blog-home-trending p,
.blog-home-story p,
.blog-home-archive-card p,
.blog-home-empty p,
.blog-home-cta p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.blog-home-masthead-copy {
  display: grid;
  gap: 1rem;
  max-width: 42rem;
}

.blog-home-masthead-meta {
  display: grid;
  gap: 1rem;
  align-content: start;
  padding: 1.5rem;
}

.blog-home-stat-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.blog-home-stat {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  background: color-mix(in srgb, var(--bg-secondary) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--border-color) 90%, transparent);
}

.blog-home-stat strong {
  font-size: 1.55rem;
  line-height: 1;
  color: var(--text-primary);
}

.blog-home-stat span {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.blog-home-top {
  grid-template-columns: 1fr;
  margin-bottom: 2.25rem;
}

.blog-home-lead {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 1.25rem;
  padding: 1.45rem;
  min-height: 24rem;
}

.blog-home-lead-copy,
.blog-home-story-copy,
.blog-home-mini-copy,
.blog-home-rail-header,
.blog-home-shelf-header,
.blog-home-cta,
.blog-home-empty {
  display: grid;
  gap: 0.75rem;
}

.blog-home-lead-copy {
  align-content: center;
  padding: 0.1rem 0.15rem 0.1rem 0.2rem;
}

.blog-home-lead h2 {
  font-size: clamp(2.2rem, 3.7vw, 3.35rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.blog-home-standfirst {
  margin: 0;
  max-width: 38rem;
  font-size: 1rem;
  line-height: 1.62;
  color: var(--text-primary);
}

.blog-home-meta,
.blog-home-mini-meta {
  color: var(--text-tertiary);
}

.blog-home-mini-meta {
  font-size: 0.7rem;
  font-weight: 700;
}

.blog-home-jump-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.blog-home-jump-link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border: 1px solid color-mix(in srgb, var(--border-color) 92%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-secondary) 88%, transparent);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.blog-home-jump-link:hover,
.blog-home-jump-link:focus-visible {
  background: color-mix(in srgb, var(--bg-secondary) 96%, var(--bg-primary));
  border-color: color-mix(in srgb, var(--link-color) 28%, var(--border-color));
  color: var(--text-primary);
  transform: translateY(-1px);
}

.blog-home-actions {
  grid-template-columns: repeat(2, max-content);
  align-items: center;
}

.blog-home-lead-media,
.blog-home-story-media,
.blog-home-mini-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.2rem;
  background: color-mix(in srgb, var(--bg-secondary) 90%, transparent);
}

.blog-home-lead-media {
  min-height: 18rem;
  max-height: 24rem;
  aspect-ratio: 5 / 4;
  margin: 0;
}

.blog-home-placeholder {
  display: grid;
  place-items: end start;
  padding: 1rem;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--link-color) 28%, transparent), transparent 45%),
    linear-gradient(145deg, color-mix(in srgb, var(--bg-secondary) 85%, transparent), color-mix(in srgb, var(--bg-tertiary) 72%, transparent));
}

.blog-home-placeholder span {
  display: inline-flex;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--text-primary);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dark .blog-home-placeholder span {
  background: rgba(17, 24, 39, 0.58);
  color: var(--text-primary);
}

.blog-home-trending {
  display: grid;
  gap: 1rem;
  align-content: start;
  padding: 1.35rem;
  max-width: 100%;
}

.blog-home-rail-header {
  gap: 0.55rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border-color) 84%, transparent);
}

.blog-home-trending-list,
.blog-home-story-stack,
.blog-home-story-grid {
  display: grid;
  gap: 0.8rem;
}

.blog-home-mini-card {
  display: grid;
  grid-template-columns: auto 72px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding-top: 0.1rem;
}

.blog-home-rank {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1;
  color: var(--text-tertiary);
}

.blog-home-mini-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 0.95rem;
}

.blog-home-mini-copy h3,
.blog-home-story h3,
.blog-home-archive-card h3 {
  font-size: 1.2rem;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.blog-home-mini-copy p:last-child {
  color: var(--text-secondary);
  line-clamp: 2;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.blog-home-shelf,
.blog-home-archive {
  margin-top: 2rem;
}

.blog-home-shelf-header {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.78fr);
  align-items: end;
  gap: 1.25rem;
  margin-bottom: 0.9rem;
}

.blog-home-shelf-header h2,
.blog-home-cta h2,
.blog-home-empty h2 {
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.blog-home-shelf-grid {
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.72fr) minmax(220px, 0.6fr);
  align-items: start;
}

.blog-home-story,
.blog-home-archive-card {
  padding: 1rem;
}

.blog-home-story--feature {
  display: grid;
  gap: 0.85rem;
}

.blog-home-story-media {
  aspect-ratio: 1.65 / 1;
  max-height: 14.5rem;
}

.blog-home-story-grid {
  grid-template-columns: 1fr;
}

.blog-home-compact h3 {
  font-size: 1.12rem;
}

.blog-home-archive-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-home-archive-card {
  display: grid;
  gap: 0.65rem;
  min-height: 100%;
}

.blog-home-archive-subtitle {
  color: var(--text-primary);
}

.blog-home-summary,
.blog-home-story-copy p:last-child,
.blog-home-archive-card p:last-child {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.blog-home-summary,
.blog-home-story-copy p:last-child {
  line-clamp: 3;
  -webkit-line-clamp: 3;
}

.blog-home-archive-card p:last-child {
  line-clamp: 4;
  -webkit-line-clamp: 4;
}

.blog-home-empty,
.blog-home-cta {
  margin-top: 2rem;
  padding: 1.4rem;
}

.blog-home-cta {
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
}

.blog-home-story:hover,
.blog-home-archive-card:hover,
.blog-home-mini-card:hover h3 a,
.blog-home-lead h2 a:hover,
.blog-home-story h3 a:hover,
.blog-home-archive-card h3 a:hover,
.blog-home-mini-copy h3 a:hover {
  color: var(--link-hover);
}

.blog-home-story,
.blog-home-archive-card,
.blog-home-lead,
.blog-home-mini-card {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.blog-home-story:hover,
.blog-home-archive-card:hover,
.blog-home-lead:hover {
  transform: translateY(-2px);
}

.blog-home-story a:focus-visible,
.blog-home-archive-card a:focus-visible,
.blog-home-lead a:focus-visible,
.blog-home-mini-card a:focus-visible {
  outline: 2px solid var(--link-color);
  outline-offset: 4px;
}

.blog-home-empty-copy {
  margin: 0;
  color: var(--text-secondary);
}

.blog-home {
  max-width: 72rem;
  padding-top: 1.75rem;
}

.blog-home--minimal,
.blog-home-layout,
.blog-home-section,
.blog-home-section-header,
.blog-home-list,
.blog-home-stack,
.blog-home-top-item,
.blog-home-top-copy {
  display: grid;
}

.blog-home-layout {
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: start;
}

.blog-home-section {
  gap: 1.5rem;
}

.blog-home-section--top {
  padding-top: 0.25rem;
  border-top: 1px solid color-mix(in srgb, var(--border-color) 85%, transparent);
}

.blog-home-section-header {
  gap: 0.35rem;
}

.blog-home-label,
.blog-home-item-meta {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.blog-home-section-header h1,
.blog-home-section-header h2,
.blog-home-list-item h2,
.blog-home-top-copy h3,
.blog-home-empty h1 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--text-primary);
}

.blog-home-section-header h1,
.blog-home-empty h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.blog-home-section-header h2 {
  font-size: clamp(1.45rem, 2vw, 1.8rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.blog-home-list {
  gap: 0;
}

.blog-home-list-item {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 1.15rem;
  padding: 1.25rem 0;
  border-top: 1px solid color-mix(in srgb, var(--border-color) 82%, transparent);
}

.blog-home-list-item:first-child {
  padding-top: 0.25rem;
  border-top: 0;
}

.blog-home-list-item h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.blog-home-item-image,
.blog-home-top-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.9rem;
  background: color-mix(in srgb, var(--bg-secondary) 88%, transparent);
}

.blog-home-item-image--placeholder {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--bg-secondary) 88%, transparent), color-mix(in srgb, var(--bg-tertiary) 78%, transparent));
  border: 1px solid color-mix(in srgb, var(--border-color) 82%, transparent);
}

.blog-home-item-copy {
  display: grid;
  align-content: center;
}

.blog-home-list-item h2 a,
.blog-home-top-copy h3 a {
  color: inherit;
  text-decoration: none;
}

.blog-home-item-subtitle,
.blog-home-item-excerpt,
.blog-home-empty p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.blog-home-item-subtitle {
  margin-top: 0.45rem;
  color: var(--text-primary);
}

.blog-home-item-excerpt {
  margin-top: 0.55rem;
  max-width: 52rem;
}

.blog-home-stack {
  gap: 1rem;
}

.blog-home-top-item {
  grid-template-columns: auto 5.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--border-color) 82%, transparent);
}

.blog-home-top-item:first-child {
  padding-top: 0.25rem;
  border-top: 0;
}

.blog-home-rank {
  min-width: 2.2rem;
  font-size: 1rem;
  color: var(--text-tertiary);
}

.blog-home-top-copy {
  gap: 0.35rem;
}

.blog-home-top-copy h3 {
  font-size: 1.2rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.blog-home-top-copy .blog-home-item-excerpt {
  margin-top: 0;
  font-size: 0.95rem;
}

.blog-home-list-item h2 a:hover,
.blog-home-top-copy h3 a:hover,
.blog-home-list-item h2 a:focus-visible,
.blog-home-top-copy h3 a:focus-visible {
  color: var(--link-hover);
}

.blog-home-empty {
  max-width: 40rem;
  gap: 0.65rem;
  padding: 0;
  margin-top: 1rem;
}

.blog-shell-post {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
}

.blog-panel,
.blog-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 1.6rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)),
    color-mix(in srgb, var(--bg-primary) 88%, transparent);
  box-shadow: 0 24px 60px var(--shadow-color);
}

.dark .blog-panel,
.dark .blog-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    color-mix(in srgb, var(--bg-primary) 94%, transparent);
}

.blog-panel::before,
.blog-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: color-mix(in srgb, var(--text-primary) 14%, transparent);
  pointer-events: none;
}

.blog-hero,
.blog-grid-section,
.blog-article,
.blog-sidebar-card {
  padding: 1.5rem;
}

.blog-hero {
  margin-bottom: 1.5rem;
}

.blog-hero-grid,
.blog-featured,
.blog-section-header {
  display: grid;
  gap: 1.5rem;
}

.blog-hero-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  align-items: end;
}

.blog-hero-copy,
.blog-featured-copy,
.blog-article-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-kicker {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.blog-hero h1,
.blog-featured h2,
.blog-section-header h2,
.blog-article-header h1,
.blog-sidebar-card h2,
.blog-empty-state h3,
.blog-card h3 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--text-primary);
}

.blog-hero h1 {
  font-size: clamp(3rem, 7vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.blog-hero-copy-text {
  max-width: 40rem;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.blog-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  padding-top: 0.25rem;
}

.blog-button,
.blog-text-link,
.blog-back-link {
  transition: transform 200ms ease, color 200ms ease, border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}

.blog-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--text-primary);
  background: var(--text-primary);
  color: var(--bg-primary);
  box-shadow: 0 16px 36px var(--shadow-color);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.blog-button:hover,
.blog-button:focus-visible {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--text-primary) 92%, var(--bg-primary));
  border-color: var(--text-primary);
}

.blog-text-link,
.blog-back-link {
  width: fit-content;
  color: var(--link-color);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.blog-text-link:hover,
.blog-text-link:focus-visible,
.blog-back-link:hover,
.blog-back-link:focus-visible,
.blog-featured h2 a:hover,
.blog-card h3 a:hover,
.blog-sidebar-link:hover strong {
  color: var(--link-hover);
}

.blog-button:focus-visible,
.blog-text-link:focus-visible,
.blog-back-link:focus-visible,
.blog-featured h2 a:focus-visible,
.blog-card h3 a:focus-visible,
.blog-sidebar-link:focus-visible {
  outline: 2px solid var(--link-color);
  outline-offset: 4px;
}

.blog-hero-note,
.blog-card,
.blog-sidebar-link {
  background: color-mix(in srgb, var(--bg-secondary) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--border-color) 88%, transparent);
  border-radius: 1.25rem;
}

.dark .blog-hero-note,
.dark .blog-card,
.dark .blog-sidebar-link {
  background: color-mix(in srgb, var(--bg-secondary) 92%, transparent);
}

.blog-hero-note {
  padding: 1.25rem;
}

.blog-hero-list,
.blog-body ul,
.blog-body ol {
  margin: 0;
  padding-left: 1.25rem;
}

.blog-hero-list {
  display: grid;
  gap: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.blog-featured {
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  align-items: stretch;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.blog-featured-copy {
  justify-content: center;
}

.blog-featured h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.blog-featured h2 a,
.blog-card h3 a,
.blog-sidebar-link {
  color: inherit;
  text-decoration: none;
}

.blog-meta,
.blog-source-line,
.blog-sidebar-copy {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-tertiary);
}

.blog-source-line a {
  color: var(--link-color);
  text-underline-offset: 0.16em;
}

.blog-subtitle {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.blog-featured-excerpt,
.blog-card-excerpt,
.blog-empty-state p:last-child {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.75;
}

.blog-featured-media,
.blog-cover-frame {
  margin: 0;
}

.blog-featured-media img,
.blog-cover-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border-radius: 1.25rem;
  object-fit: cover;
  background: var(--bg-secondary);
}

.blog-grid-section {
  padding-block: 1.75rem;
}

.blog-section-header {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.75fr);
  align-items: end;
  margin-bottom: 1.5rem;
}

.blog-section-header h2 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.blog-section-header p:last-child {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.blog-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.blog-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.25rem;
  min-height: 100%;
}

.blog-card h3 {
  font-size: 1.55rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.blog-card-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.blog-empty-state {
  max-width: 34rem;
  padding: 1.5rem;
  border-radius: 1.25rem;
  background: color-mix(in srgb, var(--bg-secondary) 82%, transparent);
  border: 1px solid var(--border-color);
}

.blog-empty-state h3,
.blog-empty-state p {
  margin: 0;
}

.blog-article {
  padding: 1.75rem;
}

.blog-back-link {
  margin-bottom: 0.25rem;
}

.blog-article-header {
  margin-bottom: 2rem;
}

.blog-article-header h1 {
  font-size: 48px;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.blog-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

.blog-cover-frame {
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--bg-secondary) 82%, transparent);
}

.blog-cover-image {
  max-height: 34rem;
}

.blog-body {
  color: var(--text-primary);
  font-size: 1.05rem;
  line-height: 1.85;
}

.blog-body > *:first-child {
  margin-top: 0;
  line-height: 1;
}

.blog-body > *:last-child {
  margin-bottom: 0;
}

.blog-body p,
.blog-body ul,
.blog-body ol,
.blog-body blockquote,
.blog-body pre,
.blog-body table {
  margin: 0 0 1.5rem;
}

.blog-body h2,
.blog-body h3,
.blog-body h4 {
  margin: 2.4rem 0 1rem;
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.blog-body h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
}

.blog-body h3 {
  font-size: clamp(1.45rem, 2.6vw, 2rem);
}

.blog-body a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.blog-body strong {
  color: var(--text-primary);
}

.blog-body blockquote {
  padding: 1rem 1.25rem;
  border-left: 4px solid color-mix(in srgb, var(--link-color) 45%, var(--border-color));
  border-radius: 0 1rem 1rem 0;
  background: color-mix(in srgb, var(--bg-secondary) 78%, transparent);
  color: var(--text-secondary);
}

.blog-body pre {
  overflow-x: auto;
  padding: 1rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--border-color) 82%, transparent);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--bg-secondary) 92%, #000 8%);
  color: var(--text-primary);
}

.blog-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95em;
}

.blog-body :not(pre) > code {
  padding: 0.1rem 0.38rem;
  border-radius: 0.4rem;
  background: color-mix(in srgb, var(--bg-secondary) 92%, transparent);
}

.blog-body img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
}

.blog-sidebar {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.blog-sidebar-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.blog-sidebar-card h2 {
  font-size: 1.7rem;
  line-height: 1.1;
}

.blog-sidebar-list {
  display: grid;
  gap: 0.85rem;
}

.blog-sidebar-link {
  display: block;
  padding: 1rem;
}

.blog-sidebar-link strong,
.blog-sidebar-link span {
  display: block;
}

.blog-sidebar-link strong {
  color: var(--text-primary);
}

.blog-sidebar-link span {
  margin-top: 0.35rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.blog-preview-banner {
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid color-mix(in srgb, #f59e0b 30%, var(--border-color));
  background: color-mix(in srgb, #f59e0b 16%, var(--bg-primary));
  color: var(--text-primary);
}

.blog-debug {
  overflow-x: auto;
  margin: 0;
  padding: 1rem;
  border-radius: 1rem;
  background: color-mix(in srgb, var(--bg-secondary) 92%, transparent);
  color: var(--text-secondary);
  white-space: pre-wrap;
}

@media (max-width: 1024px) {
  .blog-home-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .blog-home-section--top {
    padding-top: 1.5rem;
  }

  .blog-home-top,
  .blog-home-shelf-grid,
  .blog-home-archive-grid {
    grid-template-columns: 1fr;
  }

  .blog-home-lead {
    grid-template-columns: 1fr;
    min-height: unset;
  }

  .blog-home-cta {
    grid-template-columns: 1fr;
  }

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

  .blog-sidebar {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

@media (max-width: 900px) {
  .blog-home-masthead,
  .blog-home-shelf-header {
    grid-template-columns: 1fr;
  }

  .blog-home-title,
  .blog-home-lead h2 {
    max-width: none;
  }

  .blog-hero-grid,
  .blog-featured,
  .blog-section-header {
    grid-template-columns: 1fr;
  }

  .blog-featured-media img {
    min-height: 18rem;
  }
}

@media (max-width: 640px) {
  .blog-home {
    padding: 1.1rem 0.9rem 3rem;
  }

  .blog-home-section-header h1,
  .blog-home-empty h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .blog-home-list-item {
    grid-template-columns: 1fr;
    padding: 1rem 0;
  }

  .blog-home-item-image {
    max-width: 100%;
  }

  .blog-home-top-item {
    grid-template-columns: auto 4.5rem minmax(0, 1fr);
  }

  .blog-home-title {
    max-width: none;
    font-size: clamp(2.75rem, 15vw, 4rem);
  }

  .blog-home-panel,
  .blog-home-story,
  .blog-home-archive-card,
  .blog-home-lead,
  .blog-home-trending,
  .blog-home-masthead-meta,
  .blog-home-empty,
  .blog-home-cta {
    padding: 1rem;
  }

  .blog-home-mini-card {
    grid-template-columns: auto 64px minmax(0, 1fr);
  }

  .blog-home-jump-list {
    gap: 0.5rem;
  }

  .blog-home-actions {
    grid-template-columns: 1fr;
  }

  .blog-home-actions .blog-button {
    width: 100%;
  }

  .blog-shell {
    padding: 1.25rem 0.9rem 3rem;
  }

  .blog-hero,
  .blog-grid-section,
  .blog-article,
  .blog-sidebar-card,
  .blog-featured {
    padding: 1.15rem;
  }

  .blog-card {
    padding: 1rem;
  }

  .blog-button {
    width: 100%;
  }

  .blog-hero-actions {
    align-items: stretch;
  }

  .blog-article-header h1,
  .blog-hero h1 {
    max-width: none;
  }
}
