/* Near-black to match the room the gym is actually in. One accent colour.
   Calm and serious — no neon, no confetti, no badges. */
:root {
  --ink: #08090a;
  --surface: #121417;
  --surface-2: #1b1f24;
  --line: #2a2f36;
  --text: #f2f4f6;
  --muted: #8a939e;
  --accent: #f0522b;
  --accent-dim: #7a2a16;
}

* { box-sizing: border-box; }

html { background: var(--ink); color-scheme: dark; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-tap-highlight-color: transparent;
}

main { max-width: 30rem; margin: 0 auto; padding: 1rem 1rem 3rem; }

h1 { font-size: 2.25rem; line-height: 1.1; letter-spacing: -0.02em; margin: 0.25rem 0 0; }
h2 { font-size: 1.25rem; margin: 0; }
h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

a { color: inherit; }

/* Sweaty thumbs: a mis-tap must never select text instead of pressing. */
button { font: inherit; user-select: none; touch-action: manipulation; cursor: pointer; border: 0; }

.home {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.5rem;
}

.big-button {
  width: 100%;
  padding: 3rem 1.5rem;
  border-radius: 1rem;
  background: var(--accent);
  color: var(--ink);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.big-button:active { background: var(--accent-dim); }

.quiet { color: var(--muted); font-size: 0.875rem; text-align: center; }
.quiet p { margin: 0.25rem 0; }
.quiet.left { text-align: left; }
.spaced { margin-top: 1.5rem !important; }
.back { color: var(--muted); font-size: 0.875rem; }
.eyebrow {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 1rem;
}

.panel { background: var(--surface-2); border-radius: 1rem; padding: 1rem; }

/* The most important box in the app. */
.feel-it {
  background: rgba(240, 82, 43, 0.1);
  border: 2px solid var(--accent);
  border-radius: 1rem;
  padding: 1rem;
}
.feel-it h3 { color: var(--accent); font-size: 0.8125rem; }
.feel-it p { margin: 0; }
.feel-it.big { font-size: 1.0625rem; font-weight: 600; }

.cues ul { margin: 0 0 1.25rem; padding-left: 1.1rem; }
.cues li { margin-bottom: 0.5rem; }
.cues li::marker { color: var(--accent); }
.cues > h3 { margin-top: 1.25rem; }
.cues .feel-it, .cues .panel { margin: 1.25rem 0; }

.link-button {
  display: block;
  text-align: center;
  background: var(--surface-2);
  border-radius: 1rem;
  padding: 1rem;
  font-weight: 600;
  text-decoration: none;
}
.link-button:active { background: var(--line); }

/* ---- active workout ---- */
.last-time {
  background: var(--surface);
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  font-size: 1.0625rem;
  margin: 0.75rem 0 0;
}
.last-time strong { font-weight: 700; }
.last-time .label { color: var(--muted); }

.maxed { color: var(--muted); font-size: 0.8125rem; margin: 0.5rem 0 0; }

.disclose {
  width: 100%;
  text-align: left;
  background: var(--surface-2);
  color: var(--text);
  border-radius: 1rem;
  padding: 1rem;
  font-weight: 600;
  margin-top: 0.75rem;
}

.steppers { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.stepper { flex: 1; }
.stepper .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.stepper .row { display: flex; gap: 0.5rem; }
.stepper button {
  width: 3.25rem;
  background: var(--surface-2);
  color: var(--text);
  border-radius: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
}
.stepper button:active { background: var(--line); }
.stepper .value {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1rem 0;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stepper .hint {
  text-align: center;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.25rem;
  min-height: 1rem;
}

.log-set {
  width: 100%;
  margin-top: 1rem;
  padding: 2rem 1.5rem;
  border-radius: 1rem;
  background: var(--accent);
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 800;
}
.log-set:active { background: var(--accent-dim); }

.set-list { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.set-list .set {
  display: flex;
  justify-content: space-between;
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}
.set-list .set .n { color: var(--muted); }
.undo {
  display: block;
  width: 100%;
  background: none;
  color: var(--muted);
  font-size: 0.75rem;
  text-decoration: underline;
  padding: 0.5rem;
}

.nav-button {
  width: 100%;
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 1rem;
  background: none;
  color: var(--text);
  border: 2px solid var(--line);
  font-size: 1.25rem;
  font-weight: 700;
}
.nav-button.finish { border-color: var(--accent); color: var(--accent); }
.nav-button:active { background: var(--surface-2); }

/* ---- rest timer ---- */
.timer {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ink);
  padding: 0.5rem 0 0.75rem;
}
.timer .body {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border-radius: 1rem;
  padding: 1.25rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.timer .fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--accent-dim);
  transition: width 0.25s linear;
}
.timer .count {
  position: relative;
  font-size: 2.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.timer .controls { position: relative; display: flex; gap: 0.5rem; }
.timer .controls button {
  background: var(--surface-2);
  color: var(--text);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.timer .controls button:active { background: var(--line); }

/* ---- progress ---- */
section { margin-bottom: 2.5rem; }
.progress-line { color: var(--accent); margin: 0.25rem 0 0.75rem; }
.chart { width: 100%; height: auto; display: block; }
.chart-label { fill: var(--muted); font-size: 10px; font-family: inherit; }
