/* BoxLog — rubber floor, chalk, and one competition-yellow plate. */
:root {
  --floor: #1d2126;
  --panel: #262b31;
  --line: #3a4048;
  --chalk: #ecebe6;
  --dim: #9aa1a9;
  --plate: #e9b824;      /* 15 kg bumper plate */
  --plate-ink: #1d2126;
  --steel: #7fa6e0;      /* links */
  --danger: #ef8a7a;
  --head: "Bahnschrift", "DIN Alternate", "D-DIN", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 var(--body); background: var(--floor); color: var(--chalk); }
.shell { max-width: 560px; margin: 0 auto; padding: 1rem 1rem 3rem; }
a { color: var(--steel); }
:focus-visible { outline: 2px solid var(--plate); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--dim); font-weight: 400; }

h1, h2, .brand { font-family: var(--head); font-stretch: condensed; letter-spacing: 0.01em; }
h1 { font-size: 2rem; line-height: 1.1; margin: 1.25rem 0 0.75rem; }
h2 { font-size: 1.15rem; margin: 1.75rem 0 0.6rem; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 44px; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 1.35rem; font-weight: 700; }
/* the logo is a bumper plate seen edge-on-ish: a yellow disc with a hub */
.plate { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle, var(--floor) 0 22%, var(--plate) 24%); }
.back { font-weight: 600; text-decoration: none; }
.back::before { content: "‹ "; }

label { display: grid; gap: 0.3rem; font-size: 0.85rem; color: var(--dim); }
input {
  width: 100%; background: var(--floor); border: 1px solid var(--line); color: var(--chalk);
  border-radius: 6px; padding: 0.7rem 0.8rem; font: inherit; font-size: 1.1rem; min-height: 48px;
}
input:focus { outline: none; border-color: var(--plate); }
button { font: inherit; cursor: pointer; border-radius: 6px; min-height: 44px; }
button.primary {
  background: var(--plate); color: var(--plate-ink); border: 0; font-family: var(--head);
  font-weight: 700; font-size: 1.2rem; padding: 0.7rem 1rem;
}
button.primary:active { transform: translateY(1px); }
button:disabled { opacity: 0.6; }
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--dim); padding: 0.35rem 0.8rem; }
.form-error { grid-column: 1 / -1; margin: 0; color: var(--danger); font-size: 0.9rem; }
.stack { display: grid; gap: 0.9rem; max-width: 380px; }

/* the log form: exercise full width, weight + reps side by side, big button */
.log-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1rem;
}
.f-name, .log-btn { grid-column: 1 / -1; }
.f-num input { font-variant-numeric: tabular-nums; font-size: 1.4rem; text-align: center; }
.log-btn { min-height: 60px; font-size: 1.45rem; }
.log-btn.saved { animation: thunk 0.35s ease-out; }
@keyframes thunk { 0% { box-shadow: 0 0 0 0 rgba(233, 184, 36, 0.7); } 100% { box-shadow: 0 0 0 14px rgba(233, 184, 36, 0); } }
@media (prefers-reduced-motion: reduce) { .log-btn.saved { animation: none; } }

.set { font-variant-numeric: tabular-nums; white-space: nowrap; }
ol, ul { list-style: none; margin: 0; padding: 0; }

.today-list { display: grid; gap: 0.25rem; }
.today-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.today-list .ex { color: var(--dim); }
.empty { color: var(--dim); margin: 0.25rem 0; }

.exercise-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.exercise-list li { background: var(--panel); padding: 0.75rem 0.9rem; }
.ex-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.ex-head a { font-weight: 650; font-size: 1.05rem; text-decoration: none; color: var(--chalk); }
.ex-head a:hover { text-decoration: underline; }
.sets { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin-top: 0.3rem; color: var(--chalk); }

.history h1 { margin-bottom: 0; }
.history h2 { margin-top: 0.25rem; color: var(--dim); font-weight: 400; }
.history-list .day-head { margin-top: 1rem; padding-bottom: 0.25rem; color: var(--dim); font-size: 0.9rem; }
.set-row { display: flex; align-items: center; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.set-row .set { font-size: 1.1rem; }
button.del:hover, button.del[data-armed="1"] { color: var(--danger); border-color: var(--danger); }
