/* Diabeets — editorial article layout (scoped; safe on all pages) */

/* ── Title scale — fixes theme.css clamp(36px, 6vw, 72px) on long headlines ── */
.article-hero h1,
#article-heading,
.db-page-hero h1,
.db-page-hero-inner h1,
.db-page-hero .db-fade-up {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif !important;
  font-size: clamp(1.5rem, 2.6vw, 2rem) !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.028em !important;
  color: #15202b !important;
  text-wrap: balance;
  max-width: 40rem !important;
  margin: 0 0 1rem !important;
}

/* ── Hero bands ── */
.article-hero,
.db-page-hero {
  background: #ffffff !important;
  border-bottom: 1px solid #e3e8ec !important;
  padding: 1.75rem 0 1.5rem !important;
}
.article-hero-inner,
.db-page-hero-inner {
  max-width: 720px !important;
  margin: 0 auto !important;
  padding: 0 1.75rem !important;
}

/* ── Breadcrumb + meta ── */
.article-hero .db-breadcrumb,
.db-page-hero .db-breadcrumb {
  font-size: 0.8125rem !important;
  color: #8a959e !important;
  margin-bottom: 0.875rem !important;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.article-hero .db-breadcrumb a,
.db-page-hero .db-breadcrumb a {
  color: #5a6772 !important;
  text-decoration: none !important;
}
.article-hero .db-breadcrumb a:hover,
.db-page-hero .db-breadcrumb a:hover {
  color: #1a5c4f !important;
}
.db-breadcrumb-current,
.article-hero .truncate {
  color: #8a959e !important;
  max-width: 100% !important;
}

.db-cat-badge {
  display: inline-flex !important;
  align-items: center;
  font-size: 0.6875rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  padding: 0.35rem 0.65rem !important;
  border-radius: 6px !important;
  background: #e8f3f0 !important;
  border: 1px solid #c8e6df !important;
  color: #1a5c4f !important;
  margin-bottom: 0.875rem !important;
}

.db-meta,
.article-hero .db-meta,
.db-page-hero .db-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.5rem 1.25rem !important;
  font-size: 0.8125rem !important;
  color: #8a959e !important;
  font-weight: 500 !important;
}
.db-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Hide noisy inline progress UI in hero — top bar is enough */
.article-reading-bar,
.article-hero .alert-warning {
  display: none !important;
}

/* ── Layout grid ── */
.article-layout,
.db-article-layout {
  max-width: 1100px !important;
  margin: 0 auto !important;
  padding: 2rem 1.75rem 4rem !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 280px !important;
  gap: 2.5rem !important;
  align-items: start !important;
}
.db-article-layout > main {
  min-width: 0;
}

/* ── Article body (reading column) ── */
.article-body,
.db-article-body {
  background: #ffffff !important;
  border: 1px solid #e3e8ec !important;
  border-radius: 16px !important;
  padding: 2rem 2.25rem !important;
  box-shadow: 0 1px 2px rgba(21, 32, 43, 0.04), 0 8px 24px rgba(21, 32, 43, 0.05) !important;
  color: #5a6772 !important;
}
.article-body p,
.db-article-body p {
  font-size: 1.0625rem !important;
  line-height: 1.78 !important;
  max-width: 68ch;
  margin-bottom: 1.25rem !important;
  color: #5a6772 !important;
}
.article-body h2,
.db-article-body h2,
.db-article-body section h2 {
  font-family: 'Source Serif 4', Georgia, serif !important;
  font-size: 1.375rem !important;
  font-weight: 600 !important;
  color: #15202b !important;
  margin: 2.25rem 0 0.875rem !important;
  padding-bottom: 0.5rem !important;
  border-bottom: 1px solid #e3e8ec !important;
  line-height: 1.35 !important;
}
.article-body h3,
.db-article-body h3 {
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  color: #15202b !important;
  margin: 1.75rem 0 0.625rem !important;
}
.article-body a,
.db-article-body a {
  color: #2d7a6a !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-body a:hover,
.db-article-body a:hover {
  color: #1a5c4f !important;
}
.article-body strong,
.db-article-body strong {
  color: #15202b !important;
  font-weight: 600 !important;
}
.article-body blockquote,
.db-article-body blockquote {
  border-left: 3px solid #1a5c4f !important;
  background: #f0ede8 !important;
  padding: 1rem 1.25rem !important;
  margin: 1.5rem 0 !important;
  border-radius: 0 10px 10px 0 !important;
}
.article-body table,
.db-article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1.5rem 0;
}
.article-body th,
.db-article-body th {
  background: #f0ede8 !important;
  color: #15202b !important;
  padding: 0.65rem 0.875rem;
  text-align: left;
  border-bottom: 1px solid #e3e8ec;
}
.article-body td,
.db-article-body td {
  padding: 0.65rem 0.875rem;
  border-bottom: 1px solid #e3e8ec;
  color: #5a6772 !important;
}

/* ── Sidebar ── */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.toc-card,
.db-sidebar-card {
  background: #ffffff !important;
  border: 1px solid #e3e8ec !important;
  border-radius: 12px !important;
  padding: 1.25rem !important;
  box-shadow: 0 1px 2px rgba(21, 32, 43, 0.04) !important;
}
.toc-title,
.db-sidebar-card h5 {
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #8a959e !important;
  margin-bottom: 0.75rem !important;
}
.toc-link {
  font-size: 0.8125rem !important;
  color: #5a6772 !important;
  padding: 0.4rem 0.5rem !important;
  border-radius: 6px !important;
}
.toc-link:hover,
.toc-link.active {
  color: #1a5c4f !important;
  background: #e8f3f0 !important;
}

/* ── FAQ, disclaimer, related ── */
.db-faq-section h2,
.db-article-layout h2[id="faq-heading"],
.db-article-layout section > h2 {
  font-family: 'Source Serif 4', Georgia, serif !important;
  font-size: 1.375rem !important;
  color: #15202b !important;
}
.db-faq-item,
.db-article-layout details {
  background: #f7f5f1 !important;
  border: 1px solid #e3e8ec !important;
  border-radius: 10px !important;
  padding: 1rem 1.25rem !important;
}
.db-faq-item summary,
.db-article-layout details summary {
  font-weight: 600 !important;
  color: #15202b !important;
  font-size: 0.9375rem !important;
  cursor: pointer;
}
.db-disclaimer {
  background: #f0ede8 !important;
  border: 1px solid #e3e8ec !important;
  border-radius: 10px !important;
  padding: 1rem 1.25rem !important;
  font-size: 0.8125rem !important;
  color: #5a6772 !important;
  margin-top: 2rem !important;
  line-height: 1.55 !important;
}
.db-disclaimer strong {
  color: #15202b !important;
}

.db-article-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e3e8ec;
  font-size: 0.875rem;
}
.db-article-nav a {
  color: #2d7a6a !important;
  font-weight: 500;
}

/* Related cards */
.related-grid .db-article-card,
.db-article-card {
  background: #ffffff !important;
  border: 1px solid #e3e8ec !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(21, 32, 43, 0.04) !important;
}
.db-article-card-body h4 {
  font-family: 'Source Serif 4', Georgia, serif !important;
  font-size: 1rem !important;
  color: #15202b !important;
  line-height: 1.4 !important;
}

/* Author + share */
.article-author {
  border-top: 1px solid #e3e8ec !important;
  margin-top: 2rem !important;
  padding-top: 1.25rem !important;
}
.author-name {
  color: #15202b !important;
  font-size: 0.875rem !important;
}
.author-role {
  color: #8a959e !important;
  font-size: 0.75rem !important;
}
.share-btn {
  background: #f7f5f1 !important;
  border: 1px solid #e3e8ec !important;
  color: #5a6772 !important;
  font-size: 0.8125rem !important;
}
.share-btn:hover {
  border-color: #1a5c4f !important;
  color: #1a5c4f !important;
  background: #e8f3f0 !important;
}

/* Article page body surface */
body:has(.article-hero),
body:has(.db-page-hero) {
  background: #f7f5f1 !important;
  background-image: none !important;
  color: #15202b !important;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .article-layout,
  .db-article-layout {
    grid-template-columns: 1fr !important;
    padding: 1.5rem 1.25rem 3rem !important;
  }
  .article-sidebar {
    order: 2;
  }
}
@media (max-width: 640px) {
  .article-hero h1,
  #article-heading,
  .db-page-hero h1 {
    font-size: 1.375rem !important;
  }
  .article-body,
  .db-article-body {
    padding: 1.25rem 1.125rem !important;
  }
  .article-hero-inner,
  .db-page-hero-inner {
    padding: 0 1.125rem !important;
  }
}