/* CALORIE DEFICIT CALCULATOR - STYLESHEET - Green Health Theme */
:root {
  --primary: #22c55e;
  --primary-dark: #16a34a;
  --primary-light: #4ade80;
  --primary-bg: #f0fdf4;
  --secondary: #15803d;
  --accent: #f59e0b;
  --success: #22c55e;
  --success-bg: #dcfce7;
  --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-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --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 { font-weight: 600; line-height: 1.3; color: var(--gray-900); }
h1 { font-size: 2.25rem; margin-bottom: 1rem; text-align: center; }
h2 { font-size: 1.5rem; margin-top: 2rem; margin-bottom: 1rem; }
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 { 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); }
.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); }
@media (max-width: 768px) { .nav-desktop { display: none; } .nav-toggle { display: block; } }

.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; }

/* Quick Facts Box */
.quick-facts-box { background: var(--primary-bg); padding: 1.25rem 1.5rem; border-radius: var(--radius-lg); margin-bottom: 1.5rem; border-left: 4px solid var(--primary); max-width: 800px; margin-left: auto; margin-right: auto; }
.quick-facts-title { margin: 0 0 0.75rem 0; font-size: 1rem; color: var(--primary-dark); font-weight: 600; }
.quick-facts-list { margin: 0; padding-left: 1.25rem; }
.quick-facts-list li { margin-bottom: 0.375rem; font-size: 0.9375rem; color: var(--gray-700); }
.quick-facts-list li:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .quick-facts-box { max-width: 100%; margin-left: -1rem; margin-right: -1rem; border-radius: 0; border-left: none; border-top: 4px solid var(--primary); }
}

/* Calculator Card - Contained & Centered */
.calculator-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.5rem;
  overflow: hidden;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Tabs - Compact & Responsive */
.calc-tabs { display: flex; background: var(--gray-100); border-bottom: 1px solid var(--gray-200); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.calc-tab {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 0.375rem;
  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;
  white-space: nowrap;
}
.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); font-weight: 600; }
.calc-tab svg { width: 18px; height: 18px; }
.calc-tab-label { font-size: 0.6875rem; }
@media (min-width: 480px) {
  .calc-tab { padding: 0.875rem 0.5rem; font-size: 0.8125rem; }
  .calc-tab-label { font-size: 0.75rem; }
  .calc-tab svg { width: 20px; height: 20px; }
}

/* Panel - Tighter Padding */
.calc-panel { display: none; padding: 1.25rem; }
.calc-panel.active { display: block; }

/* Form Grid - Compact Spacing */
.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-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-label { font-size: 0.8125rem; font-weight: 500; color: var(--gray-700); }
.form-hint { font-size: 0.75rem; color: var(--gray-500); }

/* Form Inputs - Compact & Accessible */
.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;
}
.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); }

/* Select Inputs */
.form-select {
  height: 44px;
  padding: 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;
  background-size: 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  cursor: pointer;
  width: 100%;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 2.5rem;
}
.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); }

/* Date Inputs - Fully Clickable */
.form-input[type="date"] {
  cursor: pointer;
  position: relative;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.form-input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: auto;
  color: transparent;
  background: transparent;
}

/* Number Inputs - Remove Spinners on Some Browsers */
.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;
}

/* Radio Groups - Compact */
.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.75rem;
  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; }

/* Calculate Button - Compact */
.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;
  box-shadow: 0 4px 14px 0 rgba(34, 197, 94, 0.35);
  transition: all 0.15s ease;
}
.calculate-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px 0 rgba(34, 197, 94, 0.45); }
.calculate-btn:active { transform: translateY(0); }
.calculate-btn svg { width: 18px; height: 18px; }

/* Results Section - Compact */
.results-section { display: none; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--gray-200); }
.results-section.visible { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.result-primary {
  text-align: center;
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--primary-bg) 0%, #bbf7d0 100%);
  border-radius: var(--radius-lg);
  border: 2px solid var(--primary-light);
}
.result-label { font-size: 0.8125rem; font-weight: 500; color: var(--gray-500); text-transform: uppercase; margin-bottom: 0.375rem; letter-spacing: 0.025em; }
.result-value { font-size: 2.5rem; font-weight: 700; color: var(--primary-dark); line-height: 1.2; }
.result-unit { font-size: 1.125rem; font-weight: 500; color: var(--gray-500); }
.result-sublabel { font-size: 0.9375rem; color: var(--gray-600); margin-top: 0.375rem; }

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

/* Deficit Bar - Compact */
.deficit-bar { margin: 1rem 0; }
.deficit-bar-label { display: flex; justify-content: space-between; margin-bottom: 0.375rem; font-size: 0.75rem; color: var(--gray-500); }
.deficit-bar-track { height: 20px; background: var(--gray-200); border-radius: var(--radius-full); overflow: hidden; position: relative; }
.deficit-bar-fill { height: 100%; border-radius: var(--radius-full); transition: width 0.5s ease; }
.deficit-bar-fill.safe { background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%); }
.deficit-bar-fill.caution { background: linear-gradient(90deg, var(--warning) 0%, #fcd34d 100%); }
.deficit-bar-fill.danger { background: linear-gradient(90deg, var(--error) 0%, #f87171 100%); }
.deficit-bar-marker { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--gray-900); }

/* Warning Box - Compact */
.warning-box { padding: 0.875rem; border-radius: var(--radius-md); margin-top: 0.75rem; display: flex; align-items: flex-start; gap: 0.625rem; }
.warning-box.warning { background: var(--warning-bg); border: 1px solid var(--warning); }
.warning-box.danger { background: var(--error-bg); border: 1px solid var(--error); }
.warning-box.success { background: var(--success-bg); border: 1px solid var(--success); }
.warning-box-icon { font-size: 1.125rem; line-height: 1; }
.warning-box-text { font-size: 0.8125rem; font-weight: 500; line-height: 1.5; }

/* Enhanced Results - Input Summary Table */
.input-summary { margin: 1rem 0; background: var(--gray-50); border-radius: var(--radius-md); overflow: hidden; }
.input-summary-title { font-size: 0.75rem; font-weight: 600; color: var(--gray-600); padding: 0.625rem 0.875rem; background: var(--gray-100); border-bottom: 1px solid var(--gray-200); text-transform: uppercase; letter-spacing: 0.025em; }
.input-summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.input-summary-item { padding: 0.625rem 0.875rem; font-size: 0.8125rem; display: flex; justify-content: space-between; border-bottom: 1px solid var(--gray-200); }
.input-summary-item:nth-last-child(-n+2) { border-bottom: none; }
.input-summary-label { color: var(--gray-500); }
.input-summary-value { font-weight: 600; color: var(--gray-800); }
@media (max-width: 480px) { .input-summary-grid { grid-template-columns: 1fr; } .input-summary-item:last-child { border-bottom: none; } }

/* Enhanced Results - Visual Comparison Chart */
.calorie-comparison { margin: 1.25rem 0; }
.calorie-comparison-title { font-size: 0.75rem; font-weight: 600; color: var(--gray-600); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.025em; }
.calorie-bar-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.625rem; }
.calorie-bar-label { width: 80px; font-size: 0.75rem; color: var(--gray-600); flex-shrink: 0; }
.calorie-bar-track { flex: 1; height: 24px; background: var(--gray-100); border-radius: var(--radius-full); overflow: hidden; position: relative; }
.calorie-bar-fill { height: 100%; border-radius: var(--radius-full); display: flex; align-items: center; padding: 0 0.75rem; font-size: 0.75rem; font-weight: 600; color: white; transition: width 0.5s ease; }
.calorie-bar-fill.tdee { background: var(--gray-400); }
.calorie-bar-fill.target { background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%); }
.calorie-bar-fill.deficit { background: linear-gradient(90deg, var(--warning) 0%, #fcd34d 100%); }

/* Enhanced Results - Key Results Summary */
.key-results-box { background: linear-gradient(135deg, var(--primary-bg) 0%, #dcfce7 100%); border: 2px solid var(--primary-light); border-radius: var(--radius-lg); padding: 1.25rem; margin: 1rem 0; }
.key-results-title { font-size: 0.875rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.key-results-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.key-result-item { background: white; border-radius: var(--radius-md); padding: 0.875rem; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.key-result-label { font-size: 0.6875rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.025em; margin-bottom: 0.25rem; }
.key-result-value { font-size: 1.375rem; font-weight: 700; color: var(--primary-dark); }
.key-result-subtext { font-size: 0.6875rem; color: var(--gray-500); margin-top: 0.125rem; }

/* Enhanced Results - Actionable Tips */
.actionable-tips { margin: 1.25rem 0; }
.actionable-tips-title { font-size: 0.875rem; font-weight: 600; color: var(--gray-800); margin-bottom: 0.875rem; display: flex; align-items: center; gap: 0.5rem; }
.tips-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (max-width: 500px) { .tips-grid { grid-template-columns: 1fr; } }
.tip-card { background: var(--gray-50); border-radius: var(--radius-md); padding: 0.875rem; border-left: 3px solid var(--primary); }
.tip-card-title { font-size: 0.8125rem; font-weight: 600; color: var(--gray-800); margin-bottom: 0.25rem; }
.tip-card-text { font-size: 0.75rem; color: var(--gray-600); line-height: 1.5; margin: 0; }

/* Enhanced Results - What This Means */
.what-this-means { margin: 1.25rem 0; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: var(--radius-md); padding: 1rem; }
.what-this-means-title { font-size: 0.875rem; font-weight: 600; color: #0369a1; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.what-this-means-text { font-size: 0.8125rem; color: #0c4a6e; line-height: 1.6; margin: 0; }

/* Enhanced Results - Context Comparison */
.context-comparison { margin: 1.25rem 0; }
.context-comparison-title { font-size: 0.75rem; font-weight: 600; color: var(--gray-600); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.025em; }
.context-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; background: white; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--gray-200); }
.context-table th, .context-table td { padding: 0.625rem 0.75rem; text-align: left; border-bottom: 1px solid var(--gray-200); }
.context-table th { font-weight: 600; color: var(--gray-600); background: var(--gray-50); font-size: 0.75rem; }
.context-table tr:last-child td { border-bottom: none; }
.context-table .highlight { background: var(--primary-bg); font-weight: 600; }

/* Print/Save Button */
.print-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.625rem 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 { color: var(--gray-800); border-color: var(--gray-400); background: var(--gray-50); }
.print-btn svg { width: 16px; height: 16px; }

/* Print Styles */
@media print {
  .header, .footer, .nav-mobile, .calc-tabs, .calculate-btn, .print-btn, .content-section:not(.print-include) { display: none !important; }
  .calculator-card { box-shadow: none; border: 1px solid var(--gray-200); max-width: 100%; }
  .calc-panel { display: block !important; }
  .results-section { display: block !important; }
  body { background: white; }
}

/* Timeline Items - Compact */
.timeline-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0; border-bottom: 1px solid var(--gray-200); }
.timeline-item:last-child { border-bottom: none; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.timeline-content { flex: 1; }
.timeline-date { font-weight: 600; font-size: 0.875rem; color: var(--gray-800); }
.timeline-weight { font-size: 0.8125rem; color: var(--gray-500); }

.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; }
.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); }

.table-responsive { overflow-x: auto; margin: 1.5rem 0; }
.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); }
.data-table td { color: var(--gray-600); }

.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item { border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
.faq-question { width: 100%; padding: 1rem; display: flex; align-items: center; justify-content: space-between; 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; }
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer { display: none; padding: 1rem; background: white; }
.faq-item.open .faq-answer { display: block; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.blog-card { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; }
.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; }

.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; }

/* Mobile Calculator Overrides */
@media (max-width: 640px) {
  .calculator-card {
    max-width: 100%;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  .content-section {
    max-width: 100%;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
  }
  .calc-panel { padding: 1rem; }
  .calc-tab { padding: 0.625rem 0.25rem; }
  .calc-tab svg { width: 16px; height: 16px; }
  .calc-tab-label { font-size: 0.625rem; }
  .form-input, .form-select { height: 44px; font-size: 16px; } /* 16px prevents iOS zoom */
  .radio-option { padding: 0.5rem 0.625rem; font-size: 0.8125rem; }
  .calculate-btn { height: 48px; font-size: 0.9375rem; }
  .result-value { font-size: 2rem; }
  .result-item { padding: 0.625rem; }
  .result-item-value { font-size: 1rem; }
  .key-results-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .key-result-item { padding: 0.625rem; }
  .key-result-value { font-size: 1.125rem; }
  .input-summary-grid { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
}

/* Ensure container allows full-width calculator on mobile */
@media (max-width: 640px) {
  .container { padding: 0 1rem; overflow-x: hidden; }
}

/* ========================================
   CONTENT ENHANCEMENT COMPONENTS
   ======================================== */

/* --- Horizontal Bar Charts --- */
.chart-bar-group { margin: 1.5rem 0; }
.chart-bar-title { font-size: 0.9375rem; font-weight: 600; color: var(--gray-700); margin-bottom: 1rem; }
.chart-bar-item { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.625rem; }
.chart-bar-name { width: 120px; font-size: 0.8125rem; color: var(--gray-600); flex-shrink: 0; text-align: right; }
.chart-bar-track { flex: 1; height: 28px; background: var(--gray-100); border-radius: 9999px; overflow: hidden; position: relative; }
.chart-bar-fill { height: 100%; border-radius: 9999px; display: flex; align-items: center; justify-content: flex-end; padding: 0 0.75rem; font-size: 0.75rem; font-weight: 600; color: #fff; min-width: 40px; }
.chart-bar-fill.green { background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%); }
.chart-bar-fill.yellow { background: linear-gradient(90deg, #eab308 0%, #facc15 100%); }
.chart-bar-fill.orange { background: linear-gradient(90deg, #f97316 0%, #fb923c 100%); }
.chart-bar-fill.red { background: linear-gradient(90deg, var(--error) 0%, #f87171 100%); }
.chart-bar-fill.gray { background: var(--gray-400); }
.chart-bar-fill.blue { background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%); }

/* --- Stat Highlight Cards --- */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.stat-card { background: #fff; border-radius: 0.75rem; padding: 1.25rem; text-align: center; border: 1px solid var(--gray-200); box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.stat-card.green { border-top: 4px solid var(--primary); }
.stat-card.yellow { border-top: 4px solid var(--warning); }
.stat-card.red { border-top: 4px solid var(--error); }
.stat-card.blue { border-top: 4px solid #3b82f6; }
.stat-card-value { font-size: 1.75rem; font-weight: 700; color: var(--gray-900); line-height: 1.2; }
.stat-card-label { font-size: 0.75rem; color: var(--gray-500); margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.025em; }
.stat-card-desc { font-size: 0.8125rem; color: var(--gray-600); margin-top: 0.5rem; }

/* --- Risk / Safety Scale --- */
.risk-scale { margin: 1.5rem 0; }
.risk-scale-bar { display: flex; height: 12px; border-radius: 9999px; overflow: hidden; margin-bottom: 0.5rem; }
.risk-scale-segment { flex: 1; }
.risk-scale-segment.safe { background: var(--primary); }
.risk-scale-segment.moderate { background: #eab308; }
.risk-scale-segment.caution { background: #f97316; }
.risk-scale-segment.danger { background: var(--error); }
.risk-scale-labels { display: flex; justify-content: space-between; font-size: 0.6875rem; color: var(--gray-500); }

/* --- Comparison Grid --- */
.comparison-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.comparison-item { background: #fff; border: 1px solid var(--gray-200); border-radius: 0.75rem; padding: 1.25rem; }
.comparison-item.recommended { border: 2px solid var(--primary); background: var(--primary-bg); }
.comparison-item-header { font-size: 1rem; font-weight: 600; color: var(--gray-900); margin-bottom: 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--gray-200); }
.comparison-item.recommended .comparison-item-header { border-bottom-color: var(--primary-light); }
.comparison-item-badge { display: inline-block; font-size: 0.6875rem; font-weight: 600; padding: 0.125rem 0.5rem; border-radius: 9999px; background: var(--primary); color: #fff; margin-left: 0.5rem; vertical-align: middle; }
.comparison-item ul { list-style: none; padding: 0; margin: 0; }
.comparison-item li { font-size: 0.8125rem; color: var(--gray-600); padding: 0.375rem 0; border-bottom: 1px solid var(--gray-100); }
.comparison-item li:last-child { border-bottom: none; }
.comparison-item li strong { color: var(--gray-700); }

/* --- Info Box (Callout) --- */
.info-box { padding: 1.25rem; border-radius: 0.75rem; margin: 1.5rem 0; border-left: 4px solid; }
.info-box.info { background: #eff6ff; border-color: #3b82f6; }
.info-box.tip { background: var(--primary-bg); border-color: var(--primary); }
.info-box.warning { background: #fffbeb; border-color: var(--warning); }
.info-box.danger { background: #fef2f2; border-color: var(--error); }
.info-box-title { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.5rem; }
.info-box.info .info-box-title { color: #1d4ed8; }
.info-box.tip .info-box-title { color: var(--primary-dark); }
.info-box.warning .info-box-title { color: #b45309; }
.info-box.danger .info-box-title { color: #b91c1c; }
.info-box p { font-size: 0.875rem; margin: 0 0 0.5rem; }
.info-box p:last-child { margin-bottom: 0; }
.info-box ul { margin: 0.5rem 0 0; padding-left: 1.25rem; font-size: 0.875rem; }
.info-box li { margin-bottom: 0.25rem; }

/* --- Meter / Progress Bar --- */
.meter { margin: 1rem 0; }
.meter-label { display: flex; justify-content: space-between; margin-bottom: 0.375rem; font-size: 0.8125rem; }
.meter-label-name { font-weight: 600; color: var(--gray-700); }
.meter-label-value { color: var(--gray-500); }
.meter-track { height: 24px; background: var(--gray-100); border-radius: 9999px; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 9999px; }
.meter-fill.green { background: var(--primary); }
.meter-fill.yellow { background: #eab308; }
.meter-fill.orange { background: #f97316; }
.meter-fill.red { background: var(--error); }

/* --- Key Takeaway Box --- */
.key-takeaway { background: var(--primary-bg); border: 2px solid var(--primary-light); border-radius: 0.75rem; padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.key-takeaway-title { font-size: 1rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 0.75rem; }
.key-takeaway ul { margin: 0; padding-left: 1.25rem; }
.key-takeaway li { margin-bottom: 0.5rem; font-size: 0.9375rem; color: var(--gray-700); }
.key-takeaway li:last-child { margin-bottom: 0; }

/* --- Popular Links Grid (404) --- */
.popular-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; margin: 1.5rem 0; }
.popular-link { display: block; padding: 0.875rem 1rem; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 0.5rem; color: var(--gray-700); text-decoration: none; font-size: 0.875rem; transition: border-color 0.2s, background 0.2s; }
.popular-link:hover { border-color: var(--primary); background: var(--primary-bg); color: var(--primary-dark); }

/* --- Mobile Responsive for Enhancement Components --- */
@media (max-width: 640px) {
  .chart-bar-name { width: 80px; font-size: 0.75rem; }
  .chart-bar-fill { font-size: 0.6875rem; padding: 0 0.5rem; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .stat-card { padding: 1rem; }
  .stat-card-value { font-size: 1.5rem; }
  .comparison-grid { grid-template-columns: 1fr; }
  .risk-scale-labels { font-size: 0.625rem; }
  .popular-links { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .stat-cards { grid-template-columns: 1fr; }
  .chart-bar-name { width: 65px; }
}
