/* ============================================================
   Double Pendulum Chaos - layout

   The stage is the hero. Under it: two readout tiles, the
   buttons, then the sliders in a grid (1 column on a phone,
   2 or 3 on wider screens).
   ============================================================ */

.dp-stage {
  cursor: grab;
  /* Square-ish on a phone, so the swing fills the screen. */
  height: clamp(300px, min(66svh, 112vw), 760px);
}
.dp-stage.is-dragging { cursor: grabbing; }
.dp-stage:focus-visible { outline-offset: -3px; }

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

/* ---- readouts --------------------------------------------- */
.dp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.dp-stat {
  display: grid;
  gap: .1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .6rem .8rem .7rem;
  min-width: 0;
}
.dp-stat-label {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.dp-stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
  line-height: 1.2;
}
.dp-stat-note { font-family: var(--font-mono); font-size: .76rem; color: var(--text-dim); }
.dp-stat.is-split { border-color: var(--amber); }
.dp-stat.is-split .dp-stat-value { color: var(--amber); }

/* ---- buttons ---------------------------------------------- */
.dp-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: .5rem; }
.dp-row .btn { min-height: var(--tap); padding-inline: .4rem; min-width: 0; }

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

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

@media (min-width: 600px) {
  .dp-sliders { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .dp-sliders { grid-template-columns: 1fr 1fr 1fr; }
}
