/*
 * CRESCIVORE — IRON & FUEL
 * Customer app styles (spec §8.2).
 *
 * Mobile-first. Dark surfaces, white type, one accent: #A4161A and nothing else.
 * Generous touch targets for gym use. Visible focus states throughout.
 * Everything is scoped under .cv-app so it does not fight the host theme.
 */

.cv-app {
	--cv-black: #0a0a0a;
	--cv-surface: #141414;
	--cv-surface-2: #1c1c1c;
	--cv-line: #2a2a2a;
	--cv-white: #f5f5f5;
	--cv-muted: #a0a0a0;
	--cv-quiet: #7a7a7a;
	--cv-red: #a4161a;
	--cv-red-bright: #c81c21;
	--cv-radius: 4px;
	--cv-gap: 1rem;

	box-sizing: border-box;
	max-width: 44rem;
	margin: 0 auto;
	padding: 1rem;
	background: var(--cv-black);
	color: var(--cv-white);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.cv-app *,
.cv-app *::before,
.cv-app *::after {
	box-sizing: inherit;
}

/*
 * Host-theme isolation. Found on the first real site (3 November 2026): the theme
 * styled h2 near-black and the exercise name vanished against the dark card, so
 * "Best controlled set of 5" appeared with no exercise above it. Themes commonly
 * set colour, transform, letter-spacing and font on headings; pin all of them so
 * the app looks the same under any theme.
 */
.cv-app h1, .cv-app h2, .cv-app h3, .cv-app h4, .cv-app h5, .cv-app h6 {
	color: var(--cv-white);
	font-family: inherit;
	text-transform: none;
	letter-spacing: normal;
	line-height: 1.25;
	margin-top: 0;
	margin-bottom: 0.4rem;
}
.cv-app p, .cv-app li, .cv-app label, .cv-app td, .cv-app th, .cv-app dt, .cv-app dd, .cv-app summary, .cv-app legend {
	color: inherit;
	font-family: inherit;
	text-transform: none;
	letter-spacing: normal;
}
.cv-app a { color: var(--cv-white); }
.cv-app input, .cv-app select, .cv-app textarea, .cv-app button {
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
}

/* Accessible focus state, never removed. */
.cv-app a:focus-visible,
.cv-app button:focus-visible,
.cv-app input:focus-visible,
.cv-app select:focus-visible,
.cv-app textarea:focus-visible,
.cv-app summary:focus-visible {
	outline: 2px solid var(--cv-red-bright);
	outline-offset: 2px;
}

.cv-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------------- Brand ---------------- */

.cv-brand {
	text-align: center;
	padding: 1.5rem 0 1rem;
	border-bottom: 1px solid var(--cv-line);
	margin-bottom: 1rem;
}

.cv-brand__wordmark {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

.cv-brand__tagline {
	margin: 0.25rem 0 0;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.3em;
	color: var(--cv-red);
	text-transform: uppercase;
}

.cv-brand__subtitle {
	margin: 0.75rem 0 0;
	color: var(--cv-muted);
	font-size: 0.95rem;
}

/* ---------------- Nav ---------------- */

.cv-nav {
	margin-bottom: 1rem;
	border-bottom: 1px solid var(--cv-line);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.cv-nav__list {
	display: flex;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
	min-width: max-content;
}

.cv-nav__item { margin: 0; }

.cv-nav__link {
	display: block;
	padding: 0.75rem 0.85rem;
	color: var(--cv-muted);
	text-decoration: none;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	border-bottom: 2px solid transparent;
	white-space: nowrap;
}

.cv-nav__link:hover { color: var(--cv-white); }

.cv-nav__link.is-current {
	color: var(--cv-white);
	border-bottom-color: var(--cv-red);
}

/* ---------------- Hero / page heads ---------------- */

.cv-hero {
	padding: 1.5rem 0 1.75rem;
	text-align: center;
}

.cv-hero__eyebrow,
.cv-page-head__sub,
.cv-workout-head__eyebrow {
	margin: 0;
	color: var(--cv-red);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.cv-hero__title {
	margin: 0.5rem 0 1.25rem;
	font-size: 2rem;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.01em;
}

.cv-hero__sub { margin: 0 0 1.25rem; color: var(--cv-muted); }

.cv-hero__message {
	margin: 1.5rem auto 0;
	max-width: 34rem;
	color: var(--cv-muted);
	font-size: 0.95rem;
	text-align: left;
}

.cv-page-head { padding: 1.25rem 0 1rem; }

.cv-page-head__title {
	margin: 0.25rem 0 0;
	font-size: 1.6rem;
	font-weight: 800;
}

.cv-page-head__sub { color: var(--cv-muted); letter-spacing: 0; text-transform: none; font-weight: 400; font-size: 0.9rem; margin-top: 0.4rem; }

/* ---------------- Buttons ---------------- */

.cv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* Comfortable to hit mid-set with chalky hands (§8.2). */
	min-height: 48px;
	padding: 0.75rem 1.25rem;
	border: 1px solid var(--cv-line);
	border-radius: var(--cv-radius);
	background: var(--cv-surface-2);
	color: var(--cv-white);
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.12s ease, border-color 0.12s ease;
}

.cv-btn:hover:not(:disabled) { background: #242424; }

.cv-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.cv-btn--primary {
	background: var(--cv-red);
	border-color: var(--cv-red);
	text-transform: uppercase;
}

.cv-btn--primary:hover:not(:disabled) {
	background: var(--cv-red-bright);
	border-color: var(--cv-red-bright);
}

.cv-btn--lg {
	width: 100%;
	min-height: 56px;
	font-size: 1.05rem;
	letter-spacing: 0.08em;
}

.cv-btn--ghost { background: transparent; }

.cv-btn--sm {
	min-height: 40px;
	padding: 0.45rem 0.85rem;
	font-size: 0.82rem;
}

.cv-btn--log {
	min-height: 44px;
	padding: 0.5rem 0.75rem;
	font-size: 0.8rem;
	text-transform: uppercase;
}

/* ---------------- Panels and cards ---------------- */

.cv-panel,
.cv-card {
	background: var(--cv-surface);
	border: 1px solid var(--cv-line);
	border-radius: var(--cv-radius);
	padding: 1.25rem;
	margin-bottom: 1rem;
}

.cv-panel__title,
.cv-card__title {
	margin: 0 0 0.85rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--cv-muted);
}

.cv-card__body { margin: 0 0 0.6rem; font-size: 0.92rem; color: var(--cv-white); }
.cv-card__body--quiet { color: var(--cv-quiet); font-size: 0.86rem; }

.cv-meta { margin: 0.5rem 0; color: var(--cv-muted); font-size: 0.88rem; }
.cv-meta--quiet { color: var(--cv-quiet); font-size: 0.82rem; }

.cv-hint { margin: 0.4rem 0 0; color: var(--cv-quiet); font-size: 0.8rem; }

.cv-callout {
	border-left: 3px solid var(--cv-red);
	background: var(--cv-surface-2);
	padding: 0.9rem 1rem;
	margin-bottom: 1rem;
	border-radius: 0 var(--cv-radius) var(--cv-radius) 0;
}

.cv-callout p { margin: 0; font-size: 0.9rem; }
.cv-callout--hold { border-left-color: #3f7f4f; }
.cv-callout--wait { border-left-color: var(--cv-quiet); }

.cv-warning {
	margin: 0.75rem 0 0;
	padding: 0.75rem;
	border-left: 3px solid #b8860b;
	background: var(--cv-surface-2);
	font-size: 0.86rem;
}

.cv-disclaimer {
	margin: 1.5rem 0 0.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--cv-line);
	color: var(--cv-quiet);
	font-size: 0.78rem;
	line-height: 1.6;
}

.cv-privacy {
	margin: 1rem 0 0;
	padding: 0.85rem;
	background: var(--cv-surface-2);
	border-radius: var(--cv-radius);
	color: var(--cv-muted);
	font-size: 0.8rem;
}

.cv-notice-wrap { padding: 2.5rem 1rem; }

.cv-notice {
	text-align: center;
	border: 1px solid var(--cv-line);
	border-radius: var(--cv-radius);
	padding: 2rem 1.25rem;
	background: var(--cv-surface);
}

.cv-notice__title { margin: 0 0 0.75rem; font-size: 1.2rem; font-weight: 800; }
.cv-notice__body { margin: 0; color: var(--cv-muted); }
.cv-notice__body a { color: var(--cv-red-bright); }

/* ---------------- Progress ---------------- */

.cv-progress { margin-bottom: 0.75rem; }

.cv-progress__bar {
	height: 6px;
	background: var(--cv-surface-2);
	border-radius: 3px;
	overflow: hidden;
}

.cv-progress__fill {
	display: block;
	height: 100%;
	background: var(--cv-red);
}

.cv-progress__label {
	margin: 0.5rem 0 0;
	font-size: 0.82rem;
	color: var(--cv-muted);
}

/* ---------------- Week grid ---------------- */

.cv-weeks { margin: 0; padding: 0; list-style: none; }

.cv-week {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.6rem 0;
	border-bottom: 1px solid var(--cv-line);
}

.cv-week:last-child { border-bottom: 0; }
.cv-week.is-locked { opacity: 0.45; }

.cv-week__head { display: flex; align-items: baseline; gap: 0.5rem; min-width: 7.5rem; }
.cv-week__num { font-size: 1.1rem; font-weight: 800; }

.cv-week__phase {
	font-size: 0.68rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--cv-quiet);
}

.cv-week__days { display: flex; gap: 0.4rem; }

.cv-day {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--cv-line);
	border-radius: var(--cv-radius);
	color: var(--cv-muted);
	font-size: 0.85rem;
	font-weight: 700;
	text-decoration: none;
}

.cv-day:hover { color: var(--cv-white); border-color: var(--cv-muted); }

.cv-day.is-done {
	background: var(--cv-red);
	border-color: var(--cv-red);
	color: #fff;
}

.cv-day.is-draft { border-color: var(--cv-red); color: var(--cv-white); }
.cv-day.is-locked { cursor: not-allowed; }

.cv-week__tag {
	margin: 0 0 0 auto;
	font-size: 0.66rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--cv-red);
}

/* ---------------- Link cards ---------------- */

.cv-links { display: grid; gap: 0.6rem; }

.cv-link-card {
	display: block;
	padding: 0.9rem 1rem;
	border: 1px solid var(--cv-line);
	border-radius: var(--cv-radius);
	background: var(--cv-surface-2);
	text-decoration: none;
	color: var(--cv-white);
}

.cv-link-card:hover { border-color: var(--cv-red); }
.cv-link-card__title { display: block; font-weight: 700; font-size: 0.95rem; }
.cv-link-card__sub { display: block; margin-top: 0.2rem; color: var(--cv-quiet); font-size: 0.82rem; }

/* ---------------- Workout ---------------- */

.cv-workout-head { padding: 1rem 0; }
.cv-workout-head__title { margin: 0.3rem 0 0; font-size: 1.5rem; font-weight: 800; }

.cv-badge {
	display: inline-block;
	margin: 0.6rem 0 0;
	padding: 0.25rem 0.6rem;
	border-radius: var(--cv-radius);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.cv-badge--done { background: var(--cv-red); color: #fff; }

.cv-save-status {
	display: block;
	min-height: 1.1rem;
	margin-top: 0.5rem;
	font-size: 0.78rem;
	color: var(--cv-quiet);
}

.cv-save-status.is-error { color: #e06c6c; }
.cv-save-status.is-saved { color: var(--cv-green); }

.cv-exercise__head { margin-bottom: 0.85rem; }

.cv-exercise__order {
	margin: 0;
	font-size: 0.68rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cv-quiet);
}

.cv-exercise__name { margin: 0.2rem 0 0.15rem; font-size: 1.25rem; font-weight: 800; }
.cv-exercise__band { margin: 0; color: var(--cv-muted); font-size: 0.88rem; }

.cv-exercise.is-not-performed { opacity: 0.6; }

.cv-prescription {
	padding: 0.85rem 0;
	margin-bottom: 0.5rem;
	border-top: 1px solid var(--cv-line);
	border-bottom: 1px solid var(--cv-line);
}

.cv-prescription__weight { margin: 0; display: flex; align-items: baseline; gap: 0.35rem; }
.cv-prescription__value { font-size: 2.1rem; font-weight: 800; line-height: 1; }
.cv-prescription__unit { font-size: 0.9rem; color: var(--cv-muted); font-weight: 700; }

.cv-prescription__label {
	margin: 0.3rem 0 0;
	font-size: 0.76rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cv-quiet);
}

.cv-prescription__label--warn { color: #d9a84a; text-transform: none; letter-spacing: 0; font-size: 0.86rem; }
.cv-prescription__hint { color: var(--cv-quiet); font-weight: 400; text-transform: none; letter-spacing: 0; }
.cv-weighin__when { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 0.78rem; font-weight: 600; letter-spacing: 0; color: var(--cv-quiet); }
/* The outbox (v1.15.0): kept is not logged. */
.cv-outbox { margin: 0 0 0.9rem; padding: 0.55rem 0.8rem; border-left: 2px solid var(--cv-white); background: var(--cv-surface-2); font-size: 0.86rem; line-height: 1.45; color: var(--cv-white); border-radius: 0 var(--cv-radius) var(--cv-radius) 0; }
.cv-set-row.is-kept [data-cv-load], .cv-set-row.is-kept [data-cv-reps] { border-style: dashed; }
.cv-app .cv-set-row.is-kept .cv-btn--log { color: var(--cv-muted); border-style: dashed; opacity: 1; }
/* On your phone (v1.15.0). */
.cv-app .cv-linkbtn[hidden], .cv-app .cv-btn[hidden] { display: none; }
.cv-push__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 0.6rem 0 0.4rem; }
.cv-app .cv-push__row .cv-linkbtn { margin: 0; }
.cv-push__install { margin: 0.5rem 0; padding: 0.5rem 0.7rem; border-left: 2px solid var(--cv-line); font-size: 0.86rem; color: var(--cv-white); }
.cv-push__install[hidden] { display: none; }
/* The session card (v1.15.0). */
.cv-share { margin: 0.9rem 0 0; padding-top: 0.8rem; border-top: 1px solid var(--cv-line); display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.cv-share__why { font-size: 0.8rem; color: var(--cv-quiet); }
.cv-share__preview { flex-basis: 100%; }
.cv-share__preview[hidden] { display: none; }
.cv-share__img { display: block; width: 100%; max-width: 270px; height: auto; border: 1px solid var(--cv-line); border-radius: var(--cv-radius); }
.cv-share__hint { margin: 0.4rem 0 0; font-size: 0.8rem; color: var(--cv-muted); }
.cv-share__dl { color: var(--cv-white); }
/* Plates: the weight is the control (v1.15.0). */
.cv-app .cv-plates-btn { display: inline-flex; align-items: baseline; gap: 0.35rem; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 4px; }
.cv-app .cv-plates-btn:focus { outline: none; -webkit-tap-highlight-color: transparent; }
.cv-app .cv-plates-btn:focus-visible { outline: 2px solid var(--cv-red); outline-offset: 3px; }
.cv-app .cv-plates-btn.is-open .cv-prescription__value { text-decoration: underline; text-decoration-color: var(--cv-line); text-underline-offset: 0.2em; }
.cv-app .cv-plates-btn--inline { font-weight: 700; color: var(--cv-white); font-size: 1rem; }
.cv-app .cv-plates-btn--inline.is-open { text-decoration: underline; text-decoration-color: var(--cv-line); text-underline-offset: 0.2em; }
/* Every size here is pinned under .cv-app so a host theme's span or p rules cannot shrink the rings (1.15.1, owner's phone). */
.cv-app .cv-plates { display: block; margin: 0.6rem 0 0.3rem; padding: 0.7rem 0.8rem 0.6rem; border: 1px solid var(--cv-line); border-radius: var(--cv-radius); background: var(--cv-surface-2); }
.cv-app .cv-plates[hidden] { display: none; }
.cv-app .cv-plates--ramp { margin: 0.5rem 0 0.6rem; }
.cv-app .cv-plates__line { margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: 0.92rem; line-height: 1.3; color: var(--cv-white); }
.cv-app .cv-plates__label { display: inline-block; margin: 0 0.35rem 0 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--cv-quiet); }
.cv-app .cv-plate { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; box-sizing: border-box; width: 2.8rem; min-width: 2.8rem; height: 2.8rem; margin: 0; padding: 0; border-radius: 50%; border: 3px solid var(--cv-white); background: transparent; color: var(--cv-white); font-size: 0.92rem; font-weight: 800; line-height: 1; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.cv-app .cv-plate--45, .cv-app .cv-plate--25, .cv-app .cv-plate--20 { width: 3.2rem; min-width: 3.2rem; height: 3.2rem; border-width: 4px; font-size: 1rem; }
.cv-app .cv-plate--35, .cv-app .cv-plate--15 { width: 3rem; min-width: 3rem; height: 3rem; border-width: 4px; }
.cv-app .cv-plate--5, .cv-app .cv-plate--2_5, .cv-app .cv-plate--1_25 { width: 2.2rem; min-width: 2.2rem; height: 2.2rem; border-width: 2px; font-size: 0.74rem; }
.cv-app .cv-plates__note { margin: 0.45rem 0 0; font-size: 0.82rem; line-height: 1.4; color: var(--cv-muted); }
.cv-app .cv-plates__bar { margin: 0.4rem 0 0; }
.cv-app .cv-plates__bar .cv-linkbtn { margin: 0; font-size: 0.78rem; }

/* ---------------- Set logger ---------------- */

.cv-sets { margin: 0.85rem 0; }

.cv-sets__head,
.cv-set-row,
.cv-attempt-row {
	display: grid;
	grid-template-columns: 2rem 1fr 1fr 5.5rem;
	gap: 0.5rem;
	align-items: center;
}

.cv-sets__head {
	margin-bottom: 0.4rem;
	font-size: 0.66rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--cv-quiet);
}

.cv-set-row,
.cv-attempt-row { margin-bottom: 0.5rem; }

.cv-attempt-row,
.cv-sets__head--attempts { grid-template-columns: 2rem 1fr 1fr 5.5rem 2rem; }
.cv-attempt-row.is-bodyweight,
.cv-sets__head--attempts.is-bodyweight { grid-template-columns: 2rem 1fr 4rem 2rem; }

/* Remove-attempt control: quiet until hovered, never the same colour as "Save". */
.cv-btn--icon {
	padding: 0;
	width: 2rem;
	height: 2.4rem;
	line-height: 1;
	font-size: 1.3rem;
	background: transparent;
	border: 1px solid var(--cv-line);
	color: var(--cv-quiet);
	border-radius: var(--cv-radius);
	cursor: pointer;
}
.cv-btn--icon:hover, .cv-btn--icon:focus-visible { color: var(--cv-white); border-color: var(--cv-muted); }

.cv-set-row__index { font-size: 0.9rem; font-weight: 700; color: var(--cv-muted); text-align: center; }

.cv-set-row.is-logged .cv-set-row__index { color: var(--cv-red); }

.cv-input,
.cv-select,
.cv-textarea {
	width: 100%;
	/* Large enough to tap and read between sets. 16px prevents iOS zoom-on-focus. */
	min-height: 48px;
	padding: 0.6rem 0.7rem;
	border: 1px solid var(--cv-line);
	border-radius: var(--cv-radius);
	background: var(--cv-black);
	color: var(--cv-white);
	font-size: 1rem;
	font-family: inherit;
}

.cv-input::placeholder { color: #555; }
.cv-textarea { min-height: 6rem; resize: vertical; line-height: 1.5; }

.cv-set-row.is-logged .cv-input {
	border-color: #3a3a3a;
	background: var(--cv-surface-2);
}

.cv-field { margin-bottom: 1rem; }

.cv-field > label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--cv-muted);
}

.cv-field__row { display: flex; gap: 0.5rem; }
.cv-select--unit { max-width: 6rem; }

.cv-fieldset {
	border: 0;
	padding: 0;
	margin: 0 0 1.25rem;
}

.cv-fieldset legend {
	padding: 0;
	margin-bottom: 0.6rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--cv-muted);
}

.cv-form-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-top: 1rem;
}

.cv-check { display: inline-flex; align-items: center; justify-content: center; }

.cv-check--block {
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 0.6rem;
	margin-bottom: 1rem;
	font-size: 0.88rem;
	line-height: 1.5;
}

.cv-check input[type="checkbox"] {
	width: 22px;
	height: 22px;
	margin: 0;
	flex-shrink: 0;
	accent-color: var(--cv-red);
}

.cv-check--block input[type="checkbox"] { margin-top: 0.15rem; }

/* The rest clock on a card: a quiet box until it runs, then the number is the
   loudest thing on the card. Green at zero, because zero means "logged time". */
.cv-rest {
	margin: 0.85rem 0 0;
	padding: 0.6rem 0.8rem 0.65rem;
	border: 1px solid var(--cv-line);
	border-radius: var(--cv-radius);
	background: var(--cv-surface-2);
}
.cv-rest__row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.cv-rest__text { display: flex; align-items: baseline; gap: 0.6rem; min-width: 0; }
/* Why rest matters: shown only while the clock runs, which is when it lands. */
.cv-rest__why {
	display: none;
	margin: 0.55rem 0 0;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--cv-white);
}
.cv-rest.is-running .cv-rest__why { display: block; }
.cv-rest__more { margin: 0.35rem 0 0; }
.cv-rest__more summary {
	display: inline-block;
	cursor: pointer;
	list-style: none;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--cv-quiet);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.cv-rest__more summary::-webkit-details-marker { display: none; }
.cv-rest__more summary:hover { color: var(--cv-white); }
.cv-rest__more[open] summary { color: var(--cv-muted); }
.cv-rest__more p {
	margin: 0.5rem 0 0;
	padding-left: 0.75rem;
	border-left: 2px solid var(--cv-muted);
	font-size: 0.88rem;
	line-height: 1.5;
	color: var(--cv-white);
}
.cv-rest__label { margin: 0; font-size: 0.78rem; font-weight: 600; color: var(--cv-muted); }
.cv-rest__clock {
	margin: 0;
	font-size: 1.45rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
	color: var(--cv-white);
	line-height: 1;
}
.cv-rest.is-running { border-color: var(--cv-muted); }
.cv-rest.is-running .cv-rest__label { color: var(--cv-white); }
.cv-rest.is-done { border-color: var(--cv-green-line); }
.cv-rest.is-done .cv-rest__clock { color: var(--cv-green); }
.cv-rest__start { flex: none; }

/* The bar at the foot of the screen while a rest runs: visible however far the
   athlete has scrolled and whatever card has folded. Gone when nothing runs. */
.cv-restbar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.65rem 1rem;
	padding-bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px));
	background: var(--cv-black);
	border-top: 1px solid var(--cv-line);
	box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.45);
}
.cv-restbar[hidden] { display: none; }
.cv-restbar__text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cv-restbar__label {
	font-size: 0.74rem;
	font-weight: 600;
	color: var(--cv-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.cv-restbar__clock {
	font-size: 1.6rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
	line-height: 1.05;
	color: var(--cv-white);
}
.cv-restbar.is-done { border-top-color: var(--cv-green-line); }
.cv-restbar.is-done .cv-restbar__clock { color: var(--cv-green); }
.cv-app .cv-restbar .cv-restbar__sound { margin-top: 0; font-size: 0.74rem; }
.cv-app.has-restbar { padding-bottom: 5.5rem; }

.cv-timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--cv-white); }

.cv-rampup { margin: 0.5rem 0; padding-left: 1.2rem; font-size: 0.88rem; color: var(--cv-muted); }
.cv-rampup li { margin-bottom: 0.25rem; }

/* Ramp-up rows: quieter than the working sets they lead into. Done rows fade;
   when all are done the list folds behind its count so the card is work only. */
.cv-ramp {
	margin: 0.75rem 0 0.5rem;
	padding: 0.55rem 0.75rem 0.6rem;
	border: 1px dashed var(--cv-line);
	border-radius: var(--cv-radius);
}
.cv-ramp__head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
.cv-ramp.is-complete .cv-ramp__head { cursor: pointer; }
.cv-ramp__title { margin: 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; color: var(--cv-muted); }
.cv-ramp__count { margin: 0; font-size: 0.78rem; font-weight: 600; color: var(--cv-quiet); font-variant-numeric: tabular-nums; }
.cv-ramp.is-complete .cv-ramp__count { color: var(--cv-green); }
.cv-ramp__list { list-style: none; margin: 0.45rem 0 0; padding: 0; }
.cv-ramp__row {
	display: grid;
	grid-template-columns: 1.6rem 1fr auto;
	gap: 0.5rem;
	align-items: center;
	padding: 0.35rem 0;
	border-top: 1px solid var(--cv-line);
}
.cv-ramp__row:first-child { border-top: 0; }
.cv-ramp__index { font-size: 0.78rem; font-weight: 700; color: var(--cv-quiet); text-align: center; }
.cv-ramp__what { display: flex; flex-direction: column; min-width: 0; }
.cv-ramp__load { font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--cv-white); line-height: 1.15; }
.cv-ramp__label { font-size: 0.74rem; color: var(--cv-quiet); }
.cv-ramp__row.is-done .cv-ramp__load,
.cv-ramp__row.is-done .cv-ramp__label { color: var(--cv-quiet); text-decoration: line-through; text-decoration-color: var(--cv-green-line); }
.cv-ramp__row.is-done .cv-ramp__index { color: var(--cv-green); }
.cv-app .cv-ramp__done { min-width: 4.2rem; }
.cv-app .cv-ramp__row .cv-btn.cv-ramp__undo { background: transparent; border-color: transparent; box-shadow: none; color: var(--cv-quiet); text-decoration: underline; text-underline-offset: 3px; font-size: 0.78rem; font-weight: 600; }
.cv-app .cv-ramp__row .cv-btn.cv-ramp__undo:hover { color: var(--cv-white); }
.cv-ramp__note { margin: 0.5rem 0 0; font-size: 0.76rem; line-height: 1.4; color: var(--cv-quiet); }
.cv-ramp.is-folded .cv-ramp__list,
.cv-ramp.is-folded .cv-ramp__note { display: none; }
.cv-ramp--words { border-style: solid; }
.cv-ramp__words { margin: 0.4rem 0 0; font-size: 0.92rem; font-weight: 600; line-height: 1.4; color: var(--cv-white); }

/* "How this works": one small control per card, everything explanatory behind it. */
.cv-help { margin: 0.5rem 0 0.75rem; }
.cv-help__summary {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	list-style: none;
	cursor: pointer;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--cv-quiet);
}
.cv-help__summary::-webkit-details-marker { display: none; }
.cv-help__summary:hover { color: var(--cv-white); }
.cv-help__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.3rem;
	height: 1.3rem;
	border: 1px solid var(--cv-line);
	border-radius: 50%;
	font-size: 0.74rem;
	font-weight: 700;
	color: var(--cv-muted);
}
.cv-help[open] .cv-help__summary { color: var(--cv-muted); }
.cv-help[open] .cv-help__mark { border-color: var(--cv-muted); color: var(--cv-white); }
.cv-help__list {
	margin: 0.5rem 0 0;
	padding: 0.6rem 0.8rem;
	border-left: 2px solid var(--cv-line);
	font-size: 0.86rem;
	line-height: 1.5;
	color: var(--cv-muted);
}
.cv-help__list dt { margin: 0.55rem 0 0.1rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: none; color: var(--cv-quiet); }
.cv-help__list dt:first-child { margin-top: 0; }
.cv-help__list dd { margin: 0; color: var(--cv-white); }
.cv-help__fold-wrap { margin-top: 0.55rem !important; }
.cv-help__fold summary { display: inline; cursor: pointer; list-style: none; font-size: 0.78rem; font-weight: 600; color: var(--cv-quiet); text-decoration: underline; text-underline-offset: 3px; }
.cv-help__fold summary::-webkit-details-marker { display: none; }
.cv-help__fold summary:hover { color: var(--cv-white); }
.cv-help__fold p { margin: 0.4rem 0 0; color: var(--cv-white); }

.cv-page-head__theme { color: var(--cv-white); font-weight: 700; }

/* The nudge: one line under the nav, after the cut-off, until the number is in. */
.cv-nudge {
	margin: 0.6rem 0 1rem;
	padding: 0.65rem 0.85rem;
	border-left: 2px solid var(--cv-red);
	background: var(--cv-surface-2);
	border-radius: 0 var(--cv-radius) var(--cv-radius) 0;
	font-size: 0.9rem;
	line-height: 1.45;
	color: var(--cv-white);
}
.cv-nudge__cta { display: inline-block; margin-top: 0.25rem; color: var(--cv-white); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Today's weigh-in: one number, one tap. */
.cv-weighin {
	margin: 0 0 1rem;
	padding: 0.75rem 0.9rem 0.7rem;
	border: 1px solid var(--cv-line);
	border-radius: var(--cv-radius);
	background: var(--cv-surface);
}
.cv-weighin__row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.cv-weighin__text { min-width: 0; }
.cv-weighin__label { margin: 0; font-size: 0.74rem; font-weight: 600; color: var(--cv-muted); }
.cv-weighin__value { margin: 0.1rem 0 0; font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--cv-white); line-height: 1.1; }
.cv-weighin__none { font-size: 1rem; font-weight: 600; color: var(--cv-quiet); }
.cv-weighin.is-logged .cv-weighin__value { color: var(--cv-green); }
.cv-weighin__form { display: flex; gap: 0.5rem; align-items: center; }
.cv-weighin__input { width: 6.5rem; min-height: 46px; font-size: 1.2rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.cv-weighin.is-logged .cv-weighin__save { background: transparent; border: 1px solid var(--cv-line); color: var(--cv-white); }
.cv-weighin__avg { margin: 0.5rem 0 0; font-size: 0.8rem; color: var(--cv-quiet); }

/* "What's in the box": graded disclosures, three short fields per ingredient. */
.cv-guide__rule { margin: 0.5rem 0 0.9rem; font-size: 0.95rem; font-weight: 700; color: var(--cv-white); }
.cv-guide__grade > summary { display: flex; align-items: center; gap: 0.5rem; }
.cv-guide__badge { font-weight: 700; }
.cv-guide__count { font-size: 0.74rem; font-weight: 700; color: var(--cv-quiet); font-variant-numeric: tabular-nums; }
.cv-guide__grade--banned > summary .cv-guide__badge { color: var(--cv-red-bright); }
.cv-guide__grade--limit > summary .cv-guide__badge { color: var(--cv-white); }
.cv-guide__grade--watch > summary .cv-guide__badge { color: var(--cv-muted); }
.cv-guide__grade--misread > summary .cv-guide__badge { color: var(--cv-green); }
.cv-guide__lead { margin: 0.35rem 0 0.6rem; font-size: 0.86rem; color: var(--cv-muted); }
.cv-guide__item { padding: 0.6rem 0 0.7rem; border-top: 1px solid var(--cv-line); }
.cv-guide__name { margin: 0 0 0.2rem; font-size: 1rem; font-weight: 800; color: var(--cv-white); }
.cv-guide__as { margin: 0 0 0.35rem; font-size: 0.78rem; line-height: 1.4; color: var(--cv-quiet); }
.cv-guide__as span { font-weight: 700; }
.cv-guide__what { margin: 0 0 0.3rem; font-size: 0.88rem; color: var(--cv-white); }
.cv-guide__evidence { margin: 0 0 0.35rem; font-size: 0.86rem; line-height: 1.5; color: var(--cv-muted); }
.cv-guide__move { margin: 0; padding-left: 0.7rem; border-left: 2px solid var(--cv-red); font-size: 0.88rem; font-weight: 600; color: var(--cv-white); }
.cv-guide__source-list { margin: 0.4rem 0 0; padding-left: 1.1rem; font-size: 0.82rem; line-height: 1.5; }
.cv-guide__source-list a { color: var(--cv-muted); }
.cv-guide__checked { margin: 0.5rem 0 0; font-size: 0.76rem; color: var(--cv-quiet); }
.cv-guide__causes { margin: 0.4rem 0 0; }
.cv-guide__causes dt { margin: 0.55rem 0 0.1rem; font-size: 0.86rem; font-weight: 700; color: var(--cv-white); }
.cv-guide__causes dd { margin: 0; font-size: 0.86rem; line-height: 1.5; color: var(--cv-muted); }
.cv-guide__close { margin: 0.8rem 0 0; font-size: 0.95rem; font-weight: 700; color: var(--cv-white); }

/* "Start here": one card at a time over a dimmed page. Numbers loud, words few. */
.cv-tour {
	position: fixed;
	inset: 0;
	z-index: 60;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.72);
}
.cv-tour[hidden] { display: none; }
@media (min-width: 640px) { .cv-tour { align-items: center; } }
.cv-tour__card {
	width: 100%;
	max-width: 420px;
	padding: 1rem 1.1rem 1.1rem;
	border: 1px solid var(--cv-line);
	border-top: 3px solid var(--cv-red);
	border-radius: var(--cv-radius);
	background: var(--cv-surface);
	color: var(--cv-white);
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
}
.cv-tour__head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.cv-tour__eyebrow { margin: 0; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cv-muted); }
.cv-app .cv-tour__skip, .cv-tour .cv-linkbtn--quiet { margin: 0; font-size: 0.78rem; }
.cv-tour__count { margin: 0.6rem 0 0.1rem; font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--cv-quiet); }
.cv-tour__title { margin: 0 0 0.5rem; font-size: 1.5rem; font-weight: 800; line-height: 1.15; color: var(--cv-white); }
.cv-tour__what { margin: 0 0 0.45rem; font-size: 0.98rem; line-height: 1.45; color: var(--cv-white); }
.cv-tour__why { margin: 0 0 0.6rem; padding-left: 0.7rem; border-left: 2px solid var(--cv-red); font-size: 0.92rem; font-weight: 600; line-height: 1.4; color: var(--cv-white); }
.cv-tour .cv-tour__show { display: inline-block; margin: 0 0 0.9rem; font-size: 0.86rem; color: var(--cv-muted); text-decoration: underline; text-underline-offset: 3px; }
.cv-tour .cv-tour__show:hover { color: var(--cv-white); }
.cv-tour__dots { display: flex; gap: 0.35rem; margin: 0 0 0.9rem; }
.cv-tour__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cv-line); }
.cv-tour__dot.is-on { background: var(--cv-red); }
.cv-tour__actions { display: flex; justify-content: space-between; gap: 0.5rem; }
.cv-tour__actions .cv-btn--primary { min-width: 7rem; }
body.cv-tour-open { overflow: hidden; }
.cv-hero__tour { margin: 0 0 0.4rem; }
.cv-app .cv-hero__tour .cv-linkbtn { margin: 0; font-size: 0.78rem; }

.cv-lasttime { display: flex; flex-wrap: wrap; column-gap: 0.4rem; row-gap: 0.1rem; align-items: baseline; margin: 0.35rem 0 0.5rem; font-size: 0.82rem; font-variant-numeric: tabular-nums; color: var(--cv-muted); }
.cv-lasttime__label { font-weight: 700; color: var(--cv-quiet); }
.cv-lasttime__when { color: var(--cv-quiet); white-space: nowrap; }
.cv-lasttime__when::before { content: "· "; }
.cv-pr { display: inline-block; padding: 0.05rem 0.3rem; border-radius: 3px; background: var(--cv-red); color: var(--cv-white); font-size: 0.64rem; font-weight: 800; letter-spacing: 0.06em; vertical-align: middle; line-height: 1.3; }
.cv-prs { margin: 0.9rem 0 0; padding: 0.7rem 0.85rem; border: 1px solid var(--cv-line); border-left: 2px solid var(--cv-red); border-radius: 0 var(--cv-radius) var(--cv-radius) 0; }
.cv-prs__title { margin: 0 0 0.35rem; font-size: 0.86rem; font-weight: 700; color: var(--cv-white); }
.cv-prs__list { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; color: var(--cv-white); }
.cv-prs__list li { margin: 0.2rem 0; }
.cv-weighin__guard { margin: 0.6rem 0 0; padding: 0.6rem 0.75rem; border-left: 2px solid var(--cv-line); background: var(--cv-surface-2); border-radius: 0 var(--cv-radius) var(--cv-radius) 0; }
.cv-weighin__guard[hidden] { display: none; }
.cv-weighin__guard-text { margin: 0 0 0.45rem; font-size: 0.88rem; font-weight: 600; color: var(--cv-white); }
.cv-weighin__guard-actions { display: flex; align-items: center; gap: 0.75rem; }
.cv-app .cv-weighin__guard-actions .cv-linkbtn { margin: 0; }

/* A corrected result is announced, never silent (O7). */
.cv-correction-note { margin: 0 0 1rem; padding: 0.6rem 0.8rem; border-left: 2px solid var(--cv-muted); font-size: 0.86rem; line-height: 1.45; color: var(--cv-white); background: var(--cv-surface-2); border-radius: 0 var(--cv-radius) var(--cv-radius) 0; }
.cv-correction-note--repair p { margin: 0 0 0.4rem; }
.cv-correction-note--repair p:last-child { margin-bottom: 0; }
.cv-correction-note__list { margin: 0 0 0.4rem; padding-left: 1.1rem; font-variant-numeric: tabular-nums; }
.cv-correction-note__list li { margin: 0.15rem 0; }

.cv-coaching {
	margin: 1.25rem 0 0.5rem;
	font-size: 0.78rem;
	line-height: 1.5;
	color: var(--cv-quiet);
}
.cv-app .cv-coaching .cv-linkbtn { margin: 0 0 0 0.35rem; font-size: 0.78rem; }

.cv-notperformed { margin-top: 0.9rem; padding-top: 0.85rem; border-top: 1px solid var(--cv-line); }

.cv-notperformed__state { margin: 0; font-size: 0.84rem; color: var(--cv-muted); }

.cv-details { margin: 0.6rem 0; }

.cv-details > summary {
	cursor: pointer;
	padding: 0.5rem 0;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--cv-red-bright);
	list-style: none;
}

.cv-details > summary::-webkit-details-marker { display: none; }
.cv-details > summary::before { content: "+ "; }
.cv-details[open] > summary::before { content: "– "; }

/* ---------------- Media ---------------- */

.cv-media { margin: 0.75rem 0; }

.cv-media__toggle {
	cursor: pointer;
	display: inline-block;
	padding: 0.6rem 0.9rem;
	border: 1px solid var(--cv-line);
	border-radius: var(--cv-radius);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--cv-white);
	list-style: none;
}

.cv-media__toggle::-webkit-details-marker { display: none; }
.cv-media__toggle:hover { border-color: var(--cv-red); }

.cv-media__frame { margin-top: 0.75rem; background: #000; border-radius: var(--cv-radius); overflow: hidden; }

.cv-media__video { display: block; width: 100%; height: auto; }

.cv-media__note { margin: 0.5rem 0 0; font-size: 0.76rem; color: var(--cv-quiet); }

.cv-media--missing {
	padding: 0.85rem;
	border: 1px dashed var(--cv-line);
	border-radius: var(--cv-radius);
}

.cv-media__placeholder { margin: 0; font-size: 0.84rem; color: var(--cv-quiet); }

/* ---------------- Finish ---------------- */

.cv-finish { text-align: center; }
.cv-finish__hint { margin: 0 0 1rem; font-size: 0.88rem; color: var(--cv-muted); }
.cv-finish__done { margin: 0 0 1rem; font-weight: 700; }

.cv-result { margin-bottom: 1rem; }

.cv-result__panel {
	background: var(--cv-surface);
	border: 1px solid var(--cv-red);
	border-radius: var(--cv-radius);
	padding: 1.25rem;
}

.cv-result__title { margin: 0 0 0.75rem; font-size: 1.1rem; font-weight: 800; }
.cv-result__list { margin: 0.5rem 0; padding: 0; list-style: none; }

.cv-result__item {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--cv-line);
	font-size: 0.9rem;
}

.cv-result__item:last-child { border-bottom: 0; }
.cv-result__moved { color: var(--cv-green); font-weight: 700; }

/* ---------------- Tables ---------------- */

.cv-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.cv-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }

.cv-table th,
.cv-table td {
	padding: 0.6rem 0.5rem;
	text-align: left;
	border-bottom: 1px solid var(--cv-line);
	vertical-align: top;
}

.cv-table thead th {
	font-size: 0.68rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--cv-quiet);
	font-weight: 700;
}

.cv-table tbody th { font-weight: 700; }

.cv-table__note-row td { border-bottom: 1px solid var(--cv-line); padding-top: 0; }
.cv-table__note { margin: 0; font-size: 0.78rem; color: var(--cv-quiet); }

.cv-e1rm { display: block; font-size: 0.74rem; color: var(--cv-quiet); }

.cv-na { color: var(--cv-quiet); font-style: italic; }

.cv-change { font-weight: 700; }
.cv-change--up { color: var(--cv-green); }
.cv-change--down { color: #e06c6c; }
.cv-change--flat { color: var(--cv-muted); }
.cv-change--benchmark { color: var(--cv-red-bright); }
.cv-change__pct { display: block; font-size: 0.74rem; font-weight: 400; color: var(--cv-quiet); }

/* ---------------- Lists ---------------- */

.cv-prescriptions { margin: 0; padding: 0; list-style: none; }

.cv-prescriptions__item {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.3rem 0.75rem;
	padding: 0.65rem 0;
	border-bottom: 1px solid var(--cv-line);
}

.cv-prescriptions__item:last-child { border-bottom: 0; }
.cv-prescriptions__name { font-size: 0.92rem; }
.cv-prescriptions__value { font-weight: 700; text-align: right; }

.cv-prescriptions__source {
	grid-column: 1 / -1;
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--cv-quiet);
}

.cv-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin: 1rem 0; }

.cv-stat {
	padding: 0.85rem;
	background: var(--cv-surface-2);
	border-radius: var(--cv-radius);
}

.cv-stat__label {
	margin: 0 0 0.3rem;
	font-size: 0.68rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cv-quiet);
}

.cv-stat__value { margin: 0; font-size: 1.25rem; font-weight: 800; }
.cv-stat__note { margin: 0.3rem 0 0; font-size: 0.72rem; color: var(--cv-quiet); }

.cv-log { margin: 0; padding: 0; list-style: none; }

.cv-log__item { padding: 0.65rem 0; border-bottom: 1px solid var(--cv-line); }
.cv-log__item:last-child { border-bottom: 0; }

.cv-log__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; margin: 0; }

.cv-log__week {
	font-size: 0.68rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cv-quiet);
}

.cv-log__name { font-weight: 700; font-size: 0.92rem; }
.cv-log__delta { margin-left: auto; color: var(--cv-green); font-weight: 700; font-size: 0.88rem; }
.cv-log__result { margin: 0.2rem 0 0; font-size: 0.8rem; color: var(--cv-muted); }
.cv-log__why { margin: 0.2rem 0 0; font-size: 0.8rem; line-height: 1.4; color: var(--cv-quiet); }

.cv-milestones { margin: 0; padding: 0; list-style: none; }

.cv-milestone {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.6rem;
	padding: 0.6rem 0;
	border-bottom: 1px solid var(--cv-line);
	opacity: 0.5;
}

.cv-milestone:last-child { border-bottom: 0; }
.cv-milestone.is-done { opacity: 1; }

.cv-milestone__week {
	min-width: 4.5rem;
	font-size: 0.68rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cv-quiet);
}

.cv-milestone__label { font-weight: 700; font-size: 0.92rem; }
.cv-milestone__date { margin-left: auto; font-size: 0.76rem; color: var(--cv-quiet); }

.cv-bullets { margin: 0; padding-left: 1.2rem; }
.cv-bullets li { margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--cv-white); }

/* ---------------- Nutrition ---------------- */

.cv-goal {
	display: flex;
	align-items: flex-start;
	gap: 0.7rem;
	padding: 0.85rem;
	margin-bottom: 0.5rem;
	border: 1px solid var(--cv-line);
	border-radius: var(--cv-radius);
	background: var(--cv-surface-2);
	cursor: pointer;
}

.cv-goal:hover { border-color: var(--cv-muted); }

.cv-goal input[type="radio"] {
	width: 22px;
	height: 22px;
	margin: 0.1rem 0 0;
	flex-shrink: 0;
	accent-color: var(--cv-red);
}

.cv-goal:has(input:checked) { border-color: var(--cv-red); }

.cv-goal__body { display: block; }
.cv-goal__name { display: block; font-weight: 700; font-size: 0.95rem; }

.cv-goal__default {
	display: inline-block;
	margin-left: 0.4rem;
	padding: 0.1rem 0.4rem;
	border-radius: 2px;
	background: var(--cv-red);
	color: #fff;
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	vertical-align: middle;
}

.cv-goal__summary { display: block; margin-top: 0.25rem; font-size: 0.84rem; color: var(--cv-muted); }

.cv-slider { width: 100%; height: 44px; accent-color: var(--cv-red); }

.cv-output { float: right; font-weight: 800; color: var(--cv-white); }

.cv-macros { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; margin-bottom: 1rem; }

.cv-macro {
	padding: 1rem 0.85rem;
	background: var(--cv-surface-2);
	border-radius: var(--cv-radius);
	text-align: center;
}

.cv-macro--primary { grid-column: 1 / -1; border: 1px solid var(--cv-red); }
.cv-macro__value { margin: 0; font-size: 1.75rem; font-weight: 800; line-height: 1; }
.cv-macro--primary .cv-macro__value { font-size: 2.5rem; }

.cv-macro__label {
	margin: 0.3rem 0 0;
	font-size: 0.68rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cv-quiet);
}

/* ---------------- Journal ---------------- */

.cv-reactions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.cv-reaction {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.6rem 0.85rem;
	border: 1px solid var(--cv-line);
	border-radius: var(--cv-radius);
	background: var(--cv-surface-2);
	font-size: 0.86rem;
	cursor: pointer;
	min-height: 44px;
}

.cv-reaction:has(input:checked) { border-color: var(--cv-red); }
.cv-reaction input[type="radio"] { width: 18px; height: 18px; margin: 0; accent-color: var(--cv-red); }

.cv-journal-list { margin: 0; padding: 0; list-style: none; }

.cv-journal-entry { padding: 0.9rem 0; border-bottom: 1px solid var(--cv-line); }
.cv-journal-entry:last-child { border-bottom: 0; }

.cv-journal-entry__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0 0 0.5rem;
	font-size: 0.74rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--cv-quiet);
}

.cv-journal-entry__reaction { color: var(--cv-red); }
.cv-journal-entry__body { font-size: 0.92rem; }
.cv-journal-entry__body p { margin: 0 0 0.6rem; }

.cv-result-line { margin: 0.75rem 0 0; font-weight: 700; }
.cv-result-line--warn { color: #d9a84a; font-weight: 400; font-size: 0.88rem; }

.cv-attempts { margin: 0.85rem 0; }

/* ---------------- Wider screens ---------------- */

@media (min-width: 40rem) {
	.cv-app { padding: 1.5rem; }
	.cv-hero__title { font-size: 2.6rem; }
	.cv-stats { grid-template-columns: repeat(4, 1fr); }
	.cv-macros { grid-template-columns: repeat(3, 1fr); }
	.cv-macro--primary { grid-column: auto; }
	.cv-links { grid-template-columns: repeat(3, 1fr); }
	.cv-btn--lg { width: auto; min-width: 16rem; }
}

/* Respect a reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
	.cv-app * { transition: none !important; animation: none !important; }
}

/* Per-card status line, inserted by app.js next to the control that was pressed. */
.cv-app [data-cv-card-status] { margin: 0.5rem 0 0; min-height: 1.2em; font-size: 0.9rem; }
.cv-app [data-cv-card-status]:empty { display: none; }

/* =====================================================================
 * Visual pass, 3 November 2026 (v1.1.0).
 *
 * Direction: the numbers are the memorable thing. Weight and reps are set
 * like plates on a bar — large, heavy, tabular, centred — and everything
 * around them steps back. Red is used once per card (the action) and for
 * done-states; green only ever means logged or saved. No all-caps labels
 * except the wordmark. Feedback sits beside the control that was pressed.
 * These rules override the base rules above by equal or greater specificity
 * and are kept together so the pass can be reviewed as one change.
 * =================================================================== */

.cv-app {
	--cv-white: #F2EFE9;        /* chalk, not clinical white */
	--cv-muted: #9AA0A6;        /* steel */
	--cv-quiet: #6F757C;
	--cv-surface: #151515;
	--cv-surface-2: #1E1E1E;
	--cv-line: #2A2A2A;
	/* Green means logged or saved. Olive drab, not neon: a field green that sits
	   next to iron and chalk instead of shouting over them. Owner, 3 Nov 2026. */
	--cv-green: #6B8E5E;        /* text, edges, counters (4.9:1 on the surface) */
	--cv-green-deep: #3E6B4A;   /* fills, with chalk on top (5.4:1) */
	--cv-green-line: #34503A;   /* borders on logged rows */
	--cv-green-wash: #121511;   /* input background on logged rows */
	--cv-radius: 6px;
	padding: 0.75rem 1rem 2.5rem;
}

.cv-app h1, .cv-app h2, .cv-app h3 { letter-spacing: -0.01em; }

/* Brand and navigation */
.cv-brand { padding: 1.25rem 0 0.75rem; }
.cv-brand__wordmark { letter-spacing: 0.18em; }
.cv-app .cv-nav__link {
	text-transform: none;
	letter-spacing: 0;
	font-size: 0.95rem;
	font-weight: 600;
	padding: 0.85rem 0.9rem 0.7rem;
}

/* Dashboard hero: left-aligned, the next session is the headline */
.cv-hero { text-align: left; padding: 1.5rem 0 1rem; }
.cv-app .cv-hero__eyebrow,
.cv-app .cv-workout-head__eyebrow {
	text-transform: none;
	letter-spacing: 0;
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--cv-muted);
}
.cv-app .cv-hero__title {
	font-size: 2.6rem;
	line-height: 1;
	letter-spacing: -0.025em;
	margin: 0.3rem 0 1.1rem;
}
.cv-app .cv-hero__message { margin: 1.1rem 0 0; max-width: none; color: var(--cv-muted); font-size: 0.95rem; }
.cv-app .cv-workout-head__title { font-size: 2rem; line-height: 1.05; letter-spacing: -0.02em; }

/* Buttons: sentence case, one red per card */
.cv-app .cv-btn { letter-spacing: 0; border-radius: var(--cv-radius); }
.cv-app .cv-btn--primary { text-transform: none; font-size: 1rem; }
.cv-app .cv-btn--lg { min-height: 60px; font-size: 1.1rem; border-radius: 8px; letter-spacing: 0; }
.cv-app .cv-btn--log { text-transform: none; font-size: 0.95rem; min-height: 56px; }

/* Cards */
.cv-app .cv-panel, .cv-app .cv-card { border-radius: 10px; border-color: #222; padding: 1.1rem; }
.cv-callout { background: var(--cv-surface); border-radius: 10px; }
.cv-callout p { font-size: 0.92rem; line-height: 1.5; }

/* Progress */
.cv-progress__bar { height: 8px; border-radius: 999px; overflow: hidden; }
.cv-progress__fill { border-radius: 999px; }
.cv-progress__label { font-variant-numeric: tabular-nums; }

/* The twelve weeks: tighter rows, sentence case, days as real targets */
.cv-app .cv-week { padding: 0.55rem 0; }
.cv-app .cv-week__num { font-size: 1.3rem; min-width: 1.6rem; font-variant-numeric: tabular-nums; }
.cv-app .cv-week__phase { text-transform: none; letter-spacing: 0; font-size: 0.92rem; }
.cv-app .cv-day { width: 44px; height: 44px; border-radius: 8px; font-size: 1rem; }
.cv-app .cv-week {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas: "head days" "tag days";
	align-items: center;
	column-gap: 0.75rem;
	row-gap: 0.1rem;
}
.cv-app .cv-week__head { grid-area: head; }
.cv-app .cv-week__days { grid-area: days; }
.cv-app .cv-week__tag { grid-area: tag; margin: 0 0 0 2.1rem; text-transform: none; letter-spacing: 0; font-size: 0.8rem; }

/* Exercise card head: name left, prescription as a chip on the right */
.cv-exercise__head {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	column-gap: 0.75rem;
	margin-bottom: 0.9rem;
}
.cv-exercise__order { grid-column: 1 / -1; margin: 0 0 0.1rem; text-transform: none; letter-spacing: 0; font-size: 0.8rem; color: var(--cv-quiet); }
.cv-app .cv-exercise__name { font-size: 1.45rem; margin: 0; }
.cv-app .cv-exercise__band {
	margin: 0;
	padding: 0.3rem 0.6rem;
	border: 1px solid var(--cv-line);
	border-radius: 999px;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--cv-muted);
	white-space: nowrap;
}

/* Column labels: small, quiet, sentence case */
.cv-app .cv-sets__head { text-transform: none; letter-spacing: 0; font-size: 0.76rem; color: var(--cv-quiet); margin-bottom: 0.35rem; }

/* The numbers */
.cv-set-row .cv-input,
.cv-attempt-row .cv-input {
	min-height: 56px;
	padding: 0.4rem 0.5rem;
	font-size: 1.45rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	text-align: center;
	background: #0D0D0D;
	border-color: #333;
	border-radius: 8px;
}
.cv-set-row .cv-input::placeholder,
.cv-attempt-row .cv-input::placeholder { font-size: 0.85rem; font-weight: 500; color: #555; letter-spacing: 0; }
.cv-set-row .cv-input:focus,
.cv-attempt-row .cv-input:focus { border-color: var(--cv-muted); outline: none; box-shadow: 0 0 0 2px rgba(242, 239, 233, 0.08); }

.cv-app .cv-set-row__index {
	width: 32px;
	height: 32px;
	border: 1px solid var(--cv-line);
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	justify-self: center;
	font-size: 0.9rem;
	color: var(--cv-muted);
}
.cv-app .cv-set-row.is-logged .cv-set-row__index { background: var(--cv-green-deep); border-color: var(--cv-green-deep); color: var(--cv-white); }
.cv-app .cv-set-row.is-logged .cv-input { background: var(--cv-green-wash); border-color: var(--cv-green-line); cursor: default; }
.cv-app .cv-set-row.is-logged .cv-input:focus { border-color: var(--cv-green-line); box-shadow: none; }

/* Logged state: a label and a quiet Undo stacked in the button column. Not a toggle. */
.cv-app .cv-set-row__state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.15rem;
	min-height: 48px;
	line-height: 1.1;
}
.cv-app .cv-set-row__logged { font-size: 0.78rem; font-weight: 700; color: var(--cv-green); letter-spacing: 0.01em; }
.cv-app .cv-set-row__state .cv-set-row__undo { font-size: 0.74rem; padding: 0.1rem 0.2rem; margin-top: 0; }
.cv-app .cv-set-row__state .cv-set-row__undo:disabled { opacity: 0.5; cursor: progress; }

/* "Not clean" becomes a readable pill toggle instead of a bare checkbox */
.cv-attempt-row .cv-check {
	position: relative;
	min-height: 56px;
	padding: 0 0.4rem;
	border: 1px solid var(--cv-line);
	border-radius: 8px;
	font-size: 0.74rem;
	font-weight: 600;
	color: var(--cv-quiet);
	cursor: pointer;
	text-align: center;
	line-height: 1.15;
}
.cv-attempt-row .cv-check input[type="checkbox"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cv-attempt-row .cv-check .cv-visually-hidden {
	position: static !important; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal;
}
.cv-attempt-row .cv-check:has(input:checked) { border-color: var(--cv-red); background: rgba(164, 22, 26, 0.16); color: var(--cv-white); }
.cv-attempt-row .cv-check:has(input:focus-visible) { outline: 2px solid var(--cv-red-bright); outline-offset: 2px; }
.cv-app .cv-btn--icon { min-height: 56px; height: auto; border-radius: 8px; }

/* Result tiles: the payoff of a baseline day */
.cv-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 0.9rem 0 0; }
.cv-stat { padding: 0.8rem 0.9rem; background: #0D0D0D; border: 1px solid #222; border-radius: 10px; }
.cv-stat__value { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--cv-white); }
.cv-stat__value small { font-size: 0.9rem; font-weight: 600; color: var(--cv-muted); margin-left: 0.2rem; letter-spacing: 0; }
.cv-app .cv-stat__label { display: block; margin-top: 0.35rem; font-size: 0.78rem; color: var(--cv-muted); text-transform: none; letter-spacing: 0; }

/* Small labels across every page: sentence case, quiet, no tracking. */
.cv-app .cv-table thead th,
.cv-app .cv-prescriptions__source,
.cv-app .cv-log__week,
.cv-app .cv-milestone__week,
.cv-app .cv-macro__label,
.cv-app .cv-prescription__label,
.cv-app .cv-week__tag,
.cv-app .cv-field > label { text-transform: none; letter-spacing: 0; }
.cv-stat--primary { border-color: #4A1013; background: #140A0B; }
.cv-assessment-result .cv-hint { margin-top: 0.6rem; }

/* Quiet secondary controls */
.cv-app .cv-notperformed { border-top: 0; margin-top: 0.6rem; padding-top: 0; display: flex; justify-content: flex-end; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.cv-app .cv-notperformed .cv-btn--ghost { border: 0; background: none; color: var(--cv-quiet); text-decoration: underline; text-underline-offset: 3px; min-height: 36px; padding: 0 0.2rem; font-weight: 600; }
.cv-app .cv-notperformed .cv-btn--ghost:hover { color: var(--cv-white); background: none; }
.cv-app .cv-notperformed__state { flex: 1 1 100%; text-align: right; }
.cv-app .cv-exercise.is-not-performed { opacity: 0.55; }

.cv-app .cv-media__toggle { text-transform: none; letter-spacing: 0; font-size: 0.9rem; padding: 0.55rem 0.9rem 0.55rem 0.75rem; }
.cv-app .cv-media__toggle::before { content: ""; display: inline-block; width: 0; height: 0; margin-right: 0.55rem; border-style: solid; border-width: 6px 0 6px 9px; border-color: transparent transparent transparent var(--cv-red); vertical-align: -1px; }
.cv-app .cv-media--missing { border-style: solid; border-color: #222; background: #0D0D0D; }

.cv-app .cv-hint { font-size: 0.8rem; line-height: 1.45; }
.cv-app .cv-save-status { font-size: 0.9rem; font-weight: 600; }

/* Finish */
.cv-app .cv-finish { text-align: left; }
.cv-app .cv-finish__hint { color: var(--cv-muted); font-size: 0.92rem; margin: 0 0 0.75rem; }
.cv-app .cv-finish [data-cv-card-status] { margin: 0 0 0.75rem; }

.cv-app .cv-link-card { border-radius: 10px; }

@media (prefers-reduced-motion: reduce) {
	.cv-app * { transition: none !important; }
}

/* Per-card set counter and the baseline attempts explainer (v1.1.1). */
.cv-app .cv-set-counter { margin: 0 0 0.4rem; font-size: 0.8rem; font-weight: 600; color: var(--cv-muted); font-variant-numeric: tabular-nums; }
.cv-app .cv-set-counter.is-complete { color: var(--cv-green); }
.cv-app .cv-attempts__explain { margin: 0 0 0.75rem; font-size: 0.9rem; color: var(--cv-muted); }

/* The reflection moment after Finish (v1.1.2). The one red control here is Save note. */
.cv-reflect {
	margin-top: 0.85rem;
	padding: 1.1rem;
	background: #140A0B;
	border: 1px solid #4A1013;
	border-left: 4px solid var(--cv-red);
	border-radius: 10px;
}
.cv-reflect__title { margin: 0 0 0.3rem; font-size: 1.25rem; font-weight: 800; }
.cv-reflect__lead { margin: 0 0 0.85rem; color: var(--cv-muted); font-size: 0.92rem; }
.cv-reflect__chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.75rem; }
.cv-app .cv-chip {
	min-height: 40px;
	padding: 0.4rem 0.85rem;
	border: 1px solid var(--cv-line);
	border-radius: 999px;
	background: var(--cv-black);
	color: var(--cv-white);
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
}
.cv-app .cv-chip.is-on { background: var(--cv-red); border-color: var(--cv-red); }
.cv-app .cv-reflect__body { min-height: 4.5rem; background: var(--cv-black); }
.cv-reflect__actions { display: flex; gap: 0.6rem; margin-top: 0.75rem; flex-wrap: wrap; }
.cv-reflect__actions .cv-btn { flex: 1 1 auto; }
.cv-reflect.is-saved { border-left-color: var(--cv-green); }
.cv-reflect.is-saved .cv-chip:not(.is-on), .cv-reflect.is-saved .cv-reflect__body { opacity: 0.6; pointer-events: none; }
.cv-app .cv-result__panel { border-color: #222; }

/* Collapsible exercise cards (v1.1.4). Tap the heading; done cards fold themselves. */
.cv-app .cv-exercise__head {
	grid-template-columns: 1fr 36px;
	grid-template-areas: "order order" "name toggle" "band band" "summary summary";
	row-gap: 0.35rem;
	cursor: pointer;
	user-select: none;
	margin-bottom: 0.9rem;
}
.cv-app .cv-exercise__order { grid-area: order; }
.cv-app .cv-exercise__name { grid-area: name; }
.cv-app .cv-exercise__band { grid-area: band; justify-self: start; }
.cv-app .cv-exercise__toggle {
	grid-area: toggle;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--cv-line);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	position: relative;
}
.cv-app .cv-exercise__toggle::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 8px;
	height: 8px;
	border-right: 2px solid var(--cv-muted);
	border-bottom: 2px solid var(--cv-muted);
	transform: translate(-50%, -30%) rotate(-135deg);
	transition: transform 0.15s ease;
}
.cv-app .cv-exercise.is-collapsed .cv-exercise__toggle::before { transform: translate(-50%, -70%) rotate(45deg); }
.cv-app .cv-exercise__summary {
	grid-area: summary;
	display: none;
	margin: 0.25rem 0 0;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--cv-muted);
	font-variant-numeric: tabular-nums;
}
.cv-app .cv-exercise__summary.is-done { color: var(--cv-green); }
.cv-app .cv-exercise.is-collapsed .cv-exercise__summary { display: block; }
.cv-app .cv-exercise.is-collapsed .cv-exercise__head { margin-bottom: 0; }
.cv-app .cv-exercise.is-collapsed .cv-exercise__body { display: none; }
.cv-app .cv-exercise.is-collapsed { padding-top: 0.9rem; padding-bottom: 0.9rem; }
.cv-app .cv-exercise.is-not-performed.is-collapsed { opacity: 0.7; }
.cv-app .cv-btn.is-armed { background: var(--cv-red-bright); border-color: var(--cv-red-bright); }

/* Journal (v1.2.0): notes to the person you are becoming. */
.cv-app .cv-page-head__eyebrow { margin: 0; font-size: 0.92rem; font-weight: 600; color: var(--cv-muted); text-transform: none; letter-spacing: 0; }
.cv-app .cv-journal-head .cv-page-head__title { font-size: 1.9rem; line-height: 1.1; letter-spacing: -0.02em; margin: 0.3rem 0 0; }
.cv-app .cv-journal-head .cv-page-head__sub { font-size: 0.95rem; max-width: 36rem; }

.cv-lookback {
	margin: 0 0 1rem;
	padding: 1.1rem;
	background: #140A0B;
	border: 1px solid #4A1013;
	border-left: 4px solid var(--cv-red);
	border-radius: 10px;
}
.cv-lookback__eyebrow { margin: 0 0 0.35rem; font-size: 0.82rem; font-weight: 700; color: var(--cv-red-bright); }
.cv-lookback__question { margin: 0 0 0.5rem; font-size: 0.9rem; color: var(--cv-muted); }
.cv-lookback__body { margin: 0; padding: 0; border: 0; font-size: 1.05rem; line-height: 1.5; }
.cv-lookback__body p { margin: 0 0 0.5rem; }
.cv-lookback__body p:last-child { margin-bottom: 0; }
.cv-lookback__note { margin: 0.75rem 0 0; font-size: 0.8rem; color: var(--cv-quiet); }

.cv-journal-write__label { margin: 0 0 0.25rem; font-size: 0.8rem; font-weight: 600; color: var(--cv-quiet); }
.cv-journal-write__question { margin: 0 0 0.35rem; font-size: 1.35rem; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; }
.cv-app .cv-journal-write__body { min-height: 7rem; margin-top: 0.85rem; background: var(--cv-black); font-size: 1.05rem; line-height: 1.5; }
.cv-journal-write__how { margin: 0.9rem 0 0; padding: 0; border: 0; }
.cv-journal-write__how legend { padding: 0; margin: 0 0 0.45rem; font-size: 0.8rem; font-weight: 600; color: var(--cv-quiet); }

.cv-app .cv-linkbtn {
	display: inline-block;
	padding: 0.2rem 0;
	border: 0;
	background: none;
	color: var(--cv-muted);
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.cv-app .cv-linkbtn:hover { color: var(--cv-white); }
.cv-app .cv-linkbtn--quiet { color: var(--cv-quiet); font-size: 0.8rem; margin-top: 0.4rem; }

.cv-app .cv-chip--radio { position: relative; display: inline-flex; align-items: center; }
.cv-app .cv-chip--radio input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cv-app .cv-chip--radio:has(input:checked) { background: var(--cv-red); border-color: var(--cv-red); }
.cv-app .cv-chip--radio:has(input:focus-visible) { outline: 2px solid var(--cv-red-bright); outline-offset: 2px; }

.cv-app .cv-journal-entry { padding: 1rem 0; }
.cv-app .cv-journal-entry__meta { margin: 0 0 0.3rem; font-size: 0.8rem; color: var(--cv-quiet); text-transform: none; letter-spacing: 0; }
.cv-app .cv-journal-entry__question { margin: 0 0 0.35rem; font-size: 0.92rem; font-weight: 600; color: var(--cv-muted); }
.cv-app .cv-journal-entry__body { font-size: 1rem; line-height: 1.5; }
.cv-app .cv-journal-entry.is-new { animation: cv-rise 0.3s ease-out; }
.cv-journal-empty { padding: 0.5rem 0; color: var(--cv-muted); font-size: 0.95rem; }
@keyframes cv-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cv-app .cv-journal-entry.is-new { animation: none; } }

.cv-reflect__question { margin: 0 0 0.85rem; font-size: 1.15rem; font-weight: 800; line-height: 1.3; letter-spacing: -0.01em; }

/* A trend tile that just updated from a save: a brief green edge, nothing more. */
.cv-app .cv-stat__value.is-fresh { color: var(--cv-green); transition: color 0.3s; }

/* Warm-up heart-rate ramp: a small table, numbers tabular, cues quiet. */
.cv-hr__max { margin: 0.4rem 0 0.5rem; font-size: 0.86rem; color: var(--cv-muted); }
.cv-hr__table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.cv-hr__table th { text-align: left; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em; color: var(--cv-quiet); padding: 0.25rem 0.4rem 0.35rem 0; border-bottom: 1px solid var(--cv-line); }
.cv-hr__table td { padding: 0.45rem 0.4rem 0.45rem 0; border-bottom: 1px solid var(--cv-line); vertical-align: top; }
.cv-hr__table tr:last-child td { border-bottom: 0; }
.cv-hr__min { font-variant-numeric: tabular-nums; color: var(--cv-muted); white-space: nowrap; }
.cv-hr__label { display: block; font-weight: 700; color: var(--cv-white); }
.cv-hr__cue { display: block; font-size: 0.76rem; color: var(--cv-quiet); line-height: 1.35; }
.cv-hr__bpm { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--cv-white); white-space: nowrap; }
.cv-hr__pct { font-variant-numeric: tabular-nums; color: var(--cv-muted); white-space: nowrap; }

/* The annotated label: chalk panel on the dark surface, red numbers, legend below. */
.cv-label { margin: 0.75rem 0 0.25rem; }
.cv-label__svg { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; font-family: inherit; }
.cv-label__legend { margin-top: 0.85rem; }
.cv-label__list { list-style: none; margin: 0; padding: 0; }
.cv-label__list li { display: grid; grid-template-columns: 1.5rem 1fr; gap: 0.5rem; align-items: start; padding: 0.4rem 0; border-top: 1px solid var(--cv-line); font-size: 0.86rem; line-height: 1.45; color: var(--cv-muted); }
.cv-label__list li:first-child { border-top: 0; }
.cv-label__n { display: inline-flex; align-items: center; justify-content: center; width: 1.3rem; height: 1.3rem; margin-top: 0.1rem; border-radius: 50%; background: var(--cv-red); color: var(--cv-white); font-size: 0.72rem; font-weight: 800; }
.cv-label__text strong { color: var(--cv-white); }
.cv-label__note { margin: 0.6rem 0 0; font-size: 0.76rem; color: var(--cv-quiet); }

/* ==================================================================
 * THE SPINE (v1.16.0). The session card's language applied to the app:
 * grain, a red spine at the head of every page, the week as a numeral
 * behind the title, Anton for the display numbers, eyebrow caps for the
 * small labels only (sentence case stays for every sentence, button and
 * body line: DECISIONS.md C15), cards as one column with hairlines and a
 * red edge on the active card, the session bar at the foot.
 * Last layer in the file on purpose: it overrides the passes before it.
 * ================================================================== */

@font-face {
	font-family: "Anton";
	src: url("../fonts/Anton-Regular.woff") format("woff");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

.cv-app {
	--cv-chalk: #F2EFE9;
	--cv-steel: #9AA0A6;
	--cv-display: "Anton", "Arial Narrow", Impact, "Helvetica Neue", Arial, sans-serif;
	position: relative;
	padding-bottom: 5.5rem;
	background-color: var(--cv-black);
	/* Grain: a film of noise over the black, so the app is the same material as the card. */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.08 0 0 0 0 0.08 0 0 0 0 0.08 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
	background-size: 160px 160px;
}

/* Eyebrow caps: the one place caps are allowed. Small, steel, tracked. */
.cv-app .cv-eyebrow {
	display: block;
	margin: 0;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cv-steel);
	line-height: 1.3;
}
.cv-app .cv-display {
	font-family: var(--cv-display);
	font-weight: 400;
	letter-spacing: 0.01em;
	font-variant-numeric: tabular-nums;
}

/* The head block. */
.cv-app .cv-head { position: relative; padding: 0.4rem 0 1.1rem; margin: 0 0 0.6rem; overflow: hidden; }
.cv-app .cv-head__numeral {
	position: absolute;
	right: 0.2rem;
	top: -1.2rem;
	font-family: var(--cv-display);
	font-size: 11rem;
	line-height: 1;
	color: #151515;
	pointer-events: none;
	user-select: none;
	z-index: 0;
}
.cv-app .cv-head__row { position: relative; z-index: 1; display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.9rem; }
.cv-app .cv-head__block {
	display: inline-flex;
	align-items: baseline;
	gap: 0.35rem;
	padding: 0.35rem 0.7rem 0.3rem 0.65rem;
	background: var(--cv-red);
	color: var(--cv-chalk);
	font-family: var(--cv-display);
	font-size: 1.35rem;
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	box-shadow: -0.5rem 0 0 0 var(--cv-red); /* bleeds to the page edge: the spine */
}
.cv-app .cv-head__block-label { font-size: 0.8em; }
.cv-app .cv-head__line { position: relative; z-index: 1; }
.cv-app .cv-head__title { position: relative; z-index: 1; margin: 0; font-size: 2.2rem; line-height: 1; letter-spacing: -0.02em; font-weight: 800; color: var(--cv-chalk); }
.cv-app .cv-head__sub { position: relative; z-index: 1; margin: 0.6rem 0 0; color: var(--cv-muted); font-size: 0.95rem; max-width: 34rem; }
.cv-app .cv-head .cv-badge { position: relative; z-index: 1; margin-top: 0.6rem; }
.cv-app .cv-head .cv-save-status { position: relative; z-index: 1; }

/* The headline number. */
.cv-app .cv-headline { padding: 0.2rem 0 1rem; margin: 0 0 0.6rem; border-bottom: 1px solid var(--cv-line); }
.cv-app .cv-headline__stat { display: flex; align-items: baseline; gap: 0.5rem; }
.cv-app .cv-headline__value { font-size: 4.2rem; line-height: 0.95; color: var(--cv-chalk); }
.cv-app .cv-headline__unit { font-family: var(--cv-display); font-size: 1.3rem; color: var(--cv-red); text-transform: uppercase; letter-spacing: 0.04em; }
.cv-app .cv-headline__label { margin-top: 0.35rem; }
.cv-app .cv-headline .cv-sessionbar { position: static; margin-top: 0.9rem; padding: 0; border: 0; box-shadow: none; background: transparent; }

/* The session bar: fixed at the foot on training pages; inline on the dashboard. */
.cv-app .cv-sessionbar {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 30;
	padding: 0.55rem 1rem;
	padding-bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
	background: rgba(10, 10, 10, 0.96);
	border-top: 1px solid var(--cv-line);
}
.cv-app .cv-sessionbar__label { margin-bottom: 0.35rem; }
.cv-app .cv-sessionbar__track { display: block; height: 4px; background: #242424; }
.cv-app .cv-sessionbar__fill { display: block; height: 4px; background: var(--cv-red); }
.cv-app.has-restbar .cv-sessionbar { display: none; }

/* The foot. */
.cv-app .cv-foot { display: flex; justify-content: space-between; align-items: baseline; margin: 2rem 0 0.5rem; padding-top: 0.9rem; border-top: 1px solid var(--cv-line); }
.cv-app .cv-foot__site { font-size: 0.8rem; font-weight: 700; color: var(--cv-steel); }
.cv-app .cv-foot__mark { font-family: var(--cv-display); font-size: 1rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cv-red); }

/* Cards dissolve into one column: hairlines, no boxes; the active card carries the red edge. */
.cv-app .cv-card,
.cv-app .cv-panel {
	background: transparent;
	border: 0;
	border-top: 1px solid var(--cv-line);
	border-radius: 0;
	padding: 1.1rem 0 1.2rem;
	margin: 0;
}
.cv-app .cv-card.is-active {
	border-top-color: var(--cv-line);
	box-shadow: inset 3px 0 0 0 var(--cv-red);
	padding-left: 0.9rem;
}
.cv-app .cv-card.is-collapsed { padding-bottom: 0.9rem; }
.cv-app .cv-panel__title,
.cv-app .cv-card__title { font-size: 0.72rem; letter-spacing: 0.12em; color: var(--cv-steel); }

/* Exercise card head as a lift row: eyebrow, name left, weight right. */
.cv-app .cv-exercise__head {
	grid-template-columns: 1fr auto 36px;
	grid-template-areas: "order order toggle" "name weight toggle" "summary summary summary";
	column-gap: 0.75rem;
	row-gap: 0.2rem;
	align-items: end;
	margin-bottom: 0.6rem;
}
.cv-app .cv-exercise__order { grid-area: order; }
.cv-app .cv-exercise__name { grid-area: name; font-size: 1.5rem; line-height: 1.05; letter-spacing: -0.01em; align-self: end; }
.cv-app .cv-exercise__weight { grid-area: weight; margin: 0; justify-self: end; align-self: end; }
.cv-app .cv-exercise__weight .cv-plates-btn { align-items: baseline; gap: 0.3rem; }
.cv-app .cv-exercise__weight-value { font-family: var(--cv-display); font-size: 2.3rem; line-height: 0.95; color: var(--cv-chalk); letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.cv-app .cv-exercise__weight-unit { font-family: var(--cv-display); font-size: 0.95rem; color: var(--cv-red); text-transform: uppercase; letter-spacing: 0.06em; }
.cv-app .cv-exercise__band { display: none; }
.cv-app .cv-exercise__toggle { grid-area: toggle; align-self: start; }
.cv-app .cv-exercise__summary { grid-area: summary; }
.cv-app .cv-exercise.is-collapsed .cv-exercise__weight { display: none; }
.cv-app .cv-prescription--inline { padding: 0; margin: 0 0 0.6rem; border: 0; background: transparent; }
.cv-app .cv-prescription--inline .cv-prescription__label { margin: 0; }
.cv-app .cv-plates-btn.is-open .cv-exercise__weight-value { text-decoration: underline; text-decoration-color: var(--cv-line); text-underline-offset: 0.18em; }

/* The ledger: set rows as lines, numbers in Anton. */
.cv-app .cv-sets__head { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.66rem; font-weight: 700; color: var(--cv-steel); }
.cv-app .cv-set-row { border-bottom: 1px solid var(--cv-line); padding-bottom: 0.5rem; }
.cv-app .cv-set-row__index { width: auto; height: auto; border: 0; border-radius: 0; font-family: var(--cv-display); font-size: 1.3rem; color: var(--cv-steel); justify-content: flex-start; }
.cv-app .cv-set-row.is-logged .cv-set-row__index { color: var(--cv-green); background: transparent; border: 0; }
.cv-app .cv-set-row .cv-input,
.cv-app .cv-attempt-row .cv-input { font-family: var(--cv-display); font-weight: 400; font-size: 1.7rem; letter-spacing: 0.01em; background: #0f0f0f; border: 1px solid #262626; border-radius: 2px; }
.cv-app .cv-set-row .cv-input::placeholder,
.cv-app .cv-attempt-row .cv-input::placeholder { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #4a4a4a; }
.cv-app .cv-set-row.is-logged .cv-input { background: transparent; border-color: transparent; }

/* PR as a stamp. */
.cv-app .cv-pr { transform: rotate(-6deg); border-radius: 1px; padding: 0.12rem 0.4rem; font-size: 0.68rem; letter-spacing: 0.1em; font-family: var(--cv-display); font-weight: 400; margin-left: 0.2rem; }
.cv-app .cv-prs { border-left-width: 3px; }

/* Last time, as a ledger note. */
.cv-app .cv-lasttime__label { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.66rem; color: var(--cv-steel); }

/* The held line (1.18.0): only on a lift whose weight is a hold. The sets that
   held it in chalk, the short one carrying the arrow; the reason beneath. */
.cv-app .cv-lasttime--held { color: var(--cv-muted); }
.cv-app .cv-lasttime--held .cv-lasttime__set { color: var(--cv-muted); }
.cv-app .cv-lasttime--held .cv-lasttime__short { color: var(--cv-chalk); font-weight: 700; }
.cv-app .cv-lasttime--held .cv-lasttime__reason { flex-basis: 100%; color: var(--cv-quiet); font-size: 0.78rem; }

/* Pull-ups: the box means added load or assistance; with nothing on the bar it is closed. */
.cv-app .cv-sets--pullup .cv-input--load:disabled { background: transparent; border-color: transparent; color: var(--cv-steel); text-align: center; }

/* Stat tiles follow the ledger: no boxes, hairline, Anton values. */
.cv-app .cv-stat { background: transparent; border: 0; border-top: 1px solid var(--cv-line); border-radius: 0; padding: 0.7rem 0 0.4rem; }
.cv-app .cv-stat__label { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.66rem; color: var(--cv-steel); }
.cv-app .cv-stat__value { font-family: var(--cv-display); font-weight: 400; font-size: 1.9rem; line-height: 1; letter-spacing: 0.01em; }

/* Weigh-in box and ramp-up as ledger panels. */
.cv-app .cv-weighin { background: transparent; border: 0; border-top: 1px solid var(--cv-line); border-radius: 0; padding: 1rem 0; }
.cv-app .cv-weighin__value { font-family: var(--cv-display); font-weight: 400; font-size: 2.4rem; letter-spacing: 0.01em; }
.cv-app .cv-ramp { border-style: solid; border-color: var(--cv-line); border-width: 1px 0 0; border-radius: 0; background: transparent; padding-left: 0; padding-right: 0; }
.cv-app .cv-ramp__load { font-weight: 800; font-size: 1.05rem; }

/* Nav: the current section carries the red, the rest steel. */
.cv-app .cv-nav { border-bottom-color: var(--cv-line); }
.cv-app .cv-nav__link { color: var(--cv-steel); letter-spacing: 0.14em; font-size: 0.74rem; }
.cv-app .cv-nav__link.is-current { color: var(--cv-chalk); }

/* Rest bar in the same voice. */
.cv-app .cv-restbar__clock { font-family: var(--cv-display); font-weight: 400; letter-spacing: 0.02em; }

@media (min-width: 40rem) {
	.cv-app .cv-head__numeral { font-size: 15rem; top: -2rem; right: 0; }
	.cv-app .cv-head__title { font-size: 2.8rem; }
	.cv-app .cv-headline__value { font-size: 5.2rem; }
}
