/* Small-Batch Preserve Planner styles */
:root {
  --bg: #fdf8f1;
  --bg-2: #fff4e6;
  --ink: #2b241d;
  --muted: #6b5f52;
  --line: #e6d8c4;
  --accent: #b4532a;
  --accent-2: #e07a3c;
  --green: #7a8753;
  --red: #a94442;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(43,36,29,.06), 0 8px 24px rgba(43,36,29,.06);
  --radius: 14px;
  --radius-sm: 8px;
  --max: 1100px;
}
* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
.brand-mark { display: inline-flex; }
.brand-text { font-size: 1.05rem; letter-spacing: .2px; }
.nav { display: flex; gap: 14px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; padding: 6px 8px; border-radius: 6px; }
.nav a:hover { background: var(--line); }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px;
  padding: 48px 0 24px; align-items: center;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .75rem;
  color: var(--accent); margin: 0 0 8px; font-weight: 700;
}
.hero h1 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.15; margin: 0 0 14px; }
.lede { color: var(--muted); font-size: 1.05rem; max-width: 52ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.hero-card {
  display: flex; align-items: flex-end; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); min-height: 260px; justify-content: center;
}
.jar { width: 90px; display: flex; flex-direction: column; align-items: center; }
.jar-small { width: 70px; }
.jar-lid { width: 50px; height: 10px; background: #8a5a2b; border-radius: 3px 3px 0 0; }
.jar-small .jar-lid { width: 40px; }
.jar-body {
  width: 70px; height: 110px; border: 2px solid #caa472; border-radius: 4px 4px 10px 10px;
  background: #fff; position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: center;
}
.jar-small .jar-body { width: 56px; height: 90px; }
.jar-fill {
  width: 100%; background: #d14a4a; transition: height .3s ease;
}
.jar-label {
  position: absolute; bottom: 6px; left: 0; right: 0; text-align: center;
  font-size: .7rem; color: #fff; background: rgba(0,0,0,.25); padding: 2px 4px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 10px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; text-decoration: none; font-size: .95rem;
  background: transparent; color: var(--ink);
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #9a4521; border-color: #9a4521; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: #fff; border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: #fdecea; }

/* Planner */
.planner { padding: 24px 0 48px; }
.planner-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.panel h2 { margin-top: 0; font-size: 1.2rem; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.field input, .field select, .field textarea {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); width: 100%;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.status { color: var(--green); font-size: .9rem; min-height: 18px; margin: 8px 0 0; }

.result-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tag {
  background: var(--bg-2); color: var(--accent); padding: 4px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
}
#recipeTitle { margin: 6px 0 4px; font-size: 1.4rem; }
#recipeSummary { color: var(--muted); margin: 0 0 16px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--bg-2); border-radius: 10px; padding: 10px; text-align: center; }
.stat-num { display: block; font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: .75rem; color: var(--muted); }

.result h4 { margin: 14px 0 6px; font-size: .95rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ingredient-list { margin: 0; padding-left: 18px; }
.ingredient-list li { margin: 4px 0; }
.step-list { margin: 0; padding-left: 18px; }
.step-list li { margin: 6px 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 10px; }
.timeline li:last-child { border-bottom: none; }
.timeline .t-date { font-weight: 700; color: var(--accent); min-width: 90px; }
.use-by { background: var(--bg-2); padding: 10px 12px; border-radius: 10px; font-size: .9rem; color: var(--muted); margin-top: 14px; }

/* Comparison */
.comparison { padding: 32px 0; }
.section-lede { color: var(--muted); max-width: 60ch; margin: 0 0 18px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.compare-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare-table th, .compare-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.compare-table th { background: var(--bg-2); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.compare-table tbody tr:last-child td { border-bottom: none; }

/* Notes */
.notes { padding: 32px 0; }
.notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.notes article {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.notes h2 { margin-top: 0; font-size: 1.15rem; }
.notes ul { margin: 0; padding-left: 18px; }
.notes li { margin: 6px 0; }

/* History */
.history { padding: 32px 0; }
.history-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.history-actions { display: flex; gap: 8px; }
.history-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.history-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px;
}
.history-card h3 { margin: 0; font-size: 1.05rem; }
.history-card .meta { color: var(--muted); font-size: .85rem; }
.history-card .notes { color: var(--ink); font-size: .9rem; margin: 0; }
.history-card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.history-card .small-btn { font-size: .8rem; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.empty-state { color: var(--muted); padding: 20px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

/* Why */
.why { padding: 32px 0 48px; max-width: 760px; }
.why h2 { font-size: 1.3rem; }
.why p { color: var(--ink); }
.last-updated { color: var(--muted); font-size: .85rem; margin-top: 18px; }

/* Footer */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line); padding: 24px 0; margin-top: 24px; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-row p { margin: 0; color: var(--muted); }
.footer-row nav { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-row a { color: var(--ink); text-decoration: none; }
.footer-row a:hover { text-decoration: underline; }

/* Print */
@media print {
  body { background: #fff; }
  .site-header, .site-footer, .hero-card, .actions, .history, .why, .notes, .comparison, .nav, .hero-actions { display: none; }
  .planner-grid { grid-template-columns: 1fr; }
  .panel { box-shadow: none; border: 1px solid #ccc; }
}

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .planner-grid { grid-template-columns: 1fr; }
  .notes-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .nav { gap: 8px; }
  .nav a { padding: 4px 6px; font-size: .9rem; }
  .brand-text { font-size: .95rem; }
  .hero h1 { font-size: 1.6rem; }
  .stats { grid-template-columns: 1fr 1fr; }
}



/* 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;
}
