.hero { min-height: 560px; padding: 64px 0 62px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: clamp(30px, 4vw, 54px); align-items: center; }
.eyebrow { margin: 0 0 12px; color: var(--cyan); font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero .eyebrow, #farming .section-head .eyebrow { display: flex; align-items: center; gap: 8px; }
.hero .eyebrow::before, #farming .section-head .eyebrow::before { width: 56px; height: 56px; }
h1 { margin: 0; max-width: 780px; font-size: clamp(3rem, 6.4vw, 5.8rem); line-height: .91; letter-spacing: -.065em; text-wrap: balance; }
h1 .accent { display: block; color: var(--cds-interactive); background: none; filter: none; }
.hero-copy { margin: 20px 0 0; max-width: 620px; color: var(--muted); font-size: 1.04rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hero-badges span { padding: 7px 10px; border: 1px solid transparent; border-radius: 0; color: #b8d9dd; background: rgba(10,30,35,.6); font-size: .72rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.hero-card {
  position: relative; overflow: hidden; padding: 22px; border: 1px solid var(--cds-border-subtle-01);
  border-left: 3px solid var(--cds-interactive); border-radius: 0;
  background: var(--cds-layer-01); box-shadow: none;
  transition: border-color .2s ease, background .2s ease;
}
.hero-card:hover { border-color: var(--cds-interactive); background: #1a1a1a; }
.hero-card::after { content: ""; position: absolute; inset: -60% -80%; pointer-events: none; background: linear-gradient(100deg, transparent 43%, rgba(255,255,255,.07) 49%, transparent 55%); animation: telemetry-scan 7s linear infinite; }
.instrument-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.instrument-live { display: inline-flex; align-items: center; gap: 7px; color: var(--cyan); }
.instrument-live::before, .data-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: signal-pulse 2s ease-in-out infinite; }
.power-value { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 10px; color: var(--gold); font-size: clamp(1.9rem, 3.1vw, 2.65rem); font-weight: 900; line-height: 1; letter-spacing: -.05em; white-space: nowrap; }
.power-value > span:last-child { text-align: right; }
.power-value small { font-size: .48em; letter-spacing: 0; }
.power-arrow { color: var(--cyan); font-size: .7em; letter-spacing: 0; }
.power-caption { display: block; margin-top: 9px; color: var(--muted); font-size: .82rem; }
.power-rail { position: relative; height: 6px; margin: 20px 0 7px; overflow: hidden; border-radius: 99px; background: #1a2930; }
.power-rail span { display: block; width: 32%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), #8cf2a5); box-shadow: 0 0 18px transparent; animation: rail-breathe 3s ease-in-out infinite; }
.power-scale { display: flex; justify-content: space-between; color: #66858d; font-size: .67rem; font-weight: 800; text-transform: uppercase; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  position: relative; z-index: 1; margin-top: 20px; padding: 0 18px; border-radius: 0;
  background: linear-gradient(100deg, var(--cyan), var(--cds-blue-40)); box-shadow: 0 10px 28px transparent;
  color: var(--cds-text-on-color); text-decoration: none; font-weight: 850; transition: transform .2s ease, box-shadow .2s ease, filter .18s ease;
}
.btn[href$=".zip"]::before { width: 28px; height: 28px; filter: brightness(.22) saturate(1.2); }
.btn[href$=".zip"]:has(.btn-icon)::before { display: none; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px transparent; }
.btn .btn-icon { flex: 0 0 auto; width: 22px; height: 22px; object-fit: contain; }
.btn[href$=".zip"] .btn-icon {
  width: 28px; height: 28px; border-radius: 6px; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0,0,0,.22);
}
.btn.workshop {
  color: #f3f7ff;
  background: linear-gradient(100deg, #1b2838, #2a475e 55%, #66c0f4);
  box-shadow: 0 10px 28px rgba(23, 40, 58, .35);
}
.btn.workshop:hover { filter: brightness(1.06); }
.btn.workshop .btn-icon { width: 24px; height: 24px; }
.download-saves-inline { margin: 12px 0 0; color: var(--cds-text-primary); font-size: .78rem; line-height: 1.4; }
.download-saves-inline strong { color: var(--cyan); font-weight: 850; }
.download-saves-meta { margin: 6px 0 0; font-size: .7rem; }
.download-saves-meta a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.download-saves-meta a:hover { color: var(--cyan); }
.section { position: relative; padding: 78px 0; border-top: 1px solid rgba(148, 174, 181, .1); }
.section:nth-of-type(even) { background: linear-gradient(180deg, rgba(14,29,35,.24), transparent); }
.section-head {
  display: grid; gap: 10px; justify-items: start; align-items: start;
  margin-bottom: 28px; text-align: left;
}
.section-head > div { min-width: 0; width: 100%; }
.section-head h2 {
  margin: 0; max-width: none; font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  letter-spacing: -.04em; line-height: 1.12; text-wrap: balance;
}
.section-head > p { max-width: 42rem; margin: 0; color: var(--muted); font-size: .98rem; line-height: 1.5; }
.section-head .data-tag { margin-top: 4px; }
.data-tag { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--cyan); border: 1px solid #286568; background: rgba(16,43,46,.72); border-radius: 0; padding: 7px 11px; font-size: .78rem; font-weight: 750; box-shadow: inset 0 0 18px transparent; }
.calculator { overflow: hidden; border: 1px solid #3d3d3d; border-radius: 0; background: #1a1a1a; box-shadow: none; }
.palbox-import {
  display: grid; gap: 16px; padding: 18px 22px;
  border-bottom: 1px solid #3d3d3d; background: #141414;
}
.palbox-import.dragging { outline: 2px dashed var(--cds-interactive); outline-offset: -7px; background: #1c2433; }
.palbox-copy strong { display: block; font-size: .98rem; }
.palbox-copy span, .palbox-status { display: block; margin-top: 3px; color: var(--muted); font-size: .76rem; }
.file-button, .secondary-button {
  min-height: 42px; padding: 0 14px; border: 1px solid var(--cds-border-strong-01); border-radius: 0;
  background: #222; color: var(--cds-text-primary);
  box-shadow: none; font-weight: 600; font-size: .8rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.file-button { width: 100%; }
.file-button:hover, .secondary-button:hover { border-color: var(--cds-interactive); background: #2a2a2a; color: #fff; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.secondary-button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.palbox-block { display: grid; gap: 8px; min-width: 0; }
.palbox-block-label {
  margin: 0; color: #9ec4c8; font-size: .68rem; font-weight: 850;
  letter-spacing: .08em; text-transform: uppercase;
}
.palbox-block-hint { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.palbox-load {
  display: grid; gap: 10px; justify-items: center;
  padding: 12px; border: 1px solid #284850; border-radius: 0; background: rgba(8,20,24,.55);
}
.palbox-load .file-button { max-width: 32rem; width: 100%; }
.palbox-paths {
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center;
  width: min(100%, 32rem); margin: 0 auto;
}
.palbox-paths-label {
  margin: 0; color: #b7d6d9; font-size: .76rem; font-weight: 800; white-space: nowrap;
}
.palbox-source {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 12px; border: 1px solid #284850; border-radius: 0; background: rgba(8,20,24,.35);
}
.palbox-source .secondary-button { width: 100%; }
.path-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 42px; padding: 0 12px;
  border: 1px solid #304f59; border-radius: 0; background: var(--cds-layer-02); color: #c8e4e7;
  font-size: .74rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.path-button:hover { border-color: #4b898b; background: #123038; color: var(--text); }
.worker-picks { display: none; grid-column: 1 / -1; gap: 10px; padding-top: 4px; }
.worker-picks.show { display: grid; }
.palbox-options { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(200px, 240px) minmax(190px, 220px); gap: 10px; align-items: end; }
/* Dedicated − / + instead of native number spinners.
   Base .slot-stepper MUST set display:grid; station/plot variants only
   override columns/height; without display:grid the three children stack
   vertically (button, count, button). */
.slot-stepper {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem;
  align-items: stretch;
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--cds-border-strong-01);
  background: var(--cds-field-01);
}
.farm-slots-control .slot-stepper {
  min-height: 42px;
  grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem;
}
.farm-slots-control .slot-stepper input[type="number"] {
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0 0.35rem;
  border: 0;
  border-left: 1px solid #3d3d3d;
  border-right: 1px solid #3d3d3d;
  border-radius: 0;
  background: transparent;
  color: var(--cds-text-primary);
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}
.farm-slots-control .slot-stepper input[type="number"]::-webkit-outer-spin-button,
.farm-slots-control .slot-stepper input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.slot-step {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: filter .15s ease, opacity .15s ease, background .15s ease;
}
.slot-step-minus {
  color: #fff;
  background: #a2191f;
}
.slot-step-minus:hover:not(:disabled) {
  background: #da1e28;
  filter: brightness(1.05);
}
.slot-step-plus {
  color: #161616;
  background: #42be65;
}
.slot-step-plus:hover:not(:disabled) {
  background: #6fdc8c;
}
.slot-step:focus-visible {
  outline: 2px solid var(--cds-focus);
  outline-offset: -2px;
  z-index: 1;
}
.slot-step:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
/* Roster cards follow pals.html: portrait | identity head, then dark work meters */
.team-roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; align-items: stretch; }
.roster-role {
  position: relative; min-width: 0;
  border: 1px solid var(--cds-border-subtle-01); border-left: 3px solid var(--cds-interactive);
  border-radius: 0;
  background: var(--cds-layer-01);
  overflow: visible;
}
.roster-clear {
  position: absolute; z-index: 3; top: 8px; right: 8px;
  display: grid; place-items: center;
  width: 28px; height: 28px; padding: 0; margin: 0;
  color: #c6c6c6; font: inherit; font-size: 1.1rem; font-weight: 600; line-height: 1;
  border: 1px solid var(--cds-border-subtle-01); border-radius: 0; background: #141414; cursor: pointer;
}
.roster-clear:hover { color: #fff; border-color: var(--cds-interactive); background: #222; }
.pal-pick {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.55rem; align-content: start;
  width: 100%; min-height: 100%; min-width: 0; padding: 12px;
  color: var(--text); text-align: left; font: inherit; border: 0; border-radius: 0;
  background: transparent; cursor: pointer;
}
.pal-pick:hover, .pal-pick:focus-visible {
  background: color-mix(in srgb, var(--cds-interactive) 8%, transparent);
  outline: 1px solid var(--cds-interactive); outline-offset: -1px;
}
.pal-pick-head {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px 12px;
  min-width: 0;
  align-items: start;
  padding-right: 28px;
}
.pal-pick-art {
  display: grid; place-items: center; position: relative;
  width: 72px; height: 72px; pointer-events: none;
}
.pal-pick-art > span {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #8d8d8d; font-size: 1.4rem; font-weight: 700;
  border: 1px solid var(--cds-border-subtle-01); border-radius: 0;
  background: var(--cds-background);
}
.pal-pick-art .pal-icon {
  position: relative; z-index: 1; display: block; width: 72px; height: 72px;
  object-fit: contain;
  border: 1px solid var(--cds-border-subtle-01);
  background: radial-gradient(circle at 45% 35%, #1b3d46, var(--cds-background) 72%);
}
.pal-pick-identity {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.pal-pick-name {
  display: block; min-width: 0; margin: 0; color: #f4f4f4;
  font-size: 1rem; font-weight: 600; line-height: 1.2;
  overflow-wrap: anywhere;
}
.pal-pick-meta {
  display: block; color: #b5b5b5; font-size: .78rem; font-weight: 500; line-height: 1.3;
}
.pal-pick-stats.pal-work-meters {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0.65rem;
  border: 1px solid #3d3d3d;
  border-radius: 0;
  background: #141414;
  width: 100%;
  box-sizing: border-box;
}
.pal-work-meter-row {
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr);
  column-gap: 0.45rem;
  align-items: center;
  min-height: 1.5rem;
  min-width: 0;
  font-size: .82rem;
  font-weight: 500;
}
.pal-work-meter-row .work-icon,
svg.work-icon {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 1.35rem;
  display: block;
}
.pal-work-meter-copy { display: grid; gap: 3px; min-width: 0; }
.pal-work-meter-label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  white-space: nowrap; color: #e0e0e0;
}
.pal-work-meter-label b { color: #fff; font-weight: 600; }
.pal-rating-meter { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; width: 100%; }
.pal-rating-slot {
  height: 6px; border: 1px solid #525252; border-radius: 0;
  background: #0a0a0a; opacity: 1;
}
.pal-rating-slot.filled {
  border-color: var(--meter-color, currentColor);
  background: var(--meter-color, currentColor);
  opacity: 1;
  box-shadow: none;
}
.pal-smooth-bar {
  position: relative;
  display: block;
  width: 100%;
  height: 6px;
  border: 1px solid #525252;
  border-radius: 0;
  background: #0a0a0a;
  overflow: hidden;
}
.pal-smooth-bar-fill {
  display: block;
  height: 100%;
  min-width: 0;
  background: var(--meter-color, currentColor);
}
.pal-work-meter-row.work-tone-seeding { --meter-color: #42be65; color: #42be65; }
.pal-work-meter-row.work-tone-watering { --meter-color: #58bfff; color: #58bfff; }
.pal-work-meter-row.work-tone-collection { --meter-color: #6fdc8c; color: #6fdc8c; }
.pal-work-meter-row.work-tone-transporting { --meter-color: #8B5A2B; color: #8B5A2B; }
.pal-work-meter-row.work-tone-transport-speed { --meter-color: #a67c52; color: #a67c52; }
.pal-work-meter-row.work-tone-kindling { --meter-color: #ff7b55; color: #ff7b55; }
.pal-work-meter-row.work-tone-food { --meter-color: #e2c98a; color: #e2c98a; }
.pal-work-meter-row.work-tone-growth { --meter-color: #f1c21b; color: #f1c21b; }
.plot-phase-dot {
  display: block;
  width: 0.65rem;
  height: 0.65rem;
  margin: 0 auto;
  border-radius: 0;
  background: currentColor;
  box-shadow: 0 0 0 1px color-mix(in srgb, currentColor 40%, #000);
}
.workload-work-icon { width: 1.25rem; height: 1.25rem; }
.manual-button { justify-self: start; }
.controls { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; padding: 22px; background: #1a1a1a; border-bottom: 1px solid #3d3d3d; }
label.control { display: grid; gap: 7px; color: var(--muted); font-size: .78rem; font-weight: 700; }
label.control.wide { grid-column: span 2; }
.recipe-scope { min-height: 2.5em; color: #a8a8a8; font-size: .68rem; font-weight: 500; line-height: 1.35; }
.control-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.phase-share { padding: 2px 6px; border: 1px solid #347174; border-radius: 0; background: #102b2e; color: var(--cds-text-secondary); font-size: .68rem; font-weight: 800; }
select, input[type="number"] {
  width: 100%; min-height: 42px; padding: 0 11px; color: var(--text); background: var(--cds-field-01);
  border: 1px solid var(--cds-border-subtle-01); border-radius: 0; outline: none;
}
select:focus, input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(82, 214, 208, .12); }
.station-picker { grid-column: 1 / -1; display: grid; gap: 9px; padding-top: 3px; }
.station-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.station-picker-title { min-width: 0; }
.station-picker-label { color: var(--cds-text-secondary); font-size: .78rem; font-weight: 800; }
.station-picker-hint { display: block; margin-top: 3px; color: var(--muted); font-size: .68rem; }
.station-count-control { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .68rem; font-weight: 800; }
.station-count-auto { min-height: 36px; padding: 0 10px; }
.station-count-state { min-width: 46px; color: var(--cds-text-secondary); font-size: .67rem; letter-spacing: .04em; text-transform: uppercase; }
.station-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.station-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 96px;
  padding: 9px 10px;
  color: #c6c6c6;
  border: 1px solid #3d3d3d;
  border-radius: 0;
  background: #141414;
  transition: border-color .18s ease, background .18s ease;
}
.station-card.is-active {
  border-color: var(--cds-interactive);
  background: color-mix(in srgb, var(--cds-interactive) 10%, #141414);
  color: var(--text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cds-interactive) 35%, transparent);
}
.station-card img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  opacity: .5;
  filter: grayscale(.3);
  transition: opacity .18s ease, filter .18s ease;
}
.station-card.is-active img { opacity: 1; filter: none; }
.station-card.is-incompatible { border-style: dashed; opacity: .48; }
.station-card.is-incompatible.is-active { border-color: #8d8d8d; background: #1a1a1a; box-shadow: none; }
.station-option-copy { display: grid; gap: 6px; min-width: 0; }
.station-option-copy strong { display: block; color: inherit; font-size: .76rem; line-height: 1.2; }
.station-option-copy small { display: block; color: var(--muted); font-size: .68rem; line-height: 1.25; }
.station-stepper {
  display: grid;
  width: 100%;
  min-height: 36px;
  /* Never minmax(0,…) for the count: it collapses to unreadable. */
  grid-template-columns: 2.25rem minmax(2.25rem, 1fr) 2.25rem;
}
.station-count-value {
  display: grid;
  place-items: center;
  min-width: 2.25rem;
  color: #ffffff;
  background: #0a0a0a;
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  border-left: 1px solid #525252;
  border-right: 1px solid #525252;
}
.research { display: none; grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); gap: 14px; padding-top: 4px; }
.research.show { display: grid; }
.research-unlocks { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.research-unlocks-head { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.research-unlocks-label { color: var(--cds-text-secondary); font-size: .78rem; font-weight: 800; }
.research-unlocks-hint { color: var(--muted); font-size: .68rem; }
.research-unlock { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-width: 0; min-height: 72px; padding: 9px 10px; color: var(--cds-text-secondary); text-align: left; font: inherit; border: 1px solid #3d3d3d; border-radius: 0; background: #141414; cursor: pointer; transition: border-color .18s ease, background .18s ease, opacity .18s ease; }
.research-unlock:hover { border-color: var(--cds-interactive); background: #1c1c1c; }
.research-unlock:focus-visible { outline: 2px solid var(--cds-interactive); outline-offset: 2px; }
.research-unlock[aria-pressed="true"] { border-color: var(--cds-interactive); background: color-mix(in srgb, var(--cds-interactive) 10%, #141414); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cds-interactive) 35%, transparent); }
.research-unlock img { width: 50px; height: 50px; object-fit: contain; opacity: .52; filter: grayscale(.35) drop-shadow(0 4px 6px rgba(0,0,0,.35)); transition: opacity .18s ease, filter .18s ease; }
.research-unlock[aria-pressed="true"] img { opacity: 1; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.research-unlock-copy { min-width: 0; }
.research-unlock-copy strong { display: block; color: inherit; font-size: .76rem; line-height: 1.2; }
.research-unlock-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: .68rem; line-height: 1.25; }
.research-unlock-state {
  padding: 3px 6px;
  color: #8d8d8d;
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .06em;
  border: 1px solid #525252;
  border-radius: 0;
  background: #0a0a0a;
}
/* ON matches the green + accent used on the slot stepper */
.research-unlock[aria-pressed="true"] .research-unlock-state {
  color: #161616;
  border-color: #24a148;
  background: #42be65;
}
.results { padding: 24px; background: #1a1a1a; }
.metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 14px;
  align-items: stretch;
}
.metric {
  min-width: 0;
  min-height: 0;
  padding: 16px;
  border: 1px solid #3d3d3d;
  border-radius: 0;
  background: #141414;
  box-shadow: none;
}
.metric-recovery { display: grid; gap: 10px; align-content: start; }
.metric-allocation { display: grid; gap: 10px; align-content: start; }
.metric-label { color: var(--muted); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.metric-value { display: block; color: var(--gold); font-size: clamp(1.65rem, 3vw, 2.4rem); font-weight: 850; line-height: 1.1; }
.metric-value.compact { color: var(--text); font-size: 1rem; font-weight: 600; line-height: 1.35; }
.metric-note { display: block; color: var(--muted); font-size: .78rem; }
.allocation-note { margin: 0; min-width: 0; }
.workload-panel { display: grid; gap: 10px; min-width: 0; }
.workload-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 12px;
}
.workload-total { color: #c6c6c6; font-size: .78rem; font-weight: 600; }
/* Legend sits under the phase cards (with yellow Raw / light Pal adj), not in the header. */
.workload-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: 100%;
  margin: 2px 0 0;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.workload-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.workload-legend-item::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 0;
  background: currentColor;
}
.workload-raw { color: #f1c21b; }
/* Pal/rank-adjusted share: light primary (reads as white on carbon) */
.workload-adjusted { color: #f4f4f4; }
/* Compact phase tiles + thicker vertical 100% stack */
.workload-body {
  display: grid;
  grid-template-columns: max-content minmax(2.75rem, 4rem);
  gap: 14px;
  align-items: stretch;
  justify-content: start;
  min-width: 0;
}
.workload-phases {
  display: grid;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  min-width: 0;
}
.workload-phase-row-top {
  display: grid;
  grid-template-columns: repeat(3, 5.4rem);
  gap: 6px;
}
.workload-phase-row-bottom {
  display: grid;
  grid-template-columns: repeat(2, 5.4rem);
  gap: 6px;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
}
.workload-phase {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid #3d3d3d;
  border-radius: 0;
  background: #0a0a0a;
  font-size: .68rem;
  font-variant-numeric: tabular-nums;
}
.workload-phase-top {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.workload-phase-top .work-icon,
.workload-work-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
}
.workload-phase-name {
  min-width: 0;
  color: currentColor;
  font-weight: 700;
  letter-spacing: .02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workload-values {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px;
  min-width: 0;
  font-weight: 650;
  font-size: .65rem;
}
.workload-phase .workload-raw { color: #f1c21b; }
.workload-phase .workload-adjusted { color: currentColor; }
.workload-divider { color: #6f6f6f; }
.workload-plant { color: #42be65; --phase-color: #42be65; }
.workload-water { color: #58bfff; --phase-color: #58bfff; }
.workload-gather { color: #6fdc8c; --phase-color: #6fdc8c; }
.workload-transport { color: #a67c52; --phase-color: #a67c52; }
.workload-cook { color: #ff7b55; --phase-color: #ff7b55; }
.workload-stack-wrap {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 5px;
  justify-items: center;
  align-self: stretch;
  min-height: 9.5rem;
  width: 100%;
  min-width: 2.75rem;
}
.workload-stack-label {
  color: #c6c6c6;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.workload-stack {
  display: flex;
  flex-direction: column-reverse;
  width: 100%;
  max-width: 3.25rem;
  min-height: 8.5rem;
  height: 100%;
  overflow: hidden;
  border: 1px solid #3d3d3d;
  border-radius: 0;
  background: #0a0a0a;
}
.workload-stack-segment {
  flex: 0 0 var(--phase-share);
  width: 100%;
  min-height: 1px;
  background: var(--phase-color, currentColor);
}
.plot-editor {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #3d3d3d;
  border-radius: 0;
  background: #141414;
}
.plot-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.plot-editor-title { display: flex; align-items: baseline; gap: 9px; }
.plot-editor-title strong { font-size: .95rem; color: #f4f4f4; }
.plot-editor-mode { color: var(--cds-blue-40); font-size: .67rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.plot-reset { min-height: 34px; padding: 0 10px; }
/* Room for pal-style cards (art + meters + stepper) */
.plot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  align-items: stretch;
}
.plot-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem;
  align-content: start;
  min-width: 0;
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--cds-border-subtle-01);
  border-left: 3px solid #525252;
  border-radius: 0;
  background: var(--cds-layer-01);
}
.plot-card.active {
  border-left-color: var(--cds-interactive);
  border-color: var(--cds-border-subtle-01);
  background: var(--cds-layer-01);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cds-interactive) 28%, transparent);
}
.plot-card-head {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px 12px;
  min-width: 0;
  align-items: start;
}
.plot-card-art {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid var(--cds-border-subtle-01);
  background: radial-gradient(circle at 45% 35%, #2a2a2a, var(--cds-background) 72%);
}
.plot-card-art .crop-icon {
  position: static;
  width: 64px;
  height: 64px;
  object-fit: contain;
  opacity: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .45));
}
.plot-card-identity {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.plot-card-name {
  display: block;
  min-width: 0;
  margin: 0;
  color: #f4f4f4;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.plot-card-meta {
  display: block;
  color: #b5b5b5;
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.3;
}
.plot-card-meters.pal-work-meters {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}
.plot-stepper {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  grid-template-columns: 2.5rem minmax(2.5rem, 1fr) 2.5rem;
  border-radius: 0;
  border: 1px solid #525252;
  background: #161616;
}
.plot-count {
  display: grid;
  place-items: center;
  min-width: 2.5rem;
  color: #ffffff;
  background: #0a0a0a;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  border-left: 1px solid #525252;
  border-right: 1px solid #525252;
}
.ratio-line { margin: 24px 0 12px; color: var(--muted); font-size: .85rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 10px; border-radius: 0; background: var(--cyan-soft); color: #bff4f0; font-size: .83rem; font-weight: 750; }
.crop-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; }
.crop-icon { width: 28px; height: 28px; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0,0,0,.35)); }
.crop-cell { display: inline-flex; align-items: center; gap: 7px; }
.table-wrap { margin-top: 22px; overflow-x: auto; border: 1px solid var(--line); border-radius: 0; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { padding: 11px 13px; border-bottom: 1px solid #20343c; text-align: right; font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); background: #0b161b; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
td { font-size: .84rem; }
tbody tr { transition: background .18s ease; }
tbody tr:hover { background: transparent; }
tbody tr:last-child td { border-bottom: 0; }
.bottleneck { color: var(--gold); font-weight: 800; }
.recipe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.recipe-card { position: relative; overflow: hidden; padding: 17px; color: var(--text); text-align: left; border: 1px solid var(--line); border-radius: 0; background: var(--cds-layer-01); cursor: pointer; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.recipe-card::before { content: ""; position: absolute; width: 80px; height: 80px; top: -50px; right: -35px; border-radius: 50%; background: var(--cyan); filter: blur(45px); opacity: 0; transition: opacity .25s ease; }
.recipe-card:hover, .recipe-card.active { transform: translateY(-4px); border-color: #3f9493; background: #112529; box-shadow: 0 16px 34px rgba(0,0,0,.25); }
.recipe-card:hover::before, .recipe-card.active::before { opacity: .14; }
.recipe-card strong { display: block; font-size: 1rem; }
.recipe-title-row { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.recipe-crops { display: flex; flex-shrink: 0; }
.recipe-crops .crop-icon { width: 32px; height: 32px; margin-left: -5px; }
.recovery-rates, .recipe-card .rates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.recovery-rate { min-width: 0; }
.recovery-rate strong { display: block; color: var(--gold); font-size: clamp(1.25rem, 2.3vw, 1.85rem); font-weight: 850; line-height: 1.05; }
.recovery-rate span { display: block; margin-top: 4px; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.recipe-card .recovery-rate strong { font-size: 1.25rem; }
.recipe-card small { display: block; margin-top: 6px; color: var(--muted); }
.recipe-card .recipe-stocked { color: #f1c21b; }
.plot-empty { grid-column: 1 / -1; margin: 0; padding: 18px; color: var(--muted); border: 1px dashed #525252; }
.model-notes { margin-top: 20px; color: var(--muted); font-size: .8rem; }
.model-notes summary { width: fit-content; cursor: pointer; color: var(--cds-text-secondary); font-weight: 750; }
.model-notes summary:hover { color: var(--text); }
.assumptions { max-width: 900px; margin: 10px 0 0; color: var(--muted); }
.habitat-browser { position: relative; display: grid; grid-template-columns: 274px minmax(0, 1fr); overflow: hidden; border: 1px solid transparent; border-radius: 0; background: linear-gradient(var(--panel), var(--panel)) padding-box, linear-gradient(135deg, transparent, rgba(35,59,69,.5) 42%, rgba(142,131,255,.3)) border-box; box-shadow: none; }
.habitat-index { position: absolute; inset: 0 auto 0 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); width: 274px; min-height: 0; overflow: hidden; border-right: 1px solid var(--line); background: var(--cds-layer-01); }
.habitat-search { display: grid; gap: 7px; padding: 17px 16px 13px; color: var(--cds-text-secondary); font-size: .74rem; font-weight: 800; }
.habitat-search input { width: 100%; min-height: 42px; padding: 0 12px; color: var(--text); background: var(--cds-field-01); border: 1px solid var(--cds-border-subtle-01); border-radius: 0; outline: none; }
.habitat-search input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(82,214,208,.12); }
.habitat-list-count { padding: 0 16px 11px; color: var(--muted); font-size: .68rem; }
.habitat-pal-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: var(--cds-border-subtle-01) var(--cds-layer-01); }
.habitat-pal { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; min-height: 66px; padding: 8px 12px; color: var(--cds-text-secondary); text-align: left; font: inherit; border: 0; border-top: 1px solid rgba(64,93,102,.28); background: transparent; cursor: pointer; transition: color .16s ease, background .16s ease; }
.habitat-pal:hover { color: var(--text); background: transparent; }
.habitat-pal:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--cyan); outline-offset: -3px; }
.habitat-pal[aria-current="true"] { color: var(--text); background: linear-gradient(90deg, rgba(32,105,104,.4), rgba(17,43,48,.72)); box-shadow: inset 3px 0 var(--cyan); }
.habitat-pal-icon { width: 48px; height: 48px; object-fit: contain; border: 1px solid var(--cds-border-subtle-01); border-radius: 0; background: radial-gradient(circle at 45% 35%, #193841, var(--cds-background) 72%); }
.habitat-pal-copy { min-width: 0; }
.habitat-pal-copy strong { display: block; overflow: hidden; font-size: .79rem; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.habitat-pal-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: .68rem; }
.habitat-stage { grid-column: 2; min-width: 0; background: var(--cds-background); }
.habitat-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 86px; padding: 13px 17px; border-bottom: 1px solid var(--line); background: var(--cds-layer-01); }
.habitat-selected { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; align-items: center; min-width: 0; }
.habitat-selected img { width: 58px; height: 58px; object-fit: contain; border: 1px solid #365a63; border-radius: 0; background: radial-gradient(circle at 45% 35%, #1b4048, var(--cds-layer-01) 74%); }
.habitat-selected strong { display: block; overflow: hidden; color: var(--text); font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.habitat-selected span { display: block; margin-top: 3px; color: var(--muted); font-size: .7rem; }
.habitat-toggle-group, .habitat-map-tabs { display: flex; gap: 7px; }
.habitat-toggle, .habitat-map-tab { min-height: 36px; padding: 0 11px; color: var(--cds-text-secondary); border: 1px solid var(--cds-border-subtle-01); border-radius: 0; background: var(--cds-layer-01); font-size: .7rem; font-weight: 850; cursor: pointer; transition: border-color .16s ease, color .16s ease, background .16s ease; }
.habitat-toggle:hover, .habitat-map-tab:hover { color: var(--text); border-color: #4b7b83; }
.habitat-toggle:focus-visible, .habitat-map-tab:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.habitat-toggle[aria-pressed="true"], .habitat-map-tab[aria-pressed="true"] { color: #c9fffa; border-color: #3d918e; background: var(--cds-layer-02); box-shadow: inset 0 0 14px transparent; }
.habitat-map-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 17px; border-bottom: 1px solid #1b343d; }
.habitat-map-options span { color: var(--muted); font-size: .68rem; }
.habitat-map-frame { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--cds-background); isolation: isolate; touch-action: none; cursor: grab; user-select: none; }
.habitat-map-frame.dragging { cursor: grabbing; }
.habitat-map-viewport { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.habitat-map-viewport > img, .habitat-map-viewport > canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.habitat-map-viewport > img { object-fit: contain; pointer-events: none; }
.habitat-map-viewport > canvas { z-index: 2; pointer-events: none; mix-blend-mode: screen; }
.habitat-zoom-controls { position: absolute; z-index: 4; right: 13px; bottom: 13px; display: flex; overflow: hidden; border: 1px solid #3b626c; border-radius: 0; background: rgba(6,18,23,.88); box-shadow: 0 8px 24px rgba(0,0,0,.35); backdrop-filter: none; }
.habitat-zoom-button { min-width: 38px; min-height: 38px; padding: 0 10px; color: var(--cds-text-secondary); border: 0; border-right: 1px solid var(--cds-border-subtle-01); background: transparent; font-size: .82rem; font-weight: 900; cursor: pointer; }
.habitat-zoom-button:last-child { border-right: 0; }
.habitat-zoom-button:hover { color: #07191b; background: var(--cyan); }
.habitat-zoom-button:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--cyan); outline-offset: -3px; }
.habitat-zoom-button:disabled { color: #58737a; cursor: default; background: transparent; }
.habitat-zoom-level { min-width: 64px; font-size: .67rem; }
.habitat-map-message { display: none; position: absolute; z-index: 3; inset: 50% auto auto 50%; width: min(360px, calc(100% - 32px)); padding: 14px 16px; color: #c9dbde; text-align: center; border: 1px solid #35535c; border-radius: 0; background: rgba(5,15,20,.88); box-shadow: 0 12px 32px rgba(0,0,0,.38); transform: translate(-50%, -50%); backdrop-filter: none; }
.habitat-map-message.show { display: block; }
.habitat-caption { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 49px; padding: 9px 17px; color: var(--muted); border-top: 1px solid #1b343d; font-size: .68rem; }
.habitat-legend { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.habitat-legend::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: #58ffd0; box-shadow: 0 0 12px rgba(88,255,208,.8); }
.mod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.mod-grid-features {
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
.mod-grid-features .feature-card-mercy {
  width: 100%;
}
.feature-break {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--cds-border-subtle-01, #393939);
}
.feature-break h4 {
  margin: 0 0 8px;
  font-size: .95rem;
  font-weight: 650;
}
.feature-break p {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.45;
}
.card { padding: 24px; border: 1px solid var(--line); border-radius: 0; background: linear-gradient(145deg, rgba(14,30,37,.94), rgba(8,18,23,.94)); box-shadow: 0 18px 50px rgba(0,0,0,.2); transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease; }
.card:hover { transform: translateY(-5px); border-color: #315d67; box-shadow: 0 25px 64px rgba(0,0,0,.3), var(--glow); }
.card h3 { margin: 0 0 10px; font-size: 1.15rem; }
.card p, .card li { color: var(--muted); }
.card ul, .card ol { padding-left: 1.2rem; }
code { padding: .1rem .35rem; border-radius: 4px; background: #1c2b31; }
.shot { width: 100%; border: 1px solid var(--line); border-radius: 0; margin-top: 14px; box-shadow: 0 16px 34px rgba(0,0,0,.24); transition: filter .28s ease; }
.card:hover .shot { filter: saturate(1.08) brightness(1.04); }
.dots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.dots img { width: 100%; border: 1px solid var(--line); border-radius: 0; }
footer { padding: 30px 0 46px; color: var(--muted); font-size: .8rem; border-top: 1px solid rgba(148, 174, 181, .14); }
.footer-bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 18px; }
.footer-bar .support-link {
  display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto;
  color: var(--cyan); font-weight: 800; text-decoration: none; border-bottom: 1px solid transparent;
}
.footer-bar .support-link:hover { color: var(--cds-interactive-hover); border-bottom-color: rgba(154,248,239,.7); }
.footer-bar .support-link img {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 1px transparent;
}
.btn.support {
  color: #2a1208; background: linear-gradient(100deg, #ffd071, #ffb347 55%, #ff8f6b);
  box-shadow: 0 10px 28px rgba(255, 176, 71, .18);
}
.btn.support:hover { filter: brightness(1.05); }
.reveal-ready { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2,.75,.25,1), transform .7s cubic-bezier(.2,.75,.25,1); }
.reveal-ready.reveal-in { opacity: 1; transform: translateY(0); }
@keyframes ambient-drift { to { transform: translate3d(-8vw, 6vh, 0) scale(1.08); } }
@keyframes telemetry-scan { from { transform: translateX(-22%); } to { transform: translateX(42%); } }
@keyframes signal-pulse { 0%, 100% { opacity: .55; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.12); } }
@keyframes rail-breathe { 0%, 100% { filter: brightness(.9); } 50% { filter: brightness(1.25); } }
@media (max-width: 960px) {
  body { padding-left: 0; }
  .topbar {
    position: sticky; top: 0; left: auto; bottom: auto; z-index: 110;
    width: 100%; max-width: none; max-height: none; margin: 0; padding: 10px 14px;
    flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 10px; overflow: visible;
    border-radius: 0; border-left: 0; border-right: 0; border-top: 0;
    backdrop-filter: none; -webkit-backdrop-filter: none;
    background: rgba(7, 18, 24, .96); box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  }
  .topbar.shell { width: 100%; max-width: none; }
  .nav-toggle {
    display: inline-flex; flex: 0 0 auto; flex-direction: column; justify-content: center; align-items: center;
    gap: 5px; width: 42px; height: 42px; margin: 0; padding: 0;
    border: 1px solid rgba(120, 189, 193, .28); border-radius: 0;
    background: rgba(14, 40, 44, .65); cursor: pointer; color: var(--cyan);
  }
  .nav-toggle span {
    display: block; width: 18px; height: 2px; border-radius: 1px; background: currentColor;
    transition: transform .2s ease, opacity .2s ease; transform-origin: center;
  }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .brand {
    justify-content: flex-start; gap: 10px; min-height: 42px; padding: 8px 10px;
    font-size: .82rem; letter-spacing: .1em;
  }
  /* nav.js reparents #siteNav to body on mobile so z-index beats the backdrop. */
  #siteNav,
  body > nav[aria-label="Primary navigation"],
  .topbar nav {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 120;
    display: flex; width: min(288px, 88vw); margin: 0; padding: 18px 12px 24px; flex: none;
    flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; gap: 2px;
    overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
    border: 0; border-right: 1px solid rgba(120, 189, 193, .22); border-radius: 0;
    background: rgba(5, 12, 16, .98); box-shadow: 18px 0 48px rgba(0, 0, 0, .45);
    transform: translateX(-105%); transition: transform .22s ease; pointer-events: none;
  }
  body.nav-open #siteNav,
  body.nav-open > nav[aria-label="Primary navigation"],
  body.nav-open .topbar nav { transform: translateX(0); pointer-events: auto; }
  #siteNav a,
  body > nav[aria-label="Primary navigation"] a,
  .topbar nav a {
    justify-content: flex-start; gap: 10px; width: 100%; min-height: 44px;
    padding: 8px 12px; font-size: .84rem;
  }
  #siteNav a::before,
  body > nav[aria-label="Primary navigation"] a::before,
  .topbar nav a::before { width: 28px; height: 28px; }
  #siteNav a[aria-current="page"]::after,
  body > nav[aria-label="Primary navigation"] a[aria-current="page"]::after,
  .topbar nav a[aria-current="page"]::after {
    top: 10px; bottom: 10px; left: 0; right: auto; width: 3px; height: auto;
    border-radius: 0 2px 2px 0;
  }
  .nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: 100; margin: 0; padding: 0; border: 0;
    background: rgba(0, 0, 0, .55); cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .nav-backdrop[hidden] { display: none !important; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding: 56px 0; }
  .hero-card { width: min(100%, 520px); transform: none; }
  .section-head { gap: 10px; }
  .controls { grid-template-columns: repeat(3, 1fr); }
  .station-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .research-unlocks { grid-template-columns: 1fr 1fr; }
  .palbox-source { grid-template-columns: 1fr; }
  .palbox-paths { grid-template-columns: 1fr 1fr; width: min(100%, 22rem); }
  .palbox-paths-label { grid-column: 1 / -1; text-align: center; }
  .team-roster { grid-template-columns: repeat(2, 1fr); }
  .metrics, .recipe-grid { grid-template-columns: 1fr; }
  .workload-body {
    grid-template-columns: max-content minmax(2.75rem, 3.75rem);
    justify-content: start;
  }
  .workload-phase-row-top { grid-template-columns: repeat(3, 5.1rem); }
  .workload-phase-row-bottom { grid-template-columns: repeat(2, 5.1rem); width: max-content; }
  .plot-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .habitat-browser { grid-template-columns: 234px minmax(0, 1fr); }
  .habitat-index { width: 234px; }
  .mod-grid,.mod-grid-features { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .shell { width: min(100% - 22px, 1120px); }
  .hero { gap: 32px; padding: 42px 0; }
  h1 { font-size: clamp(2.75rem, 14vw, 4rem); }
  .hero-copy { font-size: .98rem; }
  .hero-badges { margin-top: 20px; }
  .hero-badges span { padding: 6px 9px; font-size: .66rem; }
  .hero-card { padding: 19px; }
  .power-value { font-size: clamp(1.72rem, 9vw, 2.35rem); }
  .section { padding: 46px 0; }
  .section-head { gap: 10px; }
  .controls, .research { grid-template-columns: 1fr 1fr; }
  .worker-picks, .palbox-options { grid-column: 1; }
  .palbox-options { grid-template-columns: 1fr; }
  .research-unlocks { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .station-options { grid-template-columns: 1fr 1fr; }
  label.control.wide { grid-column: span 2; }
  .results { padding: 16px; }
  .team-roster { grid-template-columns: 1fr; }
  .plot-grid { grid-template-columns: 1fr; }
  .habitat-browser { grid-template-columns: 1fr; overflow: visible; }
  .habitat-index { position: static; grid-template-rows: auto auto auto; width: auto; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .habitat-stage { grid-column: 1; }
  .habitat-pal-list { display: flex; overflow-x: auto; overflow-y: hidden; }
  .habitat-pal { flex: 0 0 184px; border-top: 0; border-right: 1px solid rgba(64,93,102,.28); }
  .habitat-pal[aria-current="true"] { box-shadow: inset 0 3px var(--cyan); }
  .habitat-toolbar { align-items: flex-start; flex-direction: column; }
  .habitat-toggle-group { width: 100%; }
  .habitat-toggle { flex: 1; }
  .habitat-caption { align-items: flex-start; flex-direction: column; gap: 5px; }
}
@media (max-width: 430px) {
  .controls, .research { grid-template-columns: 1fr; }
  .research-unlocks { grid-column: 1; grid-template-columns: 1fr; }
  .research-unlocks-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .station-picker-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .station-options { grid-template-columns: 1fr; }
  .plot-editor-head { align-items: flex-start; }
  label.control.wide { grid-column: span 1; }
  .hero-card .btn { width: 100%; }
  .habitat-map-options { align-items: flex-start; flex-direction: column; }
  .habitat-map-tabs { width: 100%; }
  .habitat-map-tab { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal-ready { opacity: 1; transform: none; }
}

/* Standalone farming tool: hide index-style marketing/habitat/mod blocks */
body.page-farming .hero,
body.page-farming #habitat,
body.page-farming #mod,
body.page-farming #install { display: none; }

/* Align farming page chrome with pals.html style guide */
body.page-farming {
  --farm-ink: #f0f0f0;
  --farm-meta: #b5b5b5;
}
body.page-farming .section-head h2 { color: var(--farm-ink); }
body.page-farming .section-head > p { color: var(--farm-meta); }
body.page-farming .eyebrow { color: var(--cds-interactive); }
body.page-farming .data-tag {
  color: var(--cds-blue-40);
  border-color: color-mix(in srgb, var(--cds-interactive) 45%, var(--cds-border-subtle-01));
  background: color-mix(in srgb, var(--cds-interactive) 12%, var(--cds-layer-01));
}
body.page-farming .data-tag::before { background: var(--cds-interactive); }
body.page-farming .calculator {
  border: 1px solid #3d3d3d !important;
  border-radius: 0 !important;
  background: #1a1a1a !important;
  box-shadow: none !important;
}
body.page-farming .palbox-import {
  background: #141414 !important;
  border-bottom: 1px solid #3d3d3d !important;
}
body.page-farming .file-button,
body.page-farming .secondary-button,
body.page-farming .optimize-button,
body.page-farming .manual-button {
  border-radius: 0 !important;
  box-shadow: none !important;
  font-weight: 600 !important;
}
body.page-farming .file-button,
body.page-farming .optimize-button {
  background: var(--cds-button-primary) !important;
  color: var(--cds-text-on-color) !important;
  border: 0 !important;
}
body.page-farming .secondary-button {
  background: #222 !important;
  color: var(--cds-text-primary) !important;
  border: 1px solid var(--cds-border-strong-01) !important;
}
body.page-farming .secondary-button:hover {
  border-color: var(--cds-interactive) !important;
  background: #2a2a2a !important;
}
body.page-farming .controls {
  background: #1a1a1a !important;
  border-bottom: 1px solid #3d3d3d !important;
}
body.page-farming .results { background: #1a1a1a; }
body.page-farming select,
body.page-farming input[type="number"],
body.page-farming input[type="search"],
body.page-farming input[type="text"] {
  border-radius: 0 !important;
  background: var(--cds-field-01) !important;
  border: 1px solid var(--cds-border-strong-01) !important;
  color: var(--cds-text-primary) !important;
}
body.page-farming select:focus,
body.page-farming input:focus {
  outline: 2px solid var(--cds-focus) !important;
  outline-offset: -2px;
  border-color: var(--cds-focus) !important;
  box-shadow: none !important;
}
body.page-farming .metric,
body.page-farming .plot-editor,
body.page-farming .recipe-card,
body.page-farming .table-wrap {
  border-color: #3d3d3d !important;
  background: #141414 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
body.page-farming .recipe-card:hover,
body.page-farming .recipe-card.active {
  transform: none;
  border-color: var(--cds-interactive) !important;
  background: color-mix(in srgb, var(--cds-interactive) 8%, #141414) !important;
}
body.page-farming .metric-label,
body.page-farming .plot-editor-mode,
body.page-farming th {
  color: var(--cds-blue-40) !important;
}
body.page-farming .palbox-block-label,
body.page-farming label.control {
  color: var(--cds-blue-40);
}
