/* ============================================
   OVULATION CALCULATOR - MAIN STYLESHEET
   Health/Fertility Category - Warm Coral Theme
   ============================================ */

:root {
  --primary: #fb7185;
  --primary-dark: #e11d48;
  --primary-light: #fda4af;
  --primary-bg: #fff1f2;
  --secondary: #be123c;
  --accent: #f472b6;
  --success: #10b981;
  --success-bg: #d1fae5;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --error: #ef4444;
  --error-bg: #fee2e2;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", monospace;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); font-size: 16px; line-height: 1.6; color: var(--gray-800); background: var(--gray-50); min-height: 100vh; display: flex; flex-direction: column; }

h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.3; color: var(--gray-900); }
h1 { font-size: 2.25rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; margin-top: 2rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--primary-bg); }
h3 { font-size: 1.25rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
a { color: var(--primary-dark); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--primary); text-decoration: underline; }
strong { font-weight: 600; }
ul, ol { margin-bottom: 1rem; padding-left: 1.5rem; }
li { margin-bottom: 0.5rem; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.content-narrow { max-width: 800px; margin: 0 auto; }
main { flex: 1; padding: 2rem 0 3rem; }

/* Header */
.header { background: white; border-bottom: 1px solid var(--gray-200); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.125rem; color: var(--gray-900); text-decoration: none; }
.logo:hover { text-decoration: none; color: var(--primary-dark); }
.logo-icon { width: 32px; height: 32px; color: var(--primary); }
.nav-desktop { display: flex; align-items: center; gap: 1.5rem; }
.nav-desktop a { font-size: 0.9375rem; font-weight: 500; color: var(--gray-600); padding: 0.5rem 0; border-bottom: 2px solid transparent; transition: all 0.15s ease; }
.nav-desktop a:hover, .nav-desktop a.active { color: var(--primary-dark); text-decoration: none; border-bottom-color: var(--primary); }
.nav-toggle { display: none; background: none; border: none; padding: 0.5rem; cursor: pointer; color: var(--gray-700); }
.nav-toggle svg { width: 24px; height: 24px; }
.nav-mobile { display: none; position: absolute; top: 100%; left: 0; right: 0; background: white; border-bottom: 1px solid var(--gray-200); padding: 1rem; box-shadow: var(--shadow-lg); }
.nav-mobile.active { display: block; }
.nav-mobile a { display: block; padding: 0.5rem 1rem; color: var(--gray-700); font-weight: 500; border-radius: var(--radius-md); }
.nav-mobile a:hover { background: var(--gray-100); text-decoration: none; }
@media (max-width: 768px) { .nav-desktop { display: none; } .nav-toggle { display: block; } }

/* Intro */
.intro-text {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 832px) {
  .intro-text {
    max-width: 100%;
  }
}

/* Calculator Card */
.calculator-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 832px) {
  .calculator-card {
    max-width: 100%;
    border-radius: var(--radius-lg);
  }
}

/* Form */
.form-grid { display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 0.25rem; }
.form-label { font-size: 0.875rem; font-weight: 500; color: var(--gray-700); }
.form-label-hint { font-weight: 400; color: var(--gray-500); font-size: 0.8125rem; }

/* Date Input - Fully Clickable */
.date-input-wrapper { position: relative; }
.form-input-date {
  width: 100%;
  height: 44px;
  padding: 0 1rem 0 2.75rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.form-input-date:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.form-input-date::-webkit-calendar-picker-indicator {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  cursor: pointer;
  background: transparent;
  opacity: 0;
}
.date-input-wrapper::before {
  content: '';
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 1;
}

/* Inputs */
.form-input { width: 100%; height: 44px; padding: 0 1rem; font-size: 1rem; font-family: var(--font-sans); color: var(--gray-800); background: white; border: 1px solid var(--gray-300); border-radius: var(--radius-md); transition: all 0.15s ease; }
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }

/* Range/Slider */
.range-wrapper { display: flex; flex-direction: column; gap: 0.375rem; }
.range-input-group { display: flex; align-items: center; gap: 0.75rem; }
.range-slider {
  flex: 1;
  height: 8px;
  background: linear-gradient(to right, var(--primary-bg), var(--primary-light));
  border-radius: var(--radius-full);
  appearance: none;
  cursor: pointer;
  border: 1px solid var(--gray-200);
}
.range-slider::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(251, 113, 133, 0.4);
  border: 2px solid white;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 10px rgba(251, 113, 133, 0.5);
}
.range-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--primary);
  border: 2px solid white;
  border-radius: 50%;
  cursor: pointer;
}
.range-slider:focus { outline: none; }
.range-slider:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px var(--primary-bg), 0 2px 6px rgba(251, 113, 133, 0.4);
}
.range-value {
  min-width: 70px;
  text-align: center;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--primary-dark);
  background: var(--primary-bg);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-md);
}
.range-value span { font-size: 0.75rem; font-weight: 500; color: var(--gray-500); }
.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: var(--gray-400);
  padding: 0 0.25rem;
  margin-top: 0.125rem;
}

/* Checkbox */
.checkbox-wrapper { display: flex; align-items: flex-start; gap: 0.625rem; cursor: pointer; padding: 0.5rem 0; }
.checkbox-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}
.checkbox-label { font-size: 0.875rem; color: var(--gray-600); line-height: 1.4; }

/* Calculate Button */
.calculate-btn {
  width: 100%;
  height: 48px;
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px 0 rgba(251, 113, 133, 0.35);
}
.calculate-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px 0 rgba(251, 113, 133, 0.45); }
.calculate-btn:active { transform: translateY(0); }
.calculate-btn svg { width: 20px; height: 20px; }

/* Results */
.results-section {
  display: none;
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 832px) {
  .results-section {
    max-width: 100%;
  }
}
.results-section.visible { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.results-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 1.25rem;
}

/* Section Dividers */
.results-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 1rem 0;
}

.results-section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-top: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.results-section-title svg {
  width: 14px;
  height: 14px;
  color: var(--gray-400);
}

/* Results Header */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-100);
}
.results-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}
.results-actions { display: flex; gap: 0.375rem; }
.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--gray-400);
  background: transparent;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.action-btn:hover { background: var(--gray-50); color: var(--gray-600); border-color: var(--gray-300); }

/* Primary Result - Compact */
.result-primary {
  text-align: center;
  padding: 0.875rem;
  margin-bottom: 0.75rem;
  background: var(--primary-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--primary-light);
}
.result-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.result-main {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.result-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
}
.result-day {
  font-size: 0.8125rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* Cycle Timeline - Enhanced */
.cycle-timeline {
  margin: 1rem 0;
  padding: 0.5rem 0;
}
.timeline-wrapper {
  position: relative;
}
.timeline-track {
  position: relative;
  height: 40px;
  background: var(--gray-100);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.timeline-segment {
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}
.timeline-segment:hover { opacity: 0.85; }
.timeline-segment.period { background: linear-gradient(180deg, #fca5a5 0%, #f87171 100%); }
.timeline-segment.follicular { background: linear-gradient(180deg, #e5e7eb 0%, #d1d5db 100%); }
.timeline-segment.fertile-low { background: linear-gradient(180deg, #fde68a 0%, #fcd34d 100%); }
.timeline-segment.fertile-high { background: linear-gradient(180deg, #86efac 0%, #4ade80 100%); }
.timeline-segment.ovulation {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  position: relative;
}
.timeline-segment.ovulation::after {
  content: "●";
  color: white;
  font-size: 0.75rem;
}
.timeline-segment.luteal { background: linear-gradient(180deg, #c4b5fd 0%, #a78bfa 100%); }
.timeline-segment-label {
  font-size: 0.5625rem;
  color: rgba(0,0,0,0.5);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.timeline-days {
  display: flex;
  justify-content: space-between;
  margin-top: 0.375rem;
  padding: 0 0.25rem;
}
.timeline-day-marker {
  font-size: 0.625rem;
  color: var(--gray-400);
  text-align: center;
}
.timeline-day-marker.highlight {
  color: var(--primary-dark);
  font-weight: 600;
}
.timeline-legend {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.timeline-legend-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.625rem;
  color: var(--gray-500);
}
.timeline-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.timeline-legend-dot.period { background: #f87171; }
.timeline-legend-dot.fertile { background: linear-gradient(90deg, #fcd34d, #4ade80); }
.timeline-legend-dot.ovulation { background: var(--primary); }
.timeline-legend-dot.luteal { background: #a78bfa; }

/* Results Grid - Tight 3-column */
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
@media (max-width: 480px) {
  .results-grid { grid-template-columns: 1fr; gap: 0.375rem; }
}
.result-item {
  padding: 0.625rem 0.5rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  text-align: center;
  border: 1px solid var(--gray-100);
  position: relative;
}
.result-item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
}
.result-item.fertile .result-item-dot { background: #22c55e; }
.result-item.period .result-item-dot { background: #f87171; }
.result-item.due .result-item-dot { background: #a78bfa; }
.result-item-label {
  font-size: 0.6875rem;
  color: var(--gray-500);
  margin-bottom: 0.125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.result-item-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-800);
}

/* Fertility Chart - Horizontal Bars */
.fertility-chart {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
}
.fertility-chart-header {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  margin-bottom: 0.625rem;
}
.fertility-chart-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-700);
}
.fertility-chart-subtitle {
  font-size: 0.625rem;
  color: var(--gray-400);
}
.fertility-bar {
  display: grid;
  grid-template-columns: 90px 1fr 36px;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  height: 22px;
}
.fertility-bar:last-child { margin-bottom: 0; }
.fertility-bar-date {
  font-size: 0.6875rem;
  color: var(--gray-500);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fertility-bar-track {
  height: 14px;
  background: white;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}
.fertility-bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  transition: width 0.3s ease;
}
.fertility-bar-fill.low { background: #fcd34d; }
.fertility-bar-fill.medium { background: #4ade80; }
.fertility-bar-fill.high { background: #f472b6; }
.fertility-bar-fill.peak { background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%); }
.fertility-bar-percent {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--gray-600);
  text-align: right;
  font-family: var(--font-mono);
}
.fertility-bar.is-peak .fertility-bar-date,
.fertility-bar.is-ovulation .fertility-bar-date {
  color: var(--gray-800);
  font-weight: 600;
}
.fertility-bar.is-peak .fertility-bar-percent { color: var(--primary-dark); }
.fertility-bar.is-ovulation .fertility-bar-date::after {
  content: " ●";
  color: var(--primary);
}
.fertility-bar.is-peak .fertility-bar-date::after {
  content: " ★";
  color: #f59e0b;
}

/* Calendar - Compact */
.calendar-section { margin-bottom: 0.75rem; }
.calendar-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}
.calendars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
@media (max-width: 560px) { .calendars-grid { grid-template-columns: 1fr; } }

.calendar-month {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  border: 1px solid var(--gray-100);
}
.calendar-month-header {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--gray-700);
  text-align: center;
  margin-bottom: 0.375rem;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  text-align: center;
}
.calendar-day-header {
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--gray-400);
  padding: 0.125rem;
}
.calendar-day {
  font-size: 0.6875rem;
  padding: 0.25rem 0.125rem;
  border-radius: 2px;
  color: var(--gray-600);
  line-height: 1;
}
.calendar-day.empty { visibility: hidden; }
.calendar-day.period { background: #fecaca; color: #b91c1c; }
.calendar-day.fertile-low { background: #fef9c3; color: #a16207; }
.calendar-day.fertile-high { background: #dcfce7; color: #166534; }
.calendar-day.ovulation { background: var(--primary); color: white; font-weight: 700; }
.calendar-day.today { box-shadow: inset 0 0 0 1px var(--gray-400); }

/* Legend - Inline */
.calendar-legend {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.625rem;
  color: var(--gray-500);
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-dot.period { background: #fecaca; }
.legend-dot.fertile-low { background: #fef9c3; }
.legend-dot.fertile-high { background: #dcfce7; }
.legend-dot.ovulation { background: var(--primary); }

/* Results Tables */
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--gray-100);
  margin-bottom: 0.75rem;
}
.results-table th,
.results-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
}
.results-table th {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--gray-50);
}
.results-table td {
  color: var(--gray-700);
}
.results-table td:first-child {
  font-weight: 500;
  color: var(--gray-800);
}
.results-table .highlight-row {
  background: var(--primary-bg);
}
.results-table .highlight-row td {
  color: var(--primary-dark);
  font-weight: 600;
}
.results-table .days-away {
  font-size: 0.6875rem;
  color: var(--gray-400);
  font-weight: 500;
}
.results-table .days-away.soon {
  color: var(--success);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
.stat-card {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 0.625rem;
  text-align: center;
  border: 1px solid var(--gray-100);
}
.stat-label {
  font-size: 0.625rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}
.stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
}
.stat-value.primary { color: var(--primary-dark); }
.stat-compare {
  font-size: 0.5625rem;
  color: var(--gray-400);
  margin-top: 0.125rem;
}

/* Tips Section - Collapsible */
.tips-section {
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}
.tips-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--gray-50);
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-md);
}
.tips-toggle::-webkit-details-marker { display: none; }
.tips-toggle::after {
  content: '+';
  font-size: 0.875rem;
  color: var(--gray-400);
}
.tips-section[open] .tips-toggle::after { content: '−'; }
.tips-section[open] .tips-toggle {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: 1px solid var(--gray-100);
}
.tips-content {
  padding: 0.75rem;
  background: white;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}
.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.625rem;
}
@media (max-width: 560px) {
  .tips-grid { grid-template-columns: 1fr; }
}
.tip-item {
  font-size: 0.6875rem;
  color: var(--gray-600);
  padding: 0.5rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  line-height: 1.4;
}
.tips-disclaimer {
  font-size: 0.625rem;
  color: var(--gray-400);
  text-align: center;
  margin: 0;
}

/* Enhanced Tips Grid */
.tips-enhanced {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1rem 0;
}
@media (max-width: 560px) {
  .tips-enhanced { grid-template-columns: 1fr; }
}
.tip-card {
  display: flex;
  gap: 0.625rem;
  padding: 0.75rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100);
}
.tip-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  flex-shrink: 0;
  border: 1px solid var(--gray-200);
}
.tip-content {
  flex: 1;
  min-width: 0;
}
.tip-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.125rem;
}
.tip-desc {
  font-size: 0.6875rem;
  color: var(--gray-500);
  line-height: 1.4;
}

/* Pregnancy Timeline */
.pregnancy-section {
  background: linear-gradient(135deg, #fdf4ff 0%, #faf5ff 100%);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 1rem 0;
  border: 1px solid #e9d5ff;
}
.pregnancy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.pregnancy-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #7c3aed;
}
.pregnancy-due {
  text-align: right;
}
.pregnancy-due-label {
  font-size: 0.625rem;
  color: var(--gray-500);
  text-transform: uppercase;
}
.pregnancy-due-date {
  font-size: 1rem;
  font-weight: 700;
  color: #7c3aed;
}
.pregnancy-due-season {
  font-size: 0.6875rem;
  color: var(--gray-500);
}
.pregnancy-timeline {
  display: flex;
  gap: 0.375rem;
  margin: 0.75rem 0;
}
.trimester {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.625rem;
}
.trimester.t1 { background: #fce7f3; color: #be185d; }
.trimester.t2 { background: #dbeafe; color: #1d4ed8; }
.trimester.t3 { background: #d1fae5; color: #047857; }
.trimester-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.trimester-dates {
  font-weight: 400;
  opacity: 0.8;
  margin-top: 0.125rem;
}
.pregnancy-milestones {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.375rem;
  margin-top: 0.75rem;
}
@media (max-width: 480px) {
  .pregnancy-milestones { grid-template-columns: 1fr; }
}
.milestone {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  color: var(--gray-600);
  padding: 0.375rem 0.5rem;
  background: white;
  border-radius: var(--radius-sm);
}
.milestone-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a78bfa;
  flex-shrink: 0;
}
.milestone-week {
  font-weight: 600;
  color: var(--gray-700);
}

/* Best Days Highlight */
.best-days-box {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #6ee7b7;
  border-radius: var(--radius-md);
  padding: 0.75rem;
  margin: 0.75rem 0;
  text-align: center;
}
.best-days-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: #047857;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.best-days-dates {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #065f46;
}
.best-days-note {
  font-size: 0.6875rem;
  color: #059669;
  margin-top: 0.25rem;
}

/* Print Button */
.print-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: 100%;
  padding: 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
  background: var(--gray-50);
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 1rem;
}
.print-btn:hover {
  background: var(--gray-100);
  color: var(--gray-700);
  border-color: var(--gray-400);
}
.print-btn svg {
  width: 14px;
  height: 14px;
}

/* Disclaimer */
.results-disclaimer {
  font-size: 0.6875rem;
  color: var(--gray-400);
  text-align: center;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-100);
}

/* Print Styles */
@media print {
  body { background: white; }
  .header, .footer, .nav-toggle, .key-takeaways, .calculator-card {
    display: none !important;
  }
  .results-section {
    display: block !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  .results-card {
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .print-btn,
  .action-btn,
  .best-days-box {
    display: none !important;
  }
  .tips-enhanced {
    break-inside: avoid;
  }
  .pregnancy-section {
    break-inside: avoid;
    background: white;
    border: 1px solid #e9d5ff;
  }
  .calendar-section {
    break-inside: avoid;
  }
  .results-table {
    break-inside: avoid;
  }
  .stats-grid {
    break-inside: avoid;
  }
  .result-primary {
    background: white;
    border: 2px solid var(--primary);
  }
}

/* Content Sections */
.content-section {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 832px) {
  .content-section {
    max-width: 100%;
    border-radius: var(--radius-lg);
  }
}
.content-section h2 { margin-top: 0; border-bottom: none; padding-bottom: 0; }
.content-section h2::after { content: ''; display: block; width: 60px; height: 3px; background: var(--primary); margin-top: 0.5rem; border-radius: var(--radius-full); }

/* Cycle Diagram */
.cycle-diagram { display: flex; justify-content: center; margin: 1.5rem 0; }
.cycle-phases { display: flex; gap: 0; width: 100%; max-width: 600px; border-radius: var(--radius-lg); overflow: hidden; }
.cycle-phase { padding: 1rem 0.5rem; text-align: center; color: white; flex: 1; }
.cycle-phase.menstrual { background: #f87171; flex: 0.18; }
.cycle-phase.follicular { background: #fbbf24; flex: 0.32; }
.cycle-phase.ovulation { background: var(--primary); flex: 0.1; }
.cycle-phase.luteal { background: #a78bfa; flex: 0.4; }
.cycle-phase-name { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.cycle-phase-days { font-size: 0.6875rem; opacity: 0.9; margin-top: 0.25rem; }

/* Tables */
.table-responsive { overflow-x: auto; margin: 1.5rem 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.data-table th, .data-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--gray-200); }
.data-table th { font-weight: 600; color: var(--gray-700); background: var(--gray-50); }
.data-table td { color: var(--gray-600); }
.data-table tbody tr:hover { background: var(--gray-50); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
.faq-item { border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
.faq-question { width: 100%; padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: 1rem; font-weight: 500; text-align: left; color: var(--gray-800); background: var(--gray-50); border: none; cursor: pointer; transition: all 0.15s ease; }
.faq-question:hover { background: var(--gray-100); }
.faq-question svg { width: 20px; height: 20px; color: var(--gray-400); transition: transform 0.15s ease; flex-shrink: 0; }
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer { display: none; padding: 1rem 1.5rem 1.5rem; background: white; }
.faq-item.open .faq-answer { display: block; }
.faq-answer p:last-child { margin-bottom: 0; }

/* CTA Box */
.cta-box { padding: 2rem; margin: 2rem 0; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); border-radius: var(--radius-xl); text-align: center; }
.cta-box h3 { color: white; margin-top: 0; margin-bottom: 0.5rem; }
.cta-box p { color: rgba(255, 255, 255, 0.9); margin-bottom: 1.5rem; }
.cta-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 1rem 2rem; font-size: 1rem; font-weight: 600; color: var(--primary-dark); background: white; border-radius: var(--radius-lg); text-decoration: none; transition: all 0.15s ease; box-shadow: var(--shadow-md); }
.cta-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }

/* Blog */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.blog-card { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; transition: all 0.15s ease; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card-content { padding: 1.5rem; }
.blog-card-meta { font-size: 0.8125rem; color: var(--gray-500); margin-bottom: 0.5rem; }
.blog-card h3 { margin-top: 0; margin-bottom: 0.5rem; font-size: 1.125rem; }
.blog-card h3 a { color: var(--gray-900); }
.blog-card h3 a:hover { color: var(--primary-dark); text-decoration: none; }
.blog-card p { font-size: 0.9375rem; color: var(--gray-600); margin-bottom: 1rem; }
.blog-card-link { font-size: 0.875rem; font-weight: 500; color: var(--primary-dark); }

/* Article */
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; font-size: 0.875rem; color: var(--gray-500); flex-wrap: wrap; }
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--primary-dark); }
.article-header { margin-bottom: 2rem; }
.article-header h1 { margin-bottom: 1rem; }
.article-meta { display: flex; align-items: center; gap: 1.5rem; font-size: 0.875rem; color: var(--gray-500); }

/* TOC */
.toc { padding: 1.5rem; margin: 1.5rem 0; background: var(--gray-50); border-radius: var(--radius-lg); }
.toc h2 { margin-top: 0; font-size: 1rem; border-bottom: none; }
.toc h2::after { display: none; }
.toc ol { margin: 0; padding-left: 1.5rem; }
.toc li { padding: 0.25rem 0; }
.toc a { color: var(--gray-600); font-size: 0.9375rem; }
.toc a:hover { color: var(--primary-dark); }

/* Footer */
.footer { background: var(--gray-900); color: var(--gray-400); padding: 3rem 0 1.5rem; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .logo { color: white; margin-bottom: 1rem; }
.footer-brand .logo-icon { color: var(--primary); }
.footer-brand p { font-size: 0.875rem; line-height: 1.7; }
.footer-nav h4 { color: white; font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 0.5rem; }
.footer-nav a { font-size: 0.875rem; color: var(--gray-400); transition: color 0.15s ease; }
.footer-nav a:hover { color: white; text-decoration: none; }
.footer-bottom { padding-top: 1.5rem; border-top: 1px solid var(--gray-800); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; font-size: 0.8125rem; }
.footer-disclaimer { max-width: 600px; font-size: 0.75rem; color: var(--gray-500); line-height: 1.6; }

/* Utilities */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.text-center { text-align: center; }

/* Last Updated */
.last-updated {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Page Title - Centered */
main h1 {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Key Takeaways */
.key-takeaways {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #86efac;
  border-left: 4px solid var(--success);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 832px) {
  .key-takeaways {
    max-width: 100%;
  }
}
.key-takeaways h2 {
  font-size: 1rem;
  color: #166534;
  margin: 0 0 0.75rem 0;
  padding-bottom: 0;
  border-bottom: none;
}
.key-takeaways h2::after { display: none; }
.key-takeaways ul {
  margin: 0;
  padding-left: 1.25rem;
}
.key-takeaways li {
  font-size: 0.9375rem;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}
.key-takeaways li:last-child { margin-bottom: 0; }
.key-takeaways strong { color: #166534; }

/* Pro Tips */
.pro-tip {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
}
.pro-tip-header {
  font-size: 0.875rem;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 0.5rem;
}
.pro-tip p {
  font-size: 0.9375rem;
  color: var(--gray-700);
  margin: 0;
}

/* How-to Steps */
.how-to-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}
.how-to-step {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
}
.step-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 50%;
}
.step-content h3 {
  font-size: 1rem;
  margin: 0 0 0.375rem 0;
}
.step-content p {
  font-size: 0.9375rem;
  color: var(--gray-600);
  margin: 0;
}

/* Example Cards */
.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.example-card {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 1rem;
  border: 1px solid var(--gray-200);
}
.example-card h3 {
  font-size: 0.9375rem;
  margin: 0 0 0.75rem 0;
  color: var(--primary-dark);
}
.example-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.example-inputs span {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  color: var(--gray-600);
}
.example-results {
  background: white;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}
.example-results p {
  font-size: 0.8125rem;
  margin: 0.25rem 0;
  color: var(--gray-700);
}
.example-note {
  font-size: 0.75rem;
  color: var(--gray-500);
  font-style: italic;
  margin: 0;
}

/* Use Cases */
.use-cases {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}
.use-case {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--success);
}
.use-case.warning {
  background: #fef2f2;
  border-left-color: var(--error);
}
.use-case-icon {
  flex-shrink: 0;
  font-size: 1.25rem;
}
.use-case-content h3 {
  font-size: 0.9375rem;
  margin: 0 0 0.375rem 0;
}
.use-case-content p {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin: 0;
}

/* Reference Tables */
.reference-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.reference-table th,
.reference-table td {
  padding: 0.625rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}
.reference-table th {
  font-weight: 600;
  color: var(--gray-700);
  background: var(--gray-50);
  font-size: 0.8125rem;
}
.reference-table td { color: var(--gray-600); }
.reference-table tbody tr:hover { background: var(--gray-50); }
.reference-table tr.highlight {
  background: var(--primary-bg);
}
.reference-table tr.highlight td { color: var(--gray-800); font-weight: 500; }

/* Fertility Badges */
.fertility-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: var(--radius-full);
}
.fertility-badge.low { background: #fef3c7; color: #92400e; }
.fertility-badge.medium { background: #d1fae5; color: #065f46; }
.fertility-badge.high { background: #fce7f3; color: #9d174d; }
.fertility-badge.peak { background: var(--primary); color: white; }

/* Formula Cards */
.formula-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.formula-card {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 1rem;
  border: 1px solid var(--gray-200);
}
.formula-card h3 {
  font-size: 0.9375rem;
  margin: 0 0 0.5rem 0;
}
.formula-display {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--primary-dark);
  background: white;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: 0.5rem;
}
.formula-card p {
  font-size: 0.8125rem;
  color: var(--gray-600);
  margin: 0;
}

/* Results Explanation */
.results-explanation {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}
.result-explainer {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.result-explainer h3 {
  font-size: 0.9375rem;
  margin: 0 0 0.5rem 0;
}
.result-explainer p {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin: 0 0 0.5rem 0;
}
.result-explainer p:last-child { margin-bottom: 0; }

/* Comparison Table */
.comparison-table td:first-child { min-width: 140px; }
@media (max-width: 768px) {
  .comparison-table { font-size: 0.75rem; }
  .comparison-table th,
  .comparison-table td { padding: 0.5rem; }
}

/* Guides Grid */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.guide-card {
  display: block;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  text-decoration: none;
  transition: all 0.15s ease;
}
.guide-card:hover {
  background: white;
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transform: translateY(-2px);
}
.guide-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.guide-card h3 {
  font-size: 0.9375rem;
  color: var(--gray-800);
  margin: 0 0 0.375rem 0;
}
.guide-card p {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin: 0;
  line-height: 1.4;
}

/* ============================================
   ENHANCED CONTENT STYLES
   Sources, External Links, Tables, Citations
   ============================================ */

/* Breadcrumb (visible on all pages) */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--gray-500);
  flex-wrap: wrap;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.breadcrumb-nav a { color: var(--gray-500); }
.breadcrumb-nav a:hover { color: var(--primary-dark); }
.breadcrumb-nav .breadcrumb-separator { color: var(--gray-300); font-size: 0.75rem; }
.breadcrumb-nav .breadcrumb-current { color: var(--gray-700); font-weight: 500; }

/* Sources & References Section */
.sources-section {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.sources-section h2 {
  font-size: 1.125rem;
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-800);
}
.sources-section h2::after { display: none; }

/* References List */
.references-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: ref-counter;
}
.references-list li {
  counter-increment: ref-counter;
  padding: 0.5rem 0;
  padding-left: 2rem;
  position: relative;
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.5;
  border-bottom: 1px solid var(--gray-100);
}
.references-list li:last-child { border-bottom: none; }
.references-list li::before {
  content: counter(ref-counter) ".";
  position: absolute;
  left: 0;
  font-weight: 600;
  color: var(--gray-400);
  font-size: 0.8125rem;
}

/* External Link Styling */
.external-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--primary-dark);
  font-weight: 500;
}
.external-link::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e11d48' stroke-width='2.5'%3E%3Cpath d='M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

/* Citation Superscript */
.citation {
  font-size: 0.6875rem;
  vertical-align: super;
  color: var(--primary-dark);
  font-weight: 600;
  cursor: help;
  text-decoration: none;
}
.citation:hover { text-decoration: underline; }

/* Comparison Card */
.comparison-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 600px) {
  .comparison-card { grid-template-columns: 1fr; }
}
.comparison-card-item {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.comparison-card-item h3 {
  font-size: 0.9375rem;
  margin: 0 0 0.5rem 0;
}

/* Stat Highlight Row */
.stat-highlight-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--primary-bg);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}
.stat-highlight-row .stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  flex-shrink: 0;
}
.stat-highlight-row .stat-text {
  font-size: 0.9375rem;
  color: var(--gray-700);
}

/* Age Fertility Table */
.age-fertility-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1rem 0;
}
.age-fertility-table th,
.age-fertility-table td {
  padding: 0.625rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}
.age-fertility-table th {
  font-weight: 600;
  color: var(--gray-700);
  background: var(--gray-50);
  font-size: 0.8125rem;
}
.age-fertility-table td { color: var(--gray-600); }
.age-fertility-table tbody tr:hover { background: var(--gray-50); }
.age-fertility-table .age-highlight { background: var(--primary-bg); }
.age-fertility-table .age-highlight td { color: var(--primary-dark); font-weight: 500; }
.age-fertility-table .age-caution { background: #fef3c7; }
.age-fertility-table .age-caution td { color: #92400e; }

/* Myth vs Fact Boxes */
.myth-fact {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
}
.myth-fact-myth {
  background: #fef2f2;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-200);
}
.myth-fact-myth strong {
  color: #b91c1c;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.myth-fact-myth p {
  margin: 0.25rem 0 0;
  color: var(--gray-700);
  font-size: 0.9375rem;
}
.myth-fact-fact {
  background: #f0fdf4;
  padding: 0.75rem 1rem;
}
.myth-fact-fact strong {
  color: #166534;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.myth-fact-fact p {
  margin: 0.25rem 0 0;
  color: var(--gray-700);
  font-size: 0.9375rem;
}

/* Info Banner */
.info-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #93c5fd;
  border-left: 4px solid #3b82f6;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.info-banner p {
  font-size: 0.9375rem;
  color: var(--gray-700);
  margin: 0;
}
.info-banner strong { color: #1e40af; }

/* Start Here Grid (Blog) */
.start-here-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 768px) {
  .start-here-grid { grid-template-columns: 1fr; }
}
.start-here-card {
  background: linear-gradient(135deg, var(--primary-bg) 0%, #ffe4e6 100%);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-decoration: none;
  transition: all 0.15s ease;
}
.start-here-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.start-here-card .start-here-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 50%;
  margin-bottom: 0.75rem;
}
.start-here-card h3 {
  font-size: 0.9375rem;
  color: var(--gray-900);
  margin: 0 0 0.375rem 0;
}
.start-here-card p {
  font-size: 0.8125rem;
  color: var(--gray-600);
  margin: 0;
  line-height: 1.4;
}

/* Reading Time Badge */
.reading-time {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--gray-400);
  font-weight: 500;
}

/* Resource Cards Grid */
.resource-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 600px) {
  .resource-cards { grid-template-columns: 1fr; }
}
.resource-card {
  display: block;
  padding: 1rem;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.15s ease;
}
.resource-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transform: translateY(-2px);
}
.resource-card h3 {
  font-size: 0.9375rem;
  color: var(--gray-800);
  margin: 0 0 0.375rem 0;
}
.resource-card p {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin: 0;
  line-height: 1.4;
}

/* Privacy Comparison Table */
.privacy-table td.yes { color: #166534; font-weight: 600; }
.privacy-table td.no { color: #b91c1c; font-weight: 600; }
.privacy-table td.partial { color: #92400e; font-weight: 500; }
.privacy-table tr.our-row { background: #f0fdf4; }
.privacy-table tr.our-row td { font-weight: 500; }

/* ============================================
   NEW VISUAL COMPONENTS
   Bar Charts, Column Charts, Timelines, etc.
   ============================================ */

/* --- Horizontal Bar Chart --- */
.css-bar-chart { margin: 1.5rem 0; }
.css-bar-chart .chart-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 1rem;
}
.css-bar-chart .chart-bar {
  display: grid;
  grid-template-columns: 140px 1fr 50px;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
@media (max-width: 600px) {
  .css-bar-chart .chart-bar {
    grid-template-columns: 100px 1fr 40px;
    gap: 0.5rem;
  }
}
.css-bar-chart .bar-label {
  font-size: 0.8125rem;
  color: var(--gray-700);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.css-bar-chart .bar-track {
  height: 24px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}
.css-bar-chart .bar-fill {
  height: 100%;
  border-radius: var(--radius-md);
  transition: width 0.4s ease;
  min-width: 4px;
}
.css-bar-chart .bar-value {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-600);
  text-align: right;
  font-family: var(--font-mono);
}
/* Bar color variants */
.bar-fill.coral { background: linear-gradient(90deg, var(--primary-light), var(--primary)); }
.bar-fill.green { background: linear-gradient(90deg, #86efac, #22c55e); }
.bar-fill.blue { background: linear-gradient(90deg, #93c5fd, #3b82f6); }
.bar-fill.purple { background: linear-gradient(90deg, #c4b5fd, #8b5cf6); }
.bar-fill.amber { background: linear-gradient(90deg, #fde68a, #f59e0b); }
.bar-fill.red { background: linear-gradient(90deg, #fca5a5, #ef4444); }
.css-bar-chart .chart-source {
  font-size: 0.6875rem;
  color: var(--gray-400);
  margin-top: 0.5rem;
  font-style: italic;
}

/* --- Vertical Column Chart --- */
.css-column-chart { margin: 1.5rem 0; }
.css-column-chart .chart-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.75rem;
}
.css-column-chart .chart-subtitle {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
}
.css-column-chart .columns-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 180px;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--gray-200);
  position: relative;
}
@media (max-width: 600px) {
  .css-column-chart .columns-wrapper { height: 140px; gap: 2px; }
}
.css-column-chart .column {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  min-width: 0;
}
.css-column-chart .column-bar {
  width: 100%;
  max-width: 32px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: height 0.4s ease;
  position: relative;
}
.css-column-chart .column-value {
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 2px;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .css-column-chart .column-value { font-size: 0.5rem; }
}
.css-column-chart .column-labels {
  display: flex;
  gap: 3px;
  margin-top: 0.375rem;
}
.css-column-chart .column-label {
  flex: 1;
  text-align: center;
  font-size: 0.5625rem;
  color: var(--gray-400);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.css-column-chart .column-label.highlight {
  color: var(--primary-dark);
  font-weight: 600;
}
/* Column color variants */
.column-bar.coral { background: var(--primary); }
.column-bar.coral-light { background: var(--primary-light); }
.column-bar.green { background: #22c55e; }
.column-bar.green-light { background: #86efac; }
.column-bar.blue { background: #3b82f6; }
.column-bar.blue-light { background: #93c5fd; }
.column-bar.purple { background: #8b5cf6; }
.column-bar.purple-light { background: #c4b5fd; }
.column-bar.amber { background: #f59e0b; }
.column-bar.red { background: #ef4444; }
.column-bar.gray { background: var(--gray-300); }
.css-column-chart .chart-legend {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.css-column-chart .legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--gray-600);
}
.css-column-chart .legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.css-column-chart .chart-source {
  font-size: 0.6875rem;
  color: var(--gray-400);
  margin-top: 0.5rem;
  font-style: italic;
}

/* --- Visual Timeline --- */
.visual-timeline { margin: 1.5rem 0; }
.visual-timeline .timeline-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 1rem;
}
.visual-timeline .tl-items {
  position: relative;
  padding-left: 2rem;
}
.visual-timeline .tl-items::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}
.visual-timeline .tl-item {
  position: relative;
  padding-bottom: 1.5rem;
}
.visual-timeline .tl-item:last-child { padding-bottom: 0; }
.visual-timeline .tl-dot {
  position: absolute;
  left: -2rem;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--gray-300);
  z-index: 1;
}
.visual-timeline .tl-item.active .tl-dot { border-color: var(--primary); background: var(--primary-bg); }
.visual-timeline .tl-item.completed .tl-dot { border-color: var(--success); background: var(--success-bg); }
.visual-timeline .tl-item.coral .tl-dot { border-color: var(--primary); }
.visual-timeline .tl-item.green .tl-dot { border-color: #22c55e; }
.visual-timeline .tl-item.blue .tl-dot { border-color: #3b82f6; }
.visual-timeline .tl-item.purple .tl-dot { border-color: #8b5cf6; }
.visual-timeline .tl-item.amber .tl-dot { border-color: #f59e0b; }
.visual-timeline .tl-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.125rem;
}
.visual-timeline .tl-heading {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.25rem;
}
.visual-timeline .tl-desc {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.5;
}

/* --- Comparison Cards (A vs B) --- */
.vs-comparison { margin: 1.5rem 0; }
.vs-comparison .vs-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 1rem;
  text-align: center;
}
.vs-comparison .vs-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
}
@media (max-width: 600px) {
  .vs-comparison .vs-grid { grid-template-columns: 1fr; gap: 0.5rem; }
  .vs-comparison .vs-divider { display: none; }
}
.vs-comparison .vs-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.vs-comparison .vs-card.option-a { border-top: 3px solid var(--primary); }
.vs-comparison .vs-card.option-b { border-top: 3px solid #3b82f6; }
.vs-comparison .vs-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.vs-comparison .vs-card.option-a .vs-card-title { color: var(--primary-dark); }
.vs-comparison .vs-card.option-b .vs-card-title { color: #1d4ed8; }
.vs-comparison .vs-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.vs-comparison .vs-list li {
  font-size: 0.875rem;
  color: var(--gray-600);
  padding: 0.375rem 0;
  padding-left: 1.25rem;
  position: relative;
  border-bottom: 1px solid var(--gray-100);
}
.vs-comparison .vs-list li:last-child { border-bottom: none; }
.vs-comparison .vs-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 600;
  font-size: 0.75rem;
}
.vs-comparison .vs-list li.con::before {
  content: '✗';
  color: var(--error);
}
.vs-comparison .vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
}
.vs-comparison .vs-badge {
  background: var(--gray-100);
  color: var(--gray-500);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-full);
}

/* --- Data Callout --- */
.data-callout {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}
.data-callout .callout-number {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.375rem;
}
.data-callout .callout-label {
  font-size: 0.9375rem;
  color: var(--gray-600);
  font-weight: 500;
  margin-bottom: 0.25rem;
}
.data-callout .callout-source {
  font-size: 0.6875rem;
  color: var(--gray-400);
  font-style: italic;
}
/* Data callout color variants */
.data-callout.coral .callout-number { color: var(--primary-dark); }
.data-callout.coral { border-color: var(--primary-light); background: var(--primary-bg); }
.data-callout.green .callout-number { color: #059669; }
.data-callout.green { border-color: #86efac; background: #f0fdf4; }
.data-callout.blue .callout-number { color: #1d4ed8; }
.data-callout.blue { border-color: #93c5fd; background: #eff6ff; }
.data-callout.purple .callout-number { color: #7c3aed; }
.data-callout.purple { border-color: #c4b5fd; background: #f5f3ff; }
/* Inline row of callouts */
.data-callout-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.data-callout-row .data-callout { margin: 0; }

/* --- Icon Info Grid --- */
.icon-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 540px) {
  .icon-info-grid { grid-template-columns: 1fr; }
}
.icon-info-card {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  transition: box-shadow 0.15s ease;
}
.icon-info-card:hover { box-shadow: var(--shadow-sm); }
.icon-info-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 1.25rem;
}
.icon-info-icon.coral { background: var(--primary-bg); }
.icon-info-icon.green { background: #f0fdf4; }
.icon-info-icon.blue { background: #eff6ff; }
.icon-info-icon.purple { background: #f5f3ff; }
.icon-info-icon.amber { background: #fffbeb; }
.icon-info-content { flex: 1; min-width: 0; }
.icon-info-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.25rem;
}
.icon-info-desc {
  font-size: 0.8125rem;
  color: var(--gray-500);
  line-height: 1.45;
}

/* --- Progress Indicator --- */
.progress-indicator { margin: 1.5rem 0; }
.progress-indicator .progress-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 1rem;
}
.progress-indicator .progress-track {
  position: relative;
  height: 12px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: visible;
  margin-bottom: 0.5rem;
}
.progress-indicator .progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}
.progress-fill.coral { background: linear-gradient(90deg, var(--primary-light), var(--primary)); }
.progress-fill.green { background: linear-gradient(90deg, #86efac, #22c55e); }
.progress-fill.blue { background: linear-gradient(90deg, #93c5fd, #3b82f6); }
.progress-fill.purple { background: linear-gradient(90deg, #c4b5fd, #8b5cf6); }
.progress-indicator .progress-markers {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-top: 0.5rem;
}
.progress-indicator .progress-marker {
  text-align: center;
  font-size: 0.6875rem;
  color: var(--gray-500);
  position: relative;
}
.progress-indicator .progress-marker::before {
  content: '';
  display: block;
  width: 2px;
  height: 8px;
  background: var(--gray-300);
  margin: 0 auto 0.25rem;
}
.progress-indicator .progress-marker.active {
  color: var(--primary-dark);
  font-weight: 600;
}
.progress-indicator .progress-marker.active::before { background: var(--primary); }

/* --- Related Articles Grid --- */
.related-articles { margin: 2rem 0; }
.related-articles .related-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-bg);
}
.related-articles .related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}
.related-articles .related-card {
  display: block;
  padding: 1rem;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.15s ease;
}
.related-articles .related-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transform: translateY(-2px);
}
.related-articles .related-card .related-cat {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.375rem;
}
.related-articles .related-card h3 {
  font-size: 0.9375rem;
  color: var(--gray-800);
  margin: 0 0 0.375rem 0;
  line-height: 1.3;
}
.related-articles .related-card p {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin: 0;
  line-height: 1.45;
}

/* --- Summary Box --- */
.summary-box {
  background: white;
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.summary-box.green { border-left-color: #22c55e; }
.summary-box.blue { border-left-color: #3b82f6; }
.summary-box.purple { border-left-color: #8b5cf6; }
.summary-box.amber { border-left-color: #f59e0b; }
.summary-box .summary-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}
.summary-box ul {
  margin: 0;
  padding-left: 1.25rem;
}
.summary-box li {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 0.375rem;
}
.summary-box li:last-child { margin-bottom: 0; }
.summary-box p {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin: 0;
}

/* --- Stacked Bar --- */
.stacked-bar { margin: 1.5rem 0; }
.stacked-bar .stacked-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.75rem;
}
.stacked-bar .stacked-track {
  display: flex;
  height: 36px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}
.stacked-bar .stacked-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: flex 0.3s ease;
  position: relative;
  overflow: hidden;
}
.stacked-bar .stacked-segment-label {
  font-size: 0.625rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  padding: 0 0.375rem;
}
.stacked-bar .stacked-segment.coral { background: var(--primary); }
.stacked-bar .stacked-segment.coral .stacked-segment-label { color: white; }
.stacked-bar .stacked-segment.coral-light { background: var(--primary-light); }
.stacked-bar .stacked-segment.coral-light .stacked-segment-label { color: var(--primary-dark); }
.stacked-bar .stacked-segment.green { background: #22c55e; }
.stacked-bar .stacked-segment.green .stacked-segment-label { color: white; }
.stacked-bar .stacked-segment.green-light { background: #86efac; }
.stacked-bar .stacked-segment.green-light .stacked-segment-label { color: #166534; }
.stacked-bar .stacked-segment.blue { background: #3b82f6; }
.stacked-bar .stacked-segment.blue .stacked-segment-label { color: white; }
.stacked-bar .stacked-segment.blue-light { background: #93c5fd; }
.stacked-bar .stacked-segment.blue-light .stacked-segment-label { color: #1d4ed8; }
.stacked-bar .stacked-segment.purple { background: #8b5cf6; }
.stacked-bar .stacked-segment.purple .stacked-segment-label { color: white; }
.stacked-bar .stacked-segment.purple-light { background: #c4b5fd; }
.stacked-bar .stacked-segment.purple-light .stacked-segment-label { color: #6d28d9; }
.stacked-bar .stacked-segment.amber { background: #f59e0b; }
.stacked-bar .stacked-segment.amber .stacked-segment-label { color: white; }
.stacked-bar .stacked-segment.gray { background: var(--gray-300); }
.stacked-bar .stacked-segment.gray .stacked-segment-label { color: var(--gray-700); }
.stacked-bar .stacked-segment.red { background: #ef4444; }
.stacked-bar .stacked-segment.red .stacked-segment-label { color: white; }
.stacked-bar .stacked-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.625rem;
}
.stacked-bar .stacked-legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--gray-600);
}
.stacked-bar .stacked-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* --- Category Header (Blog Index) --- */
.category-header {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.category-header .category-icon {
  font-size: 1.25rem;
}

/* --- Emergency Banner --- */
.emergency-banner {
  background: var(--error-bg);
  border: 1px solid #fca5a5;
  border-left: 4px solid var(--error);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.emergency-banner .emergency-title {
  font-size: 1rem;
  font-weight: 700;
  color: #991b1b;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.emergency-banner p {
  font-size: 0.875rem;
  color: #7f1d1d;
  margin-bottom: 0.5rem;
}
.emergency-banner p:last-child { margin-bottom: 0; }
.emergency-banner a {
  color: #991b1b;
  font-weight: 600;
  text-decoration: underline;
}
.emergency-banner a:hover { color: #7f1d1d; }

/* --- Checklist --- */
.checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.checklist li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.625rem;
  font-size: 0.9375rem;
  color: var(--gray-700);
}
.checklist li::before {
  content: '☐';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.125rem;
  color: var(--primary);
}
.checklist li.checked::before {
  content: '☑';
  color: var(--success);
}

/* --- Authority Links (Inline Flex Row) --- */
.authority-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin: 1rem 0;
}
.authority-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  transition: all 0.15s ease;
}
.authority-links a:hover {
  background: var(--primary-bg);
  border-color: var(--primary-light);
  color: var(--primary-dark);
  text-decoration: none;
}
.authority-links a .authority-icon {
  font-size: 0.875rem;
}

/* Print - See main Print Styles section above */

/* ============================================
   PHASE 1 ADDITIONS
   Category Filters, Learning Paths, Mini-Calc
   ============================================ */

/* --- Category Filters (Blog Listing) --- */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
  justify-content: center;
}
.category-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-600);
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}
.category-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--gray-800);
}
.category-btn.active {
  background: var(--primary-bg);
  border-color: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}
.category-btn .cat-icon {
  font-size: 0.875rem;
}
.blog-card[data-category] {
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.blog-card.hidden-by-filter {
  display: none;
}

/* --- Learning Paths (Blog Listing) --- */
.learning-paths {
  margin: 2rem 0;
}
.learning-paths-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}
@media (max-width: 768px) {
  .learning-paths-grid { grid-template-columns: 1fr; }
}
.learning-path {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border-top: 3px solid var(--primary);
}
.learning-path.green { border-top-color: #22c55e; }
.learning-path.blue { border-top-color: #3b82f6; }
.learning-path.purple { border-top-color: #8b5cf6; }
.learning-path h3 {
  font-size: 1rem;
  margin: 0 0 0.375rem 0;
  color: var(--gray-800);
}
.learning-path .path-desc {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
}
.learning-path-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: path-step;
}
.learning-path-step {
  counter-increment: path-step;
  position: relative;
  padding-left: 2rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0;
  border-left: 2px solid var(--gray-200);
}
.learning-path-step:last-child { border-left-color: transparent; padding-bottom: 0; }
.learning-path-step::before {
  content: counter(path-step);
  position: absolute;
  left: -9px;
  top: 0;
  width: 18px;
  height: 18px;
  background: var(--primary);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.learning-path.green .learning-path-step::before { background: #22c55e; }
.learning-path.blue .learning-path-step::before { background: #3b82f6; }
.learning-path.purple .learning-path-step::before { background: #8b5cf6; }
.learning-path-step a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-700);
}
.learning-path-step a:hover { color: var(--primary-dark); }

/* --- Mini Calculator (404 Page) --- */
.mini-calc {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
  max-width: 500px;
}
.mini-calc h3 {
  font-size: 1rem;
  margin: 0 0 1rem 0;
  color: var(--gray-800);
}
.mini-calc .mini-calc-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 0.75rem;
}
@media (max-width: 480px) {
  .mini-calc .mini-calc-row { flex-direction: column; align-items: stretch; }
}
.mini-calc .mini-calc-field {
  flex: 1;
}
.mini-calc .mini-calc-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 0.25rem;
}
.mini-calc .mini-calc-field input,
.mini-calc .mini-calc-field select {
  width: 100%;
  height: 40px;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: white;
  color: var(--gray-800);
  font-family: var(--font-sans);
}
.mini-calc .mini-calc-field input:focus,
.mini-calc .mini-calc-field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}
.mini-calc-btn {
  height: 40px;
  padding: 0 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.mini-calc-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(251, 113, 133, 0.35); }
.mini-calc-result {
  display: none;
  background: var(--primary-bg);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 0.75rem;
}
.mini-calc-result.visible { display: block; animation: fadeIn 0.2s ease; }
.mini-calc-result .result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.375rem 0;
  font-size: 0.875rem;
  color: var(--gray-700);
  border-bottom: 1px solid rgba(251,113,133,0.15);
}
.mini-calc-result .result-row:last-child { border-bottom: none; }
.mini-calc-result .result-row strong {
  color: var(--primary-dark);
}

/* --- Print Additions for New Components --- */
@media print {
  .category-filters,
  .mini-calc,
  .learning-paths {
    break-inside: avoid;
  }
  .mini-calc-btn,
  .category-btn {
    display: none !important;
  }
  .data-callout-row,
  .css-bar-chart,
  .css-column-chart,
  .visual-timeline,
  .icon-info-grid,
  .stacked-bar {
    break-inside: avoid;
  }
}

/* --- Missing Class Aliases & Additions --- */

/* Bar chart: .css-bar-item is an alias for .chart-bar (used by some pages) */
.css-bar-chart .css-bar-item {
  display: grid;
  grid-template-columns: 140px 1fr 50px;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
@media (max-width: 600px) {
  .css-bar-chart .css-bar-item {
    grid-template-columns: 100px 1fr 40px;
    gap: 0.5rem;
  }
}
.css-bar-chart .css-bar-label {
  font-size: 0.8125rem;
  color: var(--gray-700);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.css-bar-chart .css-bar-track {
  height: 24px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}
.css-bar-chart .css-bar-fill {
  height: 100%;
  border-radius: var(--radius-md);
  transition: width 0.4s ease;
  min-width: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}
.css-bar-fill.coral { background: linear-gradient(90deg, var(--primary-light), var(--primary)); }
.css-bar-fill.green { background: linear-gradient(90deg, #86efac, #22c55e); }
.css-bar-fill.blue { background: linear-gradient(90deg, #93c5fd, #3b82f6); }
.css-bar-fill.purple { background: linear-gradient(90deg, #c4b5fd, #8b5cf6); }
.css-bar-fill.amber { background: linear-gradient(90deg, #fde68a, #f59e0b); color: var(--gray-800); }
.css-bar-fill.red { background: linear-gradient(90deg, #fca5a5, #ef4444); }
.css-bar-fill.gray { background: linear-gradient(90deg, var(--gray-200), var(--gray-400)); }

/* Column chart: aliases for variant class names */
.css-column-chart .css-column-chart-inner {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 180px;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--gray-200);
  position: relative;
}
@media (max-width: 600px) {
  .css-column-chart .css-column-chart-inner { height: 140px; gap: 2px; }
}
.css-column-chart .css-column-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  min-width: 0;
}
.css-column-chart .css-column-bar {
  width: 100%;
  max-width: 32px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: height 0.4s ease;
  position: relative;
}
.css-column-bar.coral { background: var(--primary); }
.css-column-bar.coral-light { background: var(--primary-light); }
.css-column-bar.green { background: #22c55e; }
.css-column-bar.green-light { background: #86efac; }
.css-column-bar.blue { background: #3b82f6; }
.css-column-bar.blue-light { background: #93c5fd; }
.css-column-bar.purple { background: #8b5cf6; }
.css-column-bar.amber { background: #f59e0b; }
.css-column-bar.red { background: #ef4444; }
.css-column-bar.gray { background: var(--gray-300); }
.css-column-chart .css-column-value {
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 2px;
  white-space: nowrap;
}
.css-column-chart .css-column-label {
  text-align: center;
  font-size: 0.5625rem;
  color: var(--gray-400);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 0.375rem;
}

/* Tips box (used in blog articles for practical tips sections) */
.tips-box {
  background: var(--primary-bg);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.tips-box h3, .tips-box h4 {
  color: var(--primary-dark);
  margin: 0 0 0.75rem;
  font-size: 1rem;
}
.tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tips-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.625rem;
  font-size: 0.9375rem;
  color: var(--gray-700);
  line-height: 1.6;
}
.tips-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
.tips-list li:last-child { margin-bottom: 0; }

/* Formula box (used in about page and some blog articles) */
.formula-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  overflow-x: auto;
}
.formula-box code {
  display: block;
  font-size: 0.875rem;
  line-height: 1.8;
}

/* Table wrapper for horizontal scroll on mobile */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
}

/* Key takeaways title variant */
.key-takeaways-title {
  font-size: 1rem;
  font-weight: 700;
  color: #166534;
  margin: 0 0 0.75rem;
}

/* Probability table (index.html) */
.probability-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
.probability-table th,
.probability-table td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--gray-200);
  text-align: left;
  font-size: 0.875rem;
}
.probability-table th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-700);
}
.probability-table tr:hover {
  background: var(--gray-50);
}

/* Timeline step (used in some blog articles) */
.timeline-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 3px solid var(--primary-light);
}
.timeline-step:last-child { margin-bottom: 0; }

/* Timeline content within visual timeline */
.tl-content {
  flex: 1;
}
.tl-content p {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.5;
}

/* Chart bars wrapper for index.html */
.chart-bars {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Bar item alias for index.html */
.bar-item {
  display: grid;
  grid-template-columns: 140px 1fr 50px;
  align-items: center;
  gap: 0.75rem;
}
@media (max-width: 600px) {
  .bar-item {
    grid-template-columns: 100px 1fr 40px;
    gap: 0.5rem;
  }
}

/* Myth/fact shorthand classes (used in clearblue guide) */
.myth { color: var(--gray-800); font-weight: 600; }
.fact { color: var(--gray-700); }
