:root {
  --cream: #faf5ec;
  --cream-2: #f3ead9;
  --brown: #5b3a1e;
  --brown-dark: #3e2812;
  --amber: #c8791e;
  --amber-dark: #a05f12;
  --gold: #e8a94e;
  --green: #4a7c4f;
  --red: #b34a3a;
  --card: #ffffff;
  --shadow: 0 4px 18px rgba(91, 58, 30, 0.10);
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Heebo', 'Segoe UI', 'Arial Hebrew', system-ui, sans-serif;
  background: var(--cream);
  color: var(--brown-dark);
  line-height: 1.7;
  min-height: 100vh;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #7a4a1d 0%, #b06a24 55%, #d89a4a 100%);
  color: #fff;
  padding: 48px 20px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "🍞";
  position: absolute;
  font-size: 220px;
  opacity: 0.08;
  left: -20px;
  bottom: -60px;
  transform: rotate(-15deg);
}
.hero-inner { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  padding: 4px 18px;
  font-size: 0.9rem;
  margin-bottom: 14px;
  backdrop-filter: blur(4px);
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 900; letter-spacing: -1px; }
.hero-sub { font-size: clamp(1rem, 2.5vw, 1.25rem); font-weight: 300; max-width: 640px; margin: 10px auto 28px; opacity: 0.95; }
.hero-stats { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.stat {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 12px 26px;
  min-width: 120px;
  backdrop-filter: blur(4px);
}
.stat-num { display: block; font-size: 1.8rem; font-weight: 900; }
.stat-label { font-size: 0.85rem; opacity: 0.9; }

/* ---------- Tabs ---------- */
.tabs {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  background: rgba(250, 245, 236, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5d9c4;
  padding: 8px 12px;
  justify-content: center;
}
.tab {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--brown);
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.tab:hover { background: var(--cream-2); }
.tab.active { background: var(--brown); color: #fff; box-shadow: var(--shadow); }

/* ---------- Panels ---------- */
main { max-width: 960px; margin: 0 auto; padding: 26px 16px 60px; }
.panel { display: none; animation: fadeIn 0.3s ease; }
.panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  margin-bottom: 22px;
  border: 1px solid #f0e6d3;
}
.card h2 { color: var(--brown); margin-bottom: 12px; font-size: 1.4rem; }
.card p { margin-bottom: 10px; }
.hint { font-size: 0.9rem; color: #8a6f4d; background: var(--cream-2); padding: 10px 14px; border-radius: 10px; }

/* ---------- Buttons ---------- */
.btn {
  font-family: inherit;
  border: 2px solid var(--brown);
  background: #fff;
  color: var(--brown);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}
.btn:hover { background: var(--cream-2); transform: translateY(-1px); }
.btn-primary { background: var(--amber); border-color: var(--amber); color: #fff; }
.btn-primary:hover { background: var(--amber-dark); border-color: var(--amber-dark); }
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- Checklist ---------- */
.checklist { display: flex; flex-direction: column; gap: 8px; }
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--cream-2);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.check-item:hover { background: #ecdfc8; }
.check-item input { margin-top: 5px; accent-color: var(--amber); width: 18px; height: 18px; cursor: pointer; }
.check-item.done span { text-decoration: line-through; opacity: 0.55; }

/* ---------- Timer ---------- */
.timer-box { text-align: center; padding: 10px 0; }
#timerDisplay {
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-weight: 900;
  color: var(--amber);
  min-height: 3rem;
  margin-bottom: 10px;
}
.timer-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }

/* ---------- Guide / Day nav ---------- */
.day-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 20px; }
.day-dot {
  border: 2px solid var(--brown);
  background: #fff;
  color: var(--brown);
  border-radius: 999px;
  padding: 6px 12px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.day-dot:hover { background: var(--cream-2); }
.day-dot.active { background: var(--amber); border-color: var(--amber); color: #fff; }
.day-dot.done { background: var(--green); border-color: var(--green); color: #fff; }

.day-detail { background: var(--cream-2); border-radius: 12px; padding: 20px; }
.day-detail h3 { color: var(--brown); margin-bottom: 6px; font-size: 1.2rem; }
.day-detail .day-goal { font-weight: 700; color: var(--amber-dark); margin-bottom: 10px; }
.day-detail ul { list-style: none; }
.day-detail li { padding: 6px 0 6px 0; border-bottom: 1px dashed #dcc9a8; }
.day-detail li:last-child { border-bottom: none; }
.day-detail li::before { content: "🥄 "; }
.day-complete {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.day-complete input { accent-color: var(--green); width: 20px; height: 20px; cursor: pointer; }

/* ---------- Calculator ---------- */
.calc-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.calc-tab {
  border: 2px solid var(--brown);
  background: #fff;
  color: var(--brown);
  border-radius: 999px;
  padding: 8px 18px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}
.calc-tab.active { background: var(--brown); color: #fff; }
.calc-section { display: none; }
.calc-section.active { display: block; }
.form-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.form-row label { flex: 1; min-width: 200px; font-weight: 500; }
.form-row input, .form-row select {
  font-family: inherit;
  font-size: 1rem;
  padding: 9px 12px;
  border: 2px solid #dcc9a8;
  border-radius: 10px;
  background: #fff;
  color: var(--brown-dark);
  min-width: 140px;
}
.form-row input:focus, .form-row select:focus { outline: none; border-color: var(--amber); }
.result-box {
  background: var(--brown);
  color: #fff;
  border-radius: 12px;
  padding: 18px;
  margin-top: 10px;
  font-size: 1.05rem;
  line-height: 2;
  min-height: 60px;
}
.result-box .big { font-size: 1.3rem; font-weight: 700; color: var(--gold); }

/* ---------- Recipes ---------- */
.recipe-steps { display: flex; flex-direction: column; gap: 10px; }
.recipe-step {
  background: var(--cream-2);
  border-radius: 10px;
  padding: 12px 16px;
  border-right: 4px solid var(--gold);
}

/* ---------- Troubleshooting & FAQ ---------- */
.ts-item, .faq-item {
  background: var(--cream-2);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.ts-item h3, .faq-item h3 { color: var(--brown); font-size: 1.05rem; margin-bottom: 6px; }
.ts-item .ts-severity { font-size: 0.8rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; margin-right: 8px; vertical-align: middle; }
.sev-ok { background: #dcead9; color: var(--green); }
.sev-warn { background: #fae9c8; color: #8a6a1c; }
.sev-danger { background: #f6dcd7; color: var(--red); }

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 24px;
  color: #a68d6c;
  font-size: 0.9rem;
  border-top: 1px solid #e5d9c4;
  background: var(--cream-2);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 20px;
  right: 50%;
  transform: translateX(50%);
  background: var(--brown-dark);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  font-weight: 500;
}
.toast.show { opacity: 1; transform: translateX(50%) translateY(-6px); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .card { padding: 18px; }
  .hero { padding: 36px 14px 44px; }
  .form-row { flex-direction: column; align-items: stretch; }
  .form-row input, .form-row select { width: 100%; }
}
