/* The metronome: one big number, a row of lights, and the switches under it. */

.met {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.85fr);
  gap: clamp(18px, 3vw, 36px);
  align-items: start;
}
@media (max-width: 880px) {
  .met { grid-template-columns: 1fr; }
}
.met-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.met-main { display: flex; flex-direction: column; gap: 20px; align-items: center; }

/* The beat lights. One per beat of the bar; the first is the accent, drawn
   larger so a glance at the row says what the metre is. */
.met-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 26px;
  direction: ltr;
}
.met-dots .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  transition: background-color 0.08s, transform 0.08s;
}
.met-dots .dot.first { width: 20px; height: 20px; }
.met-dots .dot.on { background: var(--accent); transform: scale(1.15); }

/* Left to right, like the slider under it: dragging right means faster, so
   the + has to be on the same side as "faster" or the two disagree. */
.met-bpm {
  display: flex;
  direction: ltr;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
}
.met-readout { text-align: center; min-width: 9ch; }
.met-value {
  display: block;
  font-size: clamp(3rem, 9vw, 4.6rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.met-unit { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.1em; }
.met-name { display: block; margin-top: 6px; color: var(--accent); font-size: 0.95rem; }

.met-step {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-raise);
  color: var(--text);
  font: 700 1.4rem/1 var(--font-ui);
  cursor: pointer;
}
.met-step:hover { border-color: var(--brass); color: var(--accent); }
.met-step:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* The range input is styled only where it is safe to: a track and a thumb,
   both vendor-prefixed, with the browser's own behaviour left alone. */
.met-slider {
  width: 100%;
  max-width: 460px;
  accent-color: var(--accent);
  direction: ltr;
}

.met-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.met-actions .btn { min-width: 120px; }
.met-tap-note { color: var(--muted); font-size: 0.8rem; min-height: 1.2em; text-align: center; }

.met-meters, .met-subs { display: flex; flex-wrap: wrap; gap: 8px; }
.met-meters .chipbtn { min-width: 56px; direction: ltr; }

.met-sound { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.met-sound label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.88rem; }
.met-sound input[type="range"] { accent-color: var(--accent); direction: ltr; }

/* The tempo table in the prose reuses table.keys; only the Italian column
   needs to stand out as a name rather than a word. */
table.keys .tempo-name { color: var(--accent); font-weight: 700; direction: ltr; }
