/* Generated by make-light.js from style.css. Do not edit: change style.css or make-light.js and run node make-light.js. */
:root {
  color-scheme: dark;
  --page: #fcfcfc;
  --surface: #f9f9f9;
  --ink: #191919;
  --ink-2: #3e3e3e;
  --muted: #6e6e6e;
  --grid: #f5f5f5;
  --axis: #cfcfcf;
  --border: rgba(0, 0, 0, 0.10);
  --wash: rgba(0, 0, 0, 0.05);

  /* series colours: fixed per entity, validated for the dark surface */
  --bar: #0b6aca;
  --bar-on: #0c7ceb;
  --squat: #bd2e62;
  --bench: #c85223;
  --deadlift: #c98500;
  --ohp: #199e70;
  --row: #0b6aca;
  --fat: #c85223;        /* body composition: validated as a pair on the dark surface */
  --muscle: #199e70;
  --warning: #e69e05;
  --up: #0ca30c;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 16px calc(24px + env(safe-area-inset-bottom));
  background: var(--page);
  color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.top, main, .foot, .notice { max-width: 1080px; margin-inline: auto; }

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 16px;
  padding: calc(18px + env(safe-area-inset-top)) 0 14px;
}
h1 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -0.01em; }
.updated { margin: 0; color: var(--muted); font-size: 13px; }
.updated .stale, .card > header .stale { color: var(--ink-2); }
.updated .stale::before { content: "▲ "; color: var(--warning); font-size: 10px; }
.card > header .stale::before { content: "▲ "; color: var(--warning); font-size: 9px; margin-left: 2px; }

.notice {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink-2);
}

main { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }

/* ---------- stat tiles ---------- */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 0;
}
.tile .label { color: var(--ink-2); font-size: 12.5px; }
.tile .value { margin-top: 2px; font-size: 26px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; }
.tile .value small { font-size: 14px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.tile .sub { margin-top: 2px; color: var(--muted); font-size: 12.5px; }

/* ---------- cards ---------- */
.card {
  padding: 14px 14px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 0;
}
.card > header { margin-bottom: 8px; }
.card h2 { margin: 0; font-size: 15.5px; font-weight: 650; }
.card > header p { margin: 1px 0 0; color: var(--muted); font-size: 12.5px; }

.chart { position: relative; }
.chart svg {
  display: block;
  width: 100%;
  overflow: visible;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  border-radius: 6px;
}
.chart svg:focus { outline: none; }
.chart svg:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }
.chart text { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .endlabel { fill: var(--ink); font-size: 12px; font-weight: 600; }
.chart .grid { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .base { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart .cross { stroke: var(--muted); stroke-width: 1; shape-rendering: crispEdges; }
.chart .band { fill: var(--wash); }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .empty { fill: var(--muted); font-size: 13px; }

/* ---------- legend (toggle chips) ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.legend button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 4px 11px 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.legend button:hover { background: var(--wash); }
.legend button:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 1px; }
.legend button[aria-pressed="false"] { color: var(--muted); }
.legend button[aria-pressed="false"] .key { opacity: 0.25; }
.legend.static span { display: inline-flex; align-items: center; gap: 7px; margin-right: 10px; color: var(--ink-2); font-size: 13px; }
.key { display: inline-block; width: 14px; height: 0; border-top: 3px solid currentColor; border-radius: 2px; flex: none; }

/* ---------- small multiples (one measure per panel, shared time axis) ---------- */
.multiples { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.multiples figure { margin: 0; min-width: 0; }
.multiples figcaption { margin-bottom: 4px; color: var(--muted); font-size: 12.5px; }
.multiples figcaption b { color: var(--ink-2); font-weight: 600; margin-right: 4px; }
.card .fine { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 7px 8px 7px 0; text-align: left; vertical-align: baseline; border-bottom: 1px solid var(--grid); }
th:last-child, td:last-child { padding-right: 0; }
thead th { color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 500; color: var(--ink); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.dim, .dim { color: var(--muted); }
td strong { font-weight: 650; }
td .key, th .key { margin-right: 7px; vertical-align: middle; }
.delta-up::before { content: "▲ "; color: var(--up); font-size: 9px; vertical-align: 1px; }
.delta-down::before { content: "▼ "; color: var(--muted); font-size: 9px; vertical-align: 1px; }
.keyed { white-space: nowrap; }
.src { display: block; color: var(--muted); font-size: 11px; }
@media (max-width: 559px) {
  .when { display: block; font-size: 11.5px; }
}
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroll table { min-width: 100%; }

.tableview { margin-top: 6px; border-top: 1px solid var(--grid); }
.tableview summary {
  padding: 9px 0;
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
  list-style-position: inside;
}
.tableview summary:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; border-radius: 4px; }
.tableview[open] { padding-bottom: 6px; }
.tableview .scroll { max-height: 320px; overflow-y: auto; }
.tableview thead th { position: sticky; top: 0; background: var(--surface); }

/* ---------- tooltip ---------- */
.tip {
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  max-width: min(260px, calc(100vw - 16px));
  padding: 8px 10px;
  background: #f7f7f7;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(16, 24, 40, 0.113);
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.35;
  pointer-events: none;
}
.tip[hidden] { display: none; }
.tip .t { color: var(--ink-2); margin-bottom: 4px; }
.tip .r { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.tip .r .key { align-self: center; width: 10px; }
.tip .r b { font-weight: 650; font-variant-numeric: tabular-nums; }
.tip .r span { color: var(--ink-2); }
.tip .r i { color: var(--muted); font-style: normal; }

.foot { padding: 16px 2px 0; color: var(--muted); font-size: 12px; }
.foot p { margin: 0 0 6px; }

@media (min-width: 560px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 860px) {
  body { padding-inline: 24px; }
  main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .tiles, .wide { grid-column: 1 / -1; }
  .tiles { gap: 16px; }
  .multiples { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .card { padding: 16px 18px 12px; }
}
@media (prefers-reduced-motion: no-preference) {
  .legend button { transition: background-color 120ms; }
}

/* ---------- page navigation (dashboard / coach) ---------- */
.title { display: flex; align-items: center; gap: 14px; }
.nav { display: flex; gap: 4px; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 13px;
  text-decoration: none;
}
.nav a:hover { background: var(--wash); }
.nav a:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 1px; }
.nav a[aria-current="page"] { background: var(--wash); color: var(--ink); border-color: rgba(0, 0, 0, 0.22); }

/* ---------- coach page ---------- */
.notice + .notice, .notice + main { margin-top: 12px; }
.coach h3 { margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.coach p { margin: 0; }
.coach ul, .coach ol { margin: 0; padding: 0; list-style: none; }
.fine { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; }
.tag {
  display: inline-block;
  margin-right: 7px;
  padding: 1px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  vertical-align: 1px;
}

.lines li { position: relative; padding: 3px 0 3px 16px; }
.lines li::before { content: ""; position: absolute; left: 3px; top: 0.78em; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.goals { margin: 12px 0 0; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.goal { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--wash); min-width: 0; }
.goal dt { color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.goal-n { color: var(--muted); font-weight: 500; }
.goal dd { margin: 3px 0 0; }

.verdict { font-size: 15.5px; }
.badge {
  display: inline-block;
  min-width: 44px;
  margin-right: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 650;
  text-align: center;
}
.badge.yes { border-color: var(--warning); color: var(--warning); }
.badge.no { color: var(--ink-2); }
.changes { margin-top: 10px !important; }
.changes li, .rules li { padding: 8px 0; border-top: 1px solid var(--grid); }
.changes li > *, .rules li > * { display: block; }
.changes strong, .rules strong { font-weight: 600; }
.lines, .verdict, .changes, .rules, .plain, .suggestions, #standins { max-width: 860px; }
.why, .evidence { color: var(--ink-2); font-size: 13.5px; }
.evidence { color: var(--muted); font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }
.response { margin-top: 3px; font-size: 13.5px; }
.plain li { position: relative; padding: 2px 0 2px 16px; color: var(--ink-2); font-size: 13.5px; }
.plain li::before { content: "–"; position: absolute; left: 2px; color: var(--muted); }
#table-rules td { color: var(--ink-2); font-size: 12.5px; overflow-wrap: anywhere; }
#table-garmin td { color: var(--ink-2); font-size: 12.5px; }
#table-garmin .scroll { max-height: none; }
#table-garmin .fine { margin: 6px 0 8px; }
#table-big9 .scroll { max-height: none; }
#table-big9 th .src { font-weight: 400; overflow-wrap: anywhere; }
#table-big9 td .src { white-space: normal; }
#table-big9 th, #table-big9 td { padding-right: 6px; }
.tag.standin { margin: 0 0 0 7px; font-size: 10.5px; color: var(--muted); }
@media (max-width: 559px) {
  #table-big9 .opt { display: none; }
}

.sessions { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.session { padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--wash); min-width: 0; }
.session h3 { margin: 0; font-size: 14.5px; font-weight: 650; color: var(--ink); }
.session h3 .tag { margin: 0 0 0 8px; }
.tag.next { border-color: var(--bar); color: var(--bar-on); }
.session .when { color: var(--muted); font-size: 12.5px; }
.session .note { margin-top: 6px; color: var(--ink-2); font-size: 13.5px; }
.rxlist { margin-top: 8px !important; }
.rxlist li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 10px;
  align-items: baseline;
  padding: 7px 0;
  border-top: 1px solid var(--grid);
}
.rxlist .ex { display: flex; align-items: baseline; min-width: 0; font-weight: 500; }
.rxlist .ex .tag { flex: none; }
.rxlist .rx { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
.rxlist .why { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }

.suggestions { counter-reset: s; }
.suggestions li { position: relative; padding: 10px 0 10px 30px; border-top: 1px solid var(--grid); counter-increment: s; }
.suggestions li:first-child { border-top: 0; padding-top: 2px; }
.suggestions li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 10px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--wash);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 650;
  line-height: 21px;
  text-align: center;
}
.suggestions li:first-child::before { top: 2px; }
.suggestions p + p { margin-top: 4px; }
.suggestions .lbl { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.disclaimer { color: var(--ink-2); }

@media (min-width: 560px) {
  .goals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 860px) {
  .sessions { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}

/* Plan page */
.plan mark { background: rgba(235, 156, 0, 0.16); color: #eb9e00; padding: 0 4px; border-radius: 4px; font-weight: 600; }
.todo-group + .todo-group { margin-top: 12px; }
.todo-group h3 { margin: 0 0 2px; font-size: 14.5px; font-weight: 650; }
.todo-group h3 .when { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.todo-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 8px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--grid); }
.todo-list .rx { grid-column: 2; font-variant-numeric: tabular-nums; }
.todo-list .ex { font-weight: 500; }
.plan .was { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, 0.3); }
.kind { display: inline-block; min-width: 54px; text-align: center; padding: 1px 6px; margin-right: 8px; border: 1px solid var(--border); border-radius: 999px; font-size: 11px; color: var(--ink-2); flex: none; }
.kind.k-change, .kind.k-new { border-color: #eb9e00; color: #eb9e00; }
.kind.k-removed { border-color: #c02b2b; color: #c02b2b; }
.kind.k-same { color: var(--muted); }
.plan .strike { text-decoration: line-through; color: var(--muted); }
.pl { display: grid; gap: 4px; }
.pl.same { opacity: 0.7; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; gap: 5px; align-items: baseline; padding: 2px 8px; border: 1px solid var(--grid); border-radius: 8px; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.chip .lbl { color: var(--muted); font-size: 11.5px; }
.chip.chg { border-color: rgba(235, 158, 0, 0.5); }
.pl .why { font-size: 12.5px; color: var(--muted); }
.rxlist li.pl { display: grid; grid-template-columns: minmax(0, 1fr); }
.rxlist li.pl .ex { flex-wrap: wrap; }

/* Today page */
.progress { height: 6px; border-radius: 3px; background: var(--grid); overflow: hidden; margin: 6px 0 4px; max-width: 860px; }
.progress span { display: block; height: 100%; width: 0; background: var(--bar); transition: width 0.15s; }
.tlist li.pl { gap: 6px; padding: 10px 0; }
.boxes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.setbox {
  min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--wash); color: var(--ink-2); font: inherit; font-variant-numeric: tabular-nums; cursor: pointer;
}
.setbox[aria-pressed="true"] { background: var(--bar); border-color: var(--bar); color: #fcfcfc; font-weight: 700; }
.setbox:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }
.today .goals { max-width: 860px; }

/* Coach page: compact layout */
.coach .card { padding-top: 12px; padding-bottom: 8px; }
.coach .card + .card { margin-top: 10px; }
.coach header a, .sessions + a { color: var(--bar-on); text-decoration: none; }
.coach header a:hover { text-decoration: underline; }
.lines li.tl { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 4px 0; }
.lines li.tl::before { display: none; }
.pill { display: inline-block; text-align: center; padding: 1px 0; border: 1px solid var(--border); border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.pill.up { border-color: #3dae6f; color: #3dae6f; }
.pill.stuck { border-color: #c02b2b; color: #c02b2b; }
.pill.lean { border-color: var(--bar); color: var(--bar-on); }
.coach .changes li { padding: 6px 0; }
.coach .changes .why { font-size: 12.5px; color: var(--muted); }
.coach .goal dd { font-size: 13.5px; }
details.more { margin-top: 4px; }
details.more > summary { cursor: pointer; color: var(--muted); font-size: 12.5px; padding: 2px 0; }
details.more > summary:hover { color: var(--ink-2); }
details.more p, details.more > span { display: block; margin-top: 3px; font-size: 13px; color: var(--ink-2); }
.suggestions li { padding: 8px 0 8px 30px; }
.suggestions .do { margin-top: 2px; font-size: 14px; }
.coach .tableview .sessions { margin-top: 8px; }

/* ---------- app navigation: tab bar, status strip ---------- */
.tabbar { display: flex; }
.tabbar > a, .morebtn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  flex: 1 1 0; min-width: 0; min-height: 56px; padding: 6px 2px;
  color: var(--muted); font: inherit; font-size: 11px; line-height: 1.2; text-decoration: none;
  background: none; border: 0; cursor: pointer;
}
.tabbar > a[aria-current="page"] { color: var(--ink); }
.tabbar > a[aria-current="page"] svg { color: var(--bar-on); }
.tabbar > a:focus-visible, .morebtn:focus-visible { outline: 2px solid var(--ink-2); outline-offset: -3px; border-radius: 8px; }
@media (max-width: 759px) {
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--surface); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
  }
  body.has-tabbar { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .top { padding-top: calc(10px + env(safe-area-inset-top)); padding-bottom: 8px; }
  h1 { font-size: 20px; }
}
@media (min-width: 760px) {
  .tabbar { position: relative; gap: 4px; }
  .tabbar > a, .morebtn {
    flex: none; flex-direction: row; gap: 6px; min-height: 32px; padding: 4px 12px;
    border: 1px solid var(--border); border-radius: 999px; color: var(--ink-2); font-size: 13px;
  }
  .tabbar > a:hover, .morebtn:hover { background: var(--wash); }
  .tabbar > a[aria-current="page"] { background: var(--wash); color: var(--ink); border-color: rgba(0, 0, 0, 0.22); }
  .tabbar svg { width: 16px; height: 16px; }
}
.strip {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px;
  max-width: 1080px; margin: -2px auto 10px; color: var(--muted); font-size: 12.5px;
}
.strip[hidden] { display: none; }
.strip a { color: var(--bar-on); text-decoration: none; }
.strip a.todo { color: #eb9e00; font-weight: 600; }
.strip .sep { color: var(--axis); }
.strip .stale::before { content: "▲ "; color: var(--warning); font-size: 10px; }

/* dashboard section chips */
.jump {
  grid-column: 1 / -1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  position: sticky; top: 0; z-index: 5; margin: 0 -16px; padding: 6px 16px; background: var(--page);
}
.jump::-webkit-scrollbar { display: none; }
.jump a {
  flex: none; display: inline-flex; align-items: center; min-height: 32px; padding: 4px 14px;
  border: 1px solid var(--border); border-radius: 999px; color: var(--ink-2); font-size: 13px; text-decoration: none;
}
.jump a:hover { background: var(--wash); }
.card { scroll-margin-top: 52px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* plan: one workout at a time on phones */
.segtabs { display: flex; gap: 6px; margin-bottom: 10px; }
.segtabs button {
  flex: 1; min-height: 44px; border: 1px solid var(--border); border-radius: 10px; background: var(--wash);
  color: var(--ink-2); font: inherit; font-weight: 650; cursor: pointer;
}
.segtabs button small { font-weight: 400; color: var(--muted); }
.segtabs button[aria-selected="true"] { background: var(--bar); border-color: var(--bar); color: #fcfcfc; }
.segtabs button[aria-selected="true"] small { color: #fcfcfc; }
.segtabs button:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }
@media (min-width: 860px) { .segtabs { display: none; } }
@media (max-width: 859px) { .session.off { display: none; } }

.btnlink {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px;
  border: 1px solid var(--border); border-radius: 999px; color: var(--bar-on); text-decoration: none;
}
.btnlink:hover { background: var(--wash); }
@media (min-width: 860px) { .jump { margin: 0; padding: 6px 0; } }

/* layout fixes found in a real render */
.today ul, .plan ul { margin: 0; padding: 0; list-style: none; }
.todo-list { margin-top: 6px; }
.strip { gap: 2px 14px; }
.strip .sep { display: none; }
.tlist li.pl { grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: baseline; }
.tlist li.pl > .setrows, .tlist li.pl > .why { grid-column: 1 / -1; }
.tlist li.pl .ex { font-weight: 600; }
.tlist li.pl .rx { text-align: right; }

/* brand mark, top left of every page */
.brand { display: inline-flex; flex: none; align-self: center; line-height: 0; border-radius: 8px; }
.brand img { display: block; width: 30px; height: 30px; }
.brand:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }

/* plan: "entered" ticks */
.todo-list li { grid-template-columns: auto minmax(0, 1fr) auto; }
.todo-list .rx { grid-column: 2 / -1; }
.entered { grid-column: 3; grid-row: 1; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: var(--muted); font-size: 12.5px; cursor: pointer; }
.entered input { width: 20px; height: 20px; accent-color: var(--bar); margin: 0; }
.todo-list li.done { opacity: 0.5; }
.todo-list li.done .ex { text-decoration: line-through; }

/* ---------- settings page ---------- */
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; white-space: nowrap; }
.settings h3 { margin: 12px 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.settings fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.settings p { margin: 0; }
.focus { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--wash); cursor: pointer; min-width: 0; }
.opt:has(input:checked) { border-color: var(--bar); background: rgba(11, 106, 202, 0.12); }
.opt input { margin-top: 3px; width: 20px; height: 20px; accent-color: var(--bar); flex: none; }
.opt strong { display: block; font-weight: 650; }
.opt em { display: block; color: var(--ink-2); font-style: normal; font-size: 13.5px; }
.opt small { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.opt:focus-within { outline: 2px solid var(--ink-2); outline-offset: 2px; }
.fields { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 6px; }
.field span { display: block; color: var(--ink-2); font-size: 12.5px; margin-bottom: 3px; }
.settings input[type="number"], .settings input[type="text"] {
  width: 100%; min-height: 44px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--wash); color: var(--ink); font: inherit; font-variant-numeric: tabular-nums;
}
.settings input:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 1px; }
.chips2 { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px !important; }
.chips2 li { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--wash); font-variant-numeric: tabular-nums; }
.chips2 button { min-width: 32px; min-height: 32px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.chips2 button:hover { color: var(--ink); background: var(--wash); }
.addrow { display: flex; gap: 8px; margin-top: 6px; }
.addrow input { flex: 1 1 auto; min-width: 0; }
.btn {
  min-height: 44px; padding: 6px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--wash);
  color: var(--ink); font: inherit; cursor: pointer;
}
.btn:hover { background: rgba(0, 0, 0, 0.09); }
.btn.primary { background: var(--bar); border-color: var(--bar); color: #fcfcfc; font-weight: 650; }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.suggest .lbl { color: var(--muted); font-size: 12.5px; }
.chip-btn { min-height: 32px; padding: 2px 12px; border: 1px dashed var(--border); border-radius: 999px; background: none; color: var(--bar-on); font: inherit; font-size: 13px; cursor: pointer; }
.switch { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.switch input { width: 22px; height: 22px; accent-color: var(--bar); }
.checks { display: grid; gap: 2px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--bar); flex: none; }
.settings .fine.err { color: #c02b2b; }
.difflist { margin: 0; padding: 0; list-style: none; }
.difflist li { padding: 6px 0; border-top: 1px solid var(--grid); font-size: 14px; }
.difflist li:first-child { border-top: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.settings textarea { width: 100%; margin-top: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--wash); color: var(--ink-2); font: 12.5px/1.4 ui-monospace, monospace; resize: vertical; }
@media (min-width: 640px) { .focus { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 860px) { .checks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.settings ul { margin: 0; padding: 0; list-style: none; }
.plan .targets { margin: 6px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--wash); color: var(--ink-2); font-size: 13px; }
.plan .targets .lbl { color: var(--muted); font-weight: 600; }
.todo-group .fine { margin: 6px 0 0; }
.btn.small { min-height: 36px; padding: 2px 12px; font-size: 13px; }

/* settings: coach card */
.opt .price { color: var(--ink-2); }
.costbox { margin-top: 14px; }
.costs { margin: 0; display: grid; gap: 0; }
.costs > div { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr); gap: 4px 12px; padding: 7px 0; border-top: 1px solid var(--grid); }
.costs dt { color: var(--muted); font-size: 13px; }
.costs dd { margin: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .costs > div { grid-template-columns: minmax(0, 1fr); } }

/* coach: what's new */
.lines li.tl > span:first-child:empty { display: block; }
#card-new .lines li.tl { padding: 3px 0; }
#card-new .lines li.tl { grid-template-columns: 72px minmax(0, 1fr); }
@media (max-width: 380px) { #card-new .lines li.tl { grid-template-columns: 66px minmax(0, 1fr); } }

/* today: plates, tools and the rest timer */
.platebox { margin-top: 4px; }
.platebox > summary { cursor: pointer; color: var(--bar-on); font-size: 13px; padding: 4px 0; }
.platebox p { margin: 3px 0 0; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.platebox .lbl { color: var(--muted); font-weight: 600; font-size: 12px; margin-top: 8px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.tools .btn[aria-pressed="false"] { opacity: 0.6; }
/* ---------- rest dock: sticky bar on top of Today, a ring that runs down ---------- */
:root { --accent: #0b6fd3; --accent-dim: #f6f6f6; --accent-bg: #f9f9f9; }
.rest {
  position: sticky; top: 0; z-index: 19; max-width: 1080px; margin: 0 auto 10px;
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: linear-gradient(180deg, #f8f8f8, #fcfcfc); border: 1px solid var(--accent-dim); border-radius: 0 0 18px 18px;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.138);
}
.rest[hidden] { display: none; }
.rest-ring { width: 50px; height: 50px; flex: none; transform: rotate(-90deg); }
.rest-ring circle { fill: none; stroke-width: 7; }
.rest-ring .trk { stroke: #f8f8f8; }
.rest-ring .arc { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 0.3s linear; }
.rest-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.rest-top { display: flex; align-items: baseline; gap: 10px; }
.rest-time { font-size: 30px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
.rest-set { color: #1d88f3; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.rest-label { margin-top: 3px; color: #1d88f3; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; line-height: 1.25; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rest-btns { display: flex; gap: 8px; flex: none; }
.rest-btns .btn { background: #e4e7eb; border-color: #cfcfcf; color: #3192f4; font-weight: 800; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .rest-ring .arc { transition: none; } }

/* ---------- the focus card on Today: the exercise you are on ---------- */
.dfocus { margin: 12px 0; }
.dfocus[hidden] { display: none; }
.frow { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: center; }
.ffig { display: block; width: 112px; height: 132px; padding: 4px; background: #fcfcfc; border: 1px solid #f8f8f8; border-radius: 16px; cursor: pointer; }
.ffig svg { display: block; width: 100%; height: 100%; }
.ffig.none { cursor: default; }
.finfo h3 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.finfo p { margin: 3px 0 0; color: #565656; font-size: 13px; }
.ftags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ftag { border: 1px solid #f6f6f6; color: #404040; border-radius: 99px; padding: 3px 9px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.ftag.h { border-color: var(--accent); color: var(--accent); }
.fchips { display: flex; gap: 8px; margin-top: 12px; }
.fchip { flex: 1; text-align: center; padding: 9px 0; border-radius: 12px; background: #f1f3f6; color: #565656; font-weight: 700; font-size: 13px; }
.fchip.ok { background: #f8f8f8; color: var(--accent); }
.fchip.now { outline: 2px solid var(--accent); outline-offset: -2px; color: var(--ink); }
.fctl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.fctl.one { grid-template-columns: 1fr; }
.fbox { background: #fcfcfc; border: 1px solid #f8f8f8; border-radius: 18px; padding: 10px; text-align: center; }
.today .dfocus input.fbig[type="number"] { width: 100%; min-height: 0; height: auto; padding: 0; margin: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; color: var(--ink); font-size: 52px; line-height: 1.05; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.today .dfocus input.fbig::-webkit-outer-spin-button, .today .dfocus input.fbig::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.today .dfocus input.fbig:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.flab { display: block; color: #626262; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; }
.fst { display: flex; gap: 8px; margin-top: 8px; }
.fstep { flex: 1; min-height: 44px; border: 0; border-radius: 10px; background: #f9f9f9; color: var(--ink); font-size: 20px; font-weight: 800; cursor: pointer; }
.fstep:active { background: #f6f6f6; }
.flog { display: block; width: 100%; margin-top: 12px; min-height: 52px; border: 0; border-radius: 16px; background: var(--accent); color: #fbfbfb; font-size: 18px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
.flog:active { filter: brightness(0.9); }
.flog:focus-visible, .fstep:focus-visible, .ffig:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.focusbtn { margin-left: 8px; padding: 2px 10px; border: 1px solid #cfcfcf; border-radius: 99px; background: transparent; color: var(--accent); font-size: 12px; font-weight: 700; cursor: pointer; }
.focusbtn[hidden] { display: none; }

/* progress: sets per muscle */
.heat { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.heat th, .heat td { padding: 7px 8px; border-top: 1px solid var(--grid); white-space: nowrap; }
.heat thead th { color: var(--muted); font-weight: 500; font-size: 12px; border-top: 0; }
.heat tbody th { text-align: left; font-weight: 500; }
.heat td[data-band="none"] { color: var(--muted); }
.heat td[data-band="in"] { background: rgba(25, 158, 112, 0.22); }
.heat td[data-band="high"] { background: rgba(200, 82, 35, 0.24); }
.heat td[data-band="partial"] { color: var(--ink-2); font-style: italic; }
.heat tr.total td, .heat tr.total th { color: var(--ink-2); border-top-color: var(--axis); }

/* settings: status list */
.statuslist { margin: 0; padding: 0; list-style: none; }
.statuslist li { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 4px 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--grid); }
.statuslist li:first-child { border-top: 0; }
.statuslist .dim { color: var(--ink-2); font-size: 13.5px; overflow-wrap: anywhere; }
.statuslist strong { font-weight: 600; }

/* exercise popup */
.movelink {
  padding: 0; margin: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: inherit; text-align: left;
  cursor: pointer; text-decoration: underline dotted var(--muted); text-underline-offset: 3px;
}
.movelink:hover { text-decoration-color: var(--bar-on); color: var(--bar-on); }
.movelink:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; border-radius: 3px; }
dialog.moves {
  width: min(92vw, 460px); max-height: 92vh; overflow: auto; padding: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 16px 48px rgba(16, 24, 40, 0.15);
}
dialog.moves::backdrop { background: rgba(16, 24, 40, 0.175); }
.moves-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.moves-head h2 { margin: 0; font-size: 17px; font-weight: 650; }
.moves-svg { display: block; width: 100%; height: auto; margin: 10px 0 6px; background: var(--page); border-radius: 12px; }
.moves-controls { display: flex; justify-content: center; margin-bottom: 6px; }
.moves-muscles { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; font-size: 13.5px; color: var(--ink-2); }
.moves-muscles strong { color: var(--ink); font-weight: 600; }
.moves-dot { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; }
.moves-cues { margin: 8px 0 0; padding: 0 0 0 20px; }
.moves-cues li { padding: 3px 0; color: var(--ink-2); font-size: 14px; }
.moves-avoid { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-2); }
dialog.moves .fine a { color: var(--bar-on); }

/* today: logging */
.today input[type="number"], .today input[type="text"], .today select {
  width: 100%; min-height: 44px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--wash); color: var(--ink); font: inherit; font-variant-numeric: tabular-nums;
}
.today select { appearance: auto; }
.today input:focus-visible, .today select:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 1px; }
.today .field span { display: block; color: var(--ink-2); font-size: 12.5px; margin-bottom: 3px; }
.today .fields { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 6px; }
.today .fields.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.setbox.extra[aria-pressed="false"] { border-style: dashed; color: var(--muted); }
.why.logged { color: var(--ink); font-variant-numeric: tabular-nums; }
.edithost:empty { display: none; }
.seteditor { margin: 6px 0 2px; padding: 10px; border: 1px solid var(--bar); border-radius: 12px; background: rgba(11, 111, 211, 0.08); }
.seteditor .lbl { margin: 0 0 4px; color: var(--ink-2); font-weight: 600; font-size: 13px; }
.stepper { display: flex; gap: 6px; align-items: stretch; }
.stepper .btn { min-width: 44px; padding: 0; font-size: 20px; line-height: 1; }
.stepper input { text-align: center; min-width: 0; }
.today .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.finish { margin-top: 12px; }
.finishform { margin-top: 10px; }
.today .fine.err { color: #c02b2b; margin: 6px 0 0; }
@media (max-width: 420px) { .today .fields.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tlist li.pl > .edithost { grid-column: 1 / -1; }
.seteditor .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seteditor .fields .field:nth-child(3) { grid-column: 1 / -1; }
.today .field .stepper { display: flex; margin: 0; }
.today .field .stepper input { flex: 1 1 auto; }
.stepper input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.stepper input[type="number"]::-webkit-inner-spin-button, .stepper input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .btn { min-width: 42px; }

/* the little barbell in the set editor */
.barbell { margin: 2px 0 8px; }
.barbell-svg { display: block; width: 100%; max-width: 360px; height: auto; background: var(--page); border-radius: 10px; }
.barbell-cap { margin: 4px 0 0; color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.barbell-cap.bad { color: #c02b2b; }

/* RPE explanation in the set editor */
.rpenote { margin: 4px 0 0; }
.rpeguide { margin-top: 6px; }
.rpeguide > summary { cursor: pointer; color: var(--bar-on); font-size: 13px; padding: 4px 0; }
.rpeguide table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rpeguide th, .rpeguide td { padding: 6px 8px 6px 0; border-top: 1px solid var(--grid); text-align: left; vertical-align: top; }
.rpeguide thead th { color: var(--muted); font-weight: 500; font-size: 12px; border-top: 0; }
.rpeguide tbody th { font-weight: 650; white-space: nowrap; }
.rpeguide td { color: var(--ink-2); }
.rpeguide td:nth-child(2) { white-space: nowrap; }

/* Today: a still picture of the exercise on the left of each exercise */
.movethumb {
  display: block; width: 84px; height: 84px; padding: 0; margin: 0; flex: none; overflow: hidden; cursor: pointer;
  border: 1px solid var(--border); border-radius: 16px;
  background: radial-gradient(circle at 50% 38%, rgba(212, 62, 23, 0.2), rgba(212, 62, 23, 0) 68%), linear-gradient(160deg, #f8f8f8, var(--page));
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.05), 0 2px 8px rgba(16, 24, 40, 0.087);
  transition: transform 0.15s, border-color 0.15s;
}
.movethumb svg { display: block; width: 100%; height: 100%; }
.movethumb.none { cursor: default; }
.movethumb.none svg { padding: 14px; box-sizing: border-box; opacity: 0.7; }
button.movethumb:hover { border-color: var(--bar-on); transform: scale(1.04); }
button.movethumb:active { transform: scale(0.97); }
button.movethumb:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }
.tlist li.pl:has(> .movethumb) { grid-template-columns: 84px minmax(0, 1fr) auto; }
.tlist li.pl:has(> .movethumb) > * { grid-column: 1 / -1; }
.tlist li.pl > .movethumb { grid-column: 1; grid-row: 1 / span 2; align-self: center; width: 84px; height: 84px; }
.tlist li.pl:has(> .movethumb) > .ex { grid-column: 2 / -1; grid-row: 1; align-self: end; }
.tlist li.pl:has(> .movethumb) > .rx { grid-column: 2 / -1; grid-row: 2; text-align: left; align-self: start; }
@media (min-width: 700px) {
  .tlist li.pl > .movethumb { grid-row: 1; }
  .tlist li.pl:has(> .movethumb) > .ex { grid-column: 2; grid-row: 1; align-self: center; }
  .tlist li.pl:has(> .movethumb) > .rx { grid-column: 3; grid-row: 1; text-align: right; align-self: center; }
}
@media (prefers-reduced-motion: reduce) { .movethumb { transition: none; } }

/* Settings: hub of sub pages */
.hublist { margin: 0; padding: 0; list-style: none; }
.hublist li + li { border-top: 1px solid var(--grid); }
.hublist a { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px 10px; min-height: 56px; padding: 8px 2px; color: inherit; text-decoration: none; }
.hublist a:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; border-radius: 8px; }
.hub-t { display: grid; gap: 1px; min-width: 0; }
.hub-t strong { font-weight: 600; font-size: 15.5px; }
.hub-s { color: var(--muted); font-size: 12.5px; }
.hub-v { color: var(--ink-2); font-size: 13px; text-align: right; }
.hub-go { color: var(--muted); font-size: 22px; line-height: 1; }
.hublist a:hover .hub-go { color: var(--bar-on); }
.backrow { margin: 0 0 8px; }
.backrow a { display: inline-flex; align-items: center; min-height: 40px; color: var(--bar-on); text-decoration: none; font-size: 14.5px; }
.backrow a:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; border-radius: 6px; }
.settings [hidden] { display: none !important; }

/* Today: one row per set, with kg and reps to edit */
.setrows { display: grid; gap: 8px; margin-top: 4px; }
.setrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.setn { flex: none; width: 44px; color: var(--ink-2); font-size: 13px; }
.setf { display: flex; flex: 1 1 0; min-width: 0; align-items: center; gap: 5px; margin: 0; }
.setf input { width: 100%; min-width: 0; min-height: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.setf .unit, .setf .bwtag { flex: none; color: var(--muted); font-size: 12.5px; }
.setf .bwtag { flex: 1; text-align: center; }
.setrow .setbox { flex: none; min-width: 56px; }
.setrow .err { flex-basis: 100%; margin: 0 0 0 52px; }
.setrow .err:empty { display: none; }
.setrow.on .setf input { color: var(--ink-2); }
.setrows { max-width: 440px; }

/* Today: a superset is one block you alternate inside */
.tlist li.ss { --ss: #eb9e00; position: relative; border-left: 3px solid var(--ss); padding-left: 12px; }
.tlist li.ss-1 { --ss: #248cf3; }
.tlist li.ss::before { content: attr(data-ss); position: absolute; left: 12px; right: 6px; top: 8px; color: var(--ss); font-size: 12px; font-weight: 600; line-height: 1.3; }
.tlist li.ss-first { padding-top: 36px; }
.tlist li.ss-next { padding-top: 32px; border-top: 1px dashed var(--ss); }
.tlist li.ss-last { padding-bottom: 12px; }
.tlist li.ss .tag { border-color: var(--ss); color: var(--ss); font-weight: 700; min-width: 24px; text-align: center; }

/* exercise popup: the plates on the bar, in the same colours as the drawing */
.moves-load { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 6px; justify-content: center; font-size: 13px; color: var(--ink-2); }
.moves-load[hidden] { display: none; }
.moves-plate { display: inline-block; min-width: 26px; padding: 1px 5px; border-radius: 5px; font-size: 12px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.moves-loadsum { margin-left: 4px; }

/* Drag-to-reorder tiles (reorder.js) */
.card.pressing { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.reordering .card { -webkit-user-select: none; user-select: none; }
.card.dragging { position: relative; z-index: 5; box-shadow: 0 10px 28px rgba(16, 24, 40, 0.15); outline: 2px solid var(--bar, #0c78e3); opacity: .96; }
.reordering .card:not(.dragging) { transition: none; }
.reorder-reset { text-align: center; }
.reorder-reset button { background: none; border: 0; color: inherit; opacity: .6; text-decoration: underline; font: inherit; cursor: pointer; padding: .5rem; }

/* Check-in and the "if rested" plan on Today */
.restedbox { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 8px 0 4px; padding: 10px 12px; border: 1px solid var(--line, #cccccc); border-radius: 12px; background: rgba(0, 0, 0, .03); }
.restedbox p { margin: 0; flex: 1 1 200px; }
#checkin .fields { margin-top: 8px; }
.restedbox[hidden] { display: none; }
.rdesc { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; min-height: 1em; }

/* ---------- a new record, under the title on Today ---------- */
.record { margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--warning); border-radius: 10px; background: rgba(230, 158, 5, 0.10); color: var(--ink); font-weight: 600; }
.record[hidden] { display: none; }

/* ---------- cloud sync status on Today ---------- */
.syncline[data-state="offline"], .syncline[data-state="failed"], .syncline[data-state="old-worker"] { color: var(--warning); }
.syncline[data-state="synced"] { color: var(--muted); }

/* ---------- Today as one full-page design (the Dock): graphite page, silver accent, no cards around the workout ---------- */
body.dockpage { --page: #fcfcfc; --surface: #f1f3f6; --border: #d3d9e0; --wash: #f1f3f6; background: #fcfcfc; }
.dockpage main.today { display: block; max-width: 560px; }
.todaypage .top { max-width: 560px; }
.dockpage .top h1 { font-size: 20px; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; }
.dockpage .updated { color: #808080; }
.todaypage .notice { max-width: 560px; }
.todaypage .rest { max-width: 560px; }
.tday, .tcheck { background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; }
.tday > header { margin: 6px 0 4px; }
.tday > header h2 { font-size: 28px; line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; text-transform: uppercase; }
.tday > header p { margin: 4px 0 0; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.dockpage .verdict { margin: 8px 0 0; color: #404040; font-size: 14px; font-style: normal; line-height: 1.45; }
.dockpage .progress { height: 6px; max-width: none; background: #f8f8f8; margin: 12px 0 4px; }
.dockpage .progress span { background: var(--accent); }
.dockpage .fine { color: #626262; }
.dockpage .record { margin: 10px 0 0; padding: 9px 14px; border: 1.5px solid var(--accent); border-radius: 12px; background: transparent; color: var(--accent); font-size: 12.5px; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; }
.dockpage .syncline[data-state="synced"] { color: #808080; }
.dockpage .restedbox { border: 1px solid #d3d9e0; border-radius: 14px; background: #f1f3f6; }

/* the exercise list, short: name, what to do, how far you are */
.xlist { margin: 14px 0 0 !important; display: grid; gap: 0; }
.xrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n c" "r c"; gap: 2px 10px; align-items: center; width: 100%; padding: 13px 8px; background: none; border: 0; border-bottom: 1px solid #e4e7eb; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.xrow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 10px; }
.xn { grid-area: n; display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; }
.xn > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xr { grid-area: r; color: #626262; font-size: 12.5px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xc { grid-area: c; min-width: 2.4em; text-align: right; color: #626262; font-size: 12px; font-weight: 800; }
.xrow.done .xn, .xrow.done .xr { color: #949494; }
.xrow.done .xc { color: var(--accent); }
.xrow.now { background: linear-gradient(90deg, rgba(11, 111, 211, 0.10), transparent); box-shadow: inset 3px 0 0 var(--accent); }
.xrow.now .xn { color: var(--accent); }
.fdone { display: grid; gap: 4px; padding: 16px; border: 1.5px solid var(--accent); border-radius: 18px; background: #f9f9f9; }
.fdone b { font-size: 20px; text-transform: uppercase; }
.fdone span { color: #404040; font-size: 13px; }
.fnote { margin: 10px 0 0; color: #626262; font-size: 12.5px; line-height: 1.45; }
.fchip { border: 0; font: inherit; font-weight: 700; font-size: 13px; }
button.fchip { cursor: pointer; }
button.fchip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* the full set-by-set list (every row editable), kept behind one tap */
.alllist { margin-top: 14px; }
.alllist > summary { cursor: pointer; padding: 10px 2px; color: #626262; font-size: 13px; font-weight: 700; list-style: none; }
.alllist > summary::-webkit-details-marker { display: none; }
.alllist > summary::before { content: "▸ "; color: var(--accent); }
.alllist[open] > summary::before { content: "▾ "; }
.dockpage .alllist .tlist li.pl { border-bottom: 1px solid #e4e7eb; }

/* the set editor (RPE, change, remove), dark teal */
.dockpage .seteditor { margin-top: 10px; padding: 12px; border: 1px solid #cfcfcf; border-radius: 16px; background: #f9f9f9; }
.dockpage .btn { background: #e4e7eb; border-color: #cfcfcf; color: #3192f4; font-weight: 700; }
.dockpage .btn.primary { background: var(--accent); border-color: var(--accent); color: #fbfbfb; font-weight: 800; }
.dockpage input[type="number"], .dockpage input[type="text"], .dockpage select { background: #fcfcfc; border-color: #f8f8f8; }

/* finishing and the check-in */
.dockpage .finish { margin-top: 18px; }
.dockpage .finish > .btn.primary { width: 100%; min-height: 52px; border-radius: 16px; font-size: 16px; letter-spacing: 0.06em; text-transform: uppercase; }
.dockpage .finishform { margin-top: 12px; padding: 14px; border: 1px solid #d3d9e0; border-radius: 16px; background: #f1f3f6; }
.tcheck { margin-top: 22px; padding-top: 16px; border-top: 1px solid #e4e7eb; }
.tcheck > header h2 { font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #404040; }
.tcheck > header p { color: #626262; }
.dockpage .platebox summary { color: var(--accent); }
.dockpage .platebox { margin-top: 10px; }
/* Today has no header: the date and workout title are the page's heading; the tab bar is the navigation */
.todaypage .top, .todaypage .strip { display: none !important; }
.dockpage main.today { padding-top: calc(14px + env(safe-area-inset-top)); }

/* ---------- the Dock theme on every page: graphite, silver accent, graphite panels, uppercase headings ---------- */
body.dockpage { --bar: #0b6fd3; --bar-on: #1081f2; --muted: #626262; --ink-2: #303030; --grid: #e4e7eb; --axis: #f6f6f6; }
.dockpage .card, .dockpage .tile { background: #f1f3f6; border: 1px solid #d3d9e0; border-radius: 16px; box-shadow: none; }
.dockpage .card h2 { font-size: 14px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.dockpage .card > header p { color: #626262; }
.dockpage .top h1 { font-size: 22px; }
.dockpage .brand img { border-radius: 8px; }
.dockpage .strip a { color: var(--accent); }
.dockpage .nav a { color: #626262; }
.dockpage .nav a[aria-current="page"] { color: var(--accent); }
.dockpage .tabbar { border-top: 1px solid #e4e7eb; }
.dockpage .tabbar > a, .dockpage .morebtn { color: #808080; font-weight: 600; }
.dockpage .tabbar > a[aria-current="page"], .dockpage .morebtn[aria-current="page"] { color: var(--accent); }
.dockpage .tabbar > a[aria-current="page"] svg, .dockpage .morebtn[aria-current="page"] svg { color: var(--accent); }
.dockpage a { color: var(--accent); }
.dockpage .btn:hover { background: #f7f7f7; }
.dockpage .jump a { color: #404040; border-color: #d3d9e0; background: #f1f3f6; }
.dockpage .jump a:hover { color: var(--accent); }
.dockpage .foot { color: #808080; }
@media (max-width: 759px) { .dockpage .tabbar { background: #fdfdfd; } }
@media (min-width: 760px) { .dockpage .tabbar { background: transparent; border-top: 0; } }
.dockpage .hublist a { color: var(--ink); }
.dockpage .hub-t strong { text-transform: uppercase; letter-spacing: 0.02em; font-weight: 800; }
.dockpage .hub-v { color: #404040; }

/* Today, tighter: the Log button must fit above the tab bar with the rest bar and a superset note showing */
.dockpage main.today { padding-top: 4px; }
.todaypage .rest { margin-bottom: 4px; }
.tday > header { margin: 0 0 2px; }
.tday > header h2 { font-size: 24px; }
.tday > header p { margin-top: 2px; font-size: 11px; }
.dockpage .verdict { margin: 4px 0 0; font-size: 13.5px; line-height: 1.35; }
.dockpage .progress { margin: 8px 0 2px; }
.todaypage .tday .fine { margin: 3px 0 0; font-size: 12px; }
.dfocus { margin: 8px 0; }
.frow { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
.ffig { width: 96px; height: 112px; }
.finfo h3 { font-size: 20px; }
.ftags { margin-top: 6px; }
.fchips { margin-top: 8px; }
.fchip { padding: 7px 0; }
.fctl { margin-top: 8px; gap: 8px; }
.fbox { padding: 8px; }
.today .dfocus input.fbig[type="number"] { font-size: 46px; }
.fst { margin-top: 6px; }
.fstep { min-height: 40px; }
.flog { margin-top: 8px; min-height: 50px; }
.dfocus .fnote { margin-top: 6px; font-size: 12px; }

/* ---------- the Plan page in the Today design: one narrow column, no cards, chips for the days, rows for the exercises ---------- */
.todaypage main.plan { display: block; max-width: 560px; padding-top: calc(4px + env(safe-area-inset-top)); }
.plan .plan-help { margin: 6px 0 0; }
.plan mark { background: none; color: var(--accent); font-weight: 800; }
.plan .segtabs { display: flex !important; gap: 8px; margin: 14px 0 6px; }
.plan .segtabs button { flex: 1; min-height: 0; padding: 10px 0; border: 0; border-radius: 12px; background: #f1f3f6; color: #565656; font: inherit; font-size: 13px; font-weight: 800; letter-spacing: 0.02em; }
.plan .segtabs button small { color: inherit; opacity: 0.8; font-weight: 600; }
.plan .segtabs button[aria-selected="true"] { background: #fcfcfc; outline: 2px solid var(--accent); outline-offset: -2px; color: var(--ink); }
.plan .segtabs button[aria-selected="true"] small { color: var(--ink); }
.plan .sessions { display: block; }
.plan .session { padding: 0; border: 0; border-radius: 0; background: none; }
.plan .session.off { display: none !important; }
.plan .session h3 { margin-top: 10px; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; text-transform: uppercase; }
.plan .session .when { margin: 2px 0 0; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.plan .session .note { margin: 8px 0 0; color: #404040; font-size: 13.5px; line-height: 1.4; }
.plan .session > .fine { margin: 6px 0 0; font-size: 12px; }
.plan .rxlist { margin: 10px 0 0 !important; }
.plan .rxlist li.pl { padding: 14px 4px; border-bottom: 1px solid #e4e7eb; gap: 8px; }
.plan .rxlist li.pl .ex { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; }
.plan .rxlist li.pl.removed .ex { opacity: 0.8; }
.plan .rxlist li.pl.same { opacity: 0.6; }
.plan .kind { margin: 0; min-width: 0; padding: 2px 9px; border-color: #f7f7f7; color: #565656; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.plan .kind.k-change, .plan .kind.k-new { border-color: var(--accent); color: var(--accent); }
.plan .chips { gap: 6px; margin-top: 2px; }
.plan .chip { padding: 5px 10px; border: 0; border-radius: 10px; background: #f1f3f6; font-size: 13px; }
.plan .chip .lbl { color: #626262; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.plan .chip.chg { outline: 1.5px solid var(--accent); outline-offset: -1.5px; background: #fcfcfc; }
.plan .pl .why { color: #626262; font-size: 12.5px; line-height: 1.4; }
.plan .movelink { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }

/* ---------- the Coach page in the Today design: one narrow column, flat sections, rows and tiles ---------- */
.todaypage main.coach { display: block; max-width: 560px; padding-top: calc(4px + env(safe-area-inset-top)); }
.coach .card { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.coach .card + .card { margin-top: 28px; padding-top: 22px; border-top: 1px solid #e4e7eb; }
.coach .card > header { margin-bottom: 10px; }
.coach .card h2 { font-size: 24px; line-height: 1.05; font-weight: 800; letter-spacing: -0.01em; text-transform: uppercase; }
.coach .card > header p { margin: 6px 0 0; color: #626262; font-size: 13px; }
.coach .card > header p.stamp { margin-top: 4px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.coach .card > header a { color: var(--accent); }
.coach .suggestions li { padding: 14px 0 14px 34px; border-top: 0; border-bottom: 1px solid #e4e7eb; }
.coach .suggestions li:first-child { padding-top: 6px; }
.coach .suggestions li::before { top: 14px; width: 24px; height: 24px; border-radius: 8px; background: #f1f3f6; color: #303030; font-size: 12px; line-height: 24px; }
.coach .suggestions li:first-child::before { top: 6px; }
.coach .suggestions strong { font-size: 15.5px; }
.coach .suggestions .do { font-size: 14px; line-height: 1.45; color: #303030; }
.coach .tag { margin-right: 8px; padding: 2px 9px; border: 1px solid #f7f7f7; border-radius: 999px; color: #565656; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.coach .lines li::before { background: var(--accent); }
.coach .pill { border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.coach .changes li, .coach .rules li { padding: 12px 0; border-top: 0; border-bottom: 1px solid #e4e7eb; }
.coach .goals { gap: 10px; margin-top: 14px; }
.coach .goal { padding: 12px 14px; border: 0; border-radius: 14px; background: #f1f3f6; }
.coach .goal dt { color: #303030; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.coach .tableview { border-top: 0; margin-top: 8px; }
.coach .tableview summary { color: #626262; font-size: 13px; font-weight: 700; list-style: none; padding: 8px 2px; }
.coach .tableview summary::-webkit-details-marker { display: none; }
.coach .tableview summary::before { content: "▸ "; color: var(--accent); }
.coach .tableview[open] > summary::before { content: "▾ "; }
.coach .src { color: #626262; }

/* ---------- Progress and Settings in the Today design (same as Plan and Coach) ---------- */
.todaypage main.progresspage, .todaypage main.settings { display: block; max-width: 560px; padding-top: calc(4px + env(safe-area-inset-top)); }
.pagehead { margin: 0 0 8px; }
.pagehead h2 { margin: 0; font-size: 28px; line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; text-transform: uppercase; }
.pagehead .stamp { margin: 4px 0 0; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.progresspage .jump { margin: 0 0 4px; padding: 8px 0; gap: 8px; }
.progresspage .jump a { padding: 9px 14px; border: 0; border-radius: 12px; background: #f1f3f6; color: #565656; font-size: 13px; font-weight: 800; letter-spacing: 0.02em; }
.progresspage .jump a:hover { color: var(--accent); }
.progresspage .tiles .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.progresspage .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.dockpage .progresspage .tile { padding: 12px 14px; border: 0; border-radius: 14px; background: #f1f3f6; }
.progresspage .tile .label { color: #565656; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
:is(.progresspage, .settings) .card { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.progresspage .card { margin-top: 20px; }
.progresspage .cbody { padding: 14px; border: 1px solid #d3d9e0; border-radius: 16px; background: #f1f3f6; }
.settings .card:not([hidden]) ~ .card:not([hidden]) { margin-top: 28px; padding-top: 22px; border-top: 1px solid #e4e7eb; }
:is(.progresspage, .settings) .card > header { margin-bottom: 10px; }
.progresspage .card > header { margin-bottom: 8px; }
:is(.progresspage, .settings) .card h2 { font-size: 22px; line-height: 1.05; font-weight: 800; letter-spacing: -0.01em; text-transform: uppercase; }
.progresspage .card h2 { margin: 0; font-size: 13px; line-height: 1.3; font-weight: 800; letter-spacing: 0.12em; color: #404040; }
:is(.progresspage, .settings) .card > header p { margin: 6px 0 0; color: #626262; font-size: 13px; }
.progresspage .card > header p { margin: 3px 0 0; font-size: 12px; }
:is(.progresspage, .settings) .tableview { border-top: 0; margin-top: 8px; }
:is(.progresspage, .settings) .tableview summary { color: #626262; font-size: 13px; font-weight: 700; list-style: none; padding: 8px 2px; }
:is(.progresspage, .settings) .tableview summary::-webkit-details-marker { display: none; }
:is(.progresspage, .settings) .tableview summary::before { content: "▸ "; color: var(--accent); }
:is(.progresspage, .settings) .tableview[open] > summary::before { content: "▾ "; }
.settings .hub { padding: 0 !important; border: 0 !important; background: none !important; }
.settings .backrow { margin: 4px 0 14px; }
.settings .backrow a { color: var(--accent); font-weight: 700; }
.progresspage .jump { justify-content: space-between; gap: 6px; }
.progresspage .jump a { padding: 9px 11px; font-size: 12.5px; }

/* ---------- the top bar: app name, the page tabs on wide screens, the bell ---------- */
:root { --appbar-h: 56px; --bodypad: 16px; }
@media (min-width: 860px) { :root { --bodypad: 24px; } }
.appbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; box-sizing: border-box; height: calc(var(--appbar-h) + env(safe-area-inset-top)); margin-inline: calc(-1 * var(--bodypad)); padding: env(safe-area-inset-top) var(--bodypad) 0; background: var(--page); border-bottom: 1px solid #e4e7eb; }
.appname { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.dockpage .appname { color: var(--ink); }
.appname img { width: 26px; height: 26px; border-radius: 7px; display: block; }
.appname span { font-size: 15px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }
.appbar-nav { flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; }
.appbar-nav .tabbar { position: static; background: none; border: 0; padding: 0; }
.bellwrap { margin-left: auto; position: relative; flex: none; }
.bell { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: none; color: var(--ink-2); cursor: pointer; }
.bell:hover, .bell[aria-expanded="true"] { background: #f1f3f6; color: var(--ink); }
.bell:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.bell svg { width: 22px; height: 22px; }
.bell .badge { position: absolute; top: 5px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: #fbfbfb; font-size: 10.5px; font-weight: 800; line-height: 17px; text-align: center; box-sizing: border-box; box-shadow: 0 0 0 2px var(--page); }
.bell .badge[hidden] { display: none; }
.bellmenu { position: absolute; right: 0; top: calc(100% + 6px); width: min(340px, calc(100vw - 20px)); padding: 6px; border: 1px solid #d3d9e0; border-radius: 16px; background: #fafafa; box-shadow: 0 12px 32px rgba(16, 24, 40, 0.15); }
.bellmenu[hidden] { display: none; }
.bellhead { margin: 0; padding: 8px 10px 6px; color: #626262; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.bellitem { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.bellitem strong { font-size: 14px; font-weight: 700; }
.bellitem span { color: #626262; font-size: 12.5px; }
.bellitem.new { background: #f8f8f8; }
.bellitem.new strong::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
a.bellitem:hover { background: #172230; }
.bellnone { margin: 0; padding: 10px 12px 12px; color: #626262; font-size: 13px; }
/* the rest dock sticks under the bar; section jumps and scroll targets leave room for it */
.todaypage .rest { top: calc(var(--appbar-h) + env(safe-area-inset-top)); }
.progresspage .jump { top: calc(var(--appbar-h) + env(safe-area-inset-top)); }
.card { scroll-margin-top: calc(var(--appbar-h) + 12px); }
body.has-appbar.has-tabbar .top, body.has-appbar .top { display: none !important; }
@media (min-width: 760px) { .appbar-nav .tabbar { gap: 4px; } }
/* the Log button stays reachable: pinned just above the tab bar while the focus card is on screen */
@media (max-width: 759px) {
  .today .dfocus .flog { position: sticky; bottom: calc(56px + env(safe-area-inset-bottom) + 10px); z-index: 6; box-shadow: 0 -14px 18px -6px var(--page), 0 6px 18px rgba(16, 24, 40, 0.138); }
}

/* ---------- the profile picture in the top bar, and Settings under it ---------- */
.profwrap { position: relative; flex: none; margin-left: 2px; }
.avatar { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; overflow: hidden; border: 1px solid #d3d9e0; border-radius: 50%; background: #f1f3f6; color: var(--ink-2); cursor: pointer; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar svg { width: 20px; height: 20px; }
.avatar:hover, .avatar[aria-expanded="true"] { border-color: #b1b1b1; color: var(--ink); }
.avatar[aria-current="page"] { border-color: var(--accent); }
.avatar:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.profmenu { width: min(260px, calc(100vw - 20px)); }
.profitem { display: flex !important; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.profitem svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.profitem strong { font-size: 14px; font-weight: 700; }
.profitem:hover { background: #172230; }
.profitem[aria-current="page"] { background: #f8f8f8; }
.bellwrap { margin-left: auto; }

/* ---------- one page title on every page: the same size, the same place, the same line under it ---------- */
body.todaypage main { padding-top: 16px; }
body.todaypage :is(.tday > header, .pagehead, .coach .card:first-child > header, .settings .card.pagetitle > header) { margin: 0 0 8px; }
body.todaypage :is(.tday > header h2, .pagehead h2, .coach .card:first-child > header h2, .settings .card.pagetitle > header h2) { margin: 0; font-size: 26px; line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; text-transform: uppercase; }
body.todaypage :is(.tday > header p, .pagehead .stamp, .coach .card:first-child > header p.stamp) { margin: 4px 0 0; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
body.todaypage .settings .backrow { margin: 0 0 12px; }
body.todaypage.dockpage main.today, body.todaypage main.plan, body.todaypage main.coach, body.todaypage main.progresspage, body.todaypage main.settings { padding-top: 16px; }
body.todaypage main.plan, body.todaypage main.coach, body.todaypage main.progresspage, body.todaypage main.settings { padding-top: 4px; }
.tday > .tcheck { margin: 14px 0 18px; padding: 0 0 16px; border-top: 0; border-bottom: 1px solid #e4e7eb; }

/* ---------- rest day: the workout stays hidden until "Start workout anyway" ---------- */
main.restmode :is(#progress, #progress-text, #log-note, #sync-status, #pr-banner, #focus, #fedit, #xlist, #alllist, #finish) { display: none !important; }

/* ---------- the plus button in the tab bar: start today's workout ---------- */
.tabbar > .startbtn { flex: none; align-self: center; display: grid; place-items: center; width: 56px; height: 56px; margin: -22px 12px 0 6px; border-radius: 50%; background: var(--accent); color: #f9f9f9 !important; box-shadow: 0 0 0 5px #fdfdfd, 0 6px 18px rgba(11, 111, 211, 0.35); text-decoration: none; }
.tabbar > .startbtn svg { width: 28px; height: 28px; stroke-width: 2.6; color: #f9f9f9; }
.tabbar > .startbtn:active { transform: scale(0.94); }
.tabbar > .startbtn:focus-visible { outline: 2px solid #0d0d0d; outline-offset: 3px; }
@media (min-width: 760px) {
  .tabbar > .startbtn { width: 34px; height: 34px; margin: 0 0 0 8px; box-shadow: none; }
  .tabbar > .startbtn svg { width: 18px; height: 18px; }
}

/* Body map on Today (bodymap.js): the muscles of the latest session (azure) and the one before (silver), front and back.
   Shown on a rest day instead of the workout and once today's workout is finished. */
.bodymap { margin-top: 18px; padding-top: 14px; border-top: 1px solid #e4e7eb; }
.bodymap h3 { margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #404040; }
.bodymap .bmfigs { display: flex; justify-content: center; gap: 6%; }
.bodymap .bmview { margin: 0; width: 42%; max-width: 180px; text-align: center; }
.bodymap .bmfig { display: block; width: 100%; height: auto; }
.bodymap figcaption { margin-top: 4px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #808080; }
.bodymap .bmleg { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: #626262; }
.bodymap .bmleg li { display: block; }
.bodymap .bmleg i { display: inline-block; width: 11px; height: 11px; margin-right: 8px; border-radius: 3px; vertical-align: -1px; }
.bodymap .bmleg span { display: block; margin: 2px 0 0 19px; line-height: 1.4; }
.bodymap .bmleg .now i { background: var(--accent); }
.bodymap .bmleg .before i { background: #404040; }
.bodymap .bmleg strong { color: #303030; font-weight: 700; white-space: nowrap; }
/* Settings > Appearance: theme and body figure, styled like the other fields */
.settings .field.pick { display: block; margin: 14px 0 6px; max-width: 300px; }
.settings .field.pick select { width: 100%; min-height: 44px; padding: 6px 10px; border: 1px solid #f8f8f8; border-radius: 10px; background: #fcfcfc; color: var(--ink); font: inherit; }

/* ---------- Train / Food mode (theme.js sets <html data-mode>, nav.js draws the switch, food.js the food pages) ---------- */
html[data-mode="food"] { --accent: #31b970; --bar: #31b970; --bar-on: #2ebd6d; }
html[data-mode="food"] .tabbar > .startbtn { box-shadow: 0 0 0 5px #fdfdfd, 0 6px 18px rgba(49, 185, 112, 0.35); color: #fbfbfb !important; }
html[data-mode="food"] .tabbar > .startbtn svg { color: #fbfbfb; }
html:is([data-mode="food"], [data-mode="run"], [data-mode="bike"], [data-mode="swim"]) body > :is(main#app:not(.settings), #rest, .strip, .notice, .top, .reorder-reset, footer.foot) { display: none !important; }
.modesw { display: flex; gap: 2px; margin-left: auto; padding: 3px; border-radius: 99px; background: #edeff3; flex: none; }
.modesw + .bellwrap { margin-left: 2px; }
.modesw button { display: flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 11px; border: 0; border-radius: 99px; background: none; color: #626262; font: inherit; font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.modesw button svg { width: 16px; height: 16px; }
.modesw button.on { background: var(--accent); color: #fbfbfb; cursor: default; }
.modesw button:not(.on) span { display: none; }            /* only the mode in use is named (three names do not fit a phone) */
.modesw button:not(.on) { padding: 0 9px; }
html[data-mode="food"] .modesw button.on { color: #fbfbfb; }
html[data-mode="run"] { --accent: #eb5d00; --bar: #eb5d00; --bar-on: #eb5f00; }
html[data-mode="run"] .tabbar > .startbtn { box-shadow: 0 0 0 5px #fdfdfd, 0 6px 18px rgba(235, 93, 0, 0.35); color: #fafafa !important; }
html[data-mode="run"] .tabbar > .startbtn svg { color: #fafafa; }
html[data-mode="run"] .modesw button.on { color: #fafafa; }
.modesw button { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.modesw button.dragging { transform: scale(1.12); box-shadow: 0 2px 10px rgba(16, 24, 40, 0.087); }
.modesw button:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
@media (max-width: 460px) { .appname span { display: none; } }

.foodpage { display: block; max-width: 560px; margin: 0 auto; padding-bottom: 24px; }
.foodpage .fhead { margin: 0 0 8px; }      /* the same top as the training pages' titles (body.todaypage :is(.tday > header ...)) */
.foodpage .fhead h2 { margin: 0; font-size: 26px; line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; text-transform: uppercase; }
.foodpage .fsub { margin: 4px 0 0; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.foodpage .fcard { margin-top: 12px; padding: 14px; border: 1px solid #d3d9e0; border-radius: 16px; background: #f1f3f6; }
.foodpage .fh3 { margin: 20px 0 8px; font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #404040; }
.foodpage .fringrow { display: flex; align-items: center; gap: 16px; }
.fring { width: 120px; height: 120px; flex: none; }
.fring circle { fill: none; stroke-width: 11; }
.fring .trk { stroke: #f6f6f6; }
.fring .arc { stroke: var(--accent); stroke-linecap: round; }
.fring .arc.over { stroke: #c02b2b; }
.fring .big { fill: var(--ink); font-size: 22px; font-weight: 800; text-anchor: middle; }
.fring .small { fill: #626262; font-size: 9.5px; text-anchor: middle; }
.foodpage .fmacs { flex: 1; display: grid; gap: 10px; min-width: 0; }
.foodpage .fmac { font-size: 12.5px; color: #404040; }
.foodpage .fmac b { color: var(--ink); }
.foodpage .fmac i { display: block; height: 7px; margin-top: 4px; border-radius: 4px; background: #f6f6f6; overflow: hidden; }
.foodpage .fmac u { display: block; height: 100%; border-radius: 4px; }
.foodpage .fmac.p u { background: var(--accent); }
.foodpage .fmac.c u { background: #1d88f3; }
.foodpage .fmac.f u { background: #cb8e20; }
.foodpage .fmeals { list-style: none; margin: 0; padding: 0; }
.foodpage .fmeals button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 12px 0; border: 0; border-bottom: 1px solid #e4e7eb; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.foodpage .fmeals .ft { flex: 1; min-width: 0; }
.foodpage .fmeals b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foodpage .fmeals small { display: block; margin-top: 2px; color: #626262; font-size: 12.5px; }
.foodpage .fmeals .fk { text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; }
.foodpage .fsnap { display: block; width: 100%; min-height: 50px; margin-top: 16px; border-radius: 14px; font-size: 15px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #fbfbfb; }
.foodpage .fweight { display: flex; align-items: baseline; gap: 10px; }
.foodpage .flabel { color: #626262; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.foodpage .fweight b { font-size: 20px; }
.foodpage .fweight small, .foodpage .ftile small { color: #626262; font-size: 12px; }
.foodpage .ftiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.foodpage .ftile { display: grid; gap: 3px; padding: 11px; }
.foodpage .ftile b { font-size: 19px; font-variant-numeric: tabular-nums; }
.foodpage .fgrid, .fsheet .fgrid { display: grid; gap: 10px; margin-top: 8px; }
.foodpage .fgrid.three, .fsheet .fgrid.two { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.fsheet .fgrid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.foodpage .fsplit { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foodpage .fsplit li { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: #f1f3f6; font-size: 13px; color: #404040; }
.foodpage .fsplit b { color: var(--ink); }
.foodpage .fsug h3 { margin: 8px 0 4px; font-size: 16px; }
.foodpage .fsug p { margin: 0; color: #404040; font-size: 13.5px; line-height: 1.45; }
.foodpage .fsugtop { display: flex; gap: 10px; align-items: center; }
.foodpage .fsugtop b { color: #626262; }
.foodpage .fsug .chip { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #404040; }
.fchart { display: block; width: 100%; height: auto; }
.fchart .col { fill: #2f6e4c; }
.fchart .col.train { fill: var(--accent); }
.fchart .ln { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.fchart .dot { fill: var(--accent); }
.fchart .endl { text-anchor: start; font-weight: 700; }
.fchart .over { fill: #c02b2b; }
.fchart .tgt { stroke: var(--ink); stroke-width: 2; opacity: 0.7; }
.fchart .ax { fill: #626262; font-size: 10px; text-anchor: middle; }
.foodpage .ftable { margin-top: 8px; font-size: 13px; }
.foodpage .ftable summary { color: var(--accent); cursor: pointer; font-weight: 700; }
.foodpage .ftable table { width: 100%; margin-top: 6px; border-collapse: collapse; }
.foodpage .ftable td, .foodpage .ftable th { padding: 4px 0; border-bottom: 1px solid #e4e7eb; text-align: left; }
.foodpage .ftable .num { text-align: right; font-variant-numeric: tabular-nums; }
.foodpage .field input, .fsheet .field input { width: 100%; min-height: 44px; padding: 6px 10px; border: 1px solid #f8f8f8; border-radius: 10px; background: #fcfcfc; color: var(--ink); font: inherit; box-sizing: border-box; }
.foodpage .field span, .fsheet .field span { display: block; margin-bottom: 3px; color: var(--ink-2); font-size: 12.5px; }
.factions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.fsheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(16, 24, 40, 0.15); }
.fsheet[hidden] { display: none; }
.fsheet-box { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; box-sizing: border-box; padding: 16px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: #f9f9f9; border-top: 1px solid #f5f5f5; }
.fsheet-box h3 { margin: 6px 0; font-size: 18px; }
.fsheet .fphoto { display: block; width: 100%; max-height: 38vh; object-fit: cover; border-radius: 14px; }
.fsheet .fconf { margin: 10px 0 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.fsheet .fconf.low { color: #cb8e20; }
.fsheet .fsum { margin: 8px 0; font-size: 14px; }
.fitems { list-style: none; margin: 12px 0 0; padding: 0; font-size: 13px; }
.fitems li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid #f7f7f7; color: #404040; }
.fitems .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fwait { display: flex; align-items: center; gap: 10px; margin: 16px 0 6px; font-size: 15px; }
.fspin { width: 18px; height: 18px; border: 3px solid #f4f4f4; border-top-color: var(--accent); border-radius: 50%; animation: fspin 0.9s linear infinite; }
@keyframes fspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .fspin { animation: none; } }
body.fsheet-open { overflow: hidden; }
.foodpage .fpending .frow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #e4e7eb; }
.foodpage .fthumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; }
.foodpage .fpending small { white-space: normal; }
/* Run mode (run.js): the week strip on Today, the weekday buttons on Plan */
.runpage .fchart .col { fill: #8a4a22; }
.runpage .fchart .col.train { fill: var(--accent); }
.foodpage a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.fsheet a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.runpage .rweek { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.runpage .rweek li { display: grid; justify-items: center; gap: 6px; padding: 8px 0; border-radius: 12px; background: #f1f3f6; }
.runpage .rweek li.now { outline: 2px solid var(--accent); outline-offset: -2px; }
.runpage .rwd { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: #626262; text-transform: uppercase; }
.runpage .rdot { width: 8px; height: 8px; border-radius: 50%; background: #f6f6f6; display: inline-block; }
.runpage .rdot.lift { background: #0b6fd3; }
.runpage .rrun { min-width: 26px; height: 22px; display: inline-grid; place-items: center; border-radius: 7px; font-size: 12px; font-weight: 800; color: var(--accent); }
.runpage .rrun.plan { border: 1.5px solid var(--accent); }
.runpage .rrun.done { background: var(--accent); color: #fafafa; }
.runpage .rlegend { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; color: #626262; font-size: 12.5px; }
.runpage .rlegend li { display: flex; align-items: center; gap: 10px; }
.runpage .rlegend .rrun { flex: none; min-width: 34px; }
.runpage .rlegend .rdot { flex: none; margin: 0 13px; }
.runpage .rlegend .rrun { min-width: 28px; height: 18px; font-size: 10px; }
.runpage .rplanhead { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 10px; }
.runpage .rplanhead b { font-size: 17px; }
.runpage .rplanhead span { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.runpage .rchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.runpage .rchips button { min-height: 38px; padding: 0 12px; border: 1px solid #f4f4f4; border-radius: 99px; background: none; color: #404040; font: inherit; font-size: 13px; cursor: pointer; }
.runpage .rchips button.on { border-color: var(--accent); background: var(--accent); color: #fafafa; font-weight: 800; }

/* ---------- Train pages: the same cards as Food and Run (panel #f1f3f6, border #d3d9e0, 16 px corners) ---------- */
.todaypage .bodymap { margin-top: 20px; padding: 0; border-top: 0; }
.todaypage .bodymap h3 { margin: 0 0 8px; }
.todaypage .bodymap #bodymap-art { padding: 14px; border: 1px solid #d3d9e0; border-radius: 16px; background: #f1f3f6; }
.today .dfocus { --wash: #e3e7ec; padding: 14px; border: 1px solid #d3d9e0; border-radius: 16px; background: #f1f3f6; }
.today .dfocus[hidden] { display: none; }
.today .xlist { padding: 2px 12px; border: 1px solid #d3d9e0; border-radius: 16px; background: #f1f3f6; }
.today .xlist .xrow:last-child { border-bottom: 0; }
.today .xlist .xrow.now { border-radius: 10px; }
.plan .rxlist li.pl { --wash: #e3e7ec; margin-top: 10px; padding: 14px; border: 1px solid #d3d9e0; border-radius: 16px; background: #f1f3f6; }
.plan .rxlist li.pl:first-child { margin-top: 10px; }
.plan .rxlist li.pl .chip:not(.chg) { background: #e3e7ec; }
.coach .card + .card { margin-top: 28px; padding-top: 0; border-top: 0; }
.coach .suggestions li, .coach .changes li, .coach .rules li { --wash: #e3e7ec; margin-top: 10px; padding: 14px 14px 14px 52px; border: 1px solid #d3d9e0; border-radius: 16px; background: #f1f3f6; }
.coach .changes li, .coach .rules li { padding-left: 14px; }
.coach .suggestions li:first-child { padding-top: 14px; }
.coach .suggestions li::before, .coach .suggestions li:first-child::before { left: 14px; top: 14px; background: #e3e7ec; }

/* Coach: the section titles below the page title are the small grey headings of the Food and Run pages */
.coach .card:not(:first-child) h2 { margin: 0; font-size: 13px; line-height: 1.3; font-weight: 800; letter-spacing: 0.12em; color: #404040; }
.coach .card:not(:first-child) > header { margin-bottom: 8px; }
.coach .card:not(:first-child) > header p { margin: 3px 0 0; font-size: 12px; }

/* Food and Run: the lists of meals and runs sit in a card too */
.foodpage .fmeals { padding: 2px 14px; border: 1px solid #d3d9e0; border-radius: 16px; background: #f1f3f6; }
.foodpage .fmeals li:last-child button { border-bottom: 0; }

/* Strength coach laid out like the Food and Run coach pages: number and tag on one row, the title below, then the text, all in a card */
.coach .cbody { padding: 14px; border: 1px solid #d3d9e0; border-radius: 16px; background: #f1f3f6; }
.coach .cbody .verdict, .coach .cbody .lines { margin: 0; }
.coach .suggestions li, .coach .suggestions li:first-child { padding: 14px; }
.coach .suggestions li::before, .coach .suggestions li:first-child::before { content: none; display: none; }
.coach .suggestions .head { display: flex; gap: 10px; align-items: center; margin: 0; }
.coach .suggestions .sugn { color: #626262; font-size: 15px; }
.coach .suggestions .tag { margin: 0; color: #404040; }
.coach .suggestions .sugt { margin: 8px 0 4px; font-size: 16px; line-height: 1.3; font-weight: 800; }
.coach .suggestions .do { margin: 0; font-size: 13.5px; line-height: 1.45; color: #404040; }

/* ---------- Calendar: one month for Strength, Run and Food (calendar.html), opened from the top bar ---------- */
.calbtn { display: grid; place-items: center; flex: none; width: 40px; height: 44px; border-radius: 12px; color: var(--ink-2); }
.calbtn svg { width: 22px; height: 22px; }
.calbtn:hover, .calbtn[aria-current="page"] { color: var(--ink); background: #f1f3f6; }
.modesw + .calbtn { margin-left: 2px; }
.calbtn + .bellwrap { margin-left: 0; }
.todaypage main.calpage { display: block; max-width: 560px; padding-top: 4px; }
.calnav { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 6px; }
.calnav h3 { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #404040; }
.calnav button { width: 40px; height: 36px; border: 1px solid #d3d9e0; border-radius: 12px; background: #f1f3f6; color: var(--ink); font: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.caldow, .calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.caldow { margin: 2px 0 4px; text-align: center; color: #626262; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.calcell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 48px; padding: 0; border: 0; border-radius: 10px; background: #f1f3f6; color: #404040; font: inherit; font-size: 13px; cursor: pointer; }
.calcell.mute { background: none; cursor: default; }
.calcell.today { outline: 2px solid var(--accent); outline-offset: -2px; color: var(--ink); font-weight: 800; }
.calcell.sel { background: #1d2a3a; color: var(--ink); }
.calcell:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.caldots { display: flex; gap: 3px; height: 7px; }
.cdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.cdot.s { background: #0b6fd3; } .cdot.r { background: #eb5d00; } .cdot.f { background: #31b970; }
.cdot.plan { background: none; box-shadow: inset 0 0 0 1.5px currentColor; }
.cdot.plan.s { color: #0b6fd3; } .cdot.plan.r { color: #eb5d00; } .cdot.plan.f { color: #31b970; }
.callegend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 10px; }
.callegend .cdot { margin-left: 8px; }
.callegend .cdot:first-child { margin-left: 0; }
.calh3 { margin: 18px 0 8px; font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #404040; }
.calrows { list-style: none; margin: 0; padding: 2px 14px; border: 1px solid #d3d9e0; border-radius: 16px; background: #f1f3f6; }
.calrows li + li { border-top: 1px solid #d3d9e0; }
.calrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.calrow .cdot { width: 10px; height: 10px; }
.calrow .calt { flex: 1; min-width: 0; }
.calrow b { display: block; font-size: 15px; }
.calrow small { display: block; margin-top: 2px; color: #626262; font-size: 12.5px; }
.calrow .calgo { color: #626262; font-size: 18px; }
@media (max-width: 520px) {
  .appbar { gap: 4px; }
  .calbtn { width: 36px; }
  .bell { width: 38px; }
  .modesw + .calbtn, .calbtn + .bellwrap, .modesw + .bellwrap { margin-left: 0; }
}

/* Settings > Run plan: the day buttons (same as the Run page used to have) */
.settings .rchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.settings .rchips button { min-height: 38px; padding: 0 12px; border: 1px solid #f4f4f4; border-radius: 99px; background: none; color: #404040; font: inherit; font-size: 13px; cursor: pointer; }
.settings .rchips button.on { border-color: var(--accent); background: var(--accent); color: #fbfbfb; font-weight: 800; }
html[data-mode="run"] .settings .rchips button.on { color: #fafafa; }
.settings .flabel { margin: 0; color: #404040; font-size: 13px; }
#food-settings > :is(.actions, .fine, .flabel, .rchips), #run-settings > :is(.actions, .fine, .flabel, .rchips) { grid-column: 1 / -1; }

/* Settings > Training week */
#schedule > :is(.flabel, .rchips, .wkprev, .fine) { grid-column: 1 / -1; }
#schedule .flabel { margin: 6px 0 0; }
.wkprev { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wkprev li { display: grid; justify-items: center; gap: 3px; padding: 8px 0; border-radius: 10px; background: #f1f3f6; border: 1px solid #d3d9e0; }
.wkprev .wkd { color: #626262; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.wkprev .wkk { font-size: 11px; font-weight: 800; }
.wkprev li.wk-lift { border-color: #0b6fd3; } .wkprev li.wk-lift .wkk { color: #0b6fd3; }
.wkprev li.wk-run { border-color: #eb5d00; } .wkprev li.wk-run .wkk { color: #eb5d00; }
.wkprev li.wk-both { border-color: #a3a3a3; background: #1d2a3a; }
.wkprev li.wk-bike { border-color: #db9e10; } .wkprev li.wk-swim { border-color: #1fb4cb; }
.wkprev .k-lift { color: #0b6fd3; } .wkprev .k-run { color: #eb5d00; } .wkprev .k-bike { color: #db9e10; } .wkprev .k-swim { color: #1fb4cb; }
.wkprev li.wk-rest .wkk { color: #8c8c8c; font-weight: 600; }
.wkprev li { justify-items: stretch; text-align: center; min-width: 0; }
#schedule select { width: 100%; min-height: 44px; padding: 6px 10px; border: 1px solid #d3d9e0; border-radius: 10px; background: #fcfcfc; color: var(--ink); font: inherit; }

/* ---------- Top bar: all three modes named (icon over name), the notifications inside the profile menu; bottom bar: the plus in the middle ---------- */
.modesw { margin-left: 6px; padding: 3px; gap: 2px; border-radius: 16px; }
.modesw button, .modesw button:not(.on) { flex-direction: column; justify-content: center; gap: 2px; width: 64px; min-height: 46px; padding: 5px 0 0; border-radius: 12px; font-size: 9px; letter-spacing: 0.05em; }
.modesw button:not(.on) span { display: block; }
.modesw button svg { width: 18px; height: 18px; }
.modesw + .calbtn { margin-left: auto; }
.profwrap .badge { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: #fbfbfb; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; pointer-events: none; }
.profwrap .badge[hidden] { display: none; }
.notifs { display: grid; margin-bottom: 4px; padding-bottom: 6px; border-bottom: 1px solid #d3d9e0; }
.tabbar > a .tabpill { display: grid; place-items: center; width: 52px; height: 28px; border-radius: 14px; }
.tabbar > a[aria-current="page"] .tabpill { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.tabbar > .startbtn { margin: -22px 6px 0; }
@media (min-width: 760px) {
  .tabbar > a .tabpill { display: inline-flex; width: auto; height: auto; background: none !important; }
  .tabbar > .startbtn { order: 99; margin: 0 0 0 8px; }
}

/* ---------- Top bar, second layout: profile and calendar on the left (no app icon), the three modes on the right as icons ---------- */
.appbar .appname { display: none; }
.profwrap { margin-left: 0; }
.profwrap .bellmenu { left: 0; right: auto; }
.calbtn, .modesw + .calbtn { margin-left: 0; }
.appbar-nav { flex: 1 1 auto; }
.modesw { margin-left: auto; padding: 3px; gap: 2px; border-radius: 99px; }
.modesw button, .modesw button:not(.on) { flex-direction: row; justify-content: center; gap: 0; width: 44px; min-height: 36px; padding: 0; border-radius: 99px; }
.modesw button span, .modesw button:not(.on) span { display: none; }
.modesw button svg { width: 18px; height: 18px; }
@media (max-width: 520px) { .modesw + .calbtn, .calbtn + .bellwrap, .modesw + .bellwrap { margin-left: 0; } }

/* the calendar button is round like the profile button */
.calbtn { width: 36px; height: 36px; border: 1px solid #d3d9e0; border-radius: 50%; background: #f1f3f6; }
.calbtn svg { width: 18px; height: 18px; }
.calbtn:hover, .calbtn[aria-current="page"] { background: #f8f8f8; }
@media (max-width: 520px) { .calbtn { width: 36px; } }

/* Settings > Start mode */
#startmode-settings > :is(.flabel, .actions, .fine, .switch) { grid-column: 1 / -1; }
.smrow { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.smrow .smfrom { display: grid; gap: 4px; color: #626262; font-size: 12px; }
.smrow input, .smrow select { width: 100%; min-height: 44px; padding: 6px 10px; border: 1px solid #d3d9e0; border-radius: 10px; background: #fcfcfc; color: var(--ink); font: inherit; }

/* Run: the form for a run added by hand (in the sheet of the plus button) */
.manualform { margin-top: 14px; padding-top: 4px; border-top: 1px solid #d3d9e0; }
.manualform .fgrid { margin-top: 8px; }
.manualform input { width: 100%; min-height: 44px; padding: 6px 10px; border: 1px solid #d3d9e0; border-radius: 10px; background: #fcfcfc; color: var(--ink); font: inherit; }
.manualform .fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* ---------- Bike (amber) and Swim (cyan) modes: the same pages as Run, drawn by sport.js ---------- */
html[data-mode="bike"] { --accent: #db9e10; --bar: #db9e10; --bar-on: #dda30e; }
html[data-mode="bike"] .tabbar > .startbtn { box-shadow: 0 0 0 5px #fdfdfd, 0 6px 18px rgba(219, 158, 16, 0.35); color: #fafafa !important; }
html[data-mode="bike"] .tabbar > .startbtn svg { color: #fafafa; }
html[data-mode="bike"] .modesw button.on, html[data-mode="bike"] .settings .rchips button.on { color: #fafafa; }
html[data-mode="swim"] { --accent: #1fb4cb; --bar: #1fb4cb; --bar-on: #19b6d1; }
html[data-mode="swim"] .tabbar > .startbtn { box-shadow: 0 0 0 5px #fdfdfd, 0 6px 18px rgba(31, 180, 203, 0.35); color: #fafafa !important; }
html[data-mode="swim"] .tabbar > .startbtn svg { color: #fafafa; }
html[data-mode="swim"] .modesw button.on, html[data-mode="swim"] .settings .rchips button.on { color: #fafafa; }
.cdot.b { background: #db9e10; } .cdot.w { background: #1fb4cb; }
.cdot.plan.b { color: #db9e10; } .cdot.plan.w { color: #1fb4cb; }
.modesw button, .modesw button:not(.on) { width: 40px; }
.sportpage .sportbar { height: 8px; margin: 6px 0 12px; border-radius: 99px; background: #d3d9e0; overflow: hidden; }
.sportpage .sportbar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
#modes-settings > :is(.fine, .switch), #cardio-settings > :is(.flabel, .actions, .fine) { grid-column: 1 / -1; }
.bikepage .fchart .col { fill: #7a6226; }
.swimpage .fchart .col { fill: #1f6f7c; }
.sportpage .fchart .col.train { fill: var(--accent); }

/* Skip the next workout (Today) */
.skipline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 10px; }
.skipline .fine { margin: 0; }
.skipline[hidden] { display: none; }

/* ---- light theme only (make-light.js EXTRA) ---- */
:root { color-scheme: light; }
.flog, .tabbar > .startbtn { background: #0a0a0a !important; color: #fff !important; }
.flog *, .tabbar > .startbtn svg { color: #fff !important; }
.tabbar > .startbtn { box-shadow: 0 0 0 5px #fff, 0 6px 18px rgba(0, 0, 0, 0.18) !important; }
.bodymap .bmleg .before i { background: #8c8c8c; }
/* the top and bottom menus: black, not grey, except what uses the accent colour (the current tab and mode, the calendar button) */
.tabbar > a:not([aria-current="page"]), .dockpage .tabbar > a:not([aria-current="page"]) { color: #0a0a0a; }
.modesw button:not(.on) { color: #0a0a0a; }
.avatar { color: #0a0a0a; }      /* the body map's grey for the workout before (bodymap.js THEMES.light) */
