/* MenuPriceHub — mobile-first stylesheet.
 * Palette: charcoal #23272F, deep red #B91C1C (primary), warm amber #F59E0B (accent).
 * No fixed pixel widths that can overflow small screens; tables scroll horizontally. */

:root {
  --charcoal: #23272F;
  --charcoal-2: #31363F;
  --red: #B91C1C;
  --red-dark: #8F1616;
  --red-tint: #FDECEC;
  --amber: #F59E0B;
  --amber-dark: #B45309;
  --amber-tint: #FEF3C7;
  --bg: #FFFCF7;
  --surface: #FFFFFF;
  --text: #23272F;
  --muted: #6B7280;
  --border: #E7E2D9;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(35, 39, 47, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.6em; color: var(--charcoal); }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}
.narrow { max-width: 760px; margin-left: auto; margin-right: 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;
}

/* ---------- header ---------- */
.site-header {
  background: var(--charcoal);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 12px;
}
.logo {
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  white-space: nowrap;
}
.logo:hover { color: var(--amber); }
.nav-toggle {
  display: block;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 1.3rem;
  border-radius: 8px;
  padding: 4px 12px;
  cursor: pointer;
}
.main-nav { display: none; }
.main-nav.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--charcoal-2);
  padding: 8px 16px 16px;
  gap: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.main-nav a {
  color: #EDE9E3;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.main-nav a:last-child { border-bottom: 0; }
.main-nav a:hover, .main-nav a.active { color: var(--amber); }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--red) 0%, #7A1414 100%);
  color: #fff;
  padding: 44px 0 52px;
  text-align: center;
}
.hero h1 { color: #fff; font-size: 2rem; margin-bottom: 0.5em; }
.hero-sub { color: #FDECEC; max-width: 640px; margin: 0 auto 1.4em; font-size: 1.05rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.page-hero {
  background: var(--charcoal);
  color: #fff;
  padding: 28px 0 32px;
}
.page-hero h1 { color: #fff; font-size: 1.6rem; margin-bottom: 0.4em; }
.page-lead { color: #D9D4CC; max-width: 720px; margin-bottom: 0; }

.breadcrumb { font-size: 0.85rem; margin-bottom: 14px; color: #B9B3A8; }
.breadcrumb a { color: var(--amber); text-decoration: none; }
.breadcrumb span { margin: 0 4px; }

.freshness-badge {
  display: inline-block;
  background: var(--amber-tint);
  color: var(--amber-dark);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  border: 1px solid var(--amber);
}

/* trademark / non-affiliation notice */
.trademark-notice {
  background: var(--amber-tint);
  border: 1px solid var(--amber);
  color: #92400E;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 16px 0 0;
}
.page-hero .trademark-notice { max-width: 760px; }
.trademark-notice-bottom { margin: 8px 0 32px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  border-radius: 8px;
  padding: 12px 22px;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  text-align: center;
}
.btn-primary { background: var(--red); color: #fff; border-color: var(--red); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-accent { background: var(--amber); color: var(--charcoal); border-color: var(--amber); }
.btn-accent:hover { background: #D97706; border-color: #D97706; color: #fff; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.btn-ghost { background: transparent; color: var(--red); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--red); color: var(--red-dark); }
.btn-sm { padding: 8px 14px; font-size: 0.9rem; }

/* ---------- sections & cards ---------- */
.section { padding: 44px 0; }
.section-alt { background: #FFF6EA; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 28px; }
.section-head p { color: var(--muted); }

.chain-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
.chain-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.chain-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(35, 39, 47, 0.14); }
.chain-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chain-card-body strong { color: var(--charcoal); font-size: 1.05rem; }
.chain-tagline {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.chain-count { color: var(--red); font-weight: 700; font-size: 0.88rem; }

.chain-badge {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.chain-badge-lg { width: 68px; height: 68px; font-size: 1.5rem; }
.chain-title-row { display: flex; align-items: center; gap: 16px; }
.chain-title-row h1 { margin-bottom: 8px; }

.guide-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.guide-card h3 { color: var(--red); }
.guide-card-link { text-decoration: none; color: var(--text); display: block; }
.guide-card-link:hover { border-color: var(--red); }
.guide-card-link:hover h3 { color: var(--red-dark); }
.guide-link-more { color: var(--red); font-weight: 700; font-size: 0.92rem; }
.guide-article { margin-top: 8px; }
.guide-article h2 { margin-top: 1.8em; }

/* ---------- chain page: jump nav + highlights ---------- */
.menu-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 20px 0 6px;
  font-size: 0.92rem;
}
.menu-jump strong { color: var(--charcoal); }
.menu-jump a {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  text-decoration: none;
  color: var(--charcoal);
  font-weight: 600;
  font-size: 0.88rem;
}
.menu-jump a:hover { border-color: var(--red); color: var(--red); }
.menu-highlights { margin: 28px 0 8px; }
.menu-highlights h2 { margin-bottom: 0.4em; }
.highlight-range { color: var(--muted); margin-bottom: 18px; }
.highlight-range strong { color: var(--red); }
.highlight-list { list-style: none; margin: 12px 0 0; padding: 0; }
.highlight-list li { padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 0.94rem; }
.highlight-list li:last-child { border-bottom: 0; }

/* ---------- CTA banner ---------- */
.cta-banner { background: var(--charcoal); color: #fff; padding: 36px 0; }
.cta-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}
.cta-inner h2 { color: #fff; margin-bottom: 0.3em; }
.cta-inner p { color: #D9D4CC; margin: 0; }

/* ---------- notices, boxes ---------- */
.notice-box {
  background: #FFF7ED;
  border-left: 4px solid var(--amber);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 24px 0;
  font-size: 0.95rem;
}
.chain-intro { margin: 0 0 8px; font-size: 1.02rem; }
.empty-note { color: var(--muted); font-style: italic; }
.last-updated { color: var(--muted); font-size: 0.85rem; margin: 24px 0 32px; }
.not-found-box { padding: 24px 0 48px; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
table.menu-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  font-size: 0.94rem;
}
.menu-table th {
  background: var(--charcoal);
  color: #fff;
  text-align: left;
  padding: 12px 14px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.menu-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.menu-table tbody tr:nth-child(even) { background: #FDF9F3; }
.menu-table tbody tr:hover { background: #FFF3E0; }
.item-name { font-weight: 700; color: var(--charcoal); white-space: nowrap; }
.item-desc { color: var(--muted); font-size: 0.88rem; max-width: 320px; }
.item-price { color: var(--red); font-weight: 700; white-space: nowrap; }
.menu-category { margin: 36px 0; }
.menu-category > h2 {
  padding-bottom: 8px;
  border-bottom: 3px solid var(--amber);
  display: inline-block;
}
.nut-heading { font-size: 1rem; color: var(--charcoal-2); margin: 4px 0 12px; }

/* ---------- FAQ accordion ---------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: none;
  border: 0;
  padding: 15px 18px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--charcoal);
  cursor: pointer;
  text-align: left;
}
.faq-q:hover { color: var(--red); }
.faq-icon {
  flex: 0 0 auto;
  color: var(--red);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 18px 18px; color: #3B404B; }
.faq-item.open .faq-a { display: block; }
.faq-a p:last-child { margin-bottom: 0; }

.related-links { margin-top: 32px; }
.related-links h3 { margin-bottom: 12px; }
.link-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.link-chips a {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--charcoal);
  font-weight: 600;
  font-size: 0.92rem;
}
.link-chips a:hover { border-color: var(--red); color: var(--red); }

/* ---------- prose (trust pages) ---------- */
.prose { padding: 8px 0 8px; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: 0.5em; }

/* ---------- calculator ---------- */
.calc-tool { padding: 8px 0 120px; }
.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0 8px;
}
.calc-search-wrap input,
.calc-filter-wrap select,
.calc-goal-row input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
}
.calc-search-wrap input:focus,
.calc-filter-wrap select:focus,
.calc-goal-row input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}
.calc-filter-wrap { display: flex; gap: 10px; }
.calc-filter-wrap select { flex: 1 1 auto; min-width: 0; }
.calc-count { color: var(--muted); font-size: 0.9rem; }

.calc-columns { display: grid; gap: 20px; grid-template-columns: 1fr; margin-top: 12px; }
.calc-results { display: flex; flex-direction: column; gap: 10px; }

.calc-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.calc-item-info { min-width: 0; }
.calc-item-name { font-weight: 700; color: var(--charcoal); }
.calc-item-meta { color: var(--muted); font-size: 0.85rem; }
.calc-item-cal { color: var(--red); font-weight: 700; font-size: 0.9rem; }
.calc-item-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.stepper button {
  background: var(--charcoal);
  color: #fff;
  border: 0;
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
  cursor: pointer;
}
.stepper button:hover { background: var(--red); }
.stepper input {
  width: 44px;
  text-align: center;
  border: 0;
  font-size: 1rem;
  font-weight: 700;
  padding: 6px 0;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.calc-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.calc-panel h2 { font-size: 1.15rem; }
.calc-panel-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.calc-hint { color: var(--muted); font-size: 0.88rem; }

.calc-meal-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.calc-meal-item:last-child { border-bottom: 0; }
.calc-meal-name { font-weight: 600; font-size: 0.94rem; }
.calc-meal-sub { color: var(--muted); font-size: 0.82rem; }
.calc-meal-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.calc-remove {
  background: none;
  border: 0;
  color: var(--red);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
}

.calc-goal-label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.94rem; }
.calc-goal-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.calc-goal-row input { max-width: 160px; }
.calc-progress {
  height: 14px;
  background: #EDE9E3;
  border-radius: 999px;
  overflow: hidden;
}
.calc-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--amber), var(--red));
  border-radius: 999px;
  transition: width 0.3s ease;
}
.calc-goal-text { font-weight: 700; margin: 8px 0 0; font-size: 0.95rem; }

.calc-snapshots { display: flex; flex-direction: column; gap: 10px; }
.calc-snapshot {
  border: 1px dashed var(--amber-dark);
  background: var(--amber-tint);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
}
.calc-snapshot strong { display: block; margin-bottom: 4px; }
.calc-snapshot .calc-snap-actions { display: flex; gap: 8px; margin-top: 8px; }
.calc-compare-table { min-width: 420px; }

/* fixed running totals bar */
.calc-totals-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--charcoal);
  color: #fff;
  z-index: 90;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.3);
  padding: 8px 0;
}
.calc-totals-inner {
  display: flex;
  justify-content: space-around;
  gap: 6px;
  text-align: center;
}
.calc-total-stat { display: flex; flex-direction: column; min-width: 0; }
.calc-total-stat strong { font-size: 1.05rem; color: var(--amber); }
.calc-total-stat small { color: #B9B3A8; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.4px; }

/* ---------- footer ---------- */
.site-footer { background: var(--charcoal); color: #D9D4CC; margin-top: 0; }
.footer-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: 1fr;
  padding-top: 40px;
  padding-bottom: 32px;
}
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.footer-col p { font-size: 0.9rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #D9D4CC; text-decoration: none; font-size: 0.92rem; }
.footer-col a:hover { color: var(--amber); }
.footer-disclaimer { font-size: 0.82rem; color: #A8A29A; }
.footer-mail { color: var(--amber); font-size: 0.9rem; word-break: break-all; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 16px 0; }
.footer-bottom-inner { font-size: 0.82rem; color: #A8A29A; line-height: 1.7; }

/* ---------- larger screens ---------- */
@media (min-width: 640px) {
  h1 { font-size: 2.1rem; }
  .hero h1 { font-size: 2.5rem; }
  .chain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-controls { flex-direction: row; }
  .calc-search-wrap { flex: 2 1 0; min-width: 0; }
  .calc-filter-wrap { flex: 1 1 0; min-width: 0; }
  .calc-item { flex-direction: row; align-items: center; justify-content: space-between; }
  .calc-item-info { flex: 1 1 auto; min-width: 0; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-toggle { display: none; }
  .main-nav {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    padding: 0;
    gap: 4px;
    border: 0;
  }
  .main-nav a { border: 0; padding: 8px 12px; border-radius: 8px; }
  .main-nav a:hover, .main-nav a.active { background: rgba(255, 255, 255, 0.1); color: var(--amber); }
}

@media (min-width: 960px) {
  .chain-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guide-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .calc-columns { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
  .calc-side-col { position: sticky; top: 76px; }
  .cta-inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
