:root {
	color-scheme: light;
	--page: #f9f9f7;
	--surface: #fcfcfb;
	--ink: #0b0b0b;
	--ink-2: #52514e;
	--muted: #898781;
	--grid: #e1e0d9;
	--axis: #c3c2b7;
	--border: rgba(11, 11, 11, 0.1);
	--wash: rgba(11, 11, 11, 0.04);
	--band: rgba(11, 11, 11, 0.045);
	/* Violet is the app's own colour: it sits apart from Strava orange and Spotify green. */
	--accent: #6250d6;
	/* Data colours: pace wears the accent; heart rate, power and cadence each get their own. */
	--pace: var(--accent);
	--heart: #eb6834;
	--faster: var(--accent);
	--slower: #e34948;
	--power: #2a78d6;
	--blue: #3d85f5;
	--up: var(--accent);
	--cadence: #eda100;
	--strava: #fc4c02;
	--spotify: #1db954;
}

@media (prefers-color-scheme: dark) {
	:root {
		color-scheme: dark;
		--page: #0d0d0d;
		--surface: #1a1a19;
		--ink: #f0efec;
		--ink-2: #c3c2b7;
		--muted: #898781;
		--grid: #2c2c2a;
		--axis: #383835;
		--border: rgba(255, 255, 255, 0.1);
		--wash: rgba(255, 255, 255, 0.06);
		--band: rgba(255, 255, 255, 0.05);
		--accent: #9085e9;
		--pace: var(--accent);
		--heart: #d95926;
		--faster: var(--accent);
		--slower: #e66767;
		--power: #3987e5;
		--up: var(--accent);
		--cadence: #c98500;
	}
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--page);
	color: var(--ink);
	font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px 64px; }

/* --- header ------------------------------------------------------------- */

.top { display: flex; align-items: center; gap: 12px; padding: 20px 0; }
/* The wordmark's rounded face. Fredoka, SIL Open Font License. */
@font-face { font-family: Fredoka; font-weight: 600; font-display: swap; src: url(fonts/fredoka-600-latin.woff2) format("woff2"); }

.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; margin-right: auto; }
.brand img { width: 30px; height: 30px; }
.wordmark { display: inline-flex; font: 600 25px/1 Fredoka, ui-rounded, system-ui, sans-serif; letter-spacing: -0.02em; transform: skewX(-9deg); padding-bottom: 2px; }
.wordmark span { display: inline-block; }
.wordmark .tall { color: var(--accent); }
/* On hover the letters bob in turn, like a row of beats. */
.brand:hover .wordmark span { animation: bob 0.5s ease-in-out; }
@keyframes bob { 40% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .brand:hover .wordmark span { animation: none; } }

/* Running | Biking: the two analyses, as tabs under the status strip */
.sports { display: flex; gap: 6px; margin: 18px 0 4px; padding: 5px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.sports button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 14px; border: 0; border-radius: 10px; background: none; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.sports button:hover { background: var(--wash); }
.sports button[aria-selected="true"] { background: var(--accent); color: #fff; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: none; padding: 5px 10px; font-size: 13px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--wash); color: var(--ink); font-weight: 600; }

.menu { position: relative; }
.menu summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: 13px; }
.menu summary::-webkit-details-marker { display: none; }
.menu .avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--wash); }
.menu .sheet { position: absolute; right: 0; top: calc(100% + 6px); min-width: 228px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 6px; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16); z-index: 30; }
.menu .sheet button { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 9px; font-size: 14px; color: var(--ink); }
.menu .sheet button:hover { background: var(--wash); }
.menu .sheet .icon { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu .sheet hr { height: 1px; margin: 6px 4px; border: 0; background: var(--grid); }
.menu .sheet .danger { color: var(--slower); }
.menu .sheet .danger .icon { stroke: var(--slower); }
.menu .sheet .danger:hover { background: color-mix(in srgb, var(--slower) 10%, transparent); }

/* --- buttons, cards ------------------------------------------------------ */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; text-decoration: none; }
.btn:hover { background: var(--wash); }
.btn.strava { background: var(--strava); border-color: transparent; color: #fff; }
.btn.spotify { background: var(--spotify); border-color: transparent; color: #08130c; }
.btn.strava:hover, .btn.spotify:hover { filter: brightness(0.95); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.note { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.note p { flex: 1 1 280px; color: var(--ink-2); }
.note strong { color: var(--ink); display: block; }
.error { border-color: var(--slower); }
.ask, .asked { flex: 1 1 100%; font-size: 14px; color: var(--ink-2); margin: 0; }
.ask summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.ask p { margin: 8px 0 10px; }
.ask .inline { flex: none; }

section { margin-top: 52px; }
section > h2 { font-size: 24px; letter-spacing: -0.02em; margin-bottom: 16px; }
section > h2 + .sub { margin-top: -14px; font-size: 15px; }
section > .sub { color: var(--ink-2); margin: 2px 0 14px; }

/* --- landing ------------------------------------------------------------- */

.landing { text-align: center; }
.landing > .wrap { padding-top: 2px; }
.landing h1 { font-size: clamp(36px, 6.4vw, 60px); line-height: 1.04; letter-spacing: -0.035em; margin-top: 18px; }
.landing .lede { color: var(--ink-2); font-size: 20px; margin: 14px 0 26px; }
.landing .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.joined { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px 6px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 600; }
.joined .mark, .step .mark { width: 16px; height: 16px; }
.joined i { font-style: normal; color: var(--muted); margin: 0 3px; }
/* The front page is one moving picture (scene.js) that fills the screen. On it, in the middle: the name, large, the
   question, and one way in. The canvas lies behind, and the run takes whatever room is left under the words (.hero-run). */
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; background: #3a27a8; color: #fff; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-copy { display: flex; flex-direction: column; align-items: center; max-width: 760px; margin: 0 auto; padding: clamp(28px, 8vh, 96px) 20px 0; }
.hero-brand { display: flex; align-items: center; gap: clamp(12px, 1.8vw, 20px); }
.hero-brand img { width: clamp(52px, 7.6vw, 84px); height: auto; border-radius: 24%; box-shadow: 0 14px 44px rgba(12, 4, 60, 0.45); }
.hero-brand .wordmark { font-size: clamp(54px, 8.6vw, 96px); padding-bottom: 0.08em; }
.hero-brand .wordmark .tall { color: #ffd24a; }
.hero-brand:hover .wordmark span { animation: bob 0.5s ease-in-out; }
.landing .hero h1 { font-size: clamp(22px, 3.3vw, 36px); line-height: 1.15; letter-spacing: -0.025em; margin-top: clamp(16px, 2.6vh, 28px); }
.landing .hero .lede { color: rgba(255, 255, 255, 0.78); font-size: clamp(15px, 1.6vw, 18px); line-height: 1.45; max-width: 30em; margin: 10px 0 0; text-wrap: balance; }
.hero .actions { margin-top: clamp(20px, 3.4vh, 34px); gap: 10px; align-items: stretch; }
.start, .hero .btn.demo { padding: 11px 17px 11px 19px; border-radius: 13px; font-size: 17px; gap: 8px; color: #fff; }
.start .mark.strava { width: 18px; height: 18px; fill: #fff; }
.chevron { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.15s ease; }
.start:hover .chevron { transform: translateX(3px); }
/* the quieter of the two: clear glass with a faint rim, where Start is solid orange */
.hero .btn.demo { padding: 11px 18px; background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.26); color: rgba(255, 255, 255, 0.92); font-weight: 500; }
.hero .btn.demo:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.hero .card { margin-bottom: 18px; color: var(--ink); }
.hero-run { flex: 1; min-height: clamp(240px, 34vh, 400px); }
@media (prefers-reduced-motion: reduce) { .chevron { transition: none; } .hero-brand:hover .wordmark span { animation: none; } }
.steps { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 26px; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.steps > i { font-style: normal; color: var(--muted); }
.step { display: inline-flex; align-items: center; gap: 7px; }
.note-glyph { color: var(--accent); font-size: 16px; line-height: 1; }
.fine { color: var(--muted); font-size: 13px; margin-top: 22px; text-align: center; }
.fine.left { text-align: left; margin-top: 6px; }

/* --- emails: a mail window around the real message ------------------------------ */

.mailroom { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 8px; }
.scenarios { display: grid; gap: 8px; }
.scenario { text-align: left; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.scenario b, .scenario span { display: block; }
.scenario b { font-weight: 600; font-size: 14px; }
.scenario span { color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.scenario:hover { background: var(--wash); }
.scenario[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mail { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14); }
.mail-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.lights { display: inline-flex; gap: 8px; margin-right: 4px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #ee6a5f; }
.lights i:nth-child(2) { background: #f5bd4f; }
.lights i:nth-child(3) { background: #61c454; }
.tools { display: inline-flex; gap: 12px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; }
.tools.right { margin-left: auto; }
.tools svg { width: 17px; height: 17px; fill: none; stroke: var(--ink-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tools.right svg { stroke: #e0483e; fill: #e0483e; }
.mail-count { padding: 4px 20px 0; color: var(--muted); font-size: 12px; }
.mail-head { display: flex; align-items: flex-start; gap: 12px; padding: 14px 20px 16px; border-bottom: 1px solid var(--grid); }
.mail-head img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.mail-head .who { flex: 1; min-width: 0; font-size: 14px; }
.mail-head .who b { display: block; font-size: 16px; font-weight: 650; }
.mail-head .address, .mail-head .to, .mail-head .at { color: var(--muted); font-size: 13px; }
.mail-head .address { display: block; }
.mail-head .subject { margin-top: 4px; }
.mail-head .at { white-space: nowrap; }
.mail-body { display: block; width: 100%; height: min(72vh, 780px); border: 0; background: #f4f3ef; }
.field { font: inherit; color: inherit; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--page); min-width: 0; flex: 1 1 200px; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 300px; }
@media (max-width: 760px) { .mailroom { grid-template-columns: 1fr; } .mail-head .at { display: none; } }

/* --- stat tiles and findings --------------------------------------------- */

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile .label { color: var(--ink-2); font-size: 13px; }
.tile .value { font-size: 28px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
.tile .unit { font-size: 15px; font-weight: 500; color: var(--ink-2); margin-left: 3px; }


.art { width: 44px; height: 44px; border-radius: 8px; flex: none; object-fit: cover; background: var(--wash); display: grid; place-items: center; color: var(--muted); font-weight: 600; }
.art.sm { width: 30px; height: 30px; border-radius: 6px; font-size: 12px; }

/* --- ranked songs (diverging bars) ---------------------------------------- */

.legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--ink-2); font-size: 13px; margin-bottom: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.key.line { height: 2px; width: 16px; border-radius: 1px; }
.key.faint { opacity: 0.4; }


/* --- charts --------------------------------------------------------------- */

.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { font: 12px system-ui, -apple-system, "Segoe UI", sans-serif; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart text.strong { fill: var(--ink); font-weight: 600; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--axis); stroke-width: 1; }
.chart .band { fill: var(--band); }
.chart .raw { fill: none; stroke: var(--pace); stroke-width: 1.25; stroke-opacity: 0.4; stroke-linejoin: round; }
.chart .avg { stroke: var(--pace); stroke-width: 2.5; stroke-linecap: round; }
.chart .hr { fill: none; stroke: var(--heart); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .cross { stroke: var(--ink-2); stroke-width: 1; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .hit.link { cursor: pointer; }

.tip { position: fixed; z-index: 10; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; font-size: 13px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); max-width: 280px; }
.tip .head { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.tip .head img, .tip .head .none { width: 38px; height: 38px; flex: none; border-radius: 8px; object-fit: cover; background: var(--wash); display: grid; place-items: center; color: var(--muted); font-size: 16px; }
.tip .head .who { flex: 1; min-width: 0; }
.tip .head .who b, .tip .head .who span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tip .head .who b { font-weight: 650; font-size: 14px; }
.tip .head .who span { color: var(--ink-2); font-size: 12px; }
.tip .head .note { align-self: flex-start; color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tip .figs { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--grid); color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.tip .figs span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.tip .figs i { width: 7px; height: 7px; border-radius: 50%; }
.tip .figs b { color: var(--ink); font-size: 13px; font-weight: 650; }
.tip .t { color: var(--muted); font-size: 12px; }
.tip .r { display: flex; align-items: center; gap: 6px; }
.tip .r b { font-weight: 650; }
.tip .r span { color: var(--ink-2); }
.tip .song { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--grid); }

/* --- tables --------------------------------------------------------------- */

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 6px 10px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr.go { cursor: pointer; }
.table tr.go:hover td { background: var(--wash); }
.table .song { display: flex; align-items: center; gap: 10px; min-width: 0; }
.table .song b { font-weight: 600; }
.table .song span { color: var(--ink-2); }
.table .dim { color: var(--muted); }
.scroll { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }

.btn.more { margin-top: 14px; font-size: 14px; padding: 8px 14px; }

.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.pair h3, .opened-head h3 { font-size: 16px; letter-spacing: -0.01em; }
.card > .sub, .opened-head .sub { color: var(--ink-2); font-size: 13px; margin: 2px 0 10px; }
.rows { list-style: none; margin: 0 -6px; padding: 0 6px; max-height: 560px; overflow-y: auto; }
.rows li { border-top: 1px solid var(--grid); }
.rows .row { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 8px 0; border: 0; background: none; text-align: left; }
.rows button.row { padding: 9px 6px; margin: 0 -6px; width: calc(100% + 12px); border-radius: 8px; }
.rows button.row:hover { background: var(--wash); }
.rows .who { flex: 1; min-width: 0; }
.rows .who b, .rows .who > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows .who b { font-weight: 600; font-size: 14px; }
.rows .who span, .rows .at, .rows .meta { color: var(--ink-2); font-size: 13px; }
.rows .at { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rows .go { color: var(--muted); font-size: 18px; line-height: 1; }
.rows .off .who b { font-weight: 500; }

.rows .meta { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; }
.rows .meta + .meta { margin-top: 3px; padding: 2px 0; }
.rows .meta b { flex: 1; min-width: 0; color: var(--ink); }
.rows .meta > span { flex: none; }
.rows .meta + .meta > span:first-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.heard { display: inline-flex; align-items: center; gap: 6px; }
.covers { display: inline-flex; padding-left: 5px; }
.covers img { width: 18px; height: 18px; margin-left: -5px; border-radius: 5px; object-fit: cover; background: var(--wash); box-shadow: 0 0 0 1.5px var(--surface); }
.rows .who .pill, .pill { padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--spotify) 14%, transparent); color: var(--ink); font-size: 12px; font-weight: 600; }
.rows .who .pill.none, .pill.none { background: var(--wash); color: var(--muted); font-weight: 500; }

/* The head of an Activity card: whose list it is and when it was checked, how long it is, and the filter. */
.card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 12px; font-size: 13px; }
.card-head .count { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.filter-box { position: relative; margin-left: auto; }
.filter { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: inset 0 0 0 1.5px var(--blue); color: var(--blue); }
.filter svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.filter.on { background: var(--blue); box-shadow: none; color: #fff; }
.pick { position: absolute; right: 0; top: 38px; z-index: 20; min-width: 200px; padding: 5px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16), 0 0 0 1px var(--border); }
.pick button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: none; font-size: 15px; color: var(--ink); text-align: left; }
.pick button:hover:not(:disabled) { background: var(--wash); }
.pick button span { flex: 1; }
.pick .glyph { color: var(--ink-2); }
.pick .tick { width: 18px; height: 18px; fill: none; stroke: var(--blue); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.pick [aria-checked="true"] .tick { visibility: visible; }
.pick .clear { margin-top: 5px; border-top: 1px solid var(--grid); border-radius: 0 0 9px 9px; color: var(--slower); }
.pick .clear:disabled { color: var(--muted); }

/* --- collecting: five records on a line, one for each run or ride with music ---- */

.collect { display: flex; align-items: center; gap: 20px 40px; flex-wrap: wrap; margin: 14px 0 20px; padding: 26px 28px; }
.collect-text { flex: 1 1 250px; }
.collect-text strong { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.collect-text strong b { font-size: 44px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; margin-right: 6px; color: var(--accent); }
.collect-text p { margin-top: 6px; color: var(--ink-2); font-size: 14px; }
.discs { flex: 2 1 340px; position: relative; display: grid; grid-template-columns: repeat(5, 1fr); justify-items: center; align-items: center; }
.discs .line { position: absolute; left: 10%; right: 10%; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: var(--grid); }
.discs .line i { display: block; height: 100%; border-radius: 2px; background: var(--accent); }
.disc { position: relative; width: 68px; height: 68px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 2px dashed var(--axis); color: var(--muted); }
.disc .glyph { width: 24px; height: 24px; }
.disc.next { border-color: var(--accent); color: var(--accent); animation: beckon 2.2s ease-in-out infinite; }
.disc.goal { border-style: solid; }
.disc.goal.next { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
/* A counted one is a record: grooves, the cover for its label, a hole through the middle. */
.disc.on { border: 0; color: #fff; background: repeating-radial-gradient(circle, #1b1b1d 0 2px, #101011 2px 3.5px); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 6px 16px rgba(0, 0, 0, 0.2); animation: spin 9s linear infinite; }
.disc.on img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.disc.on i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); }
.disc.on .glyph { width: 36px; height: 36px; padding: 7px; border-radius: 50%; background: var(--accent); }
.disc.on .glyph + i { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes beckon { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 35%, transparent); } 60% { box-shadow: 0 0 0 10px transparent; } }
@media (prefers-reduced-motion: reduce) { .disc { animation: none !important; } }
@media (max-width: 520px) {
	.collect { padding: 22px 18px; }
	.disc { width: 52px; height: 52px; }
	.disc.on img, .disc.on .glyph { width: 28px; height: 28px; }
	.disc .glyph { width: 20px; height: 20px; }
}

.meter { grid-column: -3 / -1; position: relative; height: 4px; border-radius: 2px; background: var(--wash); margin-top: 4px; }
.meter > i { display: block; height: 100%; border-radius: 2px; }

/* --- status strip: connections and data range -------------------------------- */

.status:empty { display: none; }
.status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: -4px 0 20px; font-size: 13px; color: var(--ink-2); }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip b { color: var(--ink); font-weight: 600; }
.chip .mark { width: 16px; height: 16px; flex: none; }
.mark.strava { fill: var(--strava); }
.mark.spotify { fill: var(--spotify); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: #0ca30c; }
.chip.bad .dot { background: var(--slower); }
.status .since { margin-left: auto; color: var(--muted); }

/* --- headline ------------------------------------------------------------------ */

.headline { display: flex; align-items: center; gap: 28px; padding: 30px; background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 11%, var(--surface)), var(--surface) 62%); }
.art.lg { width: 148px; height: 148px; border-radius: 16px; font-size: 44px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16); }
.art.md { width: 40px; height: 40px; border-radius: 8px; font-size: 15px; }
.headline-text { min-width: 0; }
.kicker { color: var(--accent); font-size: 15px; font-weight: 600; }
.headline h1 { font-size: clamp(30px, 5.4vw, 52px); line-height: 1.05; letter-spacing: -0.03em; margin: 4px 0 4px; }
.headline .by { color: var(--ink-2); font-size: 17px; }
.headline .proof { margin-top: 16px; color: var(--ink-2); font-size: 16px; }
.headline .proof b { color: var(--ink); font-size: 22px; font-weight: 650; letter-spacing: -0.01em; margin-right: 6px; }


/* --- spectrum: covers along one scale ------------------------------------------ */

.card + .pair, .pair + .pair, .pair + .card { margin-top: 12px; }
.spectrum { position: relative; }
.spectrum .line { position: absolute; left: 0; right: 0; height: 2px; border-radius: 1px; background: linear-gradient(to right, var(--grid), var(--pace)); }
.spectrum-box.heart .line { background: linear-gradient(to right, var(--grid), var(--heart)); }
.spectrum .avg { position: absolute; top: 0; width: 1px; background: var(--axis); }
.spectrum .avg-label, .spectrum .end { position: absolute; color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.spectrum .avg-label { transform: translateX(-50%); color: var(--ink-2); }
.spectrum .cover { position: absolute; padding: 0; border: 0; border-radius: 9px; overflow: hidden; background: var(--wash); color: var(--muted); font-weight: 600; box-shadow: 0 0 0 2px var(--surface), 0 2px 8px rgba(0, 0, 0, 0.14); transition: transform 0.12s ease; }
.spectrum .cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.spectrum .cover:hover, .spectrum .cover:focus-visible { transform: scale(1.15); z-index: 2; outline: none; }
@media (prefers-reduced-motion: reduce) { .spectrum .cover { transition: none; } }

/* --- lists and facts ------------------------------------------------------------- */

.list h3 { font-size: 16px; letter-spacing: -0.01em; }
.list .what { color: var(--ink-2); font-size: 13px; margin: 2px 0 10px; }
.list ol { list-style: none; margin: 0; padding: 0; }
.list li { display: grid; grid-template-columns: 14px 40px minmax(0, 1fr) auto; column-gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--grid); }
.list .n { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.list .who { min-width: 0; }
.list .who b, .list .who span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .who b { font-weight: 600; font-size: 15px; }
.list .who span { color: var(--ink-2); font-size: 13px; }
.list .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.list .num b { display: block; font-weight: 650; font-size: 16px; letter-spacing: -0.01em; }
.list .num span { display: block; color: var(--muted); font-size: 12px; }
.num b small, .day-parts b small { font-size: 0.68em; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.arrow { font-style: normal; font-size: 9px; margin-right: 4px; vertical-align: 1px; }
.arrow.up { color: var(--up); }
.arrow.down { color: var(--muted); }
.list li .meter { grid-column: 3 / -1; margin-top: 7px; }
.meter.split { background: var(--wash); }
.meter.split > i { background: var(--slower); }

.fact { display: flex; align-items: center; gap: 14px; min-width: 0; text-decoration: none; padding-top: 4px; }
.fact .who b { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
a.fact:hover .who b { text-decoration: underline; }

.day-parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; padding-top: 4px; }
.day-parts > div { border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.day-parts > div.best { border-color: var(--pace); box-shadow: inset 0 0 0 1px var(--pace); }
.day-parts span { display: block; color: var(--ink-2); font-size: 12.5px; }
.day-parts b { display: block; font-size: 24px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.3; }

@media (max-width: 560px) {
	.headline { flex-direction: column; align-items: flex-start; padding: 20px; gap: 16px; }
	.art.lg { width: 96px; height: 96px; }
	.status .since { margin-left: 0; flex-basis: 100%; }
}

.glyph-tile { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--wash); color: var(--ink-2); font-size: 14px; font-weight: 600; }
.glyph { width: 19px; height: 19px; fill: currentColor; }
/* Each kind of activity has its own background colour, with the glyph in white. */
.glyph-tile.run { color: #fff; background: var(--accent); }
.glyph-tile.ride { color: #fff; background: var(--power); }
.glyph-tile.weight { color: #fff; background: var(--heart); }
.opened-head .grow { flex: 1; min-width: 0; }

.btn.small { padding: 7px 13px; font-size: 14px; }
.opened-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tally { margin-top: 14px !important; }

.chart .actbar { fill: var(--strava); fill-opacity: 0.16; }
.chart .actedge { fill: var(--strava); }
.chart .songbar { fill: var(--spotify); fill-opacity: 0.3; }
.chart .change { stroke: var(--axis); stroke-width: 1; }
.chart line.mean { stroke-width: 1.5; stroke-dasharray: 5 4; opacity: 0.75; }
.chart text.mean { fill: var(--ink-2); font-weight: 500; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.chart .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart text.on { fill: var(--ink); font-weight: 600; font-size: 13px; }
.tip .song.t { color: var(--muted); }

.back { display: inline-block; color: var(--ink-2); text-decoration: none; font-size: 14px; margin-bottom: 8px; }
.back:hover { color: var(--ink); }
.title { font-size: 26px; letter-spacing: -0.02em; }
.when { color: var(--ink-2); margin-bottom: 18px; }
.foot { color: var(--muted); font-size: 13px; margin-top: 40px; }

@media (max-width: 560px) {
	.hide-s { display: none; }
	.card { padding: 16px; }
}
.table td.dim { white-space: nowrap; }

/* An opened activity: its name and a line of figures, the outline of its route, the chart, and its songs fastest first. */
.opened { padding: 24px; }
.opened .opened-head { align-items: center; gap: 14px; margin-bottom: 18px; }
.opened .opened-head h3 { font-size: 20px; }
.opened .opened-head .sub { margin: 1px 0 10px; }
.opened .by { position: relative; flex: none; width: 60px; height: 60px; }
.opened .by img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--wash); }
.opened .by .glyph-tile { position: absolute; right: -5px; bottom: -4px; width: 26px; height: 26px; border-radius: 50%; font-size: 11px; box-shadow: 0 0 0 3px var(--surface); }
.opened .by .glyph-tile:not(.run):not(.ride):not(.weight) { background: var(--ink-2); color: var(--surface); }
.opened .by .glyph { width: 15px; height: 15px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--ink-2); font-size: 13px; }
.facts b { color: var(--ink); font-size: 17px; font-weight: 650; letter-spacing: -0.01em; margin-right: 5px; font-variant-numeric: tabular-nums; }
/* The route, with the songs along it. */
.route { margin: 0 0 20px; border-radius: 14px; overflow: hidden; background: var(--wash); box-shadow: inset 0 0 0 1px var(--border); }
.route .map { position: relative; overflow: hidden; }
/* The live map (Mapbox): its height, the style switch over it, and the covers pinned along the route. */
.route .map.live { height: 400px; }
.route .map-ui { position: absolute; left: 10px; top: 10px; z-index: 2; display: flex; gap: 8px; }
.route .map-ui .seg { border: 0; border-radius: 9px; background: #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25); overflow: hidden; }
.route .map-ui button { border: 0; background: none; padding: 7px 11px; font-size: 13px; font-weight: 500; color: #333; }
.route .map-ui button:hover { background: #f0f0f0; }
.route .map-ui button[aria-pressed="true"] { background: var(--accent); color: #fff; font-weight: 600; }
.route .pin { width: 32px; height: 32px; padding: 0; border: 3px solid var(--accent); border-radius: 9px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); overflow: hidden; cursor: default; }
.route .pin img { display: block; width: 100%; height: 100%; object-fit: cover; }
.route .end-dot { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }
.route .end-dot.begin { background: #111; border: 3px solid #fff; }
.route .end-dot.finish { background: #fff; border: 3.5px solid #111; }
@media (max-width: 640px) {
	.route .map.live { height: 300px; }
	.route .map-ui button { padding: 6px 8px; font-size: 12px; }
}
.route .tiles { position: absolute; inset: 0; }
.route .tiles img { position: absolute; max-width: none; user-select: none; }
/* The streets are quietened so the songs stand out, and turned dark with the rest of the page. */
.route .tiles { filter: saturate(0.35) brightness(1.04); }
@media (prefers-color-scheme: dark) {
	.route .tiles { filter: invert(1) hue-rotate(180deg) saturate(0.4) brightness(0.9) contrast(0.9); }
}
.route svg { position: absolute; inset: 0; display: block; width: 100%; }
.route .credit { position: absolute; right: 6px; bottom: 4px; margin: 0; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--ink-2); font-size: 10px; }
.route .credit a { color: inherit; text-decoration: none; }
.opened .map-note { margin: -12px 0 20px; }
.route path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route .road-under { stroke: var(--surface); stroke-width: 9; opacity: 0.85; }
.route .road { stroke: var(--ink-2); stroke-width: 2.5; stroke-dasharray: 2 6; }
.route .song-under { stroke: var(--surface); stroke-width: 12; }
.route .song { stroke-width: 7; }
.route .song { stroke: var(--faster); }
.route .start { fill: var(--ink); stroke: var(--surface); stroke-width: 3; }
.route .end { fill: var(--surface); stroke: var(--ink); stroke-width: 3; }
.route .ring { fill: var(--surface); stroke: var(--faster); stroke-width: 2.5; }
.route .hit { fill: transparent; cursor: default; }
.chart .lane { fill: var(--wash); }
.opened h4 { margin: 26px 0 0; font-size: 16px; letter-spacing: -0.01em; }
.opened h4 + .sub { color: var(--ink-2); font-size: 13px; margin: 2px 0 10px !important; }
.ranked { list-style: none; margin: 0; padding: 0; }
.ranked li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 9px 0; border-top: 1px solid var(--grid); }
.ranked.plain li { grid-template-columns: 40px minmax(0, 1fr); }
.ranked .who { min-width: 0; }
.ranked .who b, .ranked .who span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranked .who b { font-weight: 600; font-size: 15px; }
.ranked .who span { color: var(--ink-2); font-size: 13px; }
.ranked .num { text-align: right; white-space: nowrap; font-weight: 650; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
	.opened { padding: 18px 16px; }
	.opened .opened-head { flex-wrap: wrap; }
	.opened .opened-head > .glyph-tile { display: none; }
	.opened .by { width: 48px; height: 48px; }
}
