/* ============================================================
   MONELO — BLOG STYLES
   Shared by: blog listing, blog article pages
   Depends on: /styles.css (design tokens must be loaded first)
   ============================================================

   TABLE OF CONTENTS
   -----------------
   1.  Reading Progress Bar
   2.  Article Hero
   3.  Article Breadcrumb
   4.  Article Header
   5.  Article Layout (content + TOC sidebar)
   6.  Article Body Typography
   7.  Callout Boxes
   8.  Table of Contents (TOC)
   9.  Article Divider
   10. Author Bio Card
   11. Related Posts
   12. Article Download CTA
   13. Blog Listing Page
   14. Responsive
   ============================================================ */

/* ============================================================
   1. READING PROGRESS BAR
   ============================================================ */
.reading-progress {
  position: fixed;
  top: var(--header-h);
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--g-purple);
  z-index: 99;
  transition: width 80ms linear;
  pointer-events: none;
}

/* ============================================================
   2. ARTICLE HERO
   ============================================================ */
.article-hero {
  width: 100%;
  aspect-ratio: 21 / 8;
  position: relative;
  overflow: hidden;
  margin-top: var(--header-h);
  background: linear-gradient(
    135deg,
    #4c1d95 0%,
    #7c3aed 40%,
    #a855f7 70%,
    #2563eb 100%
  );
}

.article-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Bottom fade into page background */
.article-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--c-bg));
  pointer-events: none;
}

.article-hero__tag {
  position: absolute;
  top: var(--s-8);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-5);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}

.article-hero__tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
}

/* ============================================================
   3. ARTICLE BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-6) 0 0;
  font-size: var(--text-sm);
  color: var(--c-text-muted);
}

.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.breadcrumb__link {
  color: var(--c-text-secondary);
  transition: color var(--t-fast);
}
.breadcrumb__link:hover {
  color: var(--c-purple);
}

.breadcrumb__sep {
  color: var(--c-text-muted);
  line-height: 1;
}

.breadcrumb__current {
  color: var(--c-text-muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 280px;
}

/* ============================================================
   4. ARTICLE HEADER
   ============================================================ */
.article-header {
  max-width: 780px;
  padding: var(--s-8) 0 var(--s-12);
}

.article-header__top-row {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-bottom: var(--s-5);
}

.article-header__top-row .article-tag-pill {
  margin-bottom: 0;
}

.article-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: var(--s-1) var(--s-4);
  background: var(--c-purple-faint);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-purple);
  margin-bottom: var(--s-5);
}

.article-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: var(--s-1) var(--s-3);
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  color: var(--c-text-muted);
  text-decoration: none;
  transition:
    border-color 0.15s,
    color 0.15s;
}

.article-lang-switch:hover {
  border-color: var(--c-purple);
  color: var(--c-purple);
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  margin-bottom: var(--s-5);
  flex-wrap: wrap;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-sm);
  color: var(--c-text-secondary);
}

.article-meta-item svg {
  flex-shrink: 0;
  opacity: 0.55;
}

.article-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--c-text-muted);
  flex-shrink: 0;
}

.article-title {
  font-size: clamp(var(--text-3xl), 5vw, 3.25rem);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-snug);
  letter-spacing: -0.03em;
  color: var(--c-text-primary);
  margin-bottom: var(--s-6);
}

.article-lead {
  font-size: clamp(var(--text-lg), 2vw, var(--text-xl));
  line-height: var(--lh-relaxed);
  color: var(--c-text-secondary);
  margin-bottom: var(--s-8);
  max-width: 680px;
}

.article-author-inline {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding-top: var(--s-6);
  border-top: 1px solid var(--c-border);
}

.article-author-inline__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--g-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: #fff;
  flex-shrink: 0;
}

.article-author-inline__name {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--c-text-primary);
}

.article-author-inline__role {
  display: block;
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  margin-top: 2px;
}

/* ============================================================
   5. ARTICLE LAYOUT
   ============================================================ */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 248px;
  gap: var(--s-16);
  align-items: start;
  padding-bottom: var(--s-24);
}

.article-content {
  min-width: 0;
}

.article-aside {
  position: sticky;
  top: calc(var(--header-h) + var(--s-8));
}

/* ============================================================
   6. ARTICLE BODY TYPOGRAPHY
   ============================================================ */
.article-body {
  font-size: 1.0625rem; /* 17px */
  line-height: var(--lh-relaxed);
  color: var(--c-text-primary);
}

.article-body > * + * {
  margin-top: 1.5em;
}
.article-body > h2 + *,
.article-body > h3 + * {
  margin-top: 0.75em;
}

.article-body h2 {
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-2xl));
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  line-height: var(--lh-snug);
  color: var(--c-text-primary);
  margin-top: 2.5em;
  scroll-margin-top: calc(var(--header-h) + var(--s-8));
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  font-size: var(--text-lg);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.01em;
  line-height: var(--lh-snug);
  color: var(--c-text-primary);
  margin-top: 2em;
  scroll-margin-top: calc(var(--header-h) + var(--s-8));
}

.article-body p {
  color: var(--c-text-primary);
  opacity: 0.88;
}

.article-body strong {
  font-weight: var(--fw-semibold);
  opacity: 1;
}

.article-body a {
  color: var(--c-purple);
  text-decoration: underline;
  text-decoration-color: rgba(124, 58, 237, 0.35);
  text-underline-offset: 3px;
  transition:
    text-decoration-color var(--t-fast),
    color var(--t-fast);
}
.article-body a:hover {
  color: var(--c-purple-mid);
  text-decoration-color: var(--c-purple-mid);
}

.article-body ul,
.article-body ol {
  padding-left: 1.5em;
}

.article-body ul {
  list-style: none;
  padding-left: 0;
}
.article-body ul li {
  position: relative;
  padding-left: 1.5em;
}
.article-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-purple-light);
}

.article-body ol {
  list-style: decimal;
}
.article-body ol li {
  padding-left: 0.25em;
}
.article-body ol li::marker {
  color: var(--c-purple);
  font-weight: var(--fw-semibold);
}

.article-body li + li {
  margin-top: 0.5em;
}

.article-body blockquote {
  position: relative;
  margin: 2em 0;
  padding: var(--s-6) var(--s-8);
  background: var(--c-purple-faint);
  border-left: 3px solid var(--c-purple);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: var(--text-lg);
  line-height: var(--lh-relaxed);
  color: var(--c-text-primary);
  font-style: italic;
}

.article-body blockquote cite {
  display: block;
  margin-top: var(--s-3);
  font-size: var(--text-sm);
  font-style: normal;
  font-weight: var(--fw-medium);
  color: var(--c-text-secondary);
}

.article-body code {
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: 0.875em;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: 0.1em 0.45em;
  color: var(--c-purple-mid);
}

.article-body figure {
  margin: 2em 0;
}

.article-body figure img {
  width: 100%;
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
}

.article-body figcaption {
  margin-top: var(--s-3);
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  text-align: center;
}

/* Decorative section break */
.article-body hr {
  border: none;
  margin: 3em auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
}
.article-body hr::before {
  content: "···";
  color: var(--c-text-muted);
  letter-spacing: 0.5em;
  font-size: var(--text-lg);
}

/* ============================================================
   7. CALLOUT BOXES
   ============================================================ */
.callout {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-5) var(--s-6);
  border-radius: var(--r-lg);
  margin: 2em 0;
  border: 1px solid transparent;
}

.callout__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.callout__body {
}

.callout__title {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--s-1);
}

.callout__text {
  font-size: var(--text-sm);
  line-height: var(--lh-relaxed);
  margin: 0;
  opacity: 1;
}

/* Tip — green */
.callout--tip {
  background: rgba(16, 185, 129, 0.07);
  border-color: rgba(16, 185, 129, 0.22);
}
.callout--tip .callout__icon {
  color: #059669;
}
.callout--tip .callout__title {
  color: #059669;
}
.callout--tip .callout__text {
  color: #065f46;
}

/* Note — purple */
.callout--note {
  background: var(--c-purple-faint);
  border-color: rgba(124, 58, 237, 0.2);
}
.callout--note .callout__icon {
  color: var(--c-purple);
}
.callout--note .callout__title {
  color: var(--c-purple);
}
.callout--note .callout__text {
  color: #4c1d95;
}

/* Warning — amber */
.callout--warning {
  background: rgba(245, 158, 11, 0.07);
  border-color: rgba(245, 158, 11, 0.25);
}
.callout--warning .callout__icon {
  color: #d97706;
}
.callout--warning .callout__title {
  color: #d97706;
}
.callout--warning .callout__text {
  color: #78350f;
}

/* ============================================================
   8. TABLE OF CONTENTS (TOC)
   ============================================================ */
.toc {
  background: var(--c-bg-raised);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--s-6);
}

.toc__title {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: var(--s-4);
}

.toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc__link {
  display: block;
  padding: var(--s-2) var(--s-3);
  font-size: var(--text-sm);
  line-height: var(--lh-snug);
  color: var(--c-text-secondary);
  border-radius: var(--r-sm);
  border-left: 2px solid transparent;
  transition:
    color var(--t-fast),
    background var(--t-fast),
    border-color var(--t-fast);
  text-decoration: none;
}

.toc__link:hover {
  color: var(--c-text-primary);
  background: rgba(124, 58, 237, 0.06);
}

.toc__link.active {
  color: var(--c-purple);
  background: var(--c-purple-faint);
  border-left-color: var(--c-purple);
  font-weight: var(--fw-medium);
}

.toc__link--h3 {
  padding-left: calc(var(--s-3) + var(--s-4));
  font-size: var(--text-xs);
}

/* ============================================================
   9. ARTICLE DIVIDER
   ============================================================ */
.article-divider {
  height: 1px;
  background: var(--c-border);
  margin: var(--s-12) 0;
}

/* ============================================================
   10. AUTHOR BIO CARD
   ============================================================ */
.author-bio {
  display: flex;
  gap: var(--s-6);
  padding: var(--s-8);
  background: var(--c-bg-raised);
  border: 1px solid var(--c-border);
  border-radius: var(--r-2xl);
  margin-bottom: var(--s-20);
}

.author-bio__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--g-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  color: #fff;
  flex-shrink: 0;
}

.author-bio__content {
}

.author-bio__name {
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: var(--c-text-primary);
  margin-bottom: 2px;
}

.author-bio__role {
  font-size: var(--text-sm);
  color: var(--c-purple);
  font-weight: var(--fw-medium);
  margin-bottom: var(--s-3);
}

.author-bio__text {
  font-size: var(--text-sm);
  color: var(--c-text-secondary);
  line-height: var(--lh-relaxed);
  margin: 0;
}

/* ============================================================
   11. RELATED POSTS
   ============================================================ */
.related-posts {
  padding: var(--s-20) 0;
  background: var(--c-bg-raised);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

.related-posts__header {
  text-align: center;
  margin-bottom: var(--s-12);
}

.related-posts__label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-purple-light);
  margin-bottom: var(--s-3);
}

.related-posts__title {
  font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  color: var(--c-text-primary);
}

.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-6);
}

.post-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition:
    transform var(--t-base),
    box-shadow var(--t-base),
    border-color var(--t-base);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(124, 58, 237, 0.18);
}

.post-card__image {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
}

.post-card__image-placeholder {
  width: 100%;
  height: 100%;
  display: block;
}

.post-card__image-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-card__tag {
  display: inline-flex;
  align-items: center;
  padding: var(--s-1) var(--s-3);
  background: var(--c-purple-faint);
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-purple);
  margin-bottom: var(--s-3);
}

.post-card__body {
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card__title {
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  color: var(--c-text-primary);
  margin-bottom: var(--s-3);
  letter-spacing: -0.01em;
}

.post-card__excerpt {
  font-size: var(--text-sm);
  color: var(--c-text-secondary);
  line-height: var(--lh-relaxed);
  flex: 1;
  margin-bottom: var(--s-5);
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--text-xs);
  color: var(--c-text-muted);
}

.post-card__read-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--c-purple);
  margin-top: var(--s-4);
  transition: gap var(--t-fast);
  text-decoration: none;
}
.post-card__read-link:hover {
  gap: var(--s-3);
}

/* ============================================================
   12. ARTICLE DOWNLOAD CTA
   ============================================================ */
.article-cta-section {
  padding: var(--s-20) 0;
}

.article-cta {
  position: relative;
  background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 55%, #a855f7 100%);
  border-radius: var(--r-2xl);
  padding: var(--s-16) var(--s-12);
  text-align: center;
  overflow: hidden;
}

.article-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.article-cta__glow {
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(
    ellipse,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 65%
  );
  pointer-events: none;
}

.article-cta__label {
  position: relative;
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: var(--s-4);
}

.article-cta__title {
  position: relative;
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: var(--s-5);
}

.article-cta__sub {
  position: relative;
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.72);
  line-height: var(--lh-relaxed);
  max-width: 480px;
  margin: 0 auto var(--s-8);
}

.article-cta__actions {
  position: relative;
  display: flex;
  justify-content: center;
  gap: var(--s-4);
  flex-wrap: wrap;
}

.btn--white {
  background: #fff;
  color: var(--c-purple);
  border-color: transparent;
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.18);
}
.btn--white:hover {
  background: #f5f0ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
}

.btn--ghost-white {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}
.btn--ghost-white:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-2px);
}

/* ============================================================
   13. BLOG LISTING PAGE
   ============================================================ */
.blog-hero {
  padding-top: calc(var(--header-h) + var(--s-20));
  padding-bottom: var(--s-16);
  text-align: center;
  background: var(--c-bg);
}

.blog-hero__label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-purple-light);
  margin-bottom: var(--s-4);
}

.blog-hero__title {
  font-size: clamp(var(--text-4xl), 6vw, var(--text-6xl));
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.03em;
  line-height: var(--lh-tight);
  color: var(--c-text-primary);
  margin-bottom: var(--s-5);
}

.blog-hero__subtitle {
  font-size: var(--text-lg);
  color: var(--c-text-secondary);
  line-height: var(--lh-relaxed);
  max-width: 500px;
  margin: 0 auto;
}

.blog-listing {
  padding: var(--s-16) 0 var(--s-32);
}

.blog-listing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-6);
}

.blog-listing__featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  border-radius: var(--r-2xl);
  overflow: hidden;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-md);
  transition:
    transform var(--t-base),
    box-shadow var(--t-base);
  text-decoration: none;
  color: inherit;
}

.blog-listing__featured:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.blog-listing__featured-image {
  aspect-ratio: 4 / 3;
  background: linear-gradient(
    135deg,
    #4c1d95 0%,
    #7c3aed 45%,
    #a855f7 80%,
    #2563eb 100%
  );
  position: relative;
  overflow: hidden;
}

.blog-listing__featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-listing__featured-body {
  padding: var(--s-12);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.blog-listing__featured-tag {
  display: inline-flex;
  align-items: center;
  padding: var(--s-1) var(--s-3);
  background: var(--c-purple-faint);
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-purple);
  margin-bottom: var(--s-4);
  align-self: flex-start;
}

.blog-listing__featured-title {
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl));
  font-weight: var(--fw-bold);
  letter-spacing: -0.025em;
  line-height: var(--lh-snug);
  color: var(--c-text-primary);
  margin-bottom: var(--s-4);
}

.blog-listing__featured-excerpt {
  font-size: var(--text-base);
  color: var(--c-text-secondary);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--s-6);
}

.blog-listing__featured-meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--text-sm);
  color: var(--c-text-muted);
}

/* ============================================================
   14. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-aside {
    position: static;
    order: -1; /* TOC above article body on tablet */
  }

  .toc {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--s-4);
    align-items: start;
  }

  .toc__title {
    margin-bottom: 0;
    padding-top: var(--s-1);
  }

  .toc__list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--s-1);
  }

  .toc__link {
    padding: var(--s-1) var(--s-3);
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: var(--r-sm);
    white-space: nowrap;
    font-size: var(--text-xs);
  }

  .toc__link--h3 {
    display: none;
  }

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

  .blog-listing__featured-image {
    aspect-ratio: 16 / 7;
  }

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

  .blog-listing__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .article-hero {
    aspect-ratio: 16 / 9;
  }

  .article-header {
    padding: var(--s-6) 0 var(--s-10);
  }

  .article-cta {
    padding: var(--s-10) var(--s-6);
  }

  .author-bio {
    flex-direction: column;
    gap: var(--s-4);
  }

  .related-posts__grid {
    grid-template-columns: 1fr;
  }

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

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

  .toc__title {
    margin-bottom: var(--s-3);
  }

  .toc__list {
    flex-direction: column;
  }

  .toc__link {
    white-space: normal;
    border-bottom: none;
    border-left: 2px solid transparent;
  }

  .toc__link--h3 {
    display: block;
  }
}
