/* Glynce blog. Rides on site.css (variables, chrome, buttons); this file is
   only the index cards and the article reading column. */

/* ── Shared header band ──────────────────────────────────────────────
   A calmer version of the feature pages' hero: the same colour wash, but
   shorter, since a blog header is a signpost, not a pitch. */
.blog-hero {
  position: relative;
  padding: 128px 24px 56px;
  text-align: center;
  overflow: hidden;
}
.blog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, transparent 40%, var(--bg) 94%),
    radial-gradient(58% 60% at 12% 24%, rgba(125, 211, 252, 0.30), transparent 70%),
    radial-gradient(52% 56% at 50% 16%, rgba(250, 204, 21, 0.16), transparent 70%),
    radial-gradient(58% 60% at 88% 24%, rgba(244, 114, 182, 0.22), transparent 70%);
  pointer-events: none;
}
/* Lift the hero content above the ::before wash. Exclude the nav: it is the
   fixed pill from site.css, and forcing position:relative here would drop it
   into the flow (equal specificity, blog.css wins on order) and pin it over the
   heading. */
.blog-hero > *:not(.topnav) { position: relative; z-index: 1; }
.blog-hero .eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-dark);
}
.blog-hero h1 {
  margin: 0 auto;
  max-width: 16em;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
/* The lede only. Excluding .eyebrow keeps its max-width off the kicker, which
   otherwise inherits a 34em box and, with no auto margin, gets pinned left. */
.blog-hero p:not(.eyebrow) {
  margin: 16px auto 0;
  max-width: 34em;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
}

/* ── Index: post cards ──────────────────────────────────────────────── */
.post-grid {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 24px 96px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.post-card {
  display: flex;
  flex-direction: column;
  padding: 30px 30px 28px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(20, 34, 59, 0.04), 0 10px 30px rgba(20, 34, 59, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 2px rgba(20, 34, 59, 0.05), 0 16px 40px rgba(20, 34, 59, 0.09);
}
.post-card .cat {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-dark);
}
.post-card h2 {
  margin: 12px 0 0;
  font-size: 22px;
  line-height: 1.22;
  letter-spacing: -0.02em;
}
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--blue-dark); }
.post-card p {
  margin: 12px 0 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--muted);
}
.post-card .meta {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 13.5px;
  color: var(--muted);
}
.post-card .meta .dot { margin: 0 8px; color: #c2c9d6; }

/* ── Article ────────────────────────────────────────────────────────── */
.article {
  max-width: 720px;
  margin: 0 auto;
  /* top clears the fixed pill nav, matching the feature pages' hero */
  padding: 120px 24px 40px;
}
.article-head { padding: 12px 0 8px; }
.article-head .cat {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-dark);
}
.article-head h1 {
  margin: 14px 0 0;
  font-size: clamp(30px, 4.6vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.article-head .meta {
  margin-top: 18px;
  font-size: 14.5px;
  color: var(--muted);
}
.article-head .meta .dot { margin: 0 8px; color: #c2c9d6; }

/* Optional lead image, rendered from the post's heroImage frontmatter. */
.article-hero { margin: 26px 0 8px; }
.article-hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

/* Inline body image (Markdown ![alt](src)). Centered and capped so a tall
   portrait poster illustrates a point without dominating the column. */
.article-figure { margin: 30px 0; text-align: center; }
.article-figure img {
  display: inline-block;
  width: 100%;
  max-width: 460px;
  height: auto;
  border-radius: 18px;
}
.article-figure figcaption {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
}
/* CGM illustration charts are landscape SVGs; let them use more of the column
   than the portrait-poster cap above. */
.article-figure img[src$=".svg"] { max-width: 620px; border-radius: 14px; }

/* Body typography. Generous measure, clear heading rhythm. */
.article-body { font-size: 17.5px; line-height: 1.7; color: var(--ink); }
.article-body > *:first-child { margin-top: 0; }
.article-body h2 {
  margin: 46px 0 0;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.article-body h3 {
  margin: 34px 0 0;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.article-body h4 {
  margin: 28px 0 0;
  font-size: 17px;
  font-weight: 700;
}
.article-body p { margin: 18px 0 0; }
.article-body ul,
.article-body ol { margin: 18px 0 0; padding-left: 1.3em; }
.article-body li { margin: 8px 0 0; }
.article-body li > ul,
.article-body li > ol { margin: 8px 0 0; }
.article-body a {
  color: var(--blue-dark);
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.35);
  text-underline-offset: 2px;
}
.article-body a:hover { text-decoration-color: currentColor; }
.article-body strong { font-weight: 700; }
.article-body hr {
  margin: 40px 0 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

/* Callout: the "Quick answer" style blockquotes. */
.article-body blockquote {
  margin: 26px 0 0;
  padding: 22px 24px;
  background: var(--blue-soft);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 14px;
}
.article-body blockquote > *:first-child { margin-top: 0; }
.article-body blockquote p { font-size: 16.5px; }

/* Tables scroll inside their own box rather than stretching the column. */
.article-body .table-wrap {
  margin: 26px 0 0;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 14px;
}
.article-body table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}
.article-body th,
.article-body td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}
.article-body th {
  background: #f6f8fc;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: -0.01em;
}
.article-body tbody tr:last-child td { border-bottom: 0; }

/* Compliance disclaimer at the foot of every clinical post. */
.article-disclaimer {
  max-width: 720px;
  margin: 44px auto 0;
  padding: 20px 24px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.article-disclaimer strong { color: var(--ink); }

/* Foot of the article: back to the blog, and the app CTA. */
.article-foot {
  max-width: 720px;
  margin: 32px auto 0;
  padding: 0 24px 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}
.article-foot .back { font-size: 15px; font-weight: 600; color: var(--blue-dark); text-decoration: none; }
.article-foot .back:hover { text-decoration: underline; }
.article-foot .btn-dark { margin-left: auto; }

@media (max-width: 720px) {
  .post-grid { grid-template-columns: 1fr; }
  .blog-hero { padding-top: 108px; }
  .article-foot .btn-dark { margin-left: 0; }
}
