/* Dailybetes community + Q&A polish. Content and API-owned records stay unchanged.
   Load after product-showcase.css and pricing-showcase.css. */
.community-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
  width: calc(100% - 48px);
  max-width: 1160px;
  margin: 40px auto 64px;
  color: #243D35;
}

.community-highlights > #milestones.milestone-section,
.community-highlights > #news.latest-news {
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  padding: 32px;
  border: 1px solid #D5E2D8;
  border-radius: 24px;
  background: #EAF3E9;
  box-shadow: 0 8px 24px rgba(36, 61, 53, 0.035);
  overflow: visible;
  scroll-margin-top: 100px;
}

.community-highlights > #news.latest-news {
  background: #FFFCF6;
  border-color: #E5E2D8;
}

.community-highlights #milestones .milestone-inner,
.community-highlights #news .latest-news-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 24px;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.community-highlights #milestones .section-header,
.community-highlights #news .section-header {
  min-width: 0;
  margin: 0;
  padding: 0;
  text-align: left;
}

.community-highlights .section-header .section-label {
  margin: 0 0 12px;
  padding: 0;
  color: #1F6958;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.025em;
}

.community-highlights #milestones .section-title,
.community-highlights #news .section-title {
  margin: 0 0 12px;
  color: #243D35;
  font-size: clamp(30px, 2.8vw, 36px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.035em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.community-highlights #news .section-title { font-size: 30px; }

.community-highlights .section-header .section-desc {
  max-width: none;
  margin: 0;
  color: #4B6055;
  font-size: 16px;
  line-height: 1.65;
}

.community-highlights #milestones .milestone-timeline,
.community-highlights #news .news-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  gap: 20px;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.community-highlights #milestones .milestone-timeline .timeline-milestone {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 18px 16px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 24px 0 0;
  border: 0;
  border-top: 1px solid #CADBCD;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #243D35;
  text-align: center;
}

.community-highlights #milestones .timeline-milestone .timeline-status {
  grid-column: 1 / -1;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #D8E9D9;
  color: #275542;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
}

.community-highlights #milestones .timeline-milestone .timeline-number {
  margin: 0;
  color: #1F6958;
  font-size: clamp(52px, 5vw, 68px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
}

.community-highlights #milestones .timeline-milestone .timeline-label {
  margin: 8px 0 0;
  color: #4B6055;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.community-highlights #milestones .timeline-milestone .timeline-date {
  margin: 0;
  color: #4B6055;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
}

/* The section is the news panel; its existing article is not a second box. */
.community-highlights #news .news-grid .news-card {
  min-width: 0;
  margin: 0;
  padding: 24px 0 0;
  border: 0;
  border-top: 1px solid #E5E2D8;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  transform: none;
  transition: none;
}

.community-highlights #news .news-card::before { content: none; }

.community-highlights #news .news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 14px;
}

.community-highlights #news .news-date {
  color: #4B6055;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.community-highlights #news .news-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: #E5EEE2;
  color: #275542;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
}

.community-highlights #news .news-card h3 {
  margin: 0 0 12px;
  color: #243D35;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.community-highlights #news .news-card p {
  margin: 0 0 12px;
  color: #4B6055;
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.community-highlights #news .news-card strong { color: #243D35; font-weight: 650; }

.community-highlights #news .news-card a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  max-width: 100%;
  margin: 4px 0 0;
  padding: 8px 0;
  color: #1F6958;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
  transition: none;
}

.community-highlights #news a:focus-visible,
.faq a:focus-visible {
  outline: 3px solid #1F6958;
  outline-offset: 4px;
  border-radius: 3px;
}

/* Four existing FAQ sections, all 33 answers: normal flow, never accordions. */
.faq.education-section,
.faq#diabetes-guide,
.faq#faq {
  box-sizing: border-box;
  padding: 56px 24px;
  background: #FAF8F3 !important;
  color: #243D35;
}

.faq.education-food { background: #F3F6EF !important; }
.faq.education-basics,
.faq#faq { background: #FFFFFF !important; }

.faq .faq-inner.education-grid,
.faq .faq-inner.faq-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
  width: 100%;
  max-width: 1120px;
  min-width: 0;
  margin: 0 auto;
  padding: 0;
}

.faq .faq-inner > .section-header {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 700px;
  margin: 0 0 8px !important;
  padding: 0;
  text-align: left;
}

.faq .faq-inner > .section-header .section-label {
  margin: 0 0 12px;
  color: #1F6958;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.025em;
}

.faq .faq-inner > .section-header .section-title {
  margin: 0 0 14px;
  color: #243D35;
  font-size: clamp(30px, 3.5vw, 38px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.faq .faq-inner > .section-header .section-desc {
  margin: 0;
  color: #4B6055;
  font-size: 16px;
  line-height: 1.7;
}

.faq .faq-inner .faq-item {
  box-sizing: border-box;
  min-width: 0;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 26px;
  border: 1px solid #DCE5DE;
  border-radius: 18px;
  background: #FFFFFF;
  box-shadow: 0 4px 16px rgba(36, 61, 53, 0.025);
  overflow: visible;
  transform: none;
  transition: none;
}

.faq.education-basics .faq-item,
.faq#faq .faq-item { background: #FAF8F3; }

.faq .faq-inner .faq-item:hover {
  transform: none;
  box-shadow: 0 4px 16px rgba(36, 61, 53, 0.025);
}

.faq .faq-inner .faq-question {
  margin: 0 0 14px;
  padding: 0;
  color: #243D35;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
  cursor: default;
  overflow-wrap: anywhere;
}

/* Remove the old repeated "Quick answer" badge, not any question text. */
.faq .faq-inner .faq-question::before { content: none; }

.faq .faq-inner .faq-answer {
  display: block;
  height: auto;
  max-height: none;
  overflow: visible;
  visibility: visible;
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px solid #E1E8E0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.faq .faq-inner .faq-answer p {
  margin: 0 0 12px;
  color: #4B6055;
  font-size: 16px;
  line-height: 1.7;
}

.faq .faq-inner .faq-answer p:last-child { margin-bottom: 0; }

.faq .faq-inner .faq-answer a,
.faq .faq-inner .education-note a,
.faq .faq-inner .education-links a {
  color: #1F6958 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

/* Source text has an inline-sheet !important default; keep it readable. */
.faq .faq-inner .faq-answer .education-source {
  margin-top: 16px;
  color: #4B6055;
  font-size: 14px !important;
  line-height: 1.65 !important;
}

.faq .faq-inner .education-source a { font-size: 14px; }

.faq .faq-inner .education-wide { grid-column: 1 / -1; }

.faq .faq-inner .education-note {
  margin: 0;
  padding: 18px 22px;
  border: 1px solid #E1E5DA;
  border-radius: 14px;
  background: #F4F2E9;
  color: #4B6055;
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.faq .faq-inner .education-note h3 {
  margin: 0 0 8px;
  color: #243D35;
  font-size: 20px;
  line-height: 1.4;
}

.faq .faq-inner .education-note p { font-size: 16px; line-height: 1.7; }

.faq .faq-inner .education-editorial {
  max-width: 700px;
  margin: 16px 0 0;
  color: #4B6055;
  font-size: 14px;
  line-height: 1.65;
}

.faq .faq-inner .education-links {
  justify-content: flex-start;
  gap: 8px 18px;
  margin-top: 12px;
}

.faq .faq-inner .education-links a,
.faq .faq-inner .education-inline-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 10px;
  font-size: 14px;
  line-height: 1.6;
}

/* The two-column medical table wraps within the card, without hiding answers. */
.faq .faq-inner .glucose-reference {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 18px 0;
  color: #243D35;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.faq .faq-inner .glucose-reference caption {
  padding-bottom: 10px;
  color: #243D35;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}

.faq .faq-inner .glucose-reference th,
.faq .faq-inner .glucose-reference td {
  padding: 10px;
  border-bottom: 1px solid #DCE5DE;
  font-size: 14px;
  text-align: left;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}

.faq .faq-inner .glucose-reference thead { background: #E5EEE2; }

@media (max-width: 759px) {
  .community-highlights {
    grid-template-columns: minmax(0, 1fr);
    width: calc(100% - 36px);
    gap: 20px;
    margin: 28px auto 44px;
  }

  .community-highlights > #milestones.milestone-section,
  .community-highlights > #news.latest-news { padding: 28px; }
}

@media (max-width: 700px) {
  .faq.education-section,
  .faq#diabetes-guide,
  .faq#faq { padding: 44px 18px; }

  .faq .faq-inner.education-grid,
  .faq .faq-inner.faq-card-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .faq .faq-inner .faq-item { padding: 24px; }
  .faq .faq-inner .faq-question { font-size: 20px; }
  .faq .faq-inner .education-note { padding: 18px; }
}

@media (max-width: 400px) {
  .community-highlights > #milestones.milestone-section,
  .community-highlights > #news.latest-news { padding: 24px; }

  .community-highlights #milestones .milestone-timeline .timeline-milestone {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .community-highlights #milestones .timeline-milestone .timeline-date { text-align: center; }
  .faq .faq-inner .faq-item { padding: 22px; }
  .faq .faq-inner .glucose-reference th,
  .faq .faq-inner .glucose-reference td { padding: 8px 6px; }
}
