/* ============================================================
   Epidemic Sim - layout

   The stage holds the dots AND the chart. Under it: counts,
   the peak, Play / New run / Compare, then the sliders.
   ============================================================ */

.ep-stage {
  cursor: pointer;
  height: clamp(340px, min(66svh, 150vw), 720px);
}
.ep-stage:focus-visible { outline-offset: -3px; }

.ep-controls {
  display: grid;
  gap: .8rem;
  width: 100%;
  max-width: 860px;
  margin-inline: auto;
  padding: 1rem clamp(1rem, 4vw, 1.25rem) 0;
}

.ep-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .3rem .8rem;
  font-size: .9rem;
  color: var(--text-dim);
}
.ep-legend li { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.ep-legend output { margin-left: auto; font-family: var(--font-mono); color: var(--text); }
.ep-dot { width: .75rem; height: .75rem; border-radius: 50%; flex: none; }
.ep-dot.is-healthy { background: var(--cyan); }
.ep-dot.is-sick { background: var(--hot); }
.ep-dot.is-recovered { background: #9AA1BC; }
.ep-dot.is-vaccinated { background: var(--green); }

.ep-peak { margin: 0; font-family: var(--font-mono); font-size: .85rem; color: var(--amber); }
.ep-hint { margin: -.3rem 0 0; font-size: .85rem; color: var(--text-dim); }

.ep-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.ep-row .btn { min-height: var(--tap); padding-inline: .3rem; min-width: 0; font-size: .9rem; }
.ep-row .btn[aria-pressed="true"]#compare {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--text);
}

.ep-sliders { display: grid; gap: .2rem 1.2rem; }
.ep-slider { display: grid; gap: .05rem; font-size: .9rem; color: var(--text-dim); min-width: 0; }
.ep-slider span { display: flex; justify-content: space-between; gap: .5rem; }
.ep-slider output { font-family: var(--font-mono); color: var(--text); }
.ep-slider input {
  width: 100%;
  height: var(--tap);
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.ep-try {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .7rem .9rem;
  color: #C9CEE2;
}

@media (min-width: 640px) {
  .ep-legend { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ep-sliders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
