@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("barlow-condensed.woff2") format("woff2");
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("manrope.woff2") format("woff2");
}
:root {
  color-scheme: light;
  --bg: #fbfcff;
  --surface: #ffffff;
  --ink: #111b45;
  --muted: #485886;
  --line: #c4cfed;
  --accent: #2443c2;
  --soft: #e9efff;
  --independent: #805045;
  --independent-soft: #f4ebe5;
  --cardio: #536711;
  --cardio-soft: #eef4ce;
  --danger: #9c392d;
  --on-primary: #fff;
  --hero: #223bbf;
  --hero-subtle: #e0e7ff;
  --hero-tile: #3c53c8;
  --lime: #d8f763;
  --on-lime: #101c60;
  --gutter-left: max(16px, env(safe-area-inset-left));
  --gutter-right: max(16px, env(safe-area-inset-right));
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #101831;
    --surface: #182344;
    --ink: #f2f5ff;
    --muted: #bfc9e9;
    --line: #43527a;
    --accent: #c0ccff;
    --soft: #25365e;
    --independent: #f3c2ad;
    --independent-soft: #4b302f;
    --cardio: #dfec9b;
    --cardio-soft: #384218;
    --danger: #ffb8ac;
    --on-primary: #10205a;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; }
::selection { background: var(--soft); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; min-height: 44px; border: 0; background: none; color: inherit; }
button:disabled { opacity: .62; cursor: wait; }
:is(button, input, textarea, select, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
h1, h2, h3, h4 { line-height: 1.2; }
h2 { font: 800 clamp(27px, 7vw, 34px)/1 var(--display); text-transform: uppercase; }
h3 { font-size: 17px; letter-spacing: -.015em; }
h4 { font-size: 13px; margin: 17px 0 8px; }
svg { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.shell { max-width: 800px; margin: auto; padding: 0 var(--gutter-right) calc(96px + env(safe-area-inset-bottom)) var(--gutter-left); }
.brand, .sync, .week-band {
  margin-inline: calc(0px - var(--gutter-left)) calc(0px - var(--gutter-right));
  padding-inline: var(--gutter-left) var(--gutter-right);
  background: var(--hero);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; padding-top: calc(11px + env(safe-area-inset-top)); padding-bottom: 10px; }
.mark { width: 44px; height: 44px; border-radius: 4px; flex: none; }
.brand h1 { font: 800 clamp(24px, 7.1vw, 34px)/.95 var(--display); text-transform: uppercase; letter-spacing: .023em; }
.brand .quiet { margin-left: auto; white-space: nowrap; }
:is(.brand, .sync) .quiet { color: #fff; border-radius: 5px; }
:is(.brand, .sync) .quiet:hover { background: var(--hero-tile); }
:is(.brand, .sync, .week-band) :focus-visible { outline-color: var(--lime); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.login { max-width: 440px; margin: 42px auto 0; padding: clamp(18px, 6vw, 28px); }
.resume { max-width: 440px; margin: 42px auto 0; }
.resume button { margin-top: 10px; }
.login p:not(:empty) { color: var(--muted); margin-top: 10px; }
label { display: block; margin: 13px 0 5px; font-weight: 650; font-size: 13px; }
input, textarea, select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); padding: 9px 11px; font-size: 16px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
textarea { min-height: 104px; resize: vertical; }
select {
  appearance: none;
  min-width: 0;
  padding-right: 27px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px;
}
.primary { background: var(--accent); color: var(--on-primary); border-radius: 6px; font-weight: 750; width: 100%; padding: 10px; margin-top: 11px; }
.quiet { color: var(--accent); font-size: 13px; font-weight: 700; padding: 4px 9px; }
.action { border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; font-size: 13px; font-weight: 680; white-space: nowrap; }
:is(.action, .quiet, .workout, nav button):hover { background-color: var(--soft); }
.danger { color: var(--danger); }
.sync { display: flex; justify-content: space-between; align-items: center; gap: 5px; padding-block: 2px; color: var(--hero-subtle); font-size: 11px; line-height: 1.45; }
.sync small { display: block; margin-top: 2px; font-size: inherit; }
.week-summary { margin-bottom: 16px; }
.week-band { padding-block: 11px 14px; }
.week-band h2 { font-size: clamp(48px, 13vw, 66px); line-height: .89; }
.week-band p { margin-top: 6px; color: var(--hero-subtle); font-size: 13px; font-weight: 650; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 13px 0 0; padding: 0; list-style: none; }
.week-day { display: grid; justify-items: center; align-content: center; gap: 2px; width: 100%; min-height: 50px; padding: 3px 0; background: var(--hero-tile); color: #fff; font-size: 10px; }
.week-day strong { font: 800 23px/.9 var(--display); }
.week-day.recorded { background: var(--lime); color: var(--on-lime); }
.week-day.recorded:hover { background: #ebff9d; }
.week-day[aria-current=date] { box-shadow: inset 0 -3px var(--lime); }
.week-day.recorded[aria-current=date] { box-shadow: inset 0 -3px var(--on-lime); }
.week-day[aria-pressed=true] { outline: 2px solid var(--lime); outline-offset: 1px; }
.week-day[aria-pressed=true]:focus-visible { outline-color: #fff; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.week-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 2px solid var(--ink); padding: 11px 0; }
.week-counts div { display: flex; align-items: baseline; gap: 5px; color: var(--accent); }
.week-counts div + div { justify-content: center; }
.week-counts div:last-child { justify-content: flex-end; }
.week-counts .independent { color: var(--independent); }
.week-counts .cardio { color: var(--cardio); }
.week-counts dt { color: var(--ink); font-size: clamp(10px, 3.1vw, 13px); font-weight: 700; }
.week-counts dd { order: -1; font: 800 clamp(26px, 8.2vw, 34px)/.94 var(--display); font-variant-numeric: tabular-nums; }
.clear-day { margin-bottom: 8px; padding-inline: 0 9px; }
.history-head, .week-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.toolbar { display: flex; gap: 8px; margin: 10px 0 6px; }
.toolbar select { flex: 1; font-weight: 650; }
.filters { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 12px; }
.filters button { flex: 1; border: 1px solid var(--line); border-radius: 6px; padding: 5px 3px; min-width: 49px; min-height: 44px; font-size: 12px; font-weight: 650; }
.filters button[aria-pressed=true] { background: var(--soft); color: var(--accent); border-color: var(--accent); }
.week { padding: 12px; }
.week-head { padding: 2px 2px 7px; }
.week-head h3 { font: 800 20px/1.1 var(--display); text-transform: uppercase; }
.workout { width: 100%; display: flex; align-items: center; gap: 9px; text-align: left; min-height: 62px; padding: 10px 2px; border-top: 1px solid var(--line); }
.workout:focus-visible { position: relative; z-index: 1; }
.bubble { width: 35px; height: 35px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.bubble.coach, .tag { background: var(--soft); color: var(--accent); }
.bubble.independent { background: var(--independent-soft); color: var(--independent); }
.bubble.cardio { background: var(--cardio-soft); color: var(--cardio); }
.wtext { flex: 1; min-width: 0; }
.wtext strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.wtext small, .muted, .notice, .empty { color: var(--muted); font-size: 13px; }
.wtext small { display: block; font-size: 12px; }
.tag { flex: none; font-size: 10px; font-weight: 740; border-radius: 6px; padding: 4px 5px; white-space: nowrap; }
.tag.pending { border: 1px solid var(--line); background: var(--surface); }
.tag:not(.pending) { background: var(--cardio-soft); color: var(--cardio); }
.chev { color: var(--muted); }
.chev svg { width: 13px; height: 13px; }
.empty, .notice { margin: 9px 0 2px; }
nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 800px; display: flex; gap: 5px; padding: 5px max(8px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); background: var(--surface); border-top: 1px solid var(--line); z-index: 3; }
nav button { min-width: 0; min-height: 54px; flex: 1; color: var(--muted); font-size: 12px; font-weight: 650; border-radius: 10px; }
nav button svg { margin: 0 auto 3px; }
nav button[aria-current=page] { color: var(--accent); background: var(--soft); }
.section-head { margin: 17px 0 13px; }
.section-head p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.section-head + .panel h3:has(+ .workout), .panel h3:has(+ .workout) { margin-bottom: 8px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 94px), 1fr)); gap: 9px; margin: 12px 0; }
.metrics dt { font-size: 12px; color: var(--muted); }
.metrics dd { font-size: 20px; font-weight: 690; font-variant-numeric: tabular-nums; }
.splits { text-transform: capitalize; }
.programmes { list-style: none; margin: 8px 0 0; padding: 0; }
.programmes li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 2px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.programmes li:last-child { border: 0; }
.programmes small { grid-column: 2; color: var(--muted); }
.bars { display: flex; gap: 5px; }
.bar-col { flex: 1; min-width: 0; display: flex; align-items: center; flex-direction: column; gap: 2px; }
.bar-col small, .bar-total { color: var(--muted); font-size: 11px; }
.chart { width: min(75%, 36px); height: 66px; stroke: none; }
.chart .coach, .legend .coach::before { fill: var(--accent); background: var(--accent); }
.chart .independent, .legend .independent::before { fill: var(--independent); background: var(--independent); }
.chart .cardio, .legend .cardio::before { fill: var(--cardio); background: var(--cardio); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 8px 0 0; padding: 0; }
.legend li { list-style: none; font-size: 11px; color: var(--muted); }
.legend li::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 2px; }
.manage-row { border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; overflow-wrap: anywhere; }
.manage-row small { display: block; color: var(--muted); }
details { margin-top: 8px; }
summary { min-height: 44px; align-content: center; color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 650; }
#callback-form button, #classification-form button { margin-top: 6px; }
#callback-transfer textarea { min-height: 64px; }
.status { color: var(--muted); font-size: 13px; margin: 8px 0; }
.status:empty { display: none; }
dialog { border: 1px solid var(--line); border-radius: 18px 18px 0 0; background: var(--surface); color: var(--ink); width: min(100%, 670px); max-width: 100%; max-height: 92vh; max-height: 92dvh; margin: auto auto 0; padding: 16px 14px calc(16px + env(safe-area-inset-bottom)); overflow: auto; }
dialog::backdrop { background: #0c1537a6; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 0 0 8px; }
.dialog-head h2 { overflow-wrap: anywhere; font-size: clamp(34px, 11vw, 50px); }
.dialog-head .quiet { flex: none; border-radius: 8px; }
.detail-metrics { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.detail-metrics span:not(.tag) { font-size: 13px; color: var(--accent); background: var(--soft); border-radius: 6px; padding: 4px 7px; }
.exercise, .detail-section { margin: 19px 0 0; }
.detail-section { padding-top: 13px; border-top: 1px solid var(--line); }
.apple-health > .metrics { background: var(--soft); padding: 10px; border-radius: 7px; }
.apple-health > .metrics dd { color: var(--accent); }
.heart-trend { width: 100%; height: auto; max-height: 185px; }
.heart-grid { stroke: var(--line); stroke-width: 1; }
.heart-line { stroke: var(--accent); stroke-width: 2; }
.heart-gap { stroke: var(--muted); stroke-dasharray: 3 2; }
.heart-gap-note { color: var(--muted); font-size: 12px; }
.heart-trend text { fill: var(--muted); stroke: none; font-size: 10px; }
.heart-zones { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.heart-zones dd { font-size: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
td, th { text-align: right; padding: 8px 3px; border-bottom: 1px solid var(--line); }
td:first-child, th:first-child { text-align: left; }
th { color: var(--muted); font-size: 11px; }
.checkbox { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.checkbox input { width: 20px; height: 20px; min-height: 20px; accent-color: var(--accent); }
#summary-text { min-height: 200px; }
@media (min-width: 700px) {
  .shell { --gutter-left: 24px; --gutter-right: 24px; }
  .brand { padding-block: calc(15px + env(safe-area-inset-top)) 13px; }
  .week-band { padding-block: 15px 18px; }
  .panel { padding: 19px; }
  dialog { margin: auto; border-radius: 16px; padding: 20px; max-height: 86vh; }
  nav { border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; }
}
