@font-face { font-family: "Barlow"; src: url("/static/vendor/fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/static/vendor/fonts/barlow-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/static/vendor/fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/static/vendor/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/static/vendor/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/static/vendor/fonts/barlow-condensed-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --paper: #EEF2F3;
  --surface: #FFFFFF;
  --sunk: #E3E9EC;
  --ink: #17212B;
  --ink-2: #4E5C69;
  --ink-3: #7C8994;
  --line: #D3DCE0;
  --bib: #FCFCFA;
  --bib-ink: #17212B;

  --swim: #1C8BD9;
  --bike: #E39B12;
  --run: #E0533D;
  --brick: #C77428;
  --strength: #5B6B7F;
  --boxing: #B0306A;
  --walk: #5E9A63;
  --stretch: #2A9D8F;
  --other: #8A949C;
  --rest: #A9B4BC;

  --done: #1F9D6B;
  --missed: #D14343;
  --excused: #8A949C;
  --amber: #D98E04;
  --rec-red: #D14343;
  --rec-orange: #E5782C;
  --rec-yellow: #E2BE2A;
  --rec-green: #3FA66B;
  --q-excellent: #1F8A4F;
  --q-good: #79B852;
  --q-mediocre: #E5782C;
  --q-bad: #D14343;

  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --tabbar-h: 62px;
  color-scheme: light;
}

/* dark: follows the device unless Light is chosen, or forced by Dark (theme.js sets data-theme). Keep the two blocks the same. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #142231;
    --surface: #1B2C3D;
    --sunk: #112030;
    --ink: #E6EDF1;
    --ink-2: #A3B4C1;
    --ink-3: #74889A;
    --line: #2A3F53;
    --swim: #3DA3EE;
    --bike: #F0AE2E;
    --run: #F06A55;
    --strength: #8496AD;
    --boxing: #D9558F;
    --stretch: #4CC3B5;
    --done: #34B884;
    --missed: #EE6464;
    --rec-red: #EE6464;
    --rec-orange: #F28C45;
    --rec-yellow: #EBCB45;
    --rec-green: #4CBF80;
    --q-excellent: #3FBF77;
    --q-good: #94CF6C;
    --q-mediocre: #F28C45;
    --q-bad: #EE6464;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #142231;
  --surface: #1B2C3D;
  --sunk: #112030;
  --ink: #E6EDF1;
  --ink-2: #A3B4C1;
  --ink-3: #74889A;
  --line: #2A3F53;
  --swim: #3DA3EE;
  --bike: #F0AE2E;
  --run: #F06A55;
  --strength: #8496AD;
  --boxing: #D9558F;
  --stretch: #4CC3B5;
  --done: #34B884;
  --missed: #EE6464;
  --rec-red: #EE6464;
  --rec-orange: #F28C45;
  --rec-yellow: #EBCB45;
  --rec-green: #4CBF80;
  --q-excellent: #3FBF77;
  --q-good: #94CF6C;
  --q-mediocre: #F28C45;
  --q-bad: #EE6464;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.45 var(--body);
  font-variant-numeric: tabular-nums;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--swim); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
body.signed-out .topbar .icon-btn, body.signed-out .page-title { visibility: hidden; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 7px; text-decoration: none; font: 800 22px/1 var(--display); letter-spacing: .01em; }
.page-title { margin: 0; font: 600 17px/1.2 var(--display); color: var(--ink-2); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink-2); text-decoration: none; background: none; border: 0; cursor: pointer; }
.icon-btn:hover { background: var(--sunk); }

main { max-width: 680px; margin: 0 auto; padding: 8px 16px 24px; outline: none; }

/* tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--ink-3); font-size: 12px; font-weight: 500; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.active { color: var(--ink); }
.tabbar a.active svg { stroke-width: 2.3; }
.tabbar a[hidden] { display: none; }

.fab {
  position: fixed; z-index: 31; right: max(16px, calc(50% - 324px));
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px);
  width: 56px; height: 56px; border-radius: 18px; border: 0; cursor: pointer;
  background: var(--ink); color: var(--paper);
  box-shadow: 0 6px 18px rgba(16, 32, 48, .28);
  display: grid; place-items: center;
}
.fab:active { transform: scale(.96); }

/* sections */
.section { margin-top: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-head h2 { margin: 0; font: 700 22px/1.1 var(--display); }
.section-head a, .link-btn { font-size: 14px; font-weight: 600; color: var(--swim); text-decoration: none; background: none; border: 0; padding: 4px 0; cursor: pointer; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; color: var(--ink-3); }
.panel { background: var(--surface); border-radius: var(--r-md); padding: 14px 16px; }
.panel + .panel { margin-top: 10px; }

/* race bib: the one bold element */
.bib {
  position: relative; margin-top: 6px;
  background: var(--bib); color: var(--bib-ink);
  border-radius: 6px; padding: 16px 22px 0; overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 10px 26px -14px rgba(16, 32, 48, .45);
  text-decoration: none; display: block;
}
.bib::before, .bib::after, .bib .pin-b::before, .bib .pin-b::after {
  content: ""; position: absolute; width: 11px; height: 11px; border-radius: 50%;
  background: var(--paper); box-shadow: inset 0 1.5px 2px rgba(0,0,0,.28);
}
.bib::before { top: 10px; left: 10px; }
.bib::after { top: 10px; right: 10px; }
.bib .pin-b::before { bottom: 18px; left: 10px; }
.bib .pin-b::after { bottom: 18px; right: 10px; }
.bib-race { font: 700 16px/1.2 var(--display); text-align: center; padding: 0 18px; }
.bib-number { font: 800 clamp(84px, 30vw, 132px)/.9 var(--display); text-align: center; letter-spacing: -.02em; margin: 6px 0 2px; }
.bib-sub { text-align: center; font-size: 14px; color: #4E5C69; padding-bottom: 14px; }
.bib-stripe { display: grid; grid-template-columns: 1fr 1fr 1fr; height: 10px; margin: 0 -22px; }
.bib-stripe i:nth-child(1) { background: #1C8BD9; }
.bib-stripe i:nth-child(2) { background: #E39B12; }
.bib-stripe i:nth-child(3) { background: #E0533D; }
.bib.empty .bib-number { font-size: 56px; padding: 10px 0 4px; }
/* other races under the bib, kept quiet */
.next-events { display: flex; flex-direction: column; gap: 2px; margin: 10px 2px 0; }
.next-event { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 4px 0 4px 10px;
  border-left: 3px solid var(--c); color: var(--ink-2); text-decoration: none; font-size: 14px; }
.next-event span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-event span:last-child { flex: none; color: var(--ink-3); font-size: 13px; }
/* a race day in the Plan week */
.plan-event { display: block; margin: 0 0 8px; padding: 8px 12px; border-radius: var(--r-sm); border-left: 4px solid var(--c);
  background: var(--sunk); color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; }

/* lane rows: plan items and activity cards */
.lane-list { display: flex; flex-direction: column; gap: 8px; }
.lane {
  position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
  background: var(--surface); border-radius: var(--r-md); padding: 12px 12px 12px 18px; min-height: 60px;
}
.lane::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; border-radius: var(--r-md) 0 0 var(--r-md); background: var(--c); }
.lane.brick::before, .t-brick.lane::before { background: linear-gradient(var(--bike) 50%, var(--run) 50%); }
.lane-main { min-width: 0; cursor: pointer; }
.lane-title { font-weight: 600; line-height: 1.25; }
.lane-meta { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.lane.is-done .lane-title { color: var(--ink-2); }
.lane.is-missed { background: color-mix(in srgb, var(--missed) 7%, var(--surface)); }
.lane.is-rest { background: transparent; border: 1px dashed var(--line); }
.lane.is-rest::before { display: none; }
.lane-actions { display: flex; align-items: center; gap: 4px; }

.card, .lane { --c: var(--other); }
.t-swim { --c: var(--swim); } .t-bike { --c: var(--bike); } .t-run { --c: var(--run); }
.t-brick { --c: var(--brick); } .t-strength { --c: var(--strength); } .t-boxing { --c: var(--boxing); }
.t-walk { --c: var(--walk); } .t-stretch { --c: var(--stretch); } .t-other { --c: var(--other); } .t-rest { --c: var(--rest); }

.check {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); background: transparent;
  display: grid; place-items: center; cursor: pointer; flex: none; color: transparent;
}
.check svg { width: 18px; height: 18px; }
.check.done { background: var(--done); border-color: var(--done); color: #fff; }
.check.missed { border-color: var(--missed); color: var(--missed); }
.check.excused { border-color: var(--excused); color: var(--excused); border-style: dashed; }
.more { width: 32px; height: 36px; border: 0; background: none; color: var(--ink-3); cursor: pointer; border-radius: 8px; font-size: 20px; line-height: 1; }
.more:hover { background: var(--sunk); }

.status-tag { font-size: 12.5px; font-weight: 600; }
.status-tag.missed { color: var(--missed); }
.status-tag.excused { color: var(--excused); }
.status-tag.done { color: var(--done); }

/* week strip */
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day-cell { text-align: center; padding: 8px 0 10px; border-radius: var(--r-sm); background: var(--surface); text-decoration: none; }
.day-cell.today { outline: 2px solid var(--ink); outline-offset: -2px; }
.day-cell b { display: block; font: 700 15px/1 var(--display); }
.day-cell small { display: block; font-size: 11.5px; color: var(--ink-3); margin-bottom: 6px; }
.dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 3px; padding: 0 3px; min-height: 9px; }
.dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--c); }
.dot.done { background: var(--c); }
.dot.missed { border-color: var(--missed); background: transparent; position: relative; }
.dot.missed::after { content: ""; position: absolute; inset: 1px; background: var(--missed); border-radius: 50%; transform: scale(.4); }
.dot.excused { border-style: dashed; opacity: .6; }

/* figures */
.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: var(--r-md); overflow: hidden; }
.figures.four { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .figures.four { grid-template-columns: repeat(4, 1fr); } }
.figure { background: var(--surface); padding: 12px 12px 10px; min-width: 0; }
.figure .v { font: 700 26px/1 var(--display); }
.figure .v small { font: 600 15px var(--display); color: var(--ink-2); margin-left: 2px; }
.figure .l { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.figure.c-swim .v { color: var(--swim); } .figure.c-bike .v { color: var(--bike); } .figure.c-run .v { color: var(--run); }

.bar-row { display: grid; grid-template-columns: 82px 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.bar-row + .bar-row { margin-top: 10px; }
.bar { height: 8px; border-radius: 4px; background: var(--sunk); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--c, var(--ink)); border-radius: 4px; max-width: 100%; }
.bar.over i { background: var(--amber); }

.readiness { display: grid; grid-template-columns: 14px 1fr; gap: 12px; align-items: start; }
.readiness .light { width: 14px; height: 14px; border-radius: 50%; margin-top: 4px; }
.light.green { background: var(--done); } .light.amber { background: var(--amber); } .light.red { background: var(--missed); }

/* activity feed */
.feed { display: flex; flex-direction: column; gap: 10px; }
.card {
  position: relative; display: block; text-decoration: none; background: var(--surface);
  border-radius: var(--r-md); padding: 14px 16px 14px 20px; overflow: hidden;
}
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c); }
.card.t-brick::before { background: linear-gradient(var(--bike) 50%, var(--run) 50%); }
.card-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.card-title { font: 700 19px/1.15 var(--display); }
.card-when { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.card-stats { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; }
.card-stats div { min-width: 60px; }
.card-stats b { display: block; font: 700 19px/1.1 var(--display); }
.card-stats span { font-size: 12.5px; color: var(--ink-3); }
.route-preview { display: block; width: 100%; height: 86px; margin-top: 10px; background: var(--sunk); border-radius: var(--r-sm); }
.route-preview polyline { fill: none; stroke: var(--c); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 6px 13px; font-size: 14px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.chip .sw { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* detail */
.detail-head { margin-top: 8px; }
.detail-head h2 { margin: 0; font: 800 32px/1.05 var(--display); }
.detail-head .tag { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.detail-head .tag i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.map { height: 260px; border-radius: var(--r-md); overflow: hidden; margin-top: 14px; background: var(--sunk); z-index: 0; }
.chart-box { position: relative; height: 220px; background: var(--surface); border-radius: var(--r-md); padding: 10px 8px 6px; }
.chart-box.tall { height: 260px; }
.chart-box.short { height: 170px; }

table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.data th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 12.5px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.data td { padding: 8px; border-bottom: 1px solid var(--line); }
table.data tr:last-child td { border-bottom: 0; }
table.data .num { text-align: right; }
.table-wrap { background: var(--surface); border-radius: var(--r-md); padding: 4px 8px; overflow-x: auto; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--sunk); }

/* forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.field label, .field .label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.field .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line); background: var(--surface); font-size: 16px;
}
textarea.input { min-height: 80px; resize: vertical; }
/* iOS Safari gives date and time inputs an intrinsic width that ignores width: 100%, so they overflow the panel padding */
.input { min-width: 0; max-width: 100%; }
input.input[type=date], input.input[type=time], input.input[type=datetime-local] { -webkit-appearance: none; appearance: none; display: block; }
.input::-webkit-date-and-time-value { text-align: left; min-height: 1.2em; }
.form > *, .field { min-width: 0; }
.input:focus { border-color: var(--swim); outline: none; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.row > *, .row3 > * { min-width: 0; }  /* time and date inputs must not push the grid past a phone screen */
.unit-input { position: relative; }
.unit-input .input { padding-right: 44px; }
.unit-input span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--ink-3); pointer-events: none; }
.hms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.rpe { display: flex; align-items: center; gap: 12px; }
.rpe input[type=range] { flex: 1; accent-color: var(--ink); height: 32px; }
.rpe output { font: 700 22px/1 var(--display); min-width: 30px; text-align: center; }
.rpe-word { font-size: 13px; color: var(--ink-2); min-height: 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper); font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.danger { background: transparent; color: var(--missed); border-color: color-mix(in srgb, var(--missed) 40%, transparent); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; }

.toggle { display: flex; align-items: center; gap: 10px; min-height: 32px; font-size: 15px; cursor: pointer; }
.toggle input { width: 20px; height: 20px; accent-color: var(--ink); flex: none; }
.toggle input:disabled + span { color: var(--ink-3); }
.sync-error { color: var(--missed); }

.exercise { background: var(--sunk); border-radius: var(--r-md); padding: 10px; }
.exercise + .exercise { margin-top: 10px; }
.exercise-head { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.set-row { display: grid; grid-template-columns: 26px 1fr 1fr 40px 32px; gap: 8px; align-items: center; margin-top: 8px; }
.set-row .n { font: 700 16px var(--display); color: var(--ink-3); text-align: center; }
.set-row .input { min-height: 42px; }
.x-btn { width: 32px; height: 32px; border-radius: 8px; border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 18px; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--sunk); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; padding: 9px 6px; border-radius: 9px; font-weight: 600; font-size: 14.5px; cursor: pointer; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* sheet */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(10, 20, 30, .42); }
.sheet {
  position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 680px;
  max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); border-radius: 20px 20px 0 0;
  padding: 10px 18px calc(env(safe-area-inset-bottom) + 22px);
  animation: rise .22s ease-out;
}
@keyframes rise { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet h3 { margin: 0 0 14px; font: 700 24px/1.1 var(--display); }
.menu { display: flex; flex-direction: column; gap: 6px; }
.menu button, .menu a {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  padding: 13px 14px; border-radius: 12px; border: 0; background: var(--surface); font-weight: 600; cursor: pointer; text-decoration: none;
}
.menu .sw { width: 12px; height: 12px; border-radius: 4px; background: var(--c); flex: none; }
.menu small { display: block; font-weight: 400; color: var(--ink-2); font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 84px); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 12px; font-weight: 500; font-size: 15px;
  transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--missed); color: #fff; }

.empty { text-align: center; padding: 28px 16px; color: var(--ink-2); background: var(--surface); border-radius: var(--r-md); }
.empty p { margin: 0 0 12px; }

.kpi-board { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--ink); color: var(--paper); border-radius: var(--r-md); overflow: hidden; }
.kpi-board div { padding: 14px 8px 12px; text-align: center; border-left: 1px solid color-mix(in srgb, var(--paper) 15%, transparent); }
.kpi-board div:first-child { border-left: 0; }
.kpi-board b { display: block; font: 800 30px/1 var(--display); }
.kpi-board span { font-size: 12.5px; opacity: .78; }

.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.week-nav button { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-size: 18px; }
.week-nav b { font: 700 19px var(--display); }
.day-block + .day-block { margin-top: 16px; }
.day-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.day-label b { font: 700 17px var(--display); }
.day-label.today b::after { content: "Today"; margin-left: 8px; font: 600 12px var(--body); background: var(--ink); color: var(--paper); padding: 2px 7px; border-radius: 6px; vertical-align: 2px; }

.tmpl-item { background: var(--surface); border-radius: var(--r-md); padding: 10px; display: grid; gap: 8px; }
.tmpl-item + .tmpl-item { margin-top: 8px; }
.tmpl-grid { display: grid; grid-template-columns: 92px 1fr 32px; gap: 8px; align-items: center; }
.tmpl-grid2 { display: grid; grid-template-columns: 1fr 92px; gap: 8px; }

.login { min-height: 80vh; display: grid; place-items: center; }
.login .panel { width: 100%; max-width: 380px; padding: 26px 22px; }
.login h2 { font: 800 34px/1 var(--display); margin: 0 0 4px; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.records li { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.records { list-style: none; margin: 0; padding: 0 14px; background: var(--surface); border-radius: var(--r-md); }
.records li:last-child { border-bottom: 0; }
.records b { font: 700 18px var(--display); }
.records a { text-decoration: none; }

.loading { padding: 40px 0; text-align: center; color: var(--ink-3); }

/* home dashboard */
.home-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 12px; }
.home-head h2 { margin: 0; font: 700 22px/1.1 var(--display); }
.fresh-btn { display: flex; gap: 5px; padding: 8px; margin: -8px; border: 0; background: none; cursor: pointer; }
.fresh-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.fresh-dot.ok { background: var(--done); }
.fresh-dot.stale { background: var(--amber); }
.bib.compact { padding-top: 14px; }
.bib.compact .bib-number { font-size: clamp(64px, 20vw, 92px); margin: 2px 0 0; }
.bib.compact .bib-sub { padding-bottom: 10px; }
.bib.compact.empty .bib-number { font-size: 40px; padding: 4px 0 2px; }
.home-empty { margin: 0; }
.home-empty a { color: var(--swim); font-weight: 600; text-decoration: none; }
.att-list { display: flex; flex-direction: column; gap: 6px; }
.att-head { margin: 0 0 2px; font: 700 18px/1.2 var(--display); }
.att-head:not(:first-child) { margin-top: 10px; }
.att { display: grid; grid-template-columns: 10px 1fr; gap: 10px; align-items: baseline; padding: 10px 14px; border-radius: var(--r-md);
  background: var(--surface); text-decoration: none; font-weight: 500; }
.att i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); transform: translateY(1px); }
.att.high { --c: var(--missed); } .att.medium { --c: var(--amber); } .att.win { --c: var(--done); }
.ready-line { display: grid; grid-template-columns: 14px 1fr; gap: 10px; align-items: start; text-decoration: none; }
.ready-line .light { width: 14px; height: 14px; border-radius: 50%; margin-top: 4px; }
a.figure { text-decoration: none; display: block; }
.figure .delta { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.load-line { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; text-decoration: none; }
.load-line b { font: 700 20px var(--display); }
.load-word { font-size: 13px; font-weight: 600; }
.load-word.steady { color: var(--done); } .load-word.building { color: var(--amber); } .load-word.ramping { color: var(--missed); }
.spark { display: block; overflow: visible; }
.spark polyline { fill: none; stroke: var(--c); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--c); }
.spark-row { display: grid; grid-template-columns: 1fr auto 120px; gap: 12px; align-items: center; padding: 8px 0; text-decoration: none; border-bottom: 1px solid var(--line); }
.spark-row:last-of-type { border-bottom: 0; }
.spark-row span { font-size: 14.5px; color: var(--ink-2); }
.spark-row b { font: 700 18px var(--display); text-align: right; }
.fuel-panel { display: block; text-decoration: none; }
.year-row { display: flex; flex-wrap: wrap; gap: 6px 22px; text-decoration: none; font-size: 14px; color: var(--ink-2); }
.year-row b { font: 700 22px var(--display); color: var(--ink); margin-right: 2px; }
.year-row .c-swim b { color: var(--swim); } .year-row .c-bike b { color: var(--bike); } .year-row .c-run b { color: var(--run); }
.home-foot { text-align: center; margin-top: 26px; }
.home-tools { display: flex; align-items: center; gap: 16px; }
.cz-row { display: grid; grid-template-columns: 1fr 44px 44px; gap: 4px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.cz-row .toggle span { display: flex; flex-direction: column; }
.cz-row .toggle small { font-size: 12.5px; color: var(--ink-3); }
.cz-row.off .toggle > span { color: var(--ink-3); }
.cz-row .x-btn { width: 44px; height: 44px; color: var(--ink-2); font-size: 20px; }
.cz-row .x-btn:disabled { opacity: .3; cursor: default; }

/* body composition */
.comp-grid .figure { border: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.comp-grid .figure.sel { box-shadow: inset 0 -3px 0 var(--ink); }
.comp-table td, .comp-table th { white-space: nowrap; }
.comp-table td:first-child { white-space: normal; }
/* integrations */
.int-row .lane-main { cursor: pointer; }
.int-row input[role=switch] { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 14px; background: var(--line);
  position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.int-row input[role=switch]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.int-row input[role=switch]:checked { background: var(--done); }
.int-row input[role=switch]:checked::after { transform: translateX(18px); }
.int-row input[role=switch]:focus-visible { outline: 2.5px solid var(--swim); outline-offset: 2px; }
.int-chip { display: inline-block; vertical-align: 1px; margin-left: 4px; padding: 0 7px; border-radius: 6px; font: 600 12px/1.6 var(--body); background: var(--sunk); color: var(--ink-2); }
.int-chip.connected { background: color-mix(in srgb, var(--done) 18%, var(--surface)); color: var(--ink); }
.int-chip.quiet { background: color-mix(in srgb, var(--amber) 22%, var(--surface)); color: var(--ink); }
.int-chip.error { background: color-mix(in srgb, var(--missed) 18%, var(--surface)); color: var(--missed); }
.int-steps { margin: 0; padding-left: 20px; font-size: 14.5px; display: grid; gap: 6px; }
.int-sub { margin: 14px 0 6px; font: 700 17px var(--display); }
.int-log { list-style: none; margin: 0; padding: 0 14px; background: var(--surface); border-radius: var(--r-md); }
.int-log li { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.int-log li:last-child { border-bottom: 0; }
.int-log li.bad span { color: var(--missed); }
.int-log small { color: var(--ink-3); white-space: nowrap; }
.copy-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.copy-row .input { min-width: 0; }
.token-new { margin-bottom: 10px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--sunk); padding: 1px 4px; border-radius: 4px; }
/* muscle recovery map */
.body-map { display: grid; gap: 10px; }
.body-map svg { width: 100%; max-width: 360px; margin: 0 auto; display: block; }
.body-base * { fill: var(--sunk); stroke: var(--line); stroke-width: 1; }
.mz { stroke: var(--surface); stroke-width: 1.4; cursor: pointer; outline: none; }
.mz.red { fill: var(--rec-red); } .mz.orange { fill: var(--rec-orange); } .mz.yellow { fill: var(--rec-yellow); } .mz.green { fill: var(--rec-green); fill-opacity: .55; }
.mz.picked, .mz:focus-visible { stroke: var(--ink); stroke-width: 2; }
.body-label { font: 600 11px var(--body); fill: var(--ink-3); }
.body-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); justify-content: center; }
.body-legend span, .body-list li { display: flex; align-items: center; gap: 6px; }
.body-legend i, .body-list i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sw-red { background: var(--rec-red); } .sw-orange { background: var(--rec-orange); } .sw-yellow { background: var(--rec-yellow); } .sw-green { background: var(--rec-green); }
.body-info { margin: 0; min-height: 2.6em; text-align: center; }
.body-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.body-list li { align-items: baseline; }
.trend { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.trend-head { margin: 0 0 8px; }
.trend.stronger .trend-head b { color: var(--done); }
.trend.weaker .trend-head b { color: var(--missed); }
.trend-wait { margin: 14px 0 0; text-align: center; }
.trend-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.trend-chip { font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: 8px; background: var(--sunk); color: var(--ink-2); }
.trend-chip.up { background: color-mix(in srgb, var(--done) 16%, var(--surface)); color: var(--ink); }
.trend-chip.down { background: color-mix(in srgb, var(--missed) 14%, var(--surface)); color: var(--ink); }
.trend-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.trend-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; }
.trend-list a { font-weight: 600; text-decoration: none; }
.trend-list span { color: var(--ink-3); font-size: 13px; min-width: 0; }
.trend-list b { font: 700 15px var(--display); }
.trend-list b.up { color: var(--done); } .trend-list b.down { color: var(--missed); } .trend-list b.steady { color: var(--ink-3); }
/* nutrition targets */
.fuel-day { margin-bottom: 10px; }
.day-type { font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--sunk); color: var(--ink-2); }
.day-type.high { background: color-mix(in srgb, var(--bike) 18%, var(--surface)); color: var(--ink); }
.why { margin: 10px 2px 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); }
.why li + li { margin-top: 4px; }
.week-fuel { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 14px; height: 110px; align-items: end; }
.wf { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; }
.wf i { display: block; width: 100%; max-width: 34px; border-radius: 5px 5px 2px 2px; background: var(--line); flex: none; }
.wf i.moderate { background: color-mix(in srgb, var(--bike) 45%, var(--line)); }
.wf i.high { background: var(--bike); }
.wf b { font: 700 13px var(--display); }
.wf small { font-size: 11px; color: var(--ink-3); }
.wf.sel small { color: var(--ink); font-weight: 700; }
.ses-burn { list-style: none; margin: 12px 0 0; padding: 0 14px; background: var(--surface); border-radius: var(--r-md); }
.ses-burn li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ses-burn li:last-child { border-bottom: 0; }
.ses-burn b { font: 700 16px var(--display); text-align: right; }
.ses-burn small { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-3); }
/* habits */
.habit-group { margin-top: 16px; }
.habit-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.habit-head h3 { margin: 0; font: 700 18px/1.2 var(--display); }
.habit-row { --c: var(--line); }
.habit-row .lane-title .muted { font-weight: 500; }
.auto-tag { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 5px; border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-3); vertical-align: 1px; }
.check.auto { cursor: default; border-style: dashed; color: transparent; }
.check.auto.done { border-style: solid; color: #fff; }
.habit-all { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border: 0; border-radius: var(--r-md); background: var(--surface); font-weight: 600; cursor: pointer; text-align: left; }
.habit-all .check { width: 26px; height: 26px; }
.habit-stats { display: flex; flex-direction: column; gap: 8px; }
.habit-stat { display: block; text-decoration: none; }
.habit-stat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.habit-stat .bar-row { --c: var(--ink-2); }
.day-chips { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; overflow: visible; }
.day-chips .chip { min-width: 0; padding-left: 0; padding-right: 0; justify-content: center; }
.heatmap-wrap { display: grid; grid-template-columns: auto 1fr; gap: 6px; }
.hm-days { display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; font-size: 11px; color: var(--ink-3); }
.hm-days span { display: flex; align-items: center; }
.heatmap { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }
.hm { display: block; aspect-ratio: 1; border-radius: 3px; min-height: 12px; }
.hm.done { background: var(--done); }
.hm.missed { background: color-mix(in srgb, var(--missed) 35%, var(--surface)); }
.hm.not_due { background: var(--sunk); }
.hm.future { border: 1.5px dashed var(--ink-3); }
.hm.blank { visibility: hidden; }
.hm-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.hm-legend span { display: flex; align-items: center; gap: 6px; }
.hm-legend .hm { width: 12px; min-height: 12px; }
.notify-status { display: flex; align-items: center; gap: 8px; }
.token-out { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 1000px) {
  body.home-wide main { max-width: 1100px; }
  .home-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; grid-auto-flow: row dense; align-items: start; }
  .home-grid > .full { grid-column: 1 / -1; }
}

/* strength */
.start-btn {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; margin-right: 4px; border-radius: 10px;
  background: var(--ink); color: var(--paper); font-weight: 600; font-size: 14px; text-decoration: none;
}
.w-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface);
  font: 700 16px var(--display); color: var(--ink-3); cursor: pointer;
}
.w-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
a.lane { text-decoration: none; color: inherit; }
.status-chip { display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 1px 7px; border-radius: 6px; font: 600 12.5px/1.5 var(--body); border: 1px solid currentColor; }
.status-chip.progressing { color: var(--done); }
.status-chip.holding { color: var(--ink-3); }
.status-chip.stalled { color: var(--missed); }
.pb-set { font-weight: 700; }
.rx-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rx-head b { font: 700 18px/1.15 var(--display); }
.rx-head .x-btn:disabled { opacity: .3; cursor: default; }
.pick-list { max-height: 55vh; overflow-y: auto; }
details summary { cursor: pointer; }

.lift-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; }
.lift-actions { display: flex; gap: 8px; }
.lift-time { display: flex; align-items: baseline; gap: 12px; }
.lift-clock.paused { color: var(--ink-3); }
/* the workout in progress, under the header on every other screen */
.live-bar {
  position: sticky; top: calc(env(safe-area-inset-top) + 60px); z-index: 19;
  display: flex; align-items: center; gap: 10px; max-width: 680px; margin: 0 auto; padding: 10px 16px;
  background: var(--surface); border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 15px;
}
.live-bar[hidden] { display: none; }
.live-bar .sw { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.live-bar span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.live-bar b { font-weight: 600; color: var(--c); }
.rt-chips { flex-wrap: wrap; overflow: visible; }
.lift-title { font: 700 26px/1.05 var(--display); }
.lift-clock { font: 600 20px/1.2 var(--display); color: var(--ink-2); }
.lift-block { --c: var(--strength); background: var(--surface); border-radius: var(--r-md); padding: 14px 14px 10px 18px; margin-top: 14px; position: relative; }
.lift-block::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; border-radius: var(--r-md) 0 0 var(--r-md); background: var(--c); }
.lift-ex-head h3 { margin: 0; font: 700 21px/1.15 var(--display); }
.lift-target { font-size: 13.5px; color: var(--ink-3); margin-top: 2px; }
.lift-last { font-size: 14.5px; color: var(--ink-2); margin-top: 8px; }
.lift-sug { font: 700 18px/1.3 var(--display); margin-top: 2px; }
.lift-set { display: grid; grid-template-columns: 24px 1fr 1fr 44px 52px; gap: 8px; align-items: center; margin-top: 10px; }
.lift-set .n { font: 700 18px var(--display); color: var(--ink-3); text-align: center; }
.lift-in { position: relative; display: block; }
.lift-in .input { min-height: 54px; padding: 8px 40px 8px 10px; font: 700 23px/1 var(--display); }
.lift-in .input::placeholder { font: 600 16px var(--body); color: var(--ink-3); }
.lift-in span { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--ink-3); pointer-events: none; }
.lift-set .w-btn { width: 44px; height: 54px; }
.tick-btn {
  width: 52px; height: 54px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface);
  color: var(--ink-3); display: grid; place-items: center; cursor: pointer;
}
.tick-btn svg { width: 24px; height: 24px; }
.tick-btn[aria-pressed="true"] { background: var(--done); border-color: var(--done); color: #fff; }
.lift-set.done .input { background: var(--sunk); }
.lift-set.warm .input { color: var(--ink-2); }
.pb-line { grid-column: 2 / -1; font-size: 13.5px; font-weight: 600; margin-top: -4px; }
.pb-badge { display: inline-block; padding: 1px 6px; border-radius: 5px; background: var(--ink); color: var(--paper); font: 700 13px/1.4 var(--display); margin-right: 4px; }
/* single arm sets: a left and a right line, with the set number and buttons spanning both */
.side { font: 700 14px var(--display); color: var(--ink-3); text-align: center; }
.lift-set.pair { grid-template-columns: 22px 12px 1fr 1fr 44px 52px; gap: 6px; }
.lift-set.pair > .n, .lift-set.pair > .w-btn, .lift-set.pair > .tick-btn { grid-row: span 2; align-self: center; }
.lift-set.pair .lift-in .input { padding-right: 34px; font-size: 21px; }
.lift-set.pair .lift-in span { right: 7px; font-size: 12px; }
.set-row.pair { grid-template-columns: 22px 12px 1fr 1fr 40px 32px; gap: 6px; }
.set-row.pair > .n, .set-row.pair > .w-btn, .set-row.pair > .x-btn { grid-row: span 2; align-self: center; }
.lift-actions { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; }
.lift-pad { height: 90px; }
.rest-bar {
  position: fixed; z-index: 32; left: 16px; right: 16px; margin: 0 auto; max-width: 648px;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 10px);
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px;
  padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--ink); color: var(--paper);
  box-shadow: 0 6px 18px rgba(16, 32, 48, .28);
}
.rest-bar b { font: 800 30px/1 var(--display); }
.rest-bar .btn { min-height: 42px; padding: 0 12px; color: var(--paper); border-color: color-mix(in srgb, var(--paper) 35%, transparent); }
.rest-bar.over { background: var(--done); }
.spacer { height: 10px; }

@media (min-width: 720px) {
  .tabbar { left: 50%; transform: translateX(-50%); max-width: 680px; border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* accounts and administration */
.avatar { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--sunk); color: var(--ink-2); font: 700 17px/1 var(--display); }
.acct-who { display: flex; align-items: center; gap: 12px; }
.acct-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.acct-row::before { display: none; }
.acct-row:focus-visible { outline: 2.5px solid var(--swim); outline-offset: 2px; }
.acct-chip { display: inline-block; vertical-align: 1px; margin-left: 6px; padding: 0 7px; border-radius: 6px; font: 600 12px/1.6 var(--body); background: var(--sunk); color: var(--ink-2); }
.acct-chip.admin { color: var(--ink); }
.acct-chip.disabled { color: var(--amber); }
.acct-chip.pending_deletion { color: var(--missed); }

/* first run setup: one question per screen, built for phones */
.wiz { max-width: 520px; margin: 0 auto; padding: 4px 0 calc(env(safe-area-inset-bottom) + 24px); }
.wiz h2 { margin: 18px 0 6px; font: 700 30px/1.1 var(--display); }
.wiz-lead { margin: 0 0 16px; color: var(--ink-2); }
.wiz-top { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; }
.wiz-progress { height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.wiz-progress i { display: block; height: 100%; background: var(--ink); border-radius: 3px; transition: width .2s ease-out; }
.wiz .input { min-height: 48px; font-size: 17px; }
.wiz .btn { min-height: 48px; }
.wiz-nav { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; margin-top: 22px; }
.wiz-nav #wz-skip { justify-self: end; }
.wiz-choices { display: grid; gap: 8px; }
.wiz-choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--surface); border: 1.5px solid transparent; border-radius: var(--r-md); cursor: pointer; }
.wiz-choice input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.wiz-choice:has(input:checked) { border-color: var(--ink); }
.wiz-choice b { display: block; font-weight: 600; }
.wiz-choice small { display: block; color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.wiz .wiz-time { width: 112px; min-height: 40px; font-size: 16px; }
.wiz-sum { list-style: none; margin: 0 0 18px; padding: 0 14px; background: var(--surface); border-radius: var(--r-md); }
.wiz-sum li { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.wiz-sum li:last-child { border-bottom: 0; }
.wiz-sum li small { color: var(--ink-3); }
.wiz-sum li.done small { color: var(--done); }
@media (prefers-reduced-motion: reduce) { .wiz-progress i { transition: none; } }
.build-progress { margin-top: 18px; }
.build-progress .bar { margin-top: 10px; }
.build-bar i { width: 0; transition: width .9s ease-out; }

/* home without a race: a quiet greeting in place of the bib */
.greeting { margin: 2px 2px 14px; font: 600 22px/1.2 var(--display); color: var(--ink-2); }

/* version and change log, at the bottom of Settings */
.version-foot { text-align: center; margin: 18px 0 4px; }
.version-foot .link-btn { color: var(--ink-3); font-weight: 500; }
.changes { margin: 0 0 6px; padding-left: 20px; font-size: 14.5px; display: grid; gap: 4px; }
.change-old { padding: 10px 0; border-top: 1px solid var(--line); }
.change-old summary { cursor: pointer; font-size: 14.5px; }
.change-old summary .tiny { margin-left: 6px; }
.change-old .changes { margin-top: 8px; }

/* AI coach */
.coach-card { display: block; color: inherit; text-decoration: none; }
.coach-head { margin: 0 0 6px; line-height: 1.35; }
.coach-points { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--ink-2); }
.coach-area { font-weight: 600; color: var(--ink); }
.coach-sub { margin: 14px 0 8px; font: 600 15px/1.3 var(--body); }
.coach-prop .lane-title { white-space: normal; }
.coach-old + .coach-old { margin-top: 8px; }
.coach-old summary { display: flex; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.coach-old summary::-webkit-details-marker { display: none; }
.coach-old summary small { color: var(--ink-3); white-space: nowrap; }
.coach-old[open] summary { margin-bottom: 8px; }

/* opening animation (playIntro): the figure takes the current sport's colour */
.intro { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 16px; background: var(--paper); transition: opacity .3s ease-out; cursor: pointer; }
.intro.out { opacity: 0; pointer-events: none; }
.intro-skip { position: absolute; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  padding: 10px 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font: 600 15px/1 var(--body); cursor: pointer; }
.intro-art { width: min(380px, 100%); height: auto; overflow: visible; }
.intro-ground { fill: none; stroke: var(--line); stroke-width: 2; }
.intro-man path, .intro-man line { fill: none; stroke: var(--c); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.intro-man .in-head { fill: var(--c); }
.intro-plate { fill: none; stroke: var(--ink-2); stroke-width: 3.5; }
.intro-bike { fill: none; stroke: var(--bike); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.intro-bike line { stroke-width: 1.2; }
.intro-water rect { fill: var(--swim); opacity: .3; }
.intro-water path { fill: none; stroke: var(--swim); stroke-width: 2; }
.intro-tag { font: 700 17px var(--display); fill: var(--c); letter-spacing: .02em; }

/* setup guides */
.guide-step h2 { display: flex; align-items: center; gap: 10px; }
.guide-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sunk); font: 700 15px/1 var(--display); color: var(--ink-2); flex: none; }
.guide-help { padding-left: 18px; }
.guide-help li + li { margin-top: 6px; }

/* ---------------------------------------------------------------- food diary */
.diary-date { display: grid; grid-template-columns: 40px 1fr 40px; gap: 6px; align-items: center; margin-top: 14px; }
.diary-date .icon-btn { font-size: 26px; line-height: 1; }
.diary-date .icon-btn:disabled { opacity: .3; cursor: default; }
.diary-sum { margin-top: 10px; }
.diary-kcal { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.diary-kcal b { font-family: var(--display); font-size: 34px; font-weight: 600; line-height: 1; }
.diary-kcal span { color: var(--ink-2); font-size: 14px; }
.bar i.m-e { background: var(--ink); }
.bar i.m-p { background: var(--run); }
.bar i.m-c { background: var(--bike); }
.bar i.m-f { background: var(--swim); }
.bar i.over, .bar i.m-e.over { background: var(--missed); }
.diary-slot .section-head .small { margin-left: auto; margin-right: 10px; }
.small-btn { min-height: 38px; font-size: 14px; margin-top: 8px; }
.food-list { display: flex; flex-direction: column; gap: 6px; }
.food-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%;
  padding: 8px 12px 8px 8px; background: var(--surface); border: 0; border-radius: var(--r-md); text-align: left;
  color: inherit; text-decoration: none; font: inherit; cursor: pointer;
}
.food-row.static { grid-template-columns: minmax(0, 1fr) auto 32px; padding-left: 12px; cursor: default; }
.food-main { min-width: 0; }
.food-main b { display: block; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.food-main small { display: block; color: var(--ink-2); font-size: 13px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.food-kcal { font-family: var(--display); font-size: 20px; font-weight: 600; text-align: right; line-height: 1; }
.food-kcal small { display: block; font-family: var(--body); font-size: 11px; font-weight: 400; color: var(--ink-3); margin-top: 2px; }
.food-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--sunk); display: block; }
.food-thumb.none { background: var(--sunk); }
.food-thumb.big { width: 64px; height: 64px; }
.food-tools { margin-top: 10px; }
.food-search .input { font-size: 17px; }
.inline-amt { display: inline-block; width: 84px; min-height: 32px; padding: 4px 8px; font-size: 14px; }
.amount-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.amount-head h3 { margin: 0; }
.amount-head p { margin: 2px 0 0; }
.am-live { margin: 0; font-size: 14px; color: var(--ink-2); min-height: 20px; }
.nut-group { background: var(--surface); border-radius: var(--r-md); padding: 0 14px; }
.nut-group + .nut-group { margin-top: 8px; }
.nut-group summary { padding: 12px 0; font-weight: 600; cursor: pointer; }
.nut-group[open] { padding-bottom: 12px; }
.nut-group .panel { padding: 0; }
.nut-group h4 { margin: 12px 0 4px; font-size: 14px; color: var(--ink-2); }
.nut-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 14px; }
.nut-row + .nut-row { margin-top: 8px; }
.nut-row.is-empty { color: var(--ink-3); }
.nut-missing { grid-column: 1 / -1; color: var(--ink-3); font-size: 12px; margin-top: -4px; }
.nut-table h4 { margin: 12px 0 4px; font-size: 14px; color: var(--ink-2); }
.nut-table:first-child h4 { margin-top: 0; }
.nt-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.nt-row b { font-weight: 600; }
.food-hero { width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--r-md); display: block; margin-top: 4px; }
.food-title { font-family: var(--display); font-size: 28px; font-weight: 600; margin: 12px 0 0; line-height: 1.1; }
.draft-note { margin-bottom: 12px; border-left: 4px solid var(--amber); }
.photo-pick { display: flex; gap: 12px; align-items: center; }
.photo-pick .btn-row { flex: 1; }
.food-photo { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; background: var(--sunk); display: block; flex: none; }
.file-btn { position: relative; }
.serv-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; align-items: end; }
.scan-box { position: relative; border-radius: var(--r-md); overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-aim { position: absolute; left: 12%; right: 12%; top: 34%; bottom: 34%; border: 2px solid rgba(255,255,255,.85); border-radius: 10px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); }
.day-chips .chip { min-width: 44px; justify-content: center; }
.tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
@media (max-width: 400px) { .tabbar a { font-size: 11px; } }
.day-pick { position: relative; display: grid; place-items: center; min-height: 44px; font-family: var(--display); font-size: 22px; font-weight: 600; cursor: pointer; }
.day-pick span { display: inline-flex; align-items: center; gap: 6px; pointer-events: none; }
.day-pick svg { color: var(--ink-3); }
.day-pick input { position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; font-size: 16px; -webkit-appearance: none; appearance: none; }
.kcal-eq { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; text-align: center; margin-bottom: 12px; }
.kcal-eq b { display: block; font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1; }
.kcal-eq small { display: block; font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.kcal-eq > span { color: var(--ink-3); font-size: 18px; }
.kcal-eq .over b { color: var(--missed); }
.swipe { position: relative; border-radius: var(--r-md); overflow: hidden; }
.swipe .food-row { position: relative; z-index: 1; touch-action: pan-y; transition: transform .2s ease-out; border-radius: 0; user-select: none; -webkit-user-select: none; }
.swipe.dragging .food-row { transition: none; }
.swipe-del { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding-right: 20px; border: 0; background: var(--missed); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.swipe.gone { transition: opacity .2s ease-out; opacity: .3; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .swipe .food-row, .swipe.gone { transition: none; } }
.slide-l { animation: slide-l .22s ease-out; }
.slide-r { animation: slide-r .22s ease-out; }
@keyframes slide-l { from { transform: translateX(28px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes slide-r { from { transform: translateX(-28px); opacity: .4; } to { transform: none; opacity: 1; } }
.sum-pages { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-top: 10px; overscroll-behavior-x: contain; }
.sum-pages::-webkit-scrollbar { display: none; }
.sum-page { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; min-width: 0; }
.sum-page + .sum-page { margin-top: 0; }
.sum-title { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 10px; font-size: 15px; }
.sum-dots { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.sum-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; }
.sum-dots button[aria-pressed="true"] { background: var(--ink); }
.kcal-eq.two { grid-template-columns: 1fr; }
.burn-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--sunk); }
.burn-bar i, .burn-key i { display: block; height: 100%; }
.burn-key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.burn-key span { display: inline-flex; align-items: center; gap: 6px; }
.burn-key i { width: 10px; height: 10px; border-radius: 3px; }
.e-rest { background: var(--strength); }
.e-day { background: var(--walk); }
.e-train { background: var(--run); }
.hl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hl { min-width: 0; font-size: 12px; }
.hl-name { display: block; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 3px; }
.hl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px; }
.hl-row .bar { height: 6px; }
.hl-row b { font-family: var(--display); font-size: 15px; font-weight: 600; line-height: 1; }
.hl.none .hl-row b { font-family: var(--body); font-size: 11px; font-weight: 400; color: var(--ink-3); }
.bar i.full { background: var(--done); }
.nt-edit { display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(0, 130px); align-items: center; gap: 8px; padding: 6px 0; }
.nt-edit + .nt-edit { border-top: 1px solid var(--line); }
.nt-edit label { font-size: 15px; }
.nt-edit label small { display: block; color: var(--ink-3); font-size: 12px; }
.nt-edit .input { min-height: 38px; }
.star { width: 32px; height: 32px; border: 0; background: none; font-size: 20px; color: var(--line); cursor: pointer; padding: 0; }
.star[aria-pressed="true"] { color: var(--amber); }
.star:disabled { visibility: hidden; }
.scan-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.scan-bar .btn { min-height: 38px; flex: none; }
.scan-bar .btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
@media (prefers-reduced-motion: reduce) { .slide-l, .slide-r { animation: none; } .sum-pages { scroll-behavior: auto; } }
.food-main small.macro-line { color: var(--ink-3); font-size: 12px; }
.food-list.after { margin-top: 6px; }
.food-row.planned { background: transparent; border: 1.5px dashed var(--line); color: var(--ink-2); }
.food-row.planned .food-thumb { opacity: .5; }
.food-row.planned .food-kcal { color: var(--ink-3); }
.sum-title .small { font-weight: 400; }
.slot-time { font-family: var(--body); font-size: 13px; font-weight: 400; color: var(--ink-3); margin-left: 8px; }
.slot-macros { margin: -4px 2px 8px; font-size: 12.5px; color: var(--ink-2); }
.fuel-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fuel-list li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; background: var(--surface); border-radius: var(--r-md); padding: 10px 12px; border-left: 4px solid var(--line); }
.fuel-list li.fk-before { border-left-color: var(--bike); }
.fuel-list li.fk-during { border-left-color: var(--run); }
.fuel-list li.fk-after { border-left-color: var(--done); }
.fuel-list li.fk-carb_up { border-left-color: var(--swim); }
.fuel-list time { font-family: var(--display); font-size: 18px; font-weight: 600; line-height: 1.2; }
.fuel-list b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.fuel-list b span { color: var(--ink-3); }
.fuel-list p { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.4; }

/* Settings sub pages: back to the menu */
.back-link { display: inline-block; margin: 2px 0 4px; padding: 6px 0; font-weight: 600; text-decoration: none; color: var(--ink-2); }
.back-link:hover { color: var(--ink); }

/* Brick score (food_score.py): a small number in its band's colour, and the breakdown on a food's page */
.q-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 17px; padding: 0 5px; margin-right: 6px;
  border-radius: 999px; background: var(--qc); color: #fff; font: 600 12px/1 var(--display); vertical-align: 1px; }
.q-day .q-pill { margin: 0 4px 0 6px; }
.q-excellent { --qc: var(--q-excellent); } .q-good { --qc: var(--q-good); } .q-mediocre { --qc: var(--q-mediocre); } .q-bad { --qc: var(--q-bad); }
.q-head { display: flex; align-items: center; gap: 14px; }
.q-ring { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; border: 5px solid var(--qc);
  font: 700 26px/1 var(--display); color: var(--ink); }
.q-head h3 { margin: 0; font-size: 18px; } .q-head h3 b { color: var(--qc); }
.q-rows { margin-top: 12px; display: grid; gap: 10px; }
.q-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: baseline; }
.q-row > b { font: 600 16px/1 var(--display); }
.q-row .bar { grid-column: 1 / -1; }
.q-row .bar i { background: var(--qc); }
.q-adds { grid-column: 1 / -1; margin: 2px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink-2); }
.q-adds li { padding: 4px 0; border-top: 1px solid var(--line); }
.q-adds li span { display: block; font-size: 12px; color: var(--ink-3); }
.q-adds .risk-high { color: var(--q-bad); font-weight: 600; } .q-adds .risk-moderate { color: var(--q-mediocre); font-weight: 600; }
.q-day { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); }

/* stretching (stretch.py): the figures, the routine editor and the guided player */
.st-fig { display: block; overflow: visible; }
.st-fig path, .st-fig line { fill: none; stroke: var(--stretch); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.st-fig circle { fill: var(--stretch); }
.st-fig .st-ground { stroke: var(--line); stroke-width: 2; }
.st-far { opacity: .45; }
.st-thumb { width: 52px; height: 40px; flex: none; }
.st-thumb path, .st-thumb line { stroke-width: 7; }
.st-nofig.st-thumb { border-radius: 10px; background: var(--sunk); }
.food-row.st-row { grid-template-columns: 52px minmax(0, 1fr); padding-left: 8px; }
.food-row.st-item { grid-template-columns: 52px minmax(0, 1fr) auto; padding-left: 8px; }
.st-item .food-main small { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; white-space: normal; }
.st-side { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; }
.st-moves { display: flex; gap: 2px; }
.st-sheet-fig { width: 160px; margin: 0 auto 6px; }
.st-player { display: flex; flex-direction: column; align-items: stretch; }
.st-stage { position: relative; max-width: 250px; width: 100%; margin: 0 auto; }
.st-big { width: 100%; height: auto; }
.st-player .st-side { display: block; text-align: center; margin: 0; min-height: 20px; color: var(--ink-2); font-weight: 600; }
.st-name { text-align: center; margin: 4px 0 6px; font: 700 26px/1.1 var(--display); }
.st-player.is-rest .st-name { color: var(--ink-2); }
.st-ring-wrap { position: relative; width: 130px; height: 130px; margin: 2px auto 0; }
.st-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.st-ring circle { fill: none; stroke-width: 9; }
.st-ring-bg { stroke: var(--sunk); }
.st-ring-fg { stroke: var(--stretch); stroke-linecap: round; }
.st-player.is-rest .st-ring-fg { stroke: var(--ink-3); }
.st-count { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.st-count b { font: 700 42px/1 var(--display); }
.st-count small { display: block; color: var(--ink-2); font-size: 13px; }
.st-cue { text-align: center; color: var(--ink-2); font-size: 14px; margin: 10px 8px 4px; min-height: 2.6em; }
.st-controls { display: flex; justify-content: center; gap: 22px; margin: 4px 0 10px; }
.st-ctl { width: 52px; height: 52px; font-size: 20px; background: var(--surface); }
.st-ctl.st-main { width: 64px; height: 64px; font-size: 24px; background: var(--stretch); color: #fff; }
.st-progress i { background: var(--stretch); }
.st-left { text-align: center; margin: 6px 0 0; }
.st-next { display: grid; gap: 8px; margin-top: 14px; }
.st-next-row { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.st-next-row small { display: block; color: var(--ink-2); font-size: 12px; }
.st-next-row b { display: block; font-weight: 600; }
.st-done .st-stage { max-width: 240px; }
@media (prefers-reduced-motion: reduce) { .st-ring-fg { transition: none; } }

/* two step sign in and help and support */
.mfa-qr { display: grid; place-items: center; padding: 8px 0; }
.mfa-qr svg { display: block; width: 100%; max-width: 220px; height: auto; aspect-ratio: 1; border-radius: var(--r-sm); shape-rendering: crispEdges; }
.mfa-key, .recovery-codes { display: block; font: 600 15px/1.6 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em;
  background: var(--sunk); border-radius: var(--r-sm); padding: 10px 12px; margin: 8px 0; white-space: pre-wrap; word-break: break-all; }
.recovery-codes { columns: 2; column-gap: 18px; }
.dot-new { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--swim); margin-right: 7px; vertical-align: 2px; }
.ticket-subject { font: 700 24px/1.15 var(--display); margin: 10px 0 4px; }
.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { background: var(--surface); border-radius: var(--r-md); padding: 10px 14px; }
.msg.them { border-left: 4px solid var(--swim); }
.msg-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.msg-head span { font-weight: 400; color: var(--ink-3); }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* best efforts, zones and distance goals */
.records b.effort-best { color: var(--done); }
.zone-row, .goal-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 14px; }
.zone-row + .zone-row, .goal-row + .goal-row { margin-top: 10px; }
.zone-row small, .goal-row small { display: block; font-size: 12px; color: var(--ink-3); }
.zone-row b, .goal-row b { font: 600 15px var(--display); white-space: nowrap; }
.goal-row b small { display: inline; font: 400 12px var(--body); }
.goal-row .bar { position: relative; overflow: visible; }
.goal-row .bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink-2); border-radius: 1px; }
.zone-list { list-style: none; margin: 0 0 8px; padding: 0; }
.zone-list li { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.zone-list li:last-child { border-bottom: 0; }
.zone-list i { width: 10px; height: 10px; border-radius: 50%; }

/* Free plan: what Personal adds, where something is held back (limits.py) */
.upsell { background: var(--sunk); border-radius: var(--r-md); padding: 10px 14px; margin: 8px 0; font-size: 14px; }
.upsell p { margin: 0 0 4px; color: var(--ink-2); }
.upsell b { font-weight: 600; color: var(--ink); }
.seg button:disabled { opacity: .45; cursor: default; }
