/* Kinetta: the visual system. Loaded last, it sets the tokens the other
   stylesheets read (--accent, --ink, --line, --muted, --surface) and the type,
   and restyles shared components. Bottle green on limestone, pine ink rules,
   clay for "now" and drafts, a condensed display face for titles and the
   clock, and monospaced figures for every set, load, pace and time.
   Fonts are self-hosted (CSP font-src 'self'), SIL Open Font License; the
   licence files sit next to them in public/fonts. */
@font-face { font-family:"Big Shoulders Display"; src:url("/assets/fonts/big-shoulders-display-800.woff2") format("woff2"); font-weight:800; font-style:normal; font-display:swap; }
@font-face { font-family:"Instrument Sans"; src:url("/assets/fonts/instrument-sans-var.woff2") format("woff2"); font-weight:400 700; font-style:normal; font-display:swap; }
@font-face { font-family:"JetBrains Mono"; src:url("/assets/fonts/jetbrains-mono-var.woff2") format("woff2"); font-weight:100 800; font-style:normal; font-display:swap; }
:root {
  --ground:#EFEDE6; --surface:#F8F7F2; --ink:#10201A; --muted:#55635C;
  --line:#D5D3C9; --line-strong:#B9B6AA; --accent:#0E4A36; --accent-hover:#0A3326;
  --accent-soft:#E4EDE6; --clay:#B4492A; --clay-text:#A8442A; --on-accent:#F4F2EA;
  --night:#08130E; --night-line:#1F2E27; --night-muted:#93A39A; --signal:#C9F27A;
  --font-display:"Big Shoulders Display","Kinetta Display","Arial Narrow","Roboto Condensed","Helvetica Neue",Arial,sans-serif;
  --font-text:"Instrument Sans","Kinetta Text",ui-sans-serif,-apple-system,"Segoe UI",sans-serif;
  --font-num:"JetBrains Mono","Kinetta Mono",ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  color-scheme:light; background:var(--ground); color:var(--ink); font-family:var(--font-text);
}
body { background:var(--ground); color:var(--ink); font-family:var(--font-text); }
p { color:var(--ink); }
.muted, label { color:var(--muted); }
a { color:var(--accent); }
h1, .intro h1, .narrow h1 { font-family:var(--font-display); font-weight:800; text-transform:uppercase; letter-spacing:.2px; line-height:.95; color:var(--ink); }
h2 { font-family:var(--font-display); font-weight:800; letter-spacing:.2px; line-height:1; color:var(--ink); }
h3, h4 { color:var(--ink); }
.eyebrow { font-family:var(--font-num); font-size:11px; font-weight:500; letter-spacing:.8px; color:var(--clay-text); text-transform:uppercase; }

/* Header and brand */
header { background:var(--ground); border-bottom:1px solid var(--line); }
.brand { font-family:var(--font-display); font-weight:800; color:var(--accent); letter-spacing:.4px; }
.brand span { font-family:var(--font-num); font-weight:500; color:var(--ink); letter-spacing:1.2px; }
header .badge { font-family:var(--font-num); }

/* Cards, rules and surfaces: hairlines, no shadows */
.card { background:var(--surface); border:1px solid var(--line); border-radius:14px; box-shadow:none; }
.divider, details { border-color:var(--line); }
summary { color:var(--accent); }
.exercise, .entry, .proposal-card { background:var(--surface); border-color:var(--line); border-radius:12px; }

/* Actions */
button { background:var(--accent); color:var(--on-accent); border-radius:10px; font-weight:600; }
/* Hover only where a pointer hovers: on a phone a tapped button keeps :hover,
   which painted a tapped set row solid green over its dark text. */
@media (hover:hover) { button:hover { background:var(--accent-hover); } }
.quiet { background:transparent; color:var(--ink); border:1px solid var(--ink); }
.quiet:hover { background:var(--accent-soft); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline:3px solid var(--clay); outline-offset:2px; }
input, textarea, select { background:#fff; color:var(--ink); border:1px solid var(--line-strong); border-radius:10px; }
input:focus, textarea:focus, select:focus { outline:2px solid var(--accent); outline-offset:1px; }
input[type=checkbox], input[type=radio] { accent-color:var(--accent); }

/* Tags: drafts are clay outline, approved/confirmed solid green */
.badge { font-family:var(--font-num); font-size:11px; letter-spacing:.4px; color:var(--ink); background:transparent; border:1px solid var(--line-strong); border-radius:6px; }
.warning { color:#6B4A12; background:#FBF1DA; border-color:#E3C98A; }
.notice { background:var(--accent-soft); color:var(--accent); border-color:#9FB8A8; }

/* Numbers line up like a logbook */
.set-chip, .draft-dose, .part-target, .part-index, .strip-date, .cal-date, .rest-text, .timer-format,
.timer-move-dose, .timer-rounds, .week-summary-row, .session-tracker p, time { font-family:var(--font-num); font-variant-numeric:tabular-nums; }

/* Navigation */
#mainNav a { color:var(--muted); }
#mainNav a[aria-current=page] { color:var(--accent); }
@media (min-width:761px) {
  #mainNav { background:transparent; border:1px solid var(--ink); border-radius:10px; padding:0; gap:0; overflow:hidden; }
  #mainNav a { border-radius:0; }
  #mainNav a[aria-current=page] { background:var(--ink); color:var(--on-accent); box-shadow:none; }
}

/* Coach chat: athlete messages in green, coach replies as plain text */
.chat-bubble { background:transparent; border:0; box-shadow:none; padding-left:0; padding-right:0; }
.chat-bubble > strong { font-family:var(--font-num); font-weight:500; color:var(--clay-text); letter-spacing:.6px; }
.chat-bubble.athlete { background:var(--accent); padding:11px 14px; border-radius:16px 16px 4px 16px; }
.chat-bubble.athlete strong, .chat-bubble.athlete p { color:var(--on-accent); }
.coach-quick-actions button, .chat-suggestions button, .program-chat-shortcuts button { background:var(--surface); color:var(--ink); border:1px solid var(--line-strong); font-weight:500; }
.coach-quick-actions button:hover, .chat-suggestions button:hover, .program-chat-shortcuts button:hover { background:var(--accent-soft); }
.chat-composer { background:var(--surface); border-top-color:var(--line); }
.coach-notebook { background:var(--surface); border:1px solid var(--ink); border-radius:14px; }

/* Session parts: numbered rows, the current part outlined in ink */
.part-card { border-radius:12px; }
.part-card.is-current { border-color:var(--ink); box-shadow:0 0 0 1px var(--ink) inset; }
.part-index { background:transparent; color:var(--muted); border-radius:0; font-weight:700; font-size:14px; place-items:start center; }
.is-current .part-index { color:var(--clay-text); }
.is-done .part-index { background:transparent; color:var(--accent); }
.is-done .part-text strong { text-decoration:line-through; text-decoration-color:var(--line-strong); }
.part-here { background:var(--clay); color:#fff; border-radius:6px; font-family:var(--font-num); font-weight:500; letter-spacing:.4px; }
.part-status { color:var(--accent); }
.set-chip { background:#fff; border-color:var(--line); border-radius:8px; }
.set-chip.done { background:var(--accent); border-color:var(--accent); color:var(--on-accent); }
.session-tracker { background:var(--surface); }
.agenda-item[aria-current=true] { border-color:var(--ink); box-shadow:0 0 0 1px var(--ink) inset; }

/* Plan: blocks and the week strip */
.block-card { background:var(--accent-soft); }
.block-card.is-current { background:var(--surface); border-color:var(--ink); }
.block-card-weeks { font-family:var(--font-num); font-weight:500; }
.block-now-card { background:var(--surface); border:1px solid var(--line); }
.strip-day[aria-pressed=true] { background:var(--ink); color:var(--on-accent); }
.strip-day[aria-pressed=true] .mark.session { background:var(--signal); }
.strip-day[aria-pressed=true] .mark.plan { border-color:var(--signal); }
.strip-day.is-today .strip-date { color:var(--clay-text); }
.mark { border-radius:1px; width:14px; height:4px; }

/* Rest bar and timer: training mode, readable across a room, a track or a pool deck */
.rest-bar { background:var(--night); color:#EDEFE6; }
.workout-timer { background:var(--night); color:#EDEFE6; }
.workout-timer .timer-close { border-color:#3A4C43; }
.timer-format { color:var(--signal); letter-spacing:.6px; text-transform:uppercase; }
.timer-big { font-family:var(--font-display); font-weight:800; letter-spacing:-.01em; color:#F4F2EA; }
.timer-big .clock-digit { display:inline-block; width:.5em; text-align:center; }
.timer-caption { color:var(--night-muted); }
.timer-controls .timer-primary { color:var(--night); background:var(--signal); border-color:var(--signal); font-weight:700; }
.timer-move.is-current { border-color:var(--signal); }
.timer-move-dose { color:var(--signal); font-family:var(--font-num); }
.workout-timer.is-done .timer-big { color:var(--signal); }
.workout-timer.is-rest { background:#1A1405; }
.workout-timer.is-rest .timer-big, .workout-timer.is-rest .timer-caption { color:#F2C14E; }

footer { font-family:var(--font-num); font-size:11px; color:var(--muted); }

@media (max-width:760px), (max-width:960px) and (max-height:500px) {
  header .brand { background:var(--ink); color:var(--on-accent); border-radius:8px; font-size:22px; }
  body[data-view=today] .pane-tabs { background:transparent; border:1px solid var(--ink); border-radius:10px; padding:0; gap:0; overflow:hidden; }
  .pane-tab { border-radius:0; color:var(--ink); }
  .pane-tab:hover { background:var(--accent-soft); }
  .pane-tab[aria-selected=true] { background:var(--ink); color:var(--on-accent); box-shadow:none; }
  .pane-dot { background:var(--clay); }
  #mainNav { background:var(--ground); border-top:1px solid var(--ink); backdrop-filter:none; }
  #mainNav a { color:var(--muted); }
  #mainNav a[aria-current=page] { color:var(--accent); background:transparent; box-shadow:inset 0 3px 0 var(--accent); border-radius:0; }
  #mainNav a[aria-current=page] .icon { background:transparent; padding:2px 0; }
}
#coach .chat-composer form > button[type=submit] { border-radius:10px; }
#coach .chat-composer textarea { border-radius:10px; }

/* ---------- Design parity (the Kinetta sketch) ---------- */
/* Header: the KINETTA wordmark with today's date and program week beneath. */
.brand { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:3px; line-height:1; text-decoration:none; }
.brand .brand-word { font-family:var(--font-display); font-weight:800; font-size:28px; letter-spacing:.5px; color:var(--accent); }
.brand .brand-date { font-family:var(--font-num); font-size:11px; font-weight:500; letter-spacing:.3px; color:var(--muted); }
.brand .brand-date:empty { display:none; }

/* Readiness strip: three ruled cells of figures. */
.readiness-strip { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border-top:1px solid var(--line); border-bottom:1px solid var(--line); margin:0 0 12px; }
.readiness-strip[hidden] { display:none; }
.readiness-cell { padding:8px 12px; border-right:1px solid var(--line); min-width:0; }
.readiness-cell:last-child { border-right:0; }
.readiness-label { display:block; font-size:11px; letter-spacing:.6px; color:var(--muted); }
.readiness-value { font-family:var(--font-num); font-weight:700; font-size:18px; color:var(--ink); white-space:nowrap; }
.readiness-extra { font-size:12px; font-weight:500; color:var(--accent); }
.readiness-cell:last-child .readiness-extra { color:var(--muted); font-size:inherit; font-weight:700; }

/* Long prescriptions read as text; only short figures use the logbook face. */
.draft-dose, .part-target, .part-movements { font-family:var(--font-text); font-variant-numeric:tabular-nums; }

/* Session: the title as a headline, the date as a mono eyebrow. */
#sessionContent > h3:first-child { font-family:var(--font-display); font-weight:800; text-transform:uppercase; font-size:40px; line-height:.92; letter-spacing:.2px; margin:4px 0 8px; overflow-wrap:anywhere; }
.session-date { font-family:var(--font-num); font-size:12px; letter-spacing:.4px; text-transform:uppercase; color:var(--clay-text); margin:0 0 8px; }
.session-tracker progress, .session-tracker progress::-webkit-progress-bar, .session-tracker progress::-webkit-progress-value, .session-tracker progress::-moz-progress-bar { border-radius:2px; }
.session-tracker progress { height:10px; }

/* Parts as numbered rows; the current one outlined in ink. */
.part-card { border-radius:0; border-width:0 0 1px; background:transparent; }
.part-card.is-current { border:1px solid var(--ink); border-radius:12px; background:var(--surface); box-shadow:none; }
.part-card.is-done { background:transparent; }
.part-index { font-family:var(--font-num); flex-basis:26px; }

/* Sets as logbook rows: set, target and the result on one ruled line. */
.set-chips { display:flex !important; flex-direction:column; gap:0 !important; grid-template-columns:none !important; }
.set-chip { flex-direction:row !important; align-items:center !important; justify-content:space-between; min-height:44px; padding:6px 4px !important; border-width:0 0 1px !important; border-radius:0 !important; background:transparent; font-size:14px; }
.set-chip.done { background:transparent; color:var(--ink); border-color:var(--line); }
.set-chip.done::after { content:"✓"; display:inline-grid; place-items:center; width:24px; height:24px; margin-left:8px; border-radius:6px; background:var(--accent); color:var(--on-accent); font-size:14px; }
.set-chip.attempt { background:#FBF1DA; }
/* A set row stays a ruled line when pressed or hovered: a light tint, text always readable. */
.set-chip:hover, .set-chip:active { background:var(--accent-soft); color:var(--ink); }

/* Head coach suggestions: an ink-ruled card with a clay label. */
.program-review-item { background:var(--surface); border:1px solid var(--ink); border-radius:14px; }

/* Plan: load bars under each day (Strength, Power, Endurance, Mobility). */
.load-bars { display:flex; flex-direction:column; align-items:center; gap:3px; margin-top:4px; min-height:29px; }
.load-bar { width:20px; height:5px; box-sizing:border-box; }
.load-bar.is-heavy { background:var(--accent); }
.load-bar.is-light { border:1px solid var(--accent); }
.load-bar.is-none { background:transparent; }
.load-rest { font-family:var(--font-num); font-size:10px; color:var(--muted); }
.strip-day[aria-pressed=true] .load-bar.is-heavy { background:var(--signal); }
.strip-day[aria-pressed=true] .load-bar.is-light { border-color:var(--signal); }
.strip-day[aria-pressed=true] .load-rest { color:var(--on-accent); }
.load-legend { display:flex; flex-wrap:wrap; gap:4px 12px; margin:8px 0 14px; font-size:11px; color:var(--muted); }
.load-legend .legend-heavy::before, .load-legend .legend-light::before { content:""; display:inline-block; width:14px; height:5px; margin-right:4px; vertical-align:middle; box-sizing:border-box; }
.load-legend .legend-heavy::before { background:var(--accent); }
.load-legend .legend-light::before { border:1px solid var(--accent); }

/* Timer: −15 and +15 either side of the main button. */
.timer-controls.has-nudge { display:grid; grid-template-columns:64px minmax(0,1fr) 64px; gap:10px; }
.timer-controls.has-nudge > :not(.timer-nudge):not(.timer-primary) { grid-column:1 / -1; }
.timer-controls .timer-nudge { min-height:64px; margin:0; font-family:var(--font-num); color:#EDEFE6; border:1px solid #3A4C43; background:transparent; }
.timer-controls.has-nudge .timer-primary { min-height:64px; margin:0; }

@media (max-width:760px), (max-width:960px) and (max-height:500px) {
  /* The wordmark replaces the square mark on phones. */
  header .brand { width:auto; height:auto; background:transparent; border-radius:0; padding:0; color:var(--accent); }
  header .brand .brand-word { font-size:23px; }
  header .brand .brand-date { font-size:10px; }
  header .app-title { display:none; }
  body:not([data-view=today]) header .brand { flex:1; }
  /* Flat, ruled sections instead of boxed cards. */
  main .card { background:transparent; border:0; border-radius:0; padding:14px 0; box-shadow:none; }
  main .card + .card { border-top:1px solid var(--line); }
  .narrow.card { background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:22px; }
  #sessionContent > h3:first-child { font-size:36px; }
}
@media (max-width:760px), (max-width:960px) and (max-height:500px) {
  header .brand .brand-word, header .brand .brand-date { display:block; }
}
.strip-day[aria-pressed=true].is-today .strip-date { color:var(--on-accent); text-decoration:underline; text-decoration-color:var(--clay); text-decoration-thickness:2px; text-underline-offset:3px; }
.timer-controls .timer-nudge { white-space:nowrap; padding:0; font-size:15px; }
.workout-timer button.quiet { background:transparent; color:#EDEFE6; border:1px solid #3A4C43; }
.workout-timer button.quiet:hover, .workout-timer button.quiet:focus-visible { background:#1F2E27; color:#F4F2EA; }
/* A session in chat reads like a ticket: ink outline, display title, dashed rules around the numbered parts. */
.session-plan-receipt { background:var(--surface); border:1px solid var(--ink); border-radius:14px; padding:14px 16px; }
.session-plan-receipt > strong:first-child { display:block; font-family:var(--font-display); font-weight:800; text-transform:uppercase; font-size:26px; line-height:.95; letter-spacing:.2px; margin-bottom:6px; }
.session-plan-receipt .draft-parts { border-top:1px dashed var(--line-strong); border-bottom:1px dashed var(--line-strong); padding:4px 0; }
.draft-split { font-size:14px; color:var(--accent); font-weight:600; }

/* Coach suggestion card in chat. "In review" is dashed clay so it never reads as
   settled; decided cards fold to one line. */
.session-plan-receipt.has-card { padding:0; border:0; background:transparent; }
.proposal-card { margin:12px 0 0; padding:14px 16px; border:1.5px solid var(--ink); border-radius:14px; background:var(--surface); color:var(--ink); }
.proposal-card.is-review { border:1.5px dashed var(--clay); }
.proposal-card.is-applied, .proposal-card.is-approved { border-color:var(--accent); }
.proposal-card.is-rejected { border-color:var(--line-strong); color:var(--muted); }
.proposal-head { display:flex; gap:10px; align-items:baseline; justify-content:space-between; }
.proposal-title { font-family:var(--font-display); font-weight:800; text-transform:uppercase; font-size:20px; line-height:1; letter-spacing:.2px; }
.proposal-state, .in-review-tag { flex:none; font-family:var(--font-num); font-size:11px; letter-spacing:.6px; text-transform:uppercase; padding:3px 8px; border-radius:6px; border:1px solid var(--line-strong); }
.is-review .proposal-state, .in-review-tag { color:var(--clay-text); border:1px dashed var(--clay); }
.is-applied .proposal-state, .is-approved .proposal-state { color:var(--on-accent); background:var(--accent); border-color:var(--accent); }
.proposal-meta { margin:6px 0 0; font-family:var(--font-num); font-size:12px; color:var(--muted); }
.proposal-note { margin:8px 0 0; font-size:15px; color:var(--ink); }
.proposal-card > .proposal-open { display:block; margin:10px 0 0; min-height:44px; background:transparent; border:0; padding:0; color:var(--accent); text-decoration:underline; font-weight:650; }
.proposal-day { margin:14px 0 2px; font-weight:750; }
.proposal-before { margin:0 0 4px; font-size:13px; color:var(--muted); }
.proposal-section { margin-top:10px; }
.proposal-section-label { display:block; font-family:var(--font-num); font-size:11px; letter-spacing:.6px; text-transform:uppercase; color:var(--muted); padding-bottom:2px; border-bottom:1px solid var(--line); }
.proposal-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 12px; padding:7px 0; border-bottom:1px solid var(--line); }
.proposal-name { font-weight:650; min-width:0; overflow-wrap:anywhere; }
.proposal-dose { font-family:var(--font-num); font-size:13px; text-align:right; }
.proposal-mark { grid-column:1 / -1; font-family:var(--font-num); font-size:11px; color:var(--clay-text); }
.proposal-row.is-new .proposal-name::before, .proposal-row.is-changed .proposal-name::before { content:"● "; color:var(--clay); }
.proposal-sub { padding-left:14px; border-left:2px solid var(--line); }
.proposal-sub .proposal-row { padding:5px 0; font-size:14px; }
.proposal-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.proposal-actions button, .proposal-card > button { margin:0; min-height:44px; }
.proposal-card > button { margin-top:12px; }
@media (max-width:420px) { .proposal-row { grid-template-columns:1fr; } .proposal-dose { text-align:left; } .proposal-actions button { flex:1 1 auto; } }
.is-in-review { outline:1.5px dashed var(--clay); outline-offset:3px; }

/* Coaching notes: standing instructions, in Profile and as a chat receipt. */
.coaching-notes-panel { margin-top:18px; }
.coaching-notes-list { list-style:none; padding:0; margin:8px 0 0; }
.coaching-note { display:flex; gap:10px; align-items:center; justify-content:space-between; padding:8px 0; border-bottom:1px solid var(--line); }
.coaching-note-text { margin:0; min-width:0; overflow-wrap:anywhere; }
.coaching-note-text.is-removed { text-decoration:line-through; color:var(--muted); }
.coaching-note button, .coaching-note-receipt button { margin:0; min-height:44px; flex:none; }
.coaching-note-receipt { margin-top:12px; padding:12px 14px; border:1px solid var(--accent); border-radius:12px; background:var(--accent-soft); display:grid; gap:6px; justify-items:start; }
.coaching-note-receipt strong { font-family:var(--font-num); font-size:11px; letter-spacing:.6px; text-transform:uppercase; color:var(--accent); }
.coach-memory-panel { margin-top:18px; }
.moment-receipt { margin-top:10px; display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; font-size:14px; color:var(--muted); }
.moment-receipt .moment-label { font-weight:650; color:var(--accent); }
.moment-receipt button { margin:0; min-height:44px; padding:4px 12px; font-size:13px; }

/* In-workout flow: the next part one big tap away; rest that is hard to miss. */
.next-part { display:block; width:100%; min-height:52px; margin:16px 0 4px; font-size:17px; }
.rest-bar.is-done { background:var(--accent); color:var(--on-accent); }
.rest-bar.is-done button { color:var(--on-accent); border-color:var(--on-accent); }
.rest-more { min-height:44px; }
.finish-offer { margin-top:12px; padding:12px 14px; border:1.5px solid var(--accent); border-radius:12px; background:var(--surface); display:grid; gap:4px; }
.finish-offer p { margin:0; }
.rest-bar button, .rest-bar button.quiet { background:transparent; color:#EDEFE6; border:1px solid rgba(237,239,230,.55); min-height:44px; }
/* Rest timer you can read from across the gym: big monospaced clock, the movement
   under it, buttons large enough to hit with chalky hands. */
.rest-bar { padding:14px 14px 14px 18px; gap:14px; border-radius:20px; }
.rest-bar > svg { display:none; }
.rest-text { display:flex; flex-direction:column; gap:2px; min-width:0; }
.rest-label { font-family:var(--font-text); font-size:14px; font-weight:600; opacity:.85; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rest-clock { font-family:var(--font-num); font-size:48px; font-weight:700; line-height:1.05; letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.rest-bar.is-done .rest-clock { font-family:var(--font-display); font-size:40px; letter-spacing:.01em; text-transform:uppercase; }
.rest-buttons { display:flex; flex-direction:column; gap:8px; flex:none; }
.rest-bar .rest-buttons button { min-height:52px; min-width:92px; font-size:16px; padding:8px 14px; }

/* ---------- Dashboard ---------- */
.dashboard { padding-top:4px; }
.dash-updated { font-family:var(--font-num); font-size:11px; letter-spacing:.4px; margin:0 0 10px; }
.dash-grid { display:grid; gap:14px; grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr)); }
.dash-card { background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:18px; min-width:0; }
.dash-eyebrow { margin:0 0 6px; font-family:var(--font-num); font-size:11px; letter-spacing:.9px; color:var(--clay-text); text-transform:uppercase; }
.dash-title { margin:0 0 10px; font-family:var(--font-display); font-weight:800; font-size:26px; line-height:1; letter-spacing:.2px; text-transform:uppercase; }
.dash-sub { margin:10px 0 0; color:var(--muted); font-size:14px; }
.dash-hero { grid-column:1 / -1; background:radial-gradient(120% 140% at 100% 0%,#173628 0%,var(--night) 60%); color:#EDEFE6; border-color:var(--night); position:relative; overflow:hidden; }
.dash-hero .dash-eyebrow { color:var(--signal); }
.dash-hero-title { margin:0 0 16px; font-family:var(--font-display); font-weight:800; font-size:clamp(32px,9vw,54px); line-height:.95; text-transform:uppercase; color:#F4F2EA; max-width:18ch; }
.dash-rings { display:flex; gap:18px; flex-wrap:wrap; }
.dash-ring { position:relative; width:96px; height:96px; }
.dash-ring svg { display:block; }
.dash-ring-track { fill:none; stroke:var(--night-line); stroke-width:9; }
.dash-ring-value { fill:none; stroke:var(--signal); stroke-width:9; stroke-linecap:round; transition:stroke-dasharray .8s ease; }
.dash-ring-middle { position:absolute; inset:0; display:grid; place-content:center; text-align:center; }
.dash-ring-middle strong { font-family:var(--font-num); font-size:20px; line-height:1.1; color:#F4F2EA; }
.dash-ring-middle span { font-size:10px; letter-spacing:.4px; text-transform:uppercase; color:var(--night-muted); }
.dash-hero .dash-today { margin:16px 0 0; font-weight:600; color:#F4F2EA; }
.dash-focus { margin:6px 0 0; color:var(--night-muted); font-size:14px; max-width:60ch; }
.dash-stats { grid-column:1 / -1; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.dash-stat { background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:14px 12px; display:grid; gap:2px; min-width:0; }
.dash-stat strong { font-family:var(--font-display); font-weight:800; font-size:38px; line-height:.95; color:var(--accent); }
.dash-stat span { font-size:13px; font-weight:600; }
.dash-stat small { font-size:11px; color:var(--muted); }
.dash-week { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:6px; }
.dash-day { display:grid; justify-items:center; gap:4px; padding:10px 0; border-radius:12px; background:#F1EFE8; border:1.5px solid transparent; }
.dash-day-name { font-family:var(--font-num); font-size:11px; color:var(--muted); }
.dash-day-num { font-family:var(--font-num); font-size:17px; }
.dash-day-mark { font-size:13px; height:18px; color:var(--muted); }
.dash-day.has-session { background:var(--accent-soft); }
.dash-day.is-trained { background:var(--accent); color:var(--on-accent); }
.dash-day.is-trained .dash-day-name, .dash-day.is-trained .dash-day-mark { color:var(--signal); }
.dash-day.dash-today { border-color:var(--clay); }
.dash-heat { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:4px; }
.dash-heat-week { display:grid; grid-template-rows:repeat(7,1fr); gap:4px; }
.dash-heat-day { display:block; aspect-ratio:1; border-radius:4px; background:#E5E2D8; }
.dash-heat-day.level-1 { background:#C7DCCB; } .dash-heat-day.level-2 { background:#7FB08E; }
.dash-heat-day.level-3 { background:#2F7553; } .dash-heat-day.level-4 { background:var(--accent); box-shadow:inset 0 0 0 2px var(--signal); }
.dash-heat-day.is-future { background:transparent; border:1px dashed var(--line); }
.dash-heat-legend { display:flex; align-items:center; gap:4px; justify-content:flex-end; margin-top:10px; font-size:11px; color:var(--muted); }
.dash-heat-legend .dash-heat-day { width:12px; }
.dash-bars { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:8px; align-items:end; height:150px; }
.dash-bar { height:100%; display:grid; grid-template-rows:auto 1fr auto; align-items:end; justify-items:center; gap:4px; }
.dash-bar-fill { width:100%; max-width:34px; border-radius:8px 8px 3px 3px; background:#B9CFBF; align-self:end; transition:height .6s ease; }
.dash-bar.is-current .dash-bar-fill { background:var(--accent); }
.dash-bar-value { font-family:var(--font-num); font-size:12px; }
.dash-bar-label { font-family:var(--font-num); font-size:10px; color:var(--muted); white-space:nowrap; }
.dash-lifts { display:grid; gap:12px; }
.dash-lift { padding:12px 0; border-top:1px solid var(--line); }
.dash-lift:first-child { border-top:0; padding-top:0; }
.dash-lift-head { display:flex; justify-content:space-between; gap:10px; align-items:baseline; }
.dash-lift-name { font-weight:600; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dash-trend { font-family:var(--font-num); font-size:12px; padding:2px 8px; border-radius:20px; background:#ECEAE2; white-space:nowrap; }
.dash-trend.is-up { background:var(--accent); color:var(--signal); } .dash-trend.is-down { background:#F6E3DC; color:var(--clay-text); }
.dash-lift-body { display:flex; align-items:flex-end; gap:6px; margin-top:4px; }
.dash-lift-value { font-family:var(--font-display); font-weight:800; font-size:44px; line-height:.9; }
.dash-lift-unit { font-family:var(--font-num); font-size:13px; color:var(--muted); margin-bottom:4px; }
.dash-spark { margin-left:auto; overflow:visible; }
.dash-spark-line { fill:none; stroke:var(--accent); stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.dash-spark-dot { fill:var(--accent); } .dash-spark-last { fill:var(--clay); }
.dash-recovery { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.dash-rec { display:grid; gap:1px; }
.dash-rec-label { font-family:var(--font-num); font-size:11px; letter-spacing:.5px; text-transform:uppercase; color:var(--muted); }
.dash-rec-value { font-family:var(--font-display); font-weight:800; font-size:34px; line-height:1; }
.dash-rec-unit { font-family:var(--font-num); font-size:12px; color:var(--muted); }
.dash-rec small { font-size:11px; } .dash-rec .is-good { color:var(--accent); } .dash-rec .is-low { color:var(--clay-text); }
.dash-sleep { width:100%; height:auto; margin-top:14px; }
.dash-sleep-bar { fill:#7FB08E; } .dash-sleep-short { fill:#E2A792; }
.dash-sleep-base { stroke:var(--ink); stroke-width:1; stroke-dasharray:3 3; opacity:.5; }
.dash-axis { font-family:var(--font-num); font-size:9px; fill:var(--muted); }
.dash-event { background:var(--accent); color:var(--on-accent); border-color:var(--accent); }
.dash-event .dash-eyebrow { color:var(--signal); } .dash-event .dash-sub { color:#C8D6CE; }
.dash-countdown { display:flex; align-items:baseline; gap:8px; margin:2px 0 8px; }
.dash-countdown strong { font-family:var(--font-display); font-weight:800; font-size:84px; line-height:.85; color:var(--signal); }
.dash-countdown span { font-family:var(--font-num); text-transform:uppercase; letter-spacing:.6px; }
.dash-wins { list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.dash-wins li { display:flex; gap:10px; align-items:flex-start; }
.dash-win-star { color:var(--clay); font-size:16px; line-height:1.4; }
.dash-how { margin-top:16px; }
@media (max-width:520px) {
  .dash-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dash-card { padding:16px; border-radius:16px; }
  .dash-rings { gap:12px; } .dash-ring { width:88px; height:88px; } .dash-ring svg { width:88px; height:88px; }
  .dash-bars { gap:5px; height:130px; }
}
@media (prefers-reduced-motion:reduce) { .dash-ring-value, .dash-bar-fill { transition:none; } }

/* ---------- More: one organised page ---------- */
.more-groups { display:grid; gap:10px; grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); }
.more-group { background:var(--surface); border:1px solid var(--line); border-radius:16px; overflow:hidden; }
.more-group-head { display:grid; gap:2px; width:100%; text-align:left; padding:14px 16px; margin:0; background:transparent; color:var(--ink); border:0; border-bottom:1px solid var(--line); border-radius:0; }
.more-group-head strong { font-family:var(--font-display); font-weight:800; font-size:22px; text-transform:uppercase; letter-spacing:.2px; }
.more-group-head span { font-size:13px; color:var(--muted); font-weight:400; }
.more-links { display:grid; }
.more-link { display:flex; justify-content:space-between; align-items:center; width:100%; min-height:48px; margin:0; padding:0 16px; text-align:left; background:transparent; color:var(--ink); border:0; border-top:1px solid #E7E4DB; border-radius:0; font-weight:500; }
.more-link:first-child { border-top:0; }
.more-link::after { content:"›" / ""; color:var(--muted); font-size:20px; }
.more-link:active, .more-group-head:active { background:var(--accent-soft); }
.more-section-title { margin:18px 0 4px; font-family:var(--font-num); font-size:11px; letter-spacing:.9px; color:var(--clay-text); }
.more-flash { animation:more-flash 1.4s ease; }
@keyframes more-flash { 0%,40% { box-shadow:0 0 0 3px var(--signal); border-radius:12px; } 100% { box-shadow:0 0 0 0 transparent; } }
/* Jumping to a panel in More leaves it clear of the sticky header. */
#viewContent [id] { scroll-margin-top:calc(var(--app-header-height,64px) + 16px); }

/* ---------- Supersets and circuits: paired movements, round by round ---------- */
.pair-letter { display:inline-grid; place-items:center; min-width:30px; height:24px; padding:0 6px; border-radius:7px; background:var(--accent); color:var(--signal); font-family:var(--font-num); font-size:12px; font-weight:700; flex:none; }
/* On the card: one line per movement, joined by a bracket on the left. */
.pair-lines { display:grid; gap:6px; margin:8px 0 4px; padding-left:12px; border-left:3px solid var(--accent); }
.pair-line { display:grid; grid-template-columns:auto minmax(0,1fr); column-gap:8px; align-items:center; }
.pair-line .pair-name { font-weight:600; color:var(--ink); min-width:0; }
.pair-line .pair-dose { grid-column:2; font-family:var(--font-num); font-size:13px; color:var(--muted); }
.round-tracker { display:grid; gap:6px; padding:0 14px 14px; }
.round-row { display:grid; grid-template-columns:72px minmax(0,1fr); align-items:center; gap:8px; width:100%; min-height:48px; margin:0; padding:6px 10px; text-align:left; background:#fff; color:var(--ink); border:1px solid var(--line); border-radius:12px; font-weight:500; }
.round-row.is-started { border-color:var(--accent); }
.round-row.is-done { background:var(--accent-soft); border-color:var(--accent-soft); }
.round-name { font-family:var(--font-num); font-size:12px; letter-spacing:.3px; text-transform:uppercase; color:var(--muted); }
.round-cells { display:flex; flex-wrap:wrap; gap:6px; }
.round-cell { display:inline-flex; align-items:center; gap:6px; font-family:var(--font-num); font-size:13px; }
.round-cell .pair-letter { background:#E5E2D8; color:var(--muted); min-width:28px; height:22px; }
.round-cell.is-done .pair-letter { background:var(--accent); color:var(--signal); }
.round-cell.is-skipped .round-value { text-decoration:line-through; color:var(--muted); }
.round-value { white-space:nowrap; }
/* In the sheet: the pairing at the top, then one block per round. */
.pair-moves { list-style:none; margin:0 0 8px; padding:4px 0 4px 12px; border-left:3px solid var(--accent); display:grid; gap:8px; }
.pair-move { display:flex; align-items:center; gap:10px; }
.pair-text { display:grid; } .pair-text strong { font-size:16px; } .pair-dose { font-family:var(--font-num); font-size:13px; color:var(--muted); }
.pair-how { margin:4px 0 10px; }
.pair-same { margin:10px 0; } .pair-same > summary { font-weight:600; min-height:44px; display:flex; align-items:center; }
.pair-round { margin:14px 0 4px; padding:10px 12px 4px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.pair-round.is-started { border-color:var(--accent); }
.pair-round.is-done { background:var(--accent-soft); border-color:var(--accent-soft); }
.pair-round-title { margin:0 0 6px; font-family:var(--font-num); font-size:12px; letter-spacing:.5px; text-transform:uppercase; color:var(--muted); }
.pair-round .entry { margin:6px 0; }
.entry-label { display:inline-block; margin-right:8px; font-weight:700; color:var(--accent); }
/* Plan: what the coach learned from recent weeks. */
.program-learning { margin:12px 0 4px; padding:10px 14px; border:1px solid var(--accent); border-radius:12px; background:var(--accent-soft); }
.program-learning > summary { font-weight:700; min-height:40px; display:flex; align-items:center; }
.program-learning-reasons { margin:6px 0 8px; padding-left:18px; display:grid; gap:4px; }
/* Dashboard: the coach's read of recent weeks. */
.dash-verdict { display:inline-block; margin:0 0 10px; padding:4px 12px; border-radius:20px; font-family:var(--font-num); font-size:13px; letter-spacing:.4px; text-transform:uppercase; background:#ECEAE2; }
.dash-verdict-progress { background:var(--accent); color:var(--signal); }
.dash-verdict-back_off { background:#F6E3DC; color:var(--clay-text); }
.dash-reasons { margin:0 0 12px; padding-left:18px; display:grid; gap:6px; font-size:14px; }
.dash-fitness { display:grid; grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); gap:10px; border-top:1px solid var(--line); padding-top:12px; }
.dash-fit { display:grid; gap:1px; } .dash-fit-value { font-family:var(--font-display); font-weight:800; font-size:26px; line-height:1; }

/* Plan: movements as a compact list of names and doses; details open on tap. */
.weekly-movement { margin:0 !important; padding:0 4px !important; background:transparent !important; border:0 !important; border-bottom:1px solid var(--line) !important; border-radius:0 !important; }
.weekly-movement > summary { min-height:44px; display:flex; align-items:center; gap:8px; font-weight:600; list-style:none; cursor:pointer; padding:6px 0; }
.weekly-movement > summary::-webkit-details-marker { display:none; }
.weekly-movement > summary::after { content:"+" / ""; margin-left:auto; color:var(--muted); font-weight:400; font-size:18px; }
.weekly-movement[open] > summary::after { content:"−" / ""; }
.weekly-movement[open] { padding-bottom:10px !important; }
.weekly-movement > p, .weekly-movement > .movement-setup { margin:4px 0 6px; color:var(--muted); font-size:14px; }
.program-section .weekly-movement:first-of-type, .training-block .weekly-movement:first-of-type { border-top:1px solid var(--line) !important; }
.fold-about { margin:4px 0 8px; }
.fold-about > summary { min-height:36px; display:flex; align-items:center; font-size:13px; color:var(--accent); font-weight:600; cursor:pointer; }
.fold-about > p { margin:4px 0; color:var(--muted); font-size:14px; }
/* The five coaching answers: the reason on one line, the rest on tap. */
.why-block { margin:4px 0 8px; }
.why-block > summary { cursor:pointer; color:var(--muted); font-size:14px; line-height:1.4; }
.why-list { display:grid; grid-template-columns:auto minmax(0,1fr); gap:4px 10px; margin:8px 0 0; font-size:14px; }
.why-list dt { font-family:var(--font-num); font-size:11px; letter-spacing:.4px; text-transform:uppercase; color:var(--clay-text); padding-top:2px; }
.why-list dd { margin:0; }
/* Gymnastics: each skill on a five-step ladder. */
.gym-ladder { display:flex; gap:4px; margin:6px 0 2px; }
.gym-step { flex:1; height:6px; border-radius:3px; background:#E5E2D8; }
.gym-step.is-on { background:var(--accent); }
.stage-proficient .gym-step.is-on { background:var(--accent); box-shadow:inset 0 0 0 1px var(--signal); }
/* Injury history */
.injury-panel { margin:16px 0; }
.injury-item { border:1px solid var(--line); border-radius:12px; padding:0 12px; margin:8px 0; background:var(--surface); }
.injury-item > summary { min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:10px; cursor:pointer; }
.injury-item.status-acute { border-left:4px solid var(--clay); } .injury-item.status-rehab { border-left:4px solid #E2A792; }
.injury-item.status-managed { border-left:4px solid var(--accent); } .injury-item.status-resolved { opacity:.75; }
.injury-status { font-family:var(--font-num); font-size:12px; color:var(--muted); white-space:nowrap; }
.injury-log { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) auto; gap:8px; align-items:end; margin:8px 0; }
.injury-updates { margin:6px 0 10px; padding-left:18px; font-size:13px; color:var(--muted); }
.injury-form { display:grid; gap:6px; margin:8px 0 12px; }
@media (max-width:520px) { .injury-log { grid-template-columns:1fr; } }
/* A coach proposal in Plan: what changes, then Approve or Decline. */
.plan-proposal { margin:0 0 16px; padding:16px; border:1.5px dashed var(--clay); border-radius:14px; background:var(--surface); }
.plan-proposal-head { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.plan-proposal-head strong { font-size:17px; }
.plan-proposal p { margin:6px 0; }
.plan-proposal-days { display:grid; gap:8px; margin:10px 0 4px; }
.plan-proposal-day { display:grid; gap:2px; text-align:left; width:100%; min-height:44px; margin:0; padding:10px 12px; border:1px solid var(--line-strong); border-radius:10px; background:transparent; color:var(--ink); font-weight:400; }
.plan-proposal-day strong { font-size:14px; }
.plan-proposal-day span { overflow-wrap:anywhere; }
.plan-proposal-now { color:var(--muted); font-size:13px; }
.plan-proposal .actions { margin-top:12px; }
.strip-day.is-proposed { outline:1.5px dashed var(--clay); outline-offset:-3px; }
.proposal-card.is-notice .proposal-actions button { width:100%; }

/* ---------- Wide screens: use the space (the athlete's own app; the coach portal and desk lay out their own) ---------- */
@media (min-width:761px) {
  body:not(.desk):not(.acting) main { max-width:1360px; }
  /* One row: the screen's name on the left, the tabs on the right. The tab names the screen, so the
     brand label and the tagline above every screen go. */
  #workspace { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:24px; align-items:center; }
  #workspace > * { grid-column:1 / -1; }
  #workspace > .intro { grid-column:1; margin:0 0 14px; padding:0; }
  #workspace > #mainNav { grid-column:2; margin:0 0 14px; }
  #workspace > .intro .eyebrow, #workspace > .intro p:not(.eyebrow) { display:none; }
  #workspace > .intro h1 { font-size:34px; margin:0; }
  /* Notices are a toast at the top right, not a bar pushing the screen down. */
  #notice:not(:empty) { position:fixed; z-index:40; top:16px; right:24px; left:auto; max-width:420px; margin:0; box-shadow:0 8px 24px #10201A26; cursor:pointer; }
}
@media (min-width:1100px) {
  /* Coach: the conversation and today's session side by side; no Chat/Session switch needed. */
  body:not(.acting) #viewContent[data-active-view=today] { grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); align-items:start; }
  body:not(.acting) #viewContent[data-active-view=today][data-coach-pane] > #proposal,
  body:not(.acting) #viewContent[data-active-view=today][data-coach-pane] > #coach { display:block; }
  body:not(.acting)[data-view=today] header .pane-tabs { display:none !important; }
  body:not(.acting) #viewContent[data-active-view=today] > #coach { position:sticky; top:16px; }
  body:not(.acting) #coach .chat-messages { max-height:calc(100dvh - 340px); min-height:320px; }
}
/* The coach's replies read as text, not bubbles: they use the conversation's full width. */
#coach .chat-bubble:not(.athlete), .chat-bubble:not(.athlete) { max-width:100%; }
@media (min-width:761px) {
  /* The header lines up with the page under it. */
  body:not(.desk):not(.acting) header { padding-inline:max(24px,calc((100vw - 1312px) / 2)); }
}

/* ---------- Design follow-ups: Plan, Logbook, Dashboard on each screen size ---------- */
.plan-why strong { color:var(--ink); font-weight:650; }
/* Phones: the day’s tools are one even column, not a ragged stack. */
@media (max-width:760px){
  .plan-day-tools { display:grid; grid-template-columns:minmax(0,1fr); }
  .plan-day-tools > button { width:100%; padding-inline:10px; line-height:1.2; }
}
/* Dashboard: cards keep their own height instead of stretching to the tallest in the row. */
.dash-grid { align-items:start; }
@media (min-width:1100px){
  /* Logbook: the month beside the list, at a readable size. */
  body:not(.acting) .logbook { display:grid; grid-template-columns:minmax(0,1fr) 380px; grid-template-rows:auto 1fr; column-gap:32px; }
  body:not(.acting) .logbook > .logbook-actions { grid-area:1 / 1; }
  body:not(.acting) .logbook > .logbook-main { grid-area:2 / 1; min-width:0; }
  body:not(.acting) .logbook > .logbook-side { grid-area:1 / 2 / 3 / 3; align-self:start; position:sticky; top:calc(var(--app-header-height,60px) + 16px); }
  body:not(.acting) .logbook-side .cal-day { min-height:40px; }
  /* Plan: the day on the left, what the plan is about on the right. */
  body:not(.acting) #programmingContent { display:grid; grid-template-columns:minmax(0,1fr) 380px; grid-template-rows:repeat(11,auto) 1fr; column-gap:32px; }
  body:not(.acting) #programmingContent > * { grid-column:1; min-width:0; }
  body:not(.acting) #programmingContent > .program-more-group { grid-column:2; grid-row:1 / span 12; align-self:start; margin-top:0; border-top:0; padding-top:0; }
  body:not(.acting) #programmingContent > .program-more-group .block-cards { display:grid; grid-template-columns:1fr 1fr; overflow:visible; }
}
/* A set saved at the tap: shown as saving until the server answers. */
.entry.is-saving .set-done { opacity:.75; }

.watch-station.has-time { grid-template-columns: minmax(0,1fr) 44px 48px 44px; }
/* A run read from the recording: the count against the plan, and the warm-up and cool-down as done. */
.watch-compared { margin:4px 0 8px; font-weight:650; }
.watch-part { margin:4px 0; font-size:14px; color:var(--muted); font-variant-numeric:tabular-nums; }

/* ---------- The shape of a run (2026-11-26): headline, ribbon, three numbers, rep ladder ---------- */
.run-headline { margin:2px 0 6px; font-family:var(--font-display); font-weight:800; font-size:44px; line-height:.92; letter-spacing:.3px; text-transform:uppercase; color:var(--ink); }
.run-ribbon { display:block; width:100%; height:auto; margin:10px 0 4px; overflow:visible; }
.run-ribbon-rest { fill:var(--accent-soft); }
.run-ribbon-rep { fill:var(--accent); }
.run-ribbon-heart { fill:none; stroke:var(--clay); stroke-width:1.6; stroke-linejoin:round; stroke-linecap:round; }
.run-ribbon-label { font-family:var(--font-num); font-size:9px; fill:var(--muted); }
.run-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:10px 0 6px; padding:10px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.run-stat { display:flex; flex-direction:column; gap:3px; min-width:0; }
.run-stat-value { font-family:var(--font-num); font-size:17px; font-weight:600; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.run-stat-label { font-size:12px; color:var(--muted); line-height:1.2; }
.run-ladder { margin:8px 0 6px; }
.run-rung { display:grid; grid-template-columns:22px minmax(0,1fr) 40px 44px 34px; align-items:center; gap:8px; min-height:34px; border-top:1px solid var(--line); font-size:14px; font-variant-numeric:tabular-nums; }
.run-rung > span:nth-child(n+3) { text-align:right; font-family:var(--font-num); font-size:13px; }
.run-rung.header { min-height:26px; border-top:0; font-size:12px; color:var(--muted); font-weight:650; }
.run-rung.header > span:nth-child(n+3) { font-family:var(--font-text); font-size:12px; }
.run-rung-n { font-family:var(--font-num); color:var(--muted); }
.run-rung-bar { height:8px; border-radius:4px; background:var(--line); overflow:hidden; }
.run-rung-fill { display:block; height:100%; border-radius:4px; background:var(--accent); }
.run-rung.is-best .run-rung-fill { background:var(--clay); }
.run-rung.is-best .run-rung-n { color:var(--clay-text); font-weight:700; }
.run-share-open { margin:10px 0 4px; }

/* The share sheet: a preview of the image, a heart-rate switch, and the phone's own share sheet. */
.run-share { position:fixed; inset:0; z-index:90; display:flex; align-items:flex-end; justify-content:center; padding:16px; background:rgba(8,19,14,.72); }
.run-share-panel { width:100%; max-width:420px; max-height:calc(100dvh - 32px); overflow:auto; padding:16px; border-radius:14px; background:var(--surface); color:var(--ink); }
.run-share-panel h3 { margin:0 0 10px; }
.run-share-preview { display:block; width:100%; aspect-ratio:1080/1350; border-radius:8px; background:var(--night); object-fit:contain; }
.run-share-toggle { margin:12px 0 4px; }
@media (min-width:700px) { .run-share { align-items:center; } }
