/* Evolved hallucination (evolve.js). Site tokens only, from ../_shared/tokens.css. */
.evolve { container-type: inline-size; display: grid; gap: 16px; min-width: 0; }
.evolve figure { margin: 0; }
.ev-head { display: grid; gap: 6px; }
.ev-lede { margin: 0; font: 400 var(--step-0)/1.5 var(--font-display); color: var(--ink); max-width: 62ch; }

.ev-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; }
.ev-field { display: grid; gap: 4px; min-width: 0; }
.ev-seg { display: flex; }
.ev-seg button + button { border-left: 0; }
.ev-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.evolve select {
  font: 400 var(--step--1)/1 var(--font-ui); color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--radius); padding: 0 8px; height: 35px; /* = button */
  max-width: 100%;
}
.evolve button:disabled, .evolve select:disabled { opacity: 0.45; cursor: not-allowed; }
.evolve button:not(.primary):disabled:hover { background: transparent; color: var(--ink); }
.evolve button.primary:disabled { filter: none; }

.ev-body { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@container (min-width: 720px) {
  .ev-body { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
}
.ev-stage { display: grid; gap: 8px; }
.ev-frame { position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.ev-canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.ev-tag { position: absolute; top: 8px; left: 8px; }
.ev-hint {
  position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 16px;
  text-align: center; color: var(--muted); font-size: var(--step--1); max-width: none;
}
.ev-stage figcaption { display: grid; gap: 2px; font-size: var(--step--1); color: var(--muted); }
.ev-progress { font-size: var(--step--1); }
.ev-progress:empty { display: none; }
.ev-status { color: var(--ink); }

.ev-side { display: grid; gap: 12px; min-width: 0; }
.ev-panel {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 12px; display: grid; gap: 8px; min-width: 0;
}
.ev-panel h3 { margin: 0; }

.ev-pop { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.ev-pop figure { display: grid; gap: 2px; min-width: 0; }
.ev-pop canvas, .ev-film canvas {
  display: block; width: 100%; height: auto; aspect-ratio: 1; background: var(--bg);
  outline: 1px solid var(--rule); outline-offset: -1px;
}
.ev-pop .is-best canvas { outline: 2px solid var(--box); outline-offset: -2px; }
.ev-pop figcaption, .ev-film figcaption {
  font: 400 11px/1.2 var(--font-data); color: var(--muted); text-align: center;
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden;
}
.ev-pop .is-best figcaption { color: var(--box); }

.ev-chart { display: block; width: 100%; height: auto; overflow: visible; }
.ev-grid { stroke: var(--rule); stroke-width: 1; }
.ev-goal { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.ev-axis { fill: var(--muted); font: 400 9px var(--font-data); }
.ev-dots { stroke: var(--scan); stroke-width: 2.5; stroke-linecap: round; opacity: 0.45; }
.ev-line { fill: none; stroke: var(--box); stroke-width: 2; stroke-linejoin: round; }
.ev-now { fill: var(--box); }

.ev-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ev-top:empty::before { content: "Nothing yet"; color: var(--muted); font-size: var(--step--1); }
.ev-top li {
  display: grid; grid-template-columns: minmax(0, 7.5em) minmax(0, 1fr) auto; align-items: center; gap: 8px;
  font: 400 var(--step--1)/1.3 var(--font-data);
}
.ev-top-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-top-p { color: var(--muted); font-variant-numeric: tabular-nums; }
.ev-bar { height: 8px; background: var(--bg); border-radius: var(--radius); overflow: hidden; }
.ev-bar i { display: block; height: 100%; background: var(--muted); }
.ev-top .is-target .ev-bar i { background: var(--box); }
.ev-top .is-target .ev-top-label, .ev-top .is-target .ev-top-p { color: var(--box); }

.ev-film { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.ev-film:empty::before { content: "Snapshots of the best image appear here as it evolves."; color: var(--muted); font-size: var(--step--1); }
.ev-film figure { display: grid; gap: 2px; min-width: 0; }
