:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-2: #f4ede1;
  --text: #2b241d;
  --muted: #6b5d4f;
  --border: #e3d6c2;
  --accent: #d97706;
  --accent-dark: #b45309;
  --accent-soft: #fef3c7;
  --success: #15803d;
  --danger: #b91c1c;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(43, 36, 29, 0.04), 0 8px 24px rgba(43, 36, 29, 0.06);
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
img, svg { max-width: 100%; height: auto; display: block; }

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

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
}
.brand-mark { display: inline-flex; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 2px;
}
.site-nav a:hover { color: var(--text); }

.main { padding-top: 32px; padding-bottom: 64px; }

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: stretch;
  margin-bottom: 48px;
}
.hero-copy {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--accent-dark);
  font-weight: 700;
  margin: 0 0 12px;
}
.hero h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 14px;
}
.lede { color: var(--muted); font-size: 1.05rem; margin: 0 0 20px; }
.hero-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.4rem; color: var(--accent-dark); }
.hero-stats span { font-size: 0.85rem; color: var(--muted); }

.hero-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hero-card h2 { margin: 0; font-size: 1.2rem; }
.quick-facts { margin: 0; display: grid; gap: 10px; }
.quick-facts > div { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border); padding-bottom: 8px; }
.quick-facts dt { color: var(--muted); font-size: 0.9rem; }
.quick-facts dd { margin: 0; font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }

.section-head { margin-bottom: 20px; }
.section-head h2 { margin: 0 0 6px; font-size: 1.6rem; }
.section-head p { margin: 0; color: var(--muted); }

.planner { margin-bottom: 56px; }
.planner-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.panel h3 { margin: 0 0 14px; font-size: 1.1rem; }
.panel h3:not(:first-child) { margin-top: 24px; }
.panel h4 { margin: 0 0 10px; font-size: 1rem; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.92rem; }
.field input[type="number"], .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}
.field input[type="number"]:focus, .field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.input-with-prefix { position: relative; display: flex; align-items: center; }
.input-with-prefix .prefix {
  position: absolute;
  left: 12px;
  color: var(--muted);
  font-weight: 600;
}
.input-with-prefix input { padding-left: 26px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
output { display: block; font-weight: 600; color: var(--accent-dark); margin-top: 4px; }

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.theme-chip {
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.theme-chip:hover { border-color: var(--accent); }
.theme-chip.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 600;
}

.input-actions { display: flex; gap: 10px; margin-top: 18px; }

.output-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.cost-pill {
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}
.cost-pill.over { background: #fee2e2; color: var(--danger); }
.theme-tag { color: var(--muted); margin: 0 0 16px; font-size: 0.92rem; }

.menu-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--accent);
}
.menu-item .dish { font-weight: 600; }
.menu-item .dish-meta { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.menu-item .dish-cost { font-weight: 700; color: var(--accent-dark); white-space: nowrap; }
.menu-item .swap-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--muted);
}
.menu-item .swap-btn:hover { border-color: var(--accent); color: var(--accent-dark); }

.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.timeline li {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}
.timeline .time {
  font-weight: 700;
  color: var(--accent-dark);
  white-space: nowrap;
  min-width: 80px;
}

.tips { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.tips li { font-size: 0.92rem; }

.output-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.save-status { font-size: 0.85rem; color: var(--success); margin: 10px 0 0; min-height: 18px; }

.guide { margin-bottom: 56px; }
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.guide-card h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--accent-dark); }
.guide-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.scenario {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 24px;
  border-left: 4px solid var(--accent);
}
.scenario h3 { margin: 0 0 8px; }
.scenario p { margin: 0; color: var(--muted); }

.saved { margin-bottom: 56px; }
.saved-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.saved-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.saved-item .saved-meta { display: flex; flex-direction: column; gap: 2px; }
.saved-item .saved-title { font-weight: 600; }
.saved-item .saved-sub { font-size: 0.85rem; color: var(--muted); }
.saved-item .saved-actions { display: flex; gap: 8px; }
.empty-state { color: var(--muted); font-style: italic; padding: 12px 0; }

.affiliate-note { margin-bottom: 48px; }
.affiliate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  box-shadow: var(--shadow);
}
.affiliate-card h3 { margin: 0 0 4px; font-size: 1.1rem; }
.affiliate-card p { margin: 0; color: var(--muted); }

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 32px;
}
.footer-inner { display: grid; gap: 12px; }
.footer-inner p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.footer-inner nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-inner nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.footer-inner nav a:hover { color: var(--text); }
.fineprint { font-size: 0.8rem; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .planner-grid { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
  .affiliate-card { grid-template-columns: 1fr; }
  .hero-copy { padding: 24px; }
}

@media (max-width: 520px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .site-nav { gap: 12px; }
  .output-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .input-actions { flex-direction: column; }
  .output-actions .btn { flex: 1; }
}

@media print {
  .site-header, .site-nav, .hero, .inputs-panel, .guide, .saved, .affiliate-note, .site-footer, .output-actions, .save-status { display: none !important; }
  .planner-grid { grid-template-columns: 1fr; }
  .panel { box-shadow: none; border: none; padding: 0; }
  body { background: #fff; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
