/* Base reset and theme */
:root {
  --bg: #f7fbfd;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --brand: #0ea5e9; /* blue */
  --brand-2: #10b981; /* green */
  --ring: rgba(14, 165, 233, 0.35);
  --shadow: 0 8px 24px rgba(2, 32, 71, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: linear-gradient(180deg, #f0fbff 0%, var(--bg) 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  background: #fffffff2;
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid #e2e8f0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-name { letter-spacing: 0.2px; }
.main-nav { display: flex; gap: 16px; }
.main-nav a {
  padding: 10px 12px;
  border-radius: 10px;
}
.main-nav a:hover {
  background: #eff6ff;
}

.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 10px;
  line-height: 0;
  cursor: pointer;
}
.mobile-nav-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 4px var(--ring);
}
.mobile-nav-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #0f172a;
  margin: 4px 0;
}

/* Layout */
main.container { padding: 96px 16px 64px; flex: 1 0 auto; }
.intro { color: var(--muted); max-width: 60ch; }

.layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 24px;
  margin-top: 20px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.calculator h2, .card h2 { margin: 8px 0 16px; }

.unit-toggle { display: flex; gap: 16px; border: 0; margin: 0 0 12px; padding: 0; }
.unit-toggle legend { position: absolute; left: -9999px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; }

label { font-weight: 600; display: block; margin: 10px 0 6px; }
input, textarea, select, button {
  font: inherit;
}
input[type="number"], input[type="text"], input[type="email"], textarea, select {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
  outline: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn-primary {
  background: var(--brand);
  color: white;
  padding: 16px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
  background: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
  text-decoration: none;
}

.btn-primary.is-loading {
  opacity: 0.8;
}

.btn-primary.is-success {
  background: #16a34a;
}

.btn-primary.is-error {
  background: #dc2626;
}

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
  padding: 16px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  background: var(--brand);
  color: white;
  text-decoration: none;
}

.helper { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }

.result {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: #f1f5f9;
  display: grid; gap: 6px;
}
.result-value { font-size: 2rem; font-weight: 800; }
.result-label { color: var(--muted); }

.sidebar { display: grid; gap: 24px; }

.ad { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px; padding: 16px; color: #64748b; text-align: center; }
.ad-top, .ad-bottom { margin: 18px 0; }

/* Form status */
.form-status { margin-top: 10px; font-weight: 600; color: #334155; }
.form-status.success { color: #0f766e; }
.form-status.error { color: #b91c1c; }

/* BMI table */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; }
thead th { background: #eff6ff; }
tbody tr:nth-child(even) { background: #f8fafc; }
tbody tr.highlight { outline: 2px solid var(--brand); background: #ecfeff; }

/* Footer */
.site-footer { border-top: 1px solid #e2e8f0; padding: 32px 0; background: #fff; }
.footer-inner { display: grid; gap: 12px; justify-items: center; text-align: center; }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-nav a { color: #334155; }

/* Utility */
.hidden { display: none !important; }

/* Responsive */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .grid-2 { grid-template-columns: 1fr; }
  .mobile-nav-toggle { display: inline-block; }
  .main-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: none;
    flex-direction: column;
    gap: 0;
  }
  .main-nav a {
    padding: 14px 16px;
    border-radius: 0;
    border-top: 1px solid #f1f5f9;
  }
  .main-nav.open { display: flex; }
  .result-value { font-size: 1.6rem; }
}

/* Improve mobile tap targets */
button, .btn-primary, .btn-ghost { min-height: 44px; }
input[type="number"], input[type="text"], input[type="email"], textarea, select { min-height: 44px; }
body.no-scroll { overflow: hidden; }

/* Accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  background: #111827;
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  z-index: 200;
}

/* Blog Styles */
.blog-post {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.7;
}

.post-header {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 2px solid #e2e8f0;
}

.post-header h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  color: var(--text);
  line-height: 1.2;
}

.post-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.reading-time::before {
  content: "•";
  margin-right: 24px;
}

.post-content {
  font-size: 1.1rem;
}

.post-content .lead {
  font-size: 1.25rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 32px;
  line-height: 1.6;
}

.post-content h2 {
  font-size: 1.8rem;
  margin: 48px 0 24px 0;
  color: var(--text);
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

.post-content h3 {
  font-size: 1.4rem;
  margin: 32px 0 16px 0;
  color: var(--text);
}

.post-content p {
  margin-bottom: 20px;
}

.post-content ul, .post-content ol {
  margin: 20px 0;
  padding-left: 24px;
}

.post-content li {
  margin-bottom: 12px;
}

.post-content strong {
  color: var(--text);
  font-weight: 600;
}

.bmi-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.category {
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow);
}

.category h3 {
  margin: 0 0 12px 0;
  color: var(--brand);
  font-size: 1.2rem;
}

.bmi-range {
  font-weight: 700;
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: #eff6ff;
  border-radius: 8px;
  display: inline-block;
}

.cta-section {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 32px;
  margin: 48px 0;
  text-align: center;
}

.cta-section h2 {
  color: var(--text);
  margin: 0 0 16px 0;
  font-size: 1.8rem;
  border: none;
  padding: 0;
}

.cta-section p {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}



/* Blog responsive */
@media (max-width: 768px) {
  .post-header h1 {
    font-size: 2rem;
  }
  
  .post-content h2 {
    font-size: 1.6rem;
  }
  
  .post-content h3 {
    font-size: 1.3rem;
  }
  
  .bmi-categories {
    grid-template-columns: 1fr;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-buttons .btn-primary,
  .cta-buttons .btn-ghost {
    width: 100%;
    max-width: 300px;
  }
}

/* BMI Age-Gender Blog Specific Styles */
.bmi-table-container {
  margin: 32px 0;
  overflow-x: auto;
}

.bmi-table.comprehensive,
.bmi-table.pediatric {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.bmi-table.comprehensive th,
.bmi-table.comprehensive td,
.bmi-table.pediatric th,
.bmi-table.pediatric td {
  padding: 16px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.bmi-table.comprehensive th,
.bmi-table.pediatric th {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bmi-table.comprehensive tbody tr:nth-child(even),
.bmi-table.pediatric tbody tr:nth-child(even) {
  background: #f8fafc;
}

.bmi-table.comprehensive tbody tr:hover,
.bmi-table.pediatric tbody tr:hover {
  background: #ecfeff;
  transition: background-color 0.2s ease;
}

.bmi-table.comprehensive td:first-child,
.bmi-table.pediatric td:first-child {
  font-weight: 600;
  color: var(--brand);
}

.gender-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.comparison-card {
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comparison-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(2, 32, 71, 0.12);
}

.comparison-card h3 {
  color: var(--brand);
  margin: 0 0 16px 0;
  font-size: 1.3rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

.comparison-card ul {
  margin: 0;
  padding-left: 20px;
}

.comparison-card li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.ethnic-variations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.variation-item {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid #e2e8f0;
}

.variation-item h4 {
  color: var(--brand);
  margin: 0 0 12px 0;
  font-size: 1.1rem;
}

.variation-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Responsive adjustments for new elements */
@media (max-width: 768px) {
  .gender-comparison {
    grid-template-columns: 1fr;
  }
  
  .ethnic-variations {
    grid-template-columns: 1fr;
  }
  
  .bmi-table-container {
    margin: 24px -16px;
    padding: 0 16px;
  }
  
  .bmi-table.comprehensive th,
  .bmi-table.comprehensive td,
  .bmi-table.pediatric th,
  .bmi-table.pediatric td {
    padding: 12px 8px;
    font-size: 0.9rem;
  }
  
  .comparison-card {
    padding: 20px;
  }
  
  .variation-item {
    padding: 16px;
  }
}

/* Article Separator */
.article-separator {
  margin: 64px 0;
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

/* Workout Plan Styles */
.workout-plan {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 24px;
  margin: 32px 0;
}

.workout-plan h4 {
  color: var(--brand);
  margin: 0 0 16px 0;
  font-size: 1.2rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

.workout-plan h4:not(:first-child) {
  margin-top: 24px;
}

.workout-plan ul {
  margin: 0 0 16px 0;
  padding-left: 20px;
}

.workout-plan li {
  margin-bottom: 8px;
  line-height: 1.5;
  color: var(--muted);
}

/* Health Benefits Styles */
.health-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.benefit-item {
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.benefit-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(2, 32, 71, 0.12);
}

.benefit-item h4 {
  color: var(--brand);
  margin: 0 0 12px 0;
  font-size: 1.1rem;
}

.benefit-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Responsive adjustments for new elements */
@media (max-width: 768px) {
  .workout-plan {
    padding: 20px;
  }
  
  .health-benefits {
    grid-template-columns: 1fr;
  }
  
  .benefit-item {
    padding: 16px;
  }
}

/* Protein Foods Article Styles */
.protein-needs {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: var(--radius);
  padding: 20px;
  margin: 24px 0;
}

.protein-needs h3 {
  color: var(--brand);
  margin: 0 0 16px 0;
  font-size: 1.1rem;
}

.protein-needs ul {
  margin: 0;
  padding-left: 20px;
}

.protein-needs li {
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Food Items */
.food-item {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.food-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(2, 32, 71, 0.12);
}

.food-item h4 {
  color: var(--brand);
  margin: 0 0 12px 0;
  font-size: 1.1rem;
}

.food-item p {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
}

/* Timing Guide */
.timing-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.timing-item {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.timing-item:hover {
  transform: translateY(-2px);
}

.timing-item h4 {
  color: var(--brand);
  margin: 0 0 12px 0;
  font-size: 1rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

.timing-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Meal Ideas */
.meal-ideas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.meal-category {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.meal-category h3 {
  color: var(--brand);
  margin: 0 0 16px 0;
  font-size: 1.2rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

.meal-category ul {
  margin: 0;
  padding-left: 20px;
}

.meal-category li {
  margin-bottom: 12px;
  line-height: 1.5;
  color: var(--muted);
}

/* Weight Loss Benefits */
.weight-loss-benefits,
.muscle-building-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.benefit-card {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.benefit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(2, 32, 71, 0.12);
}

.benefit-card h4 {
  color: var(--brand);
  margin: 0 0 12px 0;
  font-size: 1.1rem;
}

.benefit-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Myths Section */
.myths-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.myth-item {
  background: linear-gradient(135deg, #fef7f0 0%, #fef3e2 100%);
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.myth-item h4 {
  color: #ea580c;
  margin: 0 0 12px 0;
  font-size: 1rem;
}

.myth-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Sample Day */
.sample-day {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 24px;
  margin: 32px 0;
}

.meal-time {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.meal-time:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.meal-time h4 {
  color: var(--brand);
  margin: 0 0 8px 0;
  font-size: 1.1rem;
}

.meal-time p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

/* Responsive adjustments for protein article */
@media (max-width: 768px) {
  .timing-guide {
    grid-template-columns: 1fr;
  }
  
  .meal-ideas {
    grid-template-columns: 1fr;
  }
  
  .weight-loss-benefits,
  .muscle-building-benefits {
    grid-template-columns: 1fr;
  }
  
  .myths-section {
    grid-template-columns: 1fr;
  }
  
  .food-item {
    padding: 14px;
  }
  
  .timing-item,
  .meal-category,
  .benefit-card,
  .myth-item {
    padding: 16px;
  }
  
  .sample-day {
    padding: 20px;
  }
}

/* Sleep Importance Article Styles */
.sleep-science {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.science-card {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.science-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(2, 32, 71, 0.12);
}

.science-card h4 {
  color: var(--brand);
  margin: 0 0 12px 0;
  font-size: 1.1rem;
}

.science-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Sleep Requirements */
.sleep-requirements {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: var(--radius);
  padding: 20px;
  margin: 24px 0;
}

.sleep-requirements h3 {
  color: var(--brand);
  margin: 0 0 16px 0;
  font-size: 1.1rem;
}

.sleep-requirements ul {
  margin: 0;
  padding-left: 20px;
}

.sleep-requirements li {
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Sleep Phases */
.sleep-phases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.phase-item {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.phase-item:hover {
  transform: translateY(-2px);
}

.phase-item h4 {
  color: var(--brand);
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

.phase-item p {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
}

/* Sleep Quality Factors */
.sleep-quality-factors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.quality-factor {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.quality-factor:hover {
  transform: translateY(-2px);
}

.quality-factor h4 {
  color: var(--brand);
  margin: 0 0 12px 0;
  font-size: 1.1rem;
}

.quality-factor p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Performance Impact */
.performance-impact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.impact-card {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.impact-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(2, 32, 71, 0.12);
}

.impact-card h4 {
  color: var(--brand);
  margin: 0 0 12px 0;
  font-size: 1.1rem;
}

.impact-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Nutrition Sleep Connection */
.nutrition-sleep-connection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.connection-item {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.connection-item:hover {
  transform: translateY(-2px);
}

.connection-item h4 {
  color: var(--brand);
  margin: 0 0 12px 0;
  font-size: 1.1rem;
}

.connection-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Sleep Hygiene */
.sleep-hygiene {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.hygiene-category {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.hygiene-category h4 {
  color: var(--brand);
  margin: 0 0 16px 0;
  font-size: 1.2rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

.hygiene-category ul {
  margin: 0;
  padding-left: 20px;
}

.hygiene-category li {
  margin-bottom: 12px;
  line-height: 1.5;
  color: var(--muted);
}

/* Exercise Timing */
.exercise-timing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.timing-option {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.timing-option:hover {
  transform: translateY(-2px);
}

.timing-option h4 {
  color: var(--brand);
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

.timing-option p {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
}

/* Sleep Metrics */
.sleep-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.metric-item {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.metric-item:hover {
  transform: translateY(-2px);
}

.metric-item h4 {
  color: var(--brand);
  margin: 0 0 12px 0;
  font-size: 1.1rem;
}

.metric-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Sleep Problems */
.sleep-problems {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.problem-item {
  background: linear-gradient(135deg, #fef7f0 0%, #fef3e2 100%);
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.problem-item h4 {
  color: #ea580c;
  margin: 0 0 12px 0;
  font-size: 1rem;
}

.problem-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Sleep Supplements */
.sleep-supplements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.supplement-item {
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.supplement-item:hover {
  transform: translateY(-2px);
}

.supplement-item h4 {
  color: var(--brand);
  margin: 0 0 12px 0;
  font-size: 1.1rem;
}

.supplement-item p {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
}

/* Recovery Synergy */
.recovery-synergy {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.synergy-item {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.synergy-item:hover {
  transform: translateY(-2px);
}

.synergy-item h4 {
  color: var(--brand);
  margin: 0 0 12px 0;
  font-size: 1.1rem;
}

.synergy-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Responsive adjustments for sleep article */
@media (max-width: 768px) {
  .sleep-science,
  .sleep-phases,
  .sleep-quality-factors,
  .performance-impact,
  .nutrition-sleep-connection,
  .exercise-timing,
  .sleep-metrics,
  .sleep-supplements {
    grid-template-columns: 1fr;
  }
  
  .sleep-hygiene,
  .recovery-synergy {
    grid-template-columns: 1fr;
  }
  
  .sleep-problems {
    grid-template-columns: 1fr;
  }
  
  .science-card,
  .phase-item,
  .quality-factor,
  .impact-card,
  .connection-item,
  .timing-option,
  .metric-item,
  .supplement-item,
  .synergy-item {
    padding: 16px;
  }
  
  .hygiene-category,
  .problem-item {
    padding: 16px;
  }
}


