* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* record-set gold — the one accent for PR stars/rows/chips (Workouts tab) */
:root {
  color-scheme: light; --gold: #b8860b; }

body {
  font-family: 'Courier New', monospace;
  background: #e8e8e8;
  color: #333;
  /* Extra top clearance for the auth.ikbr.io widget: it's fixed top-right
     at the true viewport edge (not this centered, max-width column), so on
     any window narrower than roughly max-width + 2×(widget width) it
     overlaps the header's status chips — verified in a render check with
     the real widget at 1280px wide, well beyond just mobile. */
  padding: 46px 20px 20px;
  max-width: 960px;
  margin: 0 auto;
}

header {
  border-bottom: 2px solid #333;
  padding-bottom: 12px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

header h1 {
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 2px;
}
header h1 a { color: inherit; text-decoration: none; }
header h1 a:hover { text-decoration: underline; }
header h1 a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

#status-chips {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #666;
}

.chip b { color: #333; }

#login-hint {
  text-align: center;
  padding: 60px 20px;
  font-size: 14px;
}

/* auth.ikbr.io widget (fixed top-right, injected by a shared cross-app
   widget.js we don't own — see auth.ikbr.io/widget.js). It renders
   "home | <full name> logout" as one unbreakable flex row, sized by
   shrink-to-fit (only `right` is set, no `left`/`width`) with no cap; a
   long full name pushed "logout" off the visible screen on narrow phones
   (real user report). Its own CSS never sets left/width for this
   selector, so plain selectors here just add to the cascade rather than
   fighting for specificity. Pinning both left AND right gives the box a
   true definite width (shrink-to-fit is what let it overflow in the first
   place); the name is the one flexible, ellipsized item — see the mobile
   media query below, which is the only place this actually binds since
   desktop never has the problem. */
.ikbr-auth-widget .ikbr-auth-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

nav {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  /* On narrow viewports four uppercase tabs don't fit at the desktop
     padding; scroll internally rather than forcing the whole page wider
     than the screen (that page-wide overflow was also what displaced the
     fixed-position auth widget off-screen on mobile — see below). */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab {
  font-family: 'Courier New', monospace;
  background: transparent;
  color: #666;
  border: none;
  border-right: 1px solid #ccc;
  padding: 8px 20px;
  font-size: 14px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  flex: none;
  white-space: nowrap;
}

.tab:hover { background: #e0e0e0; }

.tab.active {
  background: #333;
  color: #e8e8e8;
}

.hidden { display: none !important; }

@media (max-width: 480px) {
  body { padding: 12px; padding-top: 46px; }
  /* Fixed auth widget floats top-right, independent of our own <header>
     flow — on a narrow screen there's no room beside "LIFT://" for it, so
     push page content down instead of letting them collide. */
  header h1 { font-size: 17px; }
  .tab { padding: 8px 11px; font-size: 12.5px; letter-spacing: .5px; }

  /* Pin both edges so the box gets a true definite width instead of
     shrink-to-fit (which is what let it grow past the visible screen);
     the name is then the one flexible child and can actually ellipsize
     against that fixed width. */
  .ikbr-auth-widget { left: 10px; right: 10px; top: 8px; }
  .ikbr-auth-widget .ikbr-auth-user {
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
  }
  .ikbr-auth-widget .ikbr-auth-user-name {
    display: inline-block;
    min-width: 0;
    flex: 1 1 auto;
  }

  /* Header swipe widget takes the whole column; the 12-week bars drop out
     and the week chart takes the width they freed (approved mockup,
     section 3 — folded OnePlus Open, 372px). The week chart is DRAWN at
     the phone width by renderPullPage (see puPhoneChartW) rather than CSS-
     scaled here: width:100% on a 236x74 viewBox would blow the 9px axis
     text up ~1.44x and make the pull page taller than the calendar page. */
  .wh-swipe { width: 100%; }
  .wh-pull .pu-12w { display: none; }
}

.workout {
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-left: 3px solid #ccc;
  margin-bottom: 8px;
}
/* strength vs non-strength: the one color split on the landing page.
   Reuses the Stats tab's accent (blue) / deadlift-violet tokens so the
   whole site shares one palette. */
.workout.strength { border-left-color: #2563a8; }
.workout.cardio { border-left-color: #8a4fa8; }

.workout-head {
  display: block;
  padding: 10px 14px;
  cursor: pointer;
}
/* two fixed lines (mockup A, 2026-09-18): the status block is pinned to the
   right of line 1 and never wraps; the stats live on line 2 */
.workout-head .w-l1 { display: flex; gap: 14px; align-items: center; flex-wrap: nowrap; min-width: 0; }
.workout-head .w-l1 .w-when { white-space: nowrap; }
.workout-head .w-l1 .w-lift, .workout-head .w-l1 .w-set { white-space: nowrap; }
.workout-head .w-l2 { margin-top: 6px; padding-left: 2px; }

.workout-head:hover { background: #ededed; }
.workout-head .meta { color: #666; font-size: 13px; }
/* unified heading for every activity type: category tag, bold title,
   grey key-stat (top set for strength, distance/duration for cardio),
   then weekday (coloured) + date */
.workout-head .w-cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 2px;
  border: 1px solid transparent;
}
.workout-head .w-cat.strength {
  color: #2563a8;
  background: rgba(37, 99, 168, .1);
  border-color: rgba(37, 99, 168, .35);
}
.workout-head .w-cat.cardio {
  color: #8a4fa8;
  background: rgba(138, 79, 168, .1);
  border-color: rgba(138, 79, 168, .35);
}
.workout-head .w-lift { font-weight: 600; color: #2a2a2a; }
/* star + status badge, right-aligned as one unwrappable pair (the wrapper
   takes over the badge's old margin-left:auto; inside it the badge's auto
   margin has no free space, so the shared .badge rule stays harmless) */
.workout-head .w-status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
/* ★ record-set marker (title attr = "N record sets") */
.workout-head .w-prstar {
  color: var(--gold);
  font-size: 16px;
  line-height: 1;
  cursor: default;
}
/* the sensor chip: the whole thing is the link to #/vbt/<sid> */
.w-sensor {
  /* badge height, like its neighbours: the 38 px rule is the phone page's */
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  line-height: 1.4;
  color: #2563a8;
  text-decoration: none;
  border: 1px solid #2563a8;
  border-radius: 2px;
}
.w-sensor:hover { background: #2563a8; color: #fff; }
/* the line under a workout's sets: what the sensor measured of it */
.w-sensorline { font-size: 12px; color: #6b6b66; margin: 8px 0; }
.w-sensorline a { color: #2563a8; }
.m-vchip { font-size: 11px; color: #2563a8; white-space: nowrap; }
/* sensor sessions no workout claimed, under the workout list */
.vbt-sessions .vbt-srow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  flex-wrap: wrap;
}
.vbt-sessions .vbt-pair { display: inline-flex; align-items: center; gap: 10px; }
.vbt-sessions button, .vbt-sessions select, .vbt-sessions a { min-height: 38px; }
.vbt-sessions button, .vbt-sessions select { padding: 0 12px; }
.vbt-sessions a { display: inline-flex; align-items: center; color: #2563a8; }
.workout-head .w-set { font-weight: 400; color: #6a6a6a; }
.workout-head .w-when { font-size: 13px; }
.workout-head .w-day { color: #4a90d9; font-weight: 600; }
.workout-head .w-date { color: #999; font-weight: 400; }
/* compact activity header — 26-week GitHub-calendar grid on the left (same
   weeks-as-columns / Monday-top pattern as the Stats tab's .statsv2
   .heatwrap below: div/CSS grid, no chart lib, just recoloured by category
   instead of a volume quartile) plus a compact training-load stat block
   filling the remaining width, sourced from the same /api/stats/bundle the
   Stats tab uses. Width scales with the week count (~410px of grid at 26
   weeks, roughly 40% of the header on a full-width desktop layout) while
   row count/cell size stay fixed, so height doesn't grow with history. */
.wheat {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
/* Cell size as a custom property so the media queries below can shrink it —
   grid width is 26 * (--wh-cell + 2px gap) - 2px. At the default 13px that's
   388px, which overflows a folded-phone viewport (~370-385px) once body's
   own side padding (12px each at <=480px, see body's @media below) is
   subtracted. Narrower tiers keep the grid inside that budget:
   11px -> 336px (fits down to ~360px viewport), 10px -> 310px (fits down to
   ~330px). flex-shrink:1 (not the usual flex:none) + min-width:0 on .wh-cal
   still lets the layout shrink further if needed, and .wh-scroll's
   overflow-x:auto stays as a safety net for anything narrower than we've
   tested against, but on every viewport we target the grid fits at full
   size with no panning required. */
:root { --wh-cell: 13px; }
@media (max-width: 440px) { :root { --wh-cell: 11px; } }
@media (max-width: 360px) { :root { --wh-cell: 10px; } }
.wh-cal { display: flex; flex-direction: column; flex: 0 1 auto; min-width: 0; max-width: 100%; }
/* display:flex (not block) so .wh-months/.wh-grid — each inline-flex —
   still blockify into stacked rows the way they did as direct .wh-cal
   children; a plain block wrapper here would let their inline-level outer
   display sit them side by side instead of stacked. overflow-x:auto is a
   safety net (not the primary fix, see --wh-cell above), in case a future
   week count or an untested viewport still runs past the box. */
.wh-scroll {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding-bottom: 2px;
}
.wh-months {
  display: inline-flex;
  gap: 2px;
  margin-bottom: 2px;
  font-size: 10px;
  color: #999;
  height: 12px;
}
.wh-months span { width: var(--wh-cell); flex: none; }
/* column gap (week-to-week) stays 2px — it's what buys the extra width
   from more weeks. Row gap (day-to-day, .wh-week) is trimmed to 1px so
   height doesn't grow in step with it — rows are fixed at 7 regardless
   of week count. */
.wh-grid { display: inline-flex; gap: 2px; }
.wh-week { display: flex; flex-direction: column; gap: 1px; }
.wh-cell {
  width: var(--wh-cell);
  height: var(--wh-cell);
  border-radius: 2px;
  background: #dcdcdc;
  display: inline-block;
}
.wh-cell.wh-strength { background: #2563a8; }
.wh-cell.wh-cardio { background: #8a4fa8; }
.wh-cell.wh-both { background: linear-gradient(135deg, #2563a8 50%, #8a4fa8 50%); }
/* record day — gold ring inset (box-shadow: no layout shift, follows the
   border-radius, reads on both the light empty grey and the dark
   strength/cardio fills) */
.wh-cell.wh-pr { box-shadow: inset 0 0 0 2px var(--gold); }
.wh-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.wh-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #999;
}
.wh-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #888;
}
.wh-legend .wh-cell { width: 10px; height: 10px; margin-right: 2px; }

/* ---- Workouts header swipe widget (approved mockup 2026-09-16) ----
   The 26-week calendar and the pull-up block are two pages of ONE box:
   .pages scroll-snaps horizontally (scrollbar hidden), .page is a full-
   width flex item, so both pages stretch to the same height and the
   header never jumps when you switch. Touch swipes natively; app.js adds
   dot clicks, mouse drag and ← →. Default 400px wide, full width on
   phones (see the 480px block above). */
.wh-swipe {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  width: 400px;
  display: flex;
  flex-direction: column;
}
.wh-swipe .pages {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.wh-swipe .pages::-webkit-scrollbar { display: none; }
.wh-swipe .page {
  flex: none;
  width: 100%;
  scroll-snap-align: start;
  box-sizing: border-box;
  padding-right: 8px;
}
.wh-swipe .dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  margin-top: 6px;
}
.wh-swipe .dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d0d0d0;
  display: block;
  cursor: pointer;
}
.wh-swipe .dots i.on { background: #666; }
.wh-swipe:focus-visible { outline: 2px solid #2563a8; outline-offset: 4px; }
/* pull-up page — no title label, the bar and legend say what it is */
.wh-pull { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wh-pull .pu-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.wh-pull .pu-big {
  font-size: 22px;
  font-weight: bold;
  color: #2a2a2a;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.wh-pull .pu-big .goal { font-size: 12px; color: #888; font-weight: normal; }
.wh-pull .pu-sub { font-size: 10px; color: #999; }
.wh-pull .pu-gold { color: var(--gold); }
/* progress bar renders only when a weekly goal is set */
.wh-pull .pu-bar {
  height: 4px;
  background: #e6e6e6;
  border-radius: 2px;
  width: 100%;
  max-width: 300px;
  overflow: hidden;
}
.wh-pull .pu-bar i { display: block; height: 100%; background: #c47a1e; }
.wh-pull .pu-charts {
  display: flex;
  gap: 26px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: 2px;
}
.wh-pull svg { display: block; overflow: visible; max-width: 100%; height: auto; }
.wh-pull .pu-legend {
  display: flex;
  gap: 12px;
  font-size: 10px;
  color: #777;
  margin-top: 2px;
  flex-wrap: wrap;
}
.wh-pull .pu-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  vertical-align: -1px;
  margin-right: 4px;
}
/* SVG text/line classes (body's Courier New is inherited) */
.pu-axis { font-size: 9px; fill: #999; }
.pu-goal { stroke: #444; stroke-dasharray: 3 3; stroke-width: 1; }
.pu-goal-t { font-size: 9px; fill: #555; }
/* best week — same gold as record days on the calendar */
.pu-bestw { stroke: var(--gold); stroke-width: 1.5; }
/* the tiles keep their old place beside the widget and still wrap below
   it on phones */
.wheat .wstats { flex: 1 1 220px; }
/* training-load stat block — fills the whitespace beside the calendar */
.wstats {
  display: grid;
  grid-template-columns: repeat(3, minmax(64px, 1fr));
  gap: 10px 20px;
  flex: 1;
  min-width: 220px;
  align-content: start;
}
.wstile .wsv { font-size: 17px; font-weight: bold; color: #2a2a2a; line-height: 1.1; }
.wstile .wsv .wsu { font-size: 10px; color: #888; font-weight: normal; margin-left: 2px; }
.wstile .wsl {
  font-size: 10px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 2px;
}
/* workout day-type filter */
.wfilter { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.wfchip { font: inherit; font-size: 13px; padding: 4px 11px; border: 1px solid #ccc;
  background: #fff; cursor: pointer; color: #333; }
.wfchip:hover { border-color: #4a90d9; }
.wfchip.active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.wfchip .wfn { color: #aaa; font-size: 11px; }
.wfchip.active .wfn { color: #bbb; }

.badge {
  font-size: 12px;
  border: 1px solid #ccc;
  padding: 0 8px;
  color: #b07c2a;
  margin-left: auto;
}

.badge.confirmed { color: #3a7d44; }

.workout-body {
  padding: 0 14px 12px;
  border-top: 1px solid #ddd;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}

th, td { text-align: left; padding: 4px 8px; }

th {
  color: #666;
  font-weight: normal;
  text-transform: uppercase;
  font-size: 12px;
  border-bottom: 1px solid #ccc;
}

tr + tr td { border-top: 1px solid #ddd; }
.orig { color: #999; font-size: 12px; }

.card {
  background: #f5f5f5;
  border: 1px solid #ccc;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 14px;
}

.card .meta {
  color: #666;
  font-size: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 6px;
}

.card .kind {
  color: #4a90d9;
  text-transform: uppercase;
  font-weight: bold;
}

fieldset {
  background: #f5f5f5;
  border: 1px solid #ccc;
  margin-bottom: 14px;
  padding: 12px 16px;
}

legend {
  color: #666;
  padding: 0 8px;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
}

label { margin-right: 16px; font-size: 14px; }

input, select {
  font-family: 'Courier New', monospace;
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
  padding: 4px 8px;
  font-size: 14px;
}

/* checkboxes (digest toggle, admin user flags) shouldn't inherit the
   text-input box styling above */
input[type="checkbox"] {
  width: auto;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

textarea {
  font-family: 'Courier New', monospace;
  width: 100%;
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
  padding: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}

.prompt { margin-bottom: 18px; }
.prompt-head { font-weight: bold; margin-bottom: 4px; }
.dim { color: #999; font-weight: normal; }

.prompt button, #config-save, .detail-actions button, .link-telegram-btn,
.garmin-form button, #garmin-disconnect-btn {
  font-family: 'Courier New', monospace;
  background: #333;
  color: #e8e8e8;
  border: none;
  padding: 5px 14px;
  font-size: 13px;
  cursor: pointer;
  margin-right: 8px;
}

.prompt button:hover, #config-save:hover,
.detail-actions button:hover, .link-telegram-btn:hover,
.garmin-form button:hover { background: #4a90d9; }
.link-telegram-btn:disabled, .garmin-form button:disabled {
  background: #999; cursor: default;
}
#garmin-disconnect-btn:hover { background: #c0392b; }

.detail-actions .delete-btn { background: #a8322a; }
.detail-actions .delete-btn:hover { background: #7c2620; }

.preview { color: #666; font-size: 13px; margin-bottom: 10px; }
.msg { font-size: 13px; color: #3a7d44; margin-left: 8px; }
.msg.err { color: #c0392b; }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 10px 0 4px;
  font-size: 13px;
  color: #666;
}

.stats b { color: #333; font-weight: bold; margin-right: 4px; }

.detail-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}

.correct-input { flex: 1; min-width: 240px; }

.sets-table input {
  border: 1px solid transparent;
  background: transparent;
  padding: 2px 4px;
  width: 100%;
}
.sets-table input:hover { border-color: #ccc; background: #fff; }
.sets-table input:focus { border-color: #4a90d9; background: #fff;
  outline: none; }
.sets-table .e-reps, .sets-table .e-weight { width: 72px; }
/* exercise cell = name input + (first row of an exercise block only) the
   Stats deep link. Quiet like the other row controls; the emoji is the
   whole affordance, so it sits at full opacity on hover only. */
.ex-cell { display: flex; align-items: center; gap: 4px; min-width: 0; }
.ex-cell input { flex: 0 1 32ch; min-width: 0; }   /* the icon follows the name */
.ex-stats {
  flex: none;
  background: transparent;
  border: none;
  padding: 0 2px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  opacity: .55;
}
.ex-stats:hover { opacity: 1; }
.sets-table td:nth-child(3), .sets-table td:nth-child(4) { width: 80px; }
/* record-set rows: golden left border + subtle tint; the chip lists the PR
   types under the exercise input (same slot as the .orig garmin line) */
.sets-table tr.pr-set td { background: rgba(184, 134, 11, .07); }
.sets-table tr.pr-set td:first-child { border-left: 3px solid var(--gold); }
.pr-chip {
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  margin-top: 1px;
  white-space: nowrap;
}
.del-set {
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 13px;
}
.del-set:hover { color: #c0392b; }
/* per-row insert/move controls — same quiet monochrome look as .del-set */
.set-actions { white-space: nowrap; text-align: right; }
.set-act {
  background: transparent;
  border: none;
  color: #bbb;
  cursor: pointer;
  font-size: 13px;
  padding: 0 2px;
}
.set-act:hover { color: #333; }
.set-act:disabled { color: #e6e6e6; cursor: default; }
.add-set {
  font-family: 'Courier New', monospace;
  background: transparent;
  border: 1px dashed #ccc;
  color: #666;
  padding: 4px 14px;
  font-size: 13px;
  cursor: pointer;
  margin-top: 6px;
}
.add-set:hover { border-color: #4a90d9; color: #4a90d9; }
.msg button {
  font-family: 'Courier New', monospace;
  background: #4a90d9;
  color: #fff;
  border: none;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
}
.card.feedback { margin-top: 10px; }
.note-row { display: flex; gap: 8px; align-items: flex-start;
  margin-top: 10px; }
.note-row textarea { flex: 1; margin-bottom: 0; }
.note-row button {
  font-family: 'Courier New', monospace;
  background: #333; color: #e8e8e8; border: none;
  padding: 5px 14px; font-size: 13px; cursor: pointer;
}
.note-row button:hover { background: #4a90d9; }

.empty { color: #666; padding: 32px; text-align: center; font-size: 14px; }

a { color: #4a90d9; }

/* ---- settings tab: personal section + admin block ---- */
.settings-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 3px 0;
}
.settings-row .settings-label {
  color: #666;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .05em;
  min-width: 90px;
}
.settings-row .settings-value { color: #333; font-weight: bold; font-size: 14px; }

.settings-linked { color: #3a7d44; font-size: 14px; }
.settings-linked .ok { font-weight: bold; }

.link-telegram-result { margin-top: 10px; font-size: 13px; line-height: 1.6; }
.link-telegram-result code {
  background: #fff;
  border: 1px solid #ccc;
  padding: 2px 6px;
  font-size: 13px;
  word-break: break-all;
}
.link-telegram-result a { word-break: break-all; }
.link-telegram-result .dim { color: #999; }

/* ---- workouts tab: fresh-account onboarding ---- */
.onboard p { margin-bottom: 6px; }
.onboard p:last-child { margin-bottom: 0; }
.onboard .onboard-link { margin-bottom: 10px; }
/* the connect button IS the empty state's primary action — make it big */
.onboard .link-telegram-btn { font-size: 15px; padding: 10px 22px; }
.onboard code {
  background: #fff;
  border: 1px solid #ccc;
  padding: 1px 5px;
  font-size: 13px;
}

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.garmin-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.garmin-form p { flex-basis: 100%; margin: 0 0 4px; font-size: 14px; }
.garmin-form input { flex: 1; min-width: 160px; }
#garmin-disconnect-btn { margin-top: 4px; }
/* Settings → Modules (approved prototype 2026-10-04, section 1): one row
   per module — checkbox, weekly goal, what the module adds. Off greys the
   goal out. */
.mod-row { padding: 8px 0; border-top: 1px solid #ddd; }
.mod-row:first-child { border-top: 0; padding-top: 0; }
.mod-row .garmin-form { margin-top: 6px; }
.mod-row .garmin-form label { font-size: 13px; color: #555; }
.mod-row input[type=number] { flex: none; width: 84px; min-width: 0; }
.mod-row .dim { font-size: 12.5px; margin: 4px 0 0 26px; line-height: 1.45; }
.mod-row.off .garmin-form { opacity: .45; }
/* Exercise profiles: one .garmin-form per exercise inside a single fieldset, so
   the rows need a rule between them — without one, three profiles read as a
   single run-on block and each provenance line looks like a caption for the
   NEXT exercise. The threshold field is the pull-ups goal's width for the same
   reason it is: a two-decimal number in a 160px box is a box, not a number. */
.xp-row { padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid #ddd; }
.xp-row:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: none; }
.xp-row input[type="number"] { flex: none; width: 84px; min-width: 0; }

.settings-admin-heading {
  margin: 26px 0 12px;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #666;
  border-bottom: 1px solid #ccc;
  padding-bottom: 6px;
}

.admin-users-table td, .admin-users-table th { white-space: nowrap; }

/* ---- stats tab (Progression Lab) ---- */
.statsv2{
  /* neutral scheme matching the rest of the dashboard (Workouts/Analytics/
     Settings are #f5f5f5 + white cards) — NOT the warm cream of early mockups */
  --bg:#f5f5f5; --surface:#ffffff; --surface-2:#eeeeee; --line:#dcdcdc;
  --ink:#333333; --muted:#6b6b6b; --faint:#9a9a9a;
  --accent:#2563a8; --amber:#c47a1e; --slate:#7d94b5; --pr:#2f8f4e;
  --down:#b5462f; --grid:#ececec; --radius:3px;
  --s-e1rm:#2563a8; --s-top:#c47a1e; --s-vol:#8a4fa8; --s-trend:#7d94b5;
  --dt0:#2f6fb3; --dt1:#c47a1e; --dt2:#8a4fa8;
  --h0:#e4e4e4; --h1:#c9d3e0; --h2:#9fb2cc; --h3:#6f8cb5; --h4:#3f6aa3;
  --mono:ui-monospace,"SF Mono","JetBrains Mono",Menlo,Consolas,monospace;
  --rail:256px;
  font-family:var(--mono);
  color:var(--ink);
  background:var(--bg);
  font-variant-numeric:tabular-nums;
  font-size:13px;
  line-height:1.45;
}
/* light only: no dark theme anywhere (Igor, 2026-09-18) */

/* The Stats tab: the CONTENT column stays aligned with the site's 960px
   header/tab column; the rail hangs out to the LEFT of it (clamped so it
   never leaves the viewport on narrower windows). Desktop-only — and for
   Stats, "desktop" starts at 1080px (statsNarrow in app.js): below that
   there is no rail (chip row instead), and the few-px negative margin the
   clamp still produced would nudge the whole tab off-grid. */
@media (min-width: 1080px) {
  #tab-stats{
    --railout:max(0px, min(var(--sv-rail, 256px), calc((100vw - 100%)/2 - 16px)));
    width:calc(100% + var(--railout));
    margin-left:calc(-1 * var(--railout));
  }
}
.statsv2 .sv-app{max-width:none;}
.statsv2 h1, .statsv2 h2, .statsv2 h3{margin:0;font-weight:700;}
.statsv2 button{font-family:inherit;color:inherit;}
.statsv2 .sv-app{display:flex;max-width:1200px;margin:0 auto;min-height:100vh;}
/* reset the app's global tab-bar <nav> styling for the rail's nav */
.statsv2 nav{display:block;border:none;background:none;margin:0;gap:0;}

.statsv2 .mbar{display:none;position:sticky;top:0;z-index:25;background:var(--surface);
  border-bottom:1px solid var(--line);padding:10px 14px;align-items:center;gap:12px;}
.statsv2 .mbar button.burger{background:none;border:1px solid var(--line);border-radius:3px;padding:5px 9px;font-size:16px;cursor:pointer;line-height:1;}
.statsv2 .mbar .mtitle{font-weight:700;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.statsv2 .backdrop{display:none;position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:29;}

.statsv2 .rail{width:var(--rail);flex:none;border-right:1px solid var(--line);background:var(--surface);
  position:sticky;top:0;align-self:flex-start;max-height:100vh;overflow-y:auto;padding:18px 14px 40px;}
.statsv2 .railsum{font-size:11px;color:var(--faint);padding:0 4px 12px;line-height:1.45;border-bottom:1px solid var(--line);margin-bottom:10px;}
.statsv2 .railsum b{color:var(--muted);}
.statsv2 .rgroup{margin-bottom:15px;}
.statsv2 .rglabel{font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--faint);font-weight:700;padding:0 4px 6px;}
.statsv2 .ritem{display:flex;align-items:baseline;gap:8px;width:100%;text-align:left;background:none;border:none;
  border-radius:3px;padding:5px 7px;cursor:pointer;font-size:13px;line-height:1.3;}
.statsv2 .ritem:hover{background:var(--surface-2);}
.statsv2 .ritem:focus-visible{outline:2px solid var(--s-e1rm);outline-offset:-2px;}
.statsv2 .ritem.active{background:var(--ink);color:var(--bg);}
.statsv2 .ritem .rn{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.statsv2 .ritem .rc{font-size:10.5px;color:var(--faint);}
.statsv2 .ritem.active .rc{color:var(--surface-2);}
.statsv2 .ritem .rv{font-size:12px;font-weight:700;white-space:nowrap;}
.statsv2 .ritem .rv em{font-style:normal;color:var(--muted);font-weight:400;font-size:10.5px;}
.statsv2 .ritem.active .rv em{color:var(--surface-2);}
.statsv2 .ritem.main .rn{font-weight:700;}
.statsv2 .tr{font-size:10px;margin-left:2px;}
.statsv2 .tr.up{color:var(--pr);}
.statsv2 .tr.down{color:var(--down);}
.statsv2 .tr.flat{color:var(--faint);}
.statsv2 .ritem.active .tr.up{color:#9be8b4;}
.statsv2 .ritem.active .tr.down{color:#f0a892;}
.statsv2 .pritem{padding:4px 7px;font-size:11.5px;color:var(--muted);line-height:1.4;}
.statsv2 .pritem b{color:var(--ink);}
.statsv2 .pritem .prtag{color:var(--pr);font-weight:700;font-size:10px;letter-spacing:.05em;}

.statsv2 .content{flex:1;min-width:0;padding:24px 28px 90px;}
.statsv2 .content h1{margin:0 0 2px;font-size:19px;}
.statsv2 .sub{color:var(--muted);font-size:12px;margin-bottom:14px;}
.statsv2 .filters{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:16px;}
.statsv2 .chip{font-family:inherit;font-size:12px;border:1px solid var(--line);background:var(--surface);color:var(--ink);
  border-radius:3px;padding:4px 10px;cursor:pointer;}
.statsv2 .chip:hover{background:var(--surface-2);}
.statsv2 .chip.active{background:var(--ink);color:var(--bg);border-color:var(--ink);}
.statsv2 .chip:focus-visible{outline:2px solid var(--s-e1rm);outline-offset:1px;}
.statsv2 .fgroup{display:flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--line);
  border-radius:3px;padding:4px 10px;font-size:11.5px;color:var(--muted);}
.statsv2 .fgroup .fv{color:var(--ink);font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums;}
.statsv2 .dslider{position:relative;width:190px;height:22px;flex:none;touch-action:none;cursor:pointer;}
.statsv2 .dtrack{position:absolute;left:7px;right:7px;top:9px;height:4px;background:var(--line);border-radius:2px;}
.statsv2 .dfill{position:absolute;top:9px;height:4px;background:var(--s-e1rm);border-radius:2px;opacity:.75;}
.statsv2 .dthumb{position:absolute;top:4px;width:14px;height:14px;border-radius:50%;background:var(--s-e1rm);
  border:2px solid var(--surface);box-shadow:0 0 0 1px var(--line);box-sizing:border-box;
  transform:translateX(-50%);cursor:grab;touch-action:none;}
.statsv2 .dthumb:active{cursor:grabbing;}
.statsv2 .dthumb:focus-visible{outline:2px solid var(--s-e1rm);outline-offset:2px;}
.statsv2 .panel{background:var(--surface);border:1px solid var(--line);border-radius:3px;padding:16px 18px 14px;margin-bottom:20px;}
.statsv2 .ptitle{font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--faint);font-weight:700;}
.statsv2 .phead{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:4px;}
.statsv2 .phead .big{font-size:14.5px;font-weight:700;}
.statsv2 .pnote{font-size:11.5px;color:var(--muted);margin:4px 0 10px;max-width:70ch;}
.statsv2 .legend{display:flex;gap:14px;flex-wrap:wrap;font-size:11.5px;color:var(--muted);margin:2px 0 8px;}
.statsv2 .lg{display:flex;align-items:center;gap:6px;}
.statsv2 .sw{width:14px;height:3px;border-radius:2px;display:inline-block;}
.statsv2 .sw.dot{width:8px;height:8px;border-radius:50%;}
.statsv2 .lgi{cursor:pointer;user-select:none;border-radius:3px;padding:1px 4px;}
.statsv2 .lgi:hover{background:var(--surface-2);}
.statsv2 .lgi.off{opacity:.35;}
.statsv2 .tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px;margin-bottom:18px;}
.statsv2 .tile{background:var(--surface);border:1px solid var(--line);border-radius:3px;padding:10px 12px;}
.statsv2 .tile .tv{font-size:17px;font-weight:700;}
.statsv2 .tile .tv em{font-style:normal;font-size:11px;color:var(--muted);font-weight:400;}
.statsv2 .tile .tl{font-size:10.5px;color:var(--faint);letter-spacing:.08em;text-transform:uppercase;margin-top:2px;}
.statsv2 .chartwrap{position:relative;overflow-x:auto;}
.statsv2 svg{display:block;}
/* ---- pull-ups panel (approved mockup 2026-09-16, section 4) ----
   amber = reps sent to the bot over blue = bodyweight sets inside
   workouts, gold = the best week. Light theme only (house rule): every
   colour here is a theme token or the fixed series colour from the spec. */
.statsv2 .pu-chart{display:block;width:100%;height:auto;overflow:visible;}
.statsv2 .sv-axis{font-size:10px;fill:var(--faint);font-family:var(--mono);}
.statsv2 .sv-grid{stroke:var(--grid);stroke-width:1;}
.statsv2 .sv-best{font-size:9.5px;fill:var(--gold);font-family:var(--mono);font-weight:700;letter-spacing:.08em;}
.statsv2 .sw.box{width:11px;height:11px;border-radius:2px;}
.statsv2 .sw.pu-lgbest{background:var(--surface);box-shadow:inset 0 0 0 2px var(--gold);}
.statsv2 .pu-facts{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:10px 20px;margin:6px 0 14px;}
.statsv2 .pu-facts .v{font-size:17px;font-weight:700;font-variant-numeric:tabular-nums;}
.statsv2 .pu-facts .v small{font-size:11px;font-weight:400;color:var(--muted);margin-left:5px;}
.statsv2 .pu-facts .v.best{color:var(--gold);}
.statsv2 .pu-facts .l{font-size:10px;color:var(--faint);text-transform:uppercase;letter-spacing:.04em;}
.statsv2 .pu-wk{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:14px 0 4px;}
.statsv2 .pu-wk button{font-family:var(--mono);font-size:12px;border:1px solid var(--line);
  background:var(--surface);border-radius:3px;padding:2px 8px;cursor:pointer;color:var(--ink);}
.statsv2 .pu-wk button:hover:not([disabled]){background:var(--surface-2);}
.statsv2 .pu-wk button[disabled]{opacity:.4;cursor:default;}
.statsv2 .pu-wk .wl{font-size:12.5px;font-weight:700;}
.statsv2 .pu-wk .wt{font-size:11.5px;color:var(--muted);}
.statsv2 .pu-list{font-size:11.5px;color:var(--muted);margin:6px 0 0;line-height:1.6;}
.statsv2 .pu-list b{color:var(--ink);font-weight:700;}
.statsv2 .pu-grid2{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:14px;}
.statsv2 .pu-grid2 h4{margin:0 0 4px;font-size:10.5px;letter-spacing:.12em;
  text-transform:uppercase;color:var(--faint);font-weight:700;}
.statsv2 .ttip{position:fixed;pointer-events:none;background:var(--surface);border:1px solid var(--line);border-radius:3px;
  padding:7px 9px;font-size:11px;line-height:1.5;box-shadow:0 2px 8px rgba(0,0,0,.12);display:none;z-index:40;max-width:280px;}
.statsv2 .ttip .tk{color:var(--muted);}
.statsv2 .tblbtn{margin-top:8px;}
.statsv2 .tbl{width:100%;border-collapse:collapse;font-size:11.5px;margin-top:8px;}
.statsv2 .tbl th,.statsv2 .tbl td{border:1px solid var(--line);padding:3px 7px;text-align:right;white-space:nowrap;}
.statsv2 .tbl th{background:var(--surface-2);font-weight:700;}
.statsv2 .tbl td:first-child,.statsv2 .tbl th:first-child{text-align:left;}
.statsv2 .tblwrap{overflow-x:auto;}
/* ---- running detail panels (approved prototype v3, 2026-10-18) ----
   Comeback tiles, the "now / before" share rows and the section headings
   under the charts. Series colours (pace bands, HR zones) are inline from
   app.js; light only. */
.statsv2 .facts3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px 16px;margin:6px 0 18px;}
.statsv2 .facts3 .v{font-size:22px;font-weight:700;font-variant-numeric:tabular-nums;}
.statsv2 .facts3 .v small{font-size:11px;font-weight:400;color:var(--muted);margin-left:5px;}
.statsv2 .facts3 .l{font-size:10px;color:var(--faint);text-transform:uppercase;letter-spacing:.04em;}
.statsv2 .facts3 .was{font-size:11px;color:var(--muted);margin-top:1px;}
.statsv2 .facts3 .was b{color:var(--ink);font-weight:700;}
.statsv2 .facts3 .up{color:var(--pr);}
.statsv2 .facts3 .dn{color:var(--down);}
.statsv2 .rd-h4{margin:0 0 4px;font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--faint);font-weight:700;}
.statsv2 .sw.rd-dash{height:0;border-top:2px dashed var(--slate);border-radius:0;}
.statsv2 .rd-stack{display:flex;flex-direction:column;gap:8px;margin:8px 0 4px;}
.statsv2 .rd-srow{display:grid;grid-template-columns:150px 1fr;gap:10px;align-items:center;font-size:11.5px;}
.statsv2 .rd-srow .sl{color:var(--muted);}
.statsv2 .rd-srow .sl b{color:var(--ink);}
.statsv2 .rd-bar{display:flex;height:16px;border-radius:2px;overflow:hidden;gap:2px;background:var(--surface);}
.statsv2 .rd-bar span{display:block;height:100%;min-width:0;}
/* Wide tables whose HEADERS carry a phrase rather than a word: the numbers
   still never wrap, but a six-column header row in Russian is 1030px of
   nowrap text and scrolls the date column out of sight at 1440. Opt-in, so
   every other table on the page keeps the single-line header it fits in. */
.statsv2 .tbl.wrapth th{white-space:normal;}
.statsv2 .hid{display:none;}
.statsv2 .warn{font-size:11.5px;color:var(--muted);border:1px dashed var(--line);border-radius:3px;padding:8px 10px;margin-top:6px;}
.statsv2 .cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px;margin:8px 0;}
.statsv2 .card{border:1px solid var(--line);border-radius:3px;padding:9px 11px;background:var(--surface);box-shadow:none;margin:0;}
.statsv2 .card .cv{font-size:15px;font-weight:700;}
.statsv2 .card .cl{font-size:10.5px;color:var(--faint);text-transform:uppercase;letter-spacing:.08em;}
.statsv2 .card .cs{font-size:11px;color:var(--muted);margin-top:2px;}
.statsv2 .sparkrow{display:flex;align-items:center;gap:10px;padding:5px 2px;border-bottom:1px solid var(--grid);cursor:pointer;}
.statsv2 .sparkrow:hover{background:var(--surface-2);}
.statsv2 .sparkrow .sn{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;}
.statsv2 .sparkrow .spr{width:88px;text-align:right;font-size:10.5px;color:var(--faint);}
.statsv2 .sparkcell{display:flex;align-items:center;gap:4px;border-radius:3px;padding:1px 3px;cursor:pointer;}
.statsv2 .sparkcell:hover{background:var(--surface-2);outline:1px solid var(--line);}
.statsv2 .movers{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px;margin-bottom:14px;}
.statsv2 .mover{border:1px solid var(--line);border-radius:3px;padding:9px 12px;cursor:pointer;background:var(--surface);}
.statsv2 .mover:hover{background:var(--surface-2);}
.statsv2 .mover.focused{border-color:var(--ink);box-shadow:0 0 0 1px var(--ink);}
.statsv2 .mover .ml{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--faint);display:flex;align-items:center;gap:6px;}
.statsv2 .mover .mv2{font-size:14.5px;font-weight:700;margin-top:2px;}
.statsv2 .mover .md{font-size:10.5px;color:var(--faint);margin-top:1px;}
.statsv2 .repgrid{display:grid;grid-template-columns:repeat(12,minmax(52px,1fr));gap:4px;margin-top:8px;overflow-x:auto;}
.statsv2 .repcell{border:1px solid var(--line);border-radius:3px;padding:6px 4px;text-align:center;min-width:52px;}
.statsv2 .repcell .rr{font-size:10px;color:var(--faint);}
.statsv2 .repcell .rw{font-size:13px;font-weight:700;}
.statsv2 .repcell .rd{font-size:9.5px;color:var(--faint);}
/* on colored (record) cells all text goes full ink for contrast */
.statsv2 .repcell:not(.est) .rr,.statsv2 .repcell:not(.est) .rd{color:var(--ink);}
.statsv2 .repcell.est .rw{color:var(--faint);font-weight:400;}
.statsv2 .repcell.recent{border:2px solid var(--ink);}
.statsv2 .insight{font-size:12px;color:var(--muted);border-left:3px solid var(--s-e1rm);padding:4px 10px;margin-top:12px;}
.statsv2 .insight b{color:var(--ink);}
.statsv2 .prfeed{margin-top:6px;}
.statsv2 .prrow{display:flex;gap:10px;align-items:baseline;padding:4px 2px;border-bottom:1px solid var(--grid);font-size:12px;}
.statsv2 .prrow .pd{color:var(--faint);font-size:11px;width:78px;flex:none;}
.statsv2 .prrow .ptag{font-size:9.5px;font-weight:700;letter-spacing:.06em;padding:1px 5px;border-radius:2px;flex:none;}
.statsv2 .ptag.w{background:var(--dt1);color:#fff;}
.statsv2 .ptag.r{background:var(--pr);color:#fff;}
.statsv2 .ptag.e{background:var(--s-e1rm);color:#fff;}
/* the fifth PR kind. Without a colour of its own the tag renders as unstyled
   text in a row of coloured ones, which reads as a rendering fault rather than
   a category — so it takes the one remaining slot of the stats palette. */
.statsv2 .ptag.v{background:var(--s-vol);color:#fff;}
.statsv2 .empty{color:var(--muted);padding:20px 0;font-size:13px;text-align:left;}

/* ---- extended data (sensor) — approved mockup 2026-09-18 ----
   The tab row is drawn the way the dashboard draws tabs, at the 38px control
   height its touch targets use, and scrolls sideways rather than wrapping so
   the five tabs keep one row at phone width. */
.statsv2 .xtabs{display:flex;gap:0;border:1px solid #ccc;background:#f5f5f5;
  overflow-x:auto;-webkit-overflow-scrolling:touch;margin:14px 0 10px;}
.statsv2 .xtab{font-family:var(--mono);background:transparent;color:#666;border:none;
  border-right:1px solid #ccc;min-height:38px;padding:8px 16px;font-size:12px;
  cursor:pointer;text-transform:uppercase;letter-spacing:1px;flex:none;white-space:nowrap;}
.statsv2 .xtab:hover:not([disabled]){background:#e0e0e0;}
.statsv2 .xtab.active{background:#333;color:#e8e8e8;}
.statsv2 .xtab:focus-visible{outline:2px solid var(--s-e1rm);outline-offset:-2px;}
.statsv2 .xpane{border:1px solid var(--line);border-top:none;padding:12px 12px 10px;
  margin-top:-10px;min-height:120px;}
.statsv2 .xsrc{font-size:11px;color:var(--faint);}
.statsv2 .xtitle{font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--faint);font-weight:700;margin:18px 0 0;}
.statsv2 .xt-strip .tile{min-width:120px;}
.statsv2 .tile .ts{font-size:10.5px;color:var(--muted);margin-top:3px;}
/* chart ink */
.statsv2 .xchart{width:100%;height:auto;}
.statsv2 .sv-axisline{stroke:var(--line);stroke-width:1;}
.statsv2 .sv-axtitle{fill:var(--muted);font-family:var(--mono);}
.statsv2 .sv-rep{fill:var(--slate);fill-opacity:.55;}
.statsv2 .sv-bestrep{fill:var(--s-top);fill-opacity:.95;stroke:#fff;stroke-width:1.2;}
.statsv2 .sv-fit{stroke:var(--s-e1rm);stroke-width:2;}
.statsv2 .sv-mvt{stroke:var(--ink);stroke-width:1.4;stroke-dasharray:6 4;stroke-opacity:.75;}
/* the inline labels sit ON the chart, so each is knocked out of the surface
   colour first — otherwise a gridline or a rep dot reads straight through it */
.statsv2 .sv-mvtlab{fill:var(--ink);font-family:var(--mono);
  paint-order:stroke;stroke:var(--surface);stroke-width:3px;stroke-linejoin:round;}
.statsv2 .sv-drop{stroke:var(--gold);stroke-width:1;stroke-dasharray:3 3;stroke-opacity:.8;}
.statsv2 .sv-est{fill:var(--gold);}
.statsv2 .sv-estlab{fill:var(--gold);font-family:var(--mono);font-weight:700;
  paint-order:stroke;stroke:var(--surface);stroke-width:3px;stroke-linejoin:round;}
.statsv2 .sv-wdot{stroke:#fff;stroke-width:1.2;}
.statsv2 .sv-wlab{font-family:var(--mono);paint-order:stroke;stroke:var(--surface);
  stroke-width:3px;stroke-linejoin:round;}
/* legend swatches whose ink is not a flat colour */
.statsv2 .sw-rep{background:var(--slate);}
.statsv2 .sw-best{background:var(--s-top);}
.statsv2 .sw-fit{background:var(--s-e1rm);}
.statsv2 .sw-mvt{background:repeating-linear-gradient(90deg,var(--ink) 0 5px,transparent 5px 9px);}
.statsv2 .sw-est{background:var(--gold);}

/* ---- loss & effort, bottom time, technique (approved mockup 2026-09-18) ----
   Four grade colours (the same four the bands, the dots and the session strip
   all use, so one hue means one verdict everywhere on the page) and a five-step
   weight ramp for the bottom-time scatter, where colour is the load. */
.statsv2{--g-easy:#2f8f4e;--g-mod:#2563a8;--g-hard:#c47a1e;--g-max:#b5462f;
  --h0:#a3c2de;--h1:#7aa5cc;--h2:#4d84b6;--h3:#2a5f95;--h4:#153c66;}
.statsv2 .g-easy{fill:var(--g-easy);stroke:var(--g-easy);}
.statsv2 .g-mod{fill:var(--g-mod);stroke:var(--g-mod);}
.statsv2 .g-hard{fill:var(--g-hard);stroke:var(--g-hard);}
.statsv2 .g-max{fill:var(--g-max);stroke:var(--g-max);}
.statsv2 .sw.g-easy{background:var(--g-easy);}
.statsv2 .sw.g-mod{background:var(--g-mod);}
.statsv2 .sw.g-hard{background:var(--g-hard);}
.statsv2 .sw.g-max{background:var(--g-max);}
.statsv2 .sw.sw-size{background:var(--faint);width:11px;height:11px;}
/* the bands are the chart's background: barely there, so the dots read first */
.statsv2 .bd{opacity:.10;stroke:none;}
.statsv2 .bdedge{stroke-width:1;stroke-dasharray:5 4;opacity:.55;fill:none;}
.statsv2 .bdlab{font-family:var(--mono);font-weight:700;stroke:none;}
.statsv2 .bdnum{fill:var(--faint);font-family:var(--mono);stroke:none;}
.statsv2 .lsdot{stroke:#fff;stroke-width:1.2;fill-opacity:.88;}
.statsv2 .xstrip{margin-top:2px;}
.statsv2 .stc{stroke:#fff;stroke-width:1;fill-opacity:.85;}
.statsv2 .stord{fill:#fff;font-family:var(--mono);font-weight:700;}
.statsv2 .stnum{fill:var(--muted);font-family:var(--mono);}
.statsv2 .stlab{fill:var(--faint);font-family:var(--mono);}
.statsv2 .btdot{stroke:#fff;stroke-width:.8;fill-opacity:.9;}
.statsv2 .h0{fill:var(--h0);} .statsv2 .h1{fill:var(--h1);}
.statsv2 .h2{fill:var(--h2);} .statsv2 .h3{fill:var(--h3);}
.statsv2 .h4{fill:var(--h4);}
.statsv2 .sw.h0{background:var(--h0);} .statsv2 .sw.h1{background:var(--h1);}
.statsv2 .sw.h2{background:var(--h2);} .statsv2 .sw.h3{background:var(--h3);}
.statsv2 .sw.h4{background:var(--h4);}
.statsv2 .multi{display:flex;gap:10px;flex-wrap:wrap;}
.statsv2 .multi .mcell{flex:1 1 220px;min-width:0;}
.statsv2 .two{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-start;}
.statsv2 .two .twocell:first-child{flex:0 1 330px;min-width:0;}
.statsv2 .two .twocell:last-child{flex:1 1 380px;min-width:0;}
.statsv2 .tq{stroke:#fff;stroke-width:.7;fill-opacity:.6;}
.statsv2 .tq-drift{fill:var(--s-top);}
.statsv2 .tq-lateral{fill:var(--s-vol);}
.statsv2 .tq-wobble{fill:var(--slate);}
.statsv2 .sw.tq-drift{background:var(--s-top);}
.statsv2 .sw.tq-lateral{background:var(--s-vol);}
.statsv2 .sw.tq-wobble{background:var(--slate);}
.statsv2 .tqover{fill-opacity:.85;stroke:#fff;stroke-width:.6;}
.statsv2 .tqnote{fill:var(--faint);font-family:var(--mono);}
.statsv2 .sw.sw-over{background:var(--faint);border-radius:0;
  clip-path:polygon(50% 0,100% 100%,0 100%);width:10px;height:9px;}
.statsv2 .tqmed{fill:none;stroke:var(--ink);stroke-width:1.6;stroke-opacity:.7;}
.statsv2 .tqmeddot{fill:var(--ink);fill-opacity:.7;stroke:#fff;stroke-width:1;}
.statsv2 .sw.sw-med{background:var(--ink);opacity:.7;}
.statsv2 .xpref{fill:none;stroke:var(--ink);stroke-linejoin:round;
  stroke-linecap:round;}
.statsv2 .xpworst{fill:none;stroke:var(--down);stroke-linejoin:round;
  stroke-linecap:round;stroke-opacity:.9;}
.statsv2 .sw.sw-ref{background:var(--ink);}
.statsv2 .sw.sw-worst{background:var(--down);}
.statsv2 .hbar{fill:var(--s-e1rm);fill-opacity:.55;}
.statsv2 .sw.sw-hb{background:var(--s-e1rm);opacity:.55;width:11px;height:11px;}
.statsv2 .hmed{stroke:var(--ink);stroke-width:1.4;stroke-dasharray:5 4;}
.statsv2 .hworst{stroke:var(--down);stroke-width:1.2;stroke-dasharray:3 3;}
.statsv2 .hmedlab{fill:var(--ink);font-family:var(--mono);font-weight:700;
  paint-order:stroke;stroke:var(--surface);stroke-width:3px;stroke-linejoin:round;}
.statsv2 .hworstlab{fill:var(--down);font-family:var(--mono);
  paint-order:stroke;stroke:var(--surface);stroke-width:3px;stroke-linejoin:round;}
.statsv2 .sw.sw-med2{background:repeating-linear-gradient(90deg,var(--ink) 0 5px,transparent 5px 9px);}
@media (max-width: 759px){
  .statsv2 .xpane{padding:10px 6px 8px;}
  .statsv2 .xtab{padding:8px 11px;font-size:11px;letter-spacing:.5px;}
  /* one chart per row at phone width: three 280-wide boxes side by side are
     three unreadable boxes */
  .statsv2 .multi{display:block;}
  .statsv2 .multi .mcell{margin-bottom:8px;}
  .statsv2 .two{display:block;}
}

/* (The old ≤900px content-padding tweak and ≤760px rail-as-drawer styles
   are gone: the rail/mbar shell now only renders at ≥1080px — below that
   app.js renders the chip-rail shell, styled in the ≤1079px block.) */

/* ============================================================
   Narrow view (<760px) — mobile redesign (approved concept:
   mobile-lab). Everything below binds only under the media
   query; desktop (≥760px) is untouched. Mobile-only DOM
   (#bottom-nav, .m-* classes) is rendered by app.js only when
   narrow, so these rules are inert on desktop anyway.
   ============================================================ */
@media (max-width: 759px) {
  /* room for the fixed bottom nav */
  body { padding-bottom: 76px; }

  /* --- compact header: brand + one status line (concept .m-top) --- */
  header { display: block; padding-bottom: 8px; margin-bottom: 14px; }
  header h1 { font-size: 15px; }
  #status-chips { display: block; font-size: 10.5px; color: #999; }
  #status-chips .m-sub { color: #999; }

  /* --- bottom navigation (concept .m-nav) --- */
  #app > nav { display: none; }         /* top tab row hides on narrow */
  #bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    display: flex;
    background: #f5f5f5;
    border-top: 1px solid #ccc;
    padding-bottom: env(safe-area-inset-bottom);
  }
  #bottom-nav button {
    flex: 1;
    font-family: 'Courier New', monospace;
    background: none;
    border: none;
    color: #999;
    padding: 8px 0 10px;
    font-size: 10px;
    letter-spacing: .06em;
    cursor: pointer;
  }
  #bottom-nav button .ico { display: block; font-size: 17px; margin-bottom: 1px; }
  #bottom-nav button.active { color: #333; font-weight: 700; }

  /* --- shared chip geometry (concept .m-chip) --- */
  .m-chip {
    flex: none;
    font-family: 'Courier New', monospace;
    font-size: 11.5px;
    border: 1px solid #ccc;
    border-radius: 14px;
    background: #fff;
    color: #333;
    padding: 4px 11px;
    white-space: nowrap;
    cursor: pointer;
  }
  .m-chip.primary { background: #333; color: #f5f5f5; border-color: #333; }
  .m-chip.danger { color: #b5462f; border-color: #b5462f; }

  /* --- workouts: filter chips become a horizontal scroll row --- */
  .wfilter {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .wfilter::-webkit-scrollbar { display: none; }
  .wfchip {
    flex: none;
    white-space: nowrap;
    border-radius: 14px;
    font-size: 11.5px;
    padding: 4px 11px;
  }
  /* header heatmap pans inside its own container, scrollbar hidden */
  .wh-scroll { scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .wh-scroll::-webkit-scrollbar { display: none; }

  /* --- workout card head: two lines (concept .m-whead) --- */
  .workout-head { display: block; padding: 9px 11px; }
  .m-wtitle { font-size: 12.5px; font-weight: 700; line-height: 1.35; }
  .m-wmeta { display: flex; gap: 6px; align-items: center; margin-top: 3px; flex-wrap: wrap; }
  .m-badge {
    font-size: 9px;
    letter-spacing: .05em;
    border: 1px solid #ccc;
    border-radius: 2px;
    padding: 1px 6px;
    color: #666;
    margin: 0;
  }
  .m-badge.ok { background: #333; color: #f5f5f5; border-color: #333; }
  .m-star { color: var(--gold); font-size: 15px; line-height: 1; }

  /* --- sets as rows (concept .m-setrow) --- */
  .workout-body { padding: 0; }
  .workout-body .stats { padding: 8px 11px 0; }
  .m-setrow {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border-bottom: 1px solid #e4e4e4;
  }
  .m-setrow:last-of-type { border-bottom: none; }
  .m-setrow.pr {
    border-left: 3px solid var(--gold);
    background: rgba(184, 134, 11, .07);
  }
  .m-setnum { font-size: 10px; color: #999; width: 22px; flex: none;
    display: flex; flex-direction: column; align-items: center; gap: 3px; }
  .m-setnum .ex-stats { font-size: 15px; padding: 2px 0; opacity: .85; }
  .m-setmain { flex: 1; min-width: 0; }
  .m-setmain .orig { font-size: 10px; }
  input.m-setex {
    width: 100%;
    font-size: 11.5px;
    font-weight: 700;
    border: 1px solid transparent;
    background: transparent;
    padding: 1px 2px;
    text-overflow: ellipsis;
  }
  /* weight × reps is the headline of a set (Igor, 2026-09-09: at 11px it
     was the smallest text on the card): big bold numbers, the unit and the
     × demoted to small grey marks so the digits carry the row. Input
     widths are in ch (monospace: 1ch = one digit) — 5 digits of weight
     ("122.5"), 3 of reps — so the inputs hug the numbers instead of
     reserving 52px each. The PR chip may wrap under the numbers. */
  .m-setwr { display: flex; align-items: baseline; flex-wrap: wrap;
    column-gap: 2px; margin-top: 2px; }
  .m-setwr input {
    width: 5.6ch;
    font-size: 19px;
    font-weight: 700;
    color: #222;
    border: 1px solid transparent;
    background: transparent;
    padding: 0 2px;
    line-height: 1.15;
    -moz-appearance: textfield;
  }
  .m-setwr input::-webkit-outer-spin-button,
  .m-setwr input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
  /* weights right-aligned so 'kg ×' lines up down the card (60 / 100 /
     122.5 read as one column), reps left-aligned after it */
  .m-setwr .e-weight { text-align: right; }
  .m-setwr .e-reps { width: 3.6ch; }
  .m-setwr .m-unit { font-size: 10px; color: #999; margin-right: 6px; }
  .m-setwr .m-times { font-size: 14px; color: #999; margin-right: 2px; }
  .m-setrow input:hover { border-color: #ccc; background: #fff; }
  .m-setrow input:focus { border-color: #4a90d9; background: #fff; outline: none; }
  .m-prchip { font-size: 9.5px; color: var(--gold); font-weight: 700;
    flex-basis: 100%; }
  .m-setact { display: flex; gap: 2px; flex: none; }
  .m-setact button {
    width: 30px;
    height: 30px;
    padding: 0;
    font-size: 13px;
    border-radius: 3px;
  }
  .m-setact button:active { background: #e0e0e0; }
  .m-addrow { padding: 8px 11px; }
  .m-addrow .add-set { margin: 0; border-radius: 14px; font-size: 11.5px; padding: 4px 11px; }

  /* --- editing tools stack (concept) --- */
  .m-tools {
    padding: 9px 11px;
    border-top: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    gap: 7px;
  }
  .m-tools .correct-input, .m-tools .note-input {
    width: 100%;
    min-width: 0;
    font-size: 11.5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 8px 10px;
    background: #fff;
    margin: 0;
  }
  .m-toolrow {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .m-toolrow::-webkit-scrollbar { display: none; }
  .workout-body .card.feedback { margin: 8px 11px 10px; }

  /* --- analytics entries as cards (concept) --- */
  .m-acard { background: #f5f5f5; border: 1px solid #ccc; margin-bottom: 10px; cursor: pointer; }
  .m-acard .m-ahead { padding: 9px 11px; }
  .m-acard .m-wmeta { margin: 0 0 3px; }
  .m-adate { font-size: 10px; color: #999; }
  .m-acard .a-body { font-size: 11.5px; line-height: 1.55; color: #666; }
  .m-acard:not(.open) .a-body {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .m-acard.open .a-body { color: #333; }

  /* --- settings: stacked full-width cards, full-width inputs --- */
  #tab-settings fieldset { padding: 11px 12px; }
  #tab-settings input[type="text"],
  #tab-settings input[type="email"],
  #tab-settings input[type="password"] {
    width: 100%;
    padding: 9px 10px;
    font-size: 12px;
  }
  .garmin-form input { flex: 1 1 100%; min-width: 0; }
  .settings-row { flex-wrap: wrap; }
  .prompt button, #config-save, .link-telegram-btn,
  .garmin-form button, #garmin-disconnect-btn {
    border-radius: 14px;
    padding: 6px 14px;
    font-size: 12px;
  }

}

/* ============================================================
   Stats tab narrow layout (<1080px) — the .statsv2 chip-rail
   shell. Wider range than the global 759px breakpoint above:
   the desktop stats canvas (256px rail + ~1200px content)
   crushes at foldable/tablet widths (OnePlus Open inner screen
   ≈ 810–930 CSS px, iPad portrait 768–1024), so Stats alone
   goes narrow up to 1079px while the rest of the site keeps
   its desktop layout from 760px. Keep in sync with statsNarrow
   in app.js, which renders this shell's DOM (#sv-chips, .m-*)
   only under the same query.
   ============================================================ */
@media (max-width: 1079px) {
  /* chip geometry: duplicated from the global .m-chip (759px block above)
     because between 760 and 1079px that block no longer binds, and the
     stats chips must keep their shape there */
  .statsv2 .m-chip {
    flex: none;
    font-family: inherit;
    font-size: 11.5px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--ink);
    padding: 4px 11px;
    white-space: nowrap;
    cursor: pointer;
  }
  .statsv2 .m-chip b { font-weight: 700; }
  .statsv2 .m-chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  /* pinned horizontal chip row replacing the rail (concept .m-chips) */
  .statsv2 .m-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 2px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    position: sticky;
    top: 0;
    z-index: 25;
  }
  .statsv2 .m-chips::-webkit-scrollbar { display: none; }
  .statsv2 .content { padding: 12px 0 40px; }
  .statsv2 .content h1 { font-size: 15px; }
  /* tiles 2-col (concept .m-tiles); ≥600px relaxes to 3–4 cols below */
  .statsv2 .tiles { grid-template-columns: 1fr 1fr; gap: 7px; }
  .statsv2 .tile { padding: 8px 10px; }
  .statsv2 .tile .tv { font-size: 15px; }
  /* time filter chips + dual slider go full width */
  .statsv2 .filters .fgroup { flex: 1 1 100%; }
  .statsv2 .dslider { flex: 1; width: auto; min-width: 120px; }
  /* movers become a horizontal snap-scroll strip (concept .m-movers) */
  .statsv2 .movers {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .statsv2 .movers::-webkit-scrollbar { display: none; }
  .statsv2 .mover { flex: 0 0 78%; scroll-snap-align: start; }
  /* rep-record matrix becomes a horizontal strip (concept .m-reps) */
  .statsv2 .repgrid {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .statsv2 .repgrid::-webkit-scrollbar { display: none; }
  .statsv2 .repcell { flex: 0 0 58px; min-width: 0; padding: 5px 4px; }
  .statsv2 .repcell .rr { font-size: 9px; }
  .statsv2 .repcell .rw { font-size: 12px; }
  .statsv2 .repcell .rd { font-size: 8.5px; }
  /* health check rows stack (concept .m-hcrow) */
  .statsv2 .m-hcrow { border-bottom: 1px solid var(--grid); padding: 7px 0; cursor: pointer; }
  .statsv2 .m-hcrow:hover { background: var(--surface-2); }
  .statsv2 .m-hcname {
    font-size: 12px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
  }
  .statsv2 .m-hcname .hcx { font-size: 9.5px; color: var(--faint); font-weight: 400; }
  .statsv2 .m-hcsparks {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    margin-top: 4px;
  }
  .statsv2 .m-hccell { display: block; text-align: center; padding: 0; cursor: pointer; }
  .statsv2 .m-hccell .lab {
    display: block;
    font-size: 8.5px;
    letter-spacing: .06em;
    color: var(--faint);
    text-transform: uppercase;
  }
  .statsv2 .m-hccell .d { display: block; font-size: 10.5px; font-weight: 700; }
  /* charts fit the panel — no forced min-width scroll on narrow */
  .statsv2 .chartwrap { overflow-x: hidden; }
  .statsv2 .pu-grid2 { grid-template-columns: 1fr; }
  .statsv2 .pu-facts { grid-template-columns: 1fr 1fr; }
  /* running detail: tiles and the run card's three columns stack */
  .statsv2 .facts3 { grid-template-columns: 1fr; }
  .statsv2 .grid3 { grid-template-columns: 1fr; }
  .statsv2 .rd-srow { grid-template-columns: 1fr; gap: 2px; }
  /* same axis type size the other stats charts use at narrow (axisFont) —
     the pull-up charts are redrawn at container width there, so 10px
     labels would crowd the 7 timeline columns */
  .statsv2 .sv-axis { font-size: 8.5px; }
}

/* concept's ≥600px "relaxed" narrow variant (foldable open, tablet): the
   tile grid relaxes to 3–4 columns; everything else keeps the narrow
   stats layout */
@media (min-width: 600px) and (max-width: 1079px) {
  .statsv2 .tiles { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

/* ---- run card (Workouts → a running workout's page; approved prototype v3,
   2026-10-18). Outside .statsv2, so it carries the same tokens itself.
   Light only. ---- */
.runcard{
  --surface:#ffffff; --surface-2:#eeeeee; --line:#dcdcdc; --ink:#333333;
  --muted:#6b6b6b; --faint:#9a9a9a; --grid:#ececec;
  --mono:ui-monospace,"SF Mono","JetBrains Mono",Menlo,Consolas,monospace;
  font-family:var(--mono);color:var(--ink);font-size:13px;line-height:1.45;
  font-variant-numeric:tabular-nums;padding:6px 0 10px;
}
.runcard .kv{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px 16px;padding:4px 0 2px;}
.runcard .kv b{display:block;font-size:15px;font-weight:700;}
.runcard .kv i{display:block;font-style:normal;font-size:10px;color:var(--faint);text-transform:uppercase;letter-spacing:.04em;}
.runcard h4{margin:16px 0 4px;font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--faint);font-weight:700;}
.runcard .legend{display:flex;gap:14px;flex-wrap:wrap;font-size:11.5px;color:var(--muted);margin:2px 0 8px;}
.runcard .lg{display:flex;align-items:center;gap:6px;}
.runcard .sw{width:14px;height:3px;border-radius:2px;display:inline-block;}
.runcard .sw.box{width:11px;height:11px;border-radius:2px;}
.runcard .chartwrap{position:relative;overflow-x:auto;}
.runcard svg.pu-chart{display:block;width:100%;height:auto;overflow:visible;}
.runcard .sv-axis{font-size:10px;fill:var(--faint);font-family:var(--mono);}
.runcard .sv-grid{stroke:var(--grid);stroke-width:1;}
.runcard .grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;}
.runcard .grid3>*{min-width:0;}
.runcard .sblock h4{margin:0 0 6px;}
.runcard .rd-bar{display:flex;height:16px;border-radius:2px;overflow:hidden;gap:2px;background:var(--surface);}
.runcard .rd-bar span{display:block;height:100%;min-width:0;}
.runcard .lrows{display:grid;grid-template-columns:auto 1fr auto auto;gap:3px 8px;align-items:center;margin-top:8px;font-size:11.5px;}
.runcard .lrow{display:contents;}
.runcard .lrow .ln{color:var(--muted);}
.runcard .lrow .lp{text-align:right;font-weight:700;}
.runcard .lrow .lt{text-align:right;color:var(--faint);}
.runcard .tblwrap{overflow-x:auto;}
.runcard .tbl{width:100%;border-collapse:collapse;font-size:11.5px;margin-top:8px;}
.runcard .tbl th,.runcard .tbl td{border:1px solid var(--line);padding:3px 7px;text-align:right;white-space:nowrap;}
.runcard .tbl th{background:var(--surface-2);font-weight:700;}
.runcard .tbl td:first-child,.runcard .tbl th:first-child{text-align:left;}
.runcard .tbl tr.fast td{background:rgba(138,79,168,.08);}
.rc-tip{position:fixed;pointer-events:none;background:#fff;border:1px solid #dcdcdc;border-radius:3px;
  padding:7px 9px;font-size:11px;line-height:1.5;box-shadow:0 2px 8px rgba(0,0,0,.12);display:none;z-index:40;
  max-width:280px;color:#333;font-family:ui-monospace,"SF Mono","JetBrains Mono",Menlo,Consolas,monospace;}
.rc-tip .tk{color:#6b6b6b;}
@media (max-width: 759px){
  /* the narrow workout body has no side padding of its own (its .stats
     line pads itself), so the card does the same */
  .runcard{padding:8px 11px 4px;}
  .runcard .grid3{grid-template-columns:1fr;}
  .runcard .chartwrap{overflow-x:hidden;}
  .runcard .sv-axis{font-size:8.5px;}
}
/* the prototype's table heads: lowercase, ink, same size as the cells
   (the global th rule uppercases every other table) */
.statsv2 .rd-tbl th,.runcard .rd-tbl th{text-transform:none;color:var(--ink);font-size:11.5px;}

/* main lift picker (top of the workout page) */
.main-lift { display: flex; align-items: center; gap: 10px; padding: 10px 0 2px; font-size: 13px; }
.main-lift label { font-weight: bold; color: #333; }
.main-lift select { font-size: 13px; padding: 3px 6px; }
.main-lift.m { padding: 9px 11px 0; font-size: 12px; }
.main-lift.m select { flex: 1; min-width: 0; min-height: 32px; font-size: 13px; }
