/* Quantum-Like Lab by Ethan Dickey. Evolution controls follow his guidance and feedback. */
.evolution-experiment {
  max-width: 1380px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 36px);
  color: var(--text);
}
.evolution-experiment [hidden] {
  display: none !important;
}
.evolution-heading {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 20px;
}
.evolution-heading h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  margin: 5px 0 12px;
}
.evolution-heading p {
  max-width: 82ch;
}
.evolution-experiment p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--muted);
}
.evolution-experiment p.eyebrow {
  color: var(--teal);
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  margin: 0 0 8px;
  font-weight: 700;
}
.evolution-source {
  border: 1px solid #385364;
  border-left: 3px solid var(--teal);
  border-radius: 9px;
  padding: 15px 18px;
  background: #102631;
  margin-bottom: 24px;
}
.evolution-source strong,
.evolution-source span {
  display: block;
}
.evolution-source span {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 5px;
}
.evolution-source p {
  margin: 9px 0 0;
}
.evolution-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 310px);
  gap: 28px;
  align-items: start;
}
.evolution-controls {
  display: grid;
  gap: 20px;
  min-width: 0;
}
.evolution-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 21px;
  min-width: 0;
  background: #0b1c28;
}
.evolution-section h3 {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 1rem;
  margin: 0 0 16px;
}
.evolution-section h3 > span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border: 1px solid #357180;
  border-radius: 50%;
  color: var(--teal);
  font-size: 0.78rem;
}
.evolution-kind-select {
  margin-bottom: 13px;
}
.evolution-kind-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.evolution-kind-cards button {
  white-space: normal;
  text-align: left;
  padding: 14px;
  background: #10232e;
  border: 1px solid #385364;
  line-height: 1.55;
}
.evolution-kind-cards button.selected {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px var(--teal);
  background: #10313b;
}
.evolution-kind-cards strong,
.evolution-kind-cards span {
  display: block;
}
.evolution-kind-cards span {
  color: var(--muted);
  margin-top: 8px;
  font-size: 0.84rem;
  font-weight: 400;
}
.evolution-kind-note {
  font-size: 0.82rem !important;
}
.evolution-experiment .field {
  margin-bottom: 13px;
}
.evolution-experiment .field small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
  font-weight: 400;
}
.evolution-experiment details {
  border-top: 1px solid var(--line);
  margin-top: 15px;
  padding-top: 13px;
}
.evolution-experiment summary {
  color: var(--teal);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.5;
}
.evolution-experiment details p {
  font-size: 0.85rem;
}
.evolution-generator-note {
  background: #142c37;
  border-radius: 8px;
  padding: 12px 15px;
}
.evolution-custom {
  padding: 16px;
  border: 1px solid #456271;
  border-radius: 9px;
  margin: 16px 0;
}
.evolution-custom textarea {
  min-height: 190px;
  margin-top: 5px;
  word-break: break-all;
}
.evolution-custom .button-row {
  margin: 10px 0 14px;
}
.evolution-example {
  margin-top: 17px;
  padding: 13px 15px;
  background: #132a35;
  border-radius: 8px;
}
.evolution-example p {
  font-size: 0.84rem;
  margin: 6px 0 12px;
}
.evolution-example > span {
  display: block;
  margin-top: 8px;
}
.evolution-run-card {
  position: sticky;
  top: 20px;
  border: 1px solid #3d6473;
  border-radius: 12px;
  padding: 19px;
  background: #102a35;
}
.evolution-run-card > button {
  width: 100%;
  margin-top: 7px;
  white-space: normal;
}
.evolution-run-card p {
  font-size: 0.85rem;
}
.evolution-run-card .evolution-run-warning {
  font-size: 0.78rem;
  color: #efc788;
}
.evolution-run-card .evolution-run-warning:empty {
  display: none;
}
.evolution-noise .checkbox {
  margin-top: 13px;
}
.evolution-noise-note {
  padding: 10px 12px;
  border-left: 2px solid #dea760;
  background: #2b2a25;
}
.evolution-input-error {
  padding: 14px 17px;
  margin-bottom: 20px;
  border: 1px solid #dd9c69;
  border-radius: 8px;
  background: #38251f;
  color: #ffd6b9;
  line-height: 1.6;
}
.evolution-experiment [aria-invalid="true"] {
  border-color: #ffb487;
  outline-color: #ffb487;
}
@media (max-width: 900px) {
  .evolution-columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .evolution-run-card {
    position: static;
  }
}
@media (max-width: 560px) {
  .evolution-kind-cards,
  .evolution-experiment .field-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .evolution-section {
    padding: 15px;
  }
  .evolution-experiment {
    padding: 15px;
  }
}
.evolution-observable-explanation {
  padding: 15px 18px;
  background: #132a35;
  border-radius: 9px;
  margin: 15px 0;
}
.evolution-observable-explanation h3 {
  font-size: 0.98rem;
  margin: 0 0 9px;
}
.evolution-observable-explanation p {
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.88rem;
}
.evolution-observable-explanation summary {
  color: var(--teal);
  cursor: pointer;
}
.evolution-frequency-example {
  border: 1px solid #487e82;
  background: #113439;
}
.evolution-storage-status,
.evolution-selected-frame,
.evolution-frequency-summary {
  border: 1px solid #365260;
  border-radius: 9px;
  background: #102631;
  margin: 16px 0;
  padding: 14px 17px;
}
.evolution-storage-status p,
.evolution-frequency-summary p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
}
.evolution-selected-frame {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
}
.evolution-selected-frame > div > span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  margin-top: 4px;
}
.evolution-selected-frame dl {
  display: flex;
  flex-wrap: wrap;
  gap: 17px;
  margin: 0;
}
.evolution-selected-frame dt {
  font-size: .74rem;
  color: var(--muted);
}
.evolution-selected-frame dd {
  margin: 5px 0 0;
  font-size: .97rem;
  font-weight: 650;
}
.dynamics-checkpoints {
  max-height: 390px;
  overflow: auto;
}
.dynamics-checkpoints table {
  width: 100%;
}
.dynamics-checkpoints thead {
  position: sticky;
  top: 0;
  background: #102631;
  z-index: 1;
}
#dynamics-plot {
  cursor: crosshair;
}
@media (max-width: 560px) {
  .evolution-selected-frame { align-items: flex-start; }
  .evolution-selected-frame dl { width: 100%; gap: 13px; }
  .evolution-storage-status .button-row { flex-direction: column; align-items: stretch; }
}
