/* ---------- tokens ---------- */
:root {
  --bg: #0b0d10;
  --bg-elev: #14181d;
  --bg-elev-2: #1b2027;
  --line: #262d36;
  --line-soft: #1e242b;
  --text: #eef2f6;
  --text-dim: #9aa6b4;
  --text-faint: #6b7784;
  --accent: #4ade80;
  --accent-ink: #07130c;
  --accent-soft: rgba(74, 222, 128, .12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .12);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 30px rgba(0, 0, 0, .35);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7f9;
    --bg-elev: #ffffff;
    --bg-elev-2: #eff2f5;
    --line: #e2e6ea;
    --line-soft: #ebeef1;
    --text: #10151b;
    --text-dim: #5b6775;
    --text-faint: #8b95a1;
    --accent: #16a34a;
    --accent-ink: #ffffff;
    --accent-soft: rgba(22, 163, 74, .10);
    --warn: #b45309;
    --warn-soft: rgba(180, 83, 9, .10);
    --shadow: 0 8px 30px rgba(20, 30, 45, .10);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-wrap: break-word;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
.footnote a, .prose a { text-decoration: underline; text-underline-offset: 2px; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.pad-b { padding-bottom: calc(40px + var(--safe-b)); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
  padding-top: var(--safe-t);
}
.topbar-in {
  max-width: 720px; margin: 0 auto; padding: 10px 8px;
  display: flex; align-items: center; gap: 8px; min-height: 52px;
}
.iconbtn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 12px; border-radius: 999px; color: var(--text-dim);
  font-size: 15px; font-weight: 550; transition: background .15s, color .15s;
}
.iconbtn:hover { background: var(--bg-elev-2); color: var(--text); }
.iconbtn svg { width: 18px; height: 18px; flex: none; }
.topbar-title {
  flex: 1; text-align: center; font-size: 14px; font-weight: 650;
  color: var(--text-dim); letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-right { min-width: 72px; display: flex; justify-content: flex-end; }
.counter {
  font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 650;
  color: var(--text-dim); background: var(--bg-elev-2);
  padding: 6px 11px; border-radius: 999px;
}

/* progress hairline */
.progressbar { height: 2px; background: var(--line-soft); }
.progressbar > i { display: block; height: 100%; background: var(--accent); transition: width .3s ease; }

/* ---------- headings ---------- */
.hero { padding: 28px 0 22px; }
.hero h1 { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -.02em; font-weight: 750; }
.hero p { margin: 8px 0 0; color: var(--text-dim); font-size: 15px; }
.eyebrow {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.sechead {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-faint); margin: 26px 0 10px;
}

/* ---------- day cards ---------- */
.daycard {
  display: flex; align-items: stretch; gap: 0;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 12px; overflow: hidden;
  transition: border-color .15s, transform .08s;
}
.daycard:active { transform: scale(.995); }
.daycard:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.daycard-main { flex: 1; text-align: left; padding: 16px 4px 16px 18px; min-width: 0; }
.daycard-num {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent);
}
.daycard-title {
  font-size: 18px; font-weight: 700; letter-spacing: -.012em; margin-top: 3px; line-height: 1.32;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.daycard-sub {
  color: var(--text-dim); font-size: 13.5px; margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.daycard-meta { color: var(--text-faint); font-size: 12.5px; margin-top: 8px; }
.daycard-go {
  flex: none; width: 74px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  background: var(--accent-soft); color: var(--accent);
  border-left: 1px solid var(--line); font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}
.daycard-go:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.daycard-go svg { width: 22px; height: 22px; }

/* ---------- exercise list ---------- */
.exlist { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-elev); }
.exrow {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line-soft);
  transition: background .12s;
}
.exrow:last-child { border-bottom: 0; }
.exrow:hover { background: var(--bg-elev-2); }
.exrow-n {
  flex: none; width: 30px; height: 30px; border-radius: 9px;
  background: var(--bg-elev-2); color: var(--text-dim);
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.exrow.done .exrow-n { background: var(--accent); color: var(--accent-ink); }
.exrow-body { flex: 1; min-width: 0; }
.exrow-name { display: block; font-weight: 620; font-size: 15.5px; letter-spacing: -.005em; }
.exrow-name small { font-weight: 500; color: var(--text-faint); }
.exrow-meta { display: block; color: var(--text-dim); font-size: 13px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.exrow-chev { flex: none; color: var(--text-faint); display: flex; }
.exrow-chev svg { width: 18px; height: 18px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 20px; border-radius: 13px; font-weight: 650; font-size: 15.5px;
  background: var(--bg-elev-2); color: var(--text);
  border: 1px solid var(--line); transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; }

/* ---------- exercise detail ---------- */
.ex-head { padding: 22px 0 4px; }
.ex-head h1 { margin: 0; font-size: 27px; line-height: 1.18; letter-spacing: -.022em; font-weight: 750; }
.ex-head .ex-sub { color: var(--text-dim); font-size: 14.5px; margin-top: 5px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 4px; }
.stat {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 12px; text-align: center;
}
.stat b { display: block; font-size: 19px; font-weight: 720; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text-faint); margin-top: 3px; }

.card {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 17px; margin-top: 14px;
}
.callout {
  border-radius: var(--radius); padding: 13px 15px; margin-top: 14px;
  font-size: 14.5px; line-height: 1.5; border: 1px solid transparent;
}
.callout b { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 4px; }
.callout-note { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 28%, transparent); }
.callout-note b { color: var(--accent); }
.callout-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.callout-warn b { color: var(--warn); }

/* video */
.video { margin-top: 16px; border-radius: var(--radius); overflow: hidden; background: #000; position: relative; aspect-ratio: 16/9; }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-poster { width: 100%; height: 100%; display: block; position: relative; padding: 0; }
.video-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-poster::after {
  content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .28);
}
.play {
  position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; z-index: 1;
  border-radius: 50%; background: rgba(255, 255, 255, .95); color: #111;
  display: grid; place-items: center; box-shadow: 0 6px 24px rgba(0, 0, 0, .45);
  pointer-events: none;
}
.play svg { width: 26px; height: 26px; margin-left: 3px; }
.video-poster:hover .play { background: #fff; }
.videolink {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 10px;
  font-size: 14px; font-weight: 600; color: var(--text-dim); text-decoration: none;
}
.videolink:hover { color: var(--text); }
.videolink svg { width: 16px; height: 16px; }

/* image gallery */
.gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px; margin-top: 12px;
}
.shot {
  position: relative; border-radius: var(--radius-sm); overflow: hidden; margin: 0;
  background: #fff; border: 1px solid var(--line); aspect-ratio: 1/1;
}
.shot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.shot span {
  position: absolute; left: 7px; top: 7px; font-size: 10px; font-weight: 750;
  letter-spacing: .08em; padding: 3px 7px; border-radius: 6px;
  background: rgba(13, 17, 22, .82); color: #fff;
}

/* steps */
.step + .step { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.step h3 { margin: 0 0 6px; font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.step p { margin: 0 0 9px; font-size: 15px; line-height: 1.62; color: var(--text); }
.step p:last-child { margin-bottom: 0; }

/* set tracker */
.tracker-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.linkbtn { font-size: 13px; font-weight: 600; color: var(--text-dim); padding: 6px 2px; border-radius: 6px; }
.linkbtn:hover { color: var(--text); text-decoration: underline; }
.tracker-foot .linkbtn { white-space: nowrap; flex: none; }
.hint { font-size: 12.5px; line-height: 1.5; color: var(--text-faint); margin: 0; }
.load-hint { margin-top: 12px; }

.setlabels, .setrow {
  display: grid;
  grid-template-columns: 22px 1fr 1fr 28px 21px 42px;
  gap: 5px;
  align-items: center;
}
.setlabels { padding: 0 8px; margin: 0 -8px 4px; }
.setlabels span {
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-faint); text-align: center;
}
.setlabels span:first-child { text-align: left; }

.setrow {
  position: relative;
  margin: 0 -8px;
  padding: 7px 8px;
  border-radius: 11px;
  border-top: 1px solid var(--line-soft);
}
.setrow:first-of-type { border-top: 0; }
.setrow-n {
  font-size: 13.5px; font-weight: 700; color: var(--text-faint);
  font-variant-numeric: tabular-nums; text-align: left;
}

/* the set you are on: a solid edge marker and a tint, never a ring that
   could be mistaken for keyboard focus */
.setrow.is-next { background: var(--accent-soft); border-top-color: transparent; }
.setrow.is-next + .setrow { border-top-color: transparent; }
.setrow.is-next::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.setrow.is-next .setrow-n { color: var(--accent); }
.setrow.is-done .setrow-n { color: var(--accent); }
.setrow.is-done input { color: var(--text-dim); }

.setrow input {
  width: 100%; background: var(--bg-elev-2); border: 1px solid transparent;
  border-radius: 9px; padding: 10px 6px; font-size: 15.5px; text-align: center;
  font-variant-numeric: tabular-nums; min-width: 0;
}
.setrow.is-next input { background: var(--bg-elev); }
.setrow input:focus { outline: 0; border-color: var(--accent); background: var(--bg); }
.setrow input::placeholder { color: var(--text-faint); opacity: .65; }

.copybtn {
  width: 30px; height: 38px; border-radius: 9px; display: grid; place-items: center;
  background: transparent; color: var(--text-faint); border: 1px solid var(--line);
}
.copybtn svg { width: 14px; height: 14px; }
.copybtn:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.copybtn:disabled { opacity: .28; cursor: default; }

/* saved-here / saved-to-server ticks */
.syncmark { display: grid; place-items: center; height: 38px; color: var(--text-faint); }
.syncmark svg { width: 20px; height: 15px; display: block; }
.syncmark.is-synced { color: var(--accent); }
.syncmark.is-pending { color: var(--text-faint); opacity: .85; }
.syncmark.is-off { color: var(--text-faint); opacity: .45; }
.syncmark.is-none { opacity: 0; }

.check {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--bg-elev-2); color: var(--text-faint); border: 1px solid var(--line);
  transition: background .15s, color .15s;
}
.check svg { width: 19px; height: 19px; }
.check[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.setrow.is-next .check { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

.lasttime { font-size: 13.5px; color: var(--text-dim); margin-top: 10px; line-height: 1.5; }
.lasttime b { color: var(--text); font-weight: 650; }
.synclegend { font-size: 12px; color: var(--text-faint); margin-top: 10px; display: flex; gap: 14px; flex-wrap: wrap; }
.synclegend span { display: inline-flex; align-items: center; gap: 5px; }
.synclegend svg { width: 18px; height: 14px; }
.synclegend .ok { color: var(--accent); }

/* alternatives */
details.alts { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); overflow: hidden; }
details.alts > summary {
  list-style: none; cursor: pointer; padding: 14px 17px; font-size: 14.5px; font-weight: 620;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
details.alts > summary::-webkit-details-marker { display: none; }
details.alts > summary .chev { transition: transform .2s; color: var(--text-faint); display: flex; }
details.alts > summary .chev svg { width: 18px; height: 18px; }
details.alts[open] > summary .chev { transform: rotate(180deg); }
.altlist { padding: 0 17px 6px; }
.alt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-top: 1px solid var(--line-soft); font-size: 14.5px;
  text-decoration: none; color: var(--text);
}
.alt:hover { color: var(--accent); }
.alt svg { width: 17px; height: 17px; flex: none; color: var(--text-faint); }

/* bottom nav */
.navbar {
  position: sticky; bottom: 0; z-index: 25; margin-top: 26px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line-soft);
  padding-bottom: var(--safe-b);
}
.navbar-in { max-width: 720px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 10px; }
.navbtn {
  flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 11px 14px; border-radius: 13px; border: 1px solid var(--line);
  background: var(--bg-elev); text-align: left; transition: border-color .15s, background .15s;
}
.navbtn:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.navbtn:disabled { opacity: .35; cursor: default; }
.navbtn.next { flex: 1.45; }
.navbtn.next.finish { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.navbtn svg { width: 19px; height: 19px; flex: none; color: var(--text-faint); }
.navbtn.next.finish svg { color: var(--accent-ink); }
.navbtn-txt { min-width: 0; flex: 1; }
.navbtn.next .navbtn-txt { text-align: right; }
.navbtn-lbl { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text-faint); }
.navbtn.next.finish .navbtn-lbl { color: color-mix(in srgb, var(--accent-ink) 70%, transparent); }
.navbtn-name { display: block; font-size: 14px; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.005em; }

/* rest timer */
.timer {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(86px + var(--safe-b)); z-index: 60; overflow: hidden;
  display: flex; align-items: center; gap: 4px; padding: 8px 8px 10px 18px;
  background: var(--bg-elev); color: var(--text);
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .45), 0 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent);
}
.timer[hidden] { display: none; }
.timer.pop { animation: pop .26s cubic-bezier(.2, 1.3, .5, 1); }
@keyframes pop { from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.9); } }
.timer.done { background: var(--accent); color: var(--accent-ink); animation: flash 1s ease-in-out 3; }
@keyframes flash { 50% { box-shadow: 0 10px 34px rgba(0, 0, 0, .45), 0 0 0 14px color-mix(in srgb, var(--accent) 22%, transparent); } }
.timer-t { font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: .01em; min-width: 58px; }
.timer-lbl {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-right: 7px;
}
.timer.done .timer-lbl { color: color-mix(in srgb, var(--accent-ink) 75%, transparent); }
.timer-btn {
  padding: 9px 13px; border-radius: 999px; font-size: 13px; font-weight: 650;
  background: var(--bg-elev-2); color: var(--text-dim);
}
.timer-btn[hidden] { display: none; }
.timer.done .timer-btn { background: rgba(0, 0, 0, .16); color: var(--accent-ink); }
.timer-btn:hover { filter: brightness(1.15); }
.timer-bar {
  position: absolute; left: 0; bottom: 0; height: 4px; width: 100%;
  background: var(--accent); border-radius: 999px;
}
.timer.done .timer-bar { display: none; }

/* misc */
.footnote { color: var(--text-faint); font-size: 12.5px; line-height: 1.55; margin-top: 26px; }
.footnote a { color: var(--text-dim); }
.restnote { display: inline-flex; align-items: center; gap: 6px; }
.split { display: flex; gap: 10px; }
.split > * { flex: 1; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- additions: swap, charts, sync, extras ---------- */
.good { color: var(--accent); }
.down { color: var(--warn); }
.muted { color: var(--text-faint); font-weight: 500; }
.empty { color: var(--text-faint); font-size: 14px; margin: 6px 0; line-height: 1.55; }
.tag {
  display: inline-block; vertical-align: 1px; font-size: 10px; font-weight: 750;
  letter-spacing: .07em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px;
  background: var(--accent-soft); color: var(--accent); margin-left: 4px;
}
.pill-next {
  font-size: 10px; font-weight: 750; letter-spacing: .07em; padding: 2px 7px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink); margin-left: 6px;
}
.daycard.next { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.daycard.optional .daycard-num { color: var(--text-faint); }
.callout-soft { background: var(--bg-elev-2); border-color: var(--line); }
.callout-soft b { color: var(--text-dim); }
.stats-4 { grid-template-columns: repeat(4, 1fr); }
.stats-4 .stat { padding: 10px 6px; }
.stats-4 .stat b { font-size: 16px; }
.stats-4 .stat span { font-size: 9.5px; letter-spacing: .05em; }

/* group rows (add-ons) */
.grouprow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; margin-bottom: 8px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--bg-elev); transition: border-color .15s;
}
.grouprow:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.grouprow b { display: block; font-size: 15.5px; font-weight: 650; }
.grouprow small { display: block; color: var(--text-dim); font-size: 13px; margin-top: 2px; line-height: 1.45; }
.grouprow svg { width: 18px; height: 18px; flex: none; color: var(--text-faint); }

/* alternatives list */
.alt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.alt:first-child { border-top: 0; }
.alt-name { font-size: 14.5px; min-width: 0; flex: 1; line-height: 1.4; }
.alt-name small { color: var(--text-faint); }
.alt-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.alt-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--text-faint); border: 1px solid var(--line); }
.alt-ico:hover { color: var(--accent); border-color: var(--accent); }
.alt-ico svg { width: 15px; height: 15px; }
.alt-use {
  padding: 8px 12px; border-radius: 9px; font-size: 13px; font-weight: 650;
  background: var(--bg-elev-2); color: var(--text); border: 1px solid var(--line);
}
.alt-use:hover { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

/* charts */
.chart { position: relative; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--text-faint); font-size: 10.5px; font-weight: 600; letter-spacing: .01em; }
.chart .axis.strong { fill: var(--text-dim); font-size: 12px; font-weight: 620; }
.chart .val { fill: var(--text); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chart .line { stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--accent); opacity: .10; }
.chart .dot { fill: var(--accent); stroke: var(--bg-elev); stroke-width: 2; }
.chart .dot.best { r: 5.5; }
.chart .bar { fill: var(--accent); }
.chart .bar.empty { fill: var(--line); }
.chart .track { fill: var(--bg-elev-2); }
.chart .hit { cursor: crosshair; }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none; white-space: nowrap;
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px;
  padding: 7px 10px; box-shadow: var(--shadow); font-size: 12.5px; line-height: 1.35;
}
.chart-tip b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.chart-tip span { color: var(--text-faint); }
.chart-head { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.seg { display: inline-flex; background: var(--bg-elev-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button {
  padding: 7px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 650; color: var(--text-dim);
}
.seg button[aria-selected="true"] { background: var(--bg-elev); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.chart-foot { margin-top: 10px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-table { margin-top: 12px; }
.chart-table > summary { cursor: pointer; font-size: 12.5px; color: var(--text-faint); list-style: none; padding: 4px 0; }
.chart-table > summary::-webkit-details-marker { display: none; }
.chart-table > summary:hover { color: var(--text); }
.chart-table-wrap { overflow-x: auto; margin-top: 8px; }
.chart-table table { border-collapse: collapse; width: 100%; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.chart-table th, .chart-table td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.chart-table th:first-child, .chart-table td:first-child { text-align: left; }
.chart-table th { color: var(--text-faint); font-weight: 650; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }

/* personal bests */
.pbrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.pbrow:first-child { border-top: 0; }
.pb-name { font-size: 14.5px; font-weight: 600; min-width: 0; line-height: 1.35; }
.pb-name small { display: block; color: var(--text-faint); font-size: 12px; font-weight: 500; margin-top: 2px; }
.pb-val { text-align: right; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.pb-val small { display: block; font-size: 11.5px; font-weight: 650; color: var(--text-faint); margin-top: 2px; }

/* sync */
.syncpill {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 620; background: var(--bg-elev-2); color: var(--text-dim);
  max-width: 150px; overflow: hidden;
}
.syncpill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.syncpill svg { width: 15px; height: 15px; flex: none; }
.syncpill.saved { color: var(--accent); }
.syncpill.error, .syncpill.offline { color: var(--warn); }
.syncmsg.error, .syncmsg.offline { color: var(--warn); }
.syncmsg.saved { color: var(--accent); }
.field { display: block; }
.field span { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 7px; }
.field input {
  width: 100%; background: var(--bg-elev-2); border: 1px solid var(--line); border-radius: 11px;
  padding: 13px 14px; font-size: 16px; font-weight: 600;
}
.field input:focus { outline: 0; border-color: var(--accent); background: var(--bg); }

@media (max-width: 380px) {
  .stats-4 { grid-template-columns: repeat(2, 1fr); }
  .setlabels, .setrow { grid-template-columns: 18px 1fr 1fr 24px 19px 38px; gap: 4px; }
  .setrow input { font-size: 15px; padding: 10px 4px; }
}

.msg.good { color: var(--accent); }
.msg.bad { color: var(--warn); }
a.callout { text-decoration: none; }
a.callout:hover { border-color: var(--warn); }

#paste-box {
  width: 100%; background: var(--bg-elev-2); border: 1px solid var(--line);
  border-radius: 11px; padding: 11px 12px; font-size: 13.5px; line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical;
}
#paste-box:focus { outline: 0; border-color: var(--accent); background: var(--bg); }
