/* Cleaner athlete full-page day-by-day ledger */

#fp-overlay .fp-body {
  width: min(1180px, calc(100vw - 48px));
  max-width: 1180px;
  margin: 0 auto;
}

#fp-overlay .fpc-section {
  border-radius: 14px;
}

#fp-overlay .wd-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#fp-overlay .wd-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) minmax(220px, 310px);
  gap: 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

#fp-overlay .wd-row.empty {
  min-height: 64px;
  align-items: center;
  background: var(--surface2);
}

#fp-overlay .wd-date {
  position: sticky;
  top: 76px;
  padding-top: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--muted);
}

#fp-overlay .wd-day-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

#fp-overlay .wd-session {
  padding: 14px 16px;
  border-radius: 11px;
  background: var(--surface2);
  border: 1px solid var(--border);
  box-shadow: none;
}

#fp-overlay .wd-session.str {
  background: rgba(110, 168, 254, .10);
  border-color: rgba(110, 168, 254, .28);
  border-left: 4px solid var(--str);
}

#fp-overlay .wd-session.run {
  background: var(--amber-bg);
  border-color: var(--amber-border);
  border-left: 4px solid var(--run);
}

#fp-overlay .wd-session.other {
  border-left: 4px solid #8b5cf6;
}

#fp-overlay .wd-sess-cat {
  margin-bottom: 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}

#fp-overlay .wd-sess-name {
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 1.15;
}

#fp-overlay .wd-body-row,
#fp-overlay .wd-nutr-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  padding: 0;
}

#fp-overlay .wd-metric {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface2);
  font-size: 11px;
  line-height: 1;
  color: var(--muted);
}

#fp-overlay .wd-metric.body-lbl,
#fp-overlay .wd-metric.nutr-lbl {
  border: 0;
  padding-left: 0;
  background: transparent;
  color: var(--dim);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

#fp-overlay .wd-metric.nutr {
  border-color: var(--amber-border);
  background: var(--amber-bg);
  color: var(--amber-text);
}

#fp-overlay .wd-macro-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0;
}

#fp-overlay .wd-macro-chip {
  min-height: 27px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 10px;
}

#fp-overlay .wd-strava-col {
  min-width: 0;
}

#fp-overlay .wd-strava-col:empty {
  display: none;
}

#fp-overlay .wd-row:has(.wd-strava-col:empty) {
  grid-template-columns: 104px minmax(0, 1fr);
}

#fp-overlay .wd-rest {
  color: var(--dim);
  font-size: 12px;
}

@media (max-width: 900px) {
  #fp-overlay .fp-body {
    width: min(100% - 24px, 760px);
  }

  #fp-overlay .wd-row,
  #fp-overlay .wd-row:has(.wd-strava-col:empty) {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #fp-overlay .wd-date {
    position: static;
  }
}

/* ============================================
   PLANNED SESSIONS — compact reference rows
   The overlay pads logged sessions generously because they carry sets, reps and
   athlete notes. Planned work is just "what's on", so it gets a single line with
   the prescription behind a disclosure. Roughly a third of the previous height.
   ============================================ */

/* Planned work is an outline; completed work is filled. Do not give these a
   background — .wd-session directly below them is filled, and the contrast is
   what tells a coach at a glance which is which. */
#fp-overlay .wd-plan {
  border: 1px dashed var(--border-mid);
  border-left-width: 4px;
  border-radius: 10px;
  background: transparent;
}

#fp-overlay .wd-plan.run { border-left-color: var(--run); }
#fp-overlay .wd-plan.str { border-left-color: var(--str); }

/* Opening a planned row fills it faintly, so an expanded prescription still reads
   as one object without competing with completed sessions. */
#fp-overlay details.wd-plan[open] { background: var(--surface2); }

#fp-overlay .wd-plan-line {
  gap: 10px;
  min-height: 32px;
  padding: 6px 12px;
}

#fp-overlay .wd-plan-cat {
  min-width: 82px;
  font-size: 9px;
  letter-spacing: .12em;
}

/* "Completed run" / "Completed lift" needs to sit on one line beside the name. */
#fp-overlay .wd-sess-cat { white-space: nowrap; }

#fp-overlay .wd-plan-name { font-size: 13px; }
#fp-overlay .wd-plan-chip { font-size: 10px; }
#fp-overlay .wd-plan-more { padding: 0 12px 10px; }
#fp-overlay .wd-plan-struct,
#fp-overlay .wd-plan-ex { font-size: 10px; }
#fp-overlay .wd-plan-note { font-size: 11px; }

/* A planned day is reference material, so its rows sit tighter than logged ones. */
#fp-overlay .wd-day-content > .wd-plan + .wd-plan { margin-top: -4px; }

@media (max-width: 720px) {
  /* Chips drop under the name instead of crushing it on a narrow screen. */
  #fp-overlay .wd-plan-line,
  .wd-plan-line {
    flex-wrap: wrap;
    row-gap: 3px;
  }

  .wd-plan-name { flex: 1 1 auto; white-space: normal; }

  .wd-plan-chips {
    flex-basis: 100%;
    margin-left: 0;
    justify-content: flex-start;
    padding-left: 74px;
  }

  #fp-overlay .wd-plan-chips { padding-left: 82px; }

  /* The legend would push the collapse chevron off a narrow header. */
  .wd-legend { display: none; }
  .wd-plan-ex { flex-wrap: wrap; row-gap: 0; }
}

/* ============================================
   PREMIUM TYPE POLISH — Geist Mono / Geist Sans
   ============================================ */

/* Tabular numerals: every metric aligns to the grid, numbers stop jittering on refresh */
body{
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum" 1,"ss01" 1;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
}

/* Geist Mono runs slightly wide vs DM Mono — pull data tracking in for a tighter, engineered feel */
[style*="var(--mono)"],.tval{letter-spacing:-0.01em}

/* Condensed headings: semi-condensed needs a touch less squeeze-compensation than full condensed */
h1,h2,h3,[style*="var(--cond)"]{letter-spacing:0.01em}

/* Uppercase micro-labels get airline-ticket tracking — the single biggest premium tell */
[class*="label"],[class*="eyebrow"],th{letter-spacing:0.09em}
