/* LEAN BODY MASS CALCULATOR - STYLESHEET - Premium Professional Theme */
:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --primary-light: #38bdf8;
  --primary-bg: #f0f9ff;
  --secondary: #0369a1;
  --accent: #f59e0b;
  --success: #22c55e;
  --success-bg: #dcfce7;
  --success-light: #86efac;
  --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;
  --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);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
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 { 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; }
h3 { font-size: 1.125rem; margin-top: 1.5rem; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary); text-decoration: underline; }
.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; }
.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); z-index: 99; }
.nav-mobile.active { display: block; }
.nav-mobile a { display: block; padding: 0.75rem 1rem; color: var(--gray-700); font-weight: 500; border-radius: var(--radius-md); }
.nav-mobile a:hover { background: var(--gray-50); 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; text-align: center; }

/* ============================================
   CALCULATOR CARD - 800px centered
   ============================================ */
.calculator-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
  overflow: hidden;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--gray-200);
}
@media (max-width: 840px) {
  .calculator-card { max-width: 100%; margin-left: 0; margin-right: 0; border-radius: var(--radius-lg); }
}

/* Tabs */
.calc-tabs { display: flex; background: var(--gray-100); border-bottom: 1px solid var(--gray-200); overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.calc-tabs::-webkit-scrollbar { display: none; }
.calc-tab { flex: 1; min-width: 0; padding: 0.875rem 0.5rem; font-size: 0.75rem; font-weight: 500; color: var(--gray-600); background: transparent; border: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; border-bottom: 3px solid transparent; transition: all 0.15s ease; }
.calc-tab:hover { color: var(--gray-800); background: var(--gray-50); }
.calc-tab.active { color: var(--primary-dark); background: white; border-bottom-color: var(--primary); }
.calc-tab svg { width: 20px; height: 20px; flex-shrink: 0; }
.calc-tab-label { font-size: 0.6875rem; line-height: 1.2; white-space: nowrap; }
@media (min-width: 540px) {
  .calc-tab { padding: 1rem 0.75rem; }
  .calc-tab-label { font-size: 0.75rem; }
}

/* Panel */
.calc-panel { display: none; padding: 1.5rem; }
.calc-panel.active { display: block; }
@media (max-width: 540px) { .calc-panel { padding: 1.25rem; } }

/* Form Grid */
.form-grid { display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.form-row-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 500px) { .form-row, .form-row-3 { grid-template-columns: 1fr; } }

/* Form Groups */
.form-group { display: flex; flex-direction: column; gap: 0.25rem; }
.form-label { font-size: 0.8125rem; font-weight: 500; color: var(--gray-700); }
.form-hint { font-size: 0.6875rem; color: var(--gray-500); margin-top: 0.125rem; }

/* Form Inputs */
.form-input {
  width: 100%;
  height: 44px;
  padding: 0 0.875rem;
  font-size: 0.9375rem;
  color: var(--gray-800);
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.form-input:hover:not(:focus) { border-color: var(--gray-400); }
.form-input[type="date"] { cursor: pointer; }
.form-input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.6; }
.form-input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.form-input[type="number"]::-webkit-outer-spin-button,
.form-input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.form-input[type="number"] { -moz-appearance: textfield; }

/* Select */
.form-select {
  height: 44px;
  padding: 0 2.25rem 0 0.875rem;
  font-size: 0.9375rem;
  color: var(--gray-800);
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 0.875rem center;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  cursor: pointer;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.form-select:hover:not(:focus) { border-color: var(--gray-400); }

/* Radio Group */
.radio-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.radio-option { display: flex; align-items: center; gap: 0.375rem; cursor: pointer; padding: 0.5rem 0.875rem; border: 1px solid var(--gray-300); border-radius: var(--radius-md); font-size: 0.8125rem; transition: all 0.15s ease; }
.radio-option:hover { border-color: var(--primary-light); background: var(--primary-bg); }
.radio-option:has(input:checked) { border-color: var(--primary); background: var(--primary-bg); }
.radio-option input { width: 14px; height: 14px; accent-color: var(--primary); cursor: pointer; margin: 0; }

/* Calculate Button */
.calculate-btn {
  width: 100%;
  height: 48px;
  margin-top: 1.25rem;
  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;
  box-shadow: 0 4px 14px 0 rgba(14, 165, 233, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.calculate-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px 0 rgba(14, 165, 233, 0.45); }
.calculate-btn:active { transform: translateY(0); }
.calculate-btn svg { width: 18px; height: 18px; }

/* Height Input Group */
.height-inputs { display: flex; gap: 0.5rem; }
.height-inputs .form-input { width: 70px; flex-shrink: 0; text-align: center; padding: 0 0.5rem; }

/* ============================================
   RESULTS SECTION - Enhanced Premium Design
   ============================================ */
.results-section {
  display: none;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}
.results-section.visible { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Primary Result Display */
.result-primary {
  text-align: center;
  padding: 1.5rem 1.25rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-bg) 0%, #e0f2fe 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--primary-light);
}
.result-label { font-size: 0.75rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.result-value { font-size: 3rem; font-weight: 700; color: var(--primary-dark); line-height: 1.1; }
.result-unit { font-size: 1.25rem; font-weight: 500; color: var(--gray-500); }
.result-sublabel { font-size: 0.875rem; color: var(--gray-600); margin-top: 0.5rem; }

/* Results Grid */
.results-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.625rem; margin-top: 1rem; }
.results-grid-3 { grid-template-columns: repeat(3, 1fr); }
.results-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 500px) { .results-grid-4 { grid-template-columns: repeat(2, 1fr); } }
.result-item { padding: 0.875rem 0.5rem; background: var(--gray-50); border-radius: var(--radius-md); text-align: center; border: 1px solid var(--gray-100); }
.result-item-label { font-size: 0.6875rem; color: var(--gray-500); margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.03em; }
.result-item-value { font-size: 1.125rem; font-weight: 600; color: var(--gray-800); }

/* Body Composition Bar */
.comp-bar { margin: 1.25rem 0; }
.comp-bar-track { height: 40px; border-radius: var(--radius-md); display: flex; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); }
.comp-bar-segment { display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; color: white; min-width: 50px; }
.comp-bar-lean { background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%); }
.comp-bar-fat { background: linear-gradient(90deg, var(--accent) 0%, #fcd34d 100%); }
.comp-bar-labels { display: flex; justify-content: space-between; margin-top: 0.5rem; font-size: 0.75rem; color: var(--gray-500); }

/* Enhanced Results Components */
.results-report { margin-top: 1.5rem; }

.results-section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-200);
}
.results-section-title:first-child { margin-top: 0; }

/* Summary Table */
.summary-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin: 0.75rem 0; }
.summary-table th, .summary-table td { padding: 0.625rem 0.75rem; text-align: left; border-bottom: 1px solid var(--gray-100); }
.summary-table th { font-weight: 500; color: var(--gray-500); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; background: var(--gray-50); }
.summary-table td { color: var(--gray-700); }
.summary-table td:last-child { text-align: right; font-weight: 500; color: var(--gray-800); }
.summary-table tr:last-child td { border-bottom: none; }
.summary-table .highlight-row { background: var(--primary-bg); }
.summary-table .highlight-row td { font-weight: 600; color: var(--primary-dark); }

/* Input Summary (small) */
.input-summary { background: var(--gray-50); border-radius: var(--radius-md); padding: 0.75rem 1rem; margin: 0.75rem 0; font-size: 0.8125rem; }
.input-summary-title { font-weight: 600; color: var(--gray-600); margin-bottom: 0.375rem; }
.input-summary-items { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; color: var(--gray-600); }
.input-summary-item span { font-weight: 500; color: var(--gray-800); }

/* Context/Category Badge */
.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  margin: 0.5rem 0;
}
.category-badge.good { background: var(--success-bg); color: #166534; }
.category-badge.moderate { background: var(--warning-bg); color: #92400e; }
.category-badge.attention { background: var(--error-bg); color: #991b1b; }

/* Progress Bar (for potential) */
.progress-bar-container { margin: 1rem 0; }
.progress-bar-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--gray-500); margin-bottom: 0.375rem; }
.progress-bar { height: 24px; background: var(--gray-200); border-radius: var(--radius-full); overflow: hidden; position: relative; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary) 0%, var(--success) 100%); border-radius: var(--radius-full); transition: width 0.5s ease; display: flex; align-items: center; justify-content: flex-end; padding-right: 0.5rem; }
.progress-bar-text { font-size: 0.75rem; font-weight: 600; color: white; }
.progress-bar-marker { position: absolute; top: -6px; width: 2px; height: calc(100% + 12px); background: var(--gray-600); }
.progress-bar-marker::after { content: attr(data-label); position: absolute; top: 100%; left: 50%; transform: translateX(-50%); font-size: 0.625rem; color: var(--gray-500); white-space: nowrap; margin-top: 2px; }

/* Tips Grid */
.tips-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin: 0.75rem 0; }
@media (max-width: 500px) { .tips-grid { grid-template-columns: 1fr; } }
.tip-card { display: flex; gap: 0.75rem; padding: 0.875rem; background: var(--gray-50); border-radius: var(--radius-md); border: 1px solid var(--gray-100); }
.tip-icon { width: 32px; height: 32px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--primary-bg); border-radius: var(--radius-md); color: var(--primary-dark); }
.tip-icon svg { width: 18px; height: 18px; }
.tip-content h4 { font-size: 0.8125rem; font-weight: 600; color: var(--gray-800); margin: 0 0 0.25rem; }
.tip-content p { font-size: 0.75rem; color: var(--gray-600); margin: 0; line-height: 1.4; }

/* What This Means Box */
.interpretation-box {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 0.75rem 0;
}
.interpretation-box h4 { font-size: 0.875rem; font-weight: 600; color: var(--gray-800); margin: 0 0 0.5rem; }
.interpretation-box p { font-size: 0.875rem; color: var(--gray-600); margin: 0 0 0.5rem; line-height: 1.5; }
.interpretation-box p:last-child { margin-bottom: 0; }
.interpretation-box ul { margin: 0.5rem 0; padding-left: 1.25rem; }
.interpretation-box li { font-size: 0.8125rem; color: var(--gray-600); margin-bottom: 0.25rem; }

/* Print Button */
.print-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-300);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 1rem;
}
.print-btn:hover { background: var(--gray-50); border-color: var(--gray-400); color: var(--gray-800); }
.print-btn svg { width: 16px; height: 16px; }

/* ============================================
   CONTENT SECTIONS - 800px max width
   ============================================ */
.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;
  border: 1px solid var(--gray-100);
}
@media (max-width: 840px) { .content-section { max-width: 100%; } }
.content-section h2 { margin-top: 0; }
.content-section h2::after { content: ''; display: block; width: 60px; height: 3px; background: var(--primary); margin-top: 0.5rem; border-radius: var(--radius-full); }

/* Tables */
.table-responsive { overflow-x: auto; margin: 1rem 0; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.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); white-space: nowrap; }
.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: 0.75rem; max-width: 800px; margin-left: auto; margin-right: auto; }
.faq-item { border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
.faq-question { width: 100%; padding: 1rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: 0.9375rem; font-weight: 500; text-align: left; color: var(--gray-800); background: var(--gray-50); border: none; cursor: pointer; }
.faq-question:hover { background: var(--gray-100); }
.faq-question svg { width: 18px; height: 18px; 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.25rem; background: white; }
.faq-item.open .faq-answer { display: block; }

/* Blog Grid */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2rem; max-width: 800px; margin-left: auto; margin-right: auto; }
.blog-card { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; border: 1px solid var(--gray-100); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card-content { padding: 1.25rem; }
.blog-card-meta { font-size: 0.75rem; color: var(--gray-500); margin-bottom: 0.5rem; }
.blog-card h3 { margin: 0 0 0.5rem; font-size: 1.0625rem; }
.blog-card h3 a { color: var(--gray-900); }
.blog-card p { font-size: 0.875rem; color: var(--gray-600); margin-bottom: 0; }

/* Guides Grid */
.guides-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.guide-card { display: block; padding: 1.25rem; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); text-decoration: none; transition: all 0.2s ease; }
.guide-card:hover { background: var(--primary-bg); border-color: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.guide-card h3 { font-size: 1rem; color: var(--gray-900); margin: 0 0 0.5rem; }
.guide-card p { font-size: 0.8125rem; color: var(--gray-600); margin: 0 0 0.75rem; line-height: 1.5; }
.guide-card .guide-link { font-size: 0.8125rem; font-weight: 600; color: var(--primary-dark); }
.guide-card:hover .guide-link { color: var(--primary); }

/* Key Takeaways Box */
.key-takeaways {
  background: linear-gradient(135deg, var(--primary-bg) 0%, #e0f2fe 100%);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.key-takeaways h3 { margin: 0 0 0.625rem; font-size: 0.875rem; color: var(--primary-dark); text-transform: uppercase; letter-spacing: 0.05em; }
.key-takeaways ul { margin: 0; padding-left: 1.25rem; }
.key-takeaways li { margin-bottom: 0.375rem; color: var(--gray-700); font-size: 0.875rem; line-height: 1.5; }
.key-takeaways li:last-child { margin-bottom: 0; }

/* Pro Tip Box */
.pro-tip { background: var(--warning-bg); border-left: 4px solid var(--warning); padding: 1rem 1.25rem; margin: 1.25rem 0; border-radius: 0 var(--radius-md) var(--radius-md) 0; font-size: 0.875rem; color: var(--gray-700); }
.pro-tip strong { color: var(--gray-800); }

/* Formula Code Blocks */
.formula-block { background: var(--gray-100); padding: 0.875rem 1rem; border-radius: var(--radius-md); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace; font-size: 0.8125rem; margin: 0.75rem 0; overflow-x: auto; line-height: 1.6; border: 1px solid var(--gray-200); }
.formula-block strong { color: var(--gray-900); }

/* Last Updated */
.last-updated { text-align: center; font-size: 0.8125rem; color: var(--gray-500); margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--gray-200); }

/* ============================================
   FOOTER
   ============================================ */
.footer { background: var(--gray-900); color: var(--gray-400); padding: 2.5rem 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-light); }
.footer-brand p { font-size: 0.875rem; }
.footer-nav h4 { color: white; font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; 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); }
.footer-nav a:hover { color: white; text-decoration: none; }
.footer-bottom { padding-top: 1.5rem; border-top: 1px solid var(--gray-800); font-size: 0.8125rem; }

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  body { background: white; font-size: 12pt; }
  .header, .nav-toggle, .nav-mobile, .footer, .calculate-btn, .print-btn, .calc-tabs, .key-takeaways, .guides-grid, .faq-list { display: none !important; }
  .calculator-card, .content-section { max-width: 100%; box-shadow: none; border: 1px solid #ddd; page-break-inside: avoid; }
  .results-section { display: block !important; border: none; }
  .result-primary { background: #f0f9ff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .comp-bar-lean, .comp-bar-fat, .progress-bar-fill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; text-decoration: none; }
  .tips-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.visually-hidden { 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; }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ============================================
   CSS-ONLY CHARTS & VISUAL COMPONENTS
   ============================================ */

/* Horizontal Bar Chart */
.css-chart { margin: 1.25rem 0; }
.chart-bar-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.625rem; }
.chart-bar-label { font-size: 0.8125rem; font-weight: 500; color: var(--gray-700); min-width: 100px; text-align: right; flex-shrink: 0; }
.chart-bar-track { flex: 1; height: 28px; background: var(--gray-100); border-radius: var(--radius-md); overflow: hidden; }
.chart-bar-fill { height: 100%; border-radius: var(--radius-md); display: flex; align-items: center; padding-left: 0.625rem; font-size: 0.75rem; font-weight: 600; color: white; transition: width 0.4s ease; min-width: 36px; }
.chart-bar-fill.primary { background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%); }
.chart-bar-fill.success { background: linear-gradient(90deg, var(--success) 0%, #4ade80 100%); }
.chart-bar-fill.warning { background: linear-gradient(90deg, var(--warning) 0%, #fbbf24 100%); }
.chart-bar-fill.accent { background: linear-gradient(90deg, #8b5cf6 0%, #a78bfa 100%); }
.chart-bar-fill.error { background: linear-gradient(90deg, var(--error) 0%, #f87171 100%); }
.chart-bar-value { font-size: 0.75rem; font-weight: 600; color: var(--gray-600); min-width: 40px; flex-shrink: 0; }
@media (max-width: 540px) { .chart-bar-label { min-width: 70px; font-size: 0.75rem; } }

/* Comparison Bars */
.comparison-visual { margin: 1.25rem 0; }
.comparison-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; padding: 0.625rem 0.75rem; background: var(--gray-50); border-radius: var(--radius-md); border: 1px solid var(--gray-100); }
.comparison-label { font-size: 0.8125rem; font-weight: 500; color: var(--gray-700); min-width: 90px; flex-shrink: 0; }
.comparison-bars { flex: 1; display: flex; gap: 0.25rem; height: 24px; }
.comparison-bar { height: 100%; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 0.6875rem; font-weight: 600; color: white; min-width: 30px; }
.comparison-bar.lean { background: var(--primary); }
.comparison-bar.fat { background: var(--accent); }
.comparison-bar.muscle { background: var(--success); }
.comparison-bar.bone { background: var(--gray-400); }
.comparison-bar.other { background: #8b5cf6; }
.comparison-value { font-size: 0.75rem; font-weight: 600; color: var(--gray-600); min-width: 50px; text-align: right; flex-shrink: 0; }

/* Color Scale Indicator */
.scale-indicator { margin: 1.25rem 0; }
.scale-track { display: flex; height: 32px; border-radius: var(--radius-md); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.08); }
.scale-segment { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 0.6875rem; font-weight: 600; color: white; min-width: 0; }
.scale-segment.essential { background: #ef4444; }
.scale-segment.athlete { background: #f59e0b; }
.scale-segment.fitness { background: #22c55e; }
.scale-segment.average { background: #0ea5e9; }
.scale-segment.above { background: #6b7280; }
.scale-labels { display: flex; margin-top: 0.375rem; }
.scale-labels span { flex: 1; text-align: center; font-size: 0.6875rem; color: var(--gray-500); }

/* Stat Cards */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.5rem 0; }
@media (max-width: 640px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }
.stat-card { text-align: center; padding: 1.25rem 0.75rem; background: white; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm); }
.stat-card-value { font-size: 1.75rem; font-weight: 700; color: var(--primary-dark); line-height: 1.2; margin-bottom: 0.25rem; }
.stat-card-label { font-size: 0.8125rem; color: var(--gray-600); }

/* Citation List */
.citation-list { margin: 1.25rem 0; padding: 1.25rem 1.5rem; background: var(--gray-50); border-radius: var(--radius-lg); border: 1px solid var(--gray-200); }
.citation-list h3 { font-size: 0.875rem; font-weight: 600; color: var(--gray-800); margin: 0 0 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; }
.citation-list ol { margin: 0; padding-left: 1.5rem; }
.citation-list li { font-size: 0.8125rem; color: var(--gray-600); margin-bottom: 0.5rem; line-height: 1.5; }
.citation-list li:last-child { margin-bottom: 0; }
.citation-list a { color: var(--primary-dark); }
.cite-ref { font-size: 0.6875rem; vertical-align: super; color: var(--primary-dark); font-weight: 600; text-decoration: none; }
.cite-ref:hover { text-decoration: underline; }

/* Ring Chart (CSS-only) */
.ring-chart { display: flex; align-items: center; gap: 1.5rem; margin: 1.25rem 0; flex-wrap: wrap; justify-content: center; }
.ring { width: 160px; height: 160px; border-radius: 50%; position: relative; flex-shrink: 0; }
.ring-inner { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 90px; height: 90px; border-radius: 50%; background: white; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.ring-inner-value { font-size: 1.25rem; font-weight: 700; color: var(--gray-800); line-height: 1.1; }
.ring-inner-label { font-size: 0.6875rem; color: var(--gray-500); }
.ring-legend { display: flex; flex-direction: column; gap: 0.5rem; }
.ring-legend-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--gray-700); }
.ring-legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

/* Related Guides Section (for blog articles) */
.related-guides { margin-top: 2rem; padding-top: 1.5rem; border-top: 2px solid var(--gray-200); }
.related-guides h2::after { content: ''; display: block; width: 60px; height: 3px; background: var(--primary); margin-top: 0.5rem; border-radius: var(--radius-full); }
.related-guides .guides-grid { max-width: 100%; }

/* Blog Category Section */
.blog-category { margin-bottom: 2rem; }
.blog-category-title { font-size: 1.125rem; font-weight: 600; color: var(--gray-800); margin-bottom: 0.5rem; padding-bottom: 0.375rem; border-bottom: 2px solid var(--primary); display: inline-block; }
