/* SUBSISTENCE ENGINE — VaultBBS Theme */
/* High-contrast: white panels, black text, green/amber accents */

:root {
  --phosphor: #00aa30;
  --phosphor-dim: #007020;
  --phosphor-bright: #00cc40;
  --void: #050505;
  --void-light: #f5f5f0;
  --void-mid: #e8e8e0;
  --amber: #cc8800;
  --amber-dim: #996a00;
  --red: #cc2222;
  --red-dim: #ffcccc;
  --blue: #0066aa;
  --blue-dim: #cce0f0;
  --border: #ccccbb;
  --border-bright: #00aa30;
  --text: #111111;
  --text-dim: #555555;
  --text-bright: #000000;
  --bg: #e8e8e0;
  --bg-light: #f5f5f0;
  --bg-mid: #e0e0d8;
  --bg-hover: #d0d0c8;
  --font-mono: "IBM VGA 8x16", "Px4xat Amstrad PC1512", "Courier New", monospace;
  --font-size: 16px;
  --line-height: 1.5;
  --macro-starch: #00aa30;
  --macro-protein: #cc8800;
  --macro-fat: #cc2222;
  --macro-vitamin: #0066aa;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--font-size);
  line-height: var(--line-height);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle scanline overlay (lighter for high-contrast) */
body::after {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.03) 0px,
    rgba(0, 0, 0, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 9999;
}

/* No glow on high-contrast */
body {
  text-shadow: none;
}

/* ===== BOOT SEQUENCE ===== */
#boot-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #ffffff;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  overflow: hidden;
}

#boot-screen .boot-line {
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.15s, transform 0.15s;
  white-space: pre;
  font-size: 16px;
}

#boot-screen .boot-line.visible {
  opacity: 1;
  transform: translateY(0);
}

#boot-screen .boot-line.error {
  color: var(--red);
}

#boot-screen .boot-line.ok {
  color: var(--phosphor);
}

#boot-screen .boot-line.header {
  color: var(--amber);
  font-size: 16px;
}

#boot-screen .boot-progress {
  color: var(--phosphor);
  font-size: 16px;
}

/* ===== MAIN APP ===== */
#app {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px;
}

#app.active {
  display: block;
}

/* ===== HEADER ===== */
.header {
  border: 1px solid var(--border);
  background: var(--void-light);
  padding: 8px 16px;
  margin-bottom: 10px;
}

.header h1 {
  font-size: 20px;
  color: var(--amber);
  text-shadow: none;
  margin: 0;
  letter-spacing: 2px;
}

.header .version {
  font-size: 15px;
  color: var(--text-dim);
  float: right;
}

/* ===== NAV ===== */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  padding: 4px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-btn {
  background: #ffffff;
  color: #333333;
  border: 1px solid var(--border);
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: var(--font-size);
  cursor: pointer;
  transition: all 0.1s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-btn:hover {
  background: var(--bg-hover);
  color: #000000;
  border-color: var(--border-bright);
}

.nav-btn.active {
  background: var(--phosphor);
  color: #ffffff;
  border-color: var(--phosphor);
  text-shadow: none;
}

/* ===== PANELS ===== */
.panel {
  border: 1px solid var(--border);
  background: var(--void-light);
  padding: 12px;
  margin-bottom: 10px;
}

.panel-header {
  color: var(--amber);
  font-size: 18px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}

.panel-header::before {
  content: "> ";
  color: var(--phosphor);
}

/* ===== FORMS ===== */
label {
  display: block;
  color: var(--text-dim);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
  margin-top: 8px;
}

input[type="number"],
input[type="text"],
select {
  background: #ffffff;
  color: #111111;
  border: 1px solid var(--border);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: var(--font-size);
  width: 100%;
  max-width: 200px;
  outline: none;
  transition: border-color 0.15s;
}

input:focus, select:focus {
  border-color: var(--phosphor);
  box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  max-width: 300px;
  height: 8px;
  background: #cccccc;
  outline: none;
  margin: 8px 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--phosphor);
  border-radius: 0;
  cursor: pointer;
  border: 2px solid #004415;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--phosphor);
  border-radius: 0;
  cursor: pointer;
  border: 2px solid #004415;
}

/* ===== BUTTONS ===== */
.btn {
  background: #ffffff;
  color: #000000;
  border: 1px solid var(--border-bright);
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 16px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.1s;
}

.btn:hover {
  background: #e0e0e0;
  color: #000000;
  border-color: var(--phosphor);
}

.btn:active {
  background: var(--phosphor);
  color: #000000;
}

.btn-danger {
  border-color: var(--red-dim);
  color: var(--red);
  background: #ffffff;
}

.btn-danger:hover {
  border-color: var(--red);
  background: var(--red-dim);
  color: #ffffff;
}

.btn-amber {
  border-color: var(--amber-dim);
  color: #000000;
  background: var(--amber);
}

.btn-amber:hover {
  border-color: var(--amber);
  background: #e6a300;
  color: #000000;
}

/* ===== MEMBER LIST ===== */
.member-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  padding: 8px;
  border: 1px solid var(--border);
  margin-bottom: 4px;
  background: #ffffff;
}

.member-row .field {
  display: flex;
  flex-direction: column;
}

.member-row label {
  margin-top: 0;
  font-size: 16px;
}

.member-row input, .member-row select {
  max-width: 120px;
}

/* ===== PROGRESS BARS ===== */
.progress-bar {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0;
  white-space: pre;
  color: var(--phosphor);
}

.progress-bar .pct {
  color: var(--amber);
}

.progress-bar.gap .pct {
  color: var(--red);
}

/* ===== ALARM ===== */
.alarm {
  background: rgba(200, 0, 0, 0.08);
  border: 1px solid var(--red);
  color: var(--red);
  padding: 8px 12px;
  margin: 8px 0;
  font-size: 16px;
  animation: alarm-flash 1.5s ease-in-out infinite;
}

.alarm::before {
  content: "⚠ ";
}

@keyframes alarm-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Fat gap alarm — flashing amber */
.alarm-fat {
  background: rgba(200, 130, 0, 0.1);
  border: 2px solid var(--amber);
  color: var(--amber);
  padding: 10px 14px;
  margin: 8px 0;
  font-size: 16px;
  animation: alarm-fat-flash 1s ease-in-out infinite;
  text-shadow: none;
}

.alarm-fat::before {
  content: "⚠ ";
}

@keyframes alarm-fat-flash {
  0%, 100% { opacity: 1; border-color: var(--amber); color: var(--amber); }
  50% { opacity: 0.6; border-color: var(--red); color: var(--red); }
}

/* ===== CROP ALLOCATION ===== */
.crop-item {
  border: 1px solid var(--border);
  padding: 8px;
  margin-bottom: 6px;
  background: #ffffff;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.crop-item .crop-name {
  color: #006622;
  min-width: 160px;
  font-size: 16px;
  font-weight: bold;
}

.crop-item .crop-stats {
  color: var(--text-dim);
  font-size: 14px;
  flex: 1;
}

.crop-item .crop-remove {
  cursor: pointer;
  color: var(--red);
  border: none;
  background: none;
  font-family: var(--font-mono);
  font-size: 15px;
  padding: 2px 6px;
}

.crop-item .crop-remove:hover {
  
color: #006622;
  font-weight: bold;
  background: var(--red-dim);
}

/* Diet preference slider area */
.diet-slider {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}

.diet-slider .slider-label {
  min-width: 140px;
  color: var(--text-dim);
  font-size: 16px;
  text-transform: uppercase;
}

.diet-slider .slider-value {
  color: var(--amber);
  min-width: 50px;
  text-align: right;
  font-size: 16px;
}

/* ===== STACKED BAR ===== */
.stacked-bar {
  display: flex;
  height: 24px;
  width: 100%;
  background: #dddddd;
  border: 1px solid var(--border);
  overflow: hidden;
}

.stacked-bar .bar-segment {
  height: 100%;
  transition: width 0.3s;
  position: relative;
  min-width: 2px;
}

.stacked-bar .bar-segment:hover {
  opacity: 0.8;
}

.stacked-bar .bar-gap {
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 4px,
    rgba(255, 51, 51, 0.3) 4px,
    rgba(255, 51, 51, 0.3) 8px
  );
}

/* ===== TIMELINE ===== */
.timeline-year {
  border: 1px solid var(--border);
  padding: 8px;
  margin-bottom: 6px;
  background: #ffffff;
}

.timeline-year .year-label {
  color: var(--amber);
  font-size: 15px;
  margin-bottom: 4px;
}

.timeline-year .year-stats {
  font-size: 16px;
  color: var(--text-dim);
}

/* ===== SEASONAL FLOW ===== */
.month-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}

.month-bar .month-label {
  min-width: 32px;
  color: var(--text-dim);
  font-size: 16px;
}

.month-bar .month-fill {
  height: 16px;
  background: var(--phosphor-dim);
  transition: width 0.3s;
  position: relative;
}

.month-bar .month-fill.hunger {
  background: var(--red-dim);
}

.month-bar .month-value {
  color: var(--text-dim);
  font-size: 15px;
  min-width: 60px;
}

/* ===== ANIMAL ROW ===== */
.animal-row {
  border: 1px solid var(--border);
  padding: 8px;
  margin-bottom: 6px;
  background: #ffffff;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.animal-row .animal-name {
  color: var(--amber);
  min-width: 140px;
  font-size: 16px;
}

.animal-row .animal-stats {
  color: var(--text-dim);
  font-size: 15px;
  flex: 1;
}

/* ===== ROTATION TABLE ===== */
.rotation-year {
  border: 1px solid var(--border);
  padding: 6px;
  margin-bottom: 4px;
  background: #ffffff;
}

.rotation-year .ry-label {
  color: var(--amber);
  font-size: 16px;
}

.rotation-family {
  display: inline-block;
  padding: 2px 6px;
  margin: 2px;
  font-size: 15px;
  border: 1px solid var(--border);
  background: var(--void-mid);
}

/* ===== WHAT-IF ===== */
.what-if-card {
  border: 1px solid var(--amber-dim);
  padding: 12px;
  margin-bottom: 8px;
  background: rgba(255, 176, 0, 0.05);
}

.what-if-card .scenario-title {
  color: var(--amber);
  font-size: 16px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

/* ===== SCREENS ===== */
.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #ffffff;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border: 1px solid var(--border-bright);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--phosphor-dim);
}

/* ===== TWO-COLUMN LAYOUT ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
  }
  
  .member-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .member-row input, .member-row select {
    max-width: 100%;
  }
  
  .nav-btn {
    font-size: 16px;
    padding: 4px 8px;
  }
}

/* ===== SUMMARY STATS ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.stat-box {
  border: 1px solid var(--border);
  padding: 8px;
  background: #ffffff;
}

.stat-box .stat-label {
  font-size: 16px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-box .stat-value {
  font-size: 18px;
  
color: #006622;
  font-weight: bold;
  margin-top: 2px;
}

.stat-box .stat-value.amber {
  color: var(--amber);
}

.stat-box .stat-value.red {
  color: var(--red);
}

.stat-box .stat-value.blue {
  color: var(--blue);
}

/* ===== DROPDOWN ===== */
.dropdown-container {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  border: 1px solid var(--phosphor);
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  min-width: 300px;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.dropdown-content.open {
  display: block;
}

.dropdown-item {
  padding: 6px 10px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.1s;
  border-bottom: 1px solid var(--border);
}

.dropdown-item:hover {
  background: var(--bg-hover);
  
color: #006622;
  font-weight: bold;
}

.dropdown-item .item-name {
  color: var(--phosphor);
}

.dropdown-item .item-meta {
  color: var(--text-dim);
  font-size: 16px;
}

.dropdown-item .item-score {
  color: var(--amber);
  float: right;
}

/* ===== TOOLTIP ===== */
.tooltip {
  position: relative;
}

.tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid var(--phosphor);
  color: var(--phosphor);
  padding: 4px 8px;
  font-size: 15px;
  white-space: nowrap;
  z-index: 200;
  pointer-events: none;
}

/* ===== CURSOR BLINK ===== */
.cursor-blink::after {
  content: "█";
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===== NPK BADGE ===== */
.npk-badge {
  display: inline-block;
  font-size: 16px;
  color: var(--amber);
  background: var(--void-mid);
  border: 1px solid var(--amber-dim);
  padding: 1px 4px;
  margin-left: 4px;
  letter-spacing: 0;
}

.npk-positive { color: var(--phosphor); }
.npk-negative { color: var(--red); }
.npk-zero { color: var(--text-dim); }

/* ===== CLOSED LOOP TOGGLE ===== */
.closed-loop-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  margin-bottom: 8px;
}

.closed-loop-toggle .toggle-label {
  color: var(--amber);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.toggle-switch {
  position: relative;
  width: 40px;
  height: 20px;
  background: var(--void-mid);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-switch.on {
  background: var(--phosphor-dim);
  border-color: var(--phosphor);
}

.toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: var(--text-dim);
  transition: all 0.2s;
}

.toggle-switch.on::after {
  left: 22px;
  background: var(--phosphor-bright);
}

/* ===== FEED TAG ===== */
.feed-tag {
  display: inline-block;
  background: var(--amber-dim);
  color: var(--amber);
  font-size: 16px;
  padding: 1px 4px;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid var(--amber);
}

/* ===== NPK BAR ===== */
.npk-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.npk-bar .npk-label {
  min-width: 16px;
  color: var(--text-dim);
  font-size: 16px;
  font-weight: bold;
}

.npk-bar .npk-track {
  flex: 1;
  height: 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.npk-bar .npk-fill {
  height: 100%;
  transition: width 0.3s;
}

.npk-bar .npk-balance {
  min-width: 80px;
  text-align: right;
  font-size: 15px;
}

/* ===== GRAZING SCHEDULE ===== */
.grazing-grid {
  display: grid;
  grid-template-columns: 140px repeat(12, 1fr);
  gap: 1px;
  font-size: 15px;
  overflow-x: auto;
}

.grazing-cell {
  padding: 3px 2px;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--border);
}

.grazing-cell.header {
  color: var(--amber);
  background: var(--void-mid);
  font-size: 16px;
}

.grazing-cell.active {
  background: var(--phosphor-dim);
  
color: #006622;
  font-weight: bold;
}

.grazing-cell .deposited {
  font-size: 9px;
  color: var(--text-dim);
}

/* ===== BUTCHERING TABLE ===== */
.butchering-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
}

.butchering-row .animal-icon {
  font-size: 16px;
}

/* ===== COVER CROP ROW ===== */
.cover-crop-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.cover-crop-row .cc-name {
  color: var(--phosphor);
  min-width: 140px;
  font-size: 16px;
}

.cover-crop-row .cc-npk {
  color: var(--text-dim);
  font-size: 15px;
}

/* ===== SOIL MINING ALARM ===== */
.alarm.soil-mining {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(255, 176, 0, 0.08);
}

.alarm.soil-mining::before {
  content: "⛏ ";
}

.alarm.soil-positive {
  border-color: var(--phosphor);
  color: var(--phosphor);
  background: rgba(0, 120, 40, 0.06);
}

.alarm.soil-positive::before {
  content: "✓ ";
}

/* ===== SELF-SUFFICIENT BADGE ===== */
.self-sufficient {
  display: inline-block;
  background: rgba(0, 120, 40, 0.08);
  color: var(--phosphor);
  font-size: 9px;
  padding: 1px 4px;
  border: 1px solid var(--phosphor-dim);
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== MOBILE GRAZING ICON ===== */
.grazing-icon {
  font-size: 15px;
  margin-right: 4px;
}

/* ===== SEASONAL FLOW SCREEN ===== */
.seasonal-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
  font-size: 16px;
}
.seasonal-month {
  min-width: 36px;
  font-size: 15px;
  color: var(--text-dim);
  font-weight: bold;
  text-align: right;
}
.seasonal-month.hunger-amber {
  color: var(--amber);
}
.seasonal-month.hunger-red {
  color: var(--red);
  text-shadow: none;
}
.seasonal-bar-track {
  position: relative;
  width: 320px;
  height: 18px;
  background: var(--void-light);
  border: 1px solid var(--border);
  display: flex;
  overflow: hidden;
}
.seasonal-bar-seg {
  height: 100%;
  transition: width 0.3s;
}
.seasonal-need-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--amber);
  z-index: 2;
}
.seasonal-val {
  min-width: 70px;
  text-align: right;
  font-size: 15px;
  color: var(--text-dim);
}
.seasonal-val.deficit {
  color: var(--red);
}
.seasonal-surplus {
  min-width: 90px;
  font-size: 16px;
}
.seasonal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 16px;
  margin-top: 6px;
  padding: 4px 0;
  border-top: 1px solid var(--border);
}

/* Storage curve */
.seasonal-store-track {
  position: relative;
  width: 200px;
  height: 16px;
  background: var(--void-light);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
}
.seasonal-store-zero {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--text-dim);
}
.seasonal-store-fill {
  position: absolute;
  top: 1px;
  bottom: 1px;
  height: 14px;
  transition: width 0.3s;
}
.seasonal-store-fill.pos {
  left: 50%;
  background: var(--phosphor-dim);
  border-right: 1px solid var(--phosphor);
}
.seasonal-store-fill.neg {
  right: 50%;
  background: var(--red-dim);
  border-left: 1px solid var(--red);
}

/* Monthly breakdown */
.seasonal-breakdown-track {
  position: relative;
  width: 320px;
  height: 16px;
  background: var(--void-light);
  border: 1px solid var(--border);
  display: flex;
  overflow: hidden;
}
.seasonal-bd-fresh {
  height: 100%;
  background: var(--phosphor);
  opacity: 0.8;
}
.seasonal-bd-store {
  height: 100%;
  background: var(--amber);
  opacity: 0.8;
}
.seasonal-bd-deficit {
  height: 100%;
  background: var(--red-dim);
  opacity: 0.6;
}

/* Timing bars (crops and animals) */
.seasonal-timing-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 15px;
}
.seasonal-timing-label {
  min-width: 130px;
  text-align: right;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.seasonal-timing-bar {
  display: flex;
  gap: 1px;
}
.seasonal-timing-cell {
  width: 22px;
  height: 18px;
  border: 1px solid var(--border);
  text-align: center;
  font-size: 9px;
  line-height: 18px;
  color: var(--text-dim);
  background: var(--void-light);
}
.seasonal-timing-cell.active {
  color: var(--void);
  font-weight: bold;
}
.seasonal-timing-cell.active.low {
  opacity: 0.5;
}
.seasonal-timing-cell.active.med {
  opacity: 0.7;
}
.seasonal-timing-cell.active.high {
  opacity: 1;
}
.seasonal-timing-val {
  min-width: 80px;
  font-size: 16px;
  color: var(--text-dim);
}
.seasonal-timing-kcal {
  min-width: 80px;
  font-size: 16px;
  color: var(--text-dim);
  text-align: right;
}

/* ===== ROTATION SCREEN ===== */
.rotation-grid {
  overflow-x: auto;
  margin-bottom: 12px;
}
.rotation-grid-row {
  display: flex;
  gap: 1px;
  margin-bottom: 1px;
}
.rotation-grid-row.header {
  font-size: 16px;
  font-weight: bold;
  color: var(--amber);
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  margin-bottom: 4px;
}
.rotation-grid-cell {
  min-width: 100px;
  padding: 4px 6px;
  font-size: 16px;
  background: var(--void-light);
  border: 1px solid var(--border);
  text-align: center;
  line-height: 1.3;
}
.rotation-grid-cell.field-label {
  min-width: 120px;
  text-align: left;
  background: #ffffff;
  border-right: 1px solid var(--amber-dim);
}
.rotation-field-name {
  color: var(--text);
  font-size: 15px;
  font-weight: bold;
}
.rotation-field-sqft {
  color: var(--text-dim);
  font-size: 9px;
}

/* Companion planting */
.companion-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 16px;
}
.companion-crop-name {
  color: var(--amber);
  font-weight: bold;
  min-width: 100px;
}
.companion-tag {
  font-size: 16px;
  padding: 1px 4px;
  border-radius: 2px;
  margin: 0 2px;
}
.companion-tag.good {
  background: rgba(0, 120, 40, 0.1);
  color: var(--phosphor);
  border: 1px solid var(--phosphor-dim);
}
.companion-tag.bad {
  background: rgba(255, 51, 51, 0.15);
  color: var(--red);
  border: 1px solid var(--red-dim);
}
.companion-name {
  color: var(--text-dim);
  font-size: 15px;
}
.companion-name.allocated {
  color: var(--phosphor);
}
.companion-name.active-antagonist {
  color: var(--red);
  font-weight: bold;
}

/* Cover crop slots */
.cover-slot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 16px;
}
.cover-slot-field {
  color: var(--text);
  min-width: 80px;
}
.cover-slot-year {
  color: var(--amber);
  min-width: 40px;
}
.cover-slot-crop {
  min-width: 120px;
}
.cover-slot-npk {
  color: var(--text-dim);
  font-size: 16px;
}
.cover-slot-sqft {
  color: var(--text-dim);
  font-size: 16px;
}

/* Family legend */
.family-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 16px;
}
.family-legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid;
  border-radius: 2px;
}
.family-legend-name {
  min-width: 80px;
  font-weight: bold;
  font-size: 15px;
}
.family-legend-desc {
  color: var(--text-dim);
  font-size: 16px;
}

/* ===== NUTRIENT SCREEN: CROP EXTRACTION ROWS ===== */
.crop-extraction-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
}

.crop-extraction-row .ce-name {
  min-width: 120px;
  font-size: 16px;
}

.crop-extraction-row .ce-n,
.crop-extraction-row .ce-p,
.crop-extraction-row .ce-k {
  min-width: 80px;
  font-size: 16px;
}

.legume-fix-note {
  color: var(--phosphor-dim);
  font-size: 16px;
  font-style: italic;
}

.crop-extraction-row .ce-residue {
  font-size: 16px;
  flex-basis: 100%;
  margin-left: 126px;
}

/* ===== NUTRIENT SCREEN: N-P-K BUDGET ROWS ===== */
.npk-budget-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 16px;
}

.npk-budget-row .npk-label {
  min-width: 20px;
  font-weight: bold;
  font-size: 15px;
}

.npk-budget-row .npk-ext {
  min-width: 60px;
  text-align: right;
  color: var(--text-dim);
  font-size: 15px;
}

.npk-bar-track {
  flex: 1;
  height: 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  overflow: hidden;
}

.npk-bar-fill.extract {
  height: 100%;
}

.npk-bar-fill.return {
  height: 100%;
}

.npk-budget-row .npk-balance-val {
  min-width: 80px;
  text-align: right;
  font-size: 16px;
  font-weight: bold;
}

.npk-legend {
  margin-top: 6px;
  font-size: 15px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== NUTRIENT SCREEN: N SOURCE ROWS ===== */
.n-source-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 16px;
}

.n-source-row .n-source-label {
  min-width: 130px;
  color: var(--text-dim);
  font-size: 15px;
}

.n-source-track {
  flex: 1;
  height: 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  overflow: hidden;
}

.n-source-fill {
  height: 100%;
}

.n-source-row .n-source-val {
  min-width: 60px;
  text-align: right;
  font-size: 15px;
}

.n-source-row .n-source-pct {
  min-width: 36px;
  text-align: right;
  color: var(--text-dim);
  font-size: 15px;
}

.n-source-labor {
  font-size: 15px;
}

/* ===== NUTRIENT SCREEN: COVER CROP SQFT FIELDS ===== */
.cc-sqft-field {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cc-sqft-field label {
  margin: 0;
  font-size: 16px;
}

.cc-sqft-field input {
  margin: 0;
}

/* ===== NUTRIENT SCREEN: MANURE CARDS ===== */
.manure-card {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
}

.manure-card .mc-name {
  min-width: 160px;
  color: var(--amber);
  font-size: 16px;
}

.manure-card .mc-npk {
  color: var(--text-dim);
  font-size: 15px;
}

.manure-card .mc-cn {
  color: var(--text-dim);
  font-size: 15px;
}

.manure-card .mc-heat {
  font-size: 16px;
  padding: 1px 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.manure-card .mc-heat.hot {
  color: var(--red);
  border: 1px solid var(--red-dim);
  background: rgba(255, 51, 51, 0.08);
}

.manure-card .mc-heat.cold {
  color: var(--phosphor);
  border: 1px solid var(--phosphor-dim);
  background: rgba(0, 120, 40, 0.06);
}

.manure-card .mc-note {
  color: var(--text-dim);
  font-size: 16px;
  flex-basis: 100%;
  margin-left: 0;
}

/* ===== NUTRIENT SCREEN: COMPOST RECIPES ===== */
.compost-recipe {
  border: 1px solid var(--border);
  padding: 10px;
  margin-bottom: 8px;
  background: #ffffff;
}

.compost-recipe .cr-name {
  font-size: 15px;
  margin-bottom: 4px;
}

.compost-recipe .cr-mix {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 4px;
}

.compost-recipe .cr-meta {
  display: flex;
  gap: 12px;
  font-size: 15px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.compost-recipe .cr-note {
  font-size: 16px;
  color: var(--text-dim);
  font-style: italic;
}

.compost-labor-table {
  font-size: 15px;
}

.clt-row {
  display: flex;
  gap: 12px;
  padding: 2px 0;
  border-bottom: 1px solid var(--border);
}

.clt-row .clt-name {
  min-width: 180px;
  color: var(--amber);
}

.clt-row .clt-time {
  min-width: 100px;
  color: var(--text-dim);
}

.clt-row .clt-labor {
  color: var(--text-dim);
}

/* ===== GRAZING CELL STATES ===== */
.grazing-cell.disabled {
  color: var(--void-mid);
  cursor: default;
}

.grazing-cell.available {
  color: var(--text-dim);
  cursor: pointer;
  border-color: var(--border-bright);
}

.grazing-cell.available:hover {
  background: var(--phosphor-dim);
  color: var(--phosphor);
}

.grazing-cell .deposited {
  display: block;
  color: var(--phosphor-dim);
}

.grazing-label {
  text-align: left !important;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grazing-summary {
  border-top: 1px solid var(--border);
  padding-top: 6px;
}

/* ===== NUTRIENT SCREEN: RENDERNUTRIENTS CLASSES ===== */
.crop-npk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.crop-npk-name { min-width: 120px; font-weight: bold; }
.crop-npk-val { color: var(--amber); font-size: 15px; }

.return-source-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 16px;
}
.return-label { min-width: 140px; color: var(--text-dim); }
.return-bar-wrap {
  flex: 1;
  height: 10px;
  background: var(--void-mid);
  border: 1px solid var(--border);
  max-width: 200px;
}
.return-bar-fill {
  display: block;
  height: 100%;
  background: var(--phosphor);
}
.return-value { color: var(--phosphor); font-size: 15px; min-width: 120px; }

.grazing-row {
  display: flex;
  gap: 0;
}
.grazing-cell.animal-label {
  text-align: left;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 70px;
  color: var(--amber);
}
.grazing-cell.off-season {
  color: var(--void-mid);
  cursor: default;
}

.manure-card.owned {
  border-left: 2px solid var(--phosphor);
  padding-left: 6px;
}
.manure-type { min-width: 120px; color: var(--amber); font-size: 16px; font-weight: bold; }
.manure-npk { color: var(--text-dim); font-size: 15px; }
.manure-cn { color: var(--text-dim); font-size: 15px; }
.manure-heat {
  font-size: 16px;
  padding: 1px 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.manure-heat.hot {
  color: var(--red);
  border: 1px solid var(--red-dim);
  background: rgba(255, 51, 51, 0.08);
}
.manure-heat.warm {
  color: var(--amber);
  border: 1px solid var(--border);
  background: rgba(255, 176, 0, 0.08);
}
.manure-heat.cold {
  color: var(--phosphor);
  border: 1px solid var(--phosphor-dim);
  background: rgba(0, 120, 40, 0.06);
}
.manure-apply { color: var(--text-dim); font-size: 15px; }

.compost-recipe-card {
  border: 1px solid var(--border);
  padding: 10px;
  margin-bottom: 8px;
  background: #ffffff;
  font-size: 15px;
}
.compost-recipe-card.available {
  border-color: var(--phosphor-dim);
}
.compost-recipe-card.unavailable {
  opacity: 0.5;
}
.compost-recipe-card .recipe-icon { font-size: 16px; margin-right: 6px; }
.compost-recipe-card .recipe-name { color: var(--phosphor); font-weight: bold; }
.compost-recipe-card .recipe-ingredients { color: var(--text-dim); display: block; margin-top: 2px; }
.compost-recipe-card .recipe-result { color: var(--text-dim); display: block; margin-top: 2px; font-size: 16px; }

.alarm.vegan-path {
  background: rgba(0, 120, 40, 0.04);
  border-color: var(--phosphor-dim);
  color: var(--phosphor);
}
.alarm.vegan-path::before {
  content: "> ";
}

.npk-budget-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 15px;
}
.npk-budget-row .npk-label {
  min-width: 20px;
  font-weight: bold;
  font-size: 16px;
}
.npk-budget-row .npk-bar-wrap {
  position: relative;
  flex: 1;
  height: 14px;
  background: var(--void-mid);
  border: 1px solid var(--border);
  max-width: 200px;
}
.npk-budget-row .npk-bar-label {
  position: absolute;
  left: 4px;
  top: 0;
  font-size: 9px;
  line-height: 14px;
  color: var(--text-dim);
  z-index: 1;
}
.npk-budget-row .npk-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
}
.npk-budget-row .npk-balance {
  min-width: 60px;
  font-weight: bold;
  font-size: 16px;
  text-align: right;
}

/* ===== VEGAN COMPOST NOTE ===== */
.vegan-compost-note {
  font-size: 15px;
}

/* ===== PRINT ===== */
/* ===== NUTRIENT SCREEN: RETURN SOURCES ===== */
.return-source-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 16px;
}
.return-label {
  min-width: 140px;
  color: var(--text);
}
.return-bar-wrap {
  flex: 1;
  height: 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}
.return-bar-fill {
  height: 100%;
  transition: width 0.3s;
}
.return-value {
  min-width: 140px;
  text-align: right;
  font-size: 15px;
  color: var(--text-dim);
}

/* ===== NUTRIENT SCREEN: CROP N-P-K EXTRACTION ===== */
.crop-npk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
  padding: 3px 0;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
}
.crop-npk-name {
  min-width: 120px;
}
.crop-npk-val {
  color: var(--text-dim);
  font-size: 15px;
}

/* ===== NUTRIENT SCREEN: COVER CROP ENHANCED ===== */
.cover-crop-name {
  color: var(--phosphor);
  min-width: 140px;
  font-size: 16px;
}
.cover-crop-npk {
  color: var(--text-dim);
  font-size: 15px;
}
.cover-crop-season {
  color: var(--amber);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== NUTRIENT SCREEN: MANURE CARDS ENHANCED ===== */
.manure-card.owned {
  border-left: 3px solid var(--phosphor);
  background: rgba(0, 120, 40, 0.02);
}
.mc-apply {
  font-size: 16px;
  color: var(--text-dim);
}

/* ===== NUTRIENT SCREEN: COMPOST RECIPES ENHANCED ===== */
.compost-recipe.available {
  border-color: var(--phosphor-dim);
  background: rgba(0, 120, 40, 0.02);
}
.compost-recipe.unavailable {
  opacity: 0.5;
}
.recipe-icon {
  font-size: 16px;
  margin-right: 6px;
}
.recipe-name {
  color: var(--amber);
  font-size: 16px;
  display: block;
  margin-bottom: 2px;
}
.recipe-ingredients {
  color: var(--text);
  font-size: 16px;
  display: block;
  margin-bottom: 4px;
}
.recipe-result {
  color: var(--text-dim);
  font-size: 15px;
  display: block;
  margin-bottom: 2px;
}

/* ===== NUTRIENT SCREEN: VEGAN PATH ALARM ===== */
.alarm.vegan-path {
  border-color: var(--phosphor-dim);
  color: var(--phosphor);
}

/* ===== NUTRIENT SCREEN: NPK BAR WRAP ===== */
.npk-bar-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.npk-bar-label {
  font-size: 16px;
  color: var(--text-dim);
  min-width: 80px;
}
.npk-bar-fill {
  height: 8px;
  border-radius: 0;
  transition: width 0.3s;
}

/* ===== NUTRIENT SCREEN: GRAZING GRID ENHANCED ===== */
.grazing-cell.off-season {
  color: var(--text-dim);
  opacity: 0.3;
  cursor: default;
}
.grazing-cell.animal-label {
  text-align: left;
  color: var(--amber);
  font-size: 15px;
  white-space: nowrap;
}

/* ===== BIOREGION INTELLIGENCE PANEL ===== */
.bioregion-crop-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 0;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
}
.bioregion-grade {
  font-size: 16px;
  font-weight: bold;
  min-width: 24px;
  text-align: center;
}
.bioregion-name {
  min-width: 120px;
  color: var(--text);
}
.bioregion-cat {
  min-width: 60px;
  color: var(--text-dim);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.bioregion-score {
  min-width: 45px;
  text-align: right;
  color: var(--text-dim);
}
.bioregion-kcal {
  min-width: 75px;
  text-align: right;
  color: var(--phosphor);
  font-size: 15px;
}
.bioregion-kcalhr {
  min-width: 65px;
  text-align: right;
  color: var(--amber);
  font-size: 15px;
}
.bioregion-yield {
  min-width: 80px;
  text-align: right;
  color: var(--text-dim);
  font-size: 15px;
}
.bioregion-zone {
  min-width: 40px;
  color: var(--text-dim);
  font-size: 16px;
}
.bioregion-path-summary {
  margin-top: 8px;
}

@media print {
  body::after { display: none; }
  .nav { display: none; }
  .panel { break-inside: avoid; }
}

/* ===== BIOREGION MAP ===== */
.bioregion-map {
  background: #f5f5f0;
  border: 1px solid var(--border);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
}

/* ===== ZONE GRID ===== */
.zone-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.zone-btn {
  padding: 6px 14px;
  border: 2px solid var(--border);
  background: #ffffff;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s;
}

.zone-btn:hover {
  border-color: var(--phosphor);
  background: #f0f8f0;
}

.zone-btn.active {
  border-color: var(--phosphor);
  background: #00aa30;
  color: #ffffff;
  font-weight: bold;
}

/* ===== MEMBERS LIST ===== */
.members-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.member-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.member-row .btn-remove {
  align-self: center;
  margin-left: auto;
  padding: 4px 14px;
  font-size: 16px;
}

/* ===== NEEDS SUMMARY ===== */
.needs-summary {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: #f8f8f4;
}

.needs-title {
  color: var(--amber);
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 6px;
}

.needs-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
}

.needs-label {
  color: var(--text-dim);
}

.needs-val {
  font-weight: bold;
  color: var(--text);
}

.needs-annual {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 14px;
}

/* ===== ROTATION SCREEN ===== */
.rotation-families {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rotation-family-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
}

.rf-color {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  flex-shrink: 0;
}

.rf-name {
  font-weight: bold;
  font-size: 15px;
  min-width: 90px;
}

.rf-desc {
  color: var(--text-dim);
  font-size: 14px;
}

/* Rotation grid */
.rotation-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-x: auto;
}

.rotation-grid-header {
  display: flex;
  gap: 0;
  font-size: 13px;
  font-weight: bold;
  color: var(--text-dim);
  border-bottom: 2px solid var(--border);
  padding-bottom: 4px;
  margin-bottom: 4px;
}

.rotation-grid-row {
  display: flex;
  gap: 0;
}

.rg-field {
  min-width: 140px;
  max-width: 160px;
  padding: 4px 8px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rg-field-name {
  font-weight: bold;
  font-size: 14px;
}

.rg-field-sqft {
  font-size: 12px;
  color: var(--text-dim);
}

.rg-year {
  min-width: 100px;
  padding: 4px 8px;
  text-align: center;
}

.rg-cell {
  min-width: 100px;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 13px;
  background: #f0f0ea;
  border-bottom: 1px solid var(--border);
}

.rg-cell + .rg-cell {
  border-left: 1px solid var(--border);
}

.rg-crop {
  font-weight: bold;
  font-size: 14px;
}

.rg-family {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: capitalize;
}

.rg-cover {
  background: #f5f5f0;
  font-style: italic;
}

.rg-warning {
  background: #fff8e0;
}

.rg-critical {
  background: #ffe8e0;
}

.rg-warn {
  font-size: 12px;
}

.rg-empty {
  background: #fafaf5;
  color: var(--text-dim);
}

/* Antagonist warnings */
.antagonist-warning {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.aw-icon {
  color: #cc2222;
  font-size: 16px;
}

.aw-pair {
  font-weight: bold;
  color: #cc2222;
}

.aw-reason {
  color: var(--text-dim);
  font-size: 14px;
}

/* Companion rows */
.companion-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 15px;
}

.cr-icon {
  color: #006622;
  font-weight: bold;
}

.cr-pair {
  color: #006622;
  font-weight: bold;
}

/* ===== COMPARISON TABLE ===== */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 15px;
  margin-top: 8px;
}

.compare-th {
  background: var(--void-mid);
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  text-align: center;
  white-space: nowrap;
}

.compare-th.compare-baseline {
  color: var(--phosphor);
  border-right: 2px solid var(--phosphor-dim);
}

.compare-label {
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 14px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
  background: var(--void-light);
}

.compare-cell {
  padding: 6px 10px;
  border: 1px solid var(--border);
  text-align: center;
  background: #ffffff;
  font-size: 15px;
}

.compare-baseline-cell {
  background: rgba(0, 120, 40, 0.04);
  border-right: 2px solid var(--phosphor-dim);
  color: var(--phosphor);
  font-weight: bold;
}

.compare-better {
  background: rgba(0, 120, 40, 0.08);
  color: var(--phosphor);
  font-weight: bold;
}

.compare-worse {
  background: rgba(204, 34, 34, 0.08);
  color: var(--red);
  font-weight: bold;
}

.compare-delta {
  font-size: 12px;
  margin-top: 2px;
  letter-spacing: 0;
}

.compare-delta-positive {
  color: var(--phosphor);
}

.compare-delta-negative {
  color: var(--red);
}

@media (max-width: 768px) {
  .compare-table {
    font-size: 13px;
  }
  .compare-th,
  .compare-cell,
  .compare-label {
    padding: 4px 6px;
  }
}

/* ===== HUNGER GAP CALENDAR BAR ===== */
.hunger-gap-calendar {
  display: flex;
  gap: 3px;
  margin-bottom: 8px;
  align-items: stretch;
}

.hunger-gap-month {
  flex: 1;
  text-align: center;
  padding: 6px 2px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.hunger-gap-month.surplus {
  background: #00aa30;
  color: #ffffff;
  border: 1px solid #008822;
}

.hunger-gap-month.warning {
  background: #ffb000;
  color: #000000;
  border: 1px solid #dd9900;
}

.hunger-gap-month.deficit {
  background: #cc2222;
  color: #ffffff;
  border: 1px solid #ff4444;
}

.hunger-gap-stat {
  font-size: 16px;
  margin-top: 4px;
  padding: 6px;
  font-family: var(--font-mono);
}

.hunger-gap-stat.gap-yes {
  border: 1px solid #cc2222;
  background: rgba(204, 0, 0, 0.06);
  color: #cc2222;
}

.hunger-gap-stat.gap-no {
  border: 1px solid #00aa30;
  background: rgba(0, 120, 40, 0.06);
  color: #00aa30;
}

.harvest-marker {
  font-size: 9px;
  color: #ffffff;
  background: #0066aa;
  padding: 0 2px;
  line-height: 1;
  text-align: center;
  margin-top: 2px;
}

/* ===== DEPLETION CHART ===== */
.depletion-chart {
  position: relative;
  width: 100%;
  height: 180px;
  background: var(--void-light);
  border: 1px solid var(--border);
  overflow: hidden;
}

.depletion-month-labels {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.depletion-month-label {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-family: var(--font-mono);
  padding: 3px 0;
}

.depletion-values {
  display: flex;
  gap: 0;
  margin-bottom: 6px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.depletion-value {
  flex: 1;
  text-align: center;
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 2px 1px;
}

.depletion-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  margin-top: 4px;
}

/* ===== SEASONAL PRODUCTION NOTES ===== */
.seasonal-line {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}
.seasonal-line:last-child {
  border-bottom: none;
}
.sl-emoji {
  font-size: 16px;
}
.sl-name {
  font-weight: bold;
  color: var(--text);
}
.sl-count {
  color: var(--text-dim);
}

/* ===== BUTCHERING SCHEDULE ===== */
.butcher-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.butcher-row:last-child {
  border-bottom: none;
}
.butcher-header {
  font-family: var(--font-mono);
  font-size: 13px;
  margin-bottom: 4px;
  line-height: 1.5;
}
.bh-name {
  color: #885500;
  font-weight: bold;
}
.bh-count {
  color: var(--text-dim);
}
.bh-reason {
  color: #885500;
  font-size: 12px;
}
.butcher-bar {
  margin-left: 24px;
}
.butcher-month-labels,
.butcher-month-blocks {
  display: flex;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 12px;
}
.bml-cell {
  width: 28px;
  text-align: center;
  color: var(--text-dim);
  font-size: 11px;
}
.bmb-cell {
  width: 28px;
  text-align: center;
  color: var(--bg-light);
  font-size: 12px;
  line-height: 1;
}
.bmb-active {
  color: #cc2222;
  font-weight: bold;
}