/* The homepage. Identity: hairline editorial grid, giant numerals, one acid accent (--accent).
   Data colours (validated for colour vision deficiency and contrast on the dark surface): gym #7a9e14, cardio #3987e5,
   losses #d95926; magnitude uses a single lime ramp (dark -> bright). */
:root { --gain: #7a9e14; --loss: #d95926; --cardio: #3987e5; --cal-empty: #15181d; --body-empty: #2a3039; --body-frame: #1d2128;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace; }
main:has(.home) { max-width: 1320px; padding-top: 0; }
.kicker { display: flex; align-items: center; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0; }

.status { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.status b { color: var(--text); font-weight: 600; }
.status .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; transform: translateY(-1px); }
.status .dot.idle { background: var(--faint); }

.ranges { display: flex; flex-wrap: wrap; gap: 2px; margin: 24px 0 0; }
.ranges button { background: none; border: 0; padding: 8px 12px; border-radius: 999px; color: var(--muted); cursor: pointer; font-size: 13px; min-height: 36px; }
.ranges button:hover { color: var(--text); }
.ranges button.on { background: var(--text); color: var(--bg); font-weight: 600; }
.ranges button.custom { background: var(--accent); color: #0b0d10; }
.ranges button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.pause { display: grid; grid-template-columns: auto 1fr; gap: 0 28px; align-items: end; margin: 30px 0 4px; }
.pause .n { font-size: clamp(96px, 15vw, 200px); line-height: .8; font-weight: 750; letter-spacing: -.06em; color: var(--accent); }
.pause h1, .headline h1 { margin: 0; font-size: clamp(26px, 3.6vw, 44px); line-height: 1.05; letter-spacing: -.025em; font-weight: 650; }
.pause p, .headline p { margin: 10px 0 0; color: var(--muted); max-width: 62ch; }
.headline { margin: 30px 0 4px; }

.board { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 26px; }
.cell { padding: 20px 20px 22px 0; border-right: 1px solid var(--line); min-width: 0; }
.cell + .cell { padding-left: 20px; }
.cell:last-child { border-right: 0; }
.cell .v { font-size: clamp(40px, 5.2vw, 74px); font-weight: 720; letter-spacing: -.045em; line-height: 1; margin: 14px 0 10px; white-space: nowrap; }
.cell .v small { font-size: .42em; letter-spacing: -.01em; color: var(--muted); font-weight: 600; margin-left: 4px; }
.delta { font: 600 13px/1 var(--mono); color: var(--text); }
.delta.up::before { content: "▲ "; color: var(--gain); font-size: 10px; }
.delta.down::before { content: "▼ "; color: var(--loss); font-size: 10px; }
.note { color: var(--faint); font-size: 12px; margin: 8px 0 0; }
.note.wide { margin: 10px 0 0; }

.block { padding: 34px 0; border-bottom: 1px solid var(--line); }
.head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; margin-bottom: 16px; flex-wrap: wrap; }
.head h2 { display: flex; align-items: center; margin: 0; font-size: 22px; letter-spacing: -.02em; font-weight: 650; text-transform: none; color: var(--text); }
.head > span { color: var(--muted); font-size: 13px; }

/* timeline */
.scope { background: linear-gradient(180deg, #0f1310, var(--surface)); border: 1px solid var(--line); border-radius: 16px; padding: 12px 12px 4px; }
.scope svg { width: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; }
.scope .ln { fill: none; stroke: #a3cf1c; stroke-width: 1.8; stroke-linejoin: round; }
.scope .grid { stroke: var(--line); }
.scope .yr { stroke: var(--faint); stroke-dasharray: 2 4; }
.scope .lab { font: 10px var(--mono); fill: var(--muted); }
.scope .brush { fill: var(--accent); fill-opacity: .1; stroke: var(--accent); stroke-width: 1; }
.scope .rec { fill: var(--text); opacity: .85; }
.scope .cbar { fill: var(--cardio); }
.scope .hover { stroke: var(--text); stroke-width: 1; opacity: .6; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 11px var(--mono); color: var(--muted); padding: 8px 2px 6px; }
.legend i { display: inline-block; width: 12px; height: 2px; background: #a3cf1c; margin-right: 6px; vertical-align: 3px; }
.legend i.c { width: 8px; height: 8px; background: var(--cardio); vertical-align: 0; }
.legend i.r { width: 6px; height: 6px; border-radius: 50%; background: var(--text); vertical-align: 1px; }
.legend .drag { margin-left: auto; color: var(--faint); }

/* strength */
.strength { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 40px; padding: 34px 0; border-bottom: 1px solid var(--line); }
.big { font-size: clamp(64px, 9vw, 124px); font-weight: 750; letter-spacing: -.06em; line-height: .9; margin: 16px 0 14px; }
.big.na { color: var(--faint); font-size: clamp(40px, 5vw, 64px); }
.lede { color: var(--muted); margin: 0; max-width: 46ch; font-size: 14px; }
.lede b { color: var(--text); font-weight: 600; }
.lede.gap { margin-top: 14px; }
.bars { display: grid; gap: 7px; align-content: start; }
.bars-key { display: grid; grid-template-columns: minmax(120px, 1.2fr) 1fr 1fr 64px; font-size: 11px; color: var(--faint); margin-bottom: 4px; }
.bars-key span:first-child { grid-column: 2; } .bars-key span:nth-child(2) { display: none; } .bars-key span:last-child { text-align: right; }
.sbar { display: grid; grid-template-columns: minmax(120px, 1.2fr) 2fr 64px; gap: 14px; align-items: center; font-size: 13px; outline: none; }
.sbar .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbar .track { position: relative; height: 10px; }
.sbar .track::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--faint); }
.sbar .fill { position: absolute; top: 1px; height: 8px; border-radius: 2px; }
.sbar .fill.gain { background: var(--gain); } .sbar .fill.loss { background: var(--loss); }
.sbar .p { text-align: right; font: 600 12px/1 var(--mono); }
.sbar:hover .t, .sbar:focus-visible .t { color: var(--accent); }

/* anatomy */
.anatomy { display: grid; grid-template-columns: minmax(300px, 1.15fr) 1fr; gap: 32px; align-items: start; }
.map { background: radial-gradient(60% 55% at 50% 45%, rgba(163, 207, 28, .07), transparent 70%), var(--surface);
  border: 1px solid var(--line); border-radius: 20px; padding: 18px 12px 14px; }
.map svg.body { width: 100%; height: auto; display: block; }
.body .m { cursor: pointer; outline: none; }
.body .m path { transition: filter .15s ease; }
.body .m:hover path, .body .m:focus-visible path { filter: brightness(1.3); }
.body .m.sel path { stroke: var(--text); stroke-width: 2; }
.body .detail { pointer-events: none; opacity: .7; }
.body-cap { font-size: 9px; letter-spacing: .2em; fill: var(--faint); }
.ramp-key { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.ramp { display: flex; width: 150px; height: 8px; border-radius: 4px; overflow: hidden; }
.ramp span { flex: 1; }
.focus h3 { margin: 8px 0 2px; font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -.035em; font-weight: 720; }
.focus .sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; margin-bottom: 18px; }
.kv b { display: block; font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.kv span { font-size: 12px; color: var(--muted); }
.chip { font: 600 11px var(--mono); padding: 2px 6px; border-radius: 6px; background: var(--surface-2); margin-left: 8px; vertical-align: middle; }
.exlist { list-style: none; margin: 8px 0 0; padding: 0; }
.exlist li { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.exlist li span { color: var(--muted); font: 12px var(--mono); }
.rank-wrap { margin-top: 22px; }
.rank-key { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.rank-key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--gain); margin-right: 6px; vertical-align: -1px; }
.rank-key i.was { width: 2px; background: var(--text); opacity: .6; }
.ranking { display: grid; gap: 4px; }
.rk { display: grid; grid-template-columns: 100px 1fr 44px; align-items: center; gap: 12px; font: inherit; font-size: 13px; color: var(--text);
  background: none; border: 0; padding: 3px 0; cursor: pointer; text-align: left; }
.rk .track { position: relative; height: 10px; background: var(--surface-2); border-radius: 3px; }
.rk .now { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--gain); }
.rk .was { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .6; }
.rk em { font: 600 12px var(--mono); font-style: normal; text-align: right; }
.rk.sel > span:first-child, .rk:hover > span:first-child { color: var(--accent); }
.rk:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.less { margin-top: 18px; max-width: none; }

/* records + year */
.duo { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; }   /* not .split: pages.css uses that for its bars */
.recs { list-style: none; margin: 0; padding: 0; }
.recs li { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.recs .d { color: var(--faint); font-size: 12px; }
.recs .c { display: block; color: var(--muted); font-size: 12px; }
.recs .x { font: 600 13px var(--mono); text-align: right; }
.recs li.quiet { opacity: .5; }
.cal-wrap { overflow-x: auto; }
.cal { width: 100%; min-width: 640px; height: auto; display: block; }
.cal-m { font-size: 10px; fill: var(--muted); }
.cal rect.on { cursor: default; }
.cal rect:hover { stroke: var(--text); stroke-width: 1.2; }
.facts { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.facts b { display: block; font-size: 28px; color: var(--text); letter-spacing: -.02em; }
.empty h1 { font-size: 40px; letter-spacing: -.03em; } .empty p { color: var(--muted); }

@media (max-width: 1100px) { .anatomy { grid-template-columns: 1fr; } .duo { grid-template-columns: 1fr; } }
@media (max-width: 980px) {
  .board { grid-template-columns: repeat(2, 1fr); }
  .cell { padding: 18px 12px 18px 0 !important; border-right: 0; border-bottom: 1px solid var(--line); }
  .cell:nth-child(odd) { border-right: 1px solid var(--line); }
  .cell:nth-child(even) { padding-left: 16px !important; }
  .cell:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .strength, .pause { grid-template-columns: 1fr; }
  .sbar, .bars-key { grid-template-columns: minmax(96px, 1fr) 1.3fr 56px; }
  .legend .drag { margin-left: 0; }
}
/* grid children must be allowed to shrink, or the calendar's own scroller widens the page */
.duo > *, .anatomy > *, .strength > *, .board > * { min-width: 0; }
@media (max-width: 640px) {
  .sbar { grid-template-columns: 1fr 60px; row-gap: 6px; }
  .sbar .t { white-space: normal; }
  .sbar .track { grid-column: 1 / -1; grid-row: 2; }
  .bars-key { grid-template-columns: 1fr 1fr; }
  .bars-key span:first-child { grid-column: 1; }
}
.status a.strong-link { color: var(--text); font-weight: 600; text-decoration: none; border-bottom: 1px dotted var(--faint); }
.sbar a.t { color: var(--text); text-decoration: none; }
.focus h3 a { color: var(--text); text-decoration: none; } .focus h3 a:hover, .focus h3 a:hover .go { color: var(--accent); }
.focus h3 .go { color: var(--faint); font-weight: 400; }
.recs a { color: inherit; text-decoration: none; } .recs a:hover { color: var(--accent); }
.cal rect.on { cursor: pointer; }

/* next up (coach.js) */
.nextup .src { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.nextup .sum { color: var(--muted); margin: -6px 0 16px; font-size: 14px; }
.nu-more summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.nu-more summary::-webkit-details-marker { display: none; }
.nu-more summary:hover { border-color: rgba(215, 255, 58, .35); }
.nu-more .peek { min-width: 0; overflow-wrap: anywhere; } .nu-more .peek b { font-weight: 600; } .nu-more .or { color: var(--muted); }
.nu-more .show { flex: none; color: var(--accent); font-size: 13px; }
.nu-more .show::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border: solid currentColor;
  border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.nu-more[open] .show::after { transform: translateY(1px) rotate(-135deg); }
.nu-more[open] summary { margin-bottom: 16px; }
@media (prefers-reduced-motion: reduce) { .nu-more .show::after { transition: none; } }
.picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.pick { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 8px; }
.pick.first { border-color: rgba(215, 255, 58, .35); background: linear-gradient(180deg, rgba(215, 255, 58, .05), var(--surface) 120px); }
.pick.first .kicker { color: var(--accent); }
.pick h3 { margin: 4px 0 6px; font-size: 21px; letter-spacing: -.02em; font-weight: 650; }
.pick .why { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.pick ol { list-style: none; margin: 0; padding: 0; }
.pick li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.pick li .t { text-decoration: none; font-weight: 550; min-width: 0; overflow-wrap: anywhere; }
.pick li .t:hover { color: var(--accent); }
.pick li .x { font: 13.5px var(--mono); text-align: right; }
.pick li .c { grid-column: 1 / -1; color: var(--faint); font-size: 12.5px; }
@media (max-width: 560px) { .pick li { grid-template-columns: 1fr; } .pick li .x { text-align: left; } }

/* body figure switch under the muscle map (figure.js) */
.fig-switch { display: flex; justify-content: center; gap: 4px; margin-top: 10px; }
.fig-switch button { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.fig-switch button.on { background: var(--surface-2); color: var(--text); border-color: var(--faint); }
.fig-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
