:root {
  --blue-primary: #1a4a6b;
  --blue-light: #e8f0f7;
  --blue-mid: #c5d8e8;
  --accent-orange: #e8734a;
  --orange-light: #fdf0eb;
  --green-good: #2d6a4f;
  --green-light: #e8f4ee;
  --red-warn: #8b2e2e;
  --red-emergency: #c0392b;
  --red-light: #fdf0f0;
  --gray-synthesis: #5a5a5a;
  --gray-light: #f4f3f1;
  --bg-light: #faf9f7;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #7a7a7a;
  --border-light: #e2e0db;
  --max-width: 740px;
}

.post-header {
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  padding: 48px 20px 40px;
  text-align: center;
}
.post-header .series-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-orange);
  font-weight: 600;
  margin-bottom: 16px;
  display: block;
}
.post-header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--blue-primary);
  line-height: 1.2;
  max-width: 700px;
  margin: 0 auto 20px;
}
.post-header .byline {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
.post-header .byline strong { color: var(--text-secondary); font-weight: 600; }

.lede {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.18rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.7;
  border-left: 3px solid var(--accent-orange);
  padding-left: 20px;
  margin-bottom: 40px;
}

.article-body h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue-primary);
  margin: 48px 0 18px;
  line-height: 1.3;
}
.article-body h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  font-style: italic;
  color: var(--text-secondary);
  margin: 32px 0 12px;
}
.article-body p {
  margin-bottom: 22px;
  font-size: 1rem;
  color: var(--text-primary);
}
.article-body p:last-child { margin-bottom: 0; }

/* Callouts */
.callout {
  border-radius: 6px;
  padding: 20px 22px;
  margin: 32px 0;
}
.callout-evidence { background: var(--blue-light); border-left: 4px solid var(--blue-primary); }
.callout-synthesis { background: var(--gray-light); border-left: 4px solid #9a9a9a; }
.callout-synthesis p, .callout-synthesis li { font-style: italic; color: var(--gray-synthesis); }
.callout-warning { background: var(--orange-light); border-left: 4px solid var(--accent-orange); }
.callout-emergency {
  background: var(--red-light);
  border: 2px solid var(--red-emergency);
  border-radius: 6px;
}
.callout-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}
.callout-evidence .callout-label { color: var(--blue-primary); }
.callout-synthesis .callout-label { color: var(--gray-synthesis); }
.callout-warning .callout-label { color: var(--accent-orange); }
.callout-emergency .callout-label { color: var(--red-emergency); }
.callout p { margin-bottom: 10px; font-size: 0.95rem; }
.callout p:last-child { margin-bottom: 0; }
.callout ul { padding-left: 18px; margin-top: 6px; }
.callout li { font-size: 0.93rem; margin-bottom: 6px; line-height: 1.55; }

/* Organ cards */
.organ-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 32px 0;
}
.organ-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
}
.organ-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: var(--blue-light);
  border-bottom: 1px solid var(--blue-mid);
}
.organ-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.organ-card-header h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-primary);
  margin: 0;
  font-style: normal;
}
.organ-card-header .organ-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}
.organ-card-body { padding: 16px 20px; }
.organ-card-body p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.6;
}
.organ-card-body p:last-child { margin-bottom: 0; }

/* A1c threshold table */
.a1c-table {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  margin: 32px 0;
}
.a1c-table-header {
  background: var(--blue-primary);
  color: #fff;
  padding: 13px 20px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.a1c-row {
  display: grid;
  grid-template-columns: 100px 1fr 1fr;
  border-bottom: 1px solid var(--border-light);
}
.a1c-row:last-child { border-bottom: none; }
.a1c-row.header-row {
  background: var(--gray-light);
}
.a1c-cell {
  padding: 11px 14px;
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.4;
  border-right: 1px solid var(--border-light);
}
.a1c-cell:last-child { border-right: none; }
.a1c-cell.a1c-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--blue-primary);
}
.a1c-row.header-row .a1c-cell {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 28px;
  margin: 32px 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--blue-mid);
}
.timeline-item {
  position: relative;
  margin-bottom: 28px;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue-primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--blue-mid);
}
.timeline-item.warning .timeline-dot { background: var(--accent-orange); box-shadow: 0 0 0 2px #f0c8a8; }
.timeline-item.danger .timeline-dot { background: var(--red-warn); box-shadow: 0 0 0 2px #e8b0b0; }
.timeline-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.timeline-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue-primary);
  margin-bottom: 6px;
}
.timeline-item.warning .timeline-title { color: var(--accent-orange); }
.timeline-item.danger .timeline-title { color: var(--red-warn); }
.timeline-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Target cards */
.target-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 32px 0;
}
.target-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 16px 18px;
}
.target-card-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.target-card-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--blue-primary);
  line-height: 1.1;
  margin-bottom: 6px;
}
.target-card-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Stat cards */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 14px;
  margin: 28px 0;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 18px 16px;
  text-align: center;
}
.stat-card .stat-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--blue-primary);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card .stat-label { font-size: 0.76rem; color: var(--text-muted); line-height: 1.4; }

/* Citations */
.citations { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border-light); }
.citations h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.05rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 16px; }
.citations ol { padding-left: 20px; }
.citations li { font-size: 0.8rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 8px; }
/* Bottom card nav */
.series-links { margin-top: 56px; border-top: 2px solid var(--border-light); padding-top: 28px; }
.series-links h3 { font-family: 'Playfair Display', serif; font-size: 1rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.series-links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.series-link-card { background: #fff; border: 1px solid var(--border-light); border-left: 3px solid var(--blue-primary); border-radius: 4px; padding: 14px 16px; text-decoration: none; color: inherit; font-size: 0.85rem; transition: box-shadow 0.15s; display: block; }
.series-link-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.series-link-card .link-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 4px; }
.series-link-card .link-title { color: var(--blue-primary); font-weight: 600; line-height: 1.3; }
.series-link-card.current-post { background: #eef4f9; border-left-color: var(--accent-orange); cursor: default; }
.series-link-card.current-post .link-label { color: var(--accent-orange); }

/* Series-nav tab bar */
.series-nav { background: white; border-bottom: 1px solid var(--border-light,#e0ddd8); padding: 0; overflow-x: auto; }
.series-nav ul { list-style: none; display: flex; min-width: max-content; padding: 0 2rem; margin: 0; }
.series-nav li a { display: block; padding: 0.85rem 1.1rem; font-size: 0.8rem; color: #4a4a46; text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; transition: color 0.2s, border-color 0.2s; }
.series-nav li a:hover { color: var(--blue-primary,#1a4a6b); }
.series-nav li.active a { color: var(--blue-primary,#1a4a6b); border-bottom-color: var(--accent-orange,#e8734a); font-weight: 600; }

.site-footer { text-align: center; padding: 24px 20px; font-size: 0.78rem; color: var(--text-muted); border-top: 1px solid var(--border-light); }

/* Chart embeds */
.chart-embed {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 22px 20px 16px;
  margin: 32px 0;
}
.chart-caption {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.chart-source {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 10px;
  margin-bottom: 0;
}

@media (max-width: 600px) {
  
  .post-header { padding: 36px 16px 28px; }
  
  .target-cards { grid-template-columns: 1fr; }
  .a1c-row { grid-template-columns: 80px 1fr; }
  .a1c-row .a1c-cell:last-child { display: none; }
  .a1c-row.header-row .a1c-cell:last-child { display: none; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}
/* Drug class cards */
.drug-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 32px 0;
}
.drug-card-header {
  padding: 14px 20px;
  background: var(--blue-light);
  border-bottom: 1px solid var(--blue-mid);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.drug-card-header h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-primary);
  margin: 0;
  font-style: normal;
  line-height: 1.3;
}
.drug-card-header .drug-examples {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 3px;
  display: block;
}
.drug-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-first { background: var(--green-light); color: var(--green-good); }
.badge-preferred { background: #e8f0f7; color: var(--blue-primary); }
.badge-add-on { background: var(--gray-light); color: var(--gray-synthesis); }
.badge-caution { background: var(--orange-light); color: #b05a2a; }
.drug-card-body { padding: 16px 20px; }
.drug-card-body p { font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.6; }
.drug-card-body p:last-child { margin-bottom: 0; }
/* Benefit chips */
.benefit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 14px;
}
.benefit-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.04em;
}
.chip-a1c { background: #e8f0f7; color: var(--blue-primary); }
.chip-weight { background: var(--green-light); color: var(--green-good); }
.chip-cv { background: #f7e8e8; color: #7a2a2a; }
.chip-renal { background: #e8f4f7; color: #1a5a6b; }
.chip-neutral { background: var(--gray-light); color: var(--gray-synthesis); }
.chip-risk { background: var(--orange-light); color: #b05a2a; }
/* Myth cards */
.myth-cards { display: flex; flex-direction: column; gap: 16px; margin: 32px 0; }
.myth-card-claim {
  background: var(--red-light);
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.myth-card-claim .myth-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.myth-card-claim .myth-text { font-size: 0.92rem; font-weight: 600; color: var(--red-warn); line-height: 1.4; }
.myth-card-reality {
  padding: 14px 18px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.myth-card-reality .reality-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.myth-card-reality .reality-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.55; }
/* Treatment ladder */
.treatment-ladder {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  margin: 32px 0;
}
.treatment-ladder-header {
  background: var(--blue-primary);
  color: #fff;
  padding: 13px 20px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.ladder-rung {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}
.ladder-rung:last-child { border-bottom: none; }
.ladder-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue-light);
  border: 2px solid var(--blue-mid);
  color: var(--blue-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.ladder-content strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--blue-primary);
  margin-bottom: 4px;
}
.ladder-content span {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
/* ── Top bar ── */

/* ── Header ── */
.post-header {
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  padding: 48px 20px 40px;
  text-align: center;
}
/* ── Main layout ── */

/* ── Lede ── */
.lede {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.18rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.7;
  border-left: 3px solid var(--accent-orange);
  padding-left: 20px;
  margin-bottom: 40px;
}
/* ── Body prose ── */
.article-body h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue-primary);
  margin: 48px 0 18px;
  line-height: 1.3;
}
/* ── Callout blocks ── */
.callout {
  border-radius: 6px;
  padding: 20px 22px;
  margin: 32px 0;
}
.callout-synthesis p,
.callout-synthesis li {
  font-style: italic;
  color: var(--gray-synthesis);
}
/* ── Pathway diagram ── */
.pathway {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 28px 24px;
  margin: 32px 0;
}
.pathway-title {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}
.pathway-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pathway-step-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  font-family: 'Source Serif 4', serif;
  margin-top: 2px;
}
.pathway-step-content {
  flex: 1;
  padding-bottom: 24px;
}
.pathway-step:last-child .pathway-step-content {
  padding-bottom: 0;
}
.pathway-step-content strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--blue-primary);
  margin-bottom: 4px;
}
.pathway-step-content span {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.pathway-connector {
  width: 2px;
  height: 20px;
  background: var(--blue-mid);
  margin-left: 17px;
}
/* ── Myth cards ── */
.myth-section-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin: 40px 0 16px;
  display: block;
}
/* ── Series roadmap ── */
.series-roadmap {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  margin: 40px 0;
}
.series-roadmap-header {
  background: var(--blue-primary);
  color: #fff;
  padding: 14px 20px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.roadmap-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.roadmap-item:last-child { border-bottom: none; }
.roadmap-item:hover { background: var(--blue-light); }
.roadmap-item.current {
  background: var(--blue-light);
  border-left: 3px solid var(--blue-primary);
  padding-left: 17px;
}
.roadmap-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-orange);
  letter-spacing: 0.05em;
  min-width: 24px;
  margin-top: 2px;
}
.roadmap-content strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--blue-primary);
  line-height: 1.3;
  margin-bottom: 3px;
}
.roadmap-content span {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}
/* ── Stat cards ── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 28px 0;
}
/* ── Citations ── */
.citations {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border-light);
}
/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 24px 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
}
/* ── Responsive ── */
@media (max-width: 600px) {
  
  .post-header { padding: 36px 16px 28px; }
/* Exercise type cards */
.exercise-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 32px 0;
}
.exercise-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--blue-light);
  border-bottom: 1px solid var(--blue-mid);
  gap: 12px;
  flex-wrap: wrap;
}
.exercise-card-header-left h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-primary);
  margin: 0 0 4px;
  font-style: normal;
}
.exercise-card-header-left .exercise-stats {
  font-size: 0.78rem;
  color: var(--blue-primary);
}
.exercise-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-strong { background: var(--blue-light); color: var(--blue-primary); border: 1px solid var(--blue-mid); }
.badge-moderate { background: var(--gray-light); color: var(--gray-synthesis); }
.exercise-card-body { padding: 16px 20px; }
.exercise-card-body p { font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.6; }
.exercise-card-body p:last-child { margin-bottom: 0; }
/* Complication grid */
.complication-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  margin: 32px 0;
  background: #fff;
}
.complication-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  border-bottom: 1px solid var(--border-light);
}
.complication-row:last-child { border-bottom: none; }
.complication-row.header {
  background: var(--blue-primary);
}
.complication-cell {
  padding: 11px 16px;
  font-size: 0.87rem;
  line-height: 1.5;
  color: var(--text-secondary);
  border-right: 1px solid var(--border-light);
}
.complication-cell:last-child { border-right: none; }
.complication-cell.label {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--gray-light);
  font-size: 0.85rem;
}
.complication-row.header .complication-cell {
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  border-right-color: rgba(255,255,255,0.2);
}
/* Medication table */
.med-table {
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  margin: 28px 0;
  background: #fff;
}
.med-row {
  display: grid;
  grid-template-columns: 140px 100px 1fr;
  border-bottom: 1px solid var(--border-light);
}
.med-row:last-child { border-bottom: none; }
.med-row.header { background: var(--blue-primary); }
.med-cell {
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  border-right: 1px solid var(--border-light);
}
.med-cell:last-child { border-right: none; }
.med-row.header .med-cell {
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  border-right-color: rgba(255,255,255,0.2);
}
.risk-high { color: var(--red-warn); font-weight: 600; }
.risk-low { color: var(--green-good); font-weight: 600; }
.risk-mod { color: var(--accent-orange); font-weight: 600; }
/* ── Compare grid ── */
/* Desktop: true 2-column grid */
.compare-grid {
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  margin: 32px 0;
  background: #fff;
}
@media (min-width: 601px) {
  .compare-grid { display: grid; grid-template-columns: 1fr 1fr; }
.compare-col-header { display: block; }
.compare-row-label { grid-column: 1 / -1; }
.compare-cell { border-top: 1px solid var(--border-light); }
.compare-cell.t1-cell { border-right: 1px solid var(--border-light); }
.compare-cell .cell-type-label { display: none; }
.compare-col-header.t1 { background: #1a4a6b; color: #fff; }
.compare-col-header.t2 { background: #3a7ca5; color: #fff; }
.t1-cell .cell-type-label { color: #1a4a6b; }
.t2-cell .cell-type-label { color: #3a7ca5; }
/* Mobile: stacked with alternating tints + visible type label */
@media (max-width: 600px) {
  .compare-grid { display: block; }
.compare-row-label:first-of-type { border-top: none; }
.compare-cell.t2-cell { background: #f5f8fc; }
/* Variant cards */
.variant-cards { display: flex; flex-direction: column; gap: 20px; margin: 32px 0; }
.variant-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: var(--blue-light);
  border-bottom: 1px solid var(--blue-mid); gap: 12px; flex-wrap: wrap;
}
.variant-card-header h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem; font-weight: 700; color: var(--blue-primary); margin: 0; font-style: normal;
}
.variant-badge {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 3px 10px; border-radius: 12px; white-space: nowrap;
}
.badge-rare { background: #e8e0f7; color: #4a2a7a; }
.badge-uncommon { background: #fdebd0; color: #7a4a10; }
.badge-common { background: var(--green-light); color: var(--green-good); }
.variant-card-body { padding: 16px 20px; }
.variant-card-body p { font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.6; }
.variant-card-body p:last-child { margin-bottom: 0; }
/* Suspicion flags */
.suspicion-flags {
  background: var(--orange-light); border: 1px solid #f0c8a8;
  border-radius: 6px; padding: 14px 16px; margin-top: 14px;
}
.suspicion-flags-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent-orange); margin-bottom: 8px; display: block;
}
.suspicion-flags ul { padding-left: 16px; margin: 0; }
.suspicion-flags li { font-size: 0.87rem; color: var(--text-secondary); margin-bottom: 5px; line-height: 1.5; }
/* Diet pattern cards */
.diet-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 32px 0;
}
.diet-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--blue-light);
  border-bottom: 1px solid var(--blue-mid);
  gap: 12px;
  flex-wrap: wrap;
}
.diet-card-header h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-primary);
  margin: 0;
  font-style: normal;
}
.diet-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-limited { background: var(--gray-light); color: var(--gray-synthesis); }
.diet-card-body { padding: 16px 20px; }
.diet-card-body p { font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.6; }
.diet-card-body p:last-child { margin-bottom: 0; }
/* Food group grid */
.food-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 28px 0;
}
.food-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 16px 18px;
}
.food-card-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.food-card-label.emphasize { color: var(--green-good); }
.food-card-label.moderate { color: var(--blue-primary); }
.food-card-label.limit { color: var(--accent-orange); }
.food-card-label.avoid { color: var(--red-warn); }
.food-card ul {
  padding-left: 16px;
  margin: 0;
}
.food-card li {
  font-size: 0.87rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  line-height: 1.45;
}
/* CGM target table */
.cgm-table {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  margin: 32px 0;
}
.cgm-table-header {
  background: var(--blue-primary);
  color: #fff;
  padding: 12px 18px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.cgm-row {
  display: grid;
  grid-template-columns: 1fr 90px 90px 1fr;
  border-bottom: 1px solid var(--border-light);
}
.cgm-row:last-child { border-bottom: none; }
.cgm-row.header-row { background: var(--gray-light); }
.cgm-cell {
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  border-right: 1px solid var(--border-light);
}
.cgm-cell:last-child { border-right: none; }
.cgm-row.header-row .cgm-cell {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cgm-cell.metric { font-weight: 600; color: var(--text-primary); }
.tir-green { color: var(--green-good); font-weight: 700; }
.tir-orange { color: var(--accent-orange); font-weight: 700; }
.tir-red { color: var(--red-warn); font-weight: 700; }
/* Insulin type cards */
.insulin-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 32px 0;
}
.insulin-card-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--blue-light);
  border-bottom: 1px solid var(--blue-mid);
}
.insulin-card-header h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--blue-primary);
  margin: 0;
  font-style: normal;
}
.insulin-card-header .insulin-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.insulin-badge {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
}
.badge-basal { background: #e8f0f7; color: var(--blue-primary); border: 1px solid var(--blue-mid); }
.badge-bolus { background: var(--green-light); color: var(--green-good); }
.badge-correction { background: var(--orange-light); color: #b05a2a; }
.insulin-card-body { padding: 16px 20px; }
.cgm-row .cgm-cell:last-child { display: none; }
.cgm-row.header-row .cgm-cell:last-child { display: none; }
