/* LiftLog — dark steel + brass, plate-color semantics, condensed athletic numerals */
:root {
  --bg: #0E0F12;
  --panel: #16181D;
  --panel2: #1D2026;
  --line: #262A31;
  --ink: #ECE9E2;
  --mut: #8B909A;
  --brass: #D9A441;
  --brass-dim: #8a6a2c;
  --plate-red: #C94F3D;
  --plate-green: #4C9A6B;
  --plate-blue: #4A7FC1;
  --plate-white: #D8D5CD;
  --radius: 12px;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", -apple-system, system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.45;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
#view { max-width: 560px; margin: 0 auto; padding: 18px 16px 24px; }

h1 {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: 42px; line-height: 0.95; letter-spacing: 0.01em; margin: 6px 0 2px;
}
h2 {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: 20px; letter-spacing: 0.06em; color: var(--mut); margin: 22px 0 8px;
}
.eyebrow { color: var(--mut); font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em; }
.mut { color: var(--mut); }
.small { font-size: 13px; }
.num { font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; margin: 10px 0;
}
.card.flat { background: transparent; }

.badge {
  display: inline-block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--mut);
}
.badge.coach { color: var(--brass); border-color: var(--brass-dim); }
.badge.warn { color: var(--plate-red); border-color: var(--plate-red); }

button, .btn {
  font-family: var(--body); font-size: 16px; font-weight: 600;
  background: var(--brass); color: #17130a; border: 0; border-radius: 10px;
  padding: 13px 18px; width: 100%; cursor: pointer;
}
button.ghost, .btn.ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--line); width: auto; padding: 8px 14px;
}
button.warn { color: var(--plate-red); }
button:active { transform: translateY(1px); }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

input[type="number"], input[type="search"], input[type="text"] {
  background: var(--panel2); border: 1px solid var(--line); color: var(--ink);
  font-family: var(--display); font-size: 22px; font-weight: 600; text-align: center;
  border-radius: 8px; padding: 8px 4px; width: 74px;
  font-variant-numeric: tabular-nums;
}
input[type="search"], input[type="text"] {
  font-family: var(--body); font-size: 16px; font-weight: 400; text-align: left; width: 100%; padding: 10px 12px;
}

/* Exercise / set rows */
.exrow { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.exrow:last-child { border-bottom: 0; }
.exname { font-weight: 600; }
.exnote { font-size: 13px; color: var(--mut); }
.target { margin-left: auto; white-space: nowrap; color: var(--mut); font-size: 15px; }
.grow { flex: 1; }

.setrow { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.setrow .idx { width: 18px; color: var(--mut); font-size: 13px; }
.setrow .x { color: var(--mut); }
.setrow .done {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--mut); font-size: 20px; padding: 0; flex: none;
}
.setrow .done.on { background: var(--plate-green); border-color: var(--plate-green); color: #08120c; }

/* Plate stack glyph — the signature: what to load per side */
.plates { display: inline-flex; align-items: center; gap: 2px; height: 22px; vertical-align: middle; }
.plates i { display: inline-block; width: 5px; border-radius: 2px; }
.plates .p45  { height: 22px; background: var(--plate-blue); }
.plates .p35  { height: 19px; background: var(--brass); }
.plates .p25  { height: 16px; background: var(--plate-green); }
.plates .p10  { height: 12px; background: var(--plate-white); }
.plates .p5   { height: 9px;  background: var(--plate-red); }
.plates .p2_5 { height: 7px;  background: var(--mut); }

/* Recovery bars */
.recrow { display: grid; grid-template-columns: 92px 1fr 52px; align-items: center; gap: 10px; padding: 6px 0; }
.recbar { height: 8px; border-radius: 4px; background: var(--panel2); overflow: hidden; }
.recbar i { display: block; height: 100%; border-radius: 4px; }

/* Charts */
svg.chart { width: 100%; height: 200px; display: block; }
.chartline { fill: none; stroke: var(--brass); stroke-width: 2; }
.chartdot { fill: var(--brass); }
.axis { stroke: var(--line); stroke-width: 1; }
.axislabel { fill: var(--mut); font-size: 11px; font-family: var(--body); }

/* Heat strip */
.heat { display: grid; grid-template-columns: repeat(26, 1fr); gap: 3px; }
.heat i { aspect-ratio: 1; border-radius: 2px; background: var(--panel2); }
.heat i.on { background: var(--brass); }

/* Tabs */
.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 5;
  display: flex; background: rgba(14,15,18,.92); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
  flex: 1; text-align: center; padding: 9px 0 7px; text-decoration: none;
  color: var(--mut); font-size: 11px; letter-spacing: .04em;
}
.tabs a .glyph { display: block; font-size: 19px; line-height: 1.15; }
.tabs a.active { color: var(--brass); }

/* Rest timer bar */
.timerbar {
  position: fixed; left: 0; right: 0; bottom: calc(52px + env(safe-area-inset-bottom)); z-index: 6;
  background: var(--panel2); border-top: 1px solid var(--line);
}
.timerfill { position: absolute; inset: 0; background: rgba(217,164,65,.14); transform-origin: left; }
.timerrow { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.timerrow strong { font-family: var(--display); font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }

.list a { display: block; color: inherit; text-decoration: none; padding: 10px 0; border-bottom: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chips span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--panel2); color: var(--mut); }
.imgs { display: flex; gap: 8px; overflow-x: auto; border-radius: var(--radius); }
.imgs img { height: 200px; border-radius: var(--radius); background: var(--panel2); }
ol.steps { padding-left: 20px; } ol.steps li { margin: 6px 0; }
.stack > * + * { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.right { margin-left: auto; }
.logline { font-size: 12px; color: var(--mut); font-family: ui-monospace, monospace; padding: 2px 0; }

@media (prefers-reduced-motion: no-preference) {
  .setrow .done.on { animation: pop .18s ease-out; }
  @keyframes pop { 50% { transform: scale(1.15); } }
}
