/* ============================================================
   FastBMI — Apple Human Interface & Emil Kowalski Master Design System
   Architecture:
   - Module 1: System Tokens, Themes & Reset
   - Module 2: Liquid Frosted Glass Navigation (§12)
   - Module 3: Apple Hero Headers, Badges & Breadcrumbs (§15)
   - Module 4: Layout & Responsive Structure
   - Module 5: 20px Squircle Cards & Ambient Elevation (§12)
   - Module 6: iOS Segmented Controls (§4, §10)
   - Module 7: Apple Inputs, Selects & Focus Rings (§1)
   - Module 8: Apple Health CTA Buttons & Action Pills (§1, §4)
   - Module 9: Health Metrics & Result Systems (All Calculators)
   - Module 10: Clean Apple Data Tables (§15)
   - Module 11: Editorial TOC, Highlights, Proof & Accordion FAQs
   - Module 12: Content Grids, Article Cards & Diet Cards
   - Module 13: Dynamic HUD Frosted Toast (§12, §16)
   - Module 14: Minimal Apple Light Directory Footer
   - Module 15: Liquid Frosted Consent Banner
   - Module 16: Accessibility & Preferences (prefers-reduced-motion, etc.)
   ============================================================ */

/* ------------------------------------------------------------
   Module 1: System Tokens, Themes & Reset
   ------------------------------------------------------------ */
:root {
  /* Apple Health & Human Interface Color Palette */
  --apple-bg: #f5f5f7;
  --apple-card: #ffffff;
  --apple-text: #1d1d1f;
  --apple-text-secondary: #6e6e73;
  --apple-text-tertiary: #86868b;
  --apple-border: rgba(0, 0, 0, 0.08);
  --apple-border-strong: rgba(0, 0, 0, 0.14);
  
  /* System Accents */
  --apple-green: #34c759;
  --apple-green-hover: #28a745;
  --apple-green-tint: rgba(52, 199, 89, 0.08);
  --apple-blue: #0071e3;
  --apple-blue-tint: rgba(0, 113, 227, 0.08);
  --apple-orange: #ff9500;
  --apple-red: #ff3b30;
  
  /* Compatibility Tokens (Mapped to Apple System) */
  --primary: #34c759;
  --primary-light: #30d158;
  --accent: #f0fdf4;
  --navy: #1d1d1f;
  --navy-light: #2c2c2e;
  --text: #1d1d1f;
  --text-muted: #86868b;
  --bg: #f5f5f7;
  --white: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --radius: 20px;
  
  /* Apple Multi-Tier Soft Ambient Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 16px 36px -4px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.02);
  
  /* Motion Tokens (Apple Fluid Motion / Emil Kowalski) */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.23, 1, 0.32, 1);
}

html {
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  font-size: 16px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  background: radial-gradient(ellipse 90% 50% at 50% -10%, rgba(52, 199, 89, 0.08) 0%, transparent 65%), #f5f5f7;
  color: var(--apple-text);
  line-height: 1.6;
  font-optical-sizing: auto;
  font-optical-sizing:auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ------------------------------------------------------------
   Module 2: Liquid Frosted Glass Navigation (§12)
   ------------------------------------------------------------ */
nav {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--apple-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 2px 8px rgba(0, 0, 0, 0.02);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 24px;
  text-align: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

nav::-webkit-scrollbar {
  display: none;
}

nav a {
  display: inline-flex;
  align-items: center;
  color: var(--apple-text-secondary);
  padding: 14px 14px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 980px;
  transition: color 0.16s var(--ease-smooth), background 0.16s var(--ease-smooth);
  touch-action: manipulation;
  touch-action:manipulation;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  nav a:hover {
    color: var(--apple-text);
    background: rgba(0, 0, 0, 0.04);
  }
}

nav a:active {
  transform: scale(0.97);
  transition-duration: 80ms;
}

nav a.active {
  color: var(--apple-text);
  background: rgba(0, 0, 0, 0.06);
  font-weight: 600;
}

/* ------------------------------------------------------------
   Module 3: Apple Hero Headers, Badges & Breadcrumbs (§15)
   ------------------------------------------------------------ */
header {
  background: transparent !important;
  color: var(--apple-text) !important;
  padding: 56px 20px 36px !important;
  text-align: center;
  position: relative;
}

header::before {
  display: none !important;
}

header h1 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", sans-serif !important;
  font-size: clamp(32px, 5vw, 50px);
  font-weight: 700;
  letter-spacing: -0.025em;
  letter-spacing:-0.025em;
  line-height: 1.05;
  color: var(--apple-text);
  margin-bottom: 12px;
  font-optical-sizing: auto;
  font-optical-sizing:auto;
}

header h1 span {
  color: var(--apple-green);
}

header p {
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--apple-text-tertiary);
  font-weight: 400;
  max-width: 620px;
  margin: 0 auto;
  letter-spacing: -0.01em;
  line-height: 1.5;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(52, 199, 89, 0.1);
  border: 1px solid rgba(52, 199, 89, 0.25);
  border-radius: 980px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #248a3d;
  margin-bottom: 16px;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--apple-green);
  box-shadow: 0 0 8px rgba(52, 199, 89, 0.6);
}

.fbmi-breadcrumbs {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--apple-text-tertiary);
}

.fbmi-breadcrumbs a {
  color: var(--apple-blue);
  text-decoration: none;
  font-weight: 500;
}

.trust-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--apple-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
  border-radius: 980px;
  padding: 8px 20px;
  margin: 0 auto 28px;
  font-size: 13px;
  color: var(--apple-text-secondary);
  max-width: 100%;
  flex-wrap: wrap;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trust-item strong {
  color: var(--apple-text);
  font-weight: 600;
}

.trust-separator {
  color: rgba(0, 0, 0, 0.2);
  font-size: 11px;
}

/* ------------------------------------------------------------
   Module 4: Layout & Responsive Structure
   ------------------------------------------------------------ */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.flex {
  display: flex;
  gap: 32px;
  margin-top: 24px;
  align-items: flex-start;
}

.left {
  flex: 1.1;
  min-width: 300px;
}

.right {
  flex: 0.9;
  min-width: 280px;
}

@media (max-width: 900px) {
  .flex { flex-direction: column; }
  .left, .right { width: 100%; min-width: unset; }
  #ad-side { display: none; }
}

/* ------------------------------------------------------------
   Module 5: 20px Squircle Cards & Ambient Elevation (§12)
   ------------------------------------------------------------ */
.card {
  background: var(--apple-card) !important;
  border-radius: var(--radius) !important;
  border: 1px solid var(--apple-border) !important;
  box-shadow: var(--shadow) !important;
  padding: 36px 32px !important;
  margin-bottom: 28px !important;
  transition: box-shadow 0.24s var(--ease-smooth);
}

.card-header {
  margin-bottom: 24px;
}

.card-header h2, .card h2 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--apple-text);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  font-optical-sizing: auto;
  font-optical-sizing:auto;
}

.card-header p {
  font-size: 14.5px;
  color: var(--apple-text-tertiary);
  margin: 0;
}

.card h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--apple-text);
  letter-spacing: -0.015em;
  margin: 28px 0 12px;
  font-optical-sizing: auto;
  font-optical-sizing:auto;
}

.card h4 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--apple-text);
  margin: 20px 0 8px;
  font-optical-sizing: auto;
  font-optical-sizing:auto;
}

.card p {
  font-size: 15.5px;
  color: #424245;
  line-height: 1.7;
  margin-bottom: 16px;
}

.card ul, .card ol {
  padding-left: 24px;
  margin-bottom: 20px;
  color: #424245;
  font-size: 15.5px;
  line-height: 1.7;
}

.card li {
  margin-bottom: 8px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 980px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.badge-blue { background: rgba(0, 113, 227, 0.12); color: #0071e3; }
.badge-green { background: rgba(52, 199, 89, 0.14); color: #248a3d; }
.badge-yellow, .badge-orange { background: rgba(255, 149, 0, 0.14); color: #c97500; }
.badge-red { background: rgba(255, 59, 48, 0.12); color: #d70015; }
.badge-darkred { background: rgba(175, 82, 222, 0.12); color: #8944ab; }

/* ------------------------------------------------------------
   Module 6: iOS Segmented Controls (§4, §10)
   ------------------------------------------------------------ */
.unit-toggle {
  display: inline-flex;
  width: 100%;
  background: #e5e5ea;
  padding: 3px;
  border-radius: 980px;
  margin-bottom: 22px;
  gap: 2px;
  box-sizing: border-box;
}

.unit-btn {
  flex: 1;
  padding: 9px 14px;
  border: none;
  background: transparent;
  color: var(--apple-text-secondary);
  font-weight: 500;
  font-size: 13.5px;
  border-radius: 980px;
  cursor: pointer;
  transition: background 0.16s var(--ease-smooth), color 0.16s var(--ease-smooth), transform 0.08s var(--ease-smooth);
  touch-action: manipulation;
  touch-action:manipulation;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
}

.unit-btn.active {
  background: #ffffff;
  color: var(--apple-text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
  .unit-btn:hover:not(.active) {
    color: var(--apple-text);
    background: rgba(255, 255, 255, 0.45);
  }
}

.unit-btn:active {
  transform: scale(0.97);
}

/* Method Tabs for Body Fat & Special Calculators */
.method-tabs {
  display: flex;
  background: #e5e5ea;
  padding: 3px;
  border-radius: 980px;
  margin-bottom: 20px;
  gap: 2px;
}

.method-tab {
  flex: 1;
  padding: 9px 14px;
  border: none;
  background: transparent;
  color: var(--apple-text-secondary);
  font-weight: 500;
  font-size: 13.5px;
  border-radius: 980px;
  cursor: pointer;
  transition: all 0.16s var(--ease-smooth);
  text-align: center;
}

.method-tab.active {
  background: #ffffff;
  color: var(--apple-text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  font-weight: 600;
}

/* ------------------------------------------------------------
   Module 7: Apple Inputs, Selects & Focus Rings (§1)
   ------------------------------------------------------------ */
label {
  display: block;
  font-weight: 600;
  color: var(--apple-text);
  margin: 16px 0 6px;
  font-size: 14px;
  letter-spacing: -0.01em;
}

label:first-child {
  margin-top: 0;
}

input[type=number], input[type=text], select, textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  font-size: 16px;
  background: #ffffff;
  color: var(--apple-text);
  transition: border-color 0.16s var(--ease-smooth), box-shadow 0.16s var(--ease-smooth);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.14);
}

/* ------------------------------------------------------------
   Module 8: Apple Health CTA Buttons & Action Pills (§1, §4)
   ------------------------------------------------------------ */
button, .cta-button, .submit-btn {
  width: 100%;
  background: var(--apple-green);
  color: #ffffff;
  border: none;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 22px;
  transition: transform 0.16s var(--ease-spring), background 0.16s ease, box-shadow 0.16s var(--ease-smooth);
  box-shadow: 0 2px 8px rgba(52, 199, 89, 0.25);
  touch-action: manipulation;
  touch-action:manipulation;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  button:hover, .cta-button:hover, .submit-btn:hover {
    background: var(--apple-green-hover);
    box-shadow: 0 4px 14px rgba(52, 199, 89, 0.35);
    transform: translateY(-1px);
    color: #ffffff;
  }
}

button:active, .cta-button:active, .submit-btn:active {
  transform: scale(0.97);
  transition-duration: 80ms;
}

.action-buttons {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.action-btn {
  flex: 1;
  padding: 11px 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #ffffff;
  color: var(--apple-text);
  font-weight: 500;
  font-size: 13px;
  border-radius: 980px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.16s var(--ease-smooth);
  touch-action: manipulation;
  touch-action:manipulation;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  margin-top: 0;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .action-btn:hover {
    background: var(--apple-green-tint);
    border-color: rgba(52, 199, 89, 0.4);
    color: var(--apple-green-hover);
  }
}

.action-btn:active {
  transform: scale(0.97);
  transition-duration: 80ms;
}

/* ------------------------------------------------------------
   Module 9: Health Metrics & Result Systems (All Calculators)
   ------------------------------------------------------------ */
.result-placeholder {
  background: rgba(0, 0, 0, 0.03);
  border: 1px dashed rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  padding: 44px 24px;
  text-align: center;
  color: var(--apple-text-tertiary);
  font-size: 14.5px;
  font-weight: 500;
}

.result-placeholder-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 14px;
  background: rgba(52, 199, 89, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--apple-green);
}

/* Universal Result Boxes for All 8 Calculators */
#tdee-results, #calorieResults, #iw-results, #bf-results, #bmr-results, #macro-results, #water-results, .result-grid {
  background: var(--apple-green-tint) !important;
  border: 1px solid rgba(52, 199, 89, 0.22) !important;
  border-radius: 18px !important;
  padding: 26px !important;
  box-shadow: 0 4px 18px rgba(52, 199, 89, 0.04);
}

#tdee-results h3, #calorieResults h3, #iw-results h3, #bf-results h3, #bmr-results h3, #macro-results h3, #water-results h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
  color: var(--apple-text);
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.result-row:last-child {
  border-bottom: none;
}

.result-label {
  font-weight: 500;
  color: var(--apple-text);
  font-size: 14.5px;
}

.result-value, #bmr-value, #water-value-liters, #water-value-oz, #tdee-total, #tdee-bmr, #tdee-activity-cal, #maintain-cal, #mild-loss-cal, #mod-loss-cal, #agg-loss-cal, #gain-cal, #f-devine, #f-hamwi, #f-miller, #f-robinson, #iw-avg {
  font-weight: 700;
  color: var(--apple-green);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

/* Detail Metric Tiles (BMI index.html details) */
#details {
  list-style: none;
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0;
}

#details li {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#details li .detail-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--apple-text-tertiary);
  font-weight: 600;
}

#details li .detail-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--apple-text);
  font-variant-numeric: tabular-nums;
}

/* Macro Calculator Bars & Summary */
.macro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.macro-box {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: transform 0.16s var(--ease-smooth);
}

.macro-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.macro-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--apple-text-tertiary);
  font-weight: 600;
  margin-bottom: 4px;
}

.macro-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--apple-text);
  font-variant-numeric: tabular-nums;
}

.macro-card {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.macro-card.big {
  border-color: rgba(52, 199, 89, 0.3);
  background: rgba(52, 199, 89, 0.04);
}

.macro-bar {
  margin: 14px 0;
}

.macro-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--apple-text);
  margin-bottom: 6px;
}

.macro-bar-bg {
  height: 10px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 980px;
  overflow: hidden;
}

.macro-bar-fill {
  height: 100%;
  border-radius: 980px;
  transition: width 0.4s var(--ease-spring);
}

.protein-bar { background: var(--apple-blue); }
.carbs-bar { background: var(--apple-orange); }
.fats-bar { background: var(--apple-green); }

/* Ideal Weight Formula Grid */
.formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.formula-box {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.formula-box .formula {
  font-size: 12px;
  color: var(--apple-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 6px;
}

.summary-box {
  background: rgba(52, 199, 89, 0.08);
  border: 1px solid rgba(52, 199, 89, 0.25);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 22px;
  text-align: center;
}

/* Goals (TDEE) */
.goal-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.goal-item {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.goal-item h4 {
  color: var(--apple-text);
  font-weight: 600;
  font-size: 15.5px;
  margin-bottom: 4px;
}

.goal-item p {
  color: var(--apple-text-secondary);
  font-size: 14px;
  margin: 0;
}

/* Info Box / Callouts */
.info-box, .highlight-box {
  background: rgba(255, 149, 0, 0.08);
  border-left: 3px solid var(--apple-orange);
  padding: 14px 18px;
  border-radius: 12px;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--apple-text);
}

/* History Badge */
.history-badge {
  font-size: 12px;
  color: var(--apple-text-tertiary);
  margin-top: 14px;
  text-align: center;
}

/* ------------------------------------------------------------
   Module 10: Clean Apple Data Tables (§15)
   ------------------------------------------------------------ */
.bmi-table, .data-table, .factors-table, .hydration-table, .food-table, .workout-table, table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--apple-border);
  margin: 24px 0;
  background: #ffffff;
}

.bmi-table th, .data-table th, .factors-table th, .hydration-table th, .food-table th, .workout-table th, th {
  background: #f5f5f7 !important;
  color: var(--apple-text) !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  padding: 14px 16px !important;
  border-bottom: 1px solid var(--apple-border) !important;
  text-align: left !important;
  letter-spacing: -0.01em !important;
}

.bmi-table td, .data-table td, .factors-table td, .hydration-table td, .food-table td, .workout-table td, td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--apple-text);
  font-size: 14.5px;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(0, 0, 0, 0.015);
}

/* ------------------------------------------------------------
   Module 11: Editorial TOC, Highlights, Proof & Accordion FAQs
   ------------------------------------------------------------ */
.toc, .fbmi-toc, .mini-toc {
  background: rgba(0, 0, 0, 0.02) !important;
  border: 1px solid var(--apple-border) !important;
  border-radius: 16px !important;
  padding: 22px 26px !important;
  margin: 28px 0 !important;
}

.toc h3, .fbmi-toc h2, .mini-toc h2 {
  font-size: 17px !important;
  font-weight: 600 !important;
  color: var(--apple-text) !important;
  margin: 0 0 14px !important;
}

.toc ol, .fbmi-toc ol {
  padding-left: 20px;
  margin: 0;
}

.toc li, .fbmi-toc li {
  margin: 8px 0;
  color: var(--apple-text-secondary);
  font-size: 14.5px;
}

.toc a, .fbmi-toc a, .mini-toc a {
  color: var(--apple-blue);
  text-decoration: none;
  font-weight: 500;
}

.toc a:hover, .fbmi-toc a:hover {
  text-decoration: underline;
}

.toc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.toc-links a {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 980px;
  font-size: 13.5px;
  color: var(--apple-blue);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.16s ease;
}

.toc-links a:hover {
  background: rgba(0, 113, 227, 0.1);
}

.author-box {
  display: flex;
  gap: 20px;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: 16px;
  padding: 24px;
  margin: 32px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.author-name {
  font-weight: 700;
  color: var(--apple-text);
  font-size: 16px;
  letter-spacing: -0.01em;
}

.author-desc {
  color: var(--apple-text-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin-top: 4px;
}

.fbmi-medical-disclaimer {
  margin: 24px 0;
  padding: 16px 20px;
  border: 1px solid rgba(255, 59, 48, 0.2);
  background: rgba(255, 59, 48, 0.06);
  border-radius: 14px;
  color: #d70015;
  font-size: 13.5px;
  line-height: 1.6;
}

.fbmi-editorial-meta {
  margin: 24px 0;
  padding: 16px 20px;
  border: 1px solid rgba(52, 199, 89, 0.2);
  background: var(--apple-green-tint);
  border-radius: 14px;
  color: var(--apple-text);
  font-size: 14px;
  line-height: 1.6;
}

.fbmi-editorial-meta strong {
  color: #248a3d;
}

.fbmi-key-points {
  margin: 28px 0;
  padding: 22px 26px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  background: var(--apple-blue-tint);
  border-radius: 16px;
}

.fbmi-key-points h2 {
  font-size: 20px;
  color: var(--apple-blue);
  margin-top: 0;
  margin-bottom: 12px;
}

.fbmi-key-points ul {
  margin: 0;
  padding-left: 20px;
  color: var(--apple-text);
}

.fbmi-action-box {
  margin: 36px 0;
  padding: 32px 24px;
  border: 1px solid rgba(52, 199, 89, 0.25);
  background: #ffffff;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(52, 199, 89, 0.08);
}

.fbmi-action-box h2 {
  font-size: 24px;
  color: var(--apple-text);
  margin-bottom: 12px;
  margin-top: 0;
}

.fbmi-action-box p {
  font-size: 16px;
  color: #424245;
  margin-bottom: 24px;
}

.fbmi-proof {
  margin: 24px 0;
  padding: 18px 22px;
  border: 1px solid var(--apple-border);
  background: rgba(0, 0, 0, 0.02);
  border-radius: 14px;
  font-size: 14px;
  color: #424245;
}

.fbmi-proof a {
  color: var(--apple-blue);
  font-weight: 500;
  text-decoration: none;
}

/* FAQ Accordions */
.faq-item {
  border-bottom: 1px solid var(--apple-border);
  padding: 18px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-q {
  font-weight: 600;
  color: var(--apple-text);
  font-size: 16px;
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.01em;
}

.faq-q::after {
  content: '+';
  font-size: 20px;
  font-weight: 400;
  color: var(--apple-text-tertiary);
  transition: transform 0.2s var(--ease-smooth);
  flex-shrink: 0;
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s var(--ease-smooth), opacity 0.25s var(--ease-smooth), margin-top 0.25s var(--ease-smooth);
  color: #424245;
  font-size: 15px;
  line-height: 1.6;
}

.faq-a.open {
  max-height: 400px;
  opacity: 1;
  margin-top: 10px;
}

.faq-schema {
  margin-top: 48px;
  border-top: 1px solid var(--apple-border);
  padding-top: 28px;
}

.faq-schema h2 {
  font-size: 22px;
  color: var(--apple-text);
  margin-top: 0;
  margin-bottom: 18px;
}

.faq-question {
  font-weight: 600;
  color: var(--apple-text);
  font-size: 18px;
  margin: 20px 0 8px;
}

.faq-answer {
  color: #424245;
  line-height: 1.7;
  font-size: 15.5px;
  margin-bottom: 20px;
}

/* ------------------------------------------------------------
   Module 12: Content Grids, Article Cards & Diet Cards
   ------------------------------------------------------------ */
.articles-grid, .featured-grid, .related-articles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.article-card, .featured-card, .related-article {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s var(--ease-smooth);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (hover: hover) and (pointer: fine) {
  .article-card:hover, .featured-card:hover, .related-article:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  }
}

.article-card h3, .featured-card h3, .related-article h4 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--apple-text);
  margin-bottom: 8px;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.article-card p, .featured-card p, .related-article p {
  font-size: 13.5px;
  color: var(--apple-text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
  flex-grow: 1;
}

/* Tool Links (Index other calculators) */
.tool-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-links a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--apple-card);
  border: 1px solid var(--apple-border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--apple-text);
  font-weight: 600;
  font-size: 14.5px;
  transition: all 0.2s var(--ease-smooth);
}

@media (hover: hover) and (pointer: fine) {
  .tool-links a:hover {
    background: #ffffff;
    border-color: rgba(52, 199, 89, 0.35);
    box-shadow: var(--shadow);
    transform: translateX(4px);
    color: var(--apple-text);
  }
}

.tool-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(52, 199, 89, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* Dietary & Scientific Cards */
.food-grid, .fiber-grid, .protein-grid, .exercise-grid, .stat-grid, .stats-grid, .technique-grid, .principle-grid, .values-grid, .tools-grid, .team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.food-card, .fiber-card, .protein-card, .exercise-card, .stat-card, .technique-card, .principle-card, .value-box, .tool-card, .team-member {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: box-shadow 0.2s var(--ease-smooth), transform 0.2s var(--ease-spring);
}

@media (hover: hover) and (pointer: fine) {
  .food-card:hover, .fiber-card:hover, .protein-card:hover, .exercise-card:hover, .tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  }
}

.stat-number, .cal-burn, .amount {
  font-size: 26px;
  font-weight: 700;
  color: var(--apple-green);
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}

.stat-label, .cal-label, .serving {
  font-size: 12px;
  color: var(--apple-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.timeline {
  position: relative;
  padding-left: 28px;
  margin: 28px 0;
  border-left: 2px solid rgba(52, 199, 89, 0.3);
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -35px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--apple-green);
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(52, 199, 89, 0.3);
}

.cycle-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
}

.cycle-step .number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(52, 199, 89, 0.12);
  color: var(--apple-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 15px;
}

/* ------------------------------------------------------------
   Module 13: Dynamic HUD Frosted Toast (§12, §16)
   ------------------------------------------------------------ */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: rgba(29, 29, 31, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  color: #f5f5f7;
  padding: 12px 22px;
  border-radius: 980px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 13.5px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  transition: opacity 0.2s var(--ease-smooth), transform 0.24s var(--ease-spring);
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ------------------------------------------------------------
   Module 14: Minimal Apple Light Directory Footer
   ------------------------------------------------------------ */
footer {
  background: #f5f5f7 !important;
  color: var(--apple-text-tertiary) !important;
  border-top: 1px solid var(--apple-border) !important;
  padding: 56px 20px 36px !important;
  font-size: 13px !important;
  margin-top: 60px !important;
  text-align: center !important;
}

footer h4, footer h4[style] {
  color: var(--apple-text) !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  margin-bottom: 12px !important;
}

footer p, footer p[style] {
  color: var(--apple-text-tertiary) !important;
  font-size: 12.5px !important;
  line-height: 1.6 !important;
}

footer a, footer a[style] {
  color: var(--apple-text-secondary) !important;
  font-size: 12.5px !important;
  text-decoration: none !important;
  transition: color 0.16s var(--ease-smooth) !important;
}

@media (hover: hover) and (pointer: fine) {
  footer a:hover, footer a[style]:hover {
    color: var(--apple-blue) !important;
  }
}

footer .footer-links {
  margin-top: 16px;
}

footer .footer-links a {
  margin: 0 10px;
}

/* ------------------------------------------------------------
   Module 15: Liquid Frosted Consent Banner
   ------------------------------------------------------------ */
#consentBanner, #consentBanner[style] {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: saturate(180%) blur(20px) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
  border-top: 1px solid var(--apple-border) !important;
  color: var(--apple-text) !important;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.08) !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif !important;
}

#consentBanner p, #consentBanner p[style] {
  color: var(--apple-text) !important;
}

#consentBanner a, #consentBanner a[style] {
  color: var(--apple-blue) !important;
  text-decoration: underline !important;
}

#consentBanner button {
  background: var(--apple-green) !important;
  color: #ffffff !important;
  border-radius: 980px !important;
  font-weight: 600 !important;
  padding: 8px 18px !important;
  font-size: 13px !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(52, 199, 89, 0.25) !important;
  cursor: pointer !important;
  transition: transform 160ms var(--ease-spring), background 160ms ease !important;
  width: auto !important;
  margin-top: 0 !important;
}

#consentBanner button:active {
  transform: scale(0.97) !important;
}

/* Ads Hidden Until AdSense Approval (Hides all placeholder boxes, blank gaps and labels) */
#ad-middle,
#ad-side,
.fbmi-ad-slot,
.fbmi-ad-label,
ins.adsbygoogle {
  display: none !important;
  min-height: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* ------------------------------------------------------------
   Module 16: Accessibility & Preferences (Audited Mandatories)
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .card:hover, .tool-links a:hover, .action-btn:hover, .related-article:hover, .article-card:hover, .featured-card:hover {
    transform: none !important;
  }
  button:active, .unit-btn:active, .action-btn:active {
    transform: none !important;
  }
  .toast {
    transition: opacity 0.15s ease !important;
    transform: none !important;
  }
  .toast.show {
    opacity: 1 !important;
    transform: none !important;
  }
  .faq-a {
    transition: opacity 0.2s ease !important;
  }
  .faq-q::after {
    transition: none !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  nav {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .trust-banner {
    background: #ffffff !important;
    backdrop-filter: none !important;
  }
  #consentBanner {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

@media (prefers-contrast: more) {
  .card {
    border: 2px solid var(--apple-text) !important;
  }
  input, select, textarea {
    border-color: var(--apple-text) !important;
  }
  nav {
    background: #ffffff !important;
    border-bottom: 2px solid var(--apple-text) !important;
  }
}

@media (max-width: 500px) {
  .card {
    padding: 24px 20px !important;
    border-radius: 16px !important;
  }
  #details {
    grid-template-columns: 1fr;
  }
}


/* Placeholders & Additional Page Components */
#caloriePlaceholder, #iwPlaceholder, #bfPlaceholder, #bmrPlaceholder, #macroPlaceholder, #waterPlaceholder, #tdeePlaceholder {
  background: rgba(0, 0, 0, 0.03);
  border: 1px dashed rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  padding: 44px 24px;
  text-align: center;
  color: var(--apple-text-tertiary);
  font-size: 14.5px;
  font-weight: 500;
}

.newsletter-lite {
  background: rgba(0, 113, 227, 0.06);
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 20px;
  padding: 32px 28px;
  margin: 40px 0;
  text-align: center;
}

.newsletter-lite h2 {
  color: var(--apple-blue);
  font-size: 22px;
  margin-bottom: 10px;
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #e5e5ea;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 24px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--apple-text);
  margin-bottom: 6px;
  font-size: 14px;
}
/* ============================================================
   Module 17: Apple Health & Article Components Extended
   ============================================================ */

/* 1. Canvas Gauge & Metric Badges (index.html) */
#gauge {
  display: none;
  width: 100%;
  max-width: 380px;
  margin: 0 auto 16px;
  border-radius: 16px;
}
.bmi-score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 16px;
}
.bmi-score-number {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  font-optical-sizing: auto;
  font-variant-numeric: tabular-nums;
  color: var(--apple-text);
}
.bmi-score-cat {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
#details li strong {
  display: block;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--apple-text-tertiary);
  font-weight: 600;
  margin-bottom: 2px;
}

/* 2. Calorie Calculator Targets */
.result-row.maint, .maint {
  border-left: 4px solid var(--apple-green);
  background: rgba(52, 199, 89, 0.05);
}
.result-row.loss, .loss {
  border-left: 4px solid var(--apple-orange);
  background: rgba(255, 149, 0, 0.05);
}
.result-row.gain, .gain {
  border-left: 4px solid var(--apple-purple);
  background: rgba(175, 82, 222, 0.05);
}
.maint .result-label, .loss .result-label, .gain .result-label {
  font-weight: 700;
}

/* 3. Macro Calculator Extended */
.macro-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 18px 0;
}
@media (max-width: 640px) {
  .macro-summary {
    grid-template-columns: 1fr;
  }
}
.macro-summary .macro-card {
  margin-bottom: 0;
}
.macro-card .big, .big {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--apple-text);
  font-variant-numeric: tabular-nums;
  margin: 4px 0;
}
.macro-cals, .macro-desc, .macro-icon, .macro-name {
  display: block;
}
.macro-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--apple-text);
}
.macro-cals {
  font-size: 13px;
  color: var(--apple-text-secondary);
}
.macro-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

/* 4. Apple Editorial Callout Boxes */
.tip-box, .science-box, .fact-box, .smart-box, .quality-box, .scenario-box, .type-box, .timeline-box {
  background: rgba(0, 113, 227, 0.04);
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-left: 4px solid var(--apple-blue);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 20px 0;
  font-size: 14.5px;
  line-height: 1.6;
}
.tip-icon {
  font-size: 20px;
  margin-right: 8px;
  display: inline-block;
}
.tip-content {
  flex: 1;
}
.tips-list {
  padding-left: 20px;
  margin: 8px 0 0;
}
.warning-box, .concern-box, .emergency-box {
  background: rgba(255, 149, 0, 0.05);
  border: 1px solid rgba(255, 149, 0, 0.22);
  border-left: 4px solid var(--apple-orange);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 20px 0;
  font-size: 14.5px;
  line-height: 1.6;
}
.emergency-box {
  background: rgba(255, 59, 48, 0.05);
  border-color: rgba(255, 59, 48, 0.25);
  border-left-color: var(--apple-red);
}
.myth-box {
  background: rgba(255, 59, 48, 0.04);
  border: 1px solid rgba(255, 59, 48, 0.2);
  border-left: 4px solid var(--apple-red);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 20px 0;
  font-size: 14.5px;
  line-height: 1.6;
}
.disclaimer-box {
  background: #f5f5f7;
  border: 1px solid var(--apple-border);
  border-radius: 14px;
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 13px;
  color: var(--apple-text-secondary);
  line-height: 1.5;
}
.habit-box, .habit-tip, .stress-box, .goal-box {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 16px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

/* 5. Apple Benefit, Feature & Method Grids */
.benefit-grid, .comparison-grid, .component-grid, .method-grid, .percentile-grid, .milestone-grid, .link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 24px 0;
}
.benefit-card, .comparison-card, .component-card, .method-card, .percentile-card, .milestone-card, .section-card, .bmi-card, .bf-card {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s var(--ease-smooth), box-shadow 0.2s var(--ease-smooth);
}
.benefit-card:hover, .method-card:hover, .component-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}
.benefit-icon, .comp-icon, .tc-icon, .v-icon, .icon {
  font-size: 26px;
  margin-bottom: 10px;
  display: inline-block;
}
.benefit-title, .comp-title, .v-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--apple-text);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.benefit-desc, .comp-desc, .tc-desc, .v-desc, .link-desc, .formula-desc, .benefit-item {
  font-size: 14px;
  color: var(--apple-text-secondary);
  line-height: 1.5;
}
.comp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.comp-percent, .section-percent {
  font-weight: 700;
  font-size: 16px;
  color: var(--apple-blue);
  font-variant-numeric: tabular-nums;
}
.method-ratio {
  display: inline-block;
  padding: 4px 10px;
  background: #f5f5f7;
  border-radius: 980px;
  font-size: 12px;
  font-weight: 600;
  color: var(--apple-text-secondary);
  margin-bottom: 8px;
}

/* 6. Comparison Pros & Cons */
.comparison {
  margin: 20px 0;
}
.pros, .cons {
  padding: 16px 20px;
  border-radius: 16px;
  margin-bottom: 12px;
  font-size: 14.5px;
}
.pros {
  background: rgba(52, 199, 89, 0.05);
  border: 1px solid rgba(52, 199, 89, 0.2);
}
.cons {
  background: rgba(255, 59, 48, 0.05);
  border: 1px solid rgba(255, 59, 48, 0.2);
}

/* 7. Apple Data Tables Extended */
.age-table, .bf-table, .calorie-table, .compare-table, .comparison-table, .cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--apple-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.age-table th, .bf-table th, .calorie-table th, .compare-table th, .comparison-table th, .cookie-table th {
  background: #f5f5f7;
  color: var(--apple-text);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--apple-border);
  letter-spacing: -0.01em;
}
.age-table td, .bf-table td, .calorie-table td, .compare-table td, .comparison-table td, .cookie-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  font-size: 14px;
  color: var(--apple-text);
}
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
}

/* 8. Apple Stat Cards */
.stat-box, .sugar-stat-card, .water-stat {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.sugar-stat {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--apple-blue);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin: 6px 0;
}
.sugar-type {
  font-size: 13px;
  font-weight: 600;
  color: var(--apple-text-secondary);
}

/* 9. Buttons & Interactive Calls to Action */
.cta-section, .featured-section, .category-section {
  margin: 36px 0;
}
.cta-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.cta-btn, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: var(--apple-blue);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 15px;
  border-radius: 980px;
  text-decoration: none;
  transition: all 0.2s var(--ease-smooth);
  touch-action: manipulation;
  border: none;
  cursor: pointer;
}
.cta-btn:hover, .btn:hover {
  background: var(--apple-blue-hover);
  transform: translateY(-1px);
}
.cta-btn:active, .btn:active {
  transform: scale(0.98);
}
.btn-outline, .secondary {
  background: transparent;
  color: var(--apple-blue) !important;
  border: 1px solid var(--apple-blue);
}
.btn-outline:hover, .secondary:hover {
  background: rgba(0, 113, 227, 0.06);
}
.alert-success {
  background: rgba(52, 199, 89, 0.08);
  border: 1px solid rgba(52, 199, 89, 0.25);
  border-radius: 14px;
  padding: 14px 18px;
  color: #1a7f37;
  font-weight: 600;
  margin: 16px 0;
}

/* 10. Badges, Ranges & Semantic Categories */
.category, .range, .recommendation, .label, .meta {
  font-size: 13.5px;
  color: var(--apple-text-secondary);
}
.healthy, .underweight, .overweight, .obese, .natural, .easy, .medium, .hard, .low {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 980px;
  font-size: 12px;
  font-weight: 600;
}
.healthy, .easy, .natural { background: rgba(52, 199, 89, 0.12); color: #1a7f37; }
.underweight, .low { background: rgba(0, 113, 227, 0.12); color: #0071e3; }
.overweight, .medium { background: rgba(255, 149, 0, 0.12); color: #c93b00; }
.obese, .hard { background: rgba(255, 59, 48, 0.12); color: #d70015; }
.policy-badge {
  display: inline-block;
  padding: 4px 12px;
  background: #f5f5f7;
  border-radius: 980px;
  font-size: 12px;
  font-weight: 600;
  color: var(--apple-text-secondary);
}

/* 11. Food, Diet & Balanced Plate */
.food-name, .tc-name {
  font-weight: 700;
  color: var(--apple-text);
  font-size: 15px;
}
.food-desc {
  font-size: 13px;
  color: var(--apple-text-secondary);
}
.food-icon {
  font-size: 24px;
  margin-bottom: 4px;
}
.plate-visual, .plate-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.plate-section {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}

/* 12. Author, Contact & Trust */
.author-info, .profile-header, .contact-info {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: 18px;
  padding: 20px;
  margin: 24px 0;
}
.profile-meta, .contact-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.contact-item, .contact-link {
  font-size: 14px;
  color: var(--apple-blue);
  text-decoration: none;
}
.location, .role {
  font-size: 13px;
  color: var(--apple-text-secondary);
}
.mission-banner, .trust-bar {
  background: #f5f5f7;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  margin: 24px 0;
}
.popular-links, .link-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

/* 13. Workouts & Timelines */
.day-workout, .schedule-box, .week-plan, .section-card {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
}
.day-name, .day {
  font-size: 16px;
  font-weight: 700;
  color: var(--apple-text);
  margin-bottom: 6px;
}
.schedule-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.schedule-time {
  font-weight: 600;
  color: var(--apple-blue);
  font-size: 14px;
}
.schedule-action {
  font-size: 14px;
  color: var(--apple-text);
}
.difficulty {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* 14. Error Page & Utility */
.error-code {
  font-size: 72px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--apple-text);
  line-height: 1;
}
.error-msg {
  font-size: 18px;
  color: var(--apple-text-secondary);
  margin: 12px 0 24px;
}
.fbmi-ad-slot, .adsbygoogle, .fbmi-ad-label {
  display: none !important;
  min-height: 0 !important;
  height: 0 !important;
  margin: 0 !important;
}
.content, .example, .added, .accuracy, .section-number, .section-label {
  display: block;
}
