/* Roasta Raw — layout and components. Handwritten CSS, no framework. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
  /* every digit sits in the same column as the digit above it: without this a
     1 is narrower than a 0 and no column of numbers can be read down */
  font-variant-numeric: tabular-nums;
}

button, a, select, input { -webkit-tap-highlight-color: transparent; }
button:focus, a:focus, select:focus, input:focus { outline: none; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

a { color: inherit; }

.shell {
  max-width: var(--max);
  margin: 0 auto;
  background: var(--paper);
  min-height: 100vh;
}

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px var(--gut);
  background: var(--paper-2);
  border-bottom: 1.5px solid var(--rule);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.brand-mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  padding: 0;
}
.brand-mark svg { width: 26px; height: 26px; display: block; }

.brand-text { text-align: left; line-height: 1.1; }
.brand-name {
  display: block;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-weight: 700;
}
.brand-sub {
  display: block;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .18em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.jump {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: var(--topbar-btn);
  height: var(--topbar-btn);
  padding: 0 9px;
  border: 1.5px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
.jump:hover { background: var(--ink); color: var(--paper); }
/* The topbar pair is one size: `.jump` above and `.share-btn` in share.css both
   read --topbar-btn from tokens.css. The old `.topbar .share-btn` override is
   gone — it won a specificity race against share.css and kept 34px alive only
   while both files loaded in this order (P7 debt, closed 2026-11-22). */
.jump-dot {
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
}
.jump-label { font-weight: 400; }

/* ------------------------------------------------------------------- view */
.view { padding: 0 var(--gut) 28px; }

/* ============================================================
   Roasta Raw — Breadcrumbs + week strip (owner order 2026-11-19)
   ============================================================
   Both rows now follow the RPL #wkprog pattern: flat 8px coloured
   bands on a shared visual language — path/current = solid band
   (current gets the soft ink ring), pending = 42% muted band,
   deload = hatch, test = dot. No numbers anywhere: crumb labels
   stay in the DOM as sr-only text (plus title tooltips), and the
   week count moved out of the bands entirely. Colours come only
   from tokens.css via --seg. History: the "big thunder blocks"
   bug (2026-11-18) was flex-basis + percentage height; fixed-size
   bands cannot recur it.
   ============================================================ */

/* Breadcrumbs: compact text anchor + lettered B / W / D groups (owner order
   2026-11-21, T261121-04). The Annual and Cycle squares are gone; the cycle is
   named once in small mono ("Odyssey · Cut-83") and still links to #/cycle.
   Path levels are solid, pending levels sit at 30% in paper-2, the current
   level gets the soft ring, a rest day is a 12% ghost that cannot be pressed.
   The cells are deliberately under the 44px touch rule by owner order — the
   documented crumb-tile exception; the class name is unchanged so the
   exemption stays scoped to this row. */
/* The row itself is a stacking context above the strip: the scroll box below is
   pulled up by a negative margin, so without this its transparent 44px thumb
   area would sit on top of the last few pixels of the crumb row and steal taps
   from the day cells (found by elementFromPoint, T261121-04b). */
.crumbs {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 12px;
  /* two breathing seams, not one: 5px above (the tallest day cell used to ride
     1px under the topbar rule) and 4px below, where the band ring used to start
     half a pixel under the descender of "Odyssey" and read as one thick block */
  margin: 5px 0 4px;
}
.crumbs-list {
  display: flex;
  align-items: center;
  justify-content: center;
  /* siblings inside one level ride the same 2px gap as the week strip */
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* one muted letter per level; it replaces the old dot separators so the row
   reads B2 W5 D3 the way a path is written */
.crumb-prefix {
  flex: none;
  font: 400 8px/1 var(--mono);
  letter-spacing: .1em;
  color: var(--ink-3);
  opacity: .68;
  padding: 0 3px 0 1px;
}
.crumb.crumb-nav-label {
  flex: 0 0 auto;
  width: auto;
  height: auto;
}
.crumb-label {
  display: block;
  font: 400 9px/1 var(--mono);
  letter-spacing: .05em;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  padding-right: 5px;
  /* T261121-05: the name is reader-editable, so it must never push the row
     past 320px — a long "Annual · Cycle" truncates with an ellipsis instead */
  max-width: 30vw;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .16s var(--ease);
}
.crumb-label:hover { color: var(--ink); }
.crumb {
  flex: none;
  box-sizing: border-box;
  width: 14px;
  height: 12px;
}
.crumb-tile {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 1px;
  background: var(--seg);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s var(--ease), box-shadow .16s var(--ease), opacity .16s var(--ease);
}
.crumb-tile:hover { opacity: .8; }

/* pending = quiet band: the level's own colour at 55% over the page, which
   stays muted in dark too (mixing into --paper-2 read as solid there) */
.crumb.is-pending .crumb-tile {
  background: color-mix(in srgb, var(--seg) 42%, transparent);
}

/* current = solid + soft ring; the ring rides inside the tile (inset) so it
   cannot bleed onto the siblings it touches */
.crumb.is-current .crumb-tile {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 34%, transparent);
}

/* rest day: a pale ghost that is still a door — the seven cells are a full
   week of ways down (`#/rest/<weekId>/<1..7>`), never a disabled blank */
.crumb.is-rest .crumb-tile {
  background: color-mix(in srgb, var(--ink-3) 12%, transparent);
  cursor: pointer;
}
.crumb.is-rest .crumb-tile:hover {
  opacity: 1;
  background: color-mix(in srgb, var(--ink-3) 24%, transparent);
}

/* the rest day you are reading: ring + one step brighter, still grey so it
   never reads as a session cell */
.crumb.is-current.is-rest .crumb-tile {
  background: color-mix(in srgb, var(--ink-3) 30%, transparent);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 55%, transparent);
}

/* ---- three shapes that must read apart at a glance (owner order 2026-11-21)
   B = a 26x8 framed rail split by 1px seams into one segment per block (the
   block you are on solid, the rest at 42%); W = a 20x8 flat band, i.e. the very
   band the strip below paints (same colour token, same deload hatch, same test
   dot); D = the seven 14x12 cells. No colour change between them — only shape
   and containment, so the row still reads as one line. */
.crumb.crumb-b,
.crumb.crumb-w { display: flex; align-items: center; }
.crumb.crumb-b { width: 26px; }
.crumb.crumb-w { width: 20px; }

.crumb-bframe {
  display: flex;
  box-sizing: border-box;
  width: 100%;
  height: 8px;
  gap: 1px;
  padding: 1px;
  border: 1px solid color-mix(in srgb, var(--ink) 26%, transparent);
  border-radius: 1px;
  background: none;
}
/* the rail as one link (Block / Week / Day): a 4.8px segment is not a target,
   so the whole 26x8 frame is the way up one level */
.crumb-blink {
  text-decoration: none;
  cursor: pointer;
}
.crumb-blink:hover { opacity: .82; }

/* the block level on Cycle: four independent 26x8 framed bars, one way down
   each, so the cycle page never needs a week or a day group */
.crumb-bchip {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 8px;
  border: 1px solid color-mix(in srgb, var(--ink) 26%, transparent);
  border-radius: 1px;
  background: color-mix(in srgb, var(--seg) 42%, transparent);
  text-decoration: none;
  cursor: pointer;
  transition: opacity .16s var(--ease), background-color .16s var(--ease);
}
.crumb-bchip:hover { opacity: .82; }
.crumb-bchip.is-current { background: var(--seg); }
:root[data-theme="dark"] .crumb-bchip:not(.is-current) {
  background: color-mix(in srgb, var(--seg) 50%, transparent);
}
.crumb-seg {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  border-radius: 0;
  background: color-mix(in srgb, var(--seg) 42%, transparent);
}
.crumb-seg.is-current { background: var(--seg); }
.crumb-seg:hover { opacity: .82; }
/* Dark only: 42% of a saturated seg over #0F1216 made the pending block segments
   read as dead pixels, so the rail rides one step brighter there (owner order
   2026-11-21, T261121-04 round 4). Scoped with :not(.is-current) on purpose —
   an attribute-qualified selector outranks .crumb-seg.is-current and would
   wash the current segment back to 50%, which is exactly what the rail must
   never do. Light keeps the 42% every other band uses. */
:root[data-theme="dark"] .crumb-seg:not(.is-current) {
  background: color-mix(in srgb, var(--seg) 50%, transparent);
}

.crumb-wbar {
  width: 100%;
  height: 8px;
  border-radius: 1px;
  background: var(--seg);
}
.crumb-wbar.is-pending { opacity: .72; }
.crumb-wbar.is-deload {
  background:
    repeating-linear-gradient(-45deg, transparent 0 3px, var(--green) 3px 4.4px) center / 100% 8px no-repeat,
    linear-gradient(var(--green-wash), var(--green-wash)) center / 100% 8px no-repeat;
  opacity: 1;
}
.crumb-wbar.is-test {
  background:
    radial-gradient(circle at 50% 50%, var(--purple) 0 2px, transparent 2.5px) center / 100% 8px no-repeat,
    linear-gradient(var(--paper-2), var(--paper-2)) center / 100% 8px no-repeat;
  opacity: 1;
}
.crumb-wbar:hover { opacity: .85; }
/* the block level's week bars: same band, one per week, each its own way down
   (the class exists so the probe can tell a chip from the single week bar) */
.crumb-wchip { text-decoration: none; cursor: pointer; }

/* 320px only: cells and bars shrink a hair, seams tighten — the whole row has
   to fit 292px of content without wrapping or a scrollbar. */
@media (max-width: 340px) {
  .crumb { width: 13px; }
  .crumb.crumb-b { width: 24px; }
  .crumb.crumb-w { width: 18px; }
  .crumbs-list { gap: 1px; }
  .crumb-prefix { padding: 0 2px 0 0; }
}

/* ---------------------------------------------------------- week strip
   Thirteen flat bands, one per week. The strip now sits directly under the
   crumbs and is only as tall as the crumbs row: the bands fill most of the
   track, so the eye reads one nav stack instead of a small row floating above
   a tall one. */
.strip { margin: 0; }

.strip-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 2px;
  padding: 0;
  border: 0;
  background: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.strip-track::-webkit-scrollbar { display: none; }

/* Long cycles (13+ weeks) cannot fit 36px bands at phone width, so the track
   becomes one scrollable group per block. The bands stay 8px-high marks, but the
   element around them is 44px tall for the thumb: the scroll box is 44px and
   pulled back by negative margins, so the strip still occupies 12px of layout
   (the crumbs row above it is 12px plus a 3px seam) and the rest is transparent
   touch area — which is why the crumb row carries z-index: 2 above it. */
.strip-track.is-segmented {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-block: -16px;
  /* the current-week ring is drawn 2px outside the 44px button, so the scroll
     box needs a gutter or its own clip chops the left border of the first
     week into a "]"; 3px leaves the ring 1px inside the padding box */
  padding-inline: 3px;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
}

.strip-track.is-segmented .strip-group {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
}

.strip-track.is-segmented .strip-week {
  flex: 0 0 auto;
  height: 44px;
  min-width: 44px;
  scroll-snap-align: center;
}

/* the 2px seam inside a group is part of the band's tap target; it lives only
   in the 12px visual band (16px inset each side), so the dark --paper gap
   cannot slice through the crumbs and the card above the strip */
.strip-track.is-segmented .strip-week::after {
  content: "";
  position: absolute;
  inset: 16px -1px;
}

.strip-track.is-segmented .strip-week.is-block-start::before { display: none; }

/* The current-week ring has the same problem as the seam: the button is 44px
   tall for the thumb, so a plain box-shadow paints 2px of ring 14px above and
   below the 8px band — straight across the crumbs and the card edge above the
   strip. In segmented mode the ring moves onto the band-sized ::after box, and
   the 3px padding-inline on the track keeps its outer stroke inside the clip. */
.strip-track.is-segmented .strip-week.is-current { box-shadow: none; }
.strip-track.is-segmented .strip-week.is-current::after {
  inset: 16px -2px;
  border-radius: 1px;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ink) 16%, transparent);
}

.strip-week {
  position: relative;
  min-height: 14px;
  min-width: 0;
  border: 0;
  background: linear-gradient(var(--seg, var(--ink)), var(--seg, var(--ink))) center / 100% 8px no-repeat;
  opacity: .72;
  cursor: pointer;
  padding: 0;
  transition: opacity .16s var(--ease);
}
.strip-week:hover { opacity: 1; }
.strip-week.is-deload,
.strip-week.is-taper {
  background:
    repeating-linear-gradient(-45deg, transparent 0 3px, var(--green) 3px 4.4px) center / 100% 8px no-repeat,
    linear-gradient(var(--green-wash), var(--green-wash)) center / 100% 8px no-repeat;
  opacity: 1;
}
.strip-week.is-test {
  background:
    radial-gradient(circle at 50% 50%, var(--purple) 0 2px, transparent 2.5px) center / 100% 8px no-repeat,
    linear-gradient(var(--paper-2), var(--paper-2)) center / 100% 8px no-repeat;
  opacity: 1;
}
.strip-week.is-current {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 1px;
  opacity: 1;
}
.strip-week.is-block-start::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 4px;
  height: 8px;
  width: 2px;
  background: var(--paper-2);
  opacity: .9;
}

.kicker {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}

/* ------------------------------------------------------------------- hero */
.hero {
  margin-top: 8px;
  border: 1.5px solid var(--rule);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 13px 13px 0;
  position: relative;
  overflow: hidden;
}

.hero-head { display: flex; align-items: flex-start; gap: 10px; }
/* the id/date line and the chips beside it share one line: bodyweight + the
   conditioning score are two small numbers, not a row of their own */
.hero-subrow { display: flex; align-items: center; gap: 6px 8px; margin-top: 7px; flex-wrap: nowrap; }
.hero-subrow .hero-sub {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .16em;
  color: var(--ink-3);
}
.hero-title {
  font-family: var(--display);
  font-size: 30px;
  line-height: .94;
  letter-spacing: -.01em;
  text-transform: uppercase;
  margin: 4px 0 0;
  font-weight: 700;
}
.hero-title small {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .16em;
  color: var(--ink-3);
  margin-top: 6px;
  font-weight: 400;
}
/* Kept whole so the reader finishes the sentence: the rest-day line breaks in
   front of the phrase, never inside it (owner report at 361px, "NO / SESSION").
   The phrase is shorter than the title column even at 320, so nowrap cannot
   widen the page — narrow_probe.js asserts exactly that on every route. */
.u-nobrk { white-space: nowrap; }

.hero-range {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-2);
  margin: 8px 0 0;
  letter-spacing: .04em;
}

/* week/day stamp plate, ported from the day share card: W-over-D in a ruled
   square, tilted, the double inset rule reads as pressed ink, not a chip */
.hero-stamp {
  flex: none;
  /* owner ruling 2026-11-19: ride below the top edge, level with the title */
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  background: none;
  transform: rotate(-3.2deg);
  box-shadow: inset 0 0 0 2px var(--card), inset 0 0 0 3px var(--ink);
}
.hero-stamp b,
.hero-stamp i {
  font: 700 12px/1 var(--display);
  font-style: normal;
  letter-spacing: .02em;
  color: var(--ink);
  /* the tilt inflates the rotated text rect by ~1px; side padding keeps the
     gate's clip probe from reading the number as cut */
  padding: 0 4px;
}
.hero-stamp i {
  padding-top: 3px;
  border-top: 1px solid var(--ink);
}

/* cycle mileage: one segment per block, filled to this session, current
   session marked in red; the count lives in the caption text. The card's
   8.5/8px type steps up to the page's 9px floor. */
.day-mile { margin-top: 10px; }
.day-mile-cap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1;
  letter-spacing: .1em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.day-mile-bar { display: flex; gap: 2px; height: 6px; }
.day-mile-seg {
  position: relative;
  background: color-mix(in srgb, var(--seg) 22%, var(--card));
}
.day-mile-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--seg) 70%, var(--ink));
}
.day-mile-now {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  margin-left: -1px;
  background: var(--red);
}
.day-mile-labels {
  display: flex;
  gap: 2px;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1;
  letter-spacing: .06em;
  color: var(--ink-3);
}
.day-mile-labels span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-mile-labels span:last-child { text-align: right; }

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--hair);
  margin-top: 11px;
}
.metrics.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric {
  display: flex;
  flex-direction: column;
  padding: 8px 10px 9px;
  min-width: 0;
}
.metric:first-child { padding-left: 0; }
.metric + .metric { border-left: 1px solid var(--hair); }
.metrics.cols-2 .metric + .metric { border-left: 1px solid var(--hair); }
.metric-label {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.metric-value {
  display: block;
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  font-weight: 700;
  letter-spacing: -.02em;
  white-space: nowrap;
}
/* .long carries values that are inherently wide ("87.5 → 72.5", "60–95"). It may
   wrap at its spaces instead of being cut: on a 320px screen a third of the row is
   78px while this value needs 91px even at 18px, and a clipped reading of the
   bodyweight pair is worse than a second line. line-height is set so an 18px line
   still occupies the 23.1px box a 22px line does — otherwise the sub line below it
   sits 4px higher than its neighbours. */
.metric-value.long { font-size: 18px; letter-spacing: -.03em; white-space: normal; line-height: 1.283; }
.metric-value small { font-size: 11px; letter-spacing: .04em; font-weight: 400; color: var(--ink-2); margin-left: 3px; }
.metric-sub { font-family: var(--mono); font-size: 9px; color: var(--ink-3); letter-spacing: .01em; margin-top: auto; }
/* On the narrowest phones the bodyweight pair wraps, which would drop that cell's
   sub line below its neighbours'. Stack the cells and pin the sub to the bottom so
   all three still finish on one line. Scoped to this width so nothing changes on
   normal screens. */
/* The narrow tiers read 360px, but the device this app is tuned for is 361 CSS
   px wide (Agent.md §1.2), so every compact rule missed it by one pixel and the
   info band shipped ellipsized labels on the real phone. 362 covers 361 and
   nothing above it. Same correction on the three tiers below. */
@media (max-width: 360px) {
  .metric { display: flex; flex-direction: column; }
  .metric-sub { margin-top: auto; }
}

/* -------------------------------------------------------------- week strip */
/* ----------------------------------------------------------------- section */
.section { margin-top: 22px; }
.section-head {
  border-top: 1.5px solid var(--rule);
  padding-top: 7px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.section-head-txt { display: flex; flex-direction: column; gap: 2px; }
.section-no {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.section-title {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: .01em;
  text-transform: uppercase;
  margin: 0;
  font-weight: 700;
  /* a rule title is one thought: balanced breaks beat an orphan word
     ("… / NEXT" alone on line two) */
  text-wrap: balance;
}
.section-note {
  font-size: 10px;
  line-height: 1.45;
  color: var(--ink-3);
  max-width: 46%;
  text-align: right;
  margin: 0 0 2px;
  text-wrap: pretty;
}
@media (max-width: 560px) {
  .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 5px;
  }
  .section-note {
    max-width: none;
    text-align: left;
    margin: 0;
  }
}

/* ------------------------------------------------------------------- cards */
.cards { display: flex; flex-direction: column; gap: 8px; margin-top: 9px; }

.card {
  display: block;
  width: 100%;
  text-align: left;
  border: 1.5px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  padding: 9px 10px 9px 12px;
  position: relative;
  cursor: pointer;
  text-decoration: none;
}
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--seg, var(--ink));
}
.card:hover { background: var(--card-2); }
.card.is-current { box-shadow: var(--shadow-sm); }

.card-top {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.card-code {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--ink-3);
}
.card-name {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: .01em;
  text-transform: uppercase;
  margin: 0;
  font-weight: 700;
}
.card-tag {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 2px 4px;
  border: 1px solid currentColor;
  color: var(--seg, var(--ink));
  white-space: nowrap;
}
.card-tag.is-solid {
  background: var(--seg);
  color: var(--paper);
  border-color: var(--seg);
}
/* PR29-B: an outlined hero tag keeps the tier hue on its border, but the text
   itself must clear 4.5:1 in both themes (the green/yellow segment hues do not) */
.hero .card-tag:not(.is-solid) {
  color: var(--ink);
  border-color: var(--seg, var(--ink));
}
.card-body {
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--ink-2);
  margin: 4px 0 0;
}
.card-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.fact-pair {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 10px;
  min-width: 0;
}
.fact {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .04em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.fact b {
  font-family: var(--display);
  font-size: 13px;
  color: var(--ink);
  margin-right: 4px;
  font-variant-numeric: tabular-nums;
}
.card-open {
  display: block;
  text-align: right;
  margin-top: 5px;
  position: static;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .12em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.today-pill {
  position: absolute;
  top: -1.5px;
  right: -1.5px;
  padding: 2px 6px;
  background: var(--red);
  color: #fff;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.rest-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 9px 9px;
  border-bottom: 1px solid var(--hair-2);
  background: none;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
.rest-row:hover { background: color-mix(in srgb, var(--ink-3) 8%, transparent); }
.rest-row:hover .dim { color: var(--ink-2); }
.rest-row span:first-child { color: var(--ink-2); }

/* ------------------------------------------------------------- move cards */
.move {
  border: 1.5px solid var(--rule);
  background: var(--card);
  position: relative;
  padding: 8px 10px 9px 12px;
  margin-top: 8px;
}
.move::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--seg, var(--ink));
}
.move-top { display: flex; align-items: baseline; gap: 7px; }
.move-seq {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--ink-3);
  min-width: 12px;
}
/* Step 11 — a competition main lift wears its silhouette before the name.
   The box is fixed to the 22px artwork so the row height is unchanged. */
.move-icon { display: inline-flex; width: 22px; height: 22px; flex: 0 0 auto; align-self: center; color: var(--ink); margin-right: 3px; }
.move-icon svg { display: block; }

/* Owner brief 2026-11-23 — right-hand group: IPF plate badge, DEMO, tier tag.
   The header wraps instead of squeezing: at 320 px the group drops to its own
   right-aligned line (the measured budget says one line cannot hold it). */
.move-top { flex-wrap: wrap; row-gap: 4px; }
.move-right { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }
.ipf-plate-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 16px; padding: 0 4px;
  font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: .04em; line-height: 1;
  color: #FFFFFF; background: var(--plate-color, var(--ink-3));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.ipf-plate-badge.is-neutral { color: var(--ink-2); background: none; box-shadow: inset 0 0 0 1px var(--hair); }
.demo-btn {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .06em; line-height: 1;
  color: var(--ink-2); background: none;
  padding: 3px 5px; border: 1px solid var(--hair);
  cursor: pointer;
}
.demo-btn:hover { border-color: var(--ink); color: var(--ink); }
.move-demo-drawer {
  margin: 7px 0 8px; padding: 8px;
  background: var(--paper-2);
  border-top: 1px dashed var(--hair); border-bottom: 1px dashed var(--hair);
  display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: center;
}
.move-demo-drawer[hidden] { display: none; }
.opengym-stage {
  width: 92px; height: 92px; background: var(--card);
  border: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.opengym-media { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
/* the clips are drawn black-on-white line art; multiply can only darken, so on
   the dark card they would vanish into the panel — invert the ink instead */
:root[data-theme="dark"] .opengym-media { mix-blend-mode: normal; filter: invert(.92) hue-rotate(180deg); }
.opengym-empty { font-family: var(--mono); font-size: 7.5px; letter-spacing: .1em; color: var(--ink-3); }
.move-cues { margin: 0; padding-left: 14px; font-family: var(--mono); font-size: 8.5px; line-height: 1.5; color: var(--ink-2); }
.move-cues li + li { margin-top: 3px; }
/* two colour layers, two meanings: the card's left rule is the TIER colour
   (main / variant / accessory, i.e. what kind of work), while the plate glyph
   and the IPF badge carry the INTENSITY colour (--plate-color, i.e. how heavy).
   Never let the plate colour repaint the tier rule (owner, 2026-11-23). */
.move-name {
  font-family: var(--display);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .01em;
  margin: 0;
  font-weight: 700;
  line-height: 1.15;
}
.move-mode {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
  border-bottom: 1px solid var(--hair);
  white-space: nowrap;
}
.move-note p { margin: 0; }
.move-note p + p { margin-top: 1px; }
.move-note {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
  margin: 3px 0 0;
  letter-spacing: .02em;
}
/* the recommended warm-up ramp (owner order 2026-11-19): advice, not a
   prescription row — one quiet band between the heading and the sheet,
   never a control, never a colour that competes with the work sets */
.move-warm {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 4px 7px;
  background: var(--card-2);
  border-bottom: 1px dashed var(--hair);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .03em;
  color: var(--ink-3);
}
.move-warm b {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--ink-2);
}
.segs { margin-top: 6px; border-top: 1px solid var(--hair-2); }
.seg {
  display: grid;
  grid-template-columns: 1.25fr .9fr .95fr .8fr .75fr;
  gap: 4px;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px solid var(--hair-2);
}
.seg:last-child { border-bottom: 0; }
.seg-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.seg-sets {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.seg-load {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.seg-load small { font-family: var(--mono); font-size: 9px; font-weight: 400; color: var(--ink-3); }
/* PR-A D5: meet-day attempt segments read TARGET RANGE, not a computed kg —
   mono at the pct/rpe size, single line: the phrase must never wrap across
   two rows on the test-day card, nor clip at 320 (checked by narrow_probe) */
.seg-load.seg-attempt {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.2px;
  color: var(--ink-2);
  white-space: nowrap;
}
.seg-pct {
  font-family: var(--mono);
  font-size: 9px;
  text-align: right;
  color: var(--ink-2);
}
.seg-rpe {
  font-family: var(--mono);
  font-size: 9px;
  text-align: right;
  color: var(--ink-3);
}
.seg.cols-4 { grid-template-columns: 1.3fr 1fr 1fr .8fr; }
.seg.cols-3 { grid-template-columns: 1.3fr 1fr .9fr; }
/* general accessory: one line, no load, no intensity, no RPE */
.move-brief {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid var(--hair-2);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}
.move-accessory_minor .move-name { font-size: 12.5px; }
.move-accessory_minor { padding-top: 7px; padding-bottom: 8px; }

/* ------------------------------------------------------------------ ring */
.main-lift {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--hair-2);
}
.main-lift:last-child { border-bottom: 0; }

.rings { display: flex; gap: 6px; flex: none; }
.ring { width: 62px; text-align: center; }
/* the prescription band under the ring: a supplement to the arc's own tier
   colour, never a replacement — the arc stays the base reading */
.ring-band {
  display: block;
  width: 26px;
  height: 3px;
  margin: 4px auto 0;
  border-radius: 1px;
}
.ring-band[data-band="low"] { background: var(--green); }
.ring-band[data-band="mid"] { background: var(--yellow); }
.ring-band[data-band="high"] { background: var(--blue); }
.ring-band[data-band="max"] { background: var(--red); }
/* a max attempt past the tested 1RM: the ring closes and turns purple */
.ring.is-over svg circle:nth-child(2) { stroke: var(--purple); }
.ring.is-over .ring-label { color: var(--purple); }
.ring svg { display: block; width: 62px; height: 62px; }
/* three rings (test day) drop to their own row so the lift names keep the full width */
.rings.three { flex: 1 1 100%; justify-content: flex-end; gap: 10px; margin-top: 2px; }
.rings.three .ring { width: 52px; }
.rings.three .ring svg { width: 52px; height: 52px; }
/* a third ring means narrower boxes: the label drops a step so "SQ · 142.5 kg"
   never spills past its ring */
.rings.three .ring-label { font-size: 6px; letter-spacing: 0; }
.ring-label {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 2px;
  white-space: nowrap;
}

/* ----------------------------------------------------------------- charts */
/* Figure language: one shared rule, no nested cards, one ink family. This is
   the Nature-style reading: the data, axes and labels carry the hierarchy; the
   container stays quiet. */
.chart,
.cap,
.cap2 {
  border: 0;
  border-top: 1.5px solid var(--rule);
  background: transparent;
  box-shadow: none;
}
.chart {
  margin-top: 14px;
  padding: 9px 0 4px;
}
.cap {
  margin-top: 14px;
}
.cap2 {
  margin-top: 14px;
}
.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--hair-2);
}
.cap2-head {
  border-bottom: 1px solid var(--hair);
}
.chart-title {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
  line-height: 1.4;
  text-wrap: balance;
}
.chart-key {
  display: flex;
  gap: 8px;
  font-family: var(--mono);
  font-size: 7.5px;
  color: var(--ink-3);
  flex: none;
}
.chart-key i {
  display: inline-block;
  width: 8px;
  height: 2px;
  margin-right: 3px;
  vertical-align: middle;
}
.chart svg { display: block; width: 100%; height: auto; }

.cap {
  margin-top: 14px;
  border: 0;
  border-top: 1.5px solid var(--rule);
  background: transparent;
}
/* Width here is the widest block name ("INTENSIFICATION" at 8.5px/.1em = 83px)
   plus a little air: the column used to be 52px and every row overflowed it, with
   the label printing straight over the bars. Rows are separate grids, so this must
   stay one shared number — max-content would misalign the bars row to row. */
.cap-row {
  display: grid;
  grid-template-columns: 88px 1fr 74px;
  gap: 7px;
  align-items: center;
  padding: 7px 10px;
  border-bottom: 1px solid var(--hair-2);
}
.cap-row:last-child { border-bottom: 0; }
.cap-totals {
  display: flex;
  gap: 10px;
  padding: 7px 10px;
  border-top: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.cap-totals b { font-family: var(--display); font-size: 13px; color: var(--ink); margin-right: 2px; }
.cap-note { margin: 4px 0 0; font-family: var(--mono); font-size: 9px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
/* one caption line per figure: what, unit, scale, source */
.chart-cap { margin: 6px 2px 0; font-family: var(--mono); font-size: 9px; line-height: 1.45; color: var(--ink-3); letter-spacing: .02em; }
.chart-cap b { color: var(--ink-2); font-weight: 700; }
/* the provenance line directly under a caption: n, scope, plan version */
.chart-src { display: block; margin-top: 3px; font-size: 8px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
/* a table is titled above, a figure captioned below */
.table-cap { margin: 10px 0 0; font-family: var(--mono); font-size: 9px; line-height: 1.45; color: var(--ink-2); letter-spacing: .02em; }

h1, h2, h3 { text-wrap: balance; }

/* capacity bar rows for W-Stat-1 */
.bars { margin-top: 9px; border: 1.5px solid var(--rule); background: var(--card); padding: 9px 10px 10px; }
.bar-row {
  display: grid;
  grid-template-columns: 54px 1fr 74px 30px;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--hair-2);
}
.bar-row:last-child { border-bottom: 0; }
.bar-name {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.bar-track { position: relative; height: 14px; background: var(--hair-2); }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); opacity: .84; }
.bar-fill.hatch {
  background: repeating-linear-gradient(-45deg, transparent 0 3px, var(--ink) 3px 4.4px);
  opacity: .7;
}
/* the variant part of a lift's equivalent volume: same ink, drawn as ruled
   diagonal fill so the joined bar still reads as one number */
.bar-fill.fill-var {
  background: repeating-linear-gradient(-45deg, transparent 0 3.2px, var(--ink) 3.2px 4.4px);
  opacity: .42;
}
.bar-mark {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 1px;
  background: var(--ink-3);
}
.bar-mark.mrv { background: var(--red); }
.bar-mark small {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: .04em;
  color: var(--ink-3);
  white-space: nowrap;
}
.bar-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: right;
  font-family: var(--mono);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  color: var(--ink-3);
  white-space: nowrap;
}
.bar-meta b { font-weight: 400; color: var(--ink-2); }
.bar-meta i { font-style: normal; color: var(--ink-3); white-space: normal; }
.bar-num {
  font-family: var(--mono);
  font-size: 9px;
  text-align: right;
  color: var(--ink-2);
}
.bar-num b { font-family: var(--display); font-size: 15px; color: var(--ink); }

/* 16-leaf board */

.leaf-board {
  margin-top: 9px;
  border: 1.5px solid var(--rule);
  background: var(--card);
  padding: 2px 10px 6px;
}
.leaf-row {
  display: grid;
  grid-template-columns: 74px 1fr 76px 50px;
  gap: 7px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--hair-2);
}
.leaf-row:last-child { border-bottom: 0; }
.leaf-name {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-2);
  line-height: 1.25;
  overflow-wrap: break-word;
}
.leaf-track { position: relative; height: 15px; background: var(--hair-2); }
.leaf-fill { position: absolute; left: 0; top: 0; bottom: 0; }
/* MEV / MRV are posts cut through the one bar, never a rail riding above it:
   the MRV post runs past the track, the MEV post stops at its edge. */
.leaf-post {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 1px;
  background: var(--ink);
  opacity: .45;
  z-index: 2;
}
.leaf-post.mrv { width: 1.5px; opacity: .9; }
.leaf-tick {
  position: absolute;
  top: 0;
  width: 1.5px;
  height: 5px;
  background: var(--ink-2);
  opacity: .75;
  margin-left: -.75px;
}
.leaf-tick.mrv { height: 5px; background: var(--ink); opacity: .95; }
.leaf-tick.mev20 {
  top: 4px;
  height: 7px;
  background: var(--ink);
  opacity: .35;
}
.leaf-fill.over { background: var(--red); opacity: .75; }
.leaf-fill.in { background: var(--green); opacity: .7; }
.leaf-fill.under { background: var(--yellow); opacity: .75; }
.leaf-fill.untrained { background: var(--hair); opacity: .4; }
.leaf-fill.plain { background: var(--ink-2); opacity: .45; }
.leaf-fill.neutral { background: var(--ink); opacity: .5; }
.leaf-val {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 5px;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 9px;
  text-align: right;
  color: var(--ink-2);
}
.leaf-val b { font-family: var(--display); font-size: 12.5px; color: var(--ink); }
.leaf-val i { font-style: normal; font-size: 9px; color: var(--ink-3); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.leaf-share { font-family: var(--mono); font-size: 8px; color: var(--ink-3); letter-spacing: .04em; }

/* day muscle distribution */
.dist { margin-top: 9px; border: 1.5px solid var(--rule); background: var(--card); padding: 9px 10px 10px; }
.dist-row {
  display: grid;
  grid-template-columns: 84px 1fr 34px;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid var(--hair-2);
}
.dist-row:last-child { border-bottom: 0; }
.dist-name {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.dist-track { height: 8px; background: var(--hair-2); position: relative; }
.dist-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); opacity: .82; }
.dist-num { font-family: var(--mono); font-size: 9px; text-align: right; color: var(--ink-2); }
.dist-empty {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
  padding: 6px 0;
}

/* ---------------------------------------------------------------- anchor rows */
.folds { margin-top: 10px; }
.fold {
  border-top: 1px solid var(--hair);
}
.fold summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary:hover { color: var(--ink); }
.fold[open] summary { color: var(--ink); }
.fold summary span:last-child { color: var(--ink-3); font-size: 8px; }
.fold-body { padding: 0 0 6px; }
.anchor-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--hair-2);
}
.anchor-row:last-child { border-bottom: 0; }
.anchor-name {
  font-family: var(--display);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .01em;
  font-weight: 700;
}
.anchor-note {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
  margin-left: auto;
}
.anchor-val {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 52px;
  text-align: right;
}

/* 1RM page (#/1rm): one sheet, hairline rows. Phase B makes every row a
   control, so the row is back to a 44px hit area and the value carries the
   same KG suffix as the rest of the app (uppercase via text-transform). */
.fold-open { margin: 6px 0 8px; }
.db-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-decoration: none;
}
.db-back:hover { color: var(--ink); }
/* .hero carries no bottom padding because every other view ends its card on a
   panel that brings its own space; the 1RM sheet ends on the title, so the
   modifier gives that one card the room the baseline needs */
.hero.is-tail { padding-bottom: 13px; }
.db-filters { margin-top: 10px; }
.db-filter { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.db-filter-label {
  flex: 0 0 34px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .16em;
  color: var(--ink-3);
}
.db-filter .seg-ctl { flex: 1; gap: 4px; }
.db-search-row { display: flex; align-items: stretch; gap: 6px; margin-top: 8px; }
.db-search {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--hair);
  background: var(--card-2);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  padding: 0 10px;
}
.db-search::placeholder { color: var(--ink-3); text-transform: uppercase; }
.db-count {
  margin: 10px 0 4px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .16em;
  color: var(--ink-3);
}
/* the phase C rule, stated once on the page that edits the numbers */
.db-rule {
  margin: 4px 0 8px;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: .08em;
  color: var(--ink-3);
}
.db-list { border-top: 1px solid var(--hair-2); }
.db-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 1px 8px;
  min-height: 44px;
  padding: 4px 0;
  border-bottom: 1px solid var(--hair-2);
  cursor: pointer;
}
/* Step 06: the focus star owns a 16px slot of its own on the value line, so
   the name column loses exactly 16px and the meta line stays full width.
   Placement is explicit: auto-flow would push the star under the meta line,
   because the meta item spans both columns of row 1. */
.db-row.is-focusable { grid-template-columns: minmax(0, 1fr) auto 16px; }
.db-row .db-name { grid-column: 1; grid-row: 1; }
.db-row .db-val { grid-column: 2; grid-row: 1; }
.db-row .db-focus {
  grid-column: 3; grid-row: 1;
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding-top: 4px;
}
.db-row .db-meta { grid-column: 1 / -1; grid-row: 2; }
.db-row .db-edit { grid-column: 1 / -1; grid-row: 3; }
.db-focus {
  width: 16px;
  min-height: 44px;
  align-self: center;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}
.db-focus.on { color: var(--ink); }
.db-focus:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
/* Step 06: the S/B/D main-lift switcher sits above the filters and reuses the
   filter row rhythm; its segments are shorter than a filter capsule on purpose */
.db-mains { margin-top: 10px; }
.db-mains .db-filter:first-child { margin-top: 0; }
.db-main-btn { font-size: 8px; padding: 0 6px; }
.db-row.is-open { background: var(--card-2); }
.db-row:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
.db-name {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-val {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  text-transform: uppercase;
}
.db-meta {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .04em;
  color: var(--ink-3);
}
.db-edit {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0 10px;
}
.db-edit-row { display: flex; align-items: stretch; gap: 6px; }
.db-edit-in {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  padding: 0 10px;
}
.db-edit-note {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--hair);
  background: var(--card);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .04em;
  padding: 0 10px;
}
.db-edit-note::placeholder { color: var(--ink-3); }
.db-edit-msg {
  margin: 0;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.4;
  color: var(--ink-2);
}
.db-edit-src {
  margin: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .04em;
  color: var(--ink-3);
}
/* what an edit would do: same voice as the source line above it, one notch
   louder so it reads as a consequence, not as metadata. Unstyled <p> here
   inherits the display face at body size — that is the bug this rule exists
   to prevent, not a cosmetic preference. */
.db-edit .db-edit-load {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .04em;
  color: var(--ink-2);
}
.db-hist {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
}
.db-hist li { padding: 3px 0; border-top: 1px solid var(--hair-2); }
.db-empty {
  padding: 14px 0;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ dock
   Three icon keys: profile and the stats hub on the left, settings on the
   right, nothing written out. Fixed to the
   bottom so a reader can reach Settings from the middle of a 13-week cycle.
   Hand-written single-colour line SVG only: no icon font, no sprite, no
   decorative glyphs. 44x44 targets, and `.shell` carries the bottom padding
   that keeps the last card clear of the bar. */
.shell { padding-bottom: 58px; }
html { scroll-padding-bottom: 64px; }

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 5px var(--gut) calc(5px + env(safe-area-inset-bottom));
  background: var(--paper-2);
  border-top: 1.5px solid var(--rule);
  border-left: 1px solid var(--hair);
  border-right: 1px solid var(--hair);
}
/* `#/print` is a standalone A4 sheet and already carries BACK TO CYCLE, so the
   bar has nothing to add there and would only sit over the sheet edge; it
   leaves with that route (`@media print` hides it everywhere anyway). The
   `[hidden]` rule has to be explicit: the UA's display:none loses to `.dock`. */
.dock[hidden] { display: none !important; }
.dock-gap { flex: 1 1 auto; }
.dock-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  text-decoration: none;
}
.dock-btn svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dock-btn:hover { color: var(--ink); }
.dock-btn[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--red);
}
.set-row {
  padding: 9px 0;
  border-bottom: 1px solid var(--hair-2);
}
.set-row:last-child { border-bottom: 0; }
.set-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-bottom: 5px;
}
.set-note { font-size: 9.5px; color: var(--ink-3); line-height: 1.45; margin: 4px 0 0; }

/* Page heads: Settings and Statistics are full pages, so they use
   the PROFILE head size, not a drawer title. */
.set-head, .st-head { margin: 12px 0 14px; }
.set-title, .st-title {
  margin: 0; font-family: var(--mono); font-size: 20px; font-weight: 700;
  letter-spacing: .10em; color: var(--ink);
}
.set-sub, .st-sub { margin: 3px 0 0; font-size: 11px; line-height: 1.45; color: var(--ink-3); }
.st-line {
  margin: 6px 0 0; font-family: var(--mono); font-size: 8.5px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); line-height: 1.6;
}
.st-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
/* PR29-A stats scope switch: cycle / archive / natural year */
.st-scope { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.st-scope .io-btn { cursor: pointer; }
.st-scope .io-btn.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.st-archive { border: 1px solid var(--hair); padding: 10px; margin-top: 10px; }
.st-archive-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.st-archive-id { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.st-archive-badge {
  font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--hair); padding: 2px 6px; color: var(--ink-2);
}
/* PR29-B archived-cycle strip + write-control dimming */
.rr-archive-banner {
  margin: 8px 0 0; padding: 8px 10px;
  border: 1px solid var(--hair); border-left: 3px solid var(--tone-rest);
  background: var(--card); color: var(--ink-2);
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .07em;
  line-height: 1.5; text-transform: uppercase;
}
html.cycle-archived .lg-save,
html.cycle-archived .lg-undo,
html.cycle-archived .bw-sheet-save,
html.cycle-archived .suggest-apply,
html.cycle-archived .rest-ready-btn,
html.cycle-archived .db-edit input,
html.cycle-archived .db-edit input + button,
html.cycle-archived .db-step,
html.cycle-archived .db-edit .io-btn,
html.cycle-archived .imp-acts .io-btn {
  opacity: .45; pointer-events: none;
}

/* PR29-B — Cycle Intake (#/intake): local draft, export/import */
.set-ctl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.intake-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px; margin-top: 8px;
}
.intake-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.intake-label {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-2);
}
.intake-in, .intake-notes {
  width: 100%; min-height: 40px; box-sizing: border-box;
  border: 1px solid var(--hair); background: var(--card); color: var(--ink);
  font-family: var(--mono); font-size: 13px; padding: 8px 10px;
}
.intake-in:focus, .intake-notes:focus { outline: 2px solid var(--ink); outline-offset: -2px; }
.intake-notes-row { margin-top: 10px; }
.intake-toggles { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; }
.intake-toggle {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-2);
}
.intake-toggle input { width: 18px; height: 18px; accent-color: var(--ink); }
.intake-rate {
  margin: 8px 0 0; font-family: var(--mono); font-size: 9px;
  letter-spacing: .05em; color: var(--ink-2); line-height: 1.55;
}
.intake-errors {
  margin: 8px 0 0; padding-left: 18px;
  font-family: var(--mono); font-size: 9px; line-height: 1.6; color: var(--tone-warn, #8a4b19);
}
.intake-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.intake-file { display: none; }
.intake-status {
  margin: 8px 0 0; min-height: 14px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .04em; color: var(--ink-2);
}
@media (max-width: 360px) {
  .intake-grid { grid-template-columns: minmax(0, 1fr); }
}

.set-meta {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px; margin-top: 2px;
}
.set-meta span {
  font-family: var(--mono); font-size: 8px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3);
  overflow-wrap: anywhere;
}
.set-meta b { color: var(--ink); font-size: 10px; letter-spacing: .04em; }
.set-row-meta { border-bottom: 0; }

/* -------------------------------------------------------------- statistics
   `#/stats`: four bands of plain figure tables. Numbers sit in tabular figures
   (body sets that globally), so a column of sets or percentages reads down. */
.st-table { margin-top: 8px; border-top: 1px solid var(--hair); }
.st-tr {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1.3fr) minmax(0, .8fr);
  gap: 6px;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px solid var(--hair-2);
}
.st-th { border-bottom: 1.5px solid var(--rule); }
.st-th .st-td {
  font-family: var(--mono); font-size: 8px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}
.st-td {
  font-family: var(--mono); font-size: 9.5px; color: var(--ink-2);
  line-height: 1.4; overflow-wrap: anywhere;
}
.st-tr .st-td:first-child { color: var(--ink); font-weight: 700; letter-spacing: .04em; }
.st-gaps { margin-top: 10px; }
.st-gap-table .st-tr { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1.6fr); }
.st-pva-table .st-tr { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr) minmax(0, .7fr) minmax(0, .8fr) minmax(0, 1fr); }
.st-pva-table .st-td:nth-child(5) { color: var(--red); }
/* one lift per row: code as the label, then the three readings as two short
   lines — a five-column table wrapped "142.5 kg" in half at 361 */
.st-lift-rows { margin-top: 8px; border-top: 1px solid var(--hair); }
.st-lift-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 7px 0 7px 2px;
  border-bottom: 1px solid var(--hair-2);
}
.st-lift-code {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .08em; color: var(--ink);
}
.st-lift-line {
  display: block; font-family: var(--mono); font-size: 9.5px;
  line-height: 1.55; color: var(--ink-2); overflow-wrap: anywhere;
}
.st-lift-test { color: var(--brown); }
.st-empty {
  margin: 8px 0 0; font-family: var(--mono); font-size: 8.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); line-height: 1.6;
}
.st-kicker {
  margin: 10px 0 6px; font-family: var(--mono); font-size: 8.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
}
.st-lib { margin-top: 14px; }
.st-dist { margin-top: 8px; }
.st-dist-k {
  margin: 0 0 3px; font-family: var(--mono); font-size: 8px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
}
.st-lags { margin-top: 10px; }
.st-lag {
  margin: 4px 0 0; font-family: var(--mono); font-size: 9px; line-height: 1.5;
  color: var(--ink-2);
}
/* T261121-05: the Breadcrumb row's two short fields. 9px mono so the value
   reads as the band's own typeface, 44px tall so the row keeps the touch rule
   the rest of Settings obeys. */
.crumb-name-row { align-items: center; }
.set-crumb-input {
  box-sizing: border-box;
  width: 96px;
  min-height: 44px;
  padding: 0 7px;
  border: 1px solid var(--hair);
  border-radius: 0;
  background: var(--card-2);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .04em;
}
.set-crumb-input:focus { outline: 0; border-color: var(--ink-2); }
.set-crumb-input::placeholder { color: var(--ink-3); opacity: .8; }
.set-crumb-reset { align-self: center; }
.seg-ctl { display: flex; flex-wrap: wrap; gap: 4px; }
.seg-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--hair);
  background: var(--card-2);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 0 8px;
  cursor: pointer;
}
.seg-btn.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
/* PR-B: the three rest-tier steppers in Settings — minus / value / plus on the
   15 s grid; the buttons stop at the band edges instead of clamping. */
.rest-set-ctl { align-items: center; gap: 6px; }
.rest-set-btn { min-height: 36px; padding: 0 7px; }
.rest-set-btn:disabled { opacity: .35; cursor: default; }
.rest-set-val {
  min-width: 44px;
  text-align: center;
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.wd-ctl { display: flex; gap: 4px; flex-wrap: wrap; }
.wd-btn {
  width: 36px;
  min-height: 44px;
  border: 1px solid var(--hair);
  background: var(--card-2);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 9px;
  cursor: pointer;
}
.wd-btn.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
/* Step 08: eight equipment pills + two shortcuts must fit 361 without
   horizontal scroll, so the pills keep the 44px touch height and only give
   back side padding */
.eq-ctl .eq-btn { padding: 0 6px; }
.eq-shortcuts { margin-top: 6px; }
.io-row { display: flex; gap: 6px; flex-wrap: wrap; }
.io-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1.5px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 0 10px;
  cursor: pointer;
}
.io-btn:hover { background: var(--ink); color: var(--paper); }
.io-btn.quiet { border-color: var(--hair); color: var(--ink-2); }
.set-group { border-top: 1px solid var(--hair); margin-top: 6px; }
.set-group:first-of-type { border-top: 0; }
.set-group-head {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 44px; cursor: pointer; list-style: none;
}
.set-group-head::-webkit-details-marker { display: none; }
.set-group-title {
  font-family: var(--mono); font-size: 9px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink);
}
.set-group-meta {
  font-family: var(--mono); font-size: 8px; letter-spacing: .08em;
  color: var(--ink-3);
}
.set-group[open] .set-group-meta { color: var(--ink-2); }
.set-group-body { padding: 0 0 9px; }
.set-log-export .lg-export { margin: 0; }
input[type="file"] { display: none; }
select {
  font-family: var(--mono);
  font-size: 10px;
  padding: 6px 8px;
  border: 1px solid var(--hair);
  background: var(--card-2);
  color: var(--ink);
  width: 100%;
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  max-width: 320px;
  padding: 9px 12px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .04em;
  z-index: 20;
  text-align: center;
  line-height: 1.5;
}

.empty {
  padding: 30px 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}
.nf { padding: 40px 0; text-align: center; }
.nf h1 { font-family: var(--display); font-size: 26px; text-transform: uppercase; margin: 0 0 8px; }
.nf a { font-family: var(--mono); font-size: 10px; color: var(--ink-2); }

@media (min-width: 520px) {
  .shell { border-left: 1px solid var(--hair); border-right: 1px solid var(--hair); }
}

/* ------------------------------------------------------------- print sheet */
.print-view { padding-bottom: 40px; }
.ps-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-top: 14px; border-bottom: 1.5px solid var(--rule); }
.ps-kicker { font-family: var(--mono); font-size: 8px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); margin: 0; }
.ps-title { font-family: var(--display); font-size: 24px; text-transform: uppercase; letter-spacing: .01em; margin: 3px 0 5px; }
.ps-meta { font-family: var(--mono); font-size: 8.5px; color: var(--ink-2); margin: 0 0 6px; text-align: right; }
.ps-sum { font-family: var(--mono); font-size: 8.5px; color: var(--ink-2); margin: 8px 0 0; line-height: 1.6; }
.ps-tools { display: flex; gap: 6px; margin: 10px 0 4px; }
.ps-week { margin-top: 16px; border-top: 1px solid var(--hair); padding-top: 6px; break-inside: avoid; }
.ps-week-head { display: flex; align-items: baseline; gap: 8px; }
.ps-week-no { font-family: var(--display); font-size: 15px; font-weight: 700; }
.ps-week-name { font-family: var(--mono); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.ps-week-date { margin-left: auto; font-family: var(--mono); font-size: 8px; color: var(--ink-3); }
.ps-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.ps-day { border-left: 1px solid var(--hair); padding-left: 5px; }
.ps-day-head { font-family: var(--mono); font-size: 7px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin: 0; }
.ps-day-title { font-family: var(--display); font-size: 10.5px; text-transform: uppercase; font-weight: 700; margin: 2px 0 3px; line-height: 1.2; }
.ps-moves { list-style: none; margin: 0; padding: 0; }
.ps-move { display: flex; flex-direction: column; padding: 2px 0; border-bottom: 1px dotted var(--hair-2); }
.ps-move-name { font-family: var(--sans); font-size: 8px; line-height: 1.25; color: var(--ink); }
.ps-move-sets { font-family: var(--mono); font-size: 7px; color: var(--ink-2); line-height: 1.3; }
.ps-foot { margin-top: 18px; font-family: var(--mono); font-size: 7.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--brown); }

@media print {
  .topbar, .dock, .strip, .ps-tools, .view > .crumbs { display: none !important; }
  .shell { max-width: none; box-shadow: none; padding-bottom: 0; }
  .view { padding: 0; }
  .ps-week { break-inside: avoid; }
  .ps-grid { gap: 4px; }
  @page { size: A4 portrait; margin: 11mm; }
}

/* ------------------------------------------------------------- cycle focus */
.fold-note p { margin: 0; }
.fold-note p + p { margin-top: 1px; }
.fold-note {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
  letter-spacing: .02em;
  padding: 6px 0 2px;
  border-top: 1px solid var(--hair-2);
}

/* ------------------------------------------------------ movement library rows */
.lib-rows { border-top: 1.5px solid var(--rule); margin-top: 4px; }
.lib-row {
  display: grid;
  grid-template-columns: 96px 34px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--hair-2);
}
.lib-name {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  color: var(--ink);
}
.lib-num { font-family: var(--display); font-size: 14px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.lib-note { font-family: var(--mono); font-size: 9px; color: var(--ink-3); letter-spacing: .02em; }

/* ---------------------------------------------------------------- anatomy */
.body-map-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 8px;
  padding: 8px 6px 6px;
  border: 1px solid var(--hair);
  background: var(--card-2);
}
.body-map { width: 100%; height: 250px; display: block; }
.mm-base path { fill: var(--card); stroke: var(--hair); stroke-width: .25; }
/* The skull, jaw, feet and joints are not a training leaf, so no verdict can
   paint them. Left at --card they read as paper cut-outs inside the body — the
   "blank egg head". They take the same neutral tone `.mm-untrained` uses, which
   keeps the decreasing-colour rule intact: leaf colour still beats shell tone. */
.mm-base path[data-id^="head"], .mm-base path[data-id="face"], .mm-base path[data-id="nape"],
.mm-base path[data-id^="foot"], .mm-base path[data-id^="knee"], .mm-base path[data-id^="elbow"] {
  fill: var(--hair-2);
}
.mm-fill path { stroke: none; }
.mm-in path { fill: var(--green); fill-opacity: .62; }
.mm-under path { fill: var(--under); fill-opacity: .62; }
.mm-over path { fill: var(--over); fill-opacity: .62; }
.mm-untrained path { fill: var(--hair-2); fill-opacity: 1; }
/* neutral anatomical reference (profile page): one warm tint, no verdict */
.mm-plain path { fill: var(--brown-2); fill-opacity: .30; }
.mm-untrained-dim path { fill: transparent; }
.body-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .06em;
  color: var(--ink-3);
}
.body-map-legend .mm-key { display: inline-flex; align-items: center; gap: 3px; }
.body-map-legend .mm-key b { font-family: var(--display); font-size: 11px; color: var(--ink); }
.body-map-legend .mm-key::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--hair-2); }
.body-map-legend .mm-key.in::before { background: var(--green); }
.body-map-legend .mm-key.under::before { background: var(--under); }
.body-map-legend .mm-key.over::before { background: var(--over); }

/* weight hierarchy: the heavier the prescription, the louder the number.
   Main lifts keep the big tabular figure, variants step down, accessories are
   deliberately quiet so a 5 kg accessory never reads as the headline lift. */
.move-main .seg-load { font-size: 14.5px; }
.move-main .seg-load small { font-size: 9px; }
.move-variant_major .seg-load,
.move-variant_minor .seg-load { font-size: 12.5px; color: var(--ink); }
.move-accessory_major .seg-load { font-size: 11.5px; color: var(--ink-2); }
/* PR29-B: accessory segment labels ("WORK") must clear 4.5:1 in light mode */
.move-accessory_major .seg-label,
.move-accessory_minor .seg-label { color: var(--ink-2); }
.move-accessory_major .seg-load small { font-size: 9px; color: var(--ink-3); }
.move-accessory_minor .move-brief { color: var(--ink-2); }
/* full-width footnote under the anchor folds */
.round-note p { margin: 0; }
.round-note p + p { margin-top: 1px; }
.round-note {
  display: block;
  margin: 10px 0 4px;
  padding: 7px 0 0;
  border-top: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: .01em;
  color: var(--ink-3);
  text-align: left;
}
/* day map: one hue, three bands by share of that muscle's weekly work */
/* one neutral ink for the day heat map: the day page already spends red / blue /
   green on tiers and intensity, so the map reads as a quantity (how much of the
   weekly work this session covers), not as a fourth semantic colour. */
.mm-heat path { fill: var(--ink); }
/* Step 10 — recovery bands: the map stops being a quantity and becomes a
   clock. Red under a day, amber under two, pale green inside three; a muscle
   past the window falls back to the untrained hairline. */
.mm-rec-hot path { fill: var(--over); fill-opacity: .72; }
.mm-rec-warm path { fill: var(--under); fill-opacity: .68; }
.mm-rec-cool path { fill: var(--green); fill-opacity: .42; }
.body-map-legend .mm-key.heat-3::before { background: var(--ink); opacity: .85; }
.body-map-legend .mm-key.heat-2::before { background: var(--ink); opacity: .42; }
.body-map-legend .mm-key.heat-1::before { background: var(--hair-2); }
/* Step 10 — the three-state switch above Fig. W3: volume, recovery, gaps.
   A reader setting, so the chips are small; 44px hit height is not needed. */
.heat-pills { display: flex; gap: 6px; margin: 8px 0 2px; }
.heat-pill {
  flex: 0 0 auto;
  border: 1px solid var(--hair);
  background: none;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .08em;
  line-height: 1;
  padding: 6px 7px;
  cursor: pointer;
}
.heat-pill.is-active { color: var(--ink); border-color: var(--ink); }
.heat-note { margin-top: 6px; display: grid; gap: 4px; }
.heat-empty {
  font-family: var(--mono); font-size: 7.5px; letter-spacing: .1em; color: var(--over);
}
.body-map-legend .mm-key.rec-hot::before { background: var(--over); opacity: .72; }
.body-map-legend .mm-key.rec-warm::before { background: var(--under); opacity: .68; }
.body-map-legend .mm-key.rec-cool::before { background: var(--green); opacity: .42; }
.body-map-legend .mm-key.rec-none::before { background: var(--hair-2); }
.body-map-legend .mm-key.total::before { display: none; }
/* ===================================================== VIZ checklist 2026-11-16
   Everything below was added for the deployment checklist: colour law C-00,
   the two-panel charts, the shared-16-leaf board, and one-line hero readings. */

/* --- cycle hero: one sentence, then plain readings ----------------------- */
.hero-cycle { padding: 13px 13px 12px; }
/* annual is the season above the cycle: a thin line, not a second title */
.hero-annual {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 5px;
  padding: 0 0 4px;
  border-bottom: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero-annual-name { color: var(--red); font-weight: 600; }
.hero-annual-cycle { color: var(--ink-3); white-space: nowrap; }
.hero-sentence {
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 2px 0 0;
}
.hero-sentence b { font-weight: 700; text-transform: uppercase; }
.hero-tail {
  margin: 3px 0 0;
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink-2);
}
.hero-when {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .06em;
  color: var(--ink-2);
  text-transform: uppercase;
}
.hero-when i {
  font-style: normal;
  color: var(--ink-3);
  letter-spacing: .12em;
}
.hero-when i::before { content: "\00b7"; margin-right: 8px; }
.hero-idline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.hero-chip {
  border: 1px solid var(--ink-2);
  color: var(--ink-2);
  padding: 2px 5px;
  font-size: 7.5px;
  letter-spacing: .12em;
  background: var(--paper);
}
.hero-fact {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 6px;
  align-items: baseline;
  margin: 0;
  padding: 5px 0;
  border-bottom: 1px solid var(--hair-2);
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink);
}
.hero-fact:last-child { border-bottom: 0; }
.hf-key { font-size: 9px; letter-spacing: .12em; color: var(--ink-3); }
.hf-mid { font-variant-numeric: tabular-nums; }
.hf-tail { font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.hf-tail.is-test { color: var(--purple); }
.hero-lifts { margin-top: 8px; border-top: 1px solid var(--hair); padding-top: 4px; }
.hero-lift {
  display: grid;
  grid-template-columns: 24px 1fr auto auto;
  grid-template-rows: auto auto;
  gap: 1px 7px;
  align-items: baseline;
  margin: 0;
  padding: 4px 0;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink);
}
.hero-lift:last-child { border-bottom: 0; }
.hl-code { font-family: var(--display); font-size: 10px; letter-spacing: .04em; }
.hl-name { font-size: 9px; letter-spacing: .06em; color: var(--ink-2); }
.hl-nums { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hl-delta { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.hero-fine {
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .08em;
  color: var(--ink-3);
  text-transform: uppercase;
}

/* --- shared 16-leaf board head + status word ---------------------------- */
.leaf-board { padding: 4px 10px 6px; }
/* hairline + caption where the board leaves the upper body */
.leaf-div.is-first { margin-top: 0; }
.leaf-div {
  margin: 8px -10px 0;
  padding: 4px 10px 3px;
  background: var(--hair-2);
  border-top: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink);
}
.leaf-head {
  display: grid;
  grid-template-columns: 74px 1fr 76px 50px;
  gap: 7px;
  align-items: end;
  padding: 2px 0 4px;
  border-bottom: 1px solid var(--hair);
}
.leaf-head-name {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .12em;
  color: var(--ink-3);
}
.leaf-head-axis { position: relative; height: 10px; }
.leaf-head-tick {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 6.5px;
  color: var(--ink-3);
}
.leaf-head-legend {
  grid-column: 4 / 5;
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: .04em;
  color: var(--ink-3);
  text-align: right;
  white-space: nowrap;
}
.leaf-status {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .04em;
  text-align: right;
  white-space: nowrap;
}
.leaf-row.is-over .leaf-status { color: var(--over); }
.leaf-row.is-under .leaf-status { color: var(--under); }
.leaf-row.is-in .leaf-status { color: var(--green); }
.leaf-row.is-untrained .leaf-status { color: var(--ink-3); }
/* thin supply = the library cannot fill this muscle, not this week's fault.
   Two words at 9px are 8px wider than the 50px status cell, so this one wraps
   instead of being cut: the cell keeps its width, the row grows a line. */
.leaf-row.is-thin .leaf-status { color: var(--ink-3); white-space: normal; line-height: 1.1; }
.leaf-status.is-muted { color: var(--ink-3); }

/* --- day distribution rows: share line replaces the stacked numbers ------ */
.dist .leaf-row { grid-template-columns: 62px 1fr auto; }
.dist .leaf-fill { top: 0; }
.dist .leaf-track { height: 12px; }
.leaf-share-line {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .01em;
  color: var(--ink-2);
  text-align: right;
  white-space: nowrap;
}

/* --- capacity by block: bars on one 0-based axis + a strip on its own ---- */
.cap2 {
  margin-top: 14px;
  border: 0;
  border-top: 1.5px solid var(--rule);
  background: transparent;
  padding: 8px 0 4px;
}
.cap2-head,
.cap2-row,
.cap2-int {
  display: grid;
  grid-template-columns: 40px 1fr 44px;
  gap: 8px;
  align-items: center;
}
.cap2-head {
  grid-template-columns: 40px 1fr 44px;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 3px;
}
.cap2-head-in { display: grid; grid-template-columns: 16px 1fr 44px; gap: 0; align-items: center; }
.cap2-lbl {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--ink);
  line-height: 1.15;
}
.cap2-lbl b { font-family: var(--display); font-size: 10px; letter-spacing: .02em; }
.cap2-lbl i {
  display: block;
  font-style: normal;
  font-size: 6.5px;
  letter-spacing: .06em;
  color: var(--ink-3);
}
.cap2-axis { position: relative; height: 10px; }
.cap2-tick {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 6.5px;
  color: var(--ink-3);
}
.cap2-eq {
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: .1em;
  color: var(--ink-3);
  text-align: right;
}
.cap2-row { padding: 5px 0 2px; }
.cap2-bars { display: flex; flex-direction: column; gap: 2px; }
.cap2-bar {
  display: grid;
  grid-template-columns: 16px 1fr 44px;
  gap: 0;
  align-items: center;
}
.cap2-code {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .02em;
  color: var(--ink-3);
}
.cap2-track {
  position: relative;
  height: 6px;
  background: var(--hair-2);
}
.cap2-track i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); }
.cap2-val {
  font-family: var(--mono);
  font-size: 9px;
  padding-left: 5px;
  text-align: right;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cap2-val.wide { font-size: 9px; color: var(--ink-2); }
.cap2-int { padding: 4px 0 7px; border-bottom: 1px solid var(--hair-2); }
.cap2-int:last-child { border-bottom: 0; }
.cap2-int-cell { display: grid; grid-template-columns: 16px 1fr 44px; align-items: center; }
.cap2-seg {
  position: relative;
  height: 10px;
  margin-right: 0;
  border-top: 1px solid var(--hair-2);
}
/* the intensity bar: panel floor -> that row's top set. Same 10px box as the
   pmin post and the ticks, so nothing sits half a pixel off the others. */
/* the band wash: the zone this row's top set falls in, so the step between
   bands is a shape and not a comparison of two numbers */
.cap2-seg-band {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--hair-2);
  opacity: .55;
}
.cap2-seg-bar {
  position: absolute;
  top: 2px;
  bottom: 2px;
  background: var(--ink);
  opacity: .58;
}
.cap2-seg-low {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--ink);
  opacity: .95;
}
.cap2-span {
  display: block;
  font-style: normal;
  font-size: 6px;
  letter-spacing: .06em;
  color: var(--ink-3);
  margin-top: 1px;
}
.cap2-seg-tick {
  position: absolute;
  bottom: -2px;
  width: 1px;
  height: 6px;
  background: var(--ink-3);
  opacity: .5;
}
/* the edge of an intensity band (75 / 85 / 95): taller and darker than the
   planted axis ticks, because it is the thing the row is being read against */
.cap2-seg-tick.is-band {
  top: 0;
  bottom: 0;
  height: auto;
  background: var(--ink-2);
  opacity: .45;
}
.cap2-pad { display: block; }
.cap2-tier {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: right;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cap2 .cap2-row + .cap2-int { margin-bottom: 2px; }
.cap2-foot {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .02em;
  color: var(--ink-3);
}

/* --- session rules block ------------------------------------------------- */
.rule-row {
  display: grid;
  grid-template-columns: 22px 92px 1fr;
  gap: 7px;
  padding: 5px 0;
  border-bottom: 1px solid var(--hair-2);
  align-items: baseline;
}
.rule-row:last-child { border-bottom: 0; }
.rule-seq { font-family: var(--mono); font-size: 8px; color: var(--ink-3); }
.rule-name { font-family: var(--mono); font-size: 9px; letter-spacing: .06em; color: var(--ink); }
.rule-text { font-family: var(--mono); font-size: 9px; line-height: 1.45; color: var(--ink-2); }

@media (max-width: 360px) {
  .hero-fact { grid-template-columns: 78px 1fr auto; font-size: 9px; }
  .hero-lift { grid-template-columns: 20px 1fr auto auto; gap: 4px; }
  .hl-delta { font-size: 8px; }
  .leaf-row, .leaf-head { grid-template-columns: 58px 1fr 58px 42px; gap: 5px; }
  /* 42px of status cell against 48px of "UNDER MEV": the reading spilled out
     of its column at 320 on main, and the moment the tier reached 361 (this
     PR) it spilled on the target phone too. Same ruling as .is-thin above:
     the cell keeps its width, the row grows a line, the axis never moves.
       "UNTRAINED" cannot grow a line (one word): measured 46.2px at 9px against
       this 42px cell, and a 3-day fixture is the only shape that leaves a leaf
       at zero sets, which is why no shipped route ever showed it. 8px without
       tracking is 41px — the word fits the cell it was given. */
  .leaf-status { white-space: normal; line-height: 1.1; font-size: 8px; letter-spacing: 0; }
  .dist .leaf-row { grid-template-columns: 54px 1fr auto; }
}

/* ------------------------------------------------------- week top strip
   TOP %1RM as one big figure, the three lifts under it. The week's head has to
   answer "how heavy is this week" before it lists anything else. */
.top-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 12px;
  margin-top: 9px;
  padding: 6px 0 8px;
  border-top: 1.5px solid var(--rule);
  border-bottom: 1px solid var(--hair);
}
.top-strip-main { display: flex; flex-direction: column; gap: 1px; }
.top-strip-label {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .14em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.top-strip-value {
  font-family: var(--display);
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.top-strip-value small {
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-2);
  margin-left: 2px;
}
.top-strip-subs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  padding-bottom: 2px;
}
.top-strip-sub {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .06em;
}
.top-strip-sub i { font-style: normal; color: var(--ink-3); }
.top-strip-sub b { font-family: var(--display); font-size: 11px; color: var(--ink-2); }
.top-strip-sub.is-hot b { color: var(--ink); }
.top-strip-sub.is-hot i { color: var(--ink-2); }

/* ---------------------------------------------------------- week day rows
   Seven rows in one bordered block: date column, then the top loads, the
   session, the muscles and the cost — each on its own line, none of them a
   paragraph that wraps wherever it happens to land. */
.day-lines {
  margin-top: 10px;
  border: 1.5px solid var(--rule);
  background: var(--card);
  padding: 0 10px;
}
.day-line {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 10px;
  gap: 9px;
  align-items: start;
  padding: 8px 0 9px 9px;
  border-bottom: 1px solid var(--hair-2);
  text-decoration: none;
  color: inherit;
  position: relative;
}
.day-line:last-child { border-bottom: 0; }
.day-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 9px;
  width: 3px;
  background: var(--seg);
}
.day-line.is-today { background: var(--card-2); }
.day-line-date { display: flex; flex-direction: column; gap: 1px; }
.day-line.is-completed .day-line-num { color: var(--ink-2); }
.day-line-check {
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1;
  color: var(--green);
}
.day-line-weekday {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .1em;
  color: var(--ink-3);
}
.day-line-num {
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink);
}
.day-line-tops {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
}
.day-line-toplabel {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--ink-3);
}
.day-line-sep { font-family: var(--mono); font-size: 7px; color: var(--ink-3); }
.day-line-top { display: flex; align-items: baseline; gap: 3px; }
.day-line-top i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  color: var(--seg);
}
.day-line-top b {
  font-family: var(--display);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.day-line-top.is-hot i { color: var(--seg); }
.day-line-top.is-hot b { color: var(--ink); }
.day-line-top:not(.is-hot) i { color: var(--ink-3); }
.day-line-top:not(.is-hot) b { color: var(--ink-2); }
.day-line-title {
  margin: 2px 0 0;
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--ink);
}
.day-line-muscles,
.day-line-cost {
  margin: 1px 0 0;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .04em;
  color: var(--ink-3);
}
.day-line-cost { color: var(--ink-2); }
.day-line-go {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  align-self: center;
}

/* ------------------------------------------------ day main-lift panel
   Intensity first: load in display type, ring beside it, total load at the
   bottom of the same block. Volume metrics come after the block, not before. */
.main-top {
  margin-top: 9px;
  border: 1.5px solid var(--rule);
  background: var(--card);
}
.main-top-head {
  padding: 5px 10px 4px;
  border-bottom: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.main-top-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.main-top-cell { padding: 8px 10px 9px; min-width: 0; }
.main-top-cell + .main-top-cell { border-left: 1px solid var(--hair); }
.main-top-name {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.main-top-fig {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 3px;
}
.main-top-kg { display: flex; align-items: baseline; gap: 2px; }
.main-top-kg b {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.main-top-kg .unit {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
}
.main-top-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 6px 10px 7px;
  border-top: 1px solid var(--hair);
}
.main-top-foot-label {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .14em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.main-top-foot-value b {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.main-top-foot-value small {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
  margin-left: 2px;
}
.main-top-grid.cols-3 .main-top-kg b { font-size: 16px; }
.main-top-grid.cols-3 .ring { width: 44px; }
.main-top-grid.cols-3 .ring svg { width: 44px; height: 44px; }
.main-top-grid.cols-3 .main-top-cell { padding: 8px 8px 9px; }
.main-top-grid.cols-2 .main-top-kg b { font-size: 19px; }
.main-top-empty {
  padding: 8px 10px 10px;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--ink-3);
}

/* ===================================================== C/B/W/D info bar 2026-11-17
   One shared band for the two or three numbers that define the page. Each
   cell owns a semantic hue, one display value, one context line and one
   small visual. Numbers are always printed; the rail is an extra reading. */
.info-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
  border-top: 1.5px solid var(--rule);
  border-bottom: 1px solid var(--hair);
}
.info-bar.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* One hue per page: the info band is a tint scale of the block / week colour,
   not a bag of semantic colours. Each cell keeps its own step (0.72 / 0.86 /
   1.0 of the base hue) so the three readings stay separable. */
.ib-cell { --t: var(--tone); }
.ib-cell:nth-child(1) { --t: color-mix(in srgb, var(--tone) 72%, var(--ink)); }
.ib-cell:nth-child(2) { --t: color-mix(in srgb, var(--tone) 86%, var(--paper)); }
.ib-cell:nth-child(3) { --t: var(--tone); }
.ib-cell {
  min-width: 0;
  padding: 8px 9px 9px 0;
  border-top: 2px solid var(--t);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ib-cell:first-child { padding-left: 0; }
.ib-cell + .ib-cell {
  border-left: 1px solid var(--hair-2);
  padding-left: 9px;
}
.ib-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}
.ib-label {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ib-flag {
  flex: none;
  padding: 1px 4px;
  border: 1px solid var(--t);
  color: var(--t);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  line-height: 1.2;
}
.ib-value {
  display: flex;
  align-items: baseline;
  gap: 2px;
  min-width: 0;
  white-space: nowrap;
}
.ib-value b {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--t);
}
.ib-value small {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  color: var(--ink-3);
}
/* two readings in one cell (a band, a bodyweight range): drop a step so the
   digits stay inside the column at 320–361 instead of crossing the divider */
.ib-value.is-tight b { font-size: 16px; letter-spacing: -.03em; }
.ib-value.is-tight small { font-size: 7px; }
.ib-note {
  display: block;
  min-width: 0;
  font-family: var(--mono);
  font-size: 6.8px;
  line-height: 1.3;
  letter-spacing: .02em;
  color: var(--ink-3);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
.ib-viz {
  display: flex;
  align-items: flex-end;
  width: 100%;
  min-height: 16px;
  margin-top: auto;
  padding-top: 5px;
}
.ib-viz > * { width: 100%; }
.ib-meter {
  margin-top: 5px;
  min-width: 0;
}
.ib-meter-rail {
  position: relative;
  height: 5px;
  background: var(--hair-2);
}
.ib-meter-fill {
  height: 100%;
  background: var(--t);
}
.ib-meter.is-range .ib-meter-fill {
  position: absolute;
  top: 0;
  height: 100%;
}
.ib-meter-mark {
  position: absolute;
  top: -2px;
  width: 1px;
  height: 9px;
  background: var(--ink);
}
.ib-meter-mark.is-start { background: var(--ink-2); }
.ib-meter-mark.is-end { background: var(--t); }
.ib-stack {
  display: flex;
  gap: 1px;
  height: 6px;
  margin-top: 5px;
  background: var(--hair-2);
  overflow: hidden;
}
.ib-seg {
  height: 100%;
  background: var(--t);
  min-width: 0;
}
.ib-lifts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}
.ib-lift {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) 27px;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 6.4px;
  line-height: 1.1;
}
.ib-lift-code { color: var(--ink-3); }
.ib-lift-rail {
  display: block;
  height: 3px;
  background: var(--hair-2);
}
.ib-lift-rail i {
  display: block;
  height: 100%;
  background: var(--t);
}
.ib-lift-val {
  text-align: right;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.ib-pips {
  display: flex;
  gap: 1px;
  height: 6px;
  margin-top: 6px;
}
.ib-pip {
  flex: 1 1 0;
  min-width: 0;
  background: var(--seg, var(--hair));
  opacity: .72;
}
.ib-pip.is-test { background: var(--purple); opacity: 1; }
.ib-pip.is-now { background: var(--ink); opacity: 1; }
@media (max-width: 362px) {
  /* A flagged cell had nowhere to go: the flag is flex:none, so the label
     took the loss and shipped "COMP W…" — seen on the 16-week fixture,
     where COMP WEEK carries "2 TESTS" beside it (the shipped cycle has no
     flag there, so no shipped route showed it). The flag drops under the
     label instead; both readings survive, the cell grows one line. */
  .ib-head { flex-wrap: wrap; }
  .ib-cell { padding-right: 6px; }
  .ib-cell + .ib-cell { padding-left: 6px; }
  .ib-value b { font-size: 18px; }
  .ib-label { font-size: 6.5px; letter-spacing: .08em; }
  .ib-note { font-size: 6.4px; }
}

/* ================================================ 2026-11-17 visual pass 2
   The card and day row are the scan surface for blocks, weeks and sessions.
   They were dense enough to read but too small to scan; this pass raises the
   type and rhythm without changing the one-column mobile layout. */
.cards { gap: 10px; margin-top: 11px; }
.card {
  padding: 12px 12px 12px 15px;
}
.card-name { font-size: 17px; }
.card-body { font-size: 11px; line-height: 1.45; margin-top: 5px; }
.card-facts { gap: 12px; margin-top: 8px; }
.fact { font-size: 9.5px; }
.fact b { font-size: 14.5px; }
.card-open { margin-top: 8px; font-size: 9px; }

.day-lines { padding: 0 12px; }
.day-line {
  grid-template-columns: 58px minmax(0, 1fr) 12px;
  gap: 10px;
  padding: 10px 0 11px 10px;
}
.day-line::before { top: 10px; bottom: 11px; width: 3.5px; }
.day-line-weekday { font-size: 9px; }
.day-line-num { font-size: 12px; }
.day-line-toplabel { font-size: 9px; }
.day-line-top i { font-size: 9px; }
.day-line-top b { font-size: 15px; }
.day-line-title { font-size: 13px; margin-top: 3px; }
.day-line-muscles, .day-line-cost { font-size: 9px; line-height: 1.35; }

/* The info strip is shared by C/B/W/D. Values grow first; rails grow only
   enough to read their ticks without turning into decoration. */
.info-bar { margin-top: 12px; }
.ib-cell { padding: 9px 10px 10px 0; border-top-width: 3px; }
.ib-cell + .ib-cell { padding-left: 10px; }
.ib-label { font-size: 9px; letter-spacing: .1em; }
.ib-value b { font-size: 22px; }
.ib-note { font-size: 9px; line-height: 1.35; }
.ib-meter { margin-top: 6px; }
.ib-meter-rail { height: 6px; }
.ib-meter-mark { top: -2px; height: 10px; }
.ib-stack { height: 7px; margin-top: 6px; }
.ib-lifts { gap: 3px; margin-top: 5px; }
.ib-lift { font-size: 9px; grid-template-columns: 20px minmax(0, 1fr) 34px; gap: 5px; }
.ib-lift-rail { height: 4px; }
.ib-pips { height: 7px; margin-top: 7px; gap: 2px; }

/* D: three SBD columns on one shared scale. Every lift keeps its slot at zero
   so the bars stay under the legend; the empty track is the zero. */
.ib-sbd-bars {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 23px;
  width: 100%;
}
.ib-sbd-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  height: 100%;
  flex: 1 1 0;
  min-width: 0;
}
.ib-sbd-track {
  display: flex;
  align-items: flex-end;
  width: 11px;
  height: 16px;
  background: var(--hair-2);
}
.ib-sbd-fill { width: 100%; background: var(--t); }
.ib-sbd-col.is-zero .ib-sbd-track { background: var(--hair-2); }
.ib-sbd-code {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  color: var(--t);
}
.ib-sbd-col.is-zero .ib-sbd-code { color: var(--ink-3); }
/* the legend uses the same three equal columns, so numbers sit over their bars */
.ib-sbd-legend {
  display: flex;
  gap: 7px;
  width: 100%;
}
.ib-sbd-legend span {
  flex: 1 1 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .06em;
  color: var(--ink-2);
  white-space: nowrap;
}

/* C: each main lift now gets a kg-added rail instead of being compared
   against the cycle total, which made all three bars look alike. */
.hero-lift { padding: 5px 0; }
.hero-lift .hl-track {
  grid-column: 1 / -1;
  height: 3px;
  margin: 4px 0 2px;
  background: var(--hair-2);
}
.hero-lift .hl-track i { display: block; height: 100%; background: var(--ink-2); opacity: .55; }
.hl-delta { font-size: 9px; }
.hl-nums { font-size: 9px; }

@media (max-width: 362px) {
  .card { padding: 11px 10px 11px 13px; }
  .card-name { font-size: 16px; }
  .card-body { font-size: 10.5px; }
  .fact { font-size: 9px; }
  .fact b { font-size: 13.5px; }
  .day-line { grid-template-columns: 54px minmax(0, 1fr) 10px; gap: 8px; padding-left: 9px; }
  .day-line-top b { font-size: 14px; }
  .day-line-title { font-size: 12.5px; }
  .ib-cell { padding-right: 6px; }
  .ib-cell + .ib-cell { padding-left: 6px; }
  .ib-value b { font-size: 19px; }
  .ib-label { font-size: 6.8px; letter-spacing: .08em; }
  .ib-note { font-size: 6.7px; }
  .ib-sbd-bars { gap: 7px; }
  /* the legend sets its own 9px, which outranked the shrunken .ib-note above
     and cut "DL 0" off the cell at 320; it now scales with the note */
  .ib-sbd-legend { gap: 4px; }
  .ib-sbd-legend span { font-size: 7px; letter-spacing: .02em; }
  .hl-name { font-size: 7.5px; }
}

/* 2026-11-17 visual pass 3 — cycle change readings, block/week tier splits,
   16-leaf week board, day capacity board, alt pills, SBD analysis. */
.hero-goal-ranges {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  align-items: baseline;
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
  color: var(--ink-2);
}
.hero-goal-ranges b { font-size: 9px; letter-spacing: .12em; color: var(--ink); }

/* signed change rail: fixed −50%…+10% domain, zero near the right edge */
.ib-change { margin-top: 6px; }
.ib-change-rail {
  position: relative;
  height: 6px;
  background: var(--hair-2);
}
.ib-change-zero {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 1px;
  background: var(--ink-3);
}
.ib-change-fill {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--tone, var(--ink));
  opacity: .82;
}
.ib-change-label {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 6.5px;
  color: var(--ink-2);
}
.ib-change-rows { display: grid; gap: 3px; margin-top: 5px; }
.ib-change-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 4px;
}
.ib-change-code { font-family: var(--mono); font-size: 9px; color: var(--ink); }
.ib-change-num { font-family: var(--mono); font-size: 9px; text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ib-change-row .ib-change { margin-top: 0; }
.ib-change-row .ib-change-rail { height: 4px; }

/* 16-leaf × week board */
.leaf-week-board { display: grid; gap: 3px; }
.leaf-week-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 6px;
}
.leaf-week-name {
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.2;
  color: var(--ink-2);
}
.leaf-week-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 24px;
  min-width: 0;
}
.leaf-week-bar {
  display: flex;
  align-items: flex-end;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  background: var(--hair-2);
}
.leaf-week-bar i {
  display: block;
  width: 100%;
  background: var(--ink);
  opacity: .78;
}
.leaf-week-bar.is-under { background: var(--under-soft); }
.leaf-week-bar.is-under i { background: var(--under); opacity: .8; }
.leaf-week-bar.is-over { background: var(--over-soft); }
.leaf-week-bar.is-over i { background: var(--over); opacity: .8; }
.leaf-week-bar.is-deload { background: repeating-linear-gradient(135deg, transparent 0 2px, var(--hair) 2px 3px); }
.leaf-week-bar.is-current { outline: 1px solid var(--ink); outline-offset: 1px; }
.leaf-week-last { font-family: var(--mono); font-size: 9px; text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.leaf-week-axis {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 30px;
  gap: 6px;
  font-family: var(--mono);
  font-size: 6.2px;
  color: var(--ink-3);
}
.leaf-week-axis span:nth-child(2) { justify-self: start; }
.leaf-week-axis span:nth-child(3) { justify-self: center; }
.leaf-week-axis span:nth-child(4) { justify-self: end; }

/* block work rail */
.block-work { display: grid; gap: 4px; margin: 4px 0 10px; }
.block-work-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 76px;
  align-items: center;
  gap: 6px;
}
.block-work-code { font-family: var(--mono); font-size: 9px; color: var(--ink); }
.block-work-track { height: 6px; background: var(--hair-2); }
.block-work-track i { display: block; height: 100%; background: var(--ink); opacity: .78; }
.block-work-val { font-family: var(--mono); font-size: 9px; text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* card tier rows */
.fact-rows { display: grid; gap: 2px; margin-top: 6px; border-top: 1px dashed var(--hair); padding-top: 5px; }
.fact-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fact-row-label { font-family: var(--mono); font-size: 9px; letter-spacing: .05em; color: var(--ink-3); }
.fact-row-value { font-family: var(--mono); font-size: 9px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* W day row: one line per tier */
.day-line-groups { display: grid; gap: 1px; margin-bottom: 2px; }
.day-line-group { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.day-line-group .day-line-toplabel { flex: 0 0 30px; }
.day-line-group .day-line-top { font-size: 10px; }

/* W day capacity board */
.week-day-board { display: grid; gap: 6px; }
.week-day-row {
  display: grid;
  grid-template-columns: 24px 54px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}
.week-day-code { font-family: var(--mono); font-size: 9px; color: var(--ink); }
.week-day-date { font-family: var(--mono); font-size: 9px; color: var(--ink-3); }
.week-day-bars { display: grid; gap: 2px; min-width: 0; }
.week-day-track { display: block; height: 6px; background: var(--hair-2); }
.week-day-track i { display: block; height: 100%; min-width: 1px; }
.week-day-track i.is-sets { background: var(--ink-2); opacity: .42; }
.week-day-track i.is-sbd { background: var(--ink); opacity: .82; }
.week-day-meta { grid-column: 3; font-family: var(--mono); font-size: 9px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.week-day-legend { display: flex; gap: 12px; margin-top: 4px; font-family: var(--mono); font-size: 6.2px; color: var(--ink-3); }
.week-day-legend .is-sets::before, .week-day-legend .is-sbd::before {
  content: ""; display: inline-block; width: 10px; height: 6px; margin-right: 4px; vertical-align: middle;
  background: var(--ink-2); opacity: .42;
}
.week-day-legend .is-sbd::before { background: var(--ink); opacity: .82; }

/* D alternates: two names, one line, no coefficient language and no pill
   chrome (owner order 2026-11-19) — plain underlined text inside the card. */
.alt-pills {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 5px;
  margin: 5px 0 0;
  padding: 5px 0 0;
  border-top: 1px solid var(--hair-2);
}
.alt-caption { font-family: var(--mono); font-size: 7px; letter-spacing: .1em; color: var(--ink-3); flex: none; }
/* Owner order 2026-11-19: no pill chrome at all — the alternates are plain
   underlined text so the two longest names in the plan still share one line. */
.alt-pill {
  display: inline;
  min-width: 0;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  background: none;
  padding: 0;
  font-family: var(--sans);
  font-size: 7px;
  line-height: 1.3;
  color: var(--ink-2);
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 22%, transparent);
  text-underline-offset: 2px;
}
.alt-pill + .alt-pill::before {
  content: "\00b7";
  margin-right: 5px;
  color: var(--ink-3);
  text-decoration: none;
}
button.alt-pill {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
}
button.alt-pill:hover { color: var(--ink); text-decoration-color: var(--ink); }
.alt-pill.is-active {
  color: var(--red);
  text-decoration-color: var(--red);
  background: none;
  border: 0;
}
.alt-pill.is-busy { opacity: .55; }
/* Step 09 — USE TODAY: italic-free, one word pair, pinned right so it never
   competes with the names for the line. */
.alt-use {
  flex: 0 0 auto;
  margin-left: auto;
  border: 0;
  border-radius: 0;
  background: none;
  padding: 0;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .08em;
  line-height: 1.3;
  color: var(--ink-2);
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 22%, transparent);
  text-underline-offset: 2px;
  cursor: pointer;
}
.alt-use:hover { color: var(--ink); text-decoration-color: var(--ink); }
.alt-use.is-active { color: var(--red); text-decoration-color: var(--red); }
.alt-use.is-busy { opacity: .55; }
/* Step 09 — what was actually done, written under the ALT row: two names and
   the way back. It wraps rather than truncates, so the plan's name is never
   shortened into something ambiguous. */
.alt-swap {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .03em;
  line-height: 1.35;
  color: var(--ink-2);
}
.alt-swap-text { flex: 0 1 auto; min-width: 0; }
.alt-swap-k { flex: 0 0 auto; color: var(--red); letter-spacing: .08em; }
.alt-revert {
  flex: 0 0 auto;
  border: 0;
  background: none;
  padding: 0;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .08em;
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 22%, transparent);
  text-underline-offset: 2px;
  cursor: pointer;
}
.alt-revert:hover { color: var(--ink); }
.alt-revert:disabled { opacity: .5; cursor: progress; }

/* D SBD previous / this / next */
.sbd-analysis { display: grid; gap: 3px; margin-top: 5px; }
.sbd-analysis-head, .sbd-analysis-row {
  display: grid;
  /* four columns that hold one line each at 361 px: the unit lives in the
     section note, so a cell is "127.5 · −6 · 4d", never a wrapped "2d" */
  grid-template-columns: 26px minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
}
.sbd-analysis-head {
  padding-bottom: 3px;
  border-bottom: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  color: var(--ink-3);
}
/* the header sits over the numbers it names: THIS over a right-aligned column */
.sbd-analysis-head span:nth-child(3) { text-align: right; }
.sbd-analysis-row { padding: 4px 0; border-bottom: 1px solid var(--hair-2); }
.sbd-analysis-code { font-family: var(--mono); font-size: 9px; color: var(--ink); }
.sbd-analysis-prev, .sbd-analysis-next { font-family: var(--mono); font-size: 9px; line-height: 1.35; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sbd-analysis-this { font-family: var(--mono); font-size: 9px; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* W GPP home fill: one line per under-fed muscle — code, gap, movement, dose.
   Four columns on a 361 rail; the movement truncates, the dose holds. */
.gpp-list {
  border-top: 1px solid var(--hair);
}
.gpp-row {
  display: grid;
  grid-template-columns: 46px 30px minmax(0, 1fr) 74px;
  align-items: baseline;
  gap: 0 6px;
  padding: 5px 0;
  border-bottom: 1px solid var(--hair-2);
}
.gpp-muscle {
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.3;
  letter-spacing: .04em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gpp-gap {
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.3;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.gpp-move {
  min-width: 0;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.3;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gpp-dose {
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.3;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.gpp-foot {
  margin: 0;
  padding: 6px 0 0;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.45;
  color: var(--ink-3);
}
.gpp-head {
  padding: 4px 0 3px;
  border-bottom: 1px solid var(--hair-2);
}
.gpp-head .gpp-muscle,
.gpp-head .gpp-gap,
.gpp-head .gpp-move,
.gpp-head .gpp-dose {
  font-size: 8px;
  letter-spacing: .08em;
  color: var(--ink-3);
}

/* ---- rest day page (`#/rest/<weekId>/<1..7>`, T261121-07) --------------
   One stamp, one card, one four-row guide. Nothing here is a session: the
   page reads the day the plan leaves empty, and it never writes to plan.days. */
.rest-stamp {
  margin: 0 0 5px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .12em;
  color: var(--ink-3);
}
.gpp-empty {
  margin: 0;
  padding: 6px 0 2px;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: .06em;
  color: var(--ink-3);
}

.rest-card {
  border: 1px solid var(--hair);
  border-radius: 2px;
  padding: 10px 11px 11px;
  background: var(--card);
}
.rest-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}
.rest-card-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .14em;
  color: var(--ink-3);
}
.rest-card-value {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: .02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.rest-card-level {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .12em;
  color: var(--ink-2);
}
.rest-card-sub {
  margin: 6px 0 0;
  font-size: 10px;
  line-height: 1.55;
  color: var(--ink-2);
}
.rest-card-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px 6px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--hair-2);
}
.rest-card-k {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .1em;
  color: var(--ink-3);
}
.rest-card-v {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.rest-card-btn { width: 100%; margin-top: 10px; }
.rest-card-foot {
  margin: 9px 0 0;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: .08em;
  color: var(--ink-3);
}
.rest-card-foot a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
}

/* ---- recovery library rows (T261121-10) ---------------------------------
   Three priorities under the readiness card. The row prints the library's
   own dose, tags and caution; only the caution level and the two state
   badges take a semantic colour (warn = amber wash, avoid = red wash), so
   the page stays inside the four-colour rule. */
.rest-tier-kicker {
  margin: 10px 0 2px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .14em;
  color: var(--ink-3);
}
.rest-tier-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 3px;
  padding: 8px 0 9px;
  border-bottom: 1px solid var(--hair-2);
}
.rest-tier-row:last-child { border-bottom: 0; }
.rest-tier-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 6px;
  min-width: 0;
}
.rest-tier-name {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.rest-tier-badge {
  flex: 0 0 auto;
  padding: 1px 4px;
  border: 1px solid currentColor;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .1em;
  color: var(--ink-3);
  white-space: nowrap;
}
.rest-tier-badge.is-grade { color: var(--ink-2); }
.rest-tier-badge.is-off { color: var(--ink-3); border-style: dashed; }
.rest-tier-badge.is-avoid { color: var(--red); }
.rest-tier-dose {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .06em;
  color: var(--ink-2);
}
.rest-tier-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
}
.rest-tier-grade-label {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .08em;
  color: var(--ink-3);
}
.rest-tier-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.rest-tier-tag {
  padding: 1px 4px;
  border: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .1em;
  color: var(--ink-3);
}
.rest-tier-caution {
  margin: 3px 0 0;
  font-size: 9px;
  line-height: 1.45;
  color: var(--ink-3);
  overflow-wrap: anywhere;
}
.rest-tier-caution.is-warn {
  padding: 4px 6px;
  background: var(--yellow-wash);
  border-left: 2px solid var(--yellow);
  color: var(--ink-2);
}
.rest-tier-caution.is-avoid {
  padding: 4px 6px;
  background: var(--red-wash);
  border-left: 2px solid var(--red);
  color: var(--ink-2);
}

/* FOUNDATION — three pillars above the menu; amber only when the PRE record
   says fuel is low or sleep is short, never as decoration. */
.rest-foundation { border-top: 1px solid var(--hair); }
.rest-foundation-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 2px 8px;
  padding: 7px 0 8px;
  border-bottom: 1px solid var(--hair-2);
}
.rest-foundation-row:last-child { border-bottom: 0; }
.rf-key {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--ink);
}
.rf-text {
  font-size: 9px;
  line-height: 1.45;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.rest-tier-badge.is-warn { color: var(--yellow); }

/* cost x effect at a glance: four cells, no extra columns, 2x2 at any width */
.rest-quad {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 10px;
  border: 1px solid var(--hair);
  background: var(--hair);
}
.rest-quad-cell {
  min-width: 0;
  padding: 7px 7px 8px;
  background: var(--card);
}
.rest-quad-no {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink);
}
.rest-quad-title {
  margin-left: 5px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .1em;
  color: var(--ink-3);
}
.rest-quad-axis {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .06em;
  color: var(--ink-3);
}
.rest-quad-list {
  margin: 3px 0 0;
  font-size: 8.5px;
  line-height: 1.5;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

/* quadrant tag, right-aligned in the card head */
.rest-tier-q {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 1px 4px;
  border: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .1em;
  color: var(--ink-3);
}
.rest-tier-q.is-q1 { color: var(--ink-2); }
.rest-tier-q.is-q4 { color: var(--red); border-color: currentColor; }

/* lower-body cost: three 3px pips, then the numeral — no emoji, no icon */
.rest-fat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.rest-fat-seg {
  width: 9px;
  height: 3px;
  background: var(--hair);
}
.rest-fat-seg.is-on { background: var(--ink-2); }
.rest-fat-n {
  margin-left: 2px;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* PRIORITY 03 is optional: it lives behind a fold, closed by default */
.rest-gpp-fold { border-top: 1px solid var(--hair); }
.rest-gpp-fold > summary {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 0 8px;
  list-style: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.4;
  letter-spacing: .1em;
  color: var(--ink-2);
}
.rest-gpp-fold > summary::-webkit-details-marker { display: none; }
.rest-gpp-fold > summary::after {
  content: "+";
  margin-left: auto;
  color: var(--ink-3);
}
.rest-gpp-fold[open] > summary::after { content: "\2212"; }
.rest-gpp-fold[open] > summary { border-bottom: 1px solid var(--hair-2); }

@media (max-width: 360px) {
  .hero-goal-ranges { font-size: 7px; }
  .leaf-week-row, .leaf-week-axis { grid-template-columns: 46px minmax(0, 1fr) 25px; gap: 4px; }
  .leaf-week-name { font-size: 6.4px; }
  .block-work-row { grid-template-columns: 20px minmax(0, 1fr) 66px; }
  .alt-pills { padding-left: 0; }
  .week-day-row { grid-template-columns: 20px 46px minmax(0, 1fr); gap: 4px; }
}

/* 320px SBD analysis: stack PREV/THIS on row one, NEXT on row two, instead of
   dropping the future comparison entirely. */
@media (max-width: 360px) {
  .sbd-analysis-head, .sbd-analysis-row { grid-template-columns: 24px minmax(0, 1fr) 40px; gap: 6px; }
  .sbd-analysis-head span:nth-child(4) { display: none; }
  .sbd-analysis-row { row-gap: 1px; }
  .sbd-analysis-code { grid-column: 1; grid-row: 1 / 3; align-self: start; }
  .sbd-analysis-prev { grid-column: 2; grid-row: 1; }
  .sbd-analysis-this { grid-column: 3; grid-row: 1; }
  .sbd-analysis-next { display: block; grid-column: 2 / 4; grid-row: 2; }
  .sbd-analysis-next::before { content: "NEXT "; color: var(--ink-3); }
}

/* ------------------------------------------------------- conditioning
   The PRE chip sits beside the BW chip on the day hero; the record sheet is
   an overlay in the same ink-on-paper idiom. No emoji, no icons. */
.hero-extra { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
/* day page chip line: the mileage bar fills the left, the BW + conditioning
   chips ride the right (owner order 2026-11-19) */
.hero-chiprow { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.hero-chiprow .day-mile { flex: 1 1 auto; min-width: 0; margin-top: 0; }
.hero-chiprow .day-mile-cap,
.hero-chiprow .day-mile-labels { font-size: 9px; }
.hero-status {
  display: inline-flex;
  align-items: center;
  height: 16px;
  padding: 0 5px;
  border: 1px solid currentColor;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero-status.is-completed { color: var(--green); }
.hero-extra .bw-chip { margin-left: 0; }

.cond-badge {
  display: inline-grid;
  place-items: center;
  width: 26px;
  min-height: 26px;
  padding: 0;
  border: 1px dashed var(--hair);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
}
.cond-badge:hover { border-color: var(--ink-3); }
.cond-badge:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cond-badge.is-empty { color: var(--ink-3); }
.cond-badge-num { font-size: 10px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }

body.cond-open { overflow: hidden; }

.cond-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(20, 19, 17, .55);
}
.cond-panel {
  box-sizing: border-box;
  width: min(430px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 18px 18px 14px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}
.cond-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.cond-title { margin: 0; font-family: var(--mono); font-size: 15px; letter-spacing: .14em; }
.cond-sub { margin: 4px 0 0; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: .06em; }
.cond-close {
  flex: none; width: 30px; height: 30px; padding: 0;
  border: 1px solid var(--hair); background: var(--card); color: var(--ink);
  font-size: 18px; line-height: 1; cursor: pointer;
}
.cond-close:focus-visible, .cond-save:focus-visible, .cond-cancel:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.cond-live { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; padding: 12px; border: 1px solid var(--hair); background: var(--card); }
.cond-live-text { min-width: 0; }
.cond-live-score { font-family: var(--mono); font-size: 22px; font-weight: 700; margin-right: 8px; }
.cond-live-level { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.cond-live-tip { margin: 4px 0 0; font-family: var(--mono); font-size: 10.5px; line-height: 1.55; color: var(--ink-3); }

.cond-section { margin: 14px 0 4px; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .14em; color: var(--ink-3); }
.cond-row { display: block; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.cond-row-label { display: block; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.cond-row-ends { display: block; margin: 2px 0 6px; font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.cond-slider-wrap { display: flex; align-items: center; gap: 10px; }
.cond-slider { flex: 1; accent-color: var(--ink); }
.cond-val { min-width: 22px; font-family: var(--mono); font-size: 12px; font-weight: 700; text-align: right; }
.cond-num {
  box-sizing: border-box; width: 110px; padding: 6px 8px;
  border: 1px solid var(--hair); background: var(--card); color: var(--ink);
  font-family: var(--mono); font-size: 13px;
}
.cond-num:focus { outline: 2px solid var(--ink); outline-offset: 0; }
.cond-actions { display: flex; gap: 8px; margin-top: 16px; }
.cond-save, .cond-cancel {
  flex: 1; padding: 11px 0; border: 1px solid var(--ink);
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .12em; cursor: pointer;
}
.cond-save { background: var(--ink); color: var(--paper); }
.cond-cancel { background: var(--card); color: var(--ink); }
.cond-foot { margin: 12px 0 0; font-family: var(--mono); font-size: 10px; line-height: 1.6; color: var(--ink-3); }

@media (max-width: 340px) {
  .cond-panel { padding: 14px 12px 10px; }
  .cond-live-score { font-size: 19px; }
}

/* ---------------------------------------------------------------- plan vs actual (Fig. W1)
   Week page, direction A: one row per training day, four aligned columns.
   Grid maths: 361 viewport - 2×14 gut = 333; box border 1.5×2 leaves 330;
   row padding 6×2 leaves 318; columns 46+102+92+62 = 302 + 3×4 gap = 314. */
.pva-box {
  margin-top: 8px;
  border: 1.5px solid var(--rule);
  background: var(--card);
}
.pva-box.is-test { border-left: 3px solid var(--purple); }

.pva-summary {
  display: grid;
  grid-template-columns: .95fr 1fr 1.3fr;
  border-bottom: 1px solid var(--rule);
  background: var(--card-2);
}
.pva-sum-cell { padding: 5px 7px; border-right: 1px solid var(--hair); min-width: 0; }
.pva-sum-cell:last-child { border-right: 0; }
.pva-sum-k {
  display: block; font-family: var(--mono); font-size: 7.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); line-height: 1.2; white-space: nowrap;
}
.pva-sum-v {
  display: block; margin-top: 2px; font-family: var(--mono); font-size: 10px; font-weight: 700;
  color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.pva-sum-sub { font-style: normal; font-weight: 400; color: var(--ink-2); font-size: 8.5px; }
/* three lifts in one cell: a size down keeps "SQ −14 · BP = · DL =" unclipped */
.pva-sum-v.is-tri { font-size: 8.5px; letter-spacing: -.01em; }

.pva-head,
.pva-row {
  display: grid;
  grid-template-columns: 46px 102px 92px 62px;
  gap: 4px;
  align-items: center;
  padding: 0 6px;
}
.pva-head {
  height: 20px;
  border-bottom: 1px solid var(--hair);
  font-family: var(--mono); font-size: 7.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); white-space: nowrap;
}
.pva-head span { white-space: nowrap; overflow: hidden; }
.pva-head span:nth-child(3),
.pva-head span:nth-child(4) { text-align: right; }

.pva-row {
  min-height: 30px; padding-top: 3px; padding-bottom: 3px;
  border-bottom: 1px solid var(--hair-2);
}
.pva-row:last-child { border-bottom: 0; }
.pva-row.is-unlogged, .pva-box.is-empty .pva-row { opacity: .82; }

.pva-day {
  font-family: var(--mono); font-size: 8.5px; color: var(--ink-2);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.pva-day b { color: var(--ink); font-weight: 700; }
/* Step 09 — a swap under the prescribed slot: a single glyph after the day
   label, drawn a step lighter so it never reads as a value. */
.pva-swap {
  margin-left: 4px;
  font-style: normal;
  font-size: 9px;
  color: var(--ink-2);
  letter-spacing: 0;
}

.pva-cell { min-width: 0; display: flex; align-items: center; }
.pva-svg { display: block; width: 100%; height: auto; overflow: visible; }
.pva-empty-dash {
  display: block; text-align: right; font-family: var(--mono); font-size: 9px; color: var(--ink-3);
}

.pva-test-row {
  display: grid;
  grid-template-columns: 34px 1fr 78px 62px;
  gap: 6px; align-items: center; padding: 7px 9px;
  border-bottom: 1px solid var(--hair-2);
  font-family: var(--mono); font-size: 10px; font-variant-numeric: tabular-nums;
  /* Pin the line box: "normal" resolves from the mono font's ascent/descent,
     and a 10px face that lands on 11px instead of 12px shrinks all three rows
     by 1px each (82 -> 79 on another renderer). The height is a published
     reference number, so it must not depend on which mono font wins. */
  line-height: 12px;
}
.pva-test-row:last-child { border-bottom: 0; }
.pva-test-lift { font-weight: 700; color: var(--purple); }
.pva-test-plan { color: var(--ink-3); font-size: 9px; }
.pva-test-act { font-weight: 700; color: var(--ink); text-align: right; }
.pva-test-diff { color: var(--ink-2); text-align: right; font-size: 9px; }

.pva-verdict {
  margin: 6px 0 0; padding: 2px 0 2px 8px;
  border-left: 2px solid var(--ink);
  font-family: var(--mono); font-size: 9px; line-height: 1.35; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pva-verdict.is-muted { border-left-color: var(--ink-3); color: var(--ink-3); }

@media (max-width: 345px) {
  .pva-head, .pva-row { grid-template-columns: 42px minmax(84px, 1fr) 82px 56px; gap: 3px; padding-left: 4px; padding-right: 4px; }
  .pva-test-row { grid-template-columns: 30px 1fr 66px 54px; gap: 4px; }
  /* At ~116 px the TOP SET string no longer fits on one line. Wrapping is the
     honest answer: an ellipsis here would hide "DL =" and read as a truncated
     measurement. Heights measured at 361 stay untouched by this rule. */
  .pva-sum-v { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35; }
  .pva-sum-v.is-tri { font-size: 8px; }
}
@media print { .pva-box { break-inside: avoid; } .pva-summary { background: transparent; } }

/* VBT LAG — one conditional line under the figure. Amber, like every other
   "this needs a look" mark; nothing is drawn when no baseline exists. */
.pva-vbt {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  padding: 6px 8px; border-top: 1px solid var(--hair); min-width: 0;
}
.pva-vbt-k {
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .09em;
  color: var(--yellow); border: 1px solid var(--yellow); background: var(--yellow-wash);
  padding: 2px 5px; white-space: nowrap;
}
.pva-vbt-t { font-size: 10px; line-height: 1.4; color: var(--ink-2); overflow-wrap: anywhere; min-width: 0; }

/* ============================================================ day tone + gear
   Two additions on owner order 2026-11-20 (same day as the tree cleanup):

   1. DAY TONE — the page colour follows the prescription's intensity, so a
      peak session reads red before the title is read. Ramp lives in
      U.dayTone(); this block only spends it. Purple still means competition.
   2. GEAR RAIL — a port of the RPL app's gear strip (renderGearRail in
      mobile/app/.../index.html): collapsed to one 44px row with a count and a
      status dot, expanding to the items today's prescription earns. */

/* the hero tag carries the tone word and the tone ink; no separate chip
   repeats it (see U.dayTone / day.js) */

/* the hero's top rule takes the tone: the purple cycle card's one thick rule,
   recoloured per session intensity. Height 3px is the card's own weight. */
.view[data-tone] .hero::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--tone, var(--ink));
}
/* paddings already reserve 13px; the rule sits above them, so nothing shifts */

/* ---------------------------------------------------------------- gear rail */
.gear-rail {
  margin-top: 10px;
  border: 1.5px solid var(--rule);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.gear-head {
  display: flex; align-items: center; gap: 8px; width: 100%;
  min-height: var(--tap);
  padding: 0 13px;
  background: none; border: 0; text-align: left;
  color: var(--ink); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.gear-head:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.gear-pill {
  display: inline-flex; align-items: center; gap: 7px; min-width: 0;
  font-family: var(--mono); font-size: 9px; letter-spacing: .14em;
  color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gear-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3);
  box-shadow: 0 0 0 3px var(--hair-2); flex: none;
}
/* a load the wall cannot build flips the dot to red — same red as every other
   warning on the site, never a new colour */
.gear-pill.is-alert { color: var(--red); }
.gear-pill.is-alert .gear-dot { background: var(--red); box-shadow: 0 0 0 3px var(--red-wash); }
.gear-chev {
  margin-left: auto; width: 10px; height: 7px; display: block; color: var(--ink-3);
  transition: transform .18s var(--ease, ease);
}
.gear-rail.is-closed .gear-chev { transform: rotate(-90deg); }
/* 0fr/1fr collapse: the open state animates its own height, no magic numbers */
.gear-wrap { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .18s var(--ease, ease); }
.gear-rail.is-closed .gear-wrap { grid-template-rows: 0fr; }
.gear-body { overflow: hidden; min-height: 0; }
.gear-inner { padding: 0 13px 12px; min-width: 0; }

/* equal columns, never flex: a 5-item day must not grow its last row */
.gear-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.gear-tile {
  min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 5px 7px;
  border: 1px solid var(--hair);
  background: var(--card-2);
  animation: gear-in .18s ease both;
  animation-delay: calc(var(--gi) * .02s);
}
@keyframes gear-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* optional items are dashed: present on the list, not on the hook */
.gear-tile.is-opt { border-style: dashed; }
.gear-tile.is-hot { border-color: var(--yellow); background: var(--yellow-wash); }
.gear-ico { width: 22px; height: 22px; display: block; color: var(--ink-2); }
.gear-tile.is-hot .gear-ico { color: var(--yellow); }
.gear-lbl {
  font-size: 10px; font-weight: 700; line-height: 1.15; text-align: center;
  color: var(--ink); overflow-wrap: anywhere;
}
.gear-sub {
  font-family: var(--mono); font-size: 8px; letter-spacing: .04em;
  color: var(--ink-3); text-align: center; line-height: 1.2; overflow-wrap: anywhere;
}

.gear-rows { margin-top: 8px; }
.gear-row {
  display: flex; align-items: baseline; gap: 8px; min-width: 0;
  padding: 6px 0; border-bottom: 1px solid var(--hair-2);
}
.gear-row:last-child { border-bottom: 0; }
.gear-lift {
  font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: .08em;
  color: var(--ink-2); width: 26px; flex: none;
}
.gear-kg { font-family: var(--display); font-size: 13px; font-weight: 800; min-width: 58px; flex: none; }
.gear-sets {
  font-family: var(--mono); font-size: 8px; letter-spacing: .06em;
  color: var(--ink-3); flex: none;
}
.gear-coins { margin-left: auto; display: flex; gap: 3px; align-items: center; }
/* the fractional pieces to pack, e.g. +1+0.25 ×2: mono, amber like every other
   "you must not forget this" mark on the site */
.gear-micro {
  font-family: var(--mono); font-size: 9px; font-weight: 700; white-space: nowrap;
  color: var(--yellow); border: 1px solid var(--yellow); background: var(--yellow-wash);
  padding: 1px 5px;
}
.gear-note {
  margin: 7px 0 0; font-size: 10px; line-height: 1.45; color: var(--ink-3);
  overflow-wrap: anywhere;
}
@media print { .gear-rail { break-inside: avoid; } }

/* ---------------------------------------------------- RR-Adjust-v1 overlay
   The plan keeps saying what it was written with; the adjustment prints beside
   it. Amber, because the block is an instruction about today, not a lift. */
.adj-box {
  margin: 9px 0 0; padding: 8px 10px 9px;
  border: 1px solid var(--hair); border-left: 3px solid var(--yellow);
  background: var(--card-2); border-radius: 2px;
  min-width: 0;
}
.adj-box.adj-day { margin: 0 0 10px; }
.adj-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; min-width: 0; }
.adj-tag {
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .09em;
  color: var(--yellow); border: 1px solid var(--yellow); background: var(--yellow-wash);
  padding: 2px 5px; white-space: nowrap;
}
.adj-from {
  font-size: 12px; color: var(--ink-3);
  text-decoration: line-through; text-decoration-thickness: 1px;
}
.adj-arrow { font-size: 12px; color: var(--ink-3); }
.adj-to { font-size: 13px; font-weight: 700; color: var(--ink); }
.adj-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 7px; min-width: 0;
}
.adj-chip {
  font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: .04em;
  color: var(--ink-2); border: 1px solid var(--hair); padding: 2px 5px; white-space: nowrap;
}
.adj-why { font-size: 10px; line-height: 1.4; color: var(--ink-3); overflow-wrap: anywhere; min-width: 0; }
.adj-clear {
  margin-left: auto; min-height: 32px; padding: 0 10px;
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .08em;
  color: var(--ink-2); background: var(--card); border: 1px solid var(--rule);
  cursor: pointer; white-space: nowrap;
}
.adj-clear:hover { background: var(--ink); color: var(--paper); }
.adj-clear[disabled] { opacity: .45; cursor: default; }

/* ============================================================ profile page
   `#/profile`: the person, not the plan. A fixed anatomical figure, the 15 tape
   cards, the scale trend, the archive milestones. Everything is a grid that
   collapses to one column at 361 px — no figure ever changes its shape because
   the data changed. */
.pf-head { margin: 10px 0 10px; }
.pf-title {
  margin: 0; font-family: var(--mono); font-size: 20px; font-weight: 700;
  letter-spacing: .10em; color: var(--ink);
}
.pf-sub { margin: 3px 0 0; font-size: 11px; line-height: 1.45; color: var(--ink-3); }

.pf-body {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px; align-items: start;
}
.pf-map { grid-column: 1 / -1; display: flex; justify-content: center; padding: 4px 0 8px; }
.pf-map .body-map-wrap { width: 100%; max-width: 300px; }
@media (min-width: 560px) {
  .pf-body { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .pf-map { grid-column: 2 / 6; grid-row: 2 / 5; align-items: center; }
}

.pf-tape {
  border: 1px solid var(--hair); background: var(--card);
  padding: 5px 6px 6px; min-width: 0;
  display: grid; gap: 2px;
}
.pf-tape.is-empty { opacity: .72; }
.pf-tape-k {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .07em;
  color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pf-tape-v { display: flex; align-items: baseline; gap: 2px; min-width: 0; }
.pf-tape-v b { font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.pf-tape-v small { font-size: 9px; color: var(--ink-3); }
.pf-tape-d { font-family: var(--mono); font-size: 8.5px; letter-spacing: .03em; }
.pf-up { color: var(--red); }
.pf-down { color: var(--blue); }
.pf-flat { color: var(--ink-3); }
.pf-tape-d.is-none { color: var(--hair); }

.pf-sec { margin: 14px 0 0; border-top: 1.5px solid var(--rule); padding-top: 8px; }
.pf-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pf-sec-head h2 {
  margin: 0; font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: .10em; color: var(--ink);
}
.pf-sec-src {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .06em; color: var(--ink-3);
  text-align: right; overflow-wrap: anywhere;
}
.pf-empty {
  margin: 8px 0 0; font-size: 10.5px; line-height: 1.55; color: var(--ink-3);
  overflow-wrap: anywhere;
}
.pf-empty.pf-await {
  font-family: var(--mono); letter-spacing: .12em; color: var(--yellow);
  border: 1px dashed var(--hair); padding: 8px; text-align: center;
}
.pf-warn {
  margin: 8px 0 0; font-size: 10px; letter-spacing: .04em; color: var(--red);
  overflow-wrap: anywhere;
}
.pf-foot { margin: 8px 0 0; font-size: 9.5px; line-height: 1.45; color: var(--ink-3); overflow-wrap: anywhere; }

.pf-miles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
@media (min-width: 520px) { .pf-miles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pf-mile { border: 1px solid var(--hair); padding: 6px 7px; min-width: 0; }
.pf-mile-k {
  display: block; font-family: var(--mono); font-size: 8.5px; letter-spacing: .07em;
  color: var(--ink-3);
}
.pf-mile-v { font-size: 14px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }

.pf-scale-rows { margin-top: 8px; display: grid; gap: 5px; }
.pf-scale-row {
  display: grid; grid-template-columns: 62px minmax(0, 54px) minmax(0, 1fr) minmax(0, 52px);
  align-items: center; gap: 6px; min-width: 0;
}
.pf-scale-k {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .06em; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pf-scale-v { display: flex; align-items: baseline; gap: 2px; min-width: 0; }
.pf-scale-v b { font-size: 13px; font-weight: 700; color: var(--ink); }
.pf-scale-v small { font-size: 8.5px; color: var(--ink-3); }
.pf-scale-d { font-family: var(--mono); font-size: 9px; text-align: right; white-space: nowrap; }
.pf-spark svg { width: 100%; height: 22px; display: block; }
.pf-spark-empty { font-family: var(--mono); font-size: 8.5px; color: var(--ink-3); white-space: nowrap; }

/* ============================================================
   PR #25 / T261122-02 — the calendar pair, the rest capsule, the
   quadrant matrix, the week status band, the 1RM scope strip and
   the import preview. Appended in one block so the section above
   keeps its reading order; every value below is a token.
   ============================================================ */

/* ---- dock: the day pair rides the same row as the three keys (owner,
   2026-11-23 — a navigation control belongs with the navigation) ---- */
.daynav { display: flex; gap: 4px; align-items: center; }
/* ---- dock: the day pair rides immediately left of Settings and speaks the
   same icon language as the three keys — hairline stroke, no frame, 44x44 hit
   square (owner, 2026-11-23) ---- */
.daynav { display: flex; gap: 2px; align-items: center; }
/* Settings is pinned to the right on EVERY route. The day pair borrows the
   auto margin while it exists (so ‹ › sit immediately left of the gear); on a
   route with no day slot it hides, and the gear takes the margin itself — that
   is what stops the gear from sliding to the left edge next to Statistics
   (owner, 2026-11-23). */
.dock .daynav { flex: 0 0 auto; margin-left: auto; }
.dock .daynav[hidden] { display: none !important; }
.dock .daynav[hidden] ~ #dock-settings { margin-left: auto; }
.daynav-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  padding: 0;
  border: 0; background: none; color: var(--ink-3);
  cursor: pointer;
}
.daynav-btn svg {
  width: 22px; height: 22px; display: block;
  fill: none; stroke: currentColor;
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}
.daynav-btn:hover { color: var(--ink); }
.daynav-btn:disabled { opacity: .38; cursor: default; color: var(--ink-3); }
.jump.is-away, .jump.is-away:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.jump.is-away .jump-dot { background: var(--paper); }
.jump-flag { font-family: var(--mono); font-size: 7.5px; letter-spacing: .14em; }
@media (max-width: 340px) {
  .jump-flag { display: none; }
}

/* ---- the one floating rest chip (owner, 2026-11-23) ----
   Small by default: a colour bar, the time, a caret. The caret opens one strip
   — reset / +15 s / −15 s, the Xunji arrangement — and closes it again. */
.rest-fab {
  position: fixed; left: 0; top: 0; z-index: 10;
  display: flex; align-items: stretch;
  border: 1.5px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .10);
  touch-action: none; user-select: none;
}
.rest-fab[hidden] { display: none !important; }
.rest-fab-bar { width: 4px; flex: 0 0 auto; background: var(--seg, var(--ink)); }
.rest-fab-body { display: flex; flex-direction: column; padding: 1px 4px 1px 6px; }
.rest-fab-head { display: flex; align-items: center; gap: 2px; }
.rest-fab-time {
  display: block;
  padding: 3px 4px 4px;
  border: 0; background: none; color: var(--ink);
  font-family: var(--mono); font-size: 19px; font-weight: 700; line-height: 1;
  letter-spacing: .03em; text-align: right; min-width: 62px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.rest-fab-time.is-running { background: var(--ink); color: var(--paper); }
.rest-fab-time.is-done { color: var(--green); }
.rest-fab-more {
  display: grid; place-items: center;
  width: 22px; height: 26px; padding: 0;
  border: 0; background: none; color: var(--ink-3);
  font-family: var(--mono); font-size: 9px; line-height: 1;
  cursor: pointer;
  transition: transform .16s ease;
}
.rest-fab.is-open .rest-fab-more { transform: rotate(180deg); color: var(--ink); }
/* PR-B: compact source sub-line — MAIN 5:00 · B2 (preset) or MAIN 6:00 · 4-10M
   (tier band). One line, never wraps, reads at a glance between sets. */
.rest-fab-src {
  padding: 0 2px 2px;
  font-family: var(--mono); font-size: 8px; font-weight: 400; line-height: 1;
  letter-spacing: .02em; color: var(--ink-3);
  white-space: nowrap;
}
.rest-fab-ctl { display: none; align-items: center; gap: 4px; padding: 3px 0 4px; }
.rest-fab.is-open .rest-fab-ctl { display: flex; }
.rest-fab-btn {
  flex: 1 1 0; min-width: 30px; height: 25px; padding: 0 2px;
  border: 1px solid var(--hair); background: none; color: var(--ink-2);
  font-family: var(--mono); font-size: 9px; letter-spacing: .02em; line-height: 1;
  cursor: pointer;
}
.rest-fab-btn:hover { border-color: var(--ink); color: var(--ink); }
.rest-fab-btn:disabled { opacity: .35; cursor: default; border-color: var(--hair); color: var(--ink-3); }
.rest-fab.is-done .rest-fab-bar { background: var(--green); }
.rest-fab.is-dragging { box-shadow: 0 12px 26px rgba(0, 0, 0, .2); }

/* ---- rest page: the four-colour matrix (axis + cell) ---- */
.rest-quad {
  grid-template-columns: 46px minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px; background: var(--hair); border: 1px solid var(--hair);
}
.rest-mx-corner, .rest-mx-col, .rest-mx-row { background: var(--card-2); }
.rest-mx-col {
  display: flex; align-items: center; justify-content: center;
  padding: 3px 4px;
  font-family: var(--mono); font-size: 7px; letter-spacing: .1em; color: var(--ink-3);
}
.rest-mx-row {
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0 4px 0 3px; text-align: right;
  font-family: var(--mono); font-size: 6.5px; line-height: 1.3; letter-spacing: .08em;
  color: var(--ink-3);
}
.rest-quad-cell { padding: 7px 7px 8px; background: var(--card); border-top: 3px solid var(--ink-3); }
.rest-quad-cell.is-q1 { background: var(--green-wash); border-top-color: var(--green); }
.rest-quad-cell.is-q2 { background: var(--blue-wash); border-top-color: var(--blue); }
.rest-quad-cell.is-q3 { background: var(--yellow-wash); border-top-color: var(--yellow); }
.rest-quad-cell.is-q4 { background: var(--red-wash); border-top-color: var(--red); }
.rest-quad-no { font-weight: 700; }
.rest-quad-title { color: var(--ink-2); }
.rest-quad-axis { color: var(--ink-2); }
.rest-quad-list { color: var(--ink); }

/* ---- rest page: one-tap readiness and one-tap marks ---- */
.rest-ready { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 10px 0 2px; }
.rest-ready-k { font-family: var(--mono); font-size: 7.5px; letter-spacing: .14em; color: var(--ink-3); }
.rest-ready-btn {
  min-height: var(--tap); min-width: 54px; padding: 0 8px;
  border: 1.5px solid var(--rule); background: var(--card); color: var(--ink-2);
  font-family: var(--mono); font-size: 9px; letter-spacing: .1em;
  cursor: pointer;
}
.rest-ready-btn.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.rest-ready-note {
  flex: 1 1 100%;
  font-family: var(--mono); font-size: 7.5px; letter-spacing: .06em; color: var(--ink-3);
}
.rest-tier-row.is-markable { cursor: pointer; }
.rest-tier-row.is-done { background: var(--green-wash); }
.rest-tier-row.is-core { border-left: 2px solid var(--green); padding-left: 7px; }
.rest-mark {
  flex: 0 0 auto; padding: 1px 5px;
  border: 1px solid var(--hair);
  font-family: var(--mono); font-size: 7px; letter-spacing: .1em; color: var(--ink-3);
}
.rest-mark.is-on { border-color: var(--green); color: var(--green); }
.rest-core-fold { margin-top: 8px; border-top: 1px solid var(--hair); }
.rest-core-sum {
  display: flex; align-items: center; min-height: var(--tap);
  font-family: var(--mono); font-size: 8px; letter-spacing: .1em; color: var(--ink-2);
  cursor: pointer;
}

/* ---- week page: the semantic status band ---- */
.day-line-state, .rest-state { display: flex; align-items: center; gap: 5px; margin-top: 5px; min-width: 0; }
.dls-seg { flex: 0 0 auto; width: 12px; height: 3px; background: var(--tone-rest); }
.dls-label { font-family: var(--mono); font-size: 7px; letter-spacing: .12em; color: var(--ink-2); }
.dls-track { flex: 0 1 64px; height: 2px; background: var(--hair); }
.dls-fill { display: block; height: 2px; background: var(--ink-2); }
.dls-val { font-family: var(--mono); font-size: 7px; color: var(--ink-3); }
.day-line-state.is-completed .dls-seg,
.day-line-state.is-completed .dls-fill { background: var(--green); }
.day-line-state.is-planned .dls-seg,
.day-line-state.is-planned .dls-fill { background: var(--blue); }
.day-line-state.is-skipped .dls-seg { background: var(--yellow); }
.rest-state { justify-content: flex-end; }
.rest-go { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }

/* ---- 1RM: the step buttons and the two-copy strip ---- */
.db-step {
  min-width: 44px; min-height: 44px; padding: 0 5px;
  border: 1.5px solid var(--hair); background: var(--card-2); color: var(--ink);
  font-family: var(--mono); font-size: 8px; letter-spacing: .04em;
  cursor: pointer;
}
.db-step:hover { border-color: var(--ink); }
.db-scope {
  display: flex; align-items: center; gap: 6px;
  margin: 8px 0 2px; padding: 7px 9px;
  border: 1px solid var(--hair); background: var(--card-2);
}
.db-scope-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.db-scope-k { font-family: var(--mono); font-size: 7px; letter-spacing: .14em; color: var(--ink-3); }
.db-scope-v { font-family: var(--mono); font-size: 8px; letter-spacing: .08em; color: var(--ink-2); }
.db-scope-v.is-ok { color: var(--green); }
.db-scope-v.is-warn { color: var(--yellow); }
.db-scope-v.is-busy { color: var(--ink-2); }
.db-scope-link { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.db-scope-note { font-family: var(--mono); font-size: 7.5px; line-height: 1.5; letter-spacing: .04em; color: var(--ink-3); margin: 4px 0 0; }

/* ---- import: the dry-run sheet ---- */
.imp-prev {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(20, 19, 17, .55);
}
.imp-panel {
  width: 100%; max-width: var(--max); max-height: 88vh; overflow-y: auto;
  background: var(--paper); border-top: 2px solid var(--ink);
  padding: 14px var(--gut) 18px;
  box-shadow: 0 -6px 0 rgba(20, 19, 17, .18);
}
.imp-kicker { margin: 0; font-family: var(--mono); font-size: 8px; letter-spacing: .16em; color: var(--ink-3); }
.imp-title { margin: 6px 0 4px; font-family: var(--display); font-size: 22px; line-height: 1; text-transform: uppercase; color: var(--ink); }
.imp-sub { margin: 0 0 8px; font-family: var(--mono); font-size: 8px; letter-spacing: .08em; color: var(--ink-2); }
.imp-list { display: grid; border-top: 1px solid var(--hair); }
.imp-row { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 2px 8px; padding: 6px 0; border-bottom: 1px solid var(--hair-2); }
.imp-k { font-family: var(--mono); font-size: 8px; letter-spacing: .1em; color: var(--ink-3); }
.imp-v { font-family: var(--mono); font-size: 9px; color: var(--ink); overflow-wrap: anywhere; }
.imp-note { grid-column: 2; font-size: 8px; color: var(--ink-3); }
.imp-warn { margin: 8px 0 0; padding: 6px 8px; background: var(--yellow-wash); border-left: 2px solid var(--yellow); font-family: var(--mono); font-size: 8px; line-height: 1.5; color: var(--ink-2); }
.imp-acts { display: flex; gap: 8px; margin-top: 12px; }
.imp-acts .io-btn { flex: 1 1 0; min-height: var(--tap); }
.imp-foot { margin: 10px 0 0; font-family: var(--mono); font-size: 7px; letter-spacing: .08em; color: var(--ink-3); }

/* ---- rest hero: the date and the promise are two lines ---- */
.hero-sub-line { display: block; }

/* ---- PR #25 review pass: the PAST / UPCOMING flag needs a divider so it never
   reads as part of the TODAY word ---- */
.jump-flag {
  margin-left: 2px; padding-left: 5px;
  border-left: 1px solid color-mix(in srgb, currentColor 42%, transparent);
}
.rest-quad-list { display: flex; flex-direction: column; gap: 2px; }
.rest-quad-item { display: block; }

/* the pair left the header for the dock, so the TODAY button keeps its
   outbound arrow on every route and the wordmark keeps its room */
.jump-go { display: inline; }

/* 361 is the target phone; the pair now shares the dock, which has to hold two
   44px arrows plus three 44px keys inside 320px as well. Nothing here touches
   any other route. */
@media (max-width: 380px) {
  .dock { gap: 3px; }
  .dock .daynav { gap: 3px; }
}

/* AA on the new small print: the mark, the cursor label, the readiness label
   and the matrix axes were on --ink-3 (3.9:1 on paper). --ink-2 clears 7.8:1
   light / 7.0:1 dark, and the numbers below are the only ones that changed. */
.rest-pill-k, .rest-ready-k, .rest-mark,
.rest-mx-col, .rest-mx-row, .dls-val { color: var(--ink-2); }

/* the four cells were rgba washes over the tinted matrix gap, which pulled the
   effective background down to ~4.3:1 for the axis line. Paint the wash over an
   opaque card instead so each cell reads as its own colour at full strength.
   (two-class selectors so this later rule actually outranks the shorthand) */
.rest-quad-cell.is-q1 { background-color: var(--card); background-image: linear-gradient(var(--green-wash), var(--green-wash)); }
.rest-quad-cell.is-q2 { background-color: var(--card); background-image: linear-gradient(var(--blue-wash), var(--blue-wash)); }
.rest-quad-cell.is-q3 { background-color: var(--card); background-image: linear-gradient(var(--yellow-wash), var(--yellow-wash)); }
.rest-quad-cell.is-q4 { background-color: var(--card); background-image: linear-gradient(var(--red-wash), var(--red-wash)); }

/* ==========================================================================
   PR-CD (T261123) — dual-track anchors, 72 h reserve, v2 suggestions.
   Everything here is additive; no existing selector is redefined.
   ========================================================================== */

/* #/1rm — the anchor band under the two-copy strip */
.anchor-band { margin: 10px 0 4px; border: 1px solid var(--hair); background: var(--card-2); }
.anchor-band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--hair); }
.anchor-band-k { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; color: var(--ink-2); }
.anchor-band-note { font-family: var(--mono); font-size: 8px; color: var(--ink-3); text-align: right; }
.anchor-row { display: grid; grid-template-columns: 26px 1fr auto; grid-auto-rows: auto; gap: 2px 8px; padding: 5px 8px; border-top: 1px solid var(--hair); align-items: baseline; }
.anchor-row:first-of-type { border-top: 0; }
.anchor-row[data-state="MEASURED"] .anchor-tag { color: var(--green); border-color: var(--green); }
.anchor-row[data-state="PLANNED"] .anchor-tag { color: var(--ink-2); }
.anchor-block { font-family: var(--mono); font-size: 9px; color: var(--ink-3); }
.anchor-name { font-size: 11px; color: var(--ink); white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.anchor-tag { font-family: var(--mono); font-size: 8px; letter-spacing: .06em; border: 1px solid var(--hair); padding: 1px 4px; white-space: nowrap; }
.anchor-num { font-family: var(--mono); font-size: 11px; font-weight: 700; text-align: right; white-space: nowrap; }
.anchor-diff { grid-column: 2 / -1; font-family: var(--mono); font-size: 8px; color: var(--ink-3); white-space: normal; overflow-wrap: anywhere; }

/* #/rest — RESERVE · 72H strip */
.reserve-bar { margin: 8px 0 10px; border: 1px solid var(--hair); background: var(--card); padding: 7px 8px; }
.reserve-bar.is-window { border: 1.5px solid var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.reserve-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.reserve-title { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; color: var(--ink); }
.reserve-score { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.reserve-verdict { font-family: var(--mono); font-size: 8px; letter-spacing: .08em; padding: 1px 4px; border: 1px solid var(--hair); }
.reserve-verdict.is-pass { color: var(--green); border-color: var(--green); }
.reserve-verdict.is-warn { color: #B58900; border-color: #B58900; }
.reserve-verdict.is-fail { color: var(--red, #A63A3A); border-color: var(--red, #A63A3A); }
.reserve-verdict.is-unknown { color: var(--ink-3); }
.reserve-when { margin-left: auto; font-family: var(--mono); font-size: 8px; color: var(--ink-3); white-space: nowrap; }
.reserve-lamps { display: flex; gap: 6px; margin-top: 6px; }
.rsv-lamp { flex: 1 1 0; display: flex; align-items: baseline; justify-content: space-between; gap: 4px; padding: 4px 6px; border: 1px solid var(--hair); background: var(--card-2); min-width: 0; }
.rsv-lamp-k { font-family: var(--mono); font-size: 8px; letter-spacing: .08em; color: var(--ink-3); }
.rsv-lamp-v { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.rsv-lamp.is-good { border-color: var(--green); }
.rsv-lamp.is-warn { border-color: #B58900; }
.rsv-lamp.is-bad { border-color: var(--red, #A63A3A); }
.rsv-lamp.is-na .rsv-lamp-v { color: var(--ink-3); }
.reserve-flags { margin: 6px 0 0; font-family: var(--mono); font-size: 8px; line-height: 1.4; color: var(--ink-3); }

/* #/rest — T-1 gate card */
.reserve-gate { margin: 0 0 10px; border: 1.5px solid var(--ink); background: var(--card); padding: 8px; }
.reserve-gate-head { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; color: var(--ink); }
.reserve-gate-sub { margin: 4px 0 6px; font-size: 11px; line-height: 1.35; color: var(--ink-2); }
.reserve-gate-row { display: grid; grid-template-columns: 46px 52px 1fr; gap: 6px; padding: 3px 0; border-top: 1px solid var(--hair); align-items: baseline; }
.reserve-gate-k { font-family: var(--mono); font-size: 8px; color: var(--ink-3); }
.reserve-gate-v { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--ink); }
.reserve-gate-note { font-size: 10px; line-height: 1.3; color: var(--ink-2); }

/* #/day — reserve chip + suggestion card */
.reserve-chip { display: inline-flex; align-items: baseline; gap: 4px; margin-left: 6px; padding: 2px 6px; border: 1px solid var(--hair); background: var(--card-2); color: var(--ink); font-family: var(--mono); cursor: pointer; white-space: nowrap; }
.reserve-chip-k { font-size: 8px; letter-spacing: .08em; color: var(--ink-3); }
.reserve-chip-v { font-size: 11px; font-weight: 700; }
.reserve-chip.is-pass { border-color: var(--green); }
.reserve-chip.is-warn { border-color: #B58900; }
.reserve-chip.is-fail { border-color: var(--red, #A63A3A); }
.suggest-card { margin: 8px 0 2px; border: 1px dashed var(--ink-2); background: var(--card-2); padding: 7px 8px; }
.suggest-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.suggest-tag { font-family: var(--mono); font-size: 8px; letter-spacing: .1em; color: var(--ink-2); }
.suggest-pct { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.suggest-why { margin: 4px 0 6px; font-size: 11px; line-height: 1.35; color: var(--ink-2); }
.suggest-apply { min-height: 36px; padding: 0 10px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 9px; letter-spacing: .1em; cursor: pointer; }
.suggest-apply:disabled { opacity: .4; cursor: default; }
.suggest-foot { margin: 5px 0 0; font-family: var(--mono); font-size: 8px; line-height: 1.4; color: var(--ink-3); }

/* --------------------------------------------------------- filing footer
   ICP / public-security filing line (PR #28). It is the only Chinese copy in
   the shell, so it sits in its own named node and the English-only gate
   whitelists exactly these strings. Normal flow at the end of `.shell`, above
   the fixed dock; the print sheet drops it. 12px text uses --ink-2, which
   clears 4.5:1 on both paper tones. */
.rr-beian-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 14px;
  margin-top: 28px;
  padding: 14px var(--gut) 16px;
  border-top: 1px solid var(--hair);
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
}
.rr-beian-footer[hidden] { display: none !important; }
.rr-beian-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}
.rr-beian-link:hover,
.rr-beian-link:focus-visible { color: var(--ink); text-decoration: underline; }
.rr-beian-link img { display: block; width: 14px; height: 14px; }
@media (max-width: 340px) {
  .rr-beian-footer { padding: 12px 8px 14px; gap: 4px 10px; font-size: 11.5px; }
}
@media print { .rr-beian-footer { display: none !important; } }

/* ============================================================ PR29-B
   #/rest polish: reserve strip, T-1 gate, foundation and priority rows.
   Rhythm only — no content, no dose, no class contract changes. */
.reserve-bar {
  margin: 10px 0 12px; padding: 10px 11px;
  border-left: 3px solid var(--tone-rest);
}
.reserve-head { gap: 6px 10px; }
.reserve-title { font-size: 9.5px; letter-spacing: .14em; }
.reserve-score { font-size: 13px; }
.reserve-verdict { padding: 2px 6px; }
.reserve-lamps { gap: 8px; margin-top: 8px; }
.reserve-flags { margin-top: 8px; line-height: 1.55; color: var(--ink-2); }
.reserve-gate {
  margin: 2px 0 12px; padding: 10px 11px;
  border-left: 3px solid var(--ink);
}
.reserve-gate-sub { margin: 5px 0 8px; font-size: 11.5px; }
.reserve-gate-row { grid-template-columns: 48px 58px minmax(0, 1fr); gap: 8px; padding: 6px 0; }
.reserve-gate-note { font-size: 10.5px; line-height: 1.45; }
.rest-card { padding: 12px 13px 13px; }
.rest-card-sub { font-size: 10.5px; }
.rest-card-meta { gap: 5px 8px; margin-top: 10px; padding-top: 10px; }
.rest-foundation-row { min-height: 40px; padding: 9px 0; }
.rest-tier-row { min-height: 40px; padding: 9px 0; }
.rest-tier-name { font-size: 11.5px; }
.rest-tier-dose { color: var(--ink-2); }
.rest-tier-tag { color: var(--tone-rest); }
.rest-tier-caution { line-height: 1.5; }
.rest-tier-kicker { margin-top: 14px; }
.rest-core-fold { margin-top: 8px; }
.rest-gpp-fold { margin-top: 10px; }
.rest-mark { min-height: 28px; }

/* PR29-C — #/cycle projections and share-card preview */
[data-projections] .proj-cut { margin-top: 8px; }
.proj-cut-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1.6fr) 58px;
  gap: 4px 8px; padding: 8px 0; border-top: 1px solid var(--hair);
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .03em; align-items: baseline;
}
.proj-cut-label { color: var(--ink); font-weight: 700; text-transform: uppercase; }
.proj-cut-val { color: var(--ink); }
.proj-cut-rate { color: var(--ink-2); line-height: 1.45; }
.proj-cut-odds { color: var(--tone-rest); font-weight: 700; text-align: right; }
.proj-matrix { margin-top: 10px; }
.proj-row {
  display: grid; grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr));
  gap: 4px 8px; padding: 7px 0; border-top: 1px solid var(--hair);
  font-family: var(--mono); font-size: 8px; letter-spacing: .02em; line-height: 1.45;
}
.proj-head { color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.proj-lift b { display: block; font-size: 9px; color: var(--ink); }
.proj-lift em { display: block; font-style: normal; color: var(--ink-2); }
.proj-cell { color: var(--ink); overflow-wrap: anywhere; }
.proj-odds { white-space: nowrap; }
.proj-cut-odds, .proj-cut-val { white-space: nowrap; }
.proj-total {
  margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--hair);
  font-family: var(--mono); font-size: 8.5px; line-height: 1.5; color: var(--ink);
}
.cycle-share-canvas {
  display: block; width: 100%; height: auto; margin-top: 12px;
  border: 1px solid var(--hair); background: #f4f1e8;
}
@media (max-width: 380px) {
  .proj-cut-row { grid-template-columns: minmax(0, 1fr) 58px 58px; }
  .proj-cut-rate { grid-column: 1 / -1; }
  .proj-cut-label { overflow-wrap: anywhere; }
}
