/* Generated by product/design/build.py from tokens.css. Edit the source, not this file. */
/* Sub-X design tokens.
   Source of truth for every Sub-X surface: the web app, the phone apps, the landing page, emails.
   The values are the hub's own (the founder's working hub page, its :root), so the product
   looks like the coach that already works. The brand pair (--night, --volt) comes from the app icon
   (android/icon/icon_gen.py, the "night" colourway). README.md says what each token is for. */

:root {
  /* Surfaces and ink */
  --paper: #f2f4f5; --card: #ffffff; --wash: #e8eef0; --line: #dce2e5;
  --ink: #13222b; --ink-2: #4a5a63; --ink-3: #6b7a82;

  /* The two working colours: teal does things, red marks the goal */
  --accent: #1e6c78; --accent-wash: rgba(30, 108, 120, 0.10); --on-accent: #ffffff;
  --red: #c8102e; --red-wash: rgba(200, 16, 46, 0.07);

  /* State */
  --good: #006300; --warn: #9a6700; --bad: #b3261e; --plan: #6b7a82;

  /* Sports: only ever as a 3-4px edge or a dot, never a fill behind text */
  --swim: #2a78d6; --bike: #eb6834; --run: #1baf7a; --gym: #4a3aa7; --trans: #b8c1c6;

  /* Season phases and the load heat scale */
  --seg-a: #d9e2e6; --seg-b: #c4d1d7;
  --h0: #e8eef0; --h1: #cfe4e7; --h2: #9fcbd2; --h3: #62a9b4; --h4: #2f8592; --h5: #1e6c78;

  /* Brand: the icon. Night surfaces only; volt is never text and never on paper */
  --night: #111418; --night-2: #1a1f25; --night-line: #2a3139;
  --on-night: #ffffff; --on-night-2: #b9c3c9; --volt: #d4ff3a;
  --accent-on-night: #4fb0bc; --on-accent-night: #0b1418; /* the dark-mode teal, for actions on night */

  /* Type */
  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --stretch-head: 112%; --stretch-title: 125%;
  --slant: -12deg; /* the icon's italic: skewX, not a font italic */

  /* Shape and space (4px grid) */
  --radius: 12px; --radius-sm: 10px; --radius-pill: 999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --wrap: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1519; --card: #151f25; --wash: #1b272e; --line: #26333a;
    --ink: #e7edf0; --ink-2: #b3c0c6; --ink-3: #8a989f;
    --accent: #4fb0bc; --accent-wash: rgba(79, 176, 188, 0.14); --on-accent: #0e1519;
    --red: #ff5964; --red-wash: rgba(255, 89, 100, 0.10);
    --good: #2fbf4a; --warn: #fab219; --bad: #ff7b72; --plan: #8a989f;
    --swim: #3987e5; --bike: #d95926; --run: #199e70; --gym: #9085e9; --trans: #3a474e;
    --seg-a: #22313a; --seg-b: #2d3f49;
    --h0: #1b272e; --h1: #1f3a40; --h2: #255a63; --h3: #2f7d88; --h4: #3f9eaa; --h5: #6cc3cf;
    --night: #0a0d10; --night-2: #141a1f; --night-line: #26313a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1519; --card: #151f25; --wash: #1b272e; --line: #26333a;
  --ink: #e7edf0; --ink-2: #b3c0c6; --ink-3: #8a989f;
  --accent: #4fb0bc; --accent-wash: rgba(79, 176, 188, 0.14); --on-accent: #0e1519;
  --red: #ff5964; --red-wash: rgba(255, 89, 100, 0.10);
  --good: #2fbf4a; --warn: #fab219; --bad: #ff7b72; --plan: #8a989f;
  --swim: #3987e5; --bike: #d95926; --run: #199e70; --gym: #9085e9; --trans: #3a474e;
  --seg-a: #22313a; --seg-b: #2d3f49;
  --h0: #1b272e; --h1: #1f3a40; --h2: #255a63; --h3: #2f7d88; --h4: #3f9eaa; --h5: #6cc3cf;
  --night: #0a0d10; --night-2: #141a1f; --night-line: #26313a;
  color-scheme: dark;
}

/* Generated by product/design/build.py from components.css. Edit the source, not this file. */
/* Sub-X components. Built on tokens.css. Each one is the hub's own component, renamed only where the hub
   name was tied to one screen. README.md shows when to use which; specimen.html shows them all. */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.45; }
h1, h2, h3 { font-family: var(--font-display); font-stretch: var(--stretch-head); line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(1.6rem, 5.5vw, 2.3rem); font-weight: 800; font-stretch: var(--stretch-title); }
h2 { font-size: 1.15rem; font-weight: 750; }
h3 { font-size: 1rem; font-weight: 750; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 0.15em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--s4); }
.eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.muted { color: var(--ink-2); }
.small { font-size: 0.875rem; }
.num { font-family: var(--font-mono); font-weight: 600; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Brand mark: the icon's construction. A heavy, wide, slanted number on a volt underline. */
.sx { display: inline-flex; align-items: baseline; gap: 0.04em; font-family: var(--font-display); font-weight: 800;
  font-stretch: var(--stretch-title); line-height: 0.9; letter-spacing: -0.01em; white-space: nowrap; }
.sx-x { position: relative; display: inline-block; transform: skewX(var(--slant)); padding-bottom: 0.12em; font-variant-numeric: tabular-nums; }
.sx-x::after { content: ""; position: absolute; left: 0.02em; right: 0.02em; bottom: 0; height: 0.1em; background: var(--volt); border-radius: 0.02em; }
.sx-pre { transform: skewX(var(--slant)); display: inline-block; }
.on-paper .sx-x::after { background: var(--red); } /* volt only on night; on paper the underline is the goal red */

/* Night: the brand surface. One band per page at most (the hero), the icon, the splash. */
.night { background: var(--night); color: var(--on-night); }
.night .muted, .night .eyebrow { color: var(--on-night-2); }
.night a { color: var(--on-night); }
.night .btn { background: var(--accent-on-night); border-color: var(--accent-on-night); color: var(--on-accent-night); }
/* A card on night is still a card: it keeps the paper palette inside */
.card { color: var(--ink); }
.night .card .muted { color: var(--ink-2); } .night .card .eyebrow { color: var(--ink-3); }
.night .card a { color: var(--accent); }
.night .card .btn { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); min-width: 0; display: grid; gap: var(--s3); align-content: start; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.card.session { border-left: 4px solid var(--accent); }
.card.session.swim { border-left-color: var(--swim); } .card.session.bike { border-left-color: var(--bike); }
.card.session.run { border-left-color: var(--run); } .card.session.gym { border-left-color: var(--gym); }
.card-why { font-size: 0.9375rem; color: var(--ink-2); border-left: 3px solid var(--line); padding-left: 10px; }
.card-why b { color: var(--ink); }
.card-basis { font-size: 0.8125rem; color: var(--ink-3); }
.steps-list { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }

/* The day's verdict */
.verdict { background: var(--wash); border-radius: var(--radius-sm); padding: 10px 14px; border-left: 4px solid var(--good); display: grid; gap: 2px; }
.verdict b { font-family: var(--font-display); font-stretch: var(--stretch-head); color: var(--good); font-size: 1.0625rem; }
.verdict.warn { border-left-color: var(--warn); } .verdict.warn b { color: var(--warn); }
.verdict.bad { border-left-color: var(--bad); } .verdict.bad b { color: var(--bad); }

/* Chips and pills */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 0.8125rem; font-weight: 700; background: var(--wash); color: var(--ink-2); white-space: nowrap; }
.chip.good { color: var(--good); } .chip.warn { color: var(--warn); } .chip.bad { color: var(--bad); }
.cd { display: inline-block; font-size: 0.875rem; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 4px 12px; white-space: nowrap; }
.cd b { font-family: var(--font-mono); color: var(--ink); font-size: 1rem; }
.cd.red { border-color: var(--red); background: linear-gradient(var(--red-wash), var(--red-wash)), var(--card); }

/* Buttons: one filled teal action per view; everything else is the quiet pill */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 0.9375rem; font-weight: 700;
  border-radius: var(--radius-pill); padding: 10px 20px; cursor: pointer; text-decoration: none; border: 1px solid var(--accent);
  background: var(--accent); color: var(--on-accent); min-height: 44px; }
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: 0.5; cursor: default; }
.btn-quiet { background: var(--card); color: var(--accent); border-color: var(--line); }
.night .btn-quiet { background: transparent; color: var(--on-night); border-color: var(--night-line); }

/* Choice chips: the note card's quick replies, used for any single or multi choice */
.choices { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.choices legend { padding: 0; margin-bottom: 8px; font-weight: 700; font-size: 0.9375rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: inline-block; font-size: 0.875rem; font-weight: 700; border-radius: var(--radius-pill); padding: 7px 13px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); }
.choice input:checked + span { background: var(--accent-wash); border-color: var(--accent); color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Fields: the note card's textarea look */
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 700; font-size: 0.9375rem; }
.field .opt { font-weight: 400; color: var(--ink-3); }
.input { width: 100%; min-width: 0; min-height: 46px; font: inherit; font-size: 1rem; color: var(--ink); background: var(--wash); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.input::placeholder { color: var(--ink-3); }

/* Stat tiles (Body): label, value, a coloured edge for its state */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--wash); border-radius: var(--radius-sm); padding: 8px 10px; border-left: 3px solid var(--line); display: grid; gap: 1px; min-width: 0; }
.tile i { font-style: normal; font-size: 0.6875rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.tile b { font-size: 1.125rem; }
.tile span { font-size: 0.8125rem; color: var(--ink-2); }
.tile.good { border-left-color: var(--good); } .tile.good span { color: var(--good); }
.tile.warn { border-left-color: var(--warn); } .tile.warn span { color: var(--warn); }
.tile.bad { border-left-color: var(--bad); } .tile.bad span { color: var(--bad); }

/* A finished activity */
.act { display: grid; gap: 8px; background: var(--wash); border-radius: var(--radius-sm); padding: 10px 12px; border-left: 4px solid var(--accent); }
.act.run { border-left-color: var(--run); } .act.swim { border-left-color: var(--swim); } .act.bike { border-left-color: var(--bike); } .act.gym { border-left-color: var(--gym); }
.act-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.act-top b { font-family: var(--font-display); font-stretch: var(--stretch-head); }
.act-top span { font-size: 0.8125rem; color: var(--ink-3); }
.act-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.act-stats div { display: grid; min-width: 0; }
.act-stats i { font-style: normal; font-size: 0.6875rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.act-stats b { font-family: var(--font-mono); font-weight: 600; font-size: 1rem; white-space: nowrap; }
.act-note { font-size: 0.875rem; font-weight: 700; }
.act-note.good { color: var(--good); } .act-note.warn { color: var(--warn); }

/* Season bar: phases in two greys, done in teal, the race in red */
.season { display: grid; gap: 6px; }
.season-bar { position: relative; display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--seg-a); }
.season-bar .ph:nth-child(odd) { background: var(--seg-a); } .season-bar .ph:nth-child(even) { background: var(--seg-b); }
.season-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 6px 0 0 6px; }
.season-bar .mark { position: absolute; top: 0; width: 3px; height: 12px; background: var(--red); transform: translateX(-3px); }
.season-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 0.8125rem; color: var(--ink-2); }
.season-meta b { color: var(--ink); }

/* Week calendar */
.cal-week { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-week.now { border-color: var(--accent); }
.cal-head { display: grid; gap: 2px; padding: 12px 14px; }
.cal-bar { height: 4px; border-radius: 2px; background: var(--wash); overflow: hidden; margin-top: 6px; }
.cal-bar i { display: block; height: 100%; background: var(--accent); }
.cal-days { display: grid; border-top: 1px solid var(--line); }
.cal-day { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
.cal-day:first-child { border-top: 0; }
.cal-date { text-align: center; line-height: 1.1; color: var(--ink-2); font-size: 0.8125rem; padding-top: 2px; }
.cal-date b { display: block; font-size: 1.125rem; color: var(--ink); }
.cal-day.today .cal-date { background: var(--accent); color: var(--on-accent); border-radius: 10px; padding: 4px 0; align-self: start; }
.cal-day.today .cal-date b { color: var(--on-accent); }
.cal-items { display: grid; gap: 6px; min-width: 0; }
.cal-item { border-left: 3px solid var(--accent); padding-left: 8px; font-size: 0.9375rem; font-weight: 700; }
.cal-item span { display: block; font-weight: 400; font-size: 0.8125rem; color: var(--ink-2); }
.cal-item.swim { border-left-color: var(--swim); } .cal-item.bike { border-left-color: var(--bike); }
.cal-item.run { border-left-color: var(--run); } .cal-item.gym { border-left-color: var(--gym); }
.cal-item.rest { border-left-color: var(--line); color: var(--ink-3); }

/* Targets list (zones, paces) */
.tgts { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.tgts li { display: grid; gap: 1px; border-top: 1px solid var(--line); padding-top: 8px; }
.tgts li:first-child { border-top: 0; padding-top: 0; }
.tgts li b { font-family: var(--font-mono); font-weight: 600; font-size: 0.9375rem; }
.tgts li span { font-size: 0.8125rem; color: var(--ink-2); }

/* Whys: the decision log, one disclosure per decision */
.whys details { border-top: 1px solid var(--line); padding: 10px 2px; }
.whys details:first-child { border-top: 0; }
.whys summary { font-weight: 700; cursor: pointer; }
.whys details p { margin-top: 6px; color: var(--ink-2); font-size: 0.9375rem; }
.whys details p.when { font-size: 0.75rem; color: var(--ink-3); margin-top: 4px; }

/* ---------- From the app (promoted 22 Nov 2026 from product/sub-x/web/css/app.css) ---------- */

/* Tap-to-explain tiles: a stat tile that is a button; tapping it shows what the number means in .tile-info */
.tile-btn { font: inherit; color: inherit; text-align: left; border: 0; border-left: 3px solid var(--line); cursor: pointer; min-height: 64px; }
.tile-btn.good { border-left-color: var(--good); } .tile-btn.warn { border-left-color: var(--warn); } .tile-btn.bad { border-left-color: var(--bad); }
.tile-btn i::after { content: " ⓘ"; font-weight: 400; letter-spacing: 0; }
.tile-btn[aria-expanded="true"] { outline: 2px solid var(--accent); outline-offset: -2px; }
.tile-info { font-size: 0.875rem; color: var(--ink-2); background: var(--wash); border-radius: var(--radius-sm); padding: 10px 12px; }

/* Day timeline (fuel): times down the left, the sessions washed in teal, the past greyed */
.tl { list-style: none; margin: 0; padding: 0; display: grid; }
.tl li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 10px 6px; border-top: 1px solid var(--line); }
.tl li:first-child { border-top: 0; }
.tl li.session { background: var(--accent-wash); border-radius: 8px; border-top-color: transparent; }
.tl li.session + li { border-top-color: transparent; }
.tl li.past { opacity: 0.55; }
.tl .t { font-family: var(--font-mono); font-weight: 600; color: var(--ink-2); font-size: 0.9375rem; }
.tl .body { display: grid; gap: 2px; min-width: 0; font-size: 0.9375rem; }
.tl .h { font-weight: 700; }
.tl .m { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-2); }
.tl .n { font-size: 0.8125rem; color: var(--ink-3); }

/* Day picker: a week as seven buttons; today ringed, the chosen day washed */
.strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dayb { font: inherit; color: inherit; background: var(--wash); border: 2px solid transparent; border-radius: var(--radius-sm); padding: 8px 2px 6px; display: grid; justify-items: center; gap: 2px; cursor: pointer; min-width: 0; min-height: 64px; }
.dayb .dl { font-size: 0.75rem; font-weight: 700; color: var(--ink-3); }
.dayb .dn { font-family: var(--font-mono); font-size: 0.9375rem; font-weight: 600; }
.dayb .fc { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--ink-2); }
.dayb.today { border-color: var(--accent); }
.dayb.sel { background: var(--accent-wash); box-shadow: inset 0 0 0 2px var(--accent); }
.dayb:hover { background: var(--accent-wash); }

/* Week totals: the week against the plan, sport by sport, each with a meter */
.totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .totals { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.total { background: var(--wash); border-radius: var(--radius-sm); padding: 8px 10px 10px; border-left: 3px solid var(--accent); display: grid; gap: 4px; min-width: 0; }
.total.run { border-left-color: var(--run); } .total.swim { border-left-color: var(--swim); } .total.bike { border-left-color: var(--bike); } .total.gym { border-left-color: var(--gym); }
.total i { font-style: normal; font-size: 0.6875rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.total b { font-size: 1.25rem; white-space: nowrap; }
.total small { font-size: 0.8125rem; font-weight: 400; color: var(--ink-2); }
.meter { display: block; height: 4px; border-radius: 2px; background: var(--card); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 2px; }

/* Key-session list: day first, then the session */
.key-list { list-style: none; margin: 0; padding: 0; display: grid; }
.key-list li { display: grid; grid-template-columns: 3em minmax(0, 1fr); gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.key-list li:first-child { border-top: 0; padding-top: 0; }
.key-list .kd { color: var(--ink-3); font-size: 0.8125rem; padding-top: 2px; }

/* Seven-column week: on a wide screen a .cal-week.wide reads across as seven columns */
@media (min-width: 1000px) {
  .cal-week.wide .cal-days { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .cal-week.wide .cal-day { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 10px; border-top: 0; border-left: 1px solid var(--line); padding: 12px 10px 14px; align-content: start; }
  .cal-week.wide .cal-day:first-child { border-left: 0; }
  .cal-week.wide .cal-date { display: flex; align-items: baseline; gap: 6px; text-align: left; padding: 4px 0; }
  .cal-week.wide .cal-date b { display: inline; }
  .cal-week.wide .cal-day.today { background: var(--accent-wash); }
  .cal-week.wide .cal-day.today .cal-date { padding: 4px 8px; justify-self: start; }
  .cal-week.wide .cal-items { gap: 10px; align-content: start; }
  .cal-week.wide .cal-item { font-size: 0.875rem; }
}

/* Phase list: the season's phases, the current one marked; past ones fold to a line */
.phase-list { list-style: none; margin: 0; padding: 0; display: grid; }
.phase-list li { display: grid; gap: 2px; padding: 10px 10px 10px 12px; border-top: 1px solid var(--line); border-left: 3px solid transparent; }
.phase-list li:first-child { border-top: 0; }
.phase-list li.past { color: var(--ink-3); }
.phase-list li.past b { color: var(--ink-2); }
.phase-list li.now { border-left-color: var(--accent); background: var(--accent-wash); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-top-color: transparent; }
.phase-list li.now + li { border-top-color: transparent; }
.ph-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ph-top .num { font-size: 0.8125rem; color: var(--ink-2); font-weight: 400; }
.ph-purpose { font-size: 0.875rem; color: var(--ink-2); }
.phase-list li.past .ph-purpose { display: none; }
.ph-now { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }

/* Hours chart: one measure, done (teal bar) against planned (grey tick; pale bar ahead), races as red rules.
   Drawn as SVG at the container's width with these classes; a tooltip, a read-out line and a table view. */
.legend { display: inline-flex; align-items: center; gap: 4px 6px; flex-wrap: wrap; }
.key-bar { width: 10px; height: 12px; border-radius: 3px 3px 0 0; background: var(--accent); display: inline-block; }
.key-line { width: 14px; height: 2px; background: var(--plan); display: inline-block; margin-left: 8px; }
.key-race { width: 2px; height: 12px; background: var(--red); display: inline-block; margin-left: 8px; }
.hours-chart { position: relative; height: 196px; outline: none; touch-action: pan-y; border-radius: 6px; }
.hours-chart:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.hours-chart svg { display: block; overflow: visible; }
.hours-chart .grid { stroke: var(--line); stroke-width: 1; }
.hours-chart .axis { stroke: var(--ink-3); stroke-width: 1; }
.hours-chart .ax { font-family: var(--font-mono); font-size: 10px; fill: var(--ink-3); }
.hours-chart .bar-done { fill: var(--accent); }
.hours-chart .bar-plan { fill: var(--seg-b); }
.hours-chart .bar-plan.rec { fill: var(--seg-a); }
.hours-chart .tick-plan { stroke: var(--plan); stroke-width: 2; }
.hours-chart .now-ring { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 3; }
.hours-chart .race-rule { stroke: var(--red); stroke-width: 2; }
.hours-chart .race-label { font-family: var(--font-body); font-weight: 700; font-size: 11px; fill: var(--ink-2); }
.hours-chart .sel { fill: var(--ink); opacity: 0.08; }
.chart-tip { position: absolute; top: 0; pointer-events: none; background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px; font-size: 0.8125rem; display: grid; gap: 1px; white-space: nowrap; z-index: 2; }
.chart-tip span { font-family: var(--font-mono); color: var(--ink-2); font-size: 0.75rem; }
.chart-read { color: var(--ink-3); min-height: 1.4em; }
.table-view summary { cursor: pointer; color: var(--accent); font-weight: 700; }
.table-view table { margin-top: 8px; }
.table-view tbody { display: block; max-height: 260px; overflow-y: auto; }
.table-view thead, .table-view tbody tr { display: table; width: 100%; table-layout: fixed; }

/* Changes: what a decision moved, from what to what, and why */
.changes { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.changes li { display: grid; grid-template-columns: minmax(6.5em, auto) minmax(0, 1fr); gap: 2px 12px; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--card); }
.changes li:first-child { border-top: 0; }
.ch-what { font-size: 0.75rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; padding-top: 3px; }
.ch-move { font-family: var(--font-mono); font-size: 0.875rem; }
.ch-move s { color: var(--ink-3); text-decoration-color: var(--ink-3); }
.ch-move b { font-weight: 600; color: var(--ink); }
.ch-why { grid-column: 2; font-size: 0.8125rem; color: var(--ink-2); }
.whys details > .changes { margin-top: 10px; }

/* Lap table: a workout's laps or reps, numbers right-aligned in mono, a pace bar (longer is faster) */
.lap-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.lap-table th { text-align: right; font-size: 0.6875rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 6px; }
.lap-table th:first-child, .lap-table td:first-child { text-align: left; }
.lap-table td { text-align: right; padding: 7px 6px; border-top: 1px solid var(--line); font-family: var(--font-mono); white-space: nowrap; }
.lap-table td.lap-bar { width: 22%; padding-right: 0; }
.lap-bar span { display: block; height: 6px; border-radius: 3px; background: var(--accent); margin-left: auto; }
@media (max-width: 420px) { .lap-table td.lap-bar, .lap-table th:last-child { display: none; } }

/* App icon: the athlete's own mark on night, as on their home screen. Size with --icon. */
.app-icon { --icon: 72px; width: var(--icon); height: var(--icon); border-radius: calc(var(--icon) * 0.25); background: var(--night); display: grid; place-items: center;
  font-size: calc(var(--icon) * 0.42); border: 1px solid var(--night-line); color: var(--on-night); flex: 0 0 auto; }
.app-icon .sx-x::after { background: var(--volt); }

/* Flow steps: progress through a short flow (setup, a test), the season bar's look */
.flow-steps { display: flex; gap: 3px; }
.flow-steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--seg-a); }
.flow-steps span.done { background: var(--accent); }
.flow-steps span.now { background: var(--ink); }

/* Chat thread (added 23 Nov 2026, the coach chat): the athlete and the coach, in time order. The coach's answer is a
   card; the data it cites sits inside it on wash (.cite: an activity, a week's totals, a target, body tiles), and a
   change it proposes or a safety stop is its own card under it. The athlete's words sit on wash, on the right. No
   bubbles with tails, no avatars. The meta line says who wrote it, and marks the coach's words as written by AI.
   Quick replies (.replies > .reply) sit under the last answer: tap to send. */
.thread { display: grid; gap: var(--s5); min-width: 0; }
.msg { display: grid; gap: 6px; min-width: 0; }
.msg-meta { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; font-size: 0.75rem; color: var(--ink-3); }
.msg-meta b { color: var(--ink-2); font-weight: 700; }
.msg.me { justify-items: end; }
.msg.me .msg-meta { justify-content: flex-end; text-align: right; }
.msg-text { background: var(--wash); border-radius: var(--radius); padding: 10px 14px; max-width: min(88%, 36rem); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.pending .msg-text { outline: 1px dashed var(--warn); outline-offset: -1px; }
.msg-body { gap: var(--s3); }
.msg-body > p { overflow-wrap: anywhere; }
.msg-live::after { content: ""; display: inline-block; width: 0.5em; height: 1em; margin-left: 2px; vertical-align: -0.15em; background: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .msg-live::after { animation: caret 1s steps(1) infinite; } }
@keyframes caret { 50% { opacity: 0; } }
.cite { margin: 0; display: grid; gap: 4px; min-width: 0; }
.cite > figcaption { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.replies { display: flex; flex-wrap: wrap; gap: 6px; }
.reply { font: inherit; font-size: 0.875rem; font-weight: 700; min-height: 36px; padding: 6px 13px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--card); color: var(--accent); cursor: pointer; text-align: left; }
.reply:hover { border-color: var(--accent); background: var(--accent-wash); }
.reply[disabled] { color: var(--ink-3); cursor: default; background: var(--card); border-color: var(--line); }

/* Tabs: the red underline is the only red in navigation */
.tabs { background: var(--paper); border-bottom: 1px solid var(--line); }
.tabs-inner { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs a { flex: 0 0 auto; padding: 11px 12px 9px; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: 0.9375rem; border-bottom: 3px solid transparent; }
.tabs a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--red); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
