/* Simulation results section (#simulation). Shares the comparison colours used by the
   contact-projection section so "ours" reads the same way across the page. */
:root {
  --sim-ours: #3f5fc4;
  --sim-ours-bg: #e9eefb;
  --sim-muted: #6b6b6b;
  --sim-ok: #1e8449;
  --sim-bad: #c0392b;
}

#simulation .sim-intro p { margin-bottom: 1rem; }
#simulation h3.title { margin-top: 2.75rem; margin-bottom: 1rem; }

/* ── success-rate chart ──────────────────────────────────────────────────── */
.sim-chart { margin: 1.5rem auto 0; max-width: 860px; }
.sim-chart img { display: block; width: 100%; height: auto; }
.sim-chart figcaption {
  text-align: center; color: var(--sim-muted); font-size: 0.8rem; line-height: 1.45;
  max-width: 700px; margin: 0.6rem auto 0;
}

/* ── side-by-side rollouts ───────────────────────────────────────────────── */
.sim-compare { background: #fff; border-radius: 10px; padding: 1rem 1rem 0.9rem; max-width: 820px; margin: 0 auto; }

.sim-tabs { display: flex; justify-content: center; gap: 0.35rem; margin-bottom: 0.8rem; }
.sim-tabs button {
  border: 1px solid #dcdcdc; background: #fafafa; color: #4a4a4a; border-radius: 999px;
  padding: 0.35rem 1rem; font: inherit; font-size: 0.9rem; cursor: pointer;
}
.sim-tabs button.is-active { background: #c0cef5; border-color: #7a9be8; color: #1a1a2e; font-weight: 600; }

.sim-dots { display: flex; justify-content: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.sim-dot {
  width: 0.65rem; height: 0.65rem; padding: 0; border: none; border-radius: 50%;
  background: #c4c4c4; cursor: pointer; transition: background 0.2s ease;
}
.sim-dot:hover { background: #999; }
.sim-dot.is-active { background: #363636; }

.sim-case { text-align: center; font-size: 0.88rem; color: #363636; margin: 0 0 0.7rem; }
.sim-case b { font-weight: 600; }

.sim-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
.sim-side h5 {
  font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; text-align: center;
  color: #7a7a7a; margin: 0 0 0.3rem; font-weight: 600;
}
.sim-side.is-ours h5 { color: var(--sim-ours); }

/* fixed frame: the two rollouts keep their box whatever is playing */
.sim-side .stage {
  position: relative; aspect-ratio: 640 / 368; border-radius: 6px; overflow: hidden;
  background: #fff; border: 1px solid #e2e2e2;
}
.sim-side.is-ours .stage {
  background: var(--sim-ours-bg); border-color: #7a9be8;
  box-shadow: 0 0 0 3px var(--sim-ours-bg);
}
.sim-side .stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.sim-side .stage video[hidden] { display: none; }

.sim-cap {
  display: flex; justify-content: center; align-items: center; gap: 0.3rem;
  margin-top: 0.35rem; font-size: 0.86rem; line-height: 1.2;
}
.sim-cap.is-ok { color: var(--sim-ok); }
.sim-cap.is-bad { color: var(--sim-bad); }

@media screen and (max-width: 768px) {
  .sim-grid { grid-template-columns: 1fr; gap: 0.9rem; }
  .sim-side h5 { font-size: 0.7rem; }
  .sim-cap { font-size: 0.8rem; }
}
