/* ========== Split — design tokens ========== */
:root {
	/* Core ink / paper (OKLCH) */
	--ink: rgb(18, 28, 35);
	--ink-2: rgb(62, 73, 82);
	--ink-3: rgb(92, 101, 107); /* muted text; 50% L clears WCAG AA 4.5:1 on --paper (was 58% ≈ 4.0:1) */
	--paper: rgb(246, 249, 251);
	--paper-2: rgb(238, 242, 245);
	--paper-3: rgb(227, 233, 237);
	--rule: rgb(216, 223, 228);

	/* Accent (cyan) */
	--accent-h: 200;
	--accent: oklch(62% 0.16 var(--accent-h)); /* fills/strokes/UI accents */
	/* Darker accent for normal-size *text* so links/active tabs/badge text clear
	   WCAG AA 4.5:1 on --paper (~5.3:1) and on the --blue-light badge tint (~4.9:1).
	   Keep --accent for fills/strokes where 3:1 (UI components) is sufficient. */
	--accent-text: oklch(50% 0.15 var(--accent-h));
	--accent-soft: oklch(62% 0.16 var(--accent-h) / 0.12);

	/* Status */
	--ok: rgb(50, 179, 110);
	--warn: rgb(239, 133, 46);
	--bad: rgb(230, 67, 67);

	/* Legacy color aliases (kept so older pages keep rendering) */
	--color-white: var(--paper);
	--bg-page: var(--paper);
	--bg-card: var(--paper);
	--bg-inset: var(--paper-2);
	--bg-hover: var(--paper-3);
	--border: var(--rule);
	--border-light: var(--rule);
	--text-primary: var(--ink);
	--text-secondary: var(--ink-2);
	--text-muted: var(--ink-3);
	--blue: var(--accent);
	--blue-light: var(--accent-soft);
	--purple: rgb(111, 111, 226);
	--purple-light: rgb(231, 234, 255);
	--teal: rgb(0, 149, 131);
	--teal-light: rgb(207, 245, 236);
	--amber: rgb(218, 126, 30);
	--amber-light: rgb(255, 231, 204);
	--rose: rgb(230, 67, 67);
	--rose-light: rgb(255, 228, 225);
	--green: var(--ok);
	--green-light: rgb(190, 248, 209);
	--bar-primary: var(--accent-soft);
	--bar-secondary: var(--paper-3);

	/* Typography */
	--font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
	--font-ui: "Inter", system-ui, -apple-system, sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, monospace;

	--font-size-xs: 0.75rem;
	--font-size-sm: 0.8125rem;
	--font-size-base: 0.875rem;
	--font-size-md: 1rem;
	--font-size-lg: 1.25rem;
	--font-size-xl: 1.5rem;

	--font-weight-normal: 400;
	--font-weight-medium: 500;
	--font-weight-semibold: 600;
	--font-weight-bold: 700;

	--tracking-tight: -0.02em;
	--tracking-mono: -0.01em;
	--tracking-wide: 0.06em;
	--tracking-wider: 0.1em;
	--tracking-widest: 0.14em;

	/* Spacing (kept) */
	--space-1: 0.125rem;
	--space-2: 0.25rem;
	--space-3: 0.375rem;
	--space-4: 0.5rem;
	--space-5: 0.625rem;
	--space-6: 0.75rem;
	--space-8: 1rem;
	--space-10: 1.25rem;
	--space-12: 1.5rem;
	--space-16: 2rem;
	--space-20: 2.5rem;
	--space-32: 4rem;

	/* Radii */
	--radius-sm: 6px;
	--radius-md: 8px;
	--radius-lg: 10px;
	--radius-xl: 12px;
	--radius-2xl: 14px;
	--radius-full: 9999px;

	/* Shadows */
	--shadow-sm: 0 1px 0 rgb(216, 223, 228);
	--shadow-md: 0 1px 2px rgba(19, 49, 68, 0.06);
	--shadow-card: 0 1px 0 rgb(216, 223, 228);
	--shadow-floating: 0 1px 0 rgb(216, 223, 228), 0 20px 40px -24px rgba(46, 75, 96, 0.18);
	--shadow-focus: 0 0 0 3px var(--accent-soft);
	--shadow-focus-lg: 0 0 0 4px var(--accent-soft);

	/* Transitions */
	--transition-fast: 0.15s ease;
	--transition-base: 0.2s ease;
	--transition-slow: 0.5s ease;

	/* Layout */
	--sidebar-width: 240px;
	--main-max-width: 1400px;
	--max-width-page: 72rem;
	--max-width-narrow: 42rem;
	--max-width-login: 24rem;
	--navbar-height: 3.5rem;
	--breakpoint-sm: 640px;
}
@supports (color: color(display-p3 0 0 0%)) {
:root {
	--purple-light: rgb(231, 234, 255);
	--teal: rgb(0, 149, 131);
	--amber-light: rgb(255, 231, 204);
	--rose-light: rgb(255, 228, 225);
}

@media (color-gamut: p3) {
:root {
	--purple-light: color(display-p3 0.90553 0.91483 1);
	--teal: color(display-p3 0.21428 0.58172 0.51506);
	--amber-light: color(display-p3 0.99206 0.90628 0.79728);
	--rose-light: color(display-p3 1 0.89036 0.87483);
}
}
}
/* ========== Reset & Base ========== */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}
body {
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-ui);
	font-size: 14px;
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
}
a {
	color: var(--accent-text);
	-webkit-text-decoration: none;
	text-decoration: none;
}
a:hover {
	-webkit-text-decoration: underline;
	text-decoration: underline;
}
h1, h2, h3, h4 {
	font-weight: var(--font-weight-semibold);
	line-height: 1.2;
}
/* ========== Animations ========== */
@keyframes fadeUp {
	from {
		opacity: 0;
		transform: translateY(6px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}
.animate-in {
	animation: fadeUp 0.25s ease forwards;
}
.stagger > * {
	animation: fadeUp 0.25s ease backwards;
}
.stagger > *:nth-child(1) {
	animation-delay: 0.02s;
}
.stagger > *:nth-child(2) {
	animation-delay: 0.04s;
}
.stagger > *:nth-child(3) {
	animation-delay: 0.06s;
}
.stagger > *:nth-child(4) {
	animation-delay: 0.08s;
}
/* ========== Skip Link ========== */
.skip-link {
	position: absolute;
	left: 8px;
	top: -48px;
	z-index: 1000;
	padding: var(--space-3) var(--space-5);
	border-radius: var(--radius-lg);
	background: var(--bg-card);
	color: var(--text-primary);
	border: 1px solid var(--border);
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-bold);
	-webkit-text-decoration: none;
	text-decoration: none;
	transition: top 0.15s ease;
}
.skip-link:focus {
	top: 8px;
}
/* ========== Typography Utilities ========== */
.mono {
	font-family: var(--font-mono);
	font-feature-settings: "tnum";
	font-variant-numeric: tabular-nums;
	font-size: var(--font-size-sm);
	letter-spacing: var(--tracking-mono);
}
.bold {
	font-weight: var(--font-weight-bold);
}
.dim {
	color: var(--text-secondary);
}
.muted {
	color: var(--text-muted);
}
.accent {
	color: var(--blue);
}
.small {
	font-size: var(--font-size-xs);
}
.capitalize {
	text-transform: capitalize;
}
.inline {
	display: inline;
}
/* ========== Spacing Utilities ========== */
.mt-sm {
	margin-top: var(--space-4);
}
.mb-md {
	margin-bottom: var(--space-8);
}
.mb-lg {
	margin-bottom: var(--space-12);
}
/* ========== Layout Utilities ========== */
.flex-spacer {
	flex: 1;
}
.flex-1 {
	flex: 1;
}
/* ========== Screen Reader Only ========== */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
/* ========== Focus Visible ========== */
:focus-visible {
	outline: 2px solid var(--blue);
	outline-offset: 2px;
}
/* ========== Reduced Motion ========== */
@media (prefers-reduced-motion: reduce) {

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
/* ========== Split app shell (sidebar + main) ========== */
.app-shell {
	min-height: 100vh;
	display: grid;
	grid-template-columns: var(--sidebar-width) 1fr;
}
.sidebar {
	border-right: 1px solid var(--rule);
	padding: 22px 20px;
	background: var(--paper-2);
	position: sticky;
	top: 0;
	height: 100vh;
	display: flex;
	flex-direction: column;
	gap: 24px;
	overflow-y: auto;
}
.brand {
	display: flex;
	align-items: baseline;
	gap: 10px;
	-webkit-text-decoration: none;
	text-decoration: none;
	color: inherit;
}
.brand:hover { -webkit-text-decoration: none; text-decoration: none; }
.brand__mark {
	width: 22px;
	height: 22px;
	border-radius: 6px;
	background: var(--ink);
	position: relative;
	flex-shrink: 0;
	align-self: center;
}
.brand__mark::after {
	content: "";
	position: absolute;
	inset: 6px 4px 6px 10px;
	background: var(--accent);
	border-radius: 2px;
}
.brand__name {
	font-family: var(--font-display);
	font-size: 26px;
	letter-spacing: -0.01em;
	line-height: 1;
}
.brand__dot { color: var(--accent); }
.side-nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.side-nav__section {
	font: 600 10px/1 var(--font-mono);
	letter-spacing: 0.12em;
	color: var(--ink-3);
	text-transform: uppercase;
	padding: 0 10px;
	margin-top: 6px;
	margin-bottom: 6px;
}
.side-nav__item {
	padding: 8px 10px;
	border-radius: var(--radius-md);
	color: var(--ink-2);
	font-weight: 500;
	font-size: 14px;
	-webkit-text-decoration: none;
	text-decoration: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	line-height: 1.2;
	background: none;
	border: 0;
	cursor: pointer;
	font-family: inherit;
	text-align: left;
	width: 100%;
}
.side-nav__item:hover {
	background: var(--paper-3);
	color: var(--ink);
	-webkit-text-decoration: none;
	text-decoration: none;
}
.side-nav__item.is-active {
	background: var(--ink);
	color: var(--paper);
}
.side-nav__item .kbd {
	font: 10px/1 var(--font-mono);
	opacity: 0.5;
}
.side-foot {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.side-foot__card {
	border: 1px dashed var(--rule);
	padding: 12px;
	border-radius: var(--radius-lg);
	color: var(--ink-2);
	font-size: 12px;
	line-height: 1.4;
}
.side-foot__card strong { color: var(--ink); }
.side-foot__meta {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 11px;
	color: var(--ink-3);
	padding: 0 2px;
}
.side-foot__meta .mono { font-family: var(--font-mono); }
.side-foot__logout {
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	color: var(--ink-3);
	cursor: pointer;
}
.side-foot__logout:hover { color: var(--ink); -webkit-text-decoration: underline; text-decoration: underline; }
.main-area {
	padding: 28px 36px 64px;
	max-width: var(--main-max-width);
	min-width: 0;
}
/* ========== Topbar ========== */
.topbar {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 28px;
}
.topbar__l h1 {
	font-family: var(--font-display);
	font-size: 42px;
	line-height: 1;
	margin: 0 0 6px;
	letter-spacing: -0.02em;
	font-weight: 400;
}
.topbar__l h1 em {
	font-style: italic;
	color: var(--accent);
}
.topbar__l p {
	margin: 0;
	color: var(--ink-3);
	font-size: 13px;
}
.topbar__r {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-shrink: 0;
}
/* ========== Buttons (shared by dashboard) ========== */
.btn-split {
	height: 34px;
	padding: 0 14px;
	border-radius: var(--radius-md);
	border: 1px solid var(--rule);
	background: var(--paper);
	font: 500 13px var(--font-ui);
	color: var(--ink);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	-webkit-text-decoration: none;
	text-decoration: none;
}
.btn-split:hover {
	background: var(--paper-2);
	-webkit-text-decoration: none;
	text-decoration: none;
}
.btn-split--primary {
	background: var(--ink);
	color: var(--paper);
	border-color: var(--ink);
}
.btn-split--primary:hover {
	background: rgb(37, 47, 55);
	color: var(--paper);
}
.btn-split--ghost {
	background: transparent;
}
/* ========== Stats strip ========== */
.stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	margin-bottom: 20px;
}
.stat {
	border: 1px solid var(--rule);
	border-radius: var(--radius-lg);
	padding: 14px 16px;
	background: var(--paper);
	min-width: 0;
}
.stat__l {
	font: 600 10px/1 var(--font-mono);
	letter-spacing: 0.14em;
	color: var(--ink-3);
	text-transform: uppercase;
	margin-bottom: 8px;
}
.stat__v {
	font-family: var(--font-display);
	font-size: 34px;
	line-height: 1;
	letter-spacing: -0.02em;
	font-weight: 400;
}
.stat__v small {
	font-family: var(--font-ui);
	font-size: 12px;
	color: var(--ink-3);
	margin-left: 6px;
	font-weight: 500;
}
.stat__d {
	font: 500 11px var(--font-mono);
	color: var(--ink-3);
	margin-top: 6px;
}
.stat--accent .stat__v { color: var(--accent); }
/* ========== Card grid ========== */
.d-grid {
	display: grid;
	gap: 20px;
}
.d-grid--hero { grid-template-columns: 1fr 320px; }
.d-grid--2 { grid-template-columns: 1.4fr 1fr; }
.d-grid--stack { margin-bottom: 20px; }
.split-card {
	background: var(--paper);
	border: 1px solid var(--rule);
	border-radius: var(--radius-xl);
	padding: 20px;
	position: relative;
	box-shadow: none;
	overflow: visible;
	min-width: 0;
}
.split-card__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
}
.split-card__title {
	font-family: var(--font-display);
	font-size: 22px;
	letter-spacing: -0.01em;
	margin: 0;
	font-weight: 400;
	line-height: 1.1;
}
.split-card__title em {
	font-style: italic;
	color: var(--accent);
}
.eyebrow {
	font: 600 10px/1 var(--font-mono);
	letter-spacing: 0.18em;
	color: var(--ink-3);
	text-transform: uppercase;
	margin-bottom: 6px;
	display: block;
}
.card-meta-mono {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--ink-3);
}
/* ========== Radar (hero) ========== */
.radar-wrap {
	display: flex;
	justify-content: center;
	padding: 4px 0;
}
/* Fluid SVG: scales down to fit narrow viewports (no fixed px width on the
   element), capped at its natural 420px on desktop. Prevents mobile overflow. */
.radar-wrap svg {
	width: 100%;
	max-width: 420px;
	height: auto;
}
/* ========== Callouts ========== */
.callout {
	padding: 12px 14px;
	border-radius: 10px;
	border: 1px solid var(--rule);
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 10px;
	background: var(--paper);
	align-items: start;
}
.callout + .callout { margin-top: 8px; }
.callout__icon {
	width: 28px;
	height: 28px;
	border-radius: 99px;
	display: grid;
	place-items: center;
	font-size: 14px;
	font-weight: 700;
	font-family: var(--font-display);
}
.callout--warn .callout__icon {
	background: rgb(255, 225, 206);
	color: rgb(111, 54, 0);
}
@media (color-gamut: p3) {
.callout--warn .callout__icon {
	background: color(display-p3 1 0.88124 0.7916);
	color: color(display-p3 0.42165 0.21167 0);
}
}
.callout--bad .callout__icon {
	background: rgb(255, 228, 225);
	color: rgb(155, 30, 34);
}
@media (color-gamut: p3) {
.callout--bad .callout__icon {
	background: color(display-p3 1 0.89036 0.87483);
}
}
.callout--ok .callout__icon {
	background: rgb(174, 249, 200);
	color: rgb(0, 71, 37);
}
@media (color-gamut: p3) {
.callout--ok .callout__icon {
	color: color(display-p3 0 0.28852 0.12791);
}
}
.callout__t {
	font-weight: 600;
	font-size: 13px;
}
.callout__d {
	font-size: 12px;
	color: var(--ink-3);
	margin-top: 2px;
	line-height: 1.45;
}
/* ========== Schedule ========== */
.schedule {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 10px;
}
.sched {
	border: 1px solid var(--rule);
	border-radius: var(--radius-md);
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-height: 150px;
	background: var(--paper);
	transition: transform 0.15s ease, border-color 0.15s ease;
	-webkit-text-decoration: none;
	text-decoration: none;
	color: inherit;
}
.sched:hover {
	transform: translateY(-2px);
	border-color: var(--ink);
	-webkit-text-decoration: none;
	text-decoration: none;
}
.sched--rest {
	background: var(--paper-2);
	border-style: dashed;
}
.sched--today {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
}
.sched__day {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
}
.sched__day strong {
	font-size: 13px;
	color: var(--ink);
}
.sched__day span {
	font: 500 10px var(--font-mono);
	color: var(--ink-3);
}
.sched__title {
	font-family: var(--font-display);
	font-size: 16px;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--ink);
}
.sched__title--rest { color: var(--ink-3); font-style: italic; }
.sched__chips {
	margin-top: auto;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}
.chip {
	font: 500 10px var(--font-mono);
	padding: 2px 6px;
	border-radius: 4px;
	background: var(--paper-2);
	color: var(--ink-2);
	border: 1px solid var(--rule);
}
.chip--accent {
	background: var(--accent-soft);
	color: oklch(40% 0.14 var(--accent-h));
	border-color: transparent;
}
/* ========== Ranked bars ========== */
.viz-ranked {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.viz-ranked__row {
	display: grid;
	grid-template-columns: 100px 1fr 130px;
	gap: 12px;
	align-items: center;
}
.viz-ranked__name {
	font-size: 13px;
	font-weight: 500;
	text-transform: capitalize;
}
.viz-ranked__track {
	position: relative;
	height: 14px;
	background: var(--paper-2);
	border-radius: 7px;
	overflow: visible;
}
.viz-ranked__fill {
	height: 100%;
	border-radius: 7px;
}
.viz-ranked__target {
	position: absolute;
	top: -3px;
	bottom: -3px;
	width: 2px;
	background: var(--ink);
	opacity: 0.6;
}
.viz-ranked__vals {
	font: 500 12px var(--font-mono);
	color: var(--ink-2);
	display: flex;
	gap: 4px;
	align-items: baseline;
	justify-content: flex-end;
}
.viz-ranked__vals b {
	color: var(--ink);
	font-weight: 600;
}
.viz-ranked__vals .sep,
.viz-ranked__vals .t { color: var(--ink-3); }
.pct {
	margin-left: auto;
	padding: 1px 6px;
	border-radius: 4px;
	font-size: 10px;
}
.pct--on {
	background: rgb(155, 237, 184);
	color: rgb(0, 56, 28);
}
@media (color-gamut: p3) {
.pct--on {
	color: color(display-p3 0.00855 0.22725 0.09847);
}
}
.pct--near {
	background: rgb(255, 221, 150);
	color: rgb(83, 50, 0);
}
@media (color-gamut: p3) {
.pct--near {
	background: color(display-p3 0.98102 0.87054 0.61354);
	color: color(display-p3 0.31841 0.19667 0);
}
}
.pct--low {
	background: rgb(255, 221, 202);
	color: rgb(114, 51, 17);
}
@media (color-gamut: p3) {
.pct--low {
	background: color(display-p3 1 0.86175 0.77481);
}
}
.pct--missed {
	background: rgb(255, 219, 215);
	color: rgb(130, 43, 42);
}
@media (color-gamut: p3) {
.pct--missed {
	background: color(display-p3 1 0.85289 0.83253);
}
}
/* ========== Trend panel ========== */
.trend__rows {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 260px;
	overflow-y: auto;
	padding-right: 6px;
}
.trend__row {
	display: grid;
	grid-template-columns: 90px 1fr auto;
	gap: 10px;
	align-items: center;
	font-size: 12px;
}
.trend__row span.trend__name {
	font-weight: 500;
	text-transform: capitalize;
}
.spark {
	height: 24px;
	width: 140px;
	display: block;
}
.spark .line {
	fill: none;
	stroke-width: 1.5;
	stroke-linejoin: round;
	stroke-linecap: round;
}
.spark .area { stroke: none; }
.trend__delta {
	font: 500 11px var(--font-mono);
	padding: 1px 6px;
	border-radius: 4px;
}
.trend__delta.up {
	color: rgb(0, 93, 51);
	background: rgb(190, 248, 209);
}
@media (color-gamut: p3) {
.trend__delta.up {
	color: color(display-p3 0 0.37645 0.17473);
}
}
.trend__delta.dn {
	color: rgb(158, 20, 30);
	background: rgb(255, 228, 225);
}
@media (color-gamut: p3) {
.trend__delta.dn {
	background: color(display-p3 1 0.89036 0.87483);
}
}
.trend__delta.flat {
	color: var(--ink-3);
	background: var(--paper-2);
}
/* ========== Recent workouts ========== */
.worklist {
	display: flex;
	flex-direction: column;
}
.worklist__row {
	display: grid;
	grid-template-columns: 80px 1fr auto;
	gap: 14px;
	padding: 12px 0;
	border-bottom: 1px dashed var(--rule);
	align-items: center;
	-webkit-text-decoration: none;
	text-decoration: none;
	color: inherit;
}
.worklist__row:hover {
	-webkit-text-decoration: none;
	text-decoration: none;
	background: var(--paper-2);
}
.worklist__row:last-child { border-bottom: 0; }
.worklist__date {
	font: 500 11px var(--font-mono);
	color: var(--ink-3);
}
.worklist__title {
	font-weight: 600;
	font-size: 13px;
	color: var(--ink);
	margin-bottom: 2px;
}
.worklist__note {
	font-size: 12px;
	color: var(--ink-3);
	font-style: italic;
}
.worklist__stat {
	font: 500 11px var(--font-mono);
	color: var(--ink-2);
	display: flex;
	gap: 12px;
	align-items: baseline;
	text-align: right;
}
.worklist__stat b {
	color: var(--ink);
	font-weight: 600;
}
/* ========== Tag (live etc.) ========== */
.tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font: 500 10px var(--font-mono);
	letter-spacing: 0.06em;
	padding: 2px 7px;
	border-radius: 99px;
	border: 1px solid var(--rule);
	color: var(--ink-2);
	background: var(--paper-2);
}
.tag--live::before {
	content: "";
	width: 5px;
	height: 5px;
	border-radius: 99px;
	background: var(--ok);
	animation: split-pulse 1.6s infinite;
}
@keyframes split-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.3; }
}
/* ========== Empty state within a split card ========== */
.split-card__empty {
	padding: 28px 0;
	text-align: center;
	color: var(--ink-3);
	font-size: 13px;
}
/* ========== Responsive tweaks ========== */
@media (max-width: 1100px) {
	.d-grid--hero { grid-template-columns: 1fr; }
	.d-grid--2 { grid-template-columns: 1fr; }
	.stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
	.app-shell { grid-template-columns: 1fr; }
	.sidebar {
		position: static;
		height: auto;
		border-right: 0;
		border-bottom: 1px solid var(--rule);
	}
	.main-area { padding: 20px; }
	.topbar__l h1 { font-size: 32px; }
	.schedule { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 540px) {
	.stats { grid-template-columns: 1fr; }
	.schedule { grid-template-columns: repeat(2, 1fr); }
	.viz-ranked__row { grid-template-columns: 80px 1fr 110px; }
	.trend__row { grid-template-columns: 70px 1fr auto; }
	.spark { width: 100px; }
}
/* ========== Layout ========== */
.page {
	max-width: var(--max-width-page);
	margin: 0 auto;
	padding: var(--space-16) var(--space-12);
}
.page-narrow {
	max-width: var(--max-width-narrow);
}
.page-header {
	margin-bottom: var(--space-12);
}
.page-title {
	font-size: var(--font-size-xl);
	font-weight: var(--font-weight-bold);
	letter-spacing: var(--tracking-tight);
	margin-bottom: var(--space-2);
}
.page-meta {
	display: flex;
	align-items: center;
	gap: var(--space-6);
	flex-wrap: wrap;
}
.stack {
	display: flex;
	flex-direction: column;
	gap: var(--space-12);
}
/* ========== Brand icon (login / reset pages) ========== */
.brand-icon {
	width: 1.75rem;
	height: 1.75rem;
	border-radius: var(--radius-lg);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-bold);
	background: var(--blue-light);
	color: var(--blue);
}
.brand-icon-lg {
	width: 2.5rem;
	height: 2.5rem;
	font-size: var(--font-size-md);
	border-radius: var(--radius-xl);
}
/* ========== Responsive ========== */
@media (max-width: 640px) {
	.page {
		padding: var(--space-8);
	}
}
/* ========== Cards ========== */
.card {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-2xl);
	box-shadow: var(--shadow-card);
	overflow: hidden;
}
.card-padded {
	padding: var(--space-12);
}
.card-header {
	padding: var(--space-8) var(--space-10);
	border-bottom: 1px solid var(--border);
}
.card-header h3 {
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-bold);
}
.card-section-title {
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-bold);
	margin-bottom: var(--space-8);
}
.card-header-flex {
	display: flex;
	justify-content: space-between;
	align-items: center;
}
/* ========== Data Tables ========== */
.data-table {
	width: 100%;
	font-size: var(--font-size-base);
	border-collapse: collapse;
}
.data-table thead tr {
	border-bottom: 1px solid var(--border-light);
}
.data-table th {
	padding: var(--space-5) var(--space-8);
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-bold);
	text-transform: uppercase;
	letter-spacing: var(--tracking-wider);
	color: var(--text-muted);
	background: var(--bg-inset);
}
.data-table tbody tr {
	border-bottom: 1px solid var(--border-light);
}
.col-name {
	text-align: left;
	padding-left: var(--space-10);
}
.col-date {
	text-align: left;
	padding-left: var(--space-10);
}
.col-num {
	text-align: right;
	width: 5rem;
}
.col-wide {
	width: 7rem;
}
.cell-name {
	padding: var(--space-5) var(--space-10);
	position: relative;
}
.cell-date {
	padding: var(--space-6) var(--space-10);
	white-space: nowrap;
}
.cell-title {
	padding: var(--space-6) var(--space-10);
}
.cell-num {
	padding: var(--space-5) var(--space-8);
	text-align: right;
}
.bar {
	position: absolute;
	top: var(--space-2);
	bottom: var(--space-2);
	left: var(--space-2);
	border-radius: var(--radius-md);
	max-width: calc(100% - var(--space-4));
	transition: width var(--transition-slow);
}
.bar-primary {
	background: var(--bar-primary);
}
.bar-secondary {
	background: var(--bar-secondary);
}
.name-text {
	position: relative;
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-medium);
	text-transform: capitalize;
}
.section-header td {
	padding: var(--space-10) var(--space-10) var(--space-4);
}
.section-label {
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-bold);
	text-transform: uppercase;
	letter-spacing: var(--tracking-widest);
	color: var(--text-muted);
	margin-right: var(--space-4);
}
.weekday {
	font-size: var(--font-size-xs);
	text-transform: uppercase;
	font-weight: var(--font-weight-semibold);
	color: var(--text-muted);
	margin-left: var(--space-4);
}
/* ========== Muscle Group Detail Rows ========== */
.group-detail-row td {
	padding: 0 var(--space-10) var(--space-8);
	border-bottom: 1px solid var(--border-light);
}
.group-detail-row + .group-detail-row td {
	padding-top: 0;
}
.data-table tbody tr.group-detail-row {
	border-bottom: none;
}
.data-table tbody tr:has(+ .group-detail-row) {
	border-bottom: none;
}
.group-detail {
	padding-left: var(--space-8);
}
.muscle-detail-list {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	margin-bottom: var(--space-4);
}
.muscle-detail-bar {
	display: flex;
	align-items: center;
	gap: var(--space-6);
	height: 1.5rem;
}
.muscle-detail-name {
	font-size: var(--font-size-xs);
	color: var(--text-secondary);
	text-transform: capitalize;
	min-width: 10rem;
	flex-shrink: 0;
}
.muscle-detail-track {
	flex: 1;
	height: 0.375rem;
	background: var(--bg-inset);
	border-radius: var(--radius-full);
	overflow: hidden;
}
.muscle-detail-fill {
	height: 100%;
	background: var(--blue);
	opacity: 0.35;
	border-radius: var(--radius-full);
	transition: width var(--transition-slow);
}
.muscle-detail-sets {
	font-size: var(--font-size-xs);
	color: var(--text-muted);
	min-width: 1.5rem;
	text-align: right;
}
.movement-bar-wrap {
	margin-top: var(--space-2);
}
.movement-bar-track {
	display: flex;
	height: 0.5rem;
	border-radius: var(--radius-full);
	overflow: hidden;
}
.movement-segment {
	height: 100%;
	min-width: 2px;
	transition: width var(--transition-slow);
}
.segment-blue { background: var(--blue); opacity: 0.6; }
.segment-purple { background: var(--purple); opacity: 0.6; }
.segment-amber { background: var(--amber); opacity: 0.6; }
.segment-teal { background: var(--teal); opacity: 0.6; }
.segment-rose { background: var(--rose); opacity: 0.6; }
.segment-green { background: var(--green); opacity: 0.6; }
.segment-muted { background: var(--text-muted); opacity: 0.3; }
.movement-legend {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2) var(--space-6);
	margin-top: var(--space-3);
}
.movement-legend-item {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--font-size-xs);
	color: var(--text-secondary);
	text-transform: capitalize;
}
.movement-legend-dot {
	display: inline-block;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: var(--radius-full);
}
.dot-blue { background: var(--blue); }
.dot-purple { background: var(--purple); }
.dot-amber { background: var(--amber); }
.dot-teal { background: var(--teal); }
.dot-rose { background: var(--rose); }
.dot-green { background: var(--green); }
.dot-muted { background: var(--text-muted); }
/* ========== Drilldown Links ========== */
.drilldown-link {
	position: relative;
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-medium);
	text-transform: capitalize;
	color: var(--text-primary);
	-webkit-text-decoration: none;
	text-decoration: none;
	transition: color var(--transition-fast);
}
.drilldown-link:hover {
	color: var(--blue);
	-webkit-text-decoration: none;
	text-decoration: none;
}
.drilldown-link.bold {
	font-weight: var(--font-weight-bold);
}
/* ========== Clickable Rows ========== */
.clickable-row {
	cursor: pointer;
}
.clickable-row:hover {
	background: var(--bg-hover);
}
/* ========== Responsive: stacked card layout (D-009 Option B) ========== */
/* On narrow viewports the wide .data-table can't fit its columns inside the
   overflow:hidden .card, which silently clips the rightmost columns. Instead of
   horizontal scroll, collapse each row into a stacked label:value card. Each
   numeric cell shows its column name (from data-label) beside its value; the
   name cell becomes the card title. Desktop layout is unchanged. */
@media (max-width: 640px) {
	.data-table,
	.data-table tbody,
	.data-table tbody tr,
	.data-table tbody td {
		display: block;
		width: 100%;
	}

	/* Visually hide the header row but keep it for assistive tech; column
	   meaning is re-exposed per cell via data-label. */
	.data-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.data-table tbody tr {
		padding: var(--space-5) var(--space-8);
		border-bottom: 1px solid var(--border-light);
	}

	/* Name cell becomes the card title: full width, no label. */
	.data-table td.cell-name {
		padding: var(--space-2) 0 var(--space-5);
	}

	/* Numeric cells become label:value rows. */
	.data-table td.cell-num {
		display: flex;
		justify-content: space-between;
		align-items: baseline;
		width: auto;
		text-align: right;
		padding: var(--space-2) 0;
	}

	.data-table td.cell-num[data-label]::before {
		content: attr(data-label);
		font-size: var(--font-size-xs);
		font-weight: var(--font-weight-bold);
		text-transform: uppercase;
		letter-spacing: var(--tracking-wide);
		color: var(--text-muted);
		text-align: left;
		margin-right: var(--space-6);
	}

	/* Full-width spanning rows (section headers, group detail) stay as blocks. */
	.data-table td[colspan] {
		padding-left: 0;
		padding-right: 0;
	}

	.group-detail {
		padding-left: 0;
	}

	.muscle-detail-name {
		min-width: 6rem;
	}
}
/* ========== Breakdown Table ========== */
.breakdown-section {
	padding: var(--space-8) var(--space-10);
	border-bottom: 1px solid var(--border-light);
}
.breakdown-header {
	display: flex;
	align-items: center;
	gap: var(--space-6);
	margin-bottom: var(--space-6);
}
.breakdown-rows {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}
.breakdown-row {
	display: flex;
	align-items: center;
	padding: var(--space-3) var(--space-6);
	border-radius: var(--radius-lg);
	gap: var(--space-6);
	font-size: var(--font-size-sm);
}
.breakdown-row-primary {
	background: var(--bg-page);
}
.breakdown-role {
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-medium);
	text-transform: uppercase;
	letter-spacing: var(--tracking-wide);
	width: 4rem;
}
.role-primary {
	color: var(--blue);
}
.role-secondary {
	color: var(--text-muted);
}
.breakdown-unit {
	font-size: var(--font-size-xs);
	text-transform: uppercase;
	color: var(--text-muted);
}
/* ========== Movement Badges ========== */
.movement-badge {
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-bold);
	padding: var(--space-1) var(--space-4);
	border-radius: var(--radius-md);
	text-transform: capitalize;
}
/* ========== Badges ========== */
.badge {
	display: inline-flex;
	align-items: center;
	gap: var(--space-3);
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-bold);
	padding: var(--space-1) var(--space-5);
	border-radius: var(--radius-full);
}
.badge-blue {
	background: var(--blue-light);
	color: var(--accent-text);
}
.badge-purple {
	background: var(--purple-light);
	color: var(--purple);
}
.badge-green {
	background: var(--green-light);
	color: var(--green);
}
.badge-rose {
	background: var(--rose-light);
	color: var(--rose);
}
.badge-amber {
	background: var(--amber-light);
	color: var(--amber);
}
.badge-teal {
	background: var(--teal-light);
	color: var(--teal);
}
.badge-muted {
	background: var(--bg-inset);
	color: var(--text-muted);
}
.filter-clear {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--space-8);
	height: var(--space-8);
	border-radius: var(--radius-full);
	background: var(--purple);
	color: var(--color-white);
	font-size: var(--font-size-xs);
	line-height: 1;
	-webkit-text-decoration: none;
	text-decoration: none;
}
.filter-clear:hover {
	-webkit-text-decoration: none;
	text-decoration: none;
	opacity: 0.8;
}
/* ========== Tags ========== */
.tag {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-semibold);
	padding: var(--space-1) var(--space-4);
	border-radius: var(--radius-full);
	background: var(--bg-inset);
	color: var(--text-secondary);
}
/* ========== Tabs ========== */
.tab-bar {
	display: flex;
	border-radius: var(--radius-lg);
	padding: var(--space-1);
	background: var(--bg-inset);
	border: 1px solid var(--border-light);
}
.tab {
	padding: var(--space-3) var(--space-6);
	border-radius: var(--radius-md);
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-semibold);
	color: var(--text-muted);
	-webkit-text-decoration: none;
	text-decoration: none;
	border: 1px solid transparent;
	transition: all var(--transition-fast);
}
.tab:hover {
	-webkit-text-decoration: none;
	text-decoration: none;
	color: var(--text-secondary);
}
.tab-active {
	background: var(--bg-card);
	color: var(--accent-text);
	border-color: var(--border);
	box-shadow: var(--shadow-md);
}
.tab-bar-sm {
	display: flex;
	border-radius: var(--radius-md);
	padding: var(--space-1);
	background: var(--bg-inset);
	border: 1px solid var(--border-light);
}
.tab-sm {
	padding: var(--space-2) var(--space-5);
	border-radius: var(--radius-sm);
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-semibold);
	color: var(--text-muted);
	-webkit-text-decoration: none;
	text-decoration: none;
}
.tab-sm:hover {
	-webkit-text-decoration: none;
	text-decoration: none;
	color: var(--text-secondary);
}
.tab-sm-active {
	background: var(--bg-card);
	color: var(--text-primary);
}
/* ========== Controls ========== */
.controls {
	display: flex;
	flex-direction: column;
	gap: var(--space-6);
	margin-bottom: var(--space-16);
}
.controls-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-6);
}
.group-by {
	display: flex;
	align-items: center;
	gap: var(--space-3);
}
.group-label {
	font-size: var(--font-size-xs);
	text-transform: uppercase;
	letter-spacing: var(--tracking-wide);
	font-weight: var(--font-weight-bold);
	color: var(--text-muted);
}
.filter-form {
	display: flex;
	align-items: center;
	gap: var(--space-3);
}
.link {
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-semibold);
	color: var(--blue);
	-webkit-text-decoration: none;
	text-decoration: none;
}
.link:hover {
	-webkit-text-decoration: underline;
	text-decoration: underline;
}
/* ========== Forms & Buttons ========== */
.form-group {
	margin-bottom: var(--space-8);
}
.form-label {
	display: block;
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-medium);
	color: var(--text-secondary);
	margin-bottom: var(--space-3);
}
.form-label-sm {
	display: block;
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-bold);
	text-transform: uppercase;
	letter-spacing: var(--tracking-wide);
	color: var(--text-muted);
	margin-bottom: var(--space-3);
}
.form-input {
	width: 100%;
	padding: var(--space-5) var(--space-6);
	border-radius: var(--radius-lg);
	border: 1px solid var(--border);
	background: var(--bg-page);
	color: var(--text-primary);
	font-family: inherit;
	font-size: var(--font-size-base);
}
.form-input:focus {
	outline: none;
	border-color: var(--blue);
	box-shadow: var(--shadow-focus);
}
.form-input-sm {
	padding: var(--space-3) var(--space-5);
	font-size: var(--font-size-xs);
	width: 8rem;
}
.form-input-mono {
	font-family: var(--font-mono);
	font-size: var(--font-size-xs);
}
.form-error {
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-medium);
	padding: var(--space-4) var(--space-6);
	border-radius: var(--radius-lg);
	background: var(--rose-light);
	color: var(--rose);
	margin-bottom: var(--space-8);
}
.inline-form {
	display: flex;
	align-items: flex-end;
	gap: var(--space-4);
}
.form-actions {
	display: flex;
	gap: var(--space-4);
	margin-top: var(--space-8);
}
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: var(--space-5) var(--space-8);
	border-radius: var(--radius-lg);
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-bold);
	font-family: inherit;
	cursor: pointer;
	border: 1px solid var(--border);
	background: var(--bg-card);
	color: var(--text-secondary);
	transition: all var(--transition-fast);
}
.btn:hover {
	background: var(--bg-inset);
}
.btn-sm {
	padding: var(--space-3) var(--space-5);
}
.btn-primary {
	background: var(--blue);
	color: var(--color-white);
	border-color: var(--blue);
}
.btn-primary:hover {
	opacity: 0.9;
}
.btn-primary:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}
.btn-green {
	background: var(--green-light);
	color: var(--green);
	border-color: rgba(26, 155, 92, 0.15);
}
.btn-green:hover {
	opacity: 0.9;
}
.btn-full {
	width: 100%;
}
/* ========== Touch Tap Targets (WCAG 2.5.5) ========== */
@media (pointer: coarse) {
	.btn,
	.btn-sm,
	.tab,
	.tab-sm,
	.preset-btn,
	.date-input,
	.btn-split,
	.filter-clear {
		min-height: 44px;
		display: inline-flex;
		align-items: center;
	}

	.filter-clear {
		min-width: 44px;
		justify-content: center;
	}
}
/* ========== Login ========== */
.login-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: calc(100vh - var(--navbar-height));
	padding: var(--space-8);
}
.login-card {
	width: 100%;
	max-width: var(--max-width-login);
}
.login-header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-6);
	margin-bottom: var(--space-16);
}
.login-title {
	font-size: var(--font-size-lg);
	font-weight: var(--font-weight-bold);
	letter-spacing: var(--tracking-tight);
}
.auth-form {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-2xl);
	box-shadow: var(--shadow-card);
	padding: var(--space-16);
}
.tab-toggle {
	display: flex;
	border-radius: var(--radius-lg);
	padding: var(--space-2);
	background: var(--bg-inset);
	margin-bottom: var(--space-12);
}
.tab-toggle-btn {
	flex: 1;
	padding: var(--space-4);
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-semibold);
	letter-spacing: var(--tracking-wide);
	text-transform: uppercase;
	border-radius: var(--radius-md);
	border: 1px solid transparent;
	background: transparent;
	color: var(--text-muted);
	cursor: pointer;
	font-family: inherit;
	transition: all var(--transition-base);
}
.tab-toggle-btn.active {
	background: var(--bg-card);
	color: var(--text-primary);
	border-color: var(--border);
	box-shadow: var(--shadow-md);
}
.form-notice {
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-medium);
	padding: var(--space-4) var(--space-6);
	border-radius: var(--radius-lg);
	background: var(--green-light);
	color: var(--ok);
	margin-bottom: var(--space-12);
}
.login-resend {
	margin-top: var(--space-8);
	font-size: var(--font-size-xs);
	color: var(--text-muted);
}
.login-resend summary {
	cursor: pointer;
	padding: var(--space-4) var(--space-2);
}
.login-resend .auth-form {
	margin-top: var(--space-6);
	box-shadow: none;
}
/* ========== Settings ========== */
.setting-current {
	font-size: var(--font-size-xs);
	color: var(--text-muted);
	margin-bottom: var(--space-8);
}
.setting-current .mono {
	color: var(--text-secondary);
	font-weight: var(--font-weight-semibold);
}
.alert {
	font-size: var(--font-size-xs);
	padding: var(--space-4) var(--space-6);
	border-radius: var(--radius-lg);
	margin-bottom: var(--space-8);
}
.alert-amber {
	background: var(--amber-light);
	color: var(--amber);
}
.alert-green {
	background: var(--green-light);
	color: var(--green);
}
.sync-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-8);
	margin-bottom: var(--space-10);
}
.stat-label {
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-bold);
	text-transform: uppercase;
	letter-spacing: var(--tracking-wide);
	color: var(--text-muted);
	margin-bottom: var(--space-2);
}
.stat-value {
	font-size: var(--font-size-xs);
	color: var(--text-secondary);
}
/* ========== Grouped View ========== */
.bucket-group {
	margin-bottom: var(--space-20);
}
.bucket-header {
	display: flex;
	align-items: baseline;
	gap: var(--space-6);
	margin-bottom: var(--space-8);
	padding-bottom: var(--space-6);
	border-bottom: 1px solid var(--border);
}
.bucket-key {
	font-size: var(--font-size-md);
	font-weight: var(--font-weight-bold);
	font-family: var(--font-mono);
}
/* ========== Empty State ========== */
.empty-state {
	padding: var(--space-32) var(--space-16);
	text-align: center;
}
.empty-title {
	font-size: var(--font-size-md);
	font-weight: var(--font-weight-semibold);
	color: var(--text-secondary);
	margin-bottom: var(--space-2);
}
.empty-sub {
	font-size: var(--font-size-base);
	color: var(--text-muted);
}
/* ========== Date Range Picker (Web Component) ========== */
date-range-picker {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-4);
}
date-range-picker .preset-btn {
	padding: var(--space-3) var(--space-6);
	border-radius: var(--radius-lg);
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-semibold);
	cursor: pointer;
	background: var(--bg-card);
	border: 1px solid var(--border);
	color: var(--text-secondary);
	box-shadow: var(--shadow-sm);
	font-family: inherit;
	transition: all var(--transition-fast);
}
date-range-picker .preset-btn:hover {
	background: var(--bg-inset);
}
date-range-picker .divider {
	width: 1px;
	height: var(--space-10);
	background: var(--border);
	margin: 0 var(--space-2);
}
date-range-picker .date-inputs {
	display: flex;
	align-items: center;
	gap: var(--space-4);
}
date-range-picker .date-input {
	padding: var(--space-3) var(--space-5);
	border-radius: var(--radius-lg);
	font-size: var(--font-size-xs);
	border: 1px solid var(--border);
	background: var(--bg-card);
	color: var(--text-secondary);
	font-family: var(--font-mono);
}
date-range-picker .date-input:focus {
	outline: none;
	border-color: var(--blue);
	box-shadow: var(--shadow-focus);
}
date-range-picker .date-sep {
	font-size: var(--font-size-xs);
	color: var(--text-muted);
}
/* ========== Workout Detail ========== */
.exercise-list {
	display: flex;
	flex-direction: column;
	gap: var(--space-8);
}
.exercise-card-header {
	display: flex;
	align-items: center;
	gap: var(--space-6);
	padding: var(--space-8) var(--space-10);
	border-bottom: 1px solid var(--border-light);
}
.exercise-index {
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-bold);
	background: var(--blue-light);
	color: var(--blue);
	flex-shrink: 0;
}
.exercise-card-title {
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-bold);
}
.warmup-row {
	opacity: 0.5;
}
/* ========== Exercise Map Management ========== */
.exercise-map-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}
.exercise-map-item {
	display: flex;
	align-items: center;
	gap: var(--space-6);
	padding: var(--space-6) var(--space-10);
	border-bottom: 1px solid var(--border-light);
}
.exercise-map-item:last-child {
	border-bottom: none;
}
.exercise-map-name {
	flex: 1;
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-medium);
}
.exercise-map-meta {
	display: flex;
	gap: var(--space-4);
	align-items: center;
	flex-wrap: wrap;
}
.exercise-map-actions {
	display: flex;
	gap: var(--space-2);
}
.exercise-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-8);
}
.exercise-form-full {
	grid-column: 1 / -1;
}
/* ========== Unmapped Exercises ========== */
.unmapped-notice {
	margin-bottom: var(--space-8);
}
.unmapped-notice summary {
	cursor: pointer;
}
.unmapped-list {
	margin: var(--space-4) 0 0;
	padding: 0;
	list-style: none;
}
.unmapped-list li {
	display: flex;
	justify-content: space-between;
	padding: var(--space-2) 0;
	border-bottom: 1px solid var(--border-light);
	font-size: var(--font-size-base);
}
/* ========== Sparkline / Trends ========== */
.trend-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
	gap: var(--space-8);
}
.trend-card {
	padding: var(--space-8) var(--space-10);
}
.trend-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: var(--space-4);
}
.trend-title {
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-bold);
	text-transform: capitalize;
}
.trend-value {
	font-family: var(--font-mono);
	font-size: var(--font-size-xs);
	color: var(--text-secondary);
}
.sparkline {
	display: block;
	width: 100%;
	height: 3rem;
}
.sparkline-line {
	fill: none;
	stroke: var(--blue);
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.sparkline-area {
	fill: var(--blue-light);
}
.sparkline-dot {
	fill: var(--blue);
}
.trend-labels {
	display: flex;
	justify-content: space-between;
	margin-top: var(--space-2);
}
.trend-label {
	font-size: var(--font-size-xs);
	color: var(--text-muted);
	font-family: var(--font-mono);
}
.trend-section-title {
	margin-bottom: var(--space-6);
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-bold);
}
/* ========== Flash Messages ========== */
.flash {
	padding: var(--space-3) var(--space-4);
	border-radius: var(--radius-md);
	font-size: var(--font-size-sm);
	margin-bottom: var(--space-4);
}
.flash-success {
	background: var(--green-light);
	color: var(--green);
	border: 1px solid rgba(26, 155, 92, 0.15);
}
/* ========== Goals Settings ========== */
.goals-add-form {
	display: flex;
	gap: var(--space-3);
	align-items: center;
}
.goals-add-form .form-input {
	flex: 1;
	max-width: 200px;
}
.goals-add-form input[type="number"] {
	max-width: 80px;
}
.btn-danger {
	background: var(--rose-light);
	color: var(--rose);
	border-color: rgba(224, 78, 106, 0.15);
}
.btn-danger:hover {
	background: var(--rose);
	color: var(--color-white);
}
/* ========== Goals Dashboard Card ========== */
.goals-card {
	margin-bottom: var(--space-4);
}
.goals-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: var(--space-4);
}
.goals-header h3 {
	margin: 0;
}
.goal-row {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	padding: var(--space-2) 0;
}
.goal-name {
	width: 120px;
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-medium);
	flex-shrink: 0;
	text-transform: capitalize;
}
.goal-track {
	flex: 1;
	height: 8px;
	background: var(--bg-inset);
	border-radius: var(--radius-full);
	overflow: hidden;
}
.goal-fill {
	height: 100%;
	border-radius: var(--radius-full);
	transition: width 0.3s ease;
}
.goal-bar-met {
	background: var(--green);
}
.goal-bar-progress {
	background: var(--blue);
}
.goal-bar-empty {
	background: transparent;
}
.goal-stat {
	font-size: var(--font-size-sm);
	width: 70px;
	text-align: right;
	flex-shrink: 0;
}
.goal-met {
	color: var(--green);
	font-weight: var(--font-weight-semibold);
}
/* ========== Pagination ========== */
.pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-8);
	margin-top: var(--space-8);
}
/* ========== Focus Visible ========== */
.btn:focus-visible,
.tab:focus-visible,
.tab-sm:focus-visible,
.preset-btn:focus-visible {
	outline: 2px solid var(--blue);
	outline-offset: 2px;
	box-shadow: var(--shadow-focus-lg);
}
/* ========== Responsive ========== */
@media (max-width: 640px) {

	.page {
		padding: var(--space-8);
	}

	.controls-row {
		flex-direction: column;
		align-items: stretch;
	}

	.sync-stats {
		grid-template-columns: 1fr;
	}

	.inline-form {
		flex-direction: column;
		align-items: stretch;
	}

	.breakdown-row {
		flex-wrap: wrap;
	}

	.goals-add-form {
		flex-direction: column;
		align-items: stretch;
	}
}
