﻿/* ============================================================
   FOOD WHEN THE SHOPS STOP
   style.css - Earthy & warm palette, responsive, max 1440px
   ============================================================ */

/* -- Reset & Variables ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --parchment:      #F5EFE0;
  --parchment-dark: #EDE3CC;
  --linen:          #FDF6EC;
  --soil:           #346236;
  --soil-light:     #5e5936;
  --soil-mid:       #8B6555;
  --gold:           #C4890A;
  --gold-light:     #F0C050;
  --gold-pale:      #FEF3D0;
  --green:          #4A7C3F;
  --green-dark:     #2E5728;
  --green-light:    #D4EACD;
  --rust:           #8B3A0F;
  --rust-light:     #F5DDD4;
  --charcoal:       #2C2416;
  --mid-grey:       #C8BFB0;
  --light-grey:     #F0EBE0;
  --warning-bg:     #FFF3CD;
  --warning-border: #C4890A;
  --error-bg:       #F8D7DA;
  --error-border:   #8B3A0F;
  --success-bg:     #D4EACD;
  --success-border: #4A7C3F;
  --font-heading:   'Electrolize', Georgia, serif;
  --font-body:      Roboto, Helvetica, sans-serif;
  --radius:         6px;
  --radius-lg:      12px;
  --shadow:         0 2px 12px rgba(61,43,31,0.12);
  --shadow-lg:      0 4px 24px rgba(61,43,31,0.18);
  --max-width:      1440px;
  --gutter:         32px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--charcoal);
  background-color: #ffffff;
  background-image: none;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* -- Site Header ------------------------------------------------------- */
.site-header {
  background: #ffffff;
  background-image: none;
  color: var(--soil);
  border-bottom: 4px solid var(--gold);
}
.site-header .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 22px var(--gutter) 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-logo { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.site-logo .name {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: bold;
  color: var(--gold-light);
  letter-spacing: -0.3px;
  line-height: 1.1;
}
.site-logo .name span { color: var(--parchment); }
.site-logo .tagline { font-size: 12px; color: var(--mid-grey); font-style: italic; letter-spacing: 0.4px; }
.site-header-icon { font-size: 44px; opacity: 0.55; line-height: 1; }

/* -- Progress Bar ------------------------------------------------------ */
.progress-bar {
  background: var(--soil-light);
  border-bottom: 1px solid rgba(61,43,31,0.3);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.progress-bar .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: stretch;
  min-width: 560px;
}
.progress-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px;
  position: relative;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: background 0.2s;
  cursor: default;
}
.progress-step::after {
  content: '-';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.25);
  font-size: 20px;
  z-index: 1;
}
.progress-step:last-child::after { display: none; }
.progress-step .step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.5);
  font-size: 11px; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
  transition: background 0.2s, color 0.2s;
}
.progress-step .step-label { font-size: 14px; color: #ffffff; text-align: center; white-space: nowrap; }
.progress-step.done { cursor: pointer; }
.progress-step.done:hover { background: rgba(255,255,255,0.06); }
.progress-step.done .step-num { background: var(--green); color: white; }
.progress-step.done .step-label { color: rgba(255,255,255,0.8); }
.progress-step.active { border-bottom-color: var(--gold-light); background: rgba(255,255,255,0.07); }
.progress-step.active .step-num { background: var(--gold); color: white; }
.progress-step.active .step-label { color: var(--gold-light); font-weight: bold; }

/* -- Page Wrapper ------------------------------------------------------ */
.page-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 36px var(--gutter) 64px;
  flex: 1;
}

/* -- Page Title -------------------------------------------------------- */
.page-title { margin-bottom: 28px; }
.page-title .step-indicator {
  font-size: 11px; font-weight: bold; color: var(--soil-mid);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px;
}
.page-title h2 {
  font-family: var(--font-heading);
  font-size: 28px; color: var(--soil); font-weight: bold;
  margin-bottom: 8px; line-height: 1.2;
}
.page-title p { font-size: 15px; color: var(--soil-light); max-width: 680px; line-height: 1.7; }

/* -- Cards ------------------------------------------------------------- */
.card {
  background: var(--linen);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid var(--parchment-dark);
}
.card-header {
  padding: 13px 22px;
  font-family: var(--font-heading);
  font-size: 15px; font-weight: bold;
  display: flex; align-items: center; gap: 10px;
}
.card-header.soil  { background: var(--soil);      color: var(--parchment); }
.card-header.gold {
    background: #a7c40a;
    color: white;
}
.card-header.green { background: var(--green-dark); color: white; }
.card-header.rust  { background: var(--rust);       color: white; }
.card-header .icon { font-size: 18px; }
.card-body { padding: 22px; }

/* -- Form Elements ----------------------------------------------------- */
.form-grid          { display: grid; gap: 18px 26px; grid-template-columns: 1fr 1fr; }
.form-grid.three    { grid-template-columns: 1fr 1fr 1fr; }
.form-grid.four     { grid-template-columns: 1fr 1fr 1fr 1fr; }
.form-grid.one      { grid-template-columns: 1fr; }
.form-group         { display: flex; flex-direction: column; gap: 5px; }
.form-group label   { font-size: 11px; font-weight: bold; color: var(--soil); text-transform: uppercase; letter-spacing: 0.6px; }
.form-group select, .form-group input[type=number], .form-group input[type=text] {
  padding: 9px 12px;
  border: 2px solid var(--parchment-dark);
  border-radius: var(--radius);
  font-size: 15px; color: var(--charcoal);
  background: white; font-family: var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%; -webkit-appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B4C3B' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.form-group select:focus,
.form-group input:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(74,124,63,0.15);
}
.form-group .hint { font-size: 12px; color: var(--soil-mid); font-style: italic; line-height: 1.4; }

/* -- Zone Cards -------------------------------------------------------- */
.zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.zone-card {
  position: relative;
  border: 2px solid var(--parchment-dark);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  background: white;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.zone-card:hover    { border-color: var(--green); background: var(--green-light); box-shadow: var(--shadow); }
.zone-card.selected { border-color: var(--green-dark); background: var(--green-light); box-shadow: var(--shadow); }

.zone-card input[type=radio] { position: absolute; opacity: 0; width: 0; height: 0; }

/* Badge pill replacing the old large icon text */
.zone-card .zone-icon {
  display: inline-block;
  font-size: 17px;
  font-weight: bold;
  font-family: var(--font-body);
  color: var(--green-dark);
  background: var(--green-light);
  border: 1px solid var(--green);
  border-radius: 4px;
  padding: 2px 7px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  width: fit-content;
  margin-bottom: 2px;
}

.zone-card .zone-name {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: bold;
  color: var(--soil);
}

.zone-card .zone-examples {
  font-size: 12px;
  color: var(--soil-mid);
  font-style: italic;
  line-height: 1.4;
}

.zone-card .zone-season {
  font-size: 12px;
  color: var(--green-dark);
  font-weight: bold;
  margin-top: 4px;
}

.zone-card .check-mark {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green-dark);
  color: white;
  font-size: 12px;
  display: none;
  align-items: center;
  justify-content: center;
}
.zone-card.selected .check-mark { display: flex; }
/* -- People Counters --------------------------------------------------- */
.people-row {
  display: grid;
  grid-template-columns: 36px 1fr auto 120px;
  align-items: center; gap: 14px;
  padding: 13px 16px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--parchment-dark);
  margin-bottom: 10px;
}
.people-row .person-icon { font-size: 22px; text-align: center; }
.people-row .person-label { font-size: 14px; font-weight: bold; color: var(--soil); }
.people-row .person-sub   { font-size: 12px; color: var(--soil-mid); font-weight: normal; display: block; margin-top: 2px; }
.counter { display: flex; align-items: center; gap: 10px; }
.counter button {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--green);
  background: white; color: var(--green-dark);
  font-size: 18px; font-weight: bold; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; transition: background 0.2s, color 0.2s;
}
.counter button:hover { background: var(--green); color: white; }
.counter .count-val { min-width: 28px; text-align: center; font-size: 20px; font-weight: bold; color: var(--soil); font-family: var(--font-heading); }
.people-row .kcal-label { font-size: 12px; color: var(--gold); font-weight: bold; text-align: right; }

/* -- Activity Cards ---------------------------------------------------- */
.activity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.activity-card {
  position: relative; border: 2px solid var(--parchment-dark);
  border-radius: var(--radius-lg); padding: 16px; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: white; text-align: center;
}
.activity-card:hover    { border-color: var(--gold); background: var(--gold-pale); }
.activity-card.selected { border-color: var(--gold); background: var(--gold-pale); }
.activity-card input[type=radio] { position: absolute; opacity: 0; }
.activity-card .act-icon  { font-size: 30px; margin-bottom: 8px; }
.activity-card .act-name  { font-weight: bold; font-size: 14px; color: var(--soil); margin-bottom: 4px; }
.activity-card .act-kcal  { font-family: var(--font-heading); font-size: 20px; font-weight: bold; color: var(--gold); }
.activity-card .act-desc  { font-size: 11px; color: var(--soil-mid); margin-top: 4px; line-height: 1.4; }
.activity-card .act-check {
  position: absolute; top: 10px; right: 10px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold); color: white; font-size: 11px;
  display: none; align-items: center; justify-content: center;
}
.activity-card.selected .act-check { display: flex; }

/* -- Tabs -------------------------------------------------------------- */
.tab-bar {
  display: flex; gap: 0;
  border-bottom: 2px solid var(--parchment-dark);
  margin-bottom: 22px; flex-wrap: wrap;
}
.tab-btn {
  padding: 10px 20px; border: none; background: none;
  font-family: var(--font-body); font-size: 14px; font-weight: bold;
  color: var(--soil-mid); cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
  display: flex; align-items: center; gap: 8px;
}
.tab-btn:hover { color: var(--soil); }
.tab-btn.active { color: var(--green-dark); border-bottom-color: var(--green-dark); }
.tab-btn .tab-icon { font-size: 16px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* -- Toggle (yes/no sections) ------------------------------------------ */
.section-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: white; border-radius: var(--radius);
  border: 1px solid var(--parchment-dark); margin-bottom: 16px;
  gap: 16px;
}
.section-toggle .toggle-text .toggle-title { font-size: 15px; font-weight: bold; color: var(--soil); }
.section-toggle .toggle-text .toggle-sub   { font-size: 12px; color: var(--soil-mid); margin-top: 2px; }
.toggle-switch { position: relative; display: inline-block; width: 50px; height: 26px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--mid-grey); border-radius: 26px; transition: background 0.2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 4px; top: 4px;
  background: white; border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--green); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(24px); }
.toggle-content { display: none; }
.toggle-content.visible { display: block; }

/* -- Animal Rows ------------------------------------------------------- */
.animal-row {
  display: grid;
  grid-template-columns: 38px 1fr 90px 130px;
  align-items: center; gap: 14px;
  padding: 12px 16px;
  background: white; border-radius: var(--radius);
  border: 1px solid var(--parchment-dark); margin-bottom: 8px;
}
.animal-row .animal-icon { font-size: 22px; text-align: center; }
.animal-row .animal-name { font-size: 14px; font-weight: bold; color: var(--soil); }
.animal-row .animal-feed { font-size: 12px; color: var(--soil-mid); margin-top: 2px; }
.animal-row .animal-qty input {
  width: 80px; padding: 7px 10px;
  border: 2px solid var(--parchment-dark);
  border-radius: var(--radius); font-size: 14px; text-align: center;
  transition: border-color 0.2s;
}
.animal-row .animal-qty input:focus { outline: none; border-color: var(--green); }
.animal-row .net-cal { font-size: 13px; font-weight: bold; text-align: right; }
.net-pos { color: var(--green-dark); }
.net-neg { color: var(--rust); }

/* -- Wild Animal Grid -------------------------------------------------- */
.wild-category { margin-bottom: 24px; }
.wild-category h4 {
  font-family: var(--font-heading); font-size: 14px; color: var(--soil);
  margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--parchment-dark);
}
.wild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.wild-item {
  border: 2px solid var(--parchment-dark);
  border-radius: var(--radius); padding: 12px;
  background: white; transition: border-color 0.2s, background 0.2s;
}
.wild-item.active { border-color: var(--rust); background: var(--rust-light); }
.wild-item-header {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; margin-bottom: 0;
}
.wild-item-header input[type=checkbox] { accent-color: var(--rust); width: 16px; height: 16px; }
.wild-item-header .wild-icon { font-size: 20px; }
.wild-item-header .wild-name { font-size: 13px; font-weight: bold; color: var(--soil); flex: 1; }
.wild-item-header .wild-kcal { font-size: 11px; color: var(--gold); font-weight: bold; }
.wild-inputs { display: none; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--parchment-dark); }
.wild-inputs.visible { display: block; }
.wild-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.wild-row label { font-size: 11px; color: var(--soil-mid); font-weight: bold; display: block; margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.4px; }
.wild-row input { padding: 6px 8px; border: 1.5px solid var(--parchment-dark); border-radius: var(--radius); font-size: 13px; width: 100%; }
.wild-months { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.month-btn {
  width: 28px; height: 24px; border-radius: 3px;
  border: 1.5px solid var(--parchment-dark);
  background: white; font-size: 10px; font-weight: bold;
  cursor: pointer; color: var(--soil-mid);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.month-btn.on { background: var(--rust); color: white; border-color: var(--rust); }

/* -- Skill Level ------------------------------------------------------- */
.skill-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--gold-pale);
  border-radius: var(--radius); border: 1px solid var(--gold);
  margin-bottom: 16px; flex-wrap: wrap;
}
.skill-row label { font-size: 13px; font-weight: bold; color: var(--soil); }
.skill-row select { padding: 6px 10px; border: 1.5px solid var(--gold); border-radius: var(--radius); font-size: 13px; background: white; }
.skill-row .skill-note { font-size: 12px; color: var(--soil-mid); font-style: italic; flex: 1; min-width: 200px; }

/* -- Crop Grid --------------------------------------------------------- */
.crop-category { margin-bottom: 26px; }
.crop-category h4 {
  font-family: var(--font-heading); font-size: 14px; color: var(--soil);
  margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--parchment-dark);
  display: flex; align-items: center; gap: 8px;
}
.crop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 9px; }
.crop-item {
  position: relative; border: 2px solid var(--parchment-dark);
  border-radius: var(--radius); padding: 11px 13px;
  cursor: pointer; background: white;
  transition: border-color 0.2s, background 0.2s;
  display: flex; flex-direction: column; gap: 3px;
}
.crop-item:hover    { border-color: var(--green); background: var(--green-light); }
.crop-item.selected { border-color: var(--green-dark); background: var(--green-light); }
.crop-item input[type=checkbox] { position: absolute; opacity: 0; }
.crop-item .crop-name  { font-size: 13px; font-weight: bold; color: var(--soil); padding-right: 20px; }
.crop-item .crop-stats { font-size: 11px; color: var(--soil-mid); }
.crop-item .crop-kcal  { font-size: 11px; font-weight: bold; color: var(--gold); }
.crop-item .crop-store { font-size: 10px; color: var(--rust); font-style: italic; }
.crop-item .crop-check {
  position: absolute; top: 8px; right: 8px;
  width: 17px; height: 17px; border-radius: 3px;
  background: var(--green-dark); color: white; font-size: 10px;
  display: none; align-items: center; justify-content: center;
}
.crop-item.selected .crop-check { display: flex; }

/* -- Split Sliders ----------------------------------------------------- */
.split-row {
  display: grid; grid-template-columns: 190px 1fr 58px;
  align-items: center; gap: 14px;
  padding: 10px 14px; background: white;
  border-radius: var(--radius); border: 1px solid var(--parchment-dark);
  margin-bottom: 8px;
}
.split-row .split-name { font-size: 13px; font-weight: bold; color: var(--soil); }
.split-row input[type=range] { width: 100%; accent-color: var(--green-dark); cursor: pointer; }
.split-row .split-pct { font-size: 16px; font-weight: bold; color: var(--green-dark); text-align: right; font-family: var(--font-heading); }
.split-total {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: var(--radius);
  font-weight: bold; font-size: 15px; margin-top: 12px;
  transition: background 0.3s;
}
.split-total.ok    { background: var(--success-bg); color: var(--green-dark); border: 1px solid var(--success-border); }
.split-total.over  { background: var(--error-bg);   color: var(--rust);       border: 1px solid var(--error-border); }
.split-total.under { background: var(--warning-bg); color: var(--gold);       border: 1px solid var(--warning-border); }

.surplus-card {
  padding: 18px; background: var(--gold-pale);
  border-radius: var(--radius); border: 1px solid var(--gold); margin-top: 20px;
}
.surplus-card h4 { font-family: var(--font-heading); font-size: 15px; color: var(--soil); margin-bottom: 12px; }
.surplus-options { display: flex; gap: 10px; flex-wrap: wrap; }
.surplus-btn {
  padding: 8px 18px; border-radius: var(--radius);
  border: 2px solid var(--gold); background: white;
  font-size: 14px; font-weight: bold; color: var(--gold);
  cursor: pointer; transition: background 0.2s, color 0.2s;
}
.surplus-btn:hover, .surplus-btn.active { background: var(--gold); color: white; }
.surplus-custom { display: flex; align-items: center; gap: 8px; }
.surplus-custom input { width: 70px; padding: 7px 10px; border: 2px solid var(--gold); border-radius: var(--radius); font-size: 14px; font-weight: bold; text-align: center; }

/* -- Alert Boxes ------------------------------------------------------- */
.alert {
  padding: 13px 16px; border-radius: var(--radius);
  font-size: 14px; line-height: 1.6; margin-bottom: 18px;
  display: flex; gap: 12px; align-items: flex-start;
}
.alert .alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.alert.warning { background: var(--warning-bg); border: 1px solid var(--warning-border); color: #5A4000; }
.alert.error   { background: var(--error-bg);   border: 1px solid var(--error-border);   color: var(--rust); }
.alert.success { background: var(--success-bg); border: 1px solid var(--success-border); color: var(--green-dark); }
.alert.info    { background: var(--green-light); border: 1px solid var(--green);         color: var(--green-dark); }
.alert strong  { display: block; margin-bottom: 2px; font-size: 14px; }

/* -- Results ----------------------------------------------------------- */
.results-banner {
  border-radius: var(--radius-lg); padding: 28px 32px;
  margin-bottom: 28px; text-align: center;
}
.results-banner.surplus  { background: linear-gradient(135deg, var(--green-dark), var(--green)); color: white; }
.results-banner.shortfall{ background: linear-gradient(135deg, var(--rust), #C05020); color: white; }
.results-banner .banner-num { font-family: var(--font-heading); font-size: 44px; font-weight: bold; line-height: 1; margin-bottom: 6px; }
.results-banner .banner-lbl { font-size: 14px; opacity: 0.85; margin-bottom: 16px; }
.results-banner .banner-stats { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.results-banner .b-stat { font-size: 13px; opacity: 0.9; }
.results-banner .b-stat strong { display: block; font-size: 20px; }

.results-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.results-table th {
  background: var(--soil); color: var(--parchment);
  padding: 9px 12px; text-align: left;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap;
}
.results-table th.r { text-align: right; }
.results-table td { padding: 9px 12px; border-bottom: 1px solid var(--parchment-dark); vertical-align: top; }
.results-table td.r { text-align: right; font-family: var(--font-heading); }
.results-table tr:nth-child(even) td { background: var(--light-grey); }
.results-table tr:hover td { background: var(--green-light); }
.results-table .final-qty { font-weight: bold; color: var(--green-dark); font-size: 14px; }
.results-table .compound  { color: var(--rust); font-weight: bold; }
.results-table .store-warn{ color: var(--gold); font-size: 11px; font-style: italic; }
.results-table .risk-high { color: var(--rust); font-size: 11px; font-weight: bold; }

/* -- Sowing Calendar --------------------------------------------------- */
.cal-wrap { overflow-x: auto; }
.cal-grid {
  display: grid;
  grid-template-columns: 150px repeat(12, 1fr);
  gap: 2px; font-size: 11px; min-width: 700px;
}
.cal-hdr  { background: var(--soil); color: var(--parchment); padding: 6px 3px; text-align: center; font-weight: bold; border-radius: 3px; font-size: 10px; }
.cal-crop { background: var(--linen); padding: 6px 8px; font-size: 12px; font-weight: bold; color: var(--soil); border-radius: 3px; display: flex; align-items: center; }
.cal-cell { border-radius: 3px; padding: 4px 2px; text-align: center; font-size: 10px; font-weight: bold; }
.cal-sow     { background: var(--green);      color: white; }
.cal-plant   { background: var(--green-dark); color: white; }
.cal-harvest { background: var(--gold);       color: white; }
.cal-store   { background: var(--rust);       color: white; }
.cal-empty   { background: var(--light-grey); }
.cal-legend  { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.cal-leg-item{ display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--soil-mid); }
.cal-leg-dot { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }

/* -- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 26px; border-radius: var(--radius);
  font-family: var(--font-body); font-size: 15px; font-weight: bold;
  cursor: pointer; border: 2px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
  text-decoration: none; line-height: 1; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: #f20c0c;
    color: white;
    border-color: #ecba0c;
}
.btn-primary:hover { background: var(--green); border-color: var(--green); }
.btn-secondary { background: transparent; color: var(--soil); border-color: var(--soil-mid); }
.btn-secondary:hover { background: var(--parchment-dark); }
.btn-gold      { background: var(--gold); color: white; border-color: var(--gold); }
.btn-gold:hover{ background: #A07008; border-color: #A07008; }
.btn-rust      { background: var(--rust); color: white; border-color: var(--rust); }
.btn-lg { padding: 14px 34px; font-size: 17px; }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-row {
  display: flex; gap: 12px; align-items: center;
  margin-top: 28px; padding-top: 22px;
  border-top: 1px solid var(--parchment-dark); flex-wrap: wrap;
}

/* -- Home page intro --------------------------------------------------- */
.intro-hero {
  text-align: center; max-width: 820px;
  margin: 0 auto 44px; padding-top: 8px;
}
.intro-hero h2 {
  font-family: var(--font-heading);
  font-size: 38px; color: var(--soil); font-weight: bold;
  margin-bottom: 18px; line-height: 1.2;
}
.intro-hero h2 em { color: var(--green-dark); font-style: normal; }
.intro-hero p { font-size: 16px; color: var(--soil-light); line-height: 1.85; margin-bottom: 16px; }
.intro-hero .cta-wrap { margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.intro-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 44px; }
.intro-stat {
  background: var(--linen); border-radius: var(--radius-lg);
  padding: 24px; text-align: center;
  border: 1px solid var(--parchment-dark); box-shadow: var(--shadow);
}
.intro-stat .stat-icon  { font-size: 34px; margin-bottom: 10px; }
.intro-stat .stat-num   { font-family: var(--font-heading); font-size: 30px; font-weight: bold; color: var(--green-dark); line-height: 1; margin-bottom: 6px; }
.intro-stat .stat-label { font-size: 13px; color: var(--soil-mid); }

.how-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 6px; }
.how-item {
  background: white; border-radius: var(--radius-lg);
  padding: 20px; border: 1px solid var(--parchment-dark);
  display: flex; flex-direction: column; gap: 8px;
}
.how-item .how-num  { font-family: var(--font-heading); font-size: 28px; font-weight: bold; color: var(--gold); line-height: 1; }
.how-item .how-title{ font-size: 14px; font-weight: bold; color: var(--soil); }
.how-item .how-desc { font-size: 13px; color: var(--soil-mid); line-height: 1.5; }

/* -- Site Footer ------------------------------------------------------- */
.site-footer {
  background: #000000;
  color: var(--mid-grey);
  padding: 18px var(--gutter);
  border-top: 3px solid var(--gold);
}
.site-footer .inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.site-footer p  { font-size: 12px; }
.site-footer a  { color: var(--gold-light); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* -- Print ------------------------------------------------------------- */
@media print {
  .site-header .inner { padding: 12px; }
  .progress-bar, .btn-row, .site-footer, .no-print, .tab-bar { display: none !important; }
  body { background: white; font-size: 12px; }
  .page-wrap { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; margin-bottom: 14px; }
  .results-table th { background: #333 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tab-panel { display: block !important; }
}

/* -- Responsive -------------------------------------------------------- */
@media (max-width: 1200px) { :root { --gutter: 24px; } }

@media (max-width: 960px) {
  .form-grid.three, .form-grid.four { grid-template-columns: 1fr 1fr; }
  .intro-stats { grid-template-columns: 1fr 1fr; }
  .split-row { grid-template-columns: 150px 1fr 50px; }
  .site-logo .name { font-size: 21px; }
}

@media (max-width: 768px) {
  :root { --gutter: 16px; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .zone-grid { grid-template-columns: 1fr 1fr; }
  .people-row { grid-template-columns: 30px 1fr auto; }
  .people-row .kcal-label { display: none; }
  .animal-row { grid-template-columns: 32px 1fr 80px; }
  .animal-row .net-cal { display: none; }
  .split-row { grid-template-columns: 1fr 50px; }
  .split-row input[type=range] { grid-column: 1 / -1; margin-top: -4px; }
  .page-title h2 { font-size: 22px; }
  .results-banner .banner-num { font-size: 32px; }
  .intro-hero h2 { font-size: 26px; }
  .intro-stats { grid-template-columns: 1fr; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}

@media (max-width: 480px) {
  .zone-grid { grid-template-columns: 1fr; }
  .crop-grid { grid-template-columns: 1fr 1fr; }
  .activity-grid { grid-template-columns: 1fr 1fr; }
  .tab-btn { padding: 8px 12px; font-size: 12px; }
  .site-logo .name { font-size: 17px; }
  .site-header-icon { display: none; }
  .intro-hero h2 { font-size: 22px; }
  .wild-row { grid-template-columns: 1fr; }
}
