/* NorrisWorkout - treadmill interval workouts
   Dark, high-contrast, big-target UI for a phone or tablet on a treadmill. */

:root {
  --bg: #0d1117;
  --surface: #161c25;
  --surface-2: #202834;
  --surface-3: #2a3442;
  --line: #303b4a;
  --text: #f3f6f9;
  --muted: #a9b4c2;
  --accent: #4cc9f0;
  --accent-ink: #04212c;
  --danger: #ff6b6b;

  /* effort palette */
  --calm: #93a6bb;
  --calm-bg: #1d2633;
  --base: #3ad07a;
  --base-bg: #13281d;
  --push: #ff9f43;
  --push-bg: #2e2112;
  --allout: #ff5a5f;
  --allout-bg: #331516;
  --chip-ink: #0b0e12;

  --radius: 0.9rem;
  --tap: 3.5rem;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --vh: 1vh;
  color-scheme: dark;
}
@supports (height: 1dvh) {
  :root { --vh: 1dvh; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}
html.text-large { font-size: 122%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
body.sheet-open { overflow: hidden; }

h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.screen {
  padding-left: calc(1rem + var(--safe-l));
  padding-right: calc(1rem + var(--safe-r));
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap);
  padding: 0.6rem 1.25rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:active { background: #7fd9f5; }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn-secondary:active { background: var(--surface-3); }
.btn-block { display: flex; width: 100%; margin-top: 0.75rem; }
.btn-xl { display: flex; width: 100%; min-height: 4.5rem; font-size: 1.6rem; margin-top: 1.5rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------------- Menu ---------------- */
.menu {
  max-width: 42rem;
  margin: 0 auto;
  padding-top: calc(1.5rem + var(--safe-t));
  padding-bottom: calc(2rem + var(--safe-b));
}
.brand { text-align: center; margin-bottom: 1.5rem; }
.brand-mark { display: block; width: 4.5rem; height: 4.5rem; margin: 0 auto 0.5rem; }
.wordmark {
  font-size: clamp(2.4rem, 11vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.wordmark span { color: var(--accent); }
.tagline { color: var(--muted); margin-top: 0.4rem; font-size: 1.1rem; }

.field { margin-top: 1.4rem; }
.field-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.55rem;
}
.optional { text-transform: none; letter-spacing: 0; font-weight: 600; }

.seg { display: grid; gap: 0.5rem; }
.seg-grid { grid-template-columns: repeat(auto-fill, minmax(4.4rem, 1fr)); }
.seg-cards { grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); }
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.seg-2 { grid-template-columns: repeat(2, 1fr); }
.seg-btn {
  min-height: var(--tap);
  padding: 0.5rem 0.4rem;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.15;
}
.seg-btn small { display: block; font-weight: 600; font-size: 0.8rem; color: var(--muted); margin-top: 0.15rem; }
.seg-btn[aria-checked="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.seg-btn[aria-checked="true"] small { color: var(--accent-ink); }
.seg-cards .seg-btn { min-height: 4rem; font-size: 1.2rem; }

.desc {
  margin-top: 0.65rem;
  padding: 0.8rem 1rem;
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 0.5rem;
  color: var(--text);
  min-height: 3rem;
}
.hint { color: var(--muted); font-size: 0.95rem; margin-top: 0.45rem; }
.error {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  background: #3a1517;
  border: 2px solid var(--danger);
  border-radius: var(--radius);
  color: #ffd7d7;
  font-weight: 700;
}

.input-row { display: flex; align-items: center; gap: 0.6rem; }
.num-input {
  width: 9rem;
  min-height: var(--tap);
  padding: 0.4rem 0.9rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.num-input::placeholder { color: #6f7c8c; font-weight: 700; }
.num-input:focus { border-color: var(--accent); outline: none; }
.num-input.invalid { border-color: var(--danger); }
.unit { font-weight: 800; color: var(--muted); font-size: 1.2rem; }

/* toggle switch */
.switch {
  display: flex; align-items: center; gap: 0.9rem;
  min-height: var(--tap);
  padding: 0.5rem 0;
  cursor: pointer;
  position: relative;
}
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  flex: 0 0 auto;
  width: 3.6rem; height: 2.1rem;
  border-radius: 999px;
  background: var(--surface-3);
  border: 2px solid var(--line);
  position: relative;
  transition: background 0.15s;
}
.switch-track::after {
  content: "";
  position: absolute; top: 0.2rem; left: 0.2rem;
  width: 1.45rem; height: 1.45rem;
  border-radius: 50%;
  background: #d5dde6;
  transition: transform 0.15s;
}
.switch input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(1.5rem); background: #fff; }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--accent); outline-offset: 2px; }
.switch-text { font-weight: 800; font-size: 1.15rem; }
.switch-text small { display: block; font-weight: 500; font-size: 0.9rem; color: var(--muted); }

.foot { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 1rem; }

/* ---------------- Workout ---------------- */
/* Portrait (default): the cards are stacked and the page scrolls.
   Landscape (see the media query below): one full-screen card at a time. */
.workout {
  max-width: 64rem;
  margin: 0 auto;
  padding-top: calc(0.75rem + var(--safe-t));
  padding-bottom: calc(6.5rem + var(--safe-b));
}

.corner {
  position: fixed;
  z-index: 30;
  top: calc(0.5rem + var(--safe-t));
  width: 3.5rem; height: 3.5rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: rgba(32, 40, 52, 0.94);
  color: var(--text);
  padding: 0;
}
.corner:active { background: var(--surface-3); }
.corner-left { left: calc(0.5rem + var(--safe-l)); }
.corner-right { right: calc(0.5rem + var(--safe-r)); }
.corner svg { width: 1.6rem; height: 1.6rem; }
.icon-stroke { fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; }
.icon-fill { fill: currentColor; }

/* thin progress bar along the top edge, coloured by effort */
.progress {
  position: fixed;
  z-index: 35;
  top: var(--safe-t); left: 0; right: 0;
  height: 5px;
  background: var(--surface-2);
  overflow: hidden;
}
.tl-segs { display: flex; height: 100%; }
.tl-seg { height: 100%; flex: 0 0 auto; background: var(--calm); }
.tl-seg.eff-base { background: var(--base); }
.tl-seg.eff-push { background: var(--push); }
.tl-seg.eff-allout { background: var(--allout); }
.tl-done {
  position: absolute; right: 0; top: 0; bottom: 0; width: 100%;
  background: rgba(13, 17, 23, 0.72);
  pointer-events: none;
}

.w-head { text-align: center; padding: 0 3.75rem; }
.print-brand { display: none; }
.w-title { font-size: clamp(1.6rem, 6.5vw, 2.4rem); font-weight: 900; line-height: 1.1; letter-spacing: -0.01em; }
.w-summary { color: var(--muted); margin-top: 0.4rem; }
.w-meta { margin-top: 0.4rem; font-weight: 800; color: var(--accent); }

.pace-key {
  list-style: none; margin: 1rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem;
}
.pace {
  border-radius: 0.6rem;
  padding: 0.45rem 0.35rem;
  text-align: center;
  background: var(--surface);
  border-top: 5px solid var(--calm);
}
.pace-name { display: block; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.pace-speed { display: block; font-size: 1.35rem; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.15; }
.pace-speed small, .pace-inc small { font-size: 0.7em; font-weight: 700; color: var(--muted); }
.pace-inc { display: block; font-size: 0.95rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pace.eff-base { border-top-color: var(--base); }
.pace.eff-push { border-top-color: var(--push); }
.pace.eff-allout { border-top-color: var(--allout); }

.turn-hint {
  margin-top: 0.9rem;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}

/* ---- cards ---- */
.deck { margin-top: 1rem; }
.deck-track { display: flex; flex-direction: column; gap: 1rem; }

.card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  scroll-margin-top: 4.5rem;
}
.card.is-live { border-color: #fff; }
.card.is-done { opacity: 0.55; }

.card-head {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.55rem 0.8rem;
  background: var(--surface-3);
}
.ch-title { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.ch-label { font-size: 1.9rem; font-weight: 900; line-height: 1; letter-spacing: 0.02em; white-space: nowrap; }
.ch-type {
  font-size: 1.05rem; font-weight: 700; color: var(--muted); margin-top: 0.15rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ch-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; flex: 0 0 auto; }
.ch-rounds {
  background: var(--accent); color: var(--accent-ink);
  font-weight: 900; font-size: 0.95rem; letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem; border-radius: 0.4rem; white-space: nowrap;
}
.ch-time { font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.ch-live { display: none; flex-direction: column; align-items: flex-end; line-height: 1; flex: 0 0 auto; }
.card.is-live .ch-live { display: flex; }
.ch-round { font-size: 0.95rem; font-weight: 900; letter-spacing: 0.06em; color: #ffd166; white-space: nowrap; }
.ch-left { font-size: 2.6rem; font-weight: 900; font-variant-numeric: tabular-nums; }

.coaching { padding: 0.45rem 0.9rem 0; color: var(--muted); font-style: italic; font-size: 1rem; }

.card-body {
  display: flex; flex-direction: column; gap: 3px;
  padding: 0.5rem;
  font-size: clamp(1.3rem, 6.4vw, 2.1rem);
}
html.text-large .card-body { font-size: clamp(1.45rem, 7vw, 2.4rem); }

.step {
  display: grid;
  grid-template-columns: 2.6em 4.3em minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 0.3em;
  align-items: stretch;
  min-height: 1.5em;
  line-height: 1;
  border-radius: 0.22em;
  background: var(--calm-bg);
}
.s-dur {
  display: flex; align-items: center;
  padding-left: 0.3em;
  font-weight: 900; font-variant-numeric: tabular-nums;
}
.s-eff {
  display: flex; align-items: center; justify-content: center;
  margin: 0.1em 0;
  border-radius: 0.2em;
  background: var(--calm); color: var(--chip-ink);
  font-weight: 900; font-size: 0.74em; letter-spacing: 0.03em; line-height: 0.95;
  text-align: center;
  overflow-wrap: normal;
}
.s-speed, .s-inc {
  align-self: center;
  line-height: 0.9;
  text-align: right;
  padding-right: 0.3em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.s-speed > b, .s-inc > b { font-weight: 900; }
.step small { font-size: 0.45em; font-weight: 800; color: var(--muted); }
.per {
  display: block;
  margin-top: 0.12em;
  font-style: normal; font-weight: 800;
  font-size: 0.3em;
  color: #ffd166;
  white-space: nowrap;
}
.step.eff-base { background: var(--base-bg); }
.step.eff-push { background: var(--push-bg); }
.step.eff-allout { background: var(--allout-bg); }
.step.eff-base .s-eff { background: var(--base); }
.step.eff-push .s-eff { background: var(--push); }
.step.eff-allout .s-eff { background: var(--allout); }
.step.is-current { box-shadow: inset 0 0 0 3px #fff; }
.step.is-current .s-dur { color: #fff; }

.then {
  margin-top: 0.1em;
  padding: 0.2em 0 0 0.3em;
  border-top: 2px solid var(--line);
  font-size: 0.42em; font-weight: 900; letter-spacing: 0.2em;
  color: var(--muted);
}

/* walkers: incline matters more than speed */
.lvl-walker .s-speed > b { font-size: 0.72em; }
.lvl-walker .s-inc > b { font-size: 1.12em; }

.print-foot { display: none; }

/* ---- bottom dock: timer controls (+ deck nav in landscape) ---- */
.dock {
  position: fixed;
  z-index: 25;
  left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem calc(0.75rem + var(--safe-r)) calc(0.6rem + var(--safe-b)) calc(0.75rem + var(--safe-l));
  background: rgba(13, 17, 23, 0.97);
  border-top: 1px solid var(--line);
}
.dock-clock { display: flex; flex-direction: column; min-width: 5.6rem; line-height: 1.1; }
.clock-big { font-size: 1.7rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.clock-small { font-size: 0.85rem; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.btn-reset { min-height: 4rem; padding: 0.5rem 1rem; }
.btn-start { flex: 1 1 auto; min-height: 4rem; font-size: 1.5rem; }
.btn-start.is-running { background: #ffd166; color: #2b1d00; }

.deck-nav { display: none; }
.nav-btn {
  width: 3rem; height: 3rem;
  display: flex; align-items: center; justify-content: center;
  padding: 0 0 0.2rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface-2);
  font-size: 2rem; font-weight: 700; line-height: 1;
}
.nav-btn[disabled] { opacity: 0.3; cursor: default; }
.dots { display: flex; }
.dot {
  position: relative;
  width: 1.55rem; height: 2.75rem;
  padding: 0; border: 0; background: none;
}
.dot::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 0.7rem; height: 0.7rem; margin: -0.35rem 0 0 -0.35rem;
  border-radius: 50%;
  background: var(--surface-3);
  border: 2px solid var(--line);
}
.dot.on::after { background: var(--accent); border-color: var(--accent); width: 0.95rem; height: 0.95rem; margin: -0.475rem 0 0 -0.475rem; }
.card-count { font-weight: 800; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 4.6rem; text-align: right; }

@media (min-width: 46rem) {
  .pace-name { font-size: 0.9rem; }
  .pace-speed { font-size: 1.7rem; }
  .dock { padding-left: calc(50% - 31rem); padding-right: calc(50% - 31rem); }
}

/* ---- Landscape: one card at a time, filling the screen ---- */
@media screen and (orientation: landscape) {
  .workout {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .w-head, .pace-key, .turn-hint, .print-foot { display: none; }

  .corner { width: 3rem; height: 3rem; top: calc(0.4rem + var(--safe-t)); }
  .corner svg { width: 1.4rem; height: 1.4rem; }

  .deck {
    flex: 1 1 auto;
    min-height: 0;
    /* margins (not padding) so the clip edge is the card edge and neighbours stay hidden */
    margin: calc(0.5rem + var(--safe-t)) calc(3.85rem + var(--safe-r)) 0.3rem calc(3.85rem + var(--safe-l));
    padding: 0;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
    user-select: none; -webkit-user-select: none;
  }
  .deck-track {
    flex-direction: row;
    gap: 0;
    height: 100%;
    transition: transform 0.3s ease;
    will-change: transform;
  }
  .deck-track.no-anim { transition: none; }
  .card {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: 0.8rem;
  }
  .card.is-done { opacity: 1; }
  .card-head { flex: 0 0 auto; gap: 1rem; padding: 0.2rem 0.9rem; min-height: calc(15 * var(--vh)); }
  .ch-title { flex-direction: row; align-items: baseline; flex-wrap: wrap; column-gap: 0.7em; }
  .ch-label { font-size: calc(10.5 * var(--vh)); }
  .ch-type { font-size: calc(5.2 * var(--vh)); color: var(--text); margin-top: 0; }
  .ch-meta { flex-direction: row; align-items: center; gap: 0.6em; }
  .ch-rounds { font-size: calc(4.8 * var(--vh)); }
  .ch-time { font-size: calc(5 * var(--vh)); }
  .ch-round { font-size: calc(4 * var(--vh)); }
  .ch-left { font-size: calc(11.5 * var(--vh)); }
  .card.is-live .ch-time { display: none; }
  .coaching {
    flex: 0 0 auto;
    padding: 0.1rem 0.9rem 0;
    font-size: calc(3.8 * var(--vh));
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .card.dense .coaching { display: none; }
  .card.dense .card-head { min-height: calc(11 * var(--vh)); padding-top: 0.1rem; padding-bottom: 0.1rem; }
  .card.dense .ch-label { font-size: calc(8.5 * var(--vh)); }
  .card.dense .then { margin-top: 0; padding-top: 0.08em; font-size: 0.34em; }
  .card.dense .s-eff { margin: 0.05em 0; }
  .card.dense .per { display: inline; margin: 0 0 0 0.35em; font-size: 0.42em; vertical-align: middle; }
  .card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 3px;
    font-size: calc(7 * var(--vh)); /* replaced by fitCards() in app.js */
  }
  html.text-large .card-body { font-size: calc(7.5 * var(--vh)); }
  .step { flex: 1 1 0; min-height: 0; }
  .then { flex: 0 0 auto; }

  .dock {
    position: static;
    flex: 0 0 auto;
    gap: 0.5rem;
    padding: 0.3rem calc(0.6rem + var(--safe-r)) calc(0.3rem + var(--safe-b)) calc(0.6rem + var(--safe-l));
  }
  .dock-clock { min-width: 4.6rem; }
  .clock-big { font-size: 1.35rem; }
  .clock-small { font-size: 0.75rem; }
  .btn-reset { min-height: 2.9rem; padding: 0.3rem 0.8rem; font-size: 1rem; }
  .btn-start { flex: 0 1 11rem; min-height: 2.9rem; font-size: 1.25rem; }
  .deck-nav { display: flex; align-items: center; gap: 0.3rem; margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .switch-track, .switch-track::after, .deck-track { transition: none; }
}

/* ---------------- Gear sheet ---------------- */
.sheet-backdrop {
  position: fixed; inset: 0; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.6);
}
.sheet {
  position: fixed;
  z-index: 50;
  left: 0; right: 0; bottom: 0;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border-top: 2px solid var(--line);
  border-radius: 1.25rem 1.25rem 0 0;
}
.sheet-inner {
  max-width: 34rem;
  margin: 0 auto;
  padding: 1.2rem calc(1.2rem + var(--safe-r)) calc(1.2rem + var(--safe-b)) calc(1.2rem + var(--safe-l));
}
.sheet-title { font-size: 1.5rem; font-weight: 900; margin-bottom: 0.4rem; }
.sheet-info { margin-bottom: 0.6rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.sheet-w-title { font-weight: 900; font-size: 1.15rem; }
.sheet-w-meta { font-weight: 800; color: var(--accent); font-size: 0.95rem; margin-top: 0.15rem; }
.sheet-info .pace-key { margin-top: 0.6rem; }
.status {
  margin: 0 0 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}
.status.ok { color: var(--base); }
.status.warn { color: var(--push); }
.status.err { color: var(--danger); }
.sheet .field { margin-top: 0.75rem; }
@media (min-width: 46rem) {
  .sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    width: 34rem;
    transform: translate(-50%, -50%);
    border: 2px solid var(--line);
    border-radius: 1.25rem;
  }
}

/* ---------------- Print ----------------
   Cards print as strips, one after another: black on white, effort always
   written as a word, Push lightly shaded and All-Out darker. A 30-minute
   workout fits on one page. */
@media print {
  @page { margin: 10mm 11mm; }

  html, html.text-large { font-size: 9pt; background: #fff; }
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 9pt;
    line-height: 1.2;
    min-height: 0;
  }
  * { box-shadow: none !important; text-shadow: none !important; }

  .corner, .sheet, .sheet-backdrop, .dock, .progress, .turn-hint, #screen-menu,
  .sr-only, .ch-live { display: none !important; }

  .screen { padding: 0 !important; }
  .workout { position: static !important; display: block !important; max-width: none; padding: 0; overflow: visible; }
  .w-head { text-align: left; padding: 0; }
  .print-brand { display: block; font-size: 7.5pt; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #444; }
  .w-title { font-size: 16pt; color: #000; }
  .w-summary { color: #222; margin-top: 1pt; font-size: 9pt; }
  .w-meta { color: #000; margin-top: 1pt; font-size: 10pt; }

  .pace-key { margin-top: 5pt; gap: 4pt; }
  .pace { background: #fff; border: 0.75pt solid #000; padding: 2pt 4pt; text-align: left; }
  .pace-name, .pace-speed, .pace-inc { display: inline; color: #000; }
  .pace-name { font-size: 8pt; margin-right: 4pt; }
  .pace-speed { font-size: 10.5pt; margin-right: 3pt; }
  .pace-inc { font-size: 9pt; }
  .pace-speed small, .pace-inc small { color: #000; }

  .deck { margin: 7pt 0 0; padding: 0; overflow: visible; }
  .deck-track { display: block; transform: none !important; }
  .card {
    display: block;
    height: auto;
    margin: 0 0 6pt;
    border: 1.25pt solid #000;
    border-radius: 0;
    background: #fff;
    opacity: 1 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .card-head {
    display: flex; align-items: baseline; gap: 8pt;
    padding: 2pt 5pt;
    min-height: 0;
    background: #fff;
    border-bottom: 1pt solid #000;
  }
  .ch-title { flex-direction: row; align-items: baseline; gap: 6pt; }
  .ch-label { font-size: 11.5pt; color: #000; }
  .ch-type { font-size: 10pt; color: #000; margin: 0; }
  .ch-meta { flex-direction: row; align-items: baseline; gap: 6pt; }
  .ch-rounds { background: none; color: #000; border: 1pt solid #000; font-size: 8.5pt; padding: 0 3pt; }
  .ch-time { display: inline !important; font-size: 9.5pt; color: #000; }
  .coaching { display: block !important; padding: 1.5pt 5pt 0; font-size: 8pt; color: #222; white-space: normal; }

  .card-body { display: block; padding: 2pt 5pt 3pt; font-size: 10pt !important; }
  .step {
    grid-template-columns: 4em 7em 1fr 1fr;
    column-gap: 8pt;
    min-height: 0;
    padding: 1pt 3pt;
    border-radius: 0;
    background: #fff !important;
    border-bottom: 0.5pt solid #999;
    color: #000;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .step:last-child { border-bottom: 0; }
  .step.eff-push { background: #e6e6e6 !important; }
  .step.eff-allout { background: #bdbdbd !important; }
  .s-dur { padding-left: 0; color: #000 !important; }
  .s-eff {
    margin: 0.5pt 0;
    background: none !important;
    color: #000 !important;
    border: 0.75pt solid #000;
    font-size: 8pt;
  }
  .eff-push .s-eff { border-width: 1.25pt; }
  .eff-allout .s-eff { border-width: 2pt; }
  .s-speed, .s-inc { text-align: left; padding-right: 0; }
  .step small { color: #000; font-size: 7.5pt; }
  .lvl-walker .s-speed > b, .lvl-walker .s-inc > b { font-size: 1em; }
  .per { display: inline; margin: 0 0 0 4pt; color: #000; font-size: 7.5pt; font-weight: 600; }
  .then { margin: 0; padding: 2pt 0 1pt; border-top: 0.75pt solid #000; color: #000; font-size: 7.5pt; }

  .print-foot { display: block; margin-top: 6pt; font-size: 7pt; color: #444; }
}
