:root {
  color-scheme: light;
  --ink: #1d1d1f;
  --muted: #64646b;
  --paper: #fff;
  --surface: #f5f5f7;
  --line: #dedee3;
  --blue: #0066cc;
  --focus: #0071e3;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: var(--blue);
  background: transparent;
  border: 0;
  border-radius: 10px;
  min-height: 44px;
  padding: 10px 16px;
  font-weight: 500;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}
button:hover {
  background: #ebf3fc;
}
button:active {
  background: #dceafa;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 99;
  background: white;
  padding: 12px;
}
.skip:focus {
  top: 8px;
}
.top {
  max-width: 1104px;
  margin: auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 20px;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -0.6px;
}
.top nav {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 13px;
}
.top nav a {
  color: var(--muted);
  padding: 12px 0;
}
.top nav a[aria-current='page'] {
  color: var(--ink);
  font-weight: 600;
}
.shell {
  max-width: 1040px;
  margin: auto;
  padding: 0 32px;
}
.private-heading {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}
.private-heading h1,
.private-heading .eyebrow {
  display: none;
}
.privacy-status {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.app-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 0 8px;
  flex-wrap: wrap;
}
.app-nav button {
  color: var(--muted);
  font-size: 14px;
  padding: 10px 18px;
}
.app-nav button[aria-current='page'] {
  color: var(--ink);
  background: var(--surface);
}
.page-title {
  padding: 58px 0 40px;
}
.page-title h1 {
  font-size: clamp(40px, 5.2vw, 64px);
  line-height: 1.08;
  letter-spacing: -2.6px;
  font-weight: 650;
  margin: 0;
  white-space: pre-line;
  text-wrap: balance;
}
.page-title > p {
  color: var(--muted);
  margin: 16px 0 0;
  font-size: 20px;
}
.page-title .date-line {
  margin: 0 0 18px;
  font-size: 14px;
  letter-spacing: 0;
}
.next-run {
  background: var(--surface);
  border-radius: 24px;
  padding: 38px 40px;
}
.section-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 12px;
}
h2 {
  font-size: 28px;
  letter-spacing: -0.8px;
  line-height: 1.2;
  font-weight: 650;
  margin: 0 0 16px;
}
h3 {
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.35px;
}
p {
  max-width: 72ch;
}
.next-run h2 {
  font-size: 36px;
  letter-spacing: -1.2px;
  max-width: 24ch;
  margin-bottom: 8px;
}
.next-subtitle {
  color: var(--muted);
  margin: 0 0 24px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.primary,
.primary-button {
  background: #0071e3;
  color: #fff;
  border-radius: 24px;
  padding: 11px 24px;
}
.primary:hover,
.primary-button:hover {
  background: #0065c9;
}
.text-button {
  padding-left: 0;
  padding-right: 8px;
}
.text-button:hover {
  background: transparent;
  text-decoration: underline;
}
.recovery-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  margin-top: 26px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.status-text:before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #777;
  margin-right: 9px;
}
.status-text.green:before {
  background: #248048;
}
.status-text.amber:before {
  background: #956000;
}
.status-text.red:before {
  background: #bf2938;
}
.week-overview {
  padding: 48px 0;
}
.note,
.source-note,
.muted,
.empty-state {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.week-overview > p {
  margin: 0;
}
.summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 26px;
}
.metric {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.metric > span {
  font-size: 14px;
  color: var(--muted);
}
.metric strong {
  font-size: 42px;
  line-height: 1.2;
  letter-spacing: -1.5px;
  font-weight: 600;
}
.metric small {
  color: var(--muted);
  font-size: 13px;
}
.last-run {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  background: var(--surface);
  border-radius: 24px;
  padding: 32px 40px;
  gap: 24px;
  margin: 0 0 36px;
}
.last-run h2 {
  font-size: 42px;
  margin-bottom: 6px;
  letter-spacing: -1.5px;
}
.last-run p:not(.section-label) {
  margin: 4px 0;
  color: var(--muted);
  font-size: 15px;
}
.last-run .last-pace {
  color: var(--ink) !important;
  font-size: 20px !important;
  margin: 14px 0 !important;
}
.minimal-route {
  display: block;
  width: 100%;
  height: auto;
  max-height: 340px;
}
.route-preview {
  min-height: 180px;
  display: grid;
  place-items: center;
}
.disclosure {
  border-top: 1px solid var(--line);
  padding: 6px 0;
}
.disclosure > summary,
details > summary {
  cursor: pointer;
  min-height: 56px;
  align-content: center;
  font-size: 17px;
  font-weight: 500;
  padding: 12px 4px;
}
.disclosure > div {
  padding: 12px 0 28px;
}
.disclosure[open] > summary {
  color: var(--blue);
}
.app-footer {
  display: flex;
  gap: 12px;
  padding: 38px 0 20px;
}
.app-footer button {
  font-size: 13px;
  color: var(--muted);
  padding-left: 0;
}
.shell > footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 22px 0 36px;
  font-size: 12px;
  color: var(--muted);
}
.shell > footer a {
  color: var(--muted);
}
.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border-radius: 12px;
  margin-bottom: 24px;
}
.segmented button {
  color: var(--muted);
  padding: 8px 20px;
}
.segmented button[aria-pressed='true'] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px #0000000c;
}
.activity-list {
  margin-top: 22px;
}
.activity-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 32px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.activity-row > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.activity-row strong {
  font-size: 17px;
  font-weight: 550;
}
.activity-row span {
  font-size: 14px;
  color: var(--muted);
}
.activity-numbers {
  text-align: right;
}
.recovery-summary {
  padding-bottom: 36px;
}
.recovery-summary > p {
  color: var(--muted);
}
.recovery-summary .summary-metrics {
  margin: 32px 0;
}
.content-section {
  padding: 28px 0 40px;
}
.panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 20px 0;
  margin: 0;
}
.panel > p {
  color: var(--muted);
}
.panel .eyebrow,
.coach-heading .eyebrow {
  display: none;
}
.panel h2 {
  font-size: 26px;
}
.coach-journal > .coach-heading {
  display: none;
}
.coach-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 28px 0;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  max-width: 100%;
  margin: 12px 0;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #a5a5ad;
  border-radius: 10px;
}
.field input[type='checkbox'] {
  width: 22px;
  min-height: 22px;
  height: 22px;
  accent-color: var(--blue);
}
.field input[type='file'] {
  font-size: 13px;
}
.field textarea {
  min-height: 100px;
}
.coach-form .field:has(textarea) {
  grid-column: 1/-1;
}
.coach-form .field:has(input[type='checkbox']) {
  font-weight: 400;
}
.coach-journal > button {
  background: #0071e3;
  color: white;
  border-radius: 24px;
  margin: 4px 0 16px;
}
.coach-unit {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.coach-feedback {
  margin: 16px 0;
}
.v3-inline,
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 20px 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  text-align: left;
}
th {
  font-weight: 500;
  color: var(--muted);
  font-size: 12px;
}
th,
td {
  padding: 15px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th:first-child,
td:first-child {
  padding-left: 0;
}
.chart {
  margin: 24px 0;
  max-width: 100%;
}
.chart svg {
  width: 100%;
  display: block;
}
.chart svg text {
  fill: var(--muted);
}
.chart svg line {
  stroke: #d9d9df;
}
.chart-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}
.chart-tooltip {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}
.run-dialog {
  width: min(900px, calc(100% - 32px));
  max-height: 90dvh;
  border: 0;
  border-radius: 24px;
  padding: 0;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 20px 100px #0003;
}
.run-dialog::backdrop {
  background: #0005;
  backdrop-filter: blur(5px);
}
.run-dialog > header {
  position: sticky;
  top: 0;
  background: #fffffff5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  z-index: 2;
}
.dialog-content {
  padding: 28px;
}
.dialog-content h1 {
  font-size: 36px;
  letter-spacing: -1px;
  margin: 0;
}
.dialog-content > .minimal-route {
  background: var(--surface);
  border-radius: 16px;
  margin: 24px 0;
}
.login-card {
  max-width: 480px;
  margin: 70px auto 100px;
}
.login-card h2 {
  font-size: 32px;
}
.login-card p {
  font-size: 15px;
}
.notice {
  border-left: 3px solid #a56900;
  padding: 12px 16px;
  background: #fffaef;
  font-size: 14px;
}
.coach-event-strip {
  display: flex;
  justify-content: space-between;
  gap: 3px;
  font-size: 11px;
}
.coach-race {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.source-link {
  display: block;
  padding: 10px 0;
  font-size: 14px;
}
.v3-insight {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.v3-insight p {
  font-size: 16px;
}
.v3-insight small {
  color: var(--muted);
}
@media (max-width: 600px) {
  .top {
    padding: 12px 20px;
    gap: 12px;
  }
  .top nav {
    gap: 12px;
  }
  .shell {
    padding: 0 20px;
  }
  .private-heading {
    padding-top: 10px;
  }
  .privacy-status {
    max-width: 100%;
    font-size: 11px;
  }
  .app-nav {
    gap: 0;
    justify-content: space-between;
    padding-top: 14px;
  }
  .app-nav button {
    font-size: 12px;
    padding: 10px 7px;
  }
  .page-title {
    padding: 40px 0 28px;
  }
  .page-title h1 {
    font-size: 44px;
    letter-spacing: -1.8px;
  }
  .page-title > p {
    font-size: 17px;
  }
  .next-run {
    padding: 28px 24px;
    border-radius: 20px;
  }
  .next-run h2 {
    font-size: 29px;
    letter-spacing: -0.9px;
  }
  .next-subtitle {
    font-size: 15px;
  }
  .recovery-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
    margin-top: 22px;
    padding-top: 20px;
  }
  .recovery-line button {
    font-size: 14px;
  }
  .week-overview {
    padding: 36px 0;
  }
  .summary-metrics {
    gap: 12px;
  }
  .metric strong {
    font-size: 30px;
    letter-spacing: -1px;
  }
  .metric > span {
    font-size: 12px;
  }
  .metric small {
    font-size: 12px;
  }
  .last-run {
    padding: 26px 24px;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    border-radius: 20px;
  }
  .last-run h2 {
    font-size: 32px;
  }
  .last-run p:not(.section-label) {
    font-size: 13px;
  }
  .route-preview {
    min-height: 140px;
  }
  .activity-row {
    gap: 12px;
    grid-template-columns: 1fr auto auto;
  }
  .activity-row strong {
    font-size: 15px;
  }
  .activity-row span {
    font-size: 12px;
  }
  .activity-row button {
    font-size: 13px;
  }
  .coach-form {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .shell > footer {
    flex-direction: column;
    gap: 8px;
  }
  .run-dialog {
    width: calc(100% - 16px);
    max-height: 94dvh;
    border-radius: 20px;
  }
  .dialog-content {
    padding: 20px;
  }
  .run-dialog > header {
    padding: 12px 20px;
  }
  .panel h2 {
    font-size: 24px;
  }
  .table-wrap {
    font-size: 13px;
  }
  .app-footer {
    gap: 20px;
  }
  .login-card {
    margin: 50px auto 70px;
  }
  .disclosure > summary {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (min-width: 1100px) {
  .app-body {
    max-width: 920px;
    margin: auto;
  }
}

.chart svg path[stroke='#65dce9'] {
  stroke: #0071e3;
}
.chart svg path[stroke='#ffac79'] {
  stroke: #a34800;
}
.chart svg path[stroke='#a2b3cd'] {
  stroke: #5b6879;
}
.chart-legend span[style*='101, 220, 233'] {
  color: #0071e3 !important;
}
.chart-legend span[style*='255, 172, 121'] {
  color: #a34800 !important;
}

.coach-form > .disclosure {
  grid-column: 1/-1;
}
.coach-journal {
  padding-top: 0;
}
.coach-journal > .source-note:first-of-type {
  margin-top: 0;
}
.coach-form {
  margin: 20px 0;
  gap: 14px;
}
.coach-form .field {
  margin: 5px 0;
}
.coach-journal > p[role='status'] {
  margin-bottom: 24px;
}
.coach-journal > details {
  border-top: 1px solid var(--line);
}

.coach-journal > .source-note:first-of-type {
  display: none;
}

.recovery-summary .metric strong {
  font-size: clamp(23px, 5.8vw, 38px);
  white-space: nowrap;
}
.chart-legend:has(span:only-child) {
  display: none;
}

/* The poster owns its typography; app styles only size the full-resolution image. */
.poster-dashboard {
  max-width: 640px;
  margin: 0 auto;
}
.poster-dashboard header {
  margin-bottom: 16px;
}
.poster-dashboard h2 {
  margin: 0 0 16px;
}
.poster-dashboard .toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.poster-dashboard > img {
  display: block;
  width: min(100%, 480px);
  height: auto;
  margin: 24px auto 0;
  image-rendering: auto;
}

/* Coaching: one decision, one load timeline, one method-specific signal. */
.coaching-hero {
  background: var(--surface);
  border-radius: 24px;
  padding: 40px;
  margin-bottom: 24px;
}
.coaching-hero h2 {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -1.3px;
  max-width: 22ch;
}
.coaching-lead {
  font-size: 20px;
  line-height: 1.5;
  color: #48484d;
  max-width: 58ch;
}
.coaching-evidence {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 24px;
  margin: 32px 0 24px;
}
.coaching-evidence > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.coaching-evidence span {
  font-size: 13px;
  color: var(--muted);
}
.coaching-evidence strong {
  font-size: 15px;
  font-weight: 550;
}
.coaching-hero .disclosure > div {
  padding-bottom: 4px;
}
.coaching-section {
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}
.coaching-section-heading h2 {
  margin-bottom: 10px;
}
.coaching-key {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
  margin: 28px 0 16px;
}
.coaching-key span:first-child {
  color: var(--blue);
}
.coaching-timeline {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 6px;
}
.coaching-day {
  padding: 10px 3px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  flex-direction: column;
  color: var(--muted);
  min-width: 0;
}
.coaching-day[aria-pressed='true'] {
  background: #edf4fd;
  outline: 1px solid #91bce8;
}
.day-name {
  font-size: 12px;
}
.day-value {
  font-size: 13px;
  margin-top: 8px;
  color: var(--ink);
}
.day-track {
  height: 132px;
  width: 62%;
  display: flex;
  align-items: flex-end;
  margin: 8px 0 12px;
  border-bottom: 1px solid #b7b7bf;
}
.day-bar {
  width: 100%;
  background: #0071e3;
  min-height: 0;
  border-radius: 3px 3px 0 0;
}
.planned .day-bar {
  background: transparent;
  border: 1.5px solid #7b8fa7;
}
.planned .day-bar[style='height: 0%;'] {
  border: 0;
}
.day-date {
  font-size: 12px;
  white-space: nowrap;
}
.today .day-name {
  font-weight: 700;
  color: var(--blue);
}
.coaching-day-detail {
  padding: 20px 0;
  min-height: 120px;
}
.coaching-day-detail p {
  margin: 7px 0;
}
.coaching-day-detail strong {
  font-size: 15px;
}
.coaching-load-context {
  background: var(--surface);
  border-radius: 18px;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 4px 24px;
}
.coaching-load-context p {
  margin: 2px 0;
}
.coaching-number {
  font-size: 38px;
  letter-spacing: -1.5px;
  grid-row: span 3;
  align-self: center;
}
.coaching-load-context .note {
  font-size: 13px;
}
.coaching-section > .segmented {
  margin-top: 18px;
}
.coaching-section .chart {
  margin-top: 4px;
}
.coaching-next {
  padding: 44px 0 32px;
}
.coaching-next > p:not(.note) {
  font-size: 20px;
  max-width: 55ch;
}
.coaching-next .text-button {
  margin-right: 20px;
}
.coaching-section .chart svg path:nth-of-type(2) {
  stroke-dasharray: 6 5;
}
.coaching-section .chart svg line[stroke='#fff'] {
  stroke: #64646b;
}
.coaching-section .chart svg circle[fill='#77777f'] {
  display: none;
}
@media (max-width: 600px) {
  .app-nav {
    justify-content: flex-start;
    gap: 3px;
  }
  .app-nav button {
    padding: 10px 11px;
  }
  .coaching-hero {
    padding: 28px 24px;
  }
  .coaching-lead {
    font-size: 17px;
  }
  .coaching-evidence {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 24px 0;
  }
  .coaching-evidence > div {
    flex-direction: row;
    justify-content: space-between;
    gap: 16px;
  }
  .coaching-evidence strong {
    font-size: 13px;
    text-align: right;
  }
  .coaching-timeline {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
  }
  .coaching-day:nth-child(n + 8) {
    margin-top: 14px;
  }
  .day-track {
    height: 88px;
    width: 58%;
  }
  .coaching-load-context {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .coaching-number {
    font-size: 34px;
    margin-bottom: 10px;
  }
  .coaching-key {
    gap: 8px 20px;
  }
  .coaching-section {
    padding: 32px 0;
  }
  .coaching-next > p:not(.note) {
    font-size: 18px;
  }
}
.coaching-planned {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 26px;
}
.coaching-planned .section-label {
  margin: 0;
  font-weight: 400;
  font-size: 13px;
}
.coaching-planned strong {
  font-size: 20px;
  font-weight: 550;
}
.coaching-planned > span:last-child {
  font-size: 14px;
  color: var(--muted);
}
.coaching-signal-summary {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 24px;
}

/* Activity rows are buttons: the whole row opens the run. */
.activity-row {
  width: 100%;
  grid-template-columns: 1fr auto 16px;
  text-align: left;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  cursor: pointer;
}
.activity-row:hover .row-chevron,
.activity-row:focus-visible .row-chevron {
  color: var(--ink);
}
.row-chevron {
  font-size: 22px;
  color: var(--muted);
}
@media (max-width: 600px) {
  .top nav {
    gap: 10px;
    font-size: 12px;
  }
  /* Tabs stay on one line and scroll sideways instead of wrapping. */
  .app-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -20px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .app-nav::-webkit-scrollbar {
    display: none;
  }
  .app-nav button {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* Check-in: 0–10 as tap targets */
.scale-row {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 4px;
  margin-top: 8px;
}
.scale-button {
  min-height: 44px;
  padding: 0;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
}
.scale-button[aria-pressed='true'] {
  background: var(--blue);
  color: #fff;
}

/* Coach: daily call, goal page, plan adherence, intensity. */
.call-card {
  margin: 24px 0;
  padding: 20px 22px;
  background: var(--paper);
  border-radius: 18px;
  border: 1px solid var(--line);
}
.call-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 15px;
}
.call-chip {
  font-size: 13px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e8e8ed;
  color: var(--ink);
}
.call-chip[data-state='green'] {
  background: #e3f4e8;
  color: #1b6b34;
}
.call-chip[data-state='yellow'] {
  background: #fdf1d6;
  color: #7a5200;
}
.call-chip[data-state='red'] {
  background: #fde4e2;
  color: #a1251b;
}
.call-suggestion {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 16px;
}
.call-suggestion strong {
  font-size: 19px;
}
.call-suggestion .actions {
  margin-top: 10px;
}
.call-guidance {
  margin: 12px 0 0;
}
.call-reasons {
  margin: 14px 0 0;
  padding-left: 20px;
  font-size: 15px;
  color: #48484d;
}
.call-reasons .source-link {
  display: inline;
  font-size: 13px;
}
.goal-hero {
  background: var(--surface);
  border-radius: 24px;
  padding: 40px;
  margin-bottom: 8px;
}
.goal-hero h2 {
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -1.4px;
  margin: 4px 0 8px;
}
.goal-phase {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 24px;
}
.goal-phase strong {
  font-size: 19px;
}
.goal-timeline {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.goal-timeline li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 8px;
  border-top: 3px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
}
.goal-timeline li strong {
  font-size: 13px;
  color: var(--ink);
  font-weight: 550;
}
.goal-timeline li[data-current='true'] {
  border-top-color: var(--blue);
}
.goal-number {
  font-size: clamp(40px, 6vw, 60px);
  font-weight: 650;
  letter-spacing: -1.5px;
  margin: 8px 0;
}
.goal-warning {
  background: #fdf1d6;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 15px;
}
.adherence-week {
  margin-top: 24px;
}
.adherence-week h3 {
  font-size: 15px;
  color: var(--muted);
  font-weight: 550;
  margin: 0 0 6px;
}
.adherence-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.adherence-row > div:first-child {
  display: flex;
  flex-direction: column;
}
.adherence-row span {
  font-size: 14px;
  color: var(--muted);
}
.adherence-state {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}
.adherence-chip {
  font-size: 13px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e8e8ed;
  color: var(--ink) !important;
}
.adherence-row[data-status='done'] .adherence-chip {
  background: #e3f4e8;
  color: #1b6b34 !important;
}
.adherence-row[data-status='moved'] .adherence-chip {
  background: #e6f0fb;
  color: #0b4f99 !important;
}
.adherence-row[data-status='missed'] .adherence-chip {
  background: #fde4e2;
  color: #a1251b !important;
}
.compact-field {
  font-size: 13px;
}
.compact-field select {
  font-size: 14px;
  padding: 4px 8px;
}
.zone-bar {
  display: flex;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface);
  margin: 20px 0 14px;
}
.zone-part[data-zone='easy'],
.zone-legend [data-zone='easy'] strong::before {
  background: #34a853;
}
.zone-part[data-zone='steady'],
.zone-legend [data-zone='steady'] strong::before {
  background: #f2a600;
}
.zone-part[data-zone='hard'],
.zone-legend [data-zone='hard'] strong::before {
  background: #d93025;
}
.zone-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.zone-legend div {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}
.zone-legend strong::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}
.zone-legend span {
  color: var(--muted);
}
@media (max-width: 720px) {
  .goal-hero {
    padding: 28px 20px;
    border-radius: 20px;
  }
  .goal-timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .zone-legend {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .adherence-row {
    flex-direction: column;
    gap: 6px;
  }
  .adherence-state {
    align-items: flex-start;
    text-align: left;
  }
}
.goal-timeline li strong {
  overflow-wrap: anywhere;
  hyphens: auto;
}
.goal-list {
  padding-left: 20px;
  margin: 12px 0;
}
.goal-list li {
  margin: 4px 0;
}
.goal-section h3 {
  font-size: 17px;
  margin: 28px 0 8px;
}
.goal-lead {
  font-size: 19px;
  margin: 16px 0;
}
.test-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.lab-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 12px;
}
@media (max-width: 720px) {
  .lab-form {
    grid-template-columns: 1fr 1fr;
  }
}
.goal-section .note .source-link {
  display: inline;
  margin-right: 10px;
}
.goal-section > .field {
  max-width: 320px;
}

/* ---------------------------------------------------------------
   Redesign November 2026: four areas, cards on grey, tab bar on phones.
   Later rules override the older single-column layout above.
---------------------------------------------------------------- */
:root {
  --page: #f5f5f7;
  --card: #ffffff;
  --radius: 20px;
  --up: #1b7f3b;
  --down: #a15c00;
}
body.training-app {
  background: var(--page);
}
.training-app:has(.run-app) > .top,
.training-app:has(.run-app) .private-heading,
.training-app:has(.run-app) .shell > footer {
  display: none;
}
.shell.private-shell {
  max-width: 1180px;
}
.run-app {
  padding-bottom: 48px;
}
/* App bar: brand, four areas, check-in, more. Full width, translucent. */
.app-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 calc(50% - 50vw);
  padding: 10px max(32px, calc(50vw - 558px));
  background: rgb(245 245 247 / 0.86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.app-brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.app-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
}
.app-seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: #e8e8ed;
  border-radius: 11px;
}
.app-seg button {
  min-height: 36px;
  padding: 6px 18px;
  font-size: 14px;
  color: var(--ink);
  border-radius: 8px;
}
.app-seg button:hover {
  background: rgb(255 255 255 / 0.55);
}
.app-seg button[aria-current='page'] {
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.12);
}
.nav-icon {
  display: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-checkin {
  min-height: 36px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--focus);
  border-radius: 980px;
}
.nav-checkin:hover,
.nav-checkin[aria-current='page'] {
  background: #0062c4;
}
.app-more {
  position: relative;
}
.app-more > summary {
  list-style: none;
  min-height: 36px;
  padding: 6px 4px;
  font-size: 14px;
  color: var(--muted);
}
.app-more > summary::-webkit-details-marker {
  display: none;
}
.app-more > summary::after {
  content: ' ▾';
  font-size: 11px;
}
.app-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 210px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: #fff;
  border-radius: 14px;
  box-shadow:
    0 10px 30px rgb(0 0 0 / 0.12),
    0 0 0 1px rgb(0 0 0 / 0.04);
}
.app-menu a,
.app-menu button {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 9px;
  text-align: left;
  font-size: 15px;
  font-weight: 450;
  color: var(--ink);
  text-decoration: none;
}
.app-menu a:hover,
.app-menu button:hover {
  background: var(--page);
}
.app-menu button:last-child {
  color: var(--muted);
  border-top: 1px solid var(--line);
  border-radius: 0 0 9px 9px;
  margin-top: 4px;
}
/* Page heads: smaller, calmer. */
.page-title {
  padding: 36px 0 22px;
}
.page-title h1 {
  font-size: clamp(30px, 3.6vw, 40px);
  letter-spacing: -1.2px;
}
.page-title > p {
  font-size: 17px;
  margin-top: 8px;
}
.page-title .date-line {
  margin: 0 0 6px;
  font-size: 14px;
}
/* Cards: every top-level block of a view sits on white. */
.app-body .coaching-hero,
.app-body .coaching-section,
.app-body .coaching-next,
.app-body .content-section,
.app-body .panel,
.app-body .recovery-summary,
.app-body .last-run,
.app-body .race-tile,
.app-body .tile,
.app-body .goal-hero,
.app-body .coach-journal,
.app-body .poster-dashboard,
.app-body > .disclosure,
.tab-body > .disclosure,
.tab-body > div > .disclosure,
.app-body .activity-list,
.app-body > .table-wrap {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 0 0 16px;
  border: 0;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}
.app-body h2,
.app-body .panel h3 {
  font-size: 21px;
  letter-spacing: -0.3px;
  margin: 0 0 6px;
}
.app-body > .disclosure > summary,
.tab-body .disclosure > summary {
  min-height: 0;
  padding: 2px 0;
  font-size: 16px;
}
.app-body > .disclosure > div,
.tab-body .disclosure > div {
  padding: 12px 0 4px;
}
.segmented {
  background: #e8e8ed;
  margin-bottom: 18px;
}
.segmented button {
  color: var(--ink);
  min-height: 36px;
  padding: 6px 18px;
  font-size: 14px;
}
.metric strong {
  font-size: 30px;
  letter-spacing: -0.8px;
}
.summary-metrics {
  gap: 18px;
  margin-top: 16px;
}
/* Method notes tucked behind a small disclosure. */
details.info {
  margin: 10px 0 0;
  border: 0;
  padding: 0;
}
details.info > summary {
  min-height: 0;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--blue);
  list-style: none;
}
details.info > summary::-webkit-details-marker {
  display: none;
}
details.info > summary::before {
  content: 'i';
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  font-style: italic;
}
details.info[open] > summary {
  color: var(--muted);
}
/* Home: decision and race on top, four tiles, load and last run. */
.home-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.home-grid > * {
  margin: 0 !important;
  min-width: 0;
}
.today-coaching {
  grid-column: span 8;
  display: flex;
}
.today-coaching > .coaching-hero {
  flex: 1;
  margin: 0;
  padding: 26px 28px;
}
.today-coaching .coaching-hero h2 {
  font-size: 28px;
  letter-spacing: -0.6px;
}
.race-tile {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #1d1d1f !important;
  color: #fff;
}
.race-tile .tile-label,
.race-tile .tile-note,
.race-tile .tile-unit {
  color: #a1a1a6;
}
.race-tile .text-button {
  color: #64b5ff;
  align-self: flex-start;
  padding-left: 0;
  margin-top: auto;
}
.race-tile .text-button:hover {
  background: transparent;
  text-decoration: underline;
}
.race-phases {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  margin: 18px 0 4px;
  padding: 0;
  font-size: 11px;
  color: #8e8e93;
}
.race-phases li {
  padding-top: 10px;
  border-top: 5px solid #3a3a3c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.race-phases li[data-state='done'] {
  border-color: #8e8e93;
}
.race-phases li[data-state='current'] {
  border-color: #0a84ff;
  color: #fff;
  font-weight: 600;
  overflow: visible;
}
.tile-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.tile {
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: box-shadow 0.16s ease;
}
.tile:hover {
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.08);
}
.tile:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.tile-label {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.tile-value {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 650;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.tile-unit {
  margin-left: 5px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}
.tile-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  white-space: pre-line;
}
.tile-note .up {
  color: var(--up);
  font-weight: 600;
}
.tile-note .down {
  color: var(--down);
  font-weight: 600;
}
.tile-meter {
  height: 8px;
  margin-top: auto;
  padding-top: 0;
  border-radius: 4px;
  background: #e8e8ed;
  overflow: hidden;
  translate: 0 4px;
}
.tile-meter span {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: 4px;
  background: var(--focus);
}
.spark {
  display: block;
  width: 100%;
  height: 34px;
  margin-top: auto;
  padding-top: 8px;
  overflow: visible;
}
.spark path {
  fill: none;
  stroke: var(--focus);
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}
.spark .spark-ref {
  stroke: #c7c7cc;
  stroke-dasharray: 3 3;
  vector-effect: non-scaling-stroke;
}
.home-load {
  grid-column: span 7;
}
.home-load > .coaching-section {
  height: 100%;
  margin: 0;
}
.home-load .coaching-section-heading h2 {
  font-size: 17px;
}
.home-grid > .last-run {
  grid-column: span 5;
  grid-template-columns: 1fr 1.1fr;
  padding: 22px 24px;
  gap: 16px;
}
.tile-links {
  display: flex;
  gap: 4px;
  margin-top: 12px;
  margin-left: -12px;
}
.tile-links .text-button {
  font-size: 14px;
}
.home-grid .route-preview {
  min-height: 140px;
}
.activity-list {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}
.activity-row:last-child {
  border-bottom: 0;
}
.compact-field {
  max-width: 260px;
}
@media (max-width: 960px) {
  .today-coaching,
  .race-tile,
  .home-load,
  .home-grid > .last-run {
    grid-column: 1 / -1;
  }
  .tile-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Phones: the area buttons become a bottom tab bar with icons. */
@media (max-width: 700px) {
  .shell.private-shell {
    padding: 0 16px;
  }
  .app-bar {
    padding: 10px 16px;
    margin: 0 -16px;
    justify-content: space-between;
  }
  .app-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    gap: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: rgb(250 250 252 / 0.94);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--line);
  }
  .app-seg {
    display: contents;
  }
  .app-seg button,
  .nav-checkin {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-height: 50px;
    padding: 4px 0;
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0;
  }
  .app-seg button[aria-current='page'],
  .nav-checkin[aria-current='page'] {
    color: var(--focus);
  }
  .nav-icon {
    display: block;
  }
  .run-app {
    padding-bottom: 96px;
  }
  .page-title {
    padding: 22px 0 14px;
  }
  .page-title h1 {
    font-size: 28px;
  }
  .home-grid,
  .tile-row {
    gap: 12px;
  }
  .app-body .coaching-hero,
  .app-body .coaching-section,
  .app-body .coaching-next,
  .app-body .content-section,
  .app-body .panel,
  .app-body .recovery-summary,
  .app-body .last-run,
  .app-body .race-tile,
  .app-body .tile,
  .app-body .goal-hero,
  .app-body .coach-journal,
  .app-body > .disclosure,
  .tab-body > .disclosure,
  .app-body .activity-list {
    padding: 18px;
    border-radius: 18px;
  }
  .today-coaching .coaching-hero h2 {
    font-size: 23px;
  }
  .tile-value {
    font-size: 28px;
  }
  .home-grid > .last-run {
    grid-template-columns: 1fr 1fr;
  }
  .segmented {
    display: flex;
    overflow-x: auto;
  }
  .segmented button {
    flex: 1 0 auto;
    padding: 6px 12px;
  }
}
/* Fixes after the first rendered review. */
@media (min-width: 1100px) {
  .run-app .app-body {
    max-width: none;
  }
}
.app-body p {
  max-width: 72ch;
}
.app-nav .nav-checkin {
  color: #fff;
}
.home-grid {
  align-items: start;
}
.home-grid > .race-tile {
  align-self: stretch;
}
.race-tile .race-focus {
  margin: 14px 0 0;
  font-size: 14px;
  color: #d1d1d6;
}
.home-grid > .last-run {
  align-self: stretch;
  align-items: start;
}
.last-run .tile-value {
  margin: 0;
  font-size: 34px;
  color: var(--ink);
}
.last-run .tile-note {
  margin: 8px 0 0;
  font-size: 13px;
}
.home-grid .route-preview {
  min-height: 160px;
  align-self: center;
}
.home-load .coaching-load-context {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin-top: 14px;
  border-radius: 14px;
}
.home-load .coaching-number {
  font-size: 22px;
  letter-spacing: -0.4px;
  font-weight: 650;
}
.home-load .coaching-load-context p {
  font-size: 14px;
}
.home-load .coaching-load-context details.info {
  flex-basis: 100%;
}
.home-load .coaching-timeline {
  min-height: 0;
}
.today-coaching .coaching-lead {
  font-size: 17px;
}
.home-grid > .last-run {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.home-grid > .last-run > .route-preview {
  order: -1;
  min-height: 0;
  height: 230px;
  background: var(--page);
  border-radius: 14px;
  padding: 14px;
}
.home-grid > .last-run .minimal-route {
  max-height: 200px;
}
.home-grid .last-run p.tile-value {
  margin: 0;
  font-size: 34px;
  color: var(--ink);
}
.home-grid .last-run p.tile-note {
  margin: 6px 0 0;
  font-size: 13px;
}
.home-grid .last-run p.tile-label {
  margin: 0 0 6px;
  font-size: 13px;
}
.tile-links {
  margin-top: 6px;
}
@media (max-width: 700px) {
  /* backdrop-filter would make the bar the containing block of the fixed tab bar. */
  .app-bar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--page);
    position: static;
  }
}
@media (max-width: 700px) {
  .run-app .app-nav {
    margin: 0;
    width: auto;
  }
}
.app-body .goal-hero h2 {
  font-size: 34px;
  letter-spacing: -1px;
}
.adherence-state .compact-field {
  font-size: 0;
}
.adherence-state .compact-field select {
  font-size: 14px;
  min-height: 36px;
  padding: 4px 10px;
}
@media (max-width: 700px) {
  .run-app .app-nav .nav-checkin {
    color: var(--muted);
  }
  .run-app .app-nav .nav-checkin[aria-current='page'] {
    color: var(--focus);
  }
}
html:has(body.training-app) {
  background: var(--page);
}
body.training-app {
  min-height: 100vh;
}
