/* duvro.app signed-in pages. The light look from the dashboard boards (Nov 23, 2026): a warm grey
   page, white cards, each zone named by a black tab in gold caps with a line saying what it's for.
   Type as on the rest of the site (branding/BRAND.md): Wide Ultra for the wordmark only,
   Condensed for tabs, headings, names and numbers, Inter for reading. Bold only for headings,
   numbers and the main button; one main button per card (style B), outlined buttons for the rest. */
@font-face { font-family: "DUVRO Tactical"; src: url("/fonts/DUVROTactical-Ultra.woff2") format("woff2"); font-weight: 950; font-style: normal; font-display: swap; }
@font-face { font-family: "DUVRO Tactical Condensed"; src: url("/fonts/DUVROTacticalCondensed-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "DUVRO Tactical Condensed"; src: url("/fonts/DUVROTacticalCondensed-Semibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "DUVRO Tactical Condensed"; src: url("/fonts/DUVROTacticalCondensed-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "DUVRO Tactical Condensed"; src: url("/fonts/DUVROTacticalCondensed-Black.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }

:root {
  --page: #ece9e3;
  --card: #ffffff;
  --card2: #f4f2ec;
  --line: #ddd8ce;
  --line2: #e7e3db;
  --ink: #161614;
  --muted: rgba(22, 22, 20, 0.72);
  --edge: rgba(22, 22, 20, 0.5);    /* outlined buttons: a 1 px border at 50% */
  --hair: rgba(22, 22, 20, 0.12);
  --gold: #ffb300;
  --gold-hi: #ffc23d;
  --good: #0b7a5f;                  /* on your phone */
  --wait: #8a5200;                  /* waiting on your phone */
  --bad: #b3261e;
  --z1: #5f6b73; --z2: #1f6fc4; --z3: #23893a; --z4: #c24e00; --z5: #b3261e;
  --wide: "DUVRO Tactical", "DUVRO Tactical Condensed", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cond: "DUVRO Tactical Condensed", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Read by screen readers, not shown. */
.d-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html { -webkit-text-size-adjust: 100%; }
body.dash {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--page); color: var(--ink);
  font: 400 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--ink); text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
strong, b { font-weight: 600; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Header */
.d-top {
  width: 100%; max-width: 1280px; margin: 0 auto; padding: 14px 20px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px;
  border-bottom: 1px solid var(--hair);
}
.d-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.d-brand img { width: 34px; height: 34px; border-radius: 8px; display: block; }
.d-brand span { font-family: var(--wide); font-weight: 950; font-size: 24px; line-height: 1; }
.d-account { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.d-who { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.d-test {
  padding: 3px 7px; border: 1px solid var(--edge);
  font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
}

.d-wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px 20px 56px; flex: 1; }
.d-loading { color: var(--muted); }

/* Zones: a black tab with the zone's name and a line saying what it's for */
.d-zone { display: flex; align-items: center; gap: 12px; min-height: 32px; margin-bottom: 12px; }
.d-tab {
  display: inline-block; margin: 0; background: var(--ink); color: var(--gold); padding: 8px 12px;
  font-family: var(--cond); font-weight: 600; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 1; white-space: nowrap;
}
.d-purpose { font-size: 14px; line-height: 1.4; color: var(--muted); }
.d-card { background: var(--card); border: 1px solid var(--line); padding: 20px; }

/* Three columns like the dashboard board: Goals, This week, and the plan column; Your numbers
   full width under them; then how workouts went, new bests and races. */
.d-row3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.d-row3-bottom { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); margin-top: 28px; }
.d-col { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
#planCol { gap: 24px; }

/* Buttons. Main: style B, a flat gold slab with the verb in a black block at the left. */
.d-cta {
  display: inline-flex; align-items: center; gap: 14px; min-height: 56px; padding: 6px 22px 6px 6px;
  border: 0; background: var(--gold); color: var(--ink); cursor: pointer; text-align: left;
  font-family: var(--cond); font-weight: 700; font-size: 20px; line-height: 1.05; text-transform: uppercase;
}
.d-cta b { align-self: stretch; display: flex; align-items: center; padding: 0 16px; background: var(--ink); color: var(--gold); font-weight: 900; white-space: nowrap; }
.d-cta:hover { background: var(--gold-hi); }
.d-cta:active { filter: brightness(0.9); }
.d-cta:disabled { opacity: 0.45; cursor: default; filter: none; background: var(--gold); }
.d-ghost {
  min-height: 44px; padding: 0 16px; border: 1px solid var(--edge); background: transparent; color: var(--ink);
  font: 500 15px/1 var(--body); cursor: pointer;
}
.d-ghost:hover { border-color: var(--ink); }
.d-ghost:disabled { opacity: 0.45; cursor: default; }
.d-small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.d-quiet { border-color: transparent; color: var(--muted); }
.d-quiet:hover { border-color: var(--edge); color: var(--bad); }
.d-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* Sign in */
.d-signin { display: grid; place-items: center; padding: 6vh 0 4vh; }
.d-signin-card { width: min(480px, 100%); padding: 32px; }
.d-signin-card h1 {
  margin: 18px 0 10px; font-family: var(--cond); font-weight: 900; font-size: 46px; line-height: 0.98; text-transform: uppercase;
}
.d-signin-card p { margin: 0 0 20px; color: var(--muted); }
.d-signin-card .d-fine { margin: 14px 0 0; font-size: 14px; }
/* The two steps to a full dashboard: sign in here, then the switch in the app. */
.d-steps { margin: 0 0 22px; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; }
.d-steps li { counter-increment: step; display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; line-height: 1.45; }
.d-steps li::before { content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; background: var(--ink); color: var(--gold); font: 900 15px/1 var(--cond); }
.d-steps b { font-weight: 600; }
.d-msg { padding: 10px 12px; border: 1px solid var(--bad); color: var(--bad) !important; font-size: 14px; }
/* Apple's own button: black, the Apple logo and "Sign in with Apple" in the system font. */
.d-apple {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 8px;
  background: #000; color: #fff; text-decoration: none;
  font: 500 19px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.d-apple svg { width: 17px; height: 20px; fill: currentColor; margin-top: -3px; }
.d-apple:hover { background: #1d1d1f; }

/* New plan */
.d-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
textarea, input {
  width: 100%; border: 1px solid var(--edge); border-radius: 0; background: var(--card); color: var(--ink);
  font: 400 15px/1.55 var(--body);
}
textarea { min-height: 320px; padding: 12px 14px; resize: vertical; }
textarea::placeholder { color: rgba(22, 22, 20, 0.55); }
input { height: 48px; padding: 0 12px; font-family: var(--cond); font-weight: 600; font-size: 22px; }
input:disabled { border-color: transparent; padding-left: 0; background: transparent; color: var(--ink); }
.d-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 10px 0 18px; }
.d-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.d-note { margin: 0 0 18px; font-size: 14px; color: var(--wait); }
.d-error { margin: 14px 0 0; font-size: 14px; color: var(--bad); }
.d-working { display: flex; align-items: center; gap: 14px; min-height: 56px; font-size: 15px; color: var(--muted); }
.d-working i { position: relative; flex: 0 0 140px; height: 6px; overflow: hidden; background: var(--hair); }
.d-working i::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: var(--gold);
  animation: d-slide 1.4s ease-in-out infinite;
}
@keyframes d-slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* Check it */
.d-plan { padding-bottom: 20px; }
.d-summary { margin: 10px 0 0; color: var(--muted); font-size: 15px; max-width: 46em; }
.d-days { list-style: none; margin: 18px -20px 20px; padding: 0; border-top: 1px solid var(--line2); }
.d-day { border-bottom: 1px solid var(--line2); }
.d-day-row {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) auto auto; align-items: center; gap: 6px 14px;
  padding: 12px 20px;
}
.d-when { font-family: var(--cond); font-weight: 600; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.d-what { min-width: 0; }
.d-name { display: block; font-family: var(--cond); font-weight: 600; font-size: 19px; line-height: 1.2; }
.d-detail { display: block; font-size: 13px; color: var(--muted); }
.d-z { font-weight: 600; }
.d-z.z1 { color: var(--z1); } .d-z.z2 { color: var(--z2); } .d-z.z3 { color: var(--z3); } .d-z.z4 { color: var(--z4); } .d-z.z5 { color: var(--z5); }
.d-check { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.d-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.d-day.off .d-when, .d-day.off .d-what { opacity: 0.4; }
.d-day.off .d-name { text-decoration: line-through; text-decoration-thickness: 1px; }
.d-ex { padding: 0 20px 16px calc(20px + 84px + 14px); }
.d-ex p { margin: 0 0 8px; font-size: 14px; color: var(--muted); white-space: pre-line; max-width: 46em; }
.d-ex table { width: 100%; border-collapse: collapse; font-size: 14px; }
.d-ex td { padding: 7px 0; border-top: 1px solid var(--line2); vertical-align: top; }
.d-ex td:first-child { font-weight: 500; padding-right: 16px; }
.d-ex td:last-child { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.d-ex td small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.d-ex .grp { color: var(--muted); font-weight: 600; margin-right: 4px; }
.d-tname { display: flex; align-items: flex-start; gap: 10px; }
.d-tfig { flex: none; width: 40px; height: 40px; background: #0d0d0c; }
.d-tfig.none { background: none; }
/* A routine's figures under its name in Check it. */
.d-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin-top: 6px; }
.d-strip img { display: block; flex: none; width: 36px; height: 36px; background: #0d0d0c; }
.d-strip .more { margin-left: 4px; font-size: 12px; color: var(--muted); }
.d-how { margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.d-sent { padding: 16px 18px; box-shadow: inset 0 0 0 2px var(--wait); }
.d-sent.on-phone { box-shadow: inset 0 0 0 2px var(--good); }
.d-sent strong { display: block; font-family: var(--cond); font-weight: 700; font-size: 24px; line-height: 1.1; text-transform: uppercase; color: var(--wait); }
.d-sent.on-phone strong { color: var(--good); }
.d-sent p { margin: 6px 0 14px; font-size: 15px; }

/* Your plans */
.d-list { padding: 0; }
.d-list ul { list-style: none; margin: 0; padding: 0; }
.d-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; width: 100%;
  padding: 14px 20px; border: 0; border-bottom: 1px solid var(--line2); background: transparent;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.d-list li:last-child .d-item { border-bottom: 0; }
.d-item:hover { background: var(--card2); }
.d-item[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--gold); }
.d-item-name { font-family: var(--cond); font-weight: 600; font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.d-item-meta { grid-column: 1; font-size: 13px; color: var(--muted); }
.d-status { grid-row: 1 / span 2; grid-column: 2; font-size: 13px; font-weight: 500; text-align: right; }
.s-draft, .s-skipped { color: var(--muted); }
.s-sent { color: var(--wait); }
.s-added { color: var(--good); }
.d-empty { margin: 0; padding: 16px 20px; font-size: 14px; color: var(--muted); }

.d-foot {
  width: 100%; max-width: 1280px; margin: 0 auto; padding: 18px 20px 28px; border-top: 1px solid var(--hair);
  display: flex; flex-wrap: wrap; gap: 6px 20px;
}
.d-foot a {
  color: var(--muted); text-decoration: none;
  font-family: var(--cond); font-weight: 600; font-size: 14px; letter-spacing: 0.05em; text-transform: uppercase;
}
.d-foot a:hover { color: var(--ink); }

@media (max-width: 1200px) {
  .d-row3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #planCol, #workouts { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .d-row3, .d-row3-bottom { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .d-top { gap: 10px 18px; }
  .d-brand span { font-size: 21px; }
  .d-zone { flex-wrap: wrap; gap: 8px 12px; }
  .d-signin-card { padding: 24px 20px; }
  .d-signin-card h1 { font-size: 38px; }
  .d-day-row { grid-template-columns: 58px minmax(0, 1fr) auto; }
  .d-day-row .d-view { grid-column: 2; justify-self: start; }
  .d-ex { padding-left: 20px; }
  textarea { min-height: 240px; }
  .d-cta { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .d-working i::after { animation: none; width: 100%; opacity: 0.6; }
}

/* From the phone's summary */
section[id], #planCol { scroll-margin-top: 16px; }
.d-sync { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.d-turnon { margin-bottom: 24px; }
.d-turnon h2 { margin: 0 0 6px; font-family: var(--cond); font-weight: 600; font-size: 24px; line-height: 1.1; text-transform: uppercase; }
.d-turnon p { margin: 0; max-width: 62em; }
.d-none { margin: 0; color: var(--muted); font-size: 14px; }
.d-cap { font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.good { color: var(--good); }
.watch { color: var(--wait); }
.calm { color: var(--muted); }
.d-bar { position: relative; height: 8px; background: rgba(22, 22, 20, 0.14); }
.d-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gold); }
svg.d-chart { display: block; width: 100%; overflow: visible; }

.d-race { display: flex; flex-direction: column; gap: 10px; }
.d-race .top { display: flex; justify-content: space-between; gap: 8px; }
.d-race h3 { margin: 0; font-family: var(--cond); font-weight: 500; font-size: 26px; line-height: 1.1; text-transform: uppercase; }
.d-race .nums { display: flex; align-items: flex-end; gap: 32px; }
.d-race .nums div { display: flex; flex-direction: column; gap: 4px; }
.d-race .hero { font-family: var(--cond); font-weight: 600; font-size: 48px; line-height: 1; font-variant-numeric: tabular-nums; }
.d-race .sub { font-family: var(--cond); font-weight: 500; font-size: 26px; line-height: 1; }
.d-race .ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.d-race p { margin: 0; font-size: 14px; line-height: 1.45; }

.d-lifts { padding-top: 8px; padding-bottom: 8px; }
.d-lift { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line2); }
.d-lift:last-child { border-bottom: 0; }
.d-lift .head, .d-lift .mid { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.d-lift .name { font-size: 15px; font-weight: 600; }
.d-lift .aim { font-size: 12px; color: var(--muted); text-align: right; }
.d-lift .now { font-family: var(--cond); font-weight: 500; font-size: 28px; line-height: 1; }
.d-unit { margin-left: 4px; font-family: var(--body); font-size: 13px; color: var(--muted); }
.d-lift .verdict { font-size: 13px; font-weight: 600; text-align: right; }

/* Goals and the coach (board DashLadderA, Nov 26): the black coach strip with the four levels, the
   ladder card (your why, long term, this block), the waiting line and the goal editor. */
.d-coach { background: var(--ink); color: #f6f1e8; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.d-coach-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.d-coach-name { font-family: var(--cond); font-weight: 600; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
.d-coach-when { font-size: 12px; color: rgba(246, 241, 232, 0.6); text-align: right; }
.d-coach-call { margin: 0; font-size: 17px; line-height: 1.45; }
.d-levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
.d-levels button {
  min-height: 44px; padding: 0 4px; border: 0; background: #2a2a27; color: #f6f1e8; cursor: pointer;
  font-family: var(--cond); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
}
.d-levels button[aria-pressed="false"]:not(:disabled):hover { background: #3a3a35; }
.d-levels button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.d-levels button:disabled { cursor: default; opacity: 0.6; }
.d-coach :focus-visible { outline-color: var(--gold); }
.d-coach-fine { margin: 0; font-size: 12px; line-height: 1.4; color: rgba(246, 241, 232, 0.6); }
.d-coach-error { margin: 0; font-size: 13px; color: #ffb4a8; }

.d-goalwait { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; background: var(--card); box-shadow: inset 0 0 0 2px var(--wait); }
.d-goalwait p { flex: 1 1 220px; margin: 0; font-size: 14px; line-height: 1.45; }
.d-goalwait strong { color: var(--wait); }
.d-goalwait .d-error { flex-basis: 100%; }

.d-ladder { display: flex; flex-direction: column; gap: 4px; }
.d-ladder .d-sec { margin-top: 14px; }
.d-why-text { margin: 2px 0 0; font-family: var(--cond); font-weight: 500; font-size: 24px; line-height: 1.15; }
.d-why-detail { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.d-ladder .d-none { padding: 4px 0; }
.d-blk { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line2); }
.d-blk .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.d-lt .name { font-family: var(--cond); font-weight: 600; font-size: 19px; line-height: 1.2; text-transform: uppercase; }
.d-lt .now { display: flex; align-items: baseline; gap: 8px; }
.d-lt .now .n { font-family: var(--cond); font-weight: 500; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.d-lt .ends { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.d-lt .verdict { margin: 0; font-size: 14px; line-height: 1.45; }
.d-tbar { position: relative; height: 6px; background: var(--page); }
.d-tbar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); }
.d-tbar.met i { background: var(--good); }
.d-tgt .t { font-size: 15px; font-weight: 600; line-height: 1.3; }
.d-tgt .v { flex: none; display: flex; align-items: baseline; gap: 4px; font-size: 14px; white-space: nowrap; }
.d-tgt .v .n { font-family: var(--cond); font-weight: 500; font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
.d-tgt .of { color: var(--muted); }
.d-tgt .foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.d-tgt .foot .good { flex: none; font-weight: 600; }
.d-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 14px; }
.d-sec-when { font-size: 13px; color: var(--muted); text-align: right; }
.d-ladder-note { margin: 0; padding: 2px 0 6px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.d-ladder-actions { margin-top: 10px; }
.d-ladder .d-how-targets { margin: 6px 0 0; }
/* The race card's own block inside the ladder, a size down, its bar in ink like the others. */
.d-ladder .d-race { gap: 8px; }
.d-ladder .d-race h3 { font-size: 22px; }
.d-ladder .d-race .nums { gap: 24px; }
.d-ladder .d-race .hero { font-size: 36px; }
.d-ladder .d-race .sub { font-size: 22px; }
.d-ladder .d-race .d-bar { height: 6px; background: var(--page); }
.d-ladder .d-race .d-bar i { background: var(--ink); }

.d-goalset { display: flex; flex-direction: column; gap: 8px; }
.d-goalset-line { margin: 0; font-family: var(--cond); font-weight: 500; font-size: 22px; line-height: 1.15; }
.d-goalset .d-actions { margin-top: 4px; }
.d-goalnote { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }

.d-gf { display: flex; flex-direction: column; gap: 14px; }
.d-gf .d-f > label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.d-gf input, .d-gf select, .d-gf textarea {
  display: block; width: 100%; height: 44px; padding: 0 10px; border: 1px solid var(--edge); border-radius: 0;
  background-color: var(--card); color: var(--ink); font: 400 15px/1.3 var(--body);
}
.d-gf textarea { height: auto; min-height: 0; padding: 10px 12px; line-height: 1.45; resize: vertical; }
.d-gf select { padding: 0 6px; cursor: pointer; }
.d-gf [aria-invalid="true"] { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.d-gf .d-sec { margin-top: 4px; }
.d-gf .d-error { margin: 0; }
.d-f-hint { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.d-goalrow { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line2); }
.d-goalrow-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.d-gfgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; align-items: start; }
.d-gfgrid .wide { grid-column: 1 / -1; }
.d-gf-add { align-self: flex-start; }
.d-gf-how { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
@media (max-width: 760px) {
  .d-gf input, .d-gf select, .d-gf textarea { font-size: 16px; }
}
@media (max-width: 420px) {
  .d-coach { padding: 14px 14px; }
  .d-levels button { font-size: 12px; letter-spacing: 0.02em; }
  .d-why-text { font-size: 22px; }
}

.d-week { padding: 0; }
.d-week .head { padding: 16px 20px 12px; display: flex; flex-direction: column; gap: 4px; }
.d-week .range { font-family: var(--cond); font-weight: 600; font-size: 24px; line-height: 1; text-transform: uppercase; }
.d-wk { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line2); }
.d-wk li { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line2); }
.d-wk li:last-child { border-bottom: 0; }
.d-wk li.today { box-shadow: inset 0 0 0 2px var(--gold); }
.d-wk .when { font-family: var(--cond); font-weight: 600; font-size: 13px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }
.d-wk .when b { display: block; font-weight: 600; color: var(--wait); }
.d-wk .name { display: block; font-family: var(--cond); font-weight: 600; font-size: 18px; line-height: 1.2; }
.d-wk .detail { display: block; font-size: 13px; color: var(--muted); }
.d-wk .st { font-size: 12px; font-weight: 500; text-align: right; }
.d-wk li.rest .name, .d-wk li.missed .name { color: var(--muted); }
.d-week .d-none { padding: 0 20px 18px; }

.d-numbers { margin-top: 28px; }
/* As many tiles across as fit: five in a row on a desktop, two on a phone. */
.d-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 2px; }
.d-metric { background: var(--card2); padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.d-metric .lbl { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.d-metric .val { font-family: var(--cond); font-weight: 500; font-size: 26px; line-height: 1; }
.d-metric .verdict { font-size: 12px; line-height: 1.4; font-weight: 500; }
.d-metrics .d-none { grid-column: 1 / -1; padding: 4px 0; }

.d-workouts { padding-top: 6px; padding-bottom: 6px; }
.d-wo { list-style: none; margin: 0; padding: 0; }
.d-wo li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line2); }
.d-wo li:last-child { border-bottom: 0; }
.d-wo .when { font-family: var(--cond); font-weight: 600; font-size: 13px; text-transform: uppercase; color: var(--muted); }
.d-wo .title { display: block; font-weight: 600; font-size: 15px; }
.d-wo .meta { display: block; font-size: 13px; color: var(--muted); }
.d-wo .effort { font-family: var(--cond); font-weight: 500; font-size: 18px; text-align: right; }
.d-wo .effort small { display: block; font-family: var(--body); font-size: 11px; color: var(--muted); }
.d-workouts .d-none { padding: 12px 0; }

.d-bests { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; padding: 16px; }
.d-best { background: var(--card2); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.d-best .t { font-size: 12px; color: var(--muted); }
.d-best .v { font-family: var(--cond); font-weight: 500; font-size: 26px; line-height: 1; }
.d-best .d { font-size: 12px; color: var(--muted); }
.d-bests .d-none { grid-column: 1 / -1; padding: 4px; }

.d-races { display: flex; flex-direction: column; gap: 10px; }
.d-races .race { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.d-races .race b { font-weight: 600; }
.d-races .race span:last-child { color: var(--muted); text-align: right; }
.d-trust { margin: 24px 0 0; font-size: 13px; color: var(--muted); max-width: 62em; }

/* Narrow screens. These come after the section rules above so they win. */
@media (max-width: 520px) {
  .d-wo li { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; }
  .d-wk li { grid-template-columns: 56px minmax(0, 1fr) auto; padding: 12px 16px; }
  .d-race .hero { font-size: 42px; }
}

/* The plan editor (board B, Nov 25): one routine across the page while a draft is open. A row per
   exercise with a column per field; a card per exercise once the routine is narrower than 940 px. */
.d-icon { display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
.d-back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0; border: 0; background: none;
  color: var(--ink); font: 500 14px/1 var(--body); cursor: pointer;
}
.d-back svg, .d-iconbtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.d-back:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
.d-zone-edit { flex-wrap: wrap; margin: 8px 0 0; }
.d-saved { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 500; line-height: 1.4; }
.d-zone-edit .d-saved { margin-left: auto; }
.d-saved.good { color: var(--good); }
.d-saved.watch { color: var(--wait); }
.d-saved.bad { color: var(--bad); }
.d-saved-plan { margin-top: 8px; }
.d-linkbtn {
  padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.2em;
}
.d-edit-plan {
  margin: 10px 0 18px; font-family: var(--cond); font-weight: 500; font-size: 30px; line-height: 1.1;
  text-transform: uppercase; overflow-wrap: anywhere;
}
.d-edit { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }

.d-rail { background: var(--card); border: 1px solid var(--line); }
.d-rail-head {
  padding: 12px 16px 10px; border-bottom: 1px solid var(--line2);
  font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted);
}
.d-rail ul { list-style: none; margin: 0; padding: 0; }
.d-ritem {
  display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 0 8px; width: 100%; padding: 10px 16px;
  border: 0; border-bottom: 1px solid var(--line2); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.d-ritem:hover { background: var(--card2); }
.d-ritem[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--gold); }
.d-ritem .w {
  grid-row: 1 / span 2; padding-top: 2px; color: var(--muted);
  font-family: var(--cond); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
}
.d-ritem .n { font-family: var(--cond); font-weight: 600; font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
.d-ritem .m { font-size: 12px; line-height: 1.4; color: var(--muted); }
.d-ritem.off { opacity: 0.55; }
.d-rail-note { margin: 0; padding: 10px 16px 12px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.d-pickrow { display: none; }
.d-pick { display: flex; gap: 6px; }
.d-iconbtn { flex: none; width: 48px; min-height: 48px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

.d-routine { container: routine / inline-size; min-width: 0; }
.d-rfields { display: grid; gap: 14px; }
.d-rrow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 20px; }
.d-f { min-width: 0; margin: 0; padding: 0; border: 0; }
.d-f > label, .d-f > legend { display: block; margin-bottom: 6px; padding: 0; font-size: 14px; font-weight: 600; }
.d-editor select {
  height: 44px; padding: 0 10px; border: 1px solid var(--edge); border-radius: 0; background-color: var(--card);
  color: var(--ink); font: 400 15px/1.3 var(--body); cursor: pointer;
}
#rDay { min-width: 150px; }
#rFocus { min-width: 200px; }
#rNotes { min-height: 0; padding: 10px 12px; line-height: 1.5; }
.d-seg { display: flex; }
.d-seg button {
  height: 44px; min-width: 88px; margin-right: -1px; padding: 0 14px; border: 1px solid var(--edge); background: transparent;
  color: var(--ink); font: 500 14px/1 var(--body); cursor: pointer;
}
.d-seg button[aria-pressed="true"] { position: relative; z-index: 1; border-color: var(--ink); background: var(--ink); color: #fff; }
.d-seg button:disabled { opacity: 0.45; cursor: default; }

.d-xwrap { margin: 20px -20px 0; padding: 0 20px; border-top: 1px solid var(--line2); }
.d-xlist { list-style: none; margin: 0; padding: 0; }
.d-xhdr, .d-x {
  display: grid; column-gap: 6px;
  grid-template-columns: 56px minmax(140px, 1fr) 92px 48px 90px 72px 84px 72px 62px 60px 100px;
}
.d-xhdr { padding: 12px 0 8px; font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.d-x {
  grid-template-areas: "fig name kind sets reps weight time dist rest zone act" "fig note note note note note note note note note ." ". err err err err err err err err err .";
  row-gap: 6px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line2);
}
.d-xnum { display: none; grid-area: num; }
/* The exercise's DUVRO figure (dashboard.js figureFor); blank when the library has none. */
.d-xfig { grid-area: fig; align-self: center; width: 56px; height: 56px; background: #0d0d0c; }
.d-xfig[data-fig=""] { background: none; }
.d-xfig img, .d-tfig img { display: block; width: 100%; height: 100%; }
.f-name { grid-area: name; display: flex; align-items: center; gap: 6px; }
.f-kind { grid-area: kind; } .f-sets { grid-area: sets; } .f-reps { grid-area: reps; } .f-weight { grid-area: weight; }
.f-time { grid-area: time; } .f-dist { grid-area: dist; } .f-rest { grid-area: rest; } .f-zone { grid-area: zone; }
.f-note { grid-area: note; }
.d-xact { grid-area: act; display: flex; justify-content: flex-end; }
.d-xerr { grid-area: err; margin: 0; font-size: 13px; color: var(--bad); }
.d-xf { display: block; min-width: 0; }
.d-xl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.d-x input, .d-x select {
  display: block; width: 100%; height: 40px; padding: 0 8px; border: 1px solid var(--line); border-radius: 0;
  background-color: var(--card); color: var(--ink); font: 400 15px/1.3 var(--body); font-variant-numeric: tabular-nums;
}
.d-x select { padding: 0 4px; font-size: 14px; }
.d-x select option { color: var(--ink); font-weight: 400; }
.d-x input:hover, .d-x select:hover:not(:disabled) { border-color: var(--edge); }
.d-x input::placeholder { color: rgba(22, 22, 20, 0.45); }
.d-x input[aria-invalid="true"] { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.d-x select:disabled { opacity: 0.5; cursor: default; }
.d-x select.z1 { color: var(--z1); font-weight: 600; } .d-x select.z2 { color: var(--z2); font-weight: 600; }
.d-x select.z3 { color: var(--z3); font-weight: 600; } .d-x select.z4 { color: var(--z4); font-weight: 600; }
.d-x select.z5 { color: var(--z5); font-weight: 600; }
.f-name input { font-weight: 500; }
.f-note input { height: 34px; border-color: var(--line2); font-size: 13px; color: rgba(22, 22, 20, 0.82); }
.d-u { position: relative; display: block; }
.d-u input { padding-right: 28px; }
.f-time .d-u input { padding-right: 38px; }
.d-u i {
  position: absolute; top: 50%; right: 7px; transform: translateY(-50%);
  font-style: normal; font-size: 12px; color: rgba(22, 22, 20, 0.6); pointer-events: none;
}
.d-grp {
  flex: none; min-width: 22px; padding: 3px 5px; background: var(--ink); color: var(--gold); text-align: center;
  font-family: var(--cond); font-weight: 600; font-size: 13px; line-height: 1;
}
.d-ib {
  width: 34px; height: 40px; padding: 0; border: 0; background: transparent; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.d-ib:hover:not(:disabled) { background: var(--card2); color: var(--ink); }
.d-ib:disabled { opacity: 0.3; cursor: default; }
.d-xempty { padding: 14px 0 4px; border-top: 1px solid var(--line2); }
.d-undo { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 8px 8px 8px 14px; background: var(--ink); color: #fff; font-size: 14px; }
.d-undo span { flex: 1; }
.d-undo button {
  min-height: 36px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, 0.6); background: transparent;
  color: #fff; font: 500 14px/1 var(--body); cursor: pointer;
}
.d-undo button:hover { border-color: #fff; }
.d-rfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line2); }
.d-rsum { font-size: 13px; color: var(--muted); }
.d-rnav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.d-rnav .d-ghost { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }

@container routine (max-width: 939px) {
  .d-xhdr { display: none; }
  .d-x {
    /* Reps holds words ("10 each", "30 s each"); sets is a digit or two. */
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 0.9fr); row-gap: 8px; padding: 14px 0;
    grid-template-areas: "num num act act" "fig name name name" "sets reps weight rest" "time time dist dist" "kind kind zone zone" "note note note note" "err err err err";
  }
  .d-xfig { width: 44px; height: 44px; }
  .d-x:has(.d-xfig[data-fig=""]) .f-name { grid-column: 1 / -1; }
  .d-xnum { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
  .d-xl {
    position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; display: block;
    margin-bottom: 3px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  }
  .d-x input, .d-x select { height: 44px; }
  .f-note input { height: 40px; }
  .d-ib { width: 44px; height: 44px; }
}

@media (max-width: 1000px) {
  .d-edit { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .d-rail { display: none; }
  .d-pickrow { display: block; }
  .d-pick select { flex: 1; min-width: 0; height: 48px; font-weight: 500; }
}
@media (max-width: 760px) {
  /* 16 px fields, so an iPhone doesn't zoom in on each tap. */
  .d-editor input, .d-editor select, .d-editor textarea { font-size: 16px; }
  .d-editor .d-rname { font-size: 21px; }
  .d-edit-plan { font-size: 24px; margin-bottom: 14px; }
  .d-rrow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .d-rrow fieldset { grid-column: 1 / -1; order: 3; }
  #rDay, #rFocus { width: 100%; min-width: 0; }
  .d-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .d-seg button { min-width: 0; padding: 0 6px; }
  .d-zone-edit .d-saved { margin-left: 0; width: 100%; }
  .d-rnav { margin-left: 0; width: 100%; }
  .d-rnav .d-ghost { flex: 1 1 0; min-width: 0; max-width: none; }
}

/* Next up (board A, Nov 25): your next run, Did you know and Try this above the first row, and the
   Plan a run page. Same cards, tabs and type as the rest; one gold button, Try this's. */
.d-next { align-items: stretch; margin-bottom: 28px; }
.d-next .d-card { flex: 1; display: flex; flex-direction: column; gap: 12px; }
/* Did you know with no fact yet keeps its own height (Nov 26: two lines in a card the height of the row)
   and lists the facts closest to showing, each with how far there is to go. */
.d-next .d-card.d-empty { flex: 0 0 auto; }
.d-near { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }
.d-near li { display: flex; flex-direction: column; gap: 6px; }
.d-near b { font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; }
.d-near p { margin: 0; font-size: 15px; line-height: 1.4; }
.d-near small { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.d-h3 { margin: 0; font-family: var(--cond); font-weight: 500; font-size: 26px; line-height: 1.1; text-transform: uppercase; }
.d-nr-top, .d-try-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 36px; }
.d-nr-top .d-z { flex: none; font-size: 13px; white-space: nowrap; }
.d-target { display: flex; align-items: center; gap: 14px; }
.d-hero { font-family: var(--cond); font-weight: 600; font-size: 48px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.d-hero-word { font-size: 34px; }
.d-target-words { display: flex; flex-direction: column; font-size: 14px; line-height: 1.35; color: var(--muted); }
.d-target-words b { color: var(--ink); font-weight: 600; }
.d-hrstrip { display: flex; flex-direction: column; gap: 4px; }
.d-verdict { margin: 0; font-size: 13px; font-weight: 600; }
.d-why { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.d-keyrun { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding-top: 12px; border-top: 1px solid var(--line2); }
.d-keyrun .d-cap, .d-keyrun b { grid-column: 1; }
.d-keyrun b { font-size: 15px; font-weight: 600; }
.d-keyrun-num { grid-column: 2; grid-row: 1 / span 2; font-family: var(--cond); font-weight: 500; font-size: 24px; line-height: 1; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.d-keyrun-num small { margin-left: 4px; font-family: var(--body); font-size: 13px; color: var(--muted); }
.d-keyrun-line { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.d-nr-actions { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.d-how-targets { background: var(--card2); padding: 12px 14px; font-size: 14px; line-height: 1.45; }
.d-fact { margin: 0; font-family: var(--cond); font-weight: 500; font-size: 24px; line-height: 1.15; text-wrap: balance; }
.d-sowhat { color: var(--ink); }
.d-pager { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line2); }
.d-src { font-size: 12px; line-height: 1.35; color: var(--muted); }
.d-arrows { display: flex; align-items: center; gap: 8px; flex: none; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.d-arrows .d-iconbtn { width: 36px; min-height: 36px; }
.d-try-figs { display: flex; flex-wrap: wrap; gap: 3px; }
.d-try-figs img { display: block; width: 52px; height: 52px; background: #0d0d0c; }
.d-try-shape { display: flex; flex-direction: column; gap: 4px; }
svg.d-shape { display: block; width: 100%; height: 56px; }
.d-shape-words { display: flex; font-size: 12px; line-height: 1.3; color: var(--muted); }
.d-shape-words span { box-sizing: border-box; min-width: 0; padding-right: 6px; }
.d-because { display: flex; flex-direction: column; gap: 6px; }
.d-because-row { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.4; }
.d-check-icon { flex: none; width: 14px; height: 14px; margin-top: 3px; fill: none; stroke: var(--good); stroke-width: 2; }
.d-nope { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: var(--card2); font-size: 14px; font-weight: 600; }
.d-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.d-chip { min-height: 40px; padding: 0 12px; border: 1px solid var(--edge); background: transparent; color: var(--ink); font: 500 14px/1.2 var(--body); cursor: pointer; }
.d-chip:hover { border-color: var(--ink); }
.d-chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.d-chip:disabled { opacity: 0.45; cursor: default; }
.d-chip.d-quiet { border-color: transparent; color: var(--muted); }
.d-try-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.d-try-foot .d-note, .d-rp-send .d-note, .d-try-foot .d-error { margin: 0; }

/* Plan a run */
.d-rp { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; margin-top: 16px; }
.d-rp-form { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.d-rp-preview { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.d-daychip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 110px; min-height: 56px; padding: 8px 12px; text-align: left; }
.d-daychip b { font-family: var(--cond); font-weight: 600; font-size: 16px; line-height: 1.1; text-transform: uppercase; }
.d-daychip span { max-width: 16em; font-size: 12px; line-height: 1.3; opacity: 0.8; }
.d-hint { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.d-rp-target, .d-rp-clash { padding-top: 14px; border-top: 1px solid var(--line2); }
.d-rp-target { display: flex; flex-direction: column; gap: 6px; }
.d-rp-send { display: flex; flex-direction: column; gap: 10px; }
.d-rp-send .d-how { margin: 0; }
.d-rp .d-fine { margin: 0; font-size: 13px; color: var(--muted); }

@media (max-width: 1200px) {
  #tryCol { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .d-hero { font-size: 42px; }
  .d-daychip { min-width: calc(50% - 4px); }
}

/* A workout's own page (board B, Nov 26): How workouts went's rows open it. The big numbers in a row
   of tiles (one hero), then a chart with Pace / Heart rate / Elevation, splits, segments or sets on
   the left; zones, running form and effort on the right. Each block ends with a plain verdict. */
.d-wo li { display: block; padding: 0; }
.d-wo-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 16px; align-items: center; gap: 12px; width: 100%;
  padding: 11px 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.d-wo-row .what { min-width: 0; }
.d-wo-row .review { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.d-wcoach .h { margin: 0 0 6px; font-size: 16px; font-weight: 600; line-height: 1.4; }
.d-wcoach .l { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.d-wcoach .n { margin: 10px 0 0; font-size: 14px; font-weight: 600; line-height: 1.45; }
.d-wo-row:hover .title { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.d-chev { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; color: var(--muted); }
.d-wpage { display: flex; flex-direction: column; gap: 0; }
.d-wtop { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.d-wnav { display: flex; gap: 8px; }
.d-wnav .d-ghost { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 14px; text-align: left; }
.d-wnav .d-ghost > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.d-wnav #wOlder > span { text-align: right; }
.d-wnav .k { font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.d-wnav .t { max-width: 220px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; }
.d-wnav svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
.d-wpage .d-zone-edit { margin-top: 16px; margin-bottom: 8px; }
.d-wtitle { margin: 0 0 20px; font-family: var(--cond); font-weight: 600; font-size: 40px; line-height: 1.05; text-transform: uppercase; text-wrap: balance; }
.d-wbody { display: flex; flex-direction: column; gap: 20px; }
.d-wstats { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(5, minmax(0, 1fr)); gap: 2px; }
.d-wstat { background: var(--card2); padding: 14px 16px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-width: 0; }
.d-wstat .l { font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.d-wstat .v { font-family: var(--cond); font-weight: 500; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.d-wstat.hero { background: var(--card); border: 1px solid var(--line); }
.d-wstat.hero .v { font-weight: 600; font-size: 60px; }
.d-wverdict { margin: -6px 0 0; font-size: 14px; line-height: 1.45; font-weight: 500; }
.d-wnone { margin: 0; color: var(--muted); font-size: 15px; }
.d-wcols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.d-wcol { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.d-wsolo { max-width: 860px; }
.d-whead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; }
.d-wsmall { font-size: 12px; color: var(--muted); }
.d-wseg button { height: 40px; }
.d-wbox { position: relative; }
svg.d-wchart { display: block; width: 100%; height: auto; overflow: visible; }
.d-wchart .grid { stroke: var(--line2); stroke-width: 1; }
.d-wchart .avg { stroke: rgba(22, 22, 20, 0.55); stroke-width: 1.5; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.d-wchart .ln { stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.d-wchart .zb { fill-opacity: 0.1; }
.d-wchart .zb.z1 { fill: var(--z1); } .d-wchart .zb.z2 { fill: var(--z2); } .d-wchart .zb.z3 { fill: var(--z3); }
.d-wchart .zb.z4 { fill: var(--z4); } .d-wchart .zb.z5 { fill: var(--z5); }
.d-wy, .d-wavg { position: absolute; padding: 0 4px; background: rgba(255, 255, 255, 0.88); font-size: 11px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.d-wy { left: 0; transform: translateY(-50%); color: var(--muted); }
.d-wavg { right: 0; transform: translateY(-120%); font-size: 12px; font-weight: 600; }
.d-wx { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.d-wlegend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.d-wlegend span { display: inline-flex; align-items: center; gap: 6px; }
.d-wlegend i { width: 10px; height: 10px; opacity: 0.45; }
.d-wlegend .z1, .d-wz .z1 { background: var(--z1); } .d-wlegend .z2, .d-wz .z2 { background: var(--z2); } .d-wlegend .z3, .d-wz .z3 { background: var(--z3); }
.d-wlegend .z4, .d-wz .z4 { background: var(--z4); } .d-wlegend .z5, .d-wz .z5 { background: var(--z5); }
.d-wv { margin: 12px 0 0; font-size: 14px; line-height: 1.45; font-weight: 500; }
.d-sp, .d-sg { display: grid; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line2); font-size: 14px; font-variant-numeric: tabular-nums; }
.d-sp { grid-template-columns: 48px minmax(0, 1fr) 60px 44px 52px; }
.d-sg { grid-template-columns: 32px repeat(4, minmax(0, 1fr)); }
.d-sp.h, .d-sg.h { border-top: 0; padding: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.d-sp .n, .d-sg .n { color: var(--muted); }
.d-sp .pc { display: flex; align-items: center; gap: 10px; min-width: 0; }
.d-sp .pc b { flex: none; width: 52px; font-family: var(--cond); font-weight: 500; font-size: 19px; }
.d-sp .pc i { display: block; height: 8px; background: rgba(94, 125, 90, 0.45); }
.d-sp .pc i.best { background: var(--gold); }
.d-sp .r, .d-sg .r { text-align: right; }
.d-wset { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line2); }
.d-wset img, .d-wfig { display: block; width: 56px; height: 56px; object-fit: cover; background: var(--card2); }
.d-wset .nm { display: block; font-family: var(--cond); font-weight: 600; font-size: 18px; line-height: 1.2; }
.d-wset .ln { display: block; font-size: 14px; color: var(--muted); }
.d-wset .wt { font-family: var(--cond); font-weight: 500; font-size: 22px; text-align: right; white-space: nowrap; }
.d-wtarget { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.d-wz { display: grid; grid-template-columns: 26px minmax(0, 1fr) 58px 38px; align-items: center; gap: 10px; padding: 5px 0; }
.d-wz .z { font-family: var(--cond); font-weight: 600; font-size: 15px; }
.d-wz .t { position: relative; height: 10px; background: var(--card2); }
.d-wz .t i { position: absolute; left: 0; top: 0; bottom: 0; }
.d-wz .v { font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.d-wz .p { font-size: 12px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.d-wfm { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line2); }
.d-wfm .l { font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.d-wfm .v { grid-row: span 2; font-family: var(--cond); font-weight: 500; font-size: 24px; line-height: 1; text-align: right; white-space: nowrap; }
.d-wfm .v.good { color: var(--good); }
.d-wfm .note { font-size: 13px; line-height: 1.35; color: var(--muted); }
.d-wfm .note.watch { color: var(--wait); }
.d-wfine { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.d-wmo { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line2); font-size: 14px; }
.d-wmo b { font-variant-numeric: tabular-nums; text-align: right; }
.d-wtrust { margin: 20px 0 0; font-size: 13px; color: var(--muted); }

@media (max-width: 1100px) {
  .d-wstats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .d-wstat.hero { grid-column: span 3; }
  .d-wcols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .d-wnav { width: 100%; }
  .d-wnav .d-ghost { flex: 1 1 0; min-width: 0; }
  .d-wnav .t { max-width: none; }
  .d-wtitle { font-size: 32px; }
  .d-wstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-wstat.hero { grid-column: span 2; }
  .d-wstat.hero .v { font-size: 52px; }
  .d-wseg { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .d-wseg button { min-width: 0; padding: 0 6px; }
  .d-sp { grid-template-columns: 40px minmax(0, 1fr) 44px 48px; }
  .d-sp > :nth-child(3) { display: none; }
  .d-sg { grid-template-columns: 24px repeat(4, minmax(0, 1fr)); gap: 8px; font-size: 13px; }
}
@media (max-width: 520px) {
  .d-wo-row { grid-template-columns: 52px minmax(0, 1fr) auto 14px; gap: 10px; }
}
