.lead-copy {
  max-width: 790px;
  margin: 12px 0 16px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

.truth-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 4px;
}

.truth-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px 14px;
  background: rgba(232, 131, 74, 0.045);
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 13px;
}

.truth-label,
.field-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.city-picker {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.city-picker select {
  min-height: 38px;
  padding: 7px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(63, 52, 45, 0.18);
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
}

.simulator-map {
  margin-top: 14px;
}

.sim-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-top: 18px;
  padding: 16px;
  background: rgba(232, 131, 74, 0.045);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.sim-form label,
.selected-place {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.selected-place strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-place {
  grid-column: span 2;
}

.sim-form label:last-of-type {
  grid-column: span 2;
}

.selected-place > span:last-child {
  color: var(--muted);
  font-size: 11.5px;
}

.sim-form input[type="date"],
.sim-form select {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(63, 52, 45, 0.18);
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
}

.range-line {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 9px;
}

.range-line input {
  min-width: 0;
  flex: 1;
  accent-color: var(--coral);
}

.range-line output {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #fff;
  background: var(--coral);
  border-radius: 8px;
  font-weight: 800;
}

.run-cell {
  display: flex;
}

.run-button {
  width: 100%;
  min-height: 44px;
  padding: 11px 20px;
  color: #fff;
  background: var(--coral);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.run-button:hover:not(:disabled) {
  background: var(--coral-dark);
}

.run-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.sim-status {
  min-height: 24px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 13px;
}

.sim-status.error {
  color: #9f3f32;
}

.sim-status.running {
  color: var(--coral-dark);
}

.neighbors-panel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.neighbors-panel h3 {
  margin: 0 0 9px;
  font-size: 14px;
}

.neighbor-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}

.neighbor-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 9px 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 12px;
}

.neighbor-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.neighbor-distance {
  color: var(--coral-dark);
  font-weight: 800;
}

.neighbor-detail {
  grid-column: 1 / -1;
  color: var(--muted);
}

.result-card {
  scroll-margin-top: 80px;
}

.sim-stats .stat .n {
  font-size: clamp(24px, 4vw, 34px);
}

.plant-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.plant-fact {
  padding: 6px 10px;
  color: var(--muted);
  background: rgba(20, 148, 138, 0.06);
  border: 1px solid rgba(20, 148, 138, 0.18);
  border-radius: 999px;
  font-size: 12px;
}

.results-feed {
  display: contents;
}

.sim-chart {
  width: 100%;
  height: 540px;
}

.sim-chart.dispatch-chart {
  height: 680px;
}

.chart-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .sim-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .selected-place,
  .sim-form label:last-of-type,
  .run-cell {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .truth-grid,
  .sim-form {
    grid-template-columns: 1fr;
  }

  .selected-place,
  .sim-form label:last-of-type,
  .run-cell {
    grid-column: auto;
  }

  .run-button {
    width: 100%;
  }

  .simulator-map {
    height: 560px !important;
  }

  .sim-chart,
  .sim-chart.dispatch-chart {
    height: 580px;
  }

  .tbx-legend {
    top: 58px;
  }
}
