/* ============================================================
   Chipotle Calorie Calculator — Premium SaaS Styles
   ============================================================ */

:root {
  /* Brand */
  --brand: #a31f24;
  --brand-dark: #7a1518;
  --brand-light: #d64545;
  --accent: #e85d04;
  --accent-soft: #fff0e8;

  /* Neutrals */
  --bg: #faf9f8;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f2f0;
  --border: #e8e4e0;
  --border-strong: #d4cdc6;
  --text: #1a1816;
  --text-secondary: #5c5650;
  --text-muted: #8a837c;
  --heading: #12100e;

  /* Feedback */
  --success: #1a7a4c;
  --success-bg: #e8f6ef;
  --warning: #b45309;
  --warning-bg: #fef3c7;
  --danger: #b91c1c;
  --info: #1d4ed8;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(26, 24, 22, 0.04), 0 1px 3px rgba(26, 24, 22, 0.06);
  --shadow-md: 0 4px 12px rgba(26, 24, 22, 0.06), 0 2px 4px rgba(26, 24, 22, 0.04);
  --shadow-lg: 0 12px 40px rgba(26, 24, 22, 0.1), 0 4px 12px rgba(26, 24, 22, 0.05);
  --shadow-brand: 0 8px 24px rgba(163, 31, 36, 0.25);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --nav-h: 72px;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.5);
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
}

[data-theme="dark"] {
  --bg: #12100e;
  --bg-elevated: #1c1917;
  --surface: #1c1917;
  --surface-2: #262220;
  --border: #332e2a;
  --border-strong: #4a433c;
  --text: #f5f2ef;
  --text-secondary: #b8b0a8;
  --text-muted: #8a837c;
  --heading: #faf8f6;
  --accent-soft: #2a1810;
  --success-bg: #0f2a1c;
  --warning-bg: #2a1f08;
  --glass: rgba(28, 25, 23, 0.8);
  --glass-border: rgba(255, 255, 255, 0.06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--brand-dark);
}

[data-theme="dark"] a:hover {
  color: var(--brand-light);
}

ul, ol {
  list-style: none;
}

button, select, input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* Utilities */
.container {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

.container-narrow {
  width: min(760px, 100% - 2rem);
  margin-inline: auto;
}

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

.section {
  padding: 4.5rem 0;
}

.section-sm {
  padding: 3rem 0;
}

.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--heading);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 2rem;
}

.text-center { text-align: center; }
.text-center .section-lead { margin-inline: auto; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 10px 28px rgba(163, 31, 36, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--heading);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  color: var(--heading);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--heading);
}

.btn-sm {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--heading);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo:hover { color: var(--heading); }

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 800;
  box-shadow: var(--shadow-brand);
}

.logo-text span {
  color: var(--brand);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--heading);
  background: var(--surface-2);
}

/* Nav dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}

.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle,
.nav-dropdown-toggle.active {
  color: var(--heading);
  background: var(--surface-2);
}

.nav-chevron {
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
  flex-shrink: 0;
}

.nav-dropdown.open .nav-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 120;
}

.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.625rem 0.875rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: var(--surface-2);
  color: var(--heading);
}

.nav-dropdown-menu .dropdown-label {
  display: block;
  padding: 0.375rem 0.875rem 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* Mini calculator cards (More Calculators page) */
.calc-hub-grid {
  display: grid;
  gap: 1.25rem;
}

.calc-hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.calc-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.calc-hub-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.calc-hub-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(163, 31, 36, 0.12), rgba(232, 93, 4, 0.1));
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.calc-hub-card-header h2 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.calc-hub-card-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.calc-hub-body {
  padding: 1.5rem;
}

.mini-form {
  display: grid;
  gap: 1rem;
}

.mini-form .field-row {
  display: grid;
  gap: 1rem;
}

.mini-result {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(163, 31, 36, 0.08), rgba(232, 93, 4, 0.06));
  border: 1px solid rgba(163, 31, 36, 0.12);
  border-radius: var(--radius-sm);
  text-align: center;
}

.mini-result .mini-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-family: var(--font-display);
}

.mini-result .mini-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0.25rem 0;
}

.mini-result .mini-note {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.field-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--heading);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(163, 31, 36, 0.15);
  background: var(--surface);
}

@media (min-width: 640px) {
  .calc-hub-grid {
    grid-template-columns: 1fr;
  }
  .mini-form .field-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .mini-form .field-row-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .calc-hub-grid.featured {
    grid-template-columns: 1fr;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all var(--transition);
}

.theme-toggle:hover {
  color: var(--heading);
  border-color: var(--border-strong);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.menu-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--heading);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: var(--bg);
  z-index: 99;
  padding: 1.5rem;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--heading);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.mobile-nav a:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* Hero */
.hero {
  position: relative;
  padding: 3.5rem 0 4rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 85% 10%, rgba(163, 31, 36, 0.1), transparent 55%),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(232, 93, 4, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--accent-soft) 100%);
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  max-width: 560px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(26, 122, 76, 0.2);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--heading);
  margin-bottom: 1.25rem;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  font-size: 1.1875rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-preview {
  position: relative;
}

.hero-preview img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.hero-float {
  position: absolute;
  bottom: -12px;
  left: 16px;
  right: 16px;
  padding: 1rem 1.25rem;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  animation: floatUp 0.8s ease-out 0.2s both;
}

.hero-float strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--brand);
  display: block;
  line-height: 1.2;
}

.hero-float span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

@keyframes floatUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Calculator */
.calculator-section {
  padding: 2rem 0 5rem;
  position: relative;
}

.calc-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.calc-card,
.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.calc-card-header,
.summary-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

.calc-card-header h2,
.summary-header h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.02em;
}

.calc-card-header p,
.summary-header p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.calc-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field-label {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.field-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 0.875rem 2.75rem 0.875rem 1rem;
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a837c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 1rem center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--heading);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  cursor: pointer;
}

.field-select:hover {
  border-color: var(--border-strong);
}

.field-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(163, 31, 36, 0.15);
  background-color: var(--surface);
}

.chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.625rem;
}

.chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
  padding: 0.75rem 0.875rem;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: left;
  transition: all var(--transition);
  cursor: pointer;
}

.chip:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.chip.selected {
  background: rgba(163, 31, 36, 0.08);
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

[data-theme="dark"] .chip.selected {
  background: rgba(163, 31, 36, 0.2);
}

.chip-name {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--heading);
}

.chip-cal {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.field-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

/* Summary Card */
.summary-body {
  padding: 1.5rem;
}

.calorie-hero {
  text-align: center;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(163, 31, 36, 0.08), rgba(232, 93, 4, 0.06));
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  border: 1px solid rgba(163, 31, 36, 0.12);
}

.calorie-hero .label {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.calorie-hero .value {
  font-family: var(--font-display);
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--brand);
  line-height: 1.1;
  margin: 0.25rem 0;
  transition: transform 0.3s ease;
}

.calorie-hero .value.pulse {
  animation: pulseCal 0.35s ease;
}

@keyframes pulseCal {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.calorie-hero .unit {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.macro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.macro-item {
  text-align: center;
  padding: 1rem 0.5rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.macro-item .macro-val {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--heading);
  display: block;
}

.macro-item .macro-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}

.stat-row:last-of-type {
  border-bottom: none;
}

.stat-row .stat-label {
  color: var(--text-secondary);
}

.stat-row .stat-value {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--heading);
}

.progress-block {
  margin: 1.25rem 0;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.progress-header span:first-child {
  color: var(--text-secondary);
  font-weight: 500;
}

.progress-header span:last-child {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--heading);
}

.progress-track {
  height: 10px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--success), #34d399);
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
}

.progress-fill.moderate {
  background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.progress-fill.high {
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--success-bg);
  color: var(--success);
}

.rating-badge.moderate {
  background: var(--warning-bg);
  color: var(--warning);
}

.rating-badge.indulgent {
  background: rgba(163, 31, 36, 0.1);
  color: var(--brand);
}

.selected-list {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.selected-list h3 {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 2rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.tag strong {
  color: var(--heading);
  font-weight: 600;
}

.tag-empty {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
}

.summary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.summary-actions .btn:last-child {
  grid-column: 1 / -1;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  padding: 0.875rem 1.25rem;
  background: var(--heading);
  color: var(--bg);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Content sections */
.content-grid {
  display: grid;
  gap: 1.25rem;
}

.feature-card {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(163, 31, 36, 0.12), rgba(232, 93, 4, 0.1));
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.975rem;
  color: var(--text-secondary);
}

.prose {
  color: var(--text-secondary);
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--heading);
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.02em;
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 650;
  color: var(--heading);
  margin: 1.75rem 0 0.75rem;
}

.prose p {
  margin-bottom: 1.125rem;
}

.prose ul, .prose ol {
  margin: 0 0 1.25rem 1.25rem;
  list-style: disc;
}

.prose ol { list-style: decimal; }

.prose li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.prose strong {
  color: var(--heading);
  font-weight: 600;
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 1rem;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: start;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  display: grid;
  place-items: center;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.25rem;
}

.step p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

/* Tips */
.tips-grid {
  display: grid;
  gap: 1rem;
}

.tip-card {
  padding: 1.5rem;
  background: var(--surface);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: var(--shadow-sm);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.tip-card h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.375rem;
}

.tip-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 760px;
  margin-inline: auto;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.faq-item:hover {
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading);
}

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform var(--transition), background var(--transition);
  color: var(--text-muted);
}

.faq-icon svg {
  width: 14px;
  height: 14px;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: rgba(163, 31, 36, 0.1);
  color: var(--brand);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 400px;
}

.faq-answer-inner {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.975rem;
}

/* Blog cards */
.blog-grid {
  display: grid;
  gap: 1.25rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  color: inherit;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.blog-card-img {
  height: 160px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  position: relative;
  overflow: hidden;
}

.blog-card-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
}

.blog-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-meta {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand);
  margin-bottom: 0.5rem;
}

.blog-card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.blog-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  flex: 1;
  margin-bottom: 1rem;
}

.blog-link {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand);
}

/* Page hero (inner pages) */
.page-hero {
  padding: 3rem 0 2rem;
  background:
    radial-gradient(ellipse 70% 80% at 90% 0%, rgba(163, 31, 36, 0.08), transparent),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover { color: var(--brand); }

.breadcrumb-sep {
  opacity: 0.5;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--heading);
  margin-bottom: 0.75rem;
}

.page-hero .lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
}

/* Nutrition table */
.nutrition-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.nutrition-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.nutrition-table th,
.nutrition-table td {
  padding: 0.875rem 1.125rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.nutrition-table th {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--surface-2);
}

.nutrition-table tr:last-child td {
  border-bottom: none;
}

.nutrition-table td:last-child,
.nutrition-table th:last-child {
  text-align: right;
  font-family: var(--font-display);
  font-weight: 600;
}

.nutrition-table tbody tr:hover {
  background: var(--surface-2);
}

/* CTA band */
.cta-band {
  margin: 2rem 0;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 60%, #5c1012 100%);
  border-radius: var(--radius-lg);
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(232, 93, 4, 0.4), transparent 70%);
  pointer-events: none;
}

.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 750;
  margin-bottom: 0.75rem;
  position: relative;
}

.cta-band p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
  max-width: 440px;
  margin-inline: auto;
  position: relative;
}

.cta-band .btn-primary {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.cta-band .btn-primary:hover {
  color: var(--brand-dark);
  background: #fff;
}

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand .logo {
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--heading);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  padding: 0.3rem 0;
}

.footer-col a:hover {
  color: var(--brand);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

.footer-legal a {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.footer-legal a:hover {
  color: var(--brand);
}

.disclaimer {
  font-size: 0.8125rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-top: 1rem;
  line-height: 1.5;
}

/* Article layout */
.article {
  padding: 2.5rem 0 4rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Sticky summary on desktop */
.summary-sticky {
  position: static;
}

/* Animations */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.visible {
    opacity: 1;
    transform: none;
  }
}

/* Print */
@media print {
  .navbar, .hero, .footer, .theme-toggle, .menu-toggle,
  .summary-actions, .mobile-nav, .cta-band, .btn-group {
    display: none !important;
  }
  .calculator-section {
    padding: 0;
  }
  .summary-card, .calc-card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
  body { background: #fff; color: #000; }
}

/* Responsive — tablet */
@media (min-width: 640px) {
  .content-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tips-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
  .chip-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

/* Responsive — desktop */
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .menu-toggle { display: none; }

  .hero .container {
    grid-template-columns: 1fr 1.05fr;
    gap: 4rem;
  }

  .hero {
    padding: 5rem 0 5.5rem;
  }

  .calc-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.75rem;
  }

  .summary-sticky {
    position: sticky;
    top: calc(var(--nav-h) + 1.25rem);
  }

  .content-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .blog-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
  }
}
