/* Daash app. Dark only for the MVP; tokens from the pass 2 handoff. */

@font-face { font-family: "Geist"; src: url("fonts/Geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --ground: #161614; --surface: #222220; --sunken: #2C2B28; --hairline: #3A3936; --button: #4A4844;
  --ink: #F4F3EE; --ink-2: #E2E1DB; --muted: #A6A59F;
  --red: #DD2C25; --red-text: #FF6A61; --red-soft: #2E2422; --red-soft-line: #6B3530;
  --easy: #8CC08F; --hard: #E8A15F; --long: #74A3DB; --strength: #B39DDB; --rec: #4A4844; --race: #E8A15F;
  --amber: #E8C35F; --amber-soft: #2A2520; --amber-soft-line: #5C4A33;
  --band-hard: rgba(232, 161, 95, 0.18); --band-easy: rgba(140, 192, 143, 0.16); --band-easy-line: rgba(140, 192, 143, 0.45);
  /* Nov 13: colours that were written out, as tokens, so light mode can swap them. */
  --hover: rgba(244, 243, 238, 0.04); --hover-soft: rgba(244, 243, 238, 0.03);
  --band-0: rgba(244, 243, 238, 0.025); --band-1: rgba(244, 243, 238, 0.065);
  --band-0b: rgba(244, 243, 238, 0.035); --band-1b: rgba(244, 243, 238, 0.075);
  --swatch-0: rgba(244, 243, 238, 0.06); --swatch-1: rgba(244, 243, 238, 0.16);
  --tint-easy: #22352A; --tint-hard: #3A2A1A; --tint-long: #1F2C3E; --tint-strength: #2E2740; --tint-race: #3A2422;
  --chip-easy: #22301F; --race-bar: #7A3A33; --panel: #1C1C1A; --done-week: #1D1D1B; --dash: #9A9993; --cal-v: #C9C8C2;
  --red-hover: #CF2720; --light-hover: #FFFFFF; --on-tag: #161614; --scrim: rgba(0, 0, 0, 0.55);
  --shadow: rgba(0, 0, 0, 0.28); --shadow-2: rgba(0, 0, 0, 0.35);
  --radius: 12px;
  --sans: "Geist", -apple-system, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}

/* Light mode (Nov 13): follows the phone's setting, unless You > Appearance picks
   Light or Dark (Nov 14), which sets data-theme on <html>. The type colours are darker
   here so each still reads at 4.5:1 on white; red stays for the main action and today. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ground: #F5F4F0; --surface: #FFFFFF; --sunken: #ECEAE4; --hairline: #DEDCD5; --button: #C9C6BE;
    --ink: #161614; --ink-2: #2E2D2A; --muted: #5E5D57;
    --red: #C8251E; --red-text: #C21F18; --red-soft: #FDECEA; --red-soft-line: #F2B8B3;
    --easy: #2A7030; --hard: #9C4D0B; --long: #2563A8; --strength: #6A47B0; --rec: #C9C6BE; --race: #9C4D0B;
    --amber: #7F5A00; --amber-soft: #FFF5DD; --amber-soft-line: #E8CF94;
    --band-hard: rgba(156, 77, 11, 0.12); --band-easy: rgba(42, 112, 48, 0.10); --band-easy-line: rgba(42, 112, 48, 0.40);
    --hover: rgba(22, 22, 20, 0.04); --hover-soft: rgba(22, 22, 20, 0.03);
    --band-0: rgba(22, 22, 20, 0.025); --band-1: rgba(22, 22, 20, 0.06);
    --band-0b: rgba(22, 22, 20, 0.04); --band-1b: rgba(22, 22, 20, 0.08);
    --swatch-0: rgba(22, 22, 20, 0.06); --swatch-1: rgba(22, 22, 20, 0.16);
    --tint-easy: #E3F1E3; --tint-hard: #FBEBDC; --tint-long: #E2ECF8; --tint-strength: #EDE7F8; --tint-race: #FBE4E1;
    --chip-easy: #E3F1E3; --race-bar: #E8A39C; --panel: #FAF9F6; --done-week: #EFEEE9; --dash: #8A8982; --cal-v: #3A3936;
    --red-hover: #B01F19; --light-hover: #2E2D2A; --on-tag: #FFFFFF; --scrim: rgba(22, 22, 20, 0.35);
    --shadow: rgba(22, 22, 20, 0.14); --shadow-2: rgba(22, 22, 20, 0.18);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --ground: #F5F4F0; --surface: #FFFFFF; --sunken: #ECEAE4; --hairline: #DEDCD5; --button: #C9C6BE;
  --ink: #161614; --ink-2: #2E2D2A; --muted: #5E5D57;
  --red: #C8251E; --red-text: #C21F18; --red-soft: #FDECEA; --red-soft-line: #F2B8B3;
  --easy: #2A7030; --hard: #9C4D0B; --long: #2563A8; --strength: #6A47B0; --rec: #C9C6BE; --race: #9C4D0B;
  --amber: #7F5A00; --amber-soft: #FFF5DD; --amber-soft-line: #E8CF94;
  --band-hard: rgba(156, 77, 11, 0.12); --band-easy: rgba(42, 112, 48, 0.10); --band-easy-line: rgba(42, 112, 48, 0.40);
  --hover: rgba(22, 22, 20, 0.04); --hover-soft: rgba(22, 22, 20, 0.03);
  --band-0: rgba(22, 22, 20, 0.025); --band-1: rgba(22, 22, 20, 0.06);
  --band-0b: rgba(22, 22, 20, 0.04); --band-1b: rgba(22, 22, 20, 0.08);
  --swatch-0: rgba(22, 22, 20, 0.06); --swatch-1: rgba(22, 22, 20, 0.16);
  --tint-easy: #E3F1E3; --tint-hard: #FBEBDC; --tint-long: #E2ECF8; --tint-strength: #EDE7F8; --tint-race: #FBE4E1;
  --chip-easy: #E3F1E3; --race-bar: #E8A39C; --panel: #FAF9F6; --done-week: #EFEEE9; --dash: #8A8982; --cal-v: #3A3936;
  --red-hover: #B01F19; --light-hover: #2E2D2A; --on-tag: #FFFFFF; --scrim: rgba(22, 22, 20, 0.35);
  --shadow: rgba(22, 22, 20, 0.14); --shadow-2: rgba(22, 22, 20, 0.18);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ground); color: var(--ink); }
body { font-family: var(--sans); font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
a { color: var(--ink); text-underline-offset: 2px; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
h1, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }

.shell { min-height: 100%; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }
main { flex: 1; padding: calc(28px + env(safe-area-inset-top)) 16px 120px; display: flex; flex-direction: column; gap: 20px; }

/* type */
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.kicker.red { color: var(--red-text); }
.headline { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.title-xl { font-size: 34px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.section-title { font-size: 16px; font-weight: 600; }
.meta { font-size: 13px; color: var(--muted); }
.credit { font-size: 13px; color: var(--muted); }
.mono-label { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack-tight { display: flex; flex-direction: column; gap: 4px; }
.stack-8 { display: flex; flex-direction: column; gap: 8px; }

/* surfaces: no shadows, a step of lightness and a hairline */
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); }
.card.pad { padding: 14px; }
.card.red { background: var(--red-soft); border-color: var(--red-soft-line); padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.card.next-plain { padding: 16px; gap: 14px; }
.card.amber { background: var(--amber-soft); border-color: var(--amber-soft-line); }

/* pills are the only buttons */
.pill { height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--button); background: transparent; color: var(--ink);
  font-size: 14.5px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; white-space: nowrap; }
.pill:hover { color: var(--ink); background: var(--hover); }
.pill.tall { height: 48px; font-size: 15px; }
.pill.light { background: var(--ink); color: var(--ground); border: 0; font-weight: 600; }
.pill.light:hover { background: var(--light-hover); color: var(--ground); }
.pill.red { background: var(--red); color: #FFFFFF; border: 0; font-weight: 600; }
.pill.red:hover { background: var(--red-hover); color: #FFFFFF; }
.pill.amber { border-color: var(--hard); font-weight: 600; }
.pill[disabled] { opacity: 0.5; cursor: default; }
.pills { display: flex; gap: 8px; }
.pills > * { flex: 1; min-width: 0; }
/* Nov 29, the Coach pilot: Ask the coach, and the old way to Claude or ChatGPT as a small link under it. */
.ask-coach { display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-width: 0; }
.ask-open { min-height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; align-self: center;
  font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.ask-open:hover { color: var(--ink); }
.ask-open svg { width: 12px; height: 12px; }
.topbar .ask-open { align-self: auto; }
.pill.topbar-ask { height: 40px; }
.you-coach { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.you-coach .mini-btn { background: transparent; font-family: inherit; cursor: pointer; }
.you-coach .ask-open { align-self: flex-end; min-height: 28px; }
button.n100-ask { width: 100%; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.n100-ask-open { align-self: flex-start; min-height: 28px; }
/* The next session's buttons: each as wide as its words, the spare shared; on the
   narrowest phones See the session takes a row of its own. */
.next-pills { flex-wrap: wrap; }
.next-pills > * { flex: 1 0 auto; padding: 0 14px; }
.next-pills > .light { flex-grow: 1.6; }
@media (max-width: 359px) { .next-pills > .light { flex-basis: 100%; } }

.link-button { all: unset; box-sizing: border-box; cursor: pointer; }
.back { align-self: flex-start; margin: -10px 0 -6px -8px; height: 44px; padding: 0 8px; border: 0; background: transparent;
  color: var(--ink); font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 4px; cursor: pointer; text-decoration: none; }

/* the next session */
.next-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.watch-tag { display: flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.next-name { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; text-decoration: none; color: var(--ink); }
.next-name:hover { color: var(--ink); }
.type-label { font-size: 13px; font-weight: 600; }
.next-title { font-size: 30px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat-v { font-size: 18px; font-weight: 600; white-space: nowrap; }
.stat-u { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.stat-l { font-size: 12px; color: var(--muted); }

/* the shape bar */
.shape { display: flex; align-items: flex-end; gap: 2px; }
.shape span { flex-basis: 0; border-radius: 3px; min-width: 3px; }
.shape-labels { display: flex; gap: 2px; }
.shape-labels span { flex-basis: 0; min-width: 0; font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; }

/* Races in red, as the chat's plan card draws them; the text is the lighter red for contrast. */
.c-race { color: var(--hard); } .bg-race { background: var(--race); }
.c-easy { color: var(--easy); } .c-hard { color: var(--hard); } .c-long { color: var(--long); } .c-strength { color: var(--strength); } .c-rec { color: var(--muted); }
.bg-easy { background: var(--easy); } .bg-hard { background: var(--hard); } .bg-long { background: var(--long); } .bg-strength { background: var(--strength); } .bg-rec { background: var(--rec); }

/* rows */
.row-button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 60px;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.row-button:hover { color: var(--ink); border-color: var(--button); }
.tick { width: 22px; height: 22px; border-radius: 999px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.strong { font-size: 15px; font-weight: 600; }

/* crew line */
.crew-line { padding: 12px; display: flex; align-items: center; gap: 10px; }
.faces { display: flex; flex-shrink: 0; }
.face { width: 30px; height: 30px; border-radius: 999px; color: var(--ground); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface); }
.face + .face { margin-left: -8px; }

/* readiness trio */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trio > div { padding: 12px; display: flex; flex-direction: column; gap: 3px; }
.trio > div + div { border-left: 1px solid var(--hairline); }
.trio .v { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.trio .l, .trio .n { font-size: 12px; color: var(--muted); }
.trio .n { font-size: 12.5px; line-height: 1.35; }
.trio .n.warn { color: var(--amber); }
.src { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.ready-src { font-size: 12px; text-transform: none; }
/* Nov 22: a run past its plan. The plan under the title and under each number; the extra km in the chart. */
.planned-line { font-size: 14.5px; margin-top: -2px; }
.stats4 .plan { font-size: 12px; color: var(--muted); line-height: 1.3; min-height: 1.3em; }
.mini-btn { height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--button); color: var(--ink); font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; white-space: nowrap; }

/* week strip */
.strip-card { padding: 12px 8px; display: flex; flex-direction: column; gap: 12px; }
.strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.strip a { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 44px; text-decoration: none; color: var(--ink); padding: 2px 0; border-radius: 8px; }
.strip a:hover { background: var(--hover); }
.strip .d { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.strip .n { font-size: 14px; font-weight: 600; }
.strip .n.today { color: var(--red-text); }
.strip .mark { height: 18px; display: flex; align-items: center; justify-content: center; gap: 3px; }
.dot { width: 7px; height: 7px; border-radius: 999px; }
.ring { width: 18px; height: 18px; border-radius: 999px; border: 2px solid var(--ink-2); }
.dash { width: 10px; height: 2px; border-radius: 1px; background: var(--dash); }
.miss-ring { width: 12px; height: 12px; border-radius: 999px; border: 2px solid var(--hard); }
.strip-verdict { font-size: 14px; line-height: 1.45; padding: 0 6px 2px; text-wrap: pretty; }

/* session */
.why { font-size: 15px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.size { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.steps { padding: 4px 14px; }
.step { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 54px; padding: 8px 0; }
.step + .step { border-top: 1px solid var(--hairline); }
.step .bar { align-self: stretch; border-radius: 2px; }
.step .target { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.step .sub { font-size: 13px; color: var(--muted); }
.step .right { font-size: 15px; font-weight: 600; white-space: nowrap; }
.step.head .right { color: var(--muted); }
.ready-card { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ready-top { display: flex; align-items: center; gap: 12px; }
.ready-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: -2px; }
.ready-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.ready-score { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; min-width: 40px; }
.watch-row { padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.watch-icon { width: 36px; height: 36px; border-radius: 999px; background: var(--sunken); color: var(--muted); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.actions3 { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px; }
.actions2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.footnote { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: -8px; }
.also { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* analysis */
.verdict { font-size: 20px; font-weight: 600; line-height: 1.35; letter-spacing: -0.015em; text-wrap: pretty; }
.stats4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 12px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.stats4 .v { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.stats4 .l { font-size: 12px; color: var(--muted); white-space: nowrap; }
.table { overflow: hidden; }
.cmp { display: grid; grid-template-columns: minmax(0, 1fr) 84px 46px 40px; gap: 8px; align-items: center; padding: 10px 14px; }
.cmp.head, .splits-row.head { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--muted); background: var(--sunken); }
.cmp:not(.head) { min-height: 52px; border-top: 1px solid var(--hairline); }
.cmp .num { text-align: right; font-size: 15px; font-weight: 600; white-space: nowrap; }
.cmp .tgt { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp .lab { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cmp .lab .bar { width: 4px; align-self: stretch; min-height: 28px; border-radius: 2px; flex-shrink: 0; }
.soft { color: var(--hard) !important; }
.splits-toggle { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px; min-height: 52px; }
.splits-toggle svg { transition: transform 0.15s; }
.splits-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.splits-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 9px 14px; font-size: 14px; }
.splits-row:not(.head) { border-top: 1px solid var(--hairline); }
.effect { padding: 14px; display: flex; gap: 12px; align-items: flex-start; }

/* plan */
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 999px; background: var(--sunken); }
.segmented a { height: 38px; border-radius: 999px; color: var(--muted); font-size: 14.5px; font-weight: 600; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.segmented a.on { background: var(--ink); color: var(--ground); }
.week-head, .week-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pill.icon { width: 44px; padding: 0; }
.plan-list { overflow: hidden; }
.plan-list.dragging { overflow: visible; }
.plan-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 14px; gap: 12px; align-items: center; padding: 12px 14px; min-height: 60px;
  color: var(--ink); text-decoration: none; border-top: 1px solid var(--hairline); background: var(--surface); position: relative;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.plan-row:first-child, .plan-row.same-day { border-top-color: transparent; }
.plan-row:hover { color: var(--ink); }
/* Today: an outline and its label, not a red fill (Nov 13). */
.plan-row.is-today { box-shadow: inset 0 0 0 1.5px var(--red-text); border-radius: 10px; }
.plan-row.is-today + .plan-row.is-today.same-day { border-top-color: transparent; }
.today-tag { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--red-text); text-transform: uppercase; margin-top: 2px; }

.plan-row .day { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.plan-row .day.hide { visibility: hidden; }
.plan-row .day .d { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.plan-row .day .n { font-size: 15px; font-weight: 600; }
.plan-row .day .n.today { color: var(--red-text); }
.plan-row .body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.plan-row .type { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.plan-row .name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-row .dim { color: var(--muted); }
.plan-row .meta.red { color: var(--red-text); }
.plan-row .val { font-size: 15px; font-weight: 600; white-space: nowrap; }
.plan-row .val .u { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.row-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.row-line .meta { min-width: 0; }
.plan-line { font-variant-numeric: tabular-nums; }
.dot { width: 9px; height: 9px; border-radius: 999px; flex-shrink: 0; }
.dot.on { background: var(--easy); }
.dot.over { background: var(--hard); }
.dot.short { background: var(--amber); }
.dot.miss { background: transparent; border: 2px solid var(--amber); }
.out-word { font-size: 13px; font-weight: 600; }
.out-word.over { color: var(--hard); }
.out-word.short, .out-word.miss { color: var(--amber); }
.on-watch { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); margin-top: 1px; }
.on-watch svg { color: var(--muted); }
.opt { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--muted); border: 1px solid var(--hairline); border-radius: 999px; padding: 0 6px; margin-left: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* The week's progress: km done against planned, and its hard sessions (Nov 13). */
.week-progress { display: flex; flex-direction: column; gap: 6px; margin-top: -4px; }
.wp-bar { height: 4px; border-radius: 999px; background: var(--sunken); overflow: hidden; }
.wp-bar span { display: block; height: 100%; background: var(--ink-2); border-radius: 999px; }
.wp-nums { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.wp-nums strong { color: var(--ink); font-weight: 600; }
/* Past the plan (Nov 15): the bar fills, the part over it in the easy green. */
.wp-bar.is-over { display: flex; gap: 2px; }
.wp-bar.is-over span { border-radius: 0; }
.wp-bar.is-over span:first-child { border-radius: 999px 0 0 999px; }
.wp-bar .wp-over { background: var(--easy); border-radius: 0 999px 999px 0; }
.wp-heading { color: var(--muted); }
.mini-shape { display: flex; align-items: flex-end; gap: 1.5px; height: 10px; margin-top: 4px; max-width: 200px; }
.mini-shape i { flex-basis: 0; border-radius: 2px; min-width: 2px; }
/* Once a row is lifted the page doesn't scroll under the finger. */
.plan-list.dragging, .plan-list.dragging .plan-row { touch-action: none; }
/* The run a chat card's link was about (Nov 15). */
.plan-row.is-focus { box-shadow: inset 0 0 0 2px var(--red); border-radius: 12px; animation: focus-in 1.2s ease-out 1; }
@keyframes focus-in { 0% { background: var(--red-soft); } 100% { background: var(--surface); } }
@media (prefers-reduced-motion: reduce) { .plan-row.is-focus { animation: none; } }
.plan-row.lifted { position: relative; z-index: 3; outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 10px;
  background: var(--sunken); box-shadow: 0 10px 28px var(--shadow); will-change: transform; transition: none; }
.plan-row.lifted.no-drop { outline-color: var(--muted); opacity: 0.85; }
.plan-row.rest.covered { display: none; }
.plan-row.lifted.elsewhere .meta { display: none; }
.plan-row.moving { opacity: 0.6; }
.plan-row.drop { background: var(--red-soft); }
.plan-row.no-drop { opacity: 0.45; }
.block-card { padding: 16px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
/* The block chart (Nov 13): run weeks solid with a tick at their plan, weeks
   ahead outlined, phases as faint bands behind, race weeks flagged. */
.chart { position: relative; }
.bands { position: absolute; inset: 0; display: grid; gap: 4px; pointer-events: none; }
.bands span { border-radius: 6px; }
.bands .band.b0 { background: var(--band-0); }
.bands .band.b1 { background: var(--band-1); }
.bars { position: relative; display: grid; gap: 4px; align-items: end; height: 150px; }
.bar-col { all: unset; box-sizing: border-box; display: block; height: 100%; cursor: pointer; border-radius: 4px; min-width: 0; }
.bar-col:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.bar-col:hover .plan, .bar-col:hover .fill { filter: brightness(1.15); }
.bar-label { position: absolute; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 11px; color: var(--ink-2); line-height: 1; white-space: nowrap; }
.bar-label.now, .bar-nums .now { color: var(--ink); font-weight: 700; }
.track { position: relative; width: 100%; height: 100%; display: block; }
.track .plan { position: absolute; left: 0; right: 0; bottom: 0; border: 1.5px solid var(--button); border-radius: 3px; background: transparent; }
.track .plan.now { border-color: var(--ink-2); }
.track .fill { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 3px; background: var(--muted); }
.track .fill.now { background: var(--ink); left: 1.5px; right: 1.5px; border-radius: 2px; }
.track .target { position: absolute; left: -1px; right: -1px; height: 2px; margin-bottom: -1px; background: var(--ink); border-radius: 1px; }
.race-flag { position: absolute; left: 50%; transform: translateX(-50%); display: flex; color: var(--ink); }
.race-flag.b { color: var(--ink-2); }
.legend i.run { background: var(--muted); }
.legend i.tick-l { height: 2px; background: var(--ink); border-radius: 1px; }
.legend i.flag-l { width: auto; height: auto; background: none; display: flex; color: var(--ink); }
.legend i.flag-l.b { color: var(--ink-2); }
.tap-hint { font-size: 12.5px; margin-top: -4px; }
.sheet-list { margin-top: 2px; max-height: 60vh; overflow: auto; }
.bar-nums { display: grid; gap: 4px; }
.bar-nums span { font-family: var(--mono); font-size: 11px; text-align: center; color: var(--muted); }
.phases { display: grid; gap: 4px; }
.phases span { display: block; min-width: 0; height: 24px; line-height: 24px; padding: 0 3px; border-radius: 4px; background: var(--sunken);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--muted);
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.phases span.b0 { background: var(--band-0b); }
.phases span.b1 { background: var(--band-1b); }
.phases span.now { color: var(--ink); font-weight: 600; }
.phases span.gap { background: transparent; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; }
.legend i.planned { background: transparent; border: 1.5px solid var(--button); }
.block-verdict { font-size: 14px; line-height: 1.5; padding-top: 12px; border-top: 1px solid var(--hairline); text-wrap: pretty; }

/* crew */
.chip { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.chip-long { background: var(--tint-long); color: var(--long); }
.chip-easy { background: var(--chip-easy); color: var(--easy); }
.crew-match { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; min-height: 60px; }
.crew-match + .crew-match { border-top: 1px solid var(--hairline); }
.crew-match .day { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.crew-match .day .d { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.crew-match .day .n { font-size: 15px; font-weight: 600; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-only { display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--hairline); font-size: 12px; font-weight: 500; color: var(--muted); }
.crew-grid { border: 1px dashed var(--hairline); border-radius: var(--radius); padding: 12px 10px 10px; display: flex; flex-direction: column; gap: 6px; }
.grid-row { display: grid; grid-template-columns: 58px repeat(7, minmax(0, 1fr)); gap: 4px; align-items: center; min-height: 38px; }
.grid-row.head { align-items: end; min-height: 0; padding-bottom: 4px; }
.slots { display: flex; flex-direction: column; font-family: var(--mono); font-size: 11px; line-height: 1.25; color: var(--muted); }
.grid-day { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.grid-day.past .n { color: var(--muted); }
.grid-day .d { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.grid-day .n { width: 24px; height: 24px; border-radius: 999px; font-size: 12.5px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.grid-day .n.today { background: var(--red); color: #FFFFFF; }
.who { display: flex; flex-direction: column; min-width: 0; }
.who .name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .name.you { color: var(--ink); font-weight: 700; }
.who .hand { font-size: 11px; color: var(--muted); white-space: nowrap; }
.cell { height: 32px; display: flex; flex-direction: column; gap: 2px; }
.cell.past { opacity: 0.45; }
.cell i, .legend i.lg { flex: 1; border-radius: 3px; background: var(--sunken); }
.cell i.hard, .legend i.lg.hard { background: transparent; border: 1px dashed var(--muted); }
.cell i.bg-easy { background: var(--easy); } .cell i.bg-long { background: var(--long); }
.cell i.match, .legend i.lg.match { outline: 1.5px solid var(--ink); outline-offset: 1px; }
.legend i.lg { flex: none; width: 12px; height: 6px; border-radius: 2px; }
.legend i.lg.bg-easy { background: var(--easy); } .legend i.lg.bg-long { background: var(--long); }
.copy-field { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border-radius: 999px; background: var(--sunken); font-family: var(--mono); font-size: 13px; color: var(--ink-2);
  display: block; line-height: 44px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* you */
.avatar { width: 48px; height: 48px; border-radius: 999px; background: var(--button); color: var(--ink); font-size: 20px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.you-row { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 52px;
  border-top: 1px solid var(--hairline); color: var(--ink); text-decoration: none; }
.you-row.first { border-top-color: transparent; }
a.you-row, button.you-row { cursor: pointer; }
a.you-row:hover, button.you-row:hover { background: var(--hover-soft); color: var(--ink); }
.you-row:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.you-v { font-size: 14px; text-align: right; flex-shrink: 0; max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.times-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); font-weight: 600; }

/* placeholders and states */
.empty { min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: var(--muted); }
.empty .strong { color: var(--ink); }
.skeleton { background: var(--surface); border-radius: var(--radius); min-height: 120px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } .splits-toggle svg { transition: none; } }

/* bottom tabs */
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--hairline); background: var(--ground); z-index: 5; }
nav.tabs > div { max-width: 560px; }
nav.tabs a { height: 52px; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 500; text-decoration: none; }
nav.tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; }
nav.tabs .ti { width: 56px; height: 30px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
nav.tabs a[aria-current="page"] .ti { background: var(--button); }

/* toast and sheet */
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(92px + env(safe-area-inset-bottom)); max-width: 528px; margin: 0 auto; padding: 12px 14px; border-radius: var(--radius);
  background: var(--ink); color: var(--ground); font-size: 14px; font-weight: 500; z-index: 20; }
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; background: var(--surface); border-top: 1px solid var(--hairline); border-radius: var(--radius) var(--radius) 0 0;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.days-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
/* Not feeling 100% (Nov 21): a quiet line on Today, amber on a low-readiness day; the sheet's choices */
.toast { display: flex; align-items: center; gap: 12px; }
.toast-action { all: unset; cursor: pointer; margin-left: auto; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; flex-shrink: 0; padding: 4px 2px; }
.n100-choice:focus-visible, .n100-spans .pill:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.n100-list { display: flex; flex-direction: column; gap: 12px; max-height: 62vh; overflow: auto; margin: 0 -2px; padding: 2px; }
.n100-group { display: flex; flex-direction: column; gap: 8px; }
.n100-choice { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--hairline); background: var(--surface); color: var(--ink); }
.n100-choice .meta { line-height: 1.4; }
.n100-choice:hover { border-color: var(--button); }
.n100-choice.picked { border: 2px solid var(--ink); padding: 11px 13px; }
div.n100-choice { cursor: default; }
.n100-off { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--radius); border: 1px dashed var(--hairline); color: var(--muted); }
.n100-off .strong { color: var(--muted); }
.n100-spans { display: flex; gap: 8px; margin: 4px 0 2px; }
.n100-spans .pill { height: 36px; padding: 0 14px; font-size: 14px; }
.n100-spans .pill[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); font-weight: 600; }
.n100-foot { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; }
/* Nov 21 (2): the session screen's row reads Move, Not feeling 100%, Ask; the sheet's details */
.actions3.two { grid-template-columns: 1fr 1.3fr; }
.actions3:not(.two) { grid-template-columns: auto minmax(0, 1fr) auto; }
.actions3:not(.two) .pill { padding: 0 12px; font-size: 14.5px; }
/* On a narrow phone the middle label takes two lines rather than push Ask past the edge. */
.n100-pill { line-height: 1.15; text-align: center; white-space: normal; min-width: 0; }
.n100-detail { display: flex; flex-direction: column; gap: 4px; }
.n100-off-list { list-style: none; margin: 2px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.n100-off-list li { display: flex; gap: 10px; }
.n100-off-list li > span:first-child { width: 32px; color: var(--muted); flex-shrink: 0; }
.n100-off-list .grow-text { flex: 1; min-width: 0; text-decoration: line-through; text-decoration-color: var(--muted); }
.n100-note { font-size: 13.5px; line-height: 1.4; padding: 8px 10px; border-radius: 10px; background: var(--amber-soft); border: 1px solid var(--amber-soft-line); color: var(--ink); }
.n100-ask { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--hairline);
  color: var(--ink); text-decoration: none; }
.n100-ask:hover { border-color: var(--button); color: var(--ink); }
.watch-line { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); }
.plan-row.gone { opacity: 0.85; }
/* Nov 21 (3): a few days off is a quieter link under today's choices. */
.n100-more { all: unset; cursor: pointer; align-self: flex-start; padding: 6px 2px; font-size: 14.5px; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px; }
.n100-more:hover { color: var(--ink); }
.n100-more:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
/* A change Garmin refused, kept until it goes through: amber, with Retry. */
.n100-failed { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--amber-soft); border: 1px solid var(--amber-soft-line); color: var(--ink); }
.n100-failed .pills { display: flex; gap: 8px; }
.n100-failed .pill { height: 38px; }
.on-watch.failed { color: var(--hard); }
.days-grid .pill { padding: 0 6px; flex-direction: column; gap: 0; height: 56px; font-size: 13px; }
.days-grid .pill b { font-size: 15px; }

/* sign in */
.signin { min-height: 100vh; padding: 64px 16px 32px; display: flex; flex-direction: column; gap: 20px; max-width: 480px; margin: 0 auto; }
.wordmark { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.small { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.field-label { font-size: 14px; font-weight: 600; }
.field { height: 48px; padding: 0 16px; border-radius: var(--radius); border: 1px solid var(--button); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 16px; }
.field:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: transparent; }
#code { font-family: var(--mono); font-size: 22px; letter-spacing: 0.3em; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin-top: 4px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }

/* ---- desktop, 1024px and wider ------------------------------------------- */
/* One width for every desktop screen and the bar above it, so a wide window
   doesn't stretch Today and Crew edge to edge or leave the bar's ends far from
   the page (Nov 11). The bar's line still runs the full width. */
:root { --desk-max: 1280px; }
.topbar { position: sticky; top: 0; z-index: 10; height: 60px; display: flex; align-items: center; gap: 28px;
  padding: 0 max(28px, calc((100% - var(--desk-max)) / 2 + 28px));
  border-bottom: 1px solid var(--hairline); background: var(--ground); }
.topbar-mark { font-size: 20px; font-weight: 800; font-style: italic; letter-spacing: -0.03em; color: var(--red-text); }
.topbar-tabs { display: flex; gap: 4px; }
.topbar-tabs a { height: 44px; padding: 0 14px; border-radius: 999px; color: var(--muted); font-size: 14.5px; font-weight: 600;
  display: flex; align-items: center; text-decoration: none; }
.topbar-tabs a:hover { color: var(--ink); }
.topbar-tabs a[aria-current="page"] { background: var(--button); color: var(--ink); font-weight: 700; }
.avatar.small, .topbar .avatar.small { width: 34px; height: 34px; font-size: 14px; text-decoration: none; color: var(--ink); }
.avatar.small:hover { color: var(--ink); }

body.desk .shell { max-width: none; }
body.desk main { padding: 24px 28px 40px; max-width: var(--desk-max); margin: 0 auto; width: 100%; }
body.desk[data-screen="you"] main { max-width: 720px; }
body.desk .toast { left: 50%; right: auto; transform: translateX(-50%); bottom: 28px; max-width: 480px; }

.desk-today { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.desk-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.desk-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 84px; }
.desk-side .next-title { font-size: 28px; }
/* On a desktop you drag a session to move it, so the card has no Move. */
.desk-side [data-act="move"] { display: none; }
.cal-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.cal { display: flex; flex-direction: column; gap: 6px; }
.cal-row { display: grid; grid-template-columns: 76px repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-row:not(.cal-head) { min-height: 150px; }
.cal-week { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; }
.cal-day { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--hairline); padding: 8px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cal-day.done-week { background: var(--done-week); }
.cal-day.today { background: var(--red-soft); border-color: var(--red-soft-line); }
.cal-day.today .cal-n { color: var(--red-text); }
.cal-day.drop { outline: 2px dashed var(--ink); outline-offset: -2px; }
.cal.dragging .cal-day[data-past] { opacity: 0.45; }
.cal-n { font-size: 13px; font-weight: 600; }
.cal-chip { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: 8px; min-height: 36px; min-width: 0;
  text-decoration: none; border: 1px solid transparent; color: var(--ink); }
.cal-chip[draggable="true"] { cursor: grab; }
.cal-chip:hover { color: var(--ink); filter: brightness(1.12); }
.cal-chip.now { border-color: var(--red-text); }
.cal-chip.rest { color: var(--muted); font-size: 12.5px; font-weight: 600; background: transparent; }
.cal-name { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.3; overflow-wrap: break-word; hyphens: auto; min-width: 0; }
.cal-name .tick, .cal-name .miss-ring { display: inline-flex; vertical-align: -2px; margin: 0 4px 0 0 !important; }
.cal-v { font-size: 11.5px; color: var(--cal-v); }
.cal-crew { font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.tint-easy { background: var(--tint-easy); } .tint-hard { background: var(--tint-hard); } .tint-long { background: var(--tint-long); }
.tint-strength { background: var(--tint-strength); } .tint-race { background: var(--tint-race); } .tint-rec { background: var(--sunken); }

#panel { position: fixed; top: 60px; right: 0; bottom: 0; width: 520px; max-width: 100vw; z-index: 15; }
.panel { height: 100%; background: var(--panel); border-left: 1px solid var(--hairline); display: flex; flex-direction: column; animation: slide-in 0.18s ease-out; }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .panel { animation: none; } }
.panel-head { height: 56px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 24px; border-bottom: 1px solid var(--hairline); }
.panel-body { flex: 1; overflow-y: auto; padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 18px; }
.panel-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.pcmp { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; min-height: 50px; }
.pcmp + .pcmp { border-top: 1px solid var(--hairline); }
.pcmp .bar { align-self: stretch; border-radius: 2px; }
.psplit { display: grid; grid-template-columns: 44px minmax(0, 1fr) 40px; gap: 6px; padding: 5px 12px; font-size: 13px; }
.psplit + .psplit { border-top: 1px solid var(--hairline); }
.psplit.head { font-family: var(--mono); font-size: 11px; color: var(--muted); background: var(--sunken); padding: 7px 12px; }

.desk-crew { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 28px; align-items: start; }
.crew-grid.desk { padding: 16px; gap: 8px; }
.crew-grid.desk .grid-row { grid-template-columns: 130px repeat(7, minmax(0, 1fr)); gap: 8px; min-height: 50px; }
.crew-grid.desk .grid-row:not(.head) { border-top: 1px solid var(--sunken); padding-top: 6px; }
.crew-grid.desk .grid-row.head { padding-bottom: 6px; }
.crew-grid.desk .grid-day { flex-direction: row; gap: 8px; }
.crew-grid.desk .grid-day .d { font-size: 11.5px; }
.crew-grid.desk .grid-day .n { width: 26px; height: 26px; font-size: 13px; }
.crew-grid.desk .cell { height: 40px; gap: 3px; }
.who.desk { flex-direction: row; align-items: center; gap: 8px; }
.who.desk .name { font-size: 14px; }
.slot-key { height: 40px; display: flex; flex-direction: column; justify-content: space-between; font-family: var(--mono); font-size: 11px; line-height: 12px; color: var(--muted); text-align: right; flex-shrink: 0; }

.desk-plan { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }

/* 1024 to 1279: the same layout with less room, so names still wrap by word. */
@media (max-width: 1279px) {
  body.desk main { padding: 20px 20px 32px; }
  .topbar { padding: 0 20px; gap: 20px; }
  .desk-today { grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
  .cal-row { grid-template-columns: 52px repeat(7, minmax(0, 1fr)); gap: 4px; }
  .cal-day { padding: 6px; gap: 4px; }
  .cal-chip { padding: 5px 6px; }
  .cal-name, .cal-v, .cal-crew { font-size: 11.5px; }
  .desk-side .next-title { font-size: 24px; }
  .desk-crew { grid-template-columns: 340px minmax(0, 1fr); gap: 20px; }
  .crew-grid.desk .grid-row { grid-template-columns: 110px repeat(7, minmax(0, 1fr)); gap: 6px; }
  .crew-grid.desk .grid-day { flex-direction: column; gap: 2px; }
}

/* ---- build a plan ----------------------------------------------------------- */
body[data-screen="build"] main { padding-bottom: calc(150px + env(safe-area-inset-bottom)); padding-top: calc(12px + env(safe-area-inset-top)); }
.b-wrap { display: flex; flex-direction: column; gap: 18px; }
.b-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.b-body { display: flex; flex-direction: column; gap: 18px; }
.b-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.b-back { width: 44px; height: 44px; margin-left: -12px; border: 0; border-radius: 999px; background: transparent; color: var(--ink);
  cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.b-steps { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.b-steps span { height: 4px; border-radius: 2px; background: var(--hairline); }
.b-steps span.on { background: var(--ink); }
.b-progress .mono-label { white-space: nowrap; min-width: 40px; text-align: right; }
.b-head { display: flex; flex-direction: column; gap: 6px; }
.b-head h1, .b-h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; }
.b-h1 { font-size: 30px; }
.b-head span { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.b-lead { font-size: 16px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.b-card { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.b-entry { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.b-entry-t { font-size: 17px; font-weight: 600; }
.b-entry-d { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.b-split { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.b-big { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.b-unit { font-size: 14px; font-weight: 500; color: var(--muted); }
.b-weeks4, .b-weeks4-l { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.b-weeks4 { align-items: end; height: 84px; }
.b-weeks4 div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; font-size: 12.5px; font-weight: 600; }
.b-weeks4 i { width: 100%; border-radius: 4px; background: var(--muted); min-height: 3px; }
.b-weeks4-l { margin-top: -8px; }
.b-weeks4-l span { font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: center; }
.b-list { overflow: hidden; }
.b-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; min-height: 56px; border-top: 1px solid var(--hairline); }
.b-row:first-child { border-top: 0; }
.b-val { font-size: 16px; font-weight: 600; white-space: nowrap; }
.b-pred { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.b-pred div { padding: 12px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--hairline); min-width: 0; }
.b-pred div:first-child { border-left: 0; }
.b-pred div span:last-child { font-family: var(--mono); font-size: 16px; font-weight: 500; }
.b-amber { display: flex; gap: 10px; align-items: flex-start; padding: 14px; font-size: 14.5px; line-height: 1.45; }
.b-amber-col { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.b-amber-col .b-amber { padding: 0; }
.pill.amber-line { align-self: flex-start; border-color: var(--amber-soft-line); }
.b-race { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px 10px 14px; min-height: 64px; border-top: 1px solid var(--hairline); }
.b-race.first { border-top: 0; }
.b-date { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.b-date span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.b-date b { font-size: 16px; font-weight: 600; }
.b-race-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-tiers { display: flex; padding: 2px; border-radius: 999px; background: var(--sunken); gap: 2px; }
.b-tiers button { width: 40px; height: 40px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--muted);
  font-family: var(--mono); font-size: 14px; font-weight: 500; cursor: pointer; }
.b-tiers button[aria-checked="true"].t-A { background: var(--ink); color: var(--ground); }
.b-tiers button[aria-checked="true"].t-B { background: var(--sunken); border-color: var(--ink-2); color: var(--ink); }
.b-tiers button[aria-checked="true"].t-C { background: var(--button); color: var(--ink); }
.b-dashed { border-style: dashed; gap: 8px; }
.b-link { align-self: flex-start; height: 44px; padding: 0; border: 0; background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; font-size: 14.5px; font-weight: 500; cursor: pointer; }
.b-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.b-chip { height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--button); background: transparent; color: var(--ink);
  font-family: var(--mono); font-size: 14px; cursor: pointer; }
.b-chip.on { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.b-verdict { align-self: flex-start; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; display: flex; align-items: center; }
.b-why { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.b-opt { all: unset; box-sizing: border-box; cursor: pointer; background: var(--surface); border: 1.5px solid var(--hairline); border-radius: var(--radius);
  padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; min-height: 56px; }
.b-opt[aria-checked="true"] { border-color: var(--ink); }
.b-opt:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.b-opt.dis { cursor: not-allowed; background: var(--panel); border-color: var(--sunken); }
.b-opt.dis .b-opt-t { color: var(--muted); }
.b-amount { display: grid; grid-template-columns: 20px minmax(0, 1fr) 92px; align-items: center; }
.b-ring { width: 20px; height: 20px; margin-top: 1px; border-radius: 999px; border: 2px solid var(--button); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.b-ring span { width: 10px; height: 10px; border-radius: 999px; }
.b-ring.on { border-color: var(--ink); }
.b-ring.on span { background: var(--ink); }
.b-ring.dis { border-color: var(--hairline); }
.b-opt-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.b-opt-t { font-size: 16px; font-weight: 600; }
.b-opt-d { font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.b-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--muted); border: 1px solid var(--button); border-radius: 999px; padding: 2px 7px; }
.b-based { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--muted); }
.b-note { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); padding-top: 6px; margin-top: 2px; border-top: 1px solid var(--hairline); }
.b-note.dim { color: var(--muted); }
.b-change { display: flex; gap: 10px; align-items: baseline; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.b-change::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--easy); flex-shrink: 0; transform: translateY(-2px); }
.b-seg { display: grid; padding: 3px; border-radius: 999px; background: var(--sunken); }
.b-seg button { height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 14.5px; font-weight: 600; cursor: pointer; padding: 0 4px; }
.b-seg.big button { height: 42px; font-size: 16px; }
.b-seg.small button { font-size: 13.5px; }
.b-seg button[aria-checked="true"] { background: var(--ink); color: var(--ground); }
.b-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.b-day { height: 48px; border-radius: 10px; border: 1px solid var(--hairline); background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 0; }
.b-day.out.on { border-color: var(--amber-soft-line); background: var(--amber-soft); color: var(--muted); text-decoration: line-through; }
.b-day.long.on { border-color: var(--long); background: var(--tint-long); color: var(--long); }
.b-day[disabled] { opacity: 0.35; cursor: default; }
.b-centre { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 24px 0; }
.b-centre .pill { width: 100%; }
.b-done { width: 52px; height: 52px; border-radius: 999px; background: var(--easy); display: flex; align-items: center; justify-content: center; }
.b-track { height: 8px; border-radius: 999px; background: var(--sunken); overflow: hidden; }
.b-track span { display: block; height: 100%; border-radius: 999px; background: var(--ink); transition: width 0.3s; }
.b-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; border-top: 1px solid var(--hairline); background: var(--ground);
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
.b-foot-in { max-width: 528px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.b-foot .pills > * { flex: 1; }
.b-grip { align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--button); margin-top: -6px; }
.b-close { width: 44px; height: 44px; margin-right: -10px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.b-stepper { display: flex; align-items: center; gap: 4px; padding: 2px; border-radius: 999px; background: var(--sunken); }
.b-stepper button { width: 44px; height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font-size: 20px; cursor: pointer; }
.b-stepper span { min-width: 58px; text-align: center; font-size: 16px; font-weight: 600; white-space: nowrap; }
/* the weekly distance chart */
.b-chart { padding: 16px 14px 12px; display: flex; flex-direction: column; gap: 12px; }
.b-plot { display: grid; grid-template-columns: minmax(0, 1fr) 22px; gap: 6px; }
.b-area { position: relative; height: 150px; }
.b-grid { position: absolute; left: 0; right: 0; border-top: 1px solid var(--sunken); }
.b-now { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--long); z-index: 1; pointer-events: none; }
.b-bars { position: absolute; inset: 0; display: grid; gap: 3px; align-items: end; }
.b-bar { all: unset; cursor: pointer; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.b-bar span { width: 100%; border-radius: 3px 3px 1px 1px; background: var(--button); }
.b-bar.race span { background: var(--race-bar); }
.b-bar.on span { background: var(--ink); }
.b-bar:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; border-radius: 3px; }
.b-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--ink-2); flex-shrink: 0; }
.b-dot.a { background: var(--ink); }
.b-axis { position: relative; height: 150px; }
.b-axis span { position: absolute; right: 0; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.b-months { display: grid; gap: 3px; }
.b-months span { font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; overflow: visible; min-width: 0; }
.b-phases { display: grid; gap: 3px; }
.b-phases span { height: 22px; border-radius: 4px; background: var(--sunken); font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.b-phases span.tight { font-size: 11px; letter-spacing: 0; }
.legend .b-dash { width: 14px; height: 0; border-radius: 0; border-top: 1.5px dashed var(--long); }
.b-wk { padding: 12px 14px 4px; display: flex; flex-direction: column; gap: 10px; }
.b-wk-nav { display: flex; align-items: center; gap: 8px; }
.b-arrow { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--hairline); background: transparent; color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.b-wk-mid { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.b-wk-dates { font-size: 14.5px; font-weight: 600; }
.b-sess { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; min-height: 52px; border-top: 1px solid var(--hairline); }
.b-sess i { width: 8px; height: 8px; border-radius: 999px; }
.b-sess-name, .b-sess-v { font-size: 14.5px; font-weight: 600; }
.b-sess-v { white-space: nowrap; }
.b-whyrow { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) 18px; gap: 10px; align-items: center;
  padding: 12px 14px; min-height: 56px; border-top: 1px solid var(--hairline); }
.b-whyrow.first { border-top: 0; }
.b-whyrow:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.b-why-t { font-size: 14.5px; line-height: 1.45; }
.b-checks { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.b-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.b-check svg { margin-top: 2px !important; }
.b-disclaim { font-size: 13px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.b-adult { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; cursor: pointer; }
.b-adult input { width: 20px; height: 20px; margin: 0; accent-color: var(--red); }
/* the summary beside the steps, on a computer */
.b-side { width: 360px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; padding-top: 66px; }
.b-sum { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: flex-start;
  padding: 12px 14px; min-height: 52px; border-top: 1px solid var(--hairline); }
.b-sum.first { border-top: 0; }
.b-sum.cur { background: var(--sunken); }
.b-sum[disabled] { cursor: default; }
.b-sum[disabled] .b-sum-l { color: var(--muted); }
.b-sum-l { font-size: 14px; font-weight: 600; }
.b-sum-dot { width: 18px; height: 18px; margin-top: 1px; border-radius: 999px; border: 1.5px solid var(--button); display: flex; align-items: center; justify-content: center; }
.b-sum-dot.done { background: var(--easy); border-color: var(--easy); }
.b-sum-dot.cur { border-color: var(--ink); }
body.desk[data-screen="build"] main { max-width: 1080px; margin: 0 auto; width: 100%; padding-bottom: 140px; }
body.desk .b-wrap.with-side { flex-direction: row; justify-content: center; gap: 28px; align-items: flex-start; }
body.desk .b-main { flex: 1; max-width: 640px; }
body.desk .b-progress { margin-top: 6px; }
body.desk .b-foot { padding: 14px 28px 22px; }
body.desk .b-foot-in { max-width: 1028px; }
body.desk .b-wrap.with-side ~ .b-foot .b-foot-in { padding-right: 388px; }
@media (max-width: 1279px) { body.desk .b-wrap.with-side ~ .b-foot .b-foot-in { padding-right: 0; } .b-side { width: 300px; } }

/* a new race on the Garmin calendar, on Today (preview) */
.race-card { border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.race-kick { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--muted); }
.race-kick i, .race-row i { width: 8px; height: 8px; border-radius: 999px; background: var(--ink); flex-shrink: 0; }
.race-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
.race-sub { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.race-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--hairline); border-radius: 10px; }
.race-facts div { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--hairline); min-width: 0; }
.race-facts div:first-child { border-left: 0; }
.race-fact-v { font-size: 16px; font-weight: 600; white-space: nowrap; }
.race-card .pills > * { flex: 1; }
.race-not { align-self: flex-start; height: 36px; margin: -6px 0 -4px; padding: 0; border: 0; background: transparent; color: var(--muted);
  font-size: 13.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.race-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--hairline);
  background: var(--panel); color: var(--ink); text-decoration: none; }
.race-row:hover { color: var(--ink); }
.race-row-t { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.race-row-cta { font-size: 14px; font-weight: 500; color: var(--red-text); white-space: nowrap; margin-left: auto; }
.race-row > .stack-tight { flex: 1; }

/* the plan running now: change it in the builder, or take it off (preview) */
.plan-manage { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.plan-manage-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.link-plain { min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; }
.link-plain:hover { color: var(--ink); }
.link-plain.red { color: var(--red-text); }
.b-replace { font-size: 14px; line-height: 1.5; color: var(--hard); margin-top: -10px; }

/* On a computer a sheet is a dialog in the middle of the screen, above the footer, not a drawer at the bottom. */
body.desk .scrim { align-items: center; padding: 24px; }
body.desk .sheet { max-width: 480px; max-height: calc(100vh - 48px); overflow-y: auto; border: 1px solid var(--hairline);
  border-radius: 16px; padding: 20px 22px 22px; }
body.desk .b-grip { display: none; }
.b-km { display: flex; align-items: center; gap: 10px; }
.b-km .field { width: 120px; }

/* tap a number in step 1 to change it; races the plan can't reach; a plan left part way */
.b-rowbtn { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 16px; min-height: 56px; border-top: 1px solid var(--hairline); }
.b-rowbtn:first-child { border-top: 0; }
.b-rowbtn:hover, .b-tap:hover { background: var(--hover-soft); }
.b-rowbtn:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.b-tap { cursor: pointer; }
.b-race.out { opacity: 0.55; grid-template-columns: 44px minmax(0, 1fr); }
.b-resume { display: flex; flex-direction: column; gap: 2px; }
.b-resume-go { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border-radius: var(--radius);
  border: 1px solid var(--hairline); background: var(--panel); color: var(--ink); text-decoration: none; }
.b-resume-go:hover { color: var(--ink); background: var(--surface); }
.b-resume-go .stack-tight { flex: 1; }
.b-resume-cta { font-size: 14px; font-weight: 500; color: var(--red-text); white-space: nowrap; }
.b-resume .link-plain { align-self: flex-end; font-size: 13px; }
.b-head h1:focus { outline: none; }
.b-sess-type { display: flex; gap: 6px; align-items: baseline; font-size: 12px; font-weight: 600; min-width: 0; }
.b-sess-day { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Strides as one row: each one's pace as a little bar (Nov 11). */
.spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; margin-left: 8px; vertical-align: -1px; }
.spark i { display: block; width: 4px; border-radius: 1px; }

/* after a run: the session as planned and as run, and what it shows (Nov 11) */
.run-chart { padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.run-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.run-chart text { font-family: var(--mono); font-size: 11px; fill: var(--muted); }
.run-chart text.v { fill: var(--ink); font-weight: 600; }
.chart-key { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.chart-key span { display: flex; align-items: center; gap: 6px; }
.chart-key i { width: 12px; height: 10px; border-radius: 2px; display: inline-block; }
.chart-caption { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.insights { display: flex; flex-direction: column; }
.insight { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--hairline); font-size: 14px; line-height: 1.45; }
.insight:first-child { border-top: 0; }
.insight b { font-weight: 600; }
.insight .ic { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ground); }

/* sessions can be held and dragged to another day (Nov 11) */
.plan-row .grip { display: flex; align-items: center; justify-content: center; color: var(--muted); opacity: 0.55; margin-left: -4px; }
.drag-hint { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); padding: 0 2px; margin-bottom: -6px; }
.drag-hint svg { flex-shrink: 0; }

/* Yesterday's Today, shown while today's arrives (Nov 13). */
#screen.stale > * { opacity: 0.45; transition: opacity 0.2s; }
#screen.stale > :first-child { opacity: 1; }
#screen.stale > :first-child > :not(.updating) { opacity: 0.45; }

/* Pull to refresh (Nov 13): the browser's own pull is held off, ours takes it. */
html, body { overscroll-behavior-y: contain; }
#ptr { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 10px); z-index: 40; width: 40px; height: 40px;
  border-radius: 50%; background: var(--surface); border: 1px solid var(--hairline); box-shadow: 0 6px 20px var(--shadow-2);
  display: grid; place-items: center; opacity: 0; pointer-events: none; transform: translate3d(-50%, -44px, 0); will-change: transform, opacity; }
#ptr .ptr-ring { grid-area: 1 / 1; transition: opacity .25s ease, transform .25s ease; }
#ptr .track { fill: none; stroke: var(--hairline); stroke-width: 2.4; }
#ptr .arc { fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%;
  transition: stroke .2s ease; }
#ptr.armed .arc, #ptr.spin .arc { stroke: var(--ink); }
#ptr.spin .ptr-ring { animation: ptr-spin .75s linear infinite; }
#ptr.spin .arc { stroke-dasharray: 30 100 !important; }
#ptr .tick-done { grid-area: 1 / 1; width: 24px; height: 24px; border-radius: 50%; background: var(--easy); display: grid; place-items: center;
  opacity: 0; transform: scale(.4); transition: opacity .2s ease, transform .35s cubic-bezier(.2, .9, .25, 1.3); }
#ptr.done .ptr-ring { opacity: 0; transform: scale(.6); animation: none; }
#ptr.done .tick-done { opacity: 1; transform: scale(1); }
@keyframes ptr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  #ptr.spin .ptr-ring { animation-duration: 2.4s; }
  #ptr .tick-done { transition: opacity .2s ease; transform: none; }
}
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Should-haves (Nov 13): rest days lighter, next week in short, block stats and phases. */
.plan-row.rest { min-height: 48px; padding-top: 10px; padding-bottom: 10px; }
.plan-row.rest .rest-name { font-size: 14px; font-weight: 500; color: var(--muted); }
.rest-note { font-size: 12.5px; line-height: 1.4; }
.next-week { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.nw-list { display: flex; flex-direction: column; gap: 6px; }
.nw-row { display: grid; grid-template-columns: 34px 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 14px; }
.nw-d { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.nw-dot { width: 8px; height: 8px; border-radius: 999px; }
.nw-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-v { font-size: 13px; color: var(--muted); white-space: nowrap; }
.nw-go { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.block-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.block-stats > div { padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--hairline); }
.block-stats > div:nth-child(-n+2) { border-top: 0; }
.block-stats > div:nth-child(2n) { border-left: 1px solid var(--hairline); }
.block-stats .l { font-size: 12px; color: var(--muted); }
.block-stats .v { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.block-stats .n { font-size: 12.5px; color: var(--muted); }
.phase-list { display: flex; flex-direction: column; }
.ph-row { padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.ph-row + .ph-row { border-top: 1px solid var(--hairline); }
.ph-head { display: flex; align-items: center; gap: 8px; }
.ph-swatch { width: 10px; height: 10px; border-radius: 3px; border: 1px solid var(--hairline); }
.ph-swatch.b0 { background: var(--swatch-0); }
.ph-swatch.b1 { background: var(--swatch-1); }
.ph-row.now .strong { color: var(--ink); }
.ph-line { font-size: 13.5px; line-height: 1.45; }

/* Nov 23: Get your plan. Two equal choices, then the chat way's three steps. */
.gp-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.gp-options { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 720px) { .gp-options { grid-template-columns: 1fr 1fr; } }
.gp-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; min-height: 92px; }
.gp-later { text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
/* Nov 29, the Coach pilot: the three steps to Claude or ChatGPT, under Build it with Coach. */
.gp-open { align-self: flex-start; min-height: 32px; display: inline-flex; align-items: center; font-size: 13.5px; font-weight: 500;
  color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.gp-open:hover { color: var(--ink); }
.pc-input { height: 48px; border-radius: 12px; border: 1px solid var(--button); background: var(--surface); color: var(--ink);
  padding: 0 14px; font: inherit; font-size: 16px; width: 100%; box-sizing: border-box; }
.pc-km { align-self: flex-start; gap: 10px; font-size: 17px; }
.pc-km span { min-width: 130px; }
.pc-foot { margin-top: 20px; display: flex; }
.pc-foot .pill { flex: 1; }
.pc-foot .pill:disabled { opacity: 0.45; cursor: not-allowed; }
#pc-open.waiting { opacity: 0.55; pointer-events: none; }

/* Nov 26: matching version 2. Nov 27: the line sits inside the card, one small
   muted line under the stats, and a matched card is compact. What still needs
   an answer (which session, the rest of a partial) sits under its card. */
.plan-row.is-matched { padding: 8px 14px; min-height: 50px; }
.plan-row.is-matched .body { gap: 2px; }
.match-inline { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.match-change { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.match-change:focus-visible { outline: 2px solid var(--red-text); outline-offset: 2px; border-radius: 3px; }
.from-note { color: var(--muted); }
/* Over and Short: neutral within 15% of the plan, amber beyond, the same both ways. */
.dot.tone-neutral { background: var(--muted); }
.dot.tone-amber { background: var(--amber); }
.out-word.tone-neutral { color: var(--muted); }
.out-word.tone-amber { color: var(--amber); }
.match-box { display: flex; flex-direction: column; gap: 8px; padding: 0 14px 12px 66px; }
.match-q { display: flex; flex-direction: column; gap: 6px; }
.match-q > .meta { font-size: 13.5px; color: var(--ink); }
.match-opts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* The Change menu. */
.sheet-opts { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 14px; }
.sheet-opt { text-align: left; font: inherit; font-size: 15px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--hairline);
  background: var(--surface); color: var(--ink); cursor: pointer; }
.sheet-opt.quiet { color: var(--muted); }
.sheet-sub { margin-top: 6px; font-size: 12.5px; }
@media (max-width: 420px) { .match-box { padding-left: 14px; } }

/* Nov 26 (pwa-v2): the install sheet's iPhone steps, the notification pre-prompt, Remind me, the note on a notification's screen. */
.ios-steps { margin: 4px 0 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
.ios-steps li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; line-height: 1.4; counter-increment: s; }
.ios-steps li::before { content: counter(s); flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--ground); font-size: 12.5px; font-weight: 600; display: grid; place-items: center; }
.ios-ico { flex: 0 0 38px; height: 38px; border-radius: 10px; border: 1px solid var(--hairline); display: grid; place-items: center; color: #0A84FF; }
.ios-bar { position: relative; display: flex; justify-content: space-around; align-items: center; height: 44px; margin-top: 4px; border-radius: 12px; background: var(--hover); color: #0A84FF; }
.ios-bar > span:not(.ios-share) { width: 18px; height: 3px; border-radius: 2px; background: var(--hairline); }
.ios-share { display: grid; place-items: center; width: 38px; height: 34px; border-radius: 8px; outline: 2px solid #0A84FF; outline-offset: 1px; }
.ios-arrow { position: absolute; left: 50%; top: -14px; width: 0; height: 0; margin-left: -7px; border: 7px solid transparent; border-top-color: #0A84FF; animation: ios-bob 1.4s ease-in-out infinite; }
@keyframes ios-bob { 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .ios-arrow { animation: none; } }
.push-list { margin: 2px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; line-height: 1.45; }
.remind-row { display: flex; }
.remind-row .pill { width: 100%; justify-content: center; gap: 8px; }
.push-landing { font-size: 13px; text-align: center; padding: 18px 8px 6px; }
.push-landing .link-plain { font-size: 13px; }

/* Chat (pilot, Nov 27): only for the people the server allows. Bubbles on the
   ground colour, the input pinned above the tabs, a proposed change as a card. */
nav.tabs.five { grid-template-columns: repeat(5, 1fr); }
nav.tabs.five .ti { width: 48px; }
.chat-wrap { display: flex; flex-direction: column; gap: 18px; }
.chat-log { display: flex; flex-direction: column; gap: 12px; }
/* On a phone the chat is one column the height of what you can see (Nov 28), the way
   messaging apps hold it: the title stays at the top, the messages scroll between, and the
   box sits on the tabs, or on the keyboard while it's up (the tabs step aside). --vvh and
   --vvt are the visible height and its top, kept by viewportSync() in app.js. */
body[data-screen="chat"]:not(.desk) { overflow: hidden; overscroll-behavior: none; }
body[data-screen="chat"]:not(.desk) main { padding: 0; }
body:not(.desk) .chat-wrap { position: fixed; left: 0; right: 0; top: var(--vvt, 0px); height: var(--vvh, 100dvh); gap: 0;
  padding-bottom: calc(67px + env(safe-area-inset-bottom)); box-sizing: border-box; }
body:not(.desk) .chat-wrap > .section-head { flex-shrink: 0; padding: calc(16px + env(safe-area-inset-top)) 16px 12px; border-bottom: 1px solid var(--hairline); }
body:not(.desk) .chat-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 16px; }
body:not(.desk) .chat-wrap .chat-bar { position: static; flex-shrink: 0; }
body.kb:not(.desk) .chat-wrap { padding-bottom: 0; }
body.kb:not(.desk) .chat-wrap > .section-head { padding-top: calc(10px + env(safe-area-inset-top)); padding-bottom: 8px; }
body.kb:not(.desk) .chat-wrap > .section-head .kicker { display: none; }
/* Very little room (a phone on its side with the keyboard up): the box keeps to a third of it and
   the title steps aside too, so the newest message still shows. */
body:not(.desk) .chat-wrap .chat-bar .field { max-height: min(140px, calc(var(--vvh, 100dvh) * 0.3)); }
@media (max-height: 340px) { body.kb:not(.desk) .chat-wrap > .section-head { display: none; } }
/* Any screen: while the keyboard is up the tabs step aside, so what you're typing into sits on it. */
body.kb nav.tabs { display: none; }
.msg { max-width: 88%; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.msg p { margin: 0; }
.msg p + p { margin-top: 8px; }
.msg.me { align-self: flex-end; background: var(--sunken); border: 1px solid var(--hairline); border-radius: 16px 16px 4px 16px; padding: 10px 14px; }
.msg.ai { align-self: flex-start; display: flex; flex-direction: column; gap: 6px; }
.msg.ai.busy { flex-direction: row; align-items: center; gap: 10px; }
.msg-tools { display: flex; gap: 2px; margin-left: -8px; }
.thumb { all: unset; cursor: pointer; width: 34px; height: 34px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.thumb:hover { background: var(--hover); color: var(--ink); }
.thumb[aria-pressed="true"] { color: var(--ink); background: var(--button); }
.thumb:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: chat-dot 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dots i { animation: none; } }
.chat-action { border-color: var(--button); }
.chat-action.settled { background: transparent; }
.chat-action-text { font-size: 15px; line-height: 1.45; }
.chat-action[data-status="done"] .kicker { color: var(--easy); }
.chat-action[data-status="failed"] .kicker { color: var(--amber); }
.chat-empty .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-starter { height: auto; min-height: 40px; padding: 8px 14px; white-space: normal; text-align: left; font-size: 14px; }
.chat-bar { position: fixed; left: 0; right: 0; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 6; background: var(--ground);
  border-top: 1px solid var(--hairline); padding: 10px 16px; }
.chat-bar-in { max-width: 528px; margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; }
.chat-bar .field { flex: 1; min-width: 0; height: auto; min-height: 44px; max-height: 140px; padding: 11px 14px; resize: none; font: inherit; font-size: 16px; line-height: 1.35; }
.chat-bar .pill { flex-shrink: 0; }
body.desk .chat-bar { bottom: 0; padding-bottom: 16px; }
body.desk .chat-bar-in, body.desk .chat-wrap { max-width: 720px; margin-left: auto; margin-right: auto; width: 100%; }
body.desk[data-screen="chat"] main { padding-bottom: 120px; }
