/*
 * Viben Lotse: the pages' own parts.
 *
 * The base — tokens, plain elements, card, bar, tabs, fields, row list, account menu,
 * the two columns — is in `theme.css`, Lotse's own since spec 186. Here is the rest:
 * the areas' colours, the charts, Sport, the Kalender, Ernährung, the Dashboard. This
 * file is loaded after that one and may override anything in it.
 */

:root {
	/* Spec 224: the four areas' colours, clear and of one weight (spec 187 had them muted), the Dashboard's (spec 182) across the app —
	   a muted tone for icons, marks and lines, a pale tint behind them. */
	--area-tasks: #6d5bd0;
	--area-tasks-tint: #f1eefb;
	--area-food: #e07b39;
	--area-food-tint: #fcefe5;
	--area-body: #e04e6b;
	--area-body-tint: #fcebef;
	--area-sport: #2f7fd8;
	--area-sport-tint: #eaf2fc;

	/* Today in the planning (spec 031): the sport's tint, a shade deeper. */
	--today: #e6f2f0;
	/* Spec 128: the Kalender's categories; spec 187: in the sport's soft blue. */
	--cat-sport: var(--area-sport);
	/* Spec 148: a Termin in the trainings' colour. */
	--cat-appointment: var(--cat-sport);
	/* Spec 166: «Einplanen»'s colours — still to plan, planned as asked, more than asked;
	   spec 187: the soft rose, blue and sage. */
	--chip-open: var(--area-body);
	--chip-done: var(--area-sport);
	--chip-over: var(--area-food);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme='light']) {
		--area-tasks: #a396f0;
		--area-tasks-tint: #262236;
		--area-food: #f4a06a;
		--area-food-tint: #33261c;
		--area-body: #f2758d;
		--area-body-tint: #36202a;
		--area-sport: #6ea8ee;
		--area-sport-tint: #1c2a3a;
		--today: #17302c;
	}
}

/* An area's colours on whatever carries its class (spec 187). */
.area-tasks,
.dash-card-tasks {
	--c: var(--area-tasks);
	--tint: var(--area-tasks-tint);
}

.area-food,
.dash-card-food {
	--c: var(--area-food);
	--tint: var(--area-food-tint);
}

.area-body,
.dash-card-body {
	--c: var(--area-body);
	--tint: var(--area-body-tint);
}

.area-sport,
.dash-card-sport {
	--c: var(--area-sport);
	--tint: var(--area-sport-tint);
}

/* An area's icon on its tint, at the head of a row (spec 187). */
.area-icon {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 2rem;
	height: 2rem;
	border-radius: var(--radius-pill);
	background: var(--tint);
	color: var(--c);
}

/* --------------------------------------------------------------------------- chart */

/* Der Plot antwortet dem Zeiger ohne gedrückte Taste, also darf er es auch sagen. */
@media (hover: hover) and (pointer: fine) {
	.chart {
		cursor: crosshair;
	}
}

.chart {
	width: 100%;
	height: auto;
	display: block;
	overflow: visible;
	touch-action: pan-y;
}

.chart .grid {
	stroke: var(--border);
	stroke-width: 1;
}

.chart .axis {
	fill: var(--ink-muted);
	font-size: 9px;
	font-variant-numeric: tabular-nums;
}

.chart .cursor {
	stroke: var(--border-strong);
	stroke-width: 1;
	stroke-dasharray: 2 2;
}

.legend {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2) var(--space-4);
	margin-top: var(--space-2);
	font-size: 0.75rem;
	color: var(--ink-muted);
}

.legend-item {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.swatch {
	width: 0.875rem;
	height: 0.1875rem;
	border-radius: 1px;
	display: inline-block;
}

.swatch-dashed {
	background: repeating-linear-gradient(90deg, var(--ink-muted) 0 3px, transparent 3px 6px);
}

/* ---------------------------------------------------------------------------- food */

.total {
	font-size: 1.75rem;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.proposal {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	padding: var(--space-2) 0;
	border-bottom: 1px solid var(--border);
}

/* Two links where there was one, and they stay on one line. */
.bar-links {
	display: flex;
	align-items: center;
	gap: var(--space-4);
}

/* -------------------------------------------------------------- sport (spec 018) */

/* The file input is the label that looks like a button; the input itself stays out of
   sight but reachable, so a keyboard still gets to it. */
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.page-actions > .file-choice,
.file-choice {
	flex-direction: row;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	font-size: 0.9375rem;
}

/* Up to eight measured fields: two to a line on a phone, four at a desk. */
.row-wrap {
	flex-wrap: wrap;
}

.row-wrap > .grow {
	flex: 1 1 calc(50% - var(--space-3));
	min-width: 0;
}

@media (min-width: 60rem) {
	.row-wrap > .grow {
		flex-basis: calc(25% - var(--space-3));
	}
}

.sport-live:empty {
	display: none;
}

.export-text {
	width: 100%;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.75rem;
	white-space: pre;
	overflow-x: auto;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: var(--space-2);
	background: var(--surface-sunken);
	color: var(--ink);
}

/*
 * A note (a plan's, a Bemerkung): the box of an input, several lines high. The theme
 * has no textarea yet; if a second app needs one, it belongs in ~/viben-theme.
 */
.page textarea {
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
	min-height: calc(4 * 1.4em + 2 * var(--space-2));
	padding: var(--space-2) var(--space-3);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--ink);
	width: 100%;
	resize: vertical;
}

.page textarea::placeholder {
	color: var(--ink-muted);
	opacity: 0.7;
}

/* Spec 100: «Morgen» under the Journal — three places, and the pool under them. */
.tomorrow-slots,
.task-pool {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	margin: var(--space-2) 0 var(--space-3);
	padding: var(--space-2);
	list-style: none;
	border-radius: var(--radius-sm);
	background: var(--surface-sunken);
}

.pool-task,
.tomorrow-empty {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	min-height: var(--tap);
	padding: 0 var(--space-3);
	border-radius: var(--radius-sm);
}

.pool-task {
	border: 1px solid var(--border-strong);
	background: var(--surface);
	cursor: grab;
	/* A finger drags the task rather than scrolling the page. */
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
}

.pool-task-fixed {
	cursor: default;
	touch-action: auto;
	opacity: 0.8;
}

.tomorrow-empty {
	border: 1px dashed var(--border-strong);
	color: var(--ink-muted);
}

.pool-ghost {
	position: fixed;
	z-index: 50;
	transform: translate(-50%, -50%);
	pointer-events: none;
	box-shadow: 0 4px 14px rgb(0 0 0 / 0.2);
	list-style: none;
}

.drop-zone.drop-over {
	outline: 3px solid var(--accent);
	outline-offset: -3px;
}

.task-group {
	margin: var(--space-3) 0 var(--space-1);
	font-size: 0.875rem;
	color: var(--ink-muted);
}

/* Spec 077: «Einplanen» — the favourites as chips, in the week view since spec 079. */
.favorite-chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin: var(--space-3) 0 var(--space-2);
}

.favorite-chip {
	font: inherit;
	font-size: 0.875rem;
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	min-height: 2.25rem;
	padding: 0 var(--space-3) 0 var(--space-2);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--ink);
	cursor: grab;
	/* A finger drags the chip rather than scrolling the page. */
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
}

/* Spec 094: quiet — a grip that says «drag me», the count of what is still missing. */
.favorite-chip-grip {
	color: var(--ink-muted);
	font-size: 0.75rem;
}

.favorite-chip-count {
	color: var(--ink-muted);
	font-variant-numeric: tabular-nums;
}

.favorite-chip-picked {
	outline: 3px solid var(--accent);
	outline-offset: 2px;
}

/* Spec 079: the week — a day per row on a phone, seven columns at a desk. */
.week-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-2);
}

@media (min-width: 60rem) {
	.week-grid {
		grid-template-columns: repeat(7, minmax(0, 1fr));
	}
}

.week-day {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
	min-height: 3.5rem;
	padding: var(--space-2);
	border-radius: var(--radius-sm);
	background: var(--surface-sunken);
	cursor: pointer;
}

@media (min-width: 60rem) {
	.week-day {
		min-height: 12rem;
	}
}

.week-day.week-today {
	background: var(--today);
}

.week-day-label {
	font-size: 0.8125rem;
	font-weight: 600;
}

.week-entry {
	display: block;
	padding: 2px var(--space-2);
	border: 1px solid var(--ink-muted);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--ink);
	font-size: 0.875rem;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.week-entry.status-done {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--on-accent);
}

.week-entry.status-unplanned {
	border-color: transparent;
	background: none;
	font-style: italic;
	color: var(--ink-muted);
}

/* Spec 103: a Termin is filled grey — not sport, and nothing to do. */
.week-entry.status-appointment {
	border-color: var(--border-strong);
	background: var(--border);
}

.week-day-add {
	margin-top: auto;
	color: var(--ink-muted);
	text-align: right;
}

/* Spec 104: a drag marks where the plan would land with a thin frame in the accent —
   no yellow fill; a picked favourite frames every day dashed, to say «tap a day». */
.drop-area.picking [data-day] {
	outline: 2px dashed var(--accent);
	outline-offset: -2px;
}

.drop-area [data-day].cell-drop {
	outline: 2px solid var(--accent);
	outline-offset: -2px;
}

/* A quoted line under a field — a plan's targets, a rule in words: read, not edited. */
.template-outline {
	white-space: pre-line;
	margin: 0;
	padding: var(--space-2) var(--space-3);
	border-left: 3px solid var(--border-strong);
	background: var(--surface-sunken);
}

/* Fields in a row share it: without min-width a select as wide as its longest option
   pushes the card past the edge of a phone. */
.sport select {
	width: 100%;
}

.sport .row > .grow,
.sport .row-body {
	min-width: 0;
}

/* The sauna's Durchgänge (spec 071): number, minutes, bench, remove — one line each. */
.rounds {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	align-items: stretch;
}

.round {
	display: flex;
	align-items: flex-end;
	gap: var(--space-2);
}

.round-nr {
	min-width: 1.5rem;
	padding-bottom: var(--space-2);
	color: var(--ink-muted);
	font-variant-numeric: tabular-nums;
}

.round-time {
	flex: 0 0 5.5rem;
}

.round .field {
	flex: 1 1 auto;
	min-width: 0;
}

.round-remove {
	flex: 0 0 auto;
}

.round-add {
	flex: 0 0 auto;
	align-self: flex-start;
}

/* The titles over the first round name the columns; the rounds below keep them for a
   screen reader only. */
.round:not(:first-child) :is(.round-title, .field-title) {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.session-values {
	color: var(--ink-muted);
	font-size: 0.8125rem;
	font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------- the pages of a section (spec 019) */

/*
 * Quieter than the bar: plain words, the page one is on in ink and bold (spec 095, no
 * ground any more — a ground either hung out of the column or pushed the first word in,
 * and the three rows, the areas, the pages and the title, now start on one edge).
 */
.subnav {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--space-4);
	/* As close to the title as a breadcrumb is. */
	margin-bottom: 0;
	column-span: all;
}

.subnav a {
	display: flex;
	align-items: center;
	min-height: 2.25rem;
	color: var(--ink-muted);
	font-size: 0.875rem;
	text-decoration: none;
}

.subnav a.subnav-on {
	color: var(--ink);
	font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
	.subnav a:hover:not(.subnav-on) {
		color: var(--ink);
	}
}

/*
 * Spec 096: six tabs do not fit a phone in one line, and two lines of tabs read as two
 * menus. They stay one line and swipe; the tab one is on is scrolled into view.
 */
@media (max-width: 59.99rem) {
	#chrome .tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	#chrome .tabs::-webkit-scrollbar {
		display: none;
	}

	#chrome .tabs.tabs-more-left {
		mask-image: linear-gradient(to right, transparent, #000 2.5rem);
	}

	#chrome .tabs.tabs-more-right {
		mask-image: linear-gradient(to left, transparent, #000 2.5rem);
	}

	#chrome .tabs.tabs-more-left.tabs-more-right {
		mask-image: linear-gradient(to right, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
	}
}

/* ------------------------------------------- list, page, breadcrumb (spec 021) */

/* The trail, as in the task list: links in the accent, the page itself in grey. */
.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-1) var(--space-2);
	/* As tall as the row of pages and as close to the title, so a title stands at the
	   same height under either. */
	min-height: 2.25rem;
	margin-bottom: 0;
	font-size: 0.875rem;
	color: var(--ink-muted);
	column-span: all;
}

.breadcrumb-link {
	padding: var(--space-2) 0;
	color: var(--accent);
	text-decoration: none;
}

.breadcrumb-here {
	overflow-wrap: anywhere;
}

@media (hover: hover) and (pointer: fine) {
	.breadcrumb-link:hover {
		text-decoration: underline;
	}
}

/* The title, and its one action on the right. */
.page-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	column-span: all;
}

.page-head h1 {
	margin: 0;
	min-width: 0;
	overflow-wrap: anywhere;
}

/* On a phone a long title takes its line and the buttons go under it, right-aligned. */
.page-head {
	flex-wrap: wrap;
}

.page-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: var(--space-2);
	margin-left: auto;
}

.page-actions > * {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--tap);
	margin: 0;
	padding: 0 var(--space-4);
	text-decoration: none;
}

.page-actions > button.primary {
	margin-top: 0;
}

.page-actions > a.choice {
	color: var(--ink);
}

/* A link that is the page's main action looks like the main button. */
.button-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-height: var(--tap);
	padding: 0 var(--space-5);
	border-radius: var(--radius-pill);
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 600;
	text-decoration: none;
}

/* A whole row is the way in. */
.list > li {
	padding: 0;
}

.list-link {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	width: 100%;
	padding: var(--space-3) 0;
	color: var(--ink);
	text-decoration: none;
}

/* Spec 069: the link takes the row, the bin beside it stays its own size. */
.list-link {
	flex: 1 1 auto;
	min-width: 0;
}

.row-delete {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

@media (hover: hover) and (pointer: fine) {
	.row-delete:hover {
		color: var(--danger-ink);
	}
}

.list-key {
	flex: 0 0 6rem;
	font-size: 0.8125rem;
	color: var(--ink-muted);
	overflow-wrap: anywhere;
}

/* A proposal from Polar (spec 054): the row opens the form, «Ignorieren» beside it. */
.list > li.proposal {
	display: flex;
	align-items: center;
	gap: var(--space-3);
}

.proposal .list-link {
	flex: 1 1 auto;
	min-width: 0;
}

.proposal-dismiss {
	flex: 0 0 auto;
	font-size: 0.875rem;
}

/* Spec 082: a value for Körper is not a link — «Übernehmen» and «Ablehnen» beside it,
   or under it, to the right, where the phone is too narrow for both. */
.list > li.proposal-value {
	flex-wrap: wrap;
	row-gap: 0;
	padding-bottom: var(--space-2);
}

.proposal-value .list-link {
	flex: 1 1 11rem;
}

.proposal-actions {
	display: flex;
	flex: 0 0 auto;
	gap: var(--space-2);
	margin-left: auto;
}

.proposal-take {
	font-size: 0.875rem;
}

.polar-actions {
	justify-content: flex-start;
	margin-left: 0;
}

/* A session's day over its time, each on a line of its own. */
.list-when {
	display: flex;
	flex-direction: column;
	white-space: nowrap;
}

.chevron-right {
	color: var(--ink-muted);
	font-size: 1.25rem;
}

@media (hover: hover) and (pointer: fine) {
	.list-link:hover .entry-name {
		text-decoration: underline;
	}
}

/* Anstrengung: the number, and its word underneath (spec 025). */
.segmented-captioned button {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.1rem;
	padding: var(--space-1) 0.125rem;
	line-height: 1.15;
}

.segmented-captioned small {
	font-size: 0.6875rem;
	font-weight: 400;
	color: var(--ink-muted);
	text-align: center;
}

/* A title over a row of buttons: the same look and distance as a label over an input. */
.field {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
}

.field-title {
	font-size: 0.8125rem;
	color: var(--ink-muted);
}

/* The grid of numbers in a session: its rows as far apart as the form's fields. */
form .row-wrap {
	row-gap: var(--space-2);
}

/* ---------------------------------------------------------- planung (spec 031) */

/* ‹ 22.9.–28.9.2026 › — the week, and a way to the ones around it. */
.week-nav {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	column-span: all;
}

.week-nav > .choice,
.week-step > .choice {
	flex: 0 0 auto;
	min-width: var(--tap);
	padding-inline: var(--space-3);
}

.week-label {
	font-weight: 600;
	min-width: 0;
	white-space: nowrap;
}

/* A plan's status as a word: quiet, and «offen» is no alarm — it is a fact about one's own plan. */
.status-chip {
	flex: 0 0 auto;
	font-size: 0.75rem;
	padding: 0.125rem var(--space-2);
	border-radius: 999px;
	border: 1px solid var(--border);
	color: var(--ink-muted);
	white-space: nowrap;
}

.status-done {
	border-color: var(--accent);
	color: var(--accent);
}

.status-skipped {
	text-decoration: line-through;
}

/* «CSV importieren», «Einheit erfassen», «Einheit öffnen» under a plan: left, in the card. */
.plan-actions {
	justify-content: flex-start;
	margin-left: 0;
}

/* The calendar's head: ‹ month › , the date picker and «Heute». */
.week-nav {
	flex-wrap: wrap;
}

.week-step {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	flex: 0 0 auto;
}

.week-picker {
	width: auto;
	flex: 0 1 11rem;
	min-width: 0;
}

/* On a phone: ‹ label › on the first line, the picker and Woche/Monat sharing the second. */
@media (max-width: 40rem) {
	.week-step {
		flex-basis: 100%;
	}

	.week-step .week-label {
		flex: 1;
		text-align: center;
	}

	.week-picker {
		flex: 1 1 0;
	}
}

/* The month: seven columns, a weekday row over them, one button per day. */
.month {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 2px;
}

.month-weekday {
	font-size: 0.75rem;
	color: var(--ink-muted);
	text-align: center;
	padding-bottom: var(--space-1);
}

.month-day {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 2px;
	min-height: 3.25rem;
	min-width: 0;
	padding: var(--space-1);
	border: 0;
	border-radius: calc(var(--radius-sm) - 2px);
	background: var(--surface-sunken);
	color: var(--ink);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.month-other {
	opacity: 0.45;
}

.month-number {
	font-size: 0.8125rem;
	font-weight: 600;
}

/* Today in colour: a light blue, its number in the accent. */
.month-day.month-today {
	background: var(--today);
}

.month-today .month-number {
	color: var(--accent);
}

/*
 * On a phone an entry is a dot; its name comes back where there is room for it.
 * A plan is round: filled once done, a ring while planned or open, faint when skipped.
 * A session without a plan is only shown, and looks it (spec 045): a small grey square.
 */
.month-entry {
	display: block;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 999px;
	background: none;
	border: 1px solid var(--ink-muted);
}

.month-entry.status-done {
	background: var(--accent);
	border-color: var(--accent);
}

.month-entry.status-unplanned {
	border-radius: 1px;
	background: var(--ink-muted);
	border-color: var(--ink-muted);
}

.month-entry.status-skipped {
	opacity: 0.4;
}

.month-entry.status-appointment {
	border-radius: 1px;
	background: var(--border-strong);
	border-color: var(--border-strong);
}

.month-entry-name {
	display: none;
}

/* At a desk a plan is a small label with its sport: filled once done, outlined while
   planned, struck through when skipped — no dashed lines. A session without a plan is
   only shown: its sport in italics, no frame and no fill (spec 045). */
@media (min-width: 60rem) {
	.month-day {
		min-height: 6.5rem;
	}

	.month-entry,
	.month-entry.status-done,
	.month-entry.status-open,
	.month-entry.status-unplanned,
	.month-entry.status-appointment,
	.month-entry.status-skipped {
		width: auto;
		height: auto;
		padding: 0.0625rem var(--space-2);
		border-radius: 4px;
		border: 1px solid var(--border);
		background: var(--surface);
		font-size: 0.75rem;
		line-height: 1.4;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		opacity: 1;
	}

	.month-entry.status-done {
		background: var(--accent);
		border-color: var(--accent);
	}

	.month-entry.status-done .month-entry-name {
		color: var(--surface);
	}

	.month-entry.status-unplanned {
		background: none;
		border-color: transparent;
		font-style: italic;
	}

	.month-entry.status-unplanned .month-entry-name {
		color: var(--ink-muted);
	}

	.month-entry.status-appointment {
		background: var(--border);
		border-color: var(--border-strong);
	}

	.month-entry.status-skipped .month-entry-name {
		color: var(--ink-muted);
		text-decoration: line-through;
	}

	.month-entry-name {
		display: inline;
	}
}

@media (hover: hover) and (pointer: fine) {
	.month-day:hover {
		box-shadow: inset 0 0 0 1px var(--border-strong);
	}
}

/* An entry's name keeps the ink, also on today's filled day. */
.month-entry-name {
	color: var(--ink);
}

/*
 * Ernährung's month (specs 057, 072): a day is a link. Its kcal is the one figure in
 * ink, the meals four small letters in a fixed order — the accent where something was
 * eaten, faint where not — and a drop with the litres. Never a colour for «viel» or
 * «wenig»: there is nothing to measure the kcal against.
 */
a.month-day {
	text-decoration: none;
}

.food-cal-day {
	gap: var(--space-1);
}

.food-cal-kcal {
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.1;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.food-cal-unit {
	display: none;
	font-size: 0.6875rem;
	font-weight: 500;
	color: var(--ink-muted);
}

.food-cal-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 2px var(--space-1);
	margin-top: auto;
}

/* On a phone the four meals are dots; their letters come back where there is room. */
.food-cal-meals {
	display: inline-flex;
	gap: 2px;
}

.food-cal-meal {
	width: 0.375rem;
	height: 0.375rem;
	border-radius: 999px;
	background: var(--border);
	font-size: 0;
	overflow: hidden;
}

.food-cal-meal.eaten {
	background: var(--accent);
}

.food-cal-drink {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	font-size: 0.6875rem;
	font-weight: 600;
	color: var(--accent);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.food-cal-drink span {
	display: none;
}

.food-cal-drop {
	width: 0.4375rem;
	height: 0.625rem;
	fill: currentColor;
	flex: 0 0 auto;
}

@media (min-width: 60rem) {
	.food-cal-kcal {
		font-size: 1.375rem;
		font-weight: 700;
		letter-spacing: -0.01em;
	}

	.food-cal-unit {
		display: inline;
	}

	.food-cal-meals {
		gap: 3px;
	}

	.food-cal-meal {
		display: inline-grid;
		place-items: center;
		width: 1.25rem;
		height: 1.25rem;
		border-radius: 4px;
		background: none;
		border: 1px solid var(--border);
		font-size: 0.6875rem;
		font-weight: 600;
		color: var(--ink-muted);
		opacity: 0.6;
	}

	.food-cal-meal.eaten {
		background: var(--accent);
		border-color: var(--accent);
		color: var(--surface);
		opacity: 1;
	}

	.food-cal-drink {
		font-size: 0.8125rem;
		gap: var(--space-1);
	}

	.food-cal-drink span {
		display: inline;
	}

	.food-cal-drop {
		width: 0.5625rem;
		height: 0.8125rem;
	}

	/* At a desk the meals and the drop sit one over the other, the drop below. */
	.food-cal-foot {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--space-1);
	}

	.month-legend .food-cal-kcal {
		font-size: 0.875rem;
	}
}

/* A card's title that leads to the whole list: the title's look, a link's colour. */
.card-link {
	color: inherit;
	text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
	.card-link:hover {
		text-decoration: underline;
	}
}

/*
 * The dashboard (spec 034): a grid across the whole width, outside the page's columns.
 * One card under the other on a phone, side by side from 60 rem on, as many as fit.
 */
.dashboard {
	column-span: all;
	display: grid;
	gap: var(--space-4);
	margin-bottom: var(--space-4);
}

.dashboard > .card[hidden] {
	display: none;
}

.dashboard > .card {
	margin: 0;
	break-inside: avoid;
}

@media (min-width: 60rem) {
	.dashboard {
		grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
		align-items: start;
	}
}

/* The calendar's key: what a filled, an outlined and a struck-through entry means, and
   what one that is only shown looks like (spec 045). */
.month-legend {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2) var(--space-4);
	margin: var(--space-3) 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.75rem;
	color: var(--ink-muted);
}

.month-legend li {
	display: flex;
	align-items: center;
	gap: var(--space-2);
}

.month-legend .month-entry {
	flex: 0 0 auto;
}

/* A measurement rule on the dashboard (spec 048): «fällig» quiet, «überfällig» in red —
   the user's own word for his own rule. */
.rule-due {
	color: var(--ink-muted);
}

.rule-overdue {
	color: var(--danger-ink);
	border-color: var(--danger-ink);
	font-weight: 600;
}

/* The blood pressure (spec 050): only its values since spec 137. */
.bp-line-text,
.bp-result {
	margin: 0 0 var(--space-2);
	font-variant-numeric: tabular-nums;
}

.bp-result {
	font-size: 1.125rem;
}

.bp-entries {
	margin: var(--space-2) 0 0;
	padding-left: 1.1rem;
	font-size: 0.875rem;
}

.bp-entries > li {
	display: flex;
	align-items: center;
	gap: var(--space-2);
}

.bp-entries > li > .row-delete {
	margin: 0 0 0 auto;
}

.bp-day summary {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	padding: var(--space-3) 0;
	cursor: pointer;
	list-style: none;
}

.bp-day summary::-webkit-details-marker {
	display: none;
}

.bp-day-body {
	padding: 0 0 var(--space-3);
}

.bp-measurement {
	border: 0;
	padding: 0;
	margin: 0 0 var(--space-3);
}

.bp-measurement legend {
	font-weight: 600;
	margin-bottom: var(--space-1);
}

/* Ernährung (spec 051): favourite chips, one item of the form, the day's sum, the week. */
.food-chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin: var(--space-2) 0 var(--space-3);
}

.chip {
	border: 1px solid var(--border-strong);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink);
	padding: var(--space-1) var(--space-3);
	font: inherit;
	font-size: 0.875rem;
	cursor: pointer;
	min-height: 2.25rem;
}

/* Spec 222: the way in — one big field, two buttons, the favourites under them. */
.food-capture {
	display: grid;
	gap: var(--space-2);
}

:where(.page) .food-capture-label {
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--ink);
}

.food-capture textarea {
	font-size: 1.0625rem;
	line-height: 1.45;
	min-height: 5.5rem;
	resize: vertical;
}

.food-capture-actions {
	display: flex;
	justify-content: flex-end;
	gap: var(--space-2);
}

.food-capture-actions > * {
	flex: 0 0 auto;
	width: auto;
}

.food-capture-actions .primary {
	min-width: 8rem;
}

.food-favorites {
	margin-top: var(--space-3);
	padding-top: var(--space-3);
	border-top: 1px solid var(--border);
}

:where(.page) .food-favorites h3 {
	margin: 0 0 var(--space-2);
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--ink-muted);
}

.food-favorites .food-chips {
	margin-bottom: 0;
}

.chip:hover {
	border-color: var(--area-food);
	background: var(--area-food-tint);
}

/* Spec 222: the form — the meal, then each item as a quiet block. */
.food-when {
	display: grid;
	gap: var(--space-2);
	margin-bottom: var(--space-3);
}

.food-items {
	display: grid;
	gap: var(--space-2);
}

.food-item {
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: var(--space-3);
	margin: 0;
	display: grid;
	gap: var(--space-2);
	background: var(--surface);
	min-width: 0;
}

.food-item-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: var(--space-2);
}

/* The name a line of its own on a phone; the kind and × after it. */
.food-item-head > label {
	flex: 1 1 14rem;
	min-width: 0;
}

.food-kind {
	flex: 0 0 auto;
}

.food-kind .segmented {
	min-width: 9.5rem;
}

:where(.page) .food-remove {
	align-self: center;
	margin: 0;
	font-size: 1.375rem;
}

:where(.page) .food-ai {
	margin: 0;
	font-size: 0.75rem;
	color: var(--ink-muted);
}

.food-amounts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--space-2);
}

.food-amounts label,
:where(.page) .food-amounts :is(input, select),
:where(.page) .food-macros-grid input {
	width: 100%;
	max-width: none;
}

.food-macros summary {
	display: flex;
	align-items: baseline;
	gap: var(--space-2);
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 600;
	min-height: 2rem;
	padding-top: var(--space-1);
}

.food-macros-line {
	font-weight: 400;
	color: var(--ink-muted);
	font-variant-numeric: tabular-nums;
}

.food-macros-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-2);
	margin: var(--space-2) 0;
}

@media (min-width: 40rem) {
	.food-macros-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

.food-foot > button {
	flex: 0 0 auto;
	width: auto;
}

.food-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-2);
	margin: var(--space-3) 0;
}

:where(.page) .food-total {
	margin: 0;
	font-size: 1.0625rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.food-meal {
	font-size: 0.875rem;
	color: var(--ink-muted);
	margin: var(--space-3) 0 0;
}

/* Spec 088: a favourite's sessions — a table that scrolls sideways on a phone. */
.table-scroll {
	overflow-x: auto;
}

.session-table {
	width: 100%;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.session-table th,
.session-table td {
	text-align: left;
	padding: var(--space-2) var(--space-3) var(--space-2) 0;
	border-bottom: 1px solid var(--border);
}

.session-table th {
	color: var(--ink-muted);
	font-weight: 600;
}

.food-week {
	width: 100%;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
	margin-bottom: var(--space-3);
}

.food-week th,
.food-week td {
	text-align: left;
	padding: var(--space-1) var(--space-2) var(--space-1) 0;
	border-bottom: 1px solid var(--border);
}

.food-week th {
	color: var(--ink-muted);
	font-weight: 600;
}

.food-week-shown td {
	font-weight: 600;
}

/* The AI at work (spec 051): the seconds, and a way out, on one line. */
.food-busy {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	font-variant-numeric: tabular-nums;
}

/* Körper's Kalender (spec 055): the day one tapped, listed under the grid. */
.month-day.month-selected {
	box-shadow: inset 0 0 0 2px var(--accent);
}

/* Ernährung's «Einträge»: the days are one block across the page, spaced like cards (spec 063). */
.food-days {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

/* The AI-Steuerung's test answer: as it came, readable, scrollable. */
.ai-raw {
	white-space: pre-wrap;
	word-break: break-word;
	font-size: 0.8125rem;
	background: var(--surface-sunken);
	border-radius: var(--radius-sm);
	padding: var(--space-3);
	max-height: 24rem;
	overflow: auto;
}

.ai-run {
	margin: var(--space-2) 0;
}

/* An Aufgabe (spec 074): the round button ticks it off, the row opens it, and a linked
   one carries «Erfassen» beside it — the way a Polar proposal carries «Ignorieren». */
.list > li.task {
	display: flex;
	align-items: center;
	gap: var(--space-3);
}

.task .list-link {
	flex: 1 1 auto;
	min-width: 0;
}

.task-tick {
	flex: 0 0 auto;
	width: 1.75rem;
	height: 1.75rem;
	padding: 0;
	border-radius: 999px;
	border: 2px solid var(--border-strong);
	background: transparent;
	color: var(--accent);
	font-weight: 700;
	line-height: 1;
}

.task-tick[aria-pressed='true'] {
	border-color: var(--accent);
}

.task-done .entry-name {
	text-decoration: line-through;
	color: var(--ink-muted);
}

.task-follow {
	flex: 0 0 auto;
	font-size: 0.875rem;
}

/* Spec 091: today's Journal on the dashboard is due like a task, but ticked off by
   finishing the entry — its circle is dashed and no button. */
.task-tick-none {
	display: inline-block;
	border-style: dashed;
}

/*
 * Spec 091: the Journal — the text on the left, the Ideen on the right from 60 rem on,
 * a grid across the page's whole width (spec 086). One under the other on a phone.
 */
.journal {
	column-span: all;
	display: grid;
	gap: var(--space-4);
	margin-bottom: var(--space-4);
}

.journal > *,
.journal-aside > .card {
	margin: 0;
}

.journal-aside {
	display: grid;
	gap: var(--space-4);
	align-content: start;
}

.journal-aside > .card[hidden] {
	display: none;
}

@media (min-width: 60rem) {
	.journal {
		grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr);
		align-items: start;
	}
}

.page textarea.journal-text {
	min-height: 18rem;
}

.journal-clock {
	display: flex;
	align-items: baseline;
	gap: var(--space-3);
	margin-bottom: var(--space-2);
}

.journal-timer {
	font-variant-numeric: tabular-nums;
	font-size: 1.5rem;
	font-weight: 600;
}

.journal-timer-over {
	color: var(--ink-muted);
}

.journal-status {
	margin-top: var(--space-2);
}

.journal-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
}

.journal-panel-head h2 {
	margin: 0;
}

.journal-panel-head > button,
.journal-proposal-actions > button {
	width: auto;
	flex: 0 0 auto;
}

.journal-prompts {
	margin: var(--space-3) 0 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: var(--space-3);
}

.journal-prompts li {
	display: grid;
	gap: 2px;
}

.journal-proposal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2) var(--space-3);
	padding: var(--space-2) 0;
}

.journal-proposal .row-body {
	flex: 1 1 14rem;
	min-width: 0;
}

.journal-proposal-actions {
	display: flex;
	gap: var(--space-2);
}

.journal-quote {
	display: block;
	font-style: italic;
	color: var(--ink-muted);
	font-size: 0.875rem;
}

.journal-gratitude {
	white-space: pre-wrap;
}

/*
 * Spec 086: every card across the whole width, on every page — the user's rule after
 * asking for it page by page. The theme's two columns stay in `theme.css` for the club
 * app; here nothing sits in half a column any more, so a new card needs no `.wide`.
 */
@media (min-width: 60rem) {
	.page > * {
		column-span: all;
	}
}

/* Spec 098: a plan's time, before its name — in the week, and in the month at a desk. */
.plan-time {
	margin-right: 0.3em;
	color: var(--ink-muted);
	font-variant-numeric: tabular-nums;
}

.week-entry .plan-time {
	display: block;
	margin: 0;
	font-size: 0.75rem;
	font-weight: 600;
}

/* A phone's month shows dots; a time has no room there. */
@media (max-width: 59.99rem) {
	.month-entry .plan-time {
		display: none;
	}
}

/* Spec 099: a month's entries are links — no underline, one on hover. */
a.month-entry {
	text-decoration: none;
	color: inherit;
}

@media (hover: hover) and (pointer: fine) {
	a.month-entry:hover .month-entry-name {
		text-decoration: underline;
	}
}

/*
 * Spec 102: the week at a desk — the hours down the left, a column per day, a plan
 * where its time is and as tall as its Soll-Dauer. Quarter-hour lines faint, the hours
 * a step stronger.
 */
.tgrid {
	display: grid;
	/* Spec 112: seven days on the Kalender, one in a Tagesabschluss's review. */
	grid-template-columns: 3.25rem repeat(var(--days, 7), minmax(0, 1fr));
	column-gap: var(--space-1);
	row-gap: var(--space-1);
	user-select: none;
	-webkit-user-select: none;
}

.tgrid-corner,
.tgrid-label {
	font-size: 0.75rem;
	color: var(--ink-muted);
	align-self: center;
}

.tgrid-day {
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	padding: var(--space-1) var(--space-2);
	border: 0;
	border-radius: var(--radius-sm);
	background: none;
	color: var(--ink);
	text-align: left;
}

.tgrid-day.tgrid-today {
	background: var(--today);
}

.tgrid-untimed {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-height: 2rem;
	padding: 2px;
	border-radius: var(--radius-sm);
	background: var(--surface-sunken);
	cursor: pointer;
}

.tgrid-hours {
	position: relative;
}

.tgrid-hour {
	position: absolute;
	right: var(--space-1);
	/* Spec 118: every time just under its line, the first like the rest. */
	line-height: 1;
	font-size: 0.6875rem;
	color: var(--ink-muted);
	font-variant-numeric: tabular-nums;
}

.tgrid-col {
	position: relative;
	border-radius: var(--radius-sm);
	background-color: var(--surface-sunken);
	background-image: linear-gradient(to bottom, var(--border-strong) 1px, transparent 1px);
	/* A line every hour (spec 118; every two in spec 106). */
	background-size: 100% var(--hour);
	cursor: pointer;
}

.tgrid-col.tgrid-today {
	background-color: color-mix(in srgb, var(--today) 30%, var(--surface-sunken));
}

.tblock {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	padding: 1px var(--space-1);
	border: 1px solid var(--ink-muted);
	border-radius: 6px;
	background: var(--surface);
	color: var(--ink);
	font-size: 0.75rem;
	line-height: 1.25;
	text-decoration: none;
	-webkit-user-drag: none;
}

/* Spec 105: the span being drawn for a new Termin, dashed until it is one. */
.tblock-draft {
	border-style: dashed;
	pointer-events: none;
}

.tgrid-col .tblock {
	position: absolute;
	box-sizing: border-box;
	/* A hair of room between plans side by side and above the next hour's line. */
	border-width: 1px;
	margin: 0 1px;
	/* Spec 117: as tall as it lasts — a quarter of an hour still shows. */
	min-height: 6px;
}

.tblock-untimed {
	padding: 2px var(--space-1);
}

.tblock-short {
	flex-direction: row;
	align-items: baseline;
	gap: 0.3em;
	white-space: nowrap;
}

.tblock-short .tblock-name {
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Spec 117: under an hour — 24 px or less — one small line, start and name. */
.tgrid-col .tblock-tiny {
	align-items: center;
	padding: 0 3px;
	border-radius: 4px;
	font-size: 0.625rem;
	line-height: 1;
}

.tblock-time {
	font-weight: 600;
	color: var(--ink-muted);
	font-variant-numeric: tabular-nums;
}

.tblock-name {
	overflow-wrap: anywhere;
}

.tblock.status-done {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--on-accent);
}

.tblock.status-done .tblock-time {
	color: inherit;
}

.tblock.status-unplanned {
	border-style: dashed;
	background: none;
	font-style: italic;
	color: var(--ink-muted);
}

.tblock.status-appointment {
	background: var(--border);
	border-color: var(--border-strong);
}

.tblock-movable {
	cursor: grab;
	touch-action: none;
}

/* The lower edge: dragged, it sets the Soll-Dauer. */
.tblock-resize {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 6px;
	cursor: ns-resize;
	touch-action: none;
}

@media (hover: hover) and (pointer: fine) {
	.tblock-movable:hover {
		border-color: var(--accent);
	}

	.tblock-movable:hover .tblock-resize {
		border-bottom: 2px solid var(--accent);
	}
}

/* A drag: the plan follows the pointer, the place it would land is marked, and out of
   the week it says so — letting go there deletes it. */
.drag-ghost {
	position: fixed;
	z-index: 50;
	pointer-events: none;
	opacity: 0.9;
	box-shadow: 0 4px 14px rgb(0 0 0 / 0.2);
}

.drag-ghost-out {
	border-color: var(--danger-ink);
	color: var(--danger-ink);
	opacity: 0.6;
	text-decoration: line-through;
}

body.dragging,
body.dragging * {
	cursor: grabbing !important;
}

.tgrid .cell-drop {
	outline: 2px dashed var(--accent);
	outline-offset: -2px;
}

/* Spec 162: each state a soft tint of its colour, its edge a little stronger, and the
   count «1/3» a small badge in the colour itself — since spec 166 pink to plan, blue
   planned as asked, green more than asked. */
.favorite-chip-open {
	--chip: var(--chip-open);
}

.favorite-chip-done {
	--chip: var(--chip-done);
}

.favorite-chip-over {
	--chip: var(--chip-over);
}

.favorite-chip-open,
.favorite-chip-done,
.favorite-chip-over {
	border-color: color-mix(in srgb, var(--chip) 30%, var(--surface));
	background: color-mix(in srgb, var(--chip) 8%, var(--surface));
}

.favorite-chip-open .favorite-chip-count,
.favorite-chip-done .favorite-chip-count,
.favorite-chip-over .favorite-chip-count {
	padding: 0.125rem 0.5rem;
	border-radius: var(--radius-pill);
	background: color-mix(in srgb, var(--chip) 16%, var(--surface));
	color: color-mix(in srgb, var(--chip) 85%, var(--ink));
	font-size: 0.75rem;
	font-weight: 700;
}

.favorite-chip-open .favorite-chip-grip,
.favorite-chip-done .favorite-chip-grip,
.favorite-chip-over .favorite-chip-grip {
	color: color-mix(in srgb, var(--chip) 60%, var(--ink-muted));
}

/* Spec 140: where a dragged plan or favourite would land, drawn as itself. */
.tgrid-col .tblock-preview {
	position: absolute;
	z-index: 3;
	box-sizing: border-box;
	border: 2px dashed var(--accent);
	background: color-mix(in srgb, var(--accent-quiet) 80%, transparent);
	pointer-events: none;
}

/* Spec 107: a guided routine — its steps in a row above, numbers on a phone and their
   titles at a desk; the step one is on under them, with «Zurück» and «Weiter». */
.wizard {
	column-span: all;
	display: grid;
	gap: var(--space-4);
	margin-bottom: var(--space-4);
}

.wizard > * {
	margin: 0;
}

.wizard-steps {
	display: flex;
	gap: var(--space-1);
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
}

.wizard-step button {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	width: 100%;
	min-height: var(--tap);
	padding: 0 var(--space-2);
	border: 0;
	border-radius: var(--radius-sm);
	background: none;
	color: var(--ink-muted);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.wizard-step-on button {
	background: var(--accent-quiet);
	color: var(--ink);
	font-weight: 600;
}

.wizard-number {
	flex: 0 0 auto;
	display: inline-grid;
	place-items: center;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 999px;
	border: 1px solid var(--border-strong);
	font-size: 0.8125rem;
	font-variant-numeric: tabular-nums;
}

/* Spec 109: the step one is on, quietly — a ring and its number in the accent, no fill. */
.wizard-step-on .wizard-number {
	border: 2px solid var(--accent);
	background: var(--surface);
	color: var(--accent);
	font-weight: 600;
}

.wizard-step-done .wizard-number {
	border-color: var(--accent);
	color: var(--accent);
}

/* On a phone only the numbers; the step's title stands above its content. */
.wizard-title {
	display: none;
}

.wizard-count {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--ink-muted);
}

.wizard-body h2 {
	margin-bottom: 0;
}

.wizard-content {
	display: grid;
	gap: var(--space-4);
	margin-top: var(--space-4);
}

/* Spec 197: the step's head on the page, not in a card — its pages' cards follow. */
.wizard-body {
	min-width: 0;
}

.wizard-body > .wizard-head h2 {
	margin: 0;
	font-size: 1.25rem;
}

.wizard-content .card {
	margin-left: 0;
	margin-right: 0;
}

.wizard-nav {
	/* The whole width, so «Zurück» and «Weiter» stand side by side (spec 111). */
	width: 100%;
	flex-wrap: nowrap;
	margin-top: var(--space-6);
	justify-content: flex-end;
}

/* Spec 223: «Weiter» and «Abschliessen» are the main button, as on every page (spec 110 had a pale one). */

/* At a desk the steps keep their row, with their titles, across the whole width —
   one column, like every page (spec 086). */
@media (min-width: 60rem) {
	.wizard-steps {
		flex-wrap: wrap;
		overflow: visible;
	}

	.wizard-step {
		flex: 1 1 0;
	}

	.wizard-title {
		display: inline;
		font-size: 0.875rem;
		line-height: 1.2;
	}
}

/* Spec 126: the step's title, and «Zurück» / «Weiter» beside it. */
.wizard-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--space-3);
}

.page .wizard-head .wizard-nav {
	width: auto;
	flex: 1 1 18rem;
	margin-top: 0;
}

/* Spec 112: the Journal inside a step, as on its page. */
.wizard-content > .journal {
	margin: 0;
}

.wizard-journal-actions {
	width: 100%;
	justify-content: flex-start;
}

/* ---------------------------------------------------------------- Kalender, spec 128 */

.cat-sport {
	--c: var(--cat-sport);
}

.cat-appointment {
	--c: var(--cat-appointment);
}

/* Each entry tinted in its category's colour; sport done is filled, sport without a
   plan dashed. */
.tblock[class*='cat-'],
.week-entry[class*='cat-'] {
	border-color: color-mix(in srgb, var(--c) 45%, var(--surface));
	background: color-mix(in srgb, var(--c) 15%, var(--surface));
	color: var(--ink);
	font-style: normal;
}

.tblock[class*='cat-'] .tblock-time {
	color: color-mix(in srgb, var(--c) 70%, var(--ink));
}

.tblock.status-done[class*='cat-'],
.week-entry.status-done[class*='cat-'] {
	border-color: var(--c);
	background: var(--c);
	color: var(--on-accent);
}

.tblock.status-done[class*='cat-'] .tblock-time {
	color: inherit;
}

.tblock.status-unplanned[class*='cat-'],
.week-entry.status-unplanned[class*='cat-'] {
	border-style: dashed;
	border-color: var(--c);
	background: none;
}

/* The head: the week's number over its days; on the right the dates together —
   ‹ «Heute» › and «Tag | Woche | Monat» — and, set apart by a line, «Bearbeiten». */
.cal-head {
	align-items: flex-end;
}

.cal-actions {
	align-items: center;
	gap: var(--space-4);
}

.cal-dates {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2);
}

.cal-dates {
	padding: 0;
}

/* On a phone the dates take a line of their own, ‹ «Heute» › left and the view right;
   «Bearbeiten» under them, on the right. */
@media (max-width: 40rem) {
	.cal-actions {
		width: 100%;
		margin-left: 0;
		gap: var(--space-2);
	}

	.cal-dates {
		width: 100%;
		justify-content: space-between;
	}

	.cal-dates .week-step {
		flex: 0 0 auto;
		flex-basis: auto;
		gap: var(--space-1);
	}

	.cal-dates .week-step > .choice {
		padding-left: var(--space-2);
		padding-right: var(--space-2);
	}

	.cal-dates > * {
		flex: 0 0 auto;
		margin: 0;
	}
}

/* A day's head: its date in a round badge, the weekday and how full it is. */
.tgrid-day {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	min-width: 0;
	padding: var(--space-1);
	container-type: inline-size;
}

.tgrid-day-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 1.875rem;
	height: 1.875rem;
	border-radius: var(--radius-pill);
	font-size: 0.9375rem;
	font-weight: 700;
}

.tgrid-day.tgrid-today .tgrid-day-number {
	background: var(--accent);
	color: var(--on-accent);
}

.tgrid-day-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.2;
}

.tgrid-day-name {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.tgrid-day-meta {
	font-size: 0.6875rem;
	font-weight: 400;
	color: var(--ink-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Beside the month and the categories a column is narrow: the count goes, its day's
   label still says it. */
@container (max-width: 6.5rem) {
	.tgrid-day-meta {
		display: none;
	}
}

/* Now: a line across today. */
.tgrid-now {
	position: absolute;
	left: 0;
	right: 0;
	z-index: 2;
	height: 2px;
	background: var(--danger-ink);
	pointer-events: none;
}

.tgrid-now::before {
	content: '';
	position: absolute;
	left: -4px;
	top: -4px;
	width: 10px;
	height: 10px;
	border-radius: var(--radius-pill);
	background: var(--danger-ink);
}

/* The week, and beside it at a desk the month, the categories and today. */
.cal-layout {
	display: grid;
	gap: var(--space-4);
	align-items: start;
}

.cal-layout > .card,
.cal-side > .card {
	margin: 0;
}

.cal-side {
	display: grid;
	gap: var(--space-4);
	min-width: 0;
}

/* Spec 135: beside it from a narrower desk on, so the day, the week and the month keep
   one shape. */
@media (min-width: 60rem) {
	.cal-layout {
		grid-template-columns: minmax(0, 1fr) 17rem;
	}
}

.cal-card h2 {
	margin: 0 0 var(--space-2);
	font-size: 1rem;
}

/* Spec 131: «Körper eingeben», «Sport eingeben» and «Ernährung eingeben» beside the Kalender. */
.cal-enter {
	display: grid;
	gap: var(--space-2);
}

.cal-enter .choice {
	width: 100%;
	font-size: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: var(--tap);
	color: var(--ink);
	text-align: center;
	text-decoration: none;
}

/* Spec 133: «Anderes eingeben» — a button for each Messart, the blood pressure, a session. */
.entry-choices {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
}

/* Spec 147: beside the Kalender, «Einplanen» is a list — each favourite the column's
   width, its name and Ort on the left, how often it is still missing on the right. */
.cal-side .favorite-chips {
	flex-direction: column;
	flex-wrap: nowrap;
	gap: var(--space-1);
}

.cal-side .favorite-chip {
	width: 100%;
	min-height: var(--tap);
	padding-block: var(--space-1);
	text-align: left;
}

.favorite-chip-label {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.25;
}

.favorite-chip-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.favorite-chip-where {
	font-size: 0.75rem;
	color: var(--ink-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cal-side .favorite-chip-count {
	margin-left: auto;
}

/* Spec 153: the filter by kind and the search over the list of every entry. */
.entries-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2);
	margin-bottom: var(--space-2);
}

.entries-search {
	flex: 1 1 12rem;
	min-width: 0;
}

/* Spec 157: under an open plan, the Polar training that did it, with «Übernehmen». */
.page .rows > li.plan-polar-row {
	padding-top: 0;
}

.plan-polar {
	display: flex;
	flex: 1 1 auto;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-2);
	margin: 0 0 var(--space-1);
	padding: var(--space-2) var(--space-3);
	border-radius: var(--radius-sm);
	background: var(--accent-quiet);
}

.plan-polar-actions {
	display: flex;
	gap: var(--space-2);
	flex: 0 0 auto;
}

/* Spec 176, drawn anew in 177–179: the Dashboard — «Gegessen», «Gemessen», «Sport» side
   by side at a desk, one under the other on a phone. Since spec 180 without colour:
   plain cards, a small icon and a round «+», figures in the ink, rows on hairlines. */
/* Spec 182: the overview on top — how much of what, one tile per area. Spec 185: the
   tiles choose — the chosen one framed in its tone, its list in one card under them,
   across the whole width. Four in a row from 48rem, two by two on a phone. */
.dash-tiles {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-3);
	margin-bottom: var(--space-4);
}

@media (min-width: 48rem) {
	.dash-tiles {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

:where(.page) .dash-tile {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-2);
	min-height: 0;
	padding: var(--space-4);
	border: 2px solid transparent;
	border-radius: 1rem;
	background: var(--tint);
	color: var(--ink);
	text-align: left;
	font: inherit;
	box-shadow: none;
}

:where(.page) .dash-tile[aria-pressed='true'] {
	border-color: var(--c);
	background: var(--surface);
}

.dash-tile-head {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	font-size: 0.875rem;
	font-weight: 600;
}

.dash-tile .dash-icon {
	width: 1.5rem;
	height: 1.5rem;
	background: var(--surface);
}

.dash-tile[aria-pressed='true'] .dash-icon {
	background: var(--tint);
}

.dash-tile .dash-figure {
	margin: 0;
}

.dash-tile .dash-sub {
	margin: 0;
	font-size: 0.8125rem;
}

.dash-head {
	align-items: flex-end;
	gap: var(--space-2) var(--space-3);
	flex-wrap: wrap;
}

.dash-when h1 {
	margin: 0;
}

.dash-kicker {
	display: block;
	margin-bottom: 2px;
	font-size: 0.875rem;
	color: var(--ink-muted);
}

.dash-nav {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	margin-left: auto;
}

.dash-day {
	display: flex;
	align-items: center;
	gap: var(--space-3);
}

.dash-steps {
	display: inline-flex;
	gap: var(--space-1);
}

:where(.page) .dash-step {
	width: 2.5rem;
	min-width: 0;
	height: 2.5rem;
	min-height: 0;
	padding: 0 0 2px;
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	background: var(--surface);
	color: var(--c);
	font-size: 1.25rem;
	line-height: 1;
	box-shadow: none;
}

:where(.page) .dash-today,
:where(.page) .dash-new {
	min-height: 2.5rem;
	padding: 0 var(--space-4);
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	background: var(--surface);
	color: var(--ink);
	font-size: 0.9375rem;
	font-weight: 500;
	box-shadow: none;
}

:where(.page) .dash-step:hover,
:where(.page) .dash-today:hover,
:where(.page) .dash-new:hover {
	background: var(--surface-sunken);
}

:where(.page) .dash-card {
	margin: 0;
	padding: var(--space-5);
	border: 1px solid var(--border);
	border-radius: 1rem;
	background: var(--surface);
	box-shadow: 0 1px 2px rgb(16 32 48 / 0.04);
}

.dash-card-head {
	display: flex;
	align-items: center;
	gap: var(--space-2);
}

:where(.page) .dash-card-head h2 {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--ink);
}

.dash-icon {
	display: grid;
	place-items: center;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: var(--radius-pill);
	background: var(--tint);
	color: var(--c);
}

.dash-add {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	margin-left: auto;
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	background: var(--surface);
	color: var(--ink);
	text-decoration: none;
}

.dash-add:hover {
	background: var(--tint);
}

:where(.page) .dash-figure {
	display: flex;
	align-items: baseline;
	gap: 0.3rem;
	margin: var(--space-4) 0 0;
	line-height: 1;
}

.dash-figure strong {
	font-size: 1.875rem;
	font-weight: 650;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}

.dash-figure-unit {
	font-size: 0.875rem;
	color: var(--ink-muted);
}

:where(.page) .dash-sub {
	margin: var(--space-1) 0 0;
	font-size: 0.875rem;
	color: var(--ink-muted);
}

/* The meals' share of the day: one segment each, 2px apart, rounded ends. */
.dash-bar {
	display: flex;
	gap: 2px;
	height: 0.3125rem;
	margin-top: var(--space-3);
}

.dash-bar-seg {
	flex-basis: 0;
	border-radius: 3px;
}

.dash-bar-0 {
	background: color-mix(in srgb, var(--c) 70%, var(--surface));
}

.dash-bar-1 {
	background: color-mix(in srgb, var(--c) 45%, var(--surface));
}

.dash-bar-2 {
	background: color-mix(in srgb, var(--c) 28%, var(--surface));
}

.dash-bar-3 {
	background: color-mix(in srgb, var(--c) 15%, var(--surface));
}

:where(.page) .dash-rows {
	margin: var(--space-4) 0 0;
	padding: 0;
	list-style: none;
}

.dash-group {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	padding: var(--space-3) 0 var(--space-1);
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--ink-muted);
}

.dash-group:first-child {
	padding-top: 0;
}

.dash-group-key {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: var(--radius-pill);
}

.dash-group-value {
	margin-left: auto;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}

.dash-row a {
	display: grid;
	grid-template-columns: 2.75rem 1rem minmax(0, 1fr) auto;
	align-items: center;
	gap: var(--space-2);
	padding: 0.55rem 0;
	color: var(--ink);
	text-decoration: none;
}

.dash-row-plain a {
	grid-template-columns: 2.75rem minmax(0, 1fr) auto;
}

.dash-row + .dash-row a {
	border-top: 1px solid var(--border);
}

.dash-row a:hover .dash-row-title {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.dash-row-time {
	font-size: 0.8125rem;
	font-variant-numeric: tabular-nums;
	color: var(--ink-muted);
}

.dash-mark {
	display: grid;
	place-items: center;
	width: 1rem;
	height: 1rem;
	border-radius: var(--radius-pill);
}

.dash-mark-done {
	background: var(--tint);
	color: var(--c);
}

.dash-mark-open {
	box-shadow: inset 0 0 0 1.5px var(--c);
}

.dash-row-body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.dash-row-title {
	font-weight: 500;
	overflow-wrap: anywhere;
}

.dash-row-line {
	font-size: 0.8125rem;
	color: var(--ink-muted);
	overflow-wrap: anywhere;
}

.dash-row-open .dash-row-title {
	color: var(--ink-muted);
}

.dash-row-value {
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.dash-row-value small {
	font-size: 0.75rem;
	color: var(--ink-muted);
}

/* Spec 188: the field that makes a task. */
.dash-quick {
	margin-top: var(--space-4);
}

:where(.page) .dash-quick input {
	width: 100%;
	border-color: var(--border);
	background: var(--surface-sunken);
}

:where(.page) .dash-quick input:focus {
	background: var(--surface);
}

/* Spec 181: a task — its circle ticks it off, its title opens it. */
.dash-task {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: var(--space-3);
}

.dash-task + .dash-task {
	border-top: 1px solid var(--border);
}

.dash-task a {
	display: block;
	padding: 0.55rem 0;
	color: var(--ink);
	text-decoration: none;
}

:where(.page) .dash-tick {
	display: grid;
	place-items: center;
	width: 1.375rem;
	min-width: 0;
	height: 1.375rem;
	min-height: 0;
	padding: 0;
	border: 1.5px solid var(--c);
	border-radius: var(--radius-pill);
	background: var(--surface);
	color: var(--surface);
	box-shadow: none;
}

:where(.page) .dash-tick-done {
	border-color: var(--c);
	background: var(--c);
}

.dash-task-done .dash-row-title {
	color: var(--ink-muted);
	text-decoration: line-through;
}

:where(.page) .dash-empty {
	margin: var(--space-4) 0 0;
	color: var(--ink-muted);
	font-size: 0.875rem;
}

/* Spec 190: «Von Polar»'s head — the title, and at the right «Neu holen». */
.polar-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-2);
}

.polar-head h2 {
	margin: 0;
}

:where(.page) .polar-refresh {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	color: var(--ink);
}

:where(.page) .polar-refresh:disabled {
	opacity: 0.5;
}

/* Spec 195: a Polar training's plan, a line of its own under it — chosen, changeable,
   «andere Sportart» in the warning's colour, «Ohne Plan» quiet. */
.list > li.proposal-session {
	flex-wrap: wrap;
	row-gap: var(--space-2);
}

.proposal-plan {
	flex: 1 0 100%;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--space-2);
	padding: var(--space-2) var(--space-3);
	border-radius: var(--radius-sm);
	background: var(--area-sport-tint);
	font-size: 0.875rem;
}

.proposal-plan-none {
	background: var(--surface-sunken);
	color: var(--ink-muted);
}

.proposal-plan-word {
	font-weight: 600;
}

:where(.page) .proposal-plan select {
	flex: 1 1 14rem;
	min-height: 2.25rem;
	padding-top: var(--space-1);
	padding-bottom: var(--space-1);
	font-size: 0.9375rem;
	background-color: var(--surface);
}

.proposal-plan-warn {
	color: var(--warn-ink);
	font-weight: 600;
}

.proposal-plan-warn:empty {
	display: none;
}

.proposal-session .list-link {
	flex: 1 1 12rem;
}

/* Spec 196: the Tagesabschluss's first step — what to do, said, not ticked off. */
.wizard-reminders {
	margin: 0;
	padding-left: var(--space-5);
	display: grid;
	gap: var(--space-2);
	font-size: 1.0625rem;
}

/* Spec 199: the day's Kalender as a band above the tiles — blocks on one line, the
   trainings in the sport's blue (done full, planned pale), Termine grey, «Jetzt» red. */
.dash-day-board {
	display: grid;
	gap: var(--space-4);
}

:where(.page) .dash-band {
	margin: 0;
}

:where(.page) .dash-band h2 {
	margin: 0 0 var(--space-3);
	font-size: 0.9375rem;
}

.dash-band-line {
	position: relative;
	height: 1.75rem;
}

.dash-band-track {
	position: absolute;
	inset: 0;
	border-radius: var(--radius-sm);
	background: var(--surface-sunken);
}

.dash-band-block {
	position: absolute;
	top: 0;
	bottom: 0;
	min-width: 0.5rem;
	padding: 0 var(--space-1);
	border-radius: 0.5rem;
	border: 1px solid var(--surface);
	background: color-mix(in srgb, var(--area-sport) 45%, var(--surface));
	color: var(--ink);
	font-size: 0.75rem;
	line-height: calc(1.75rem - 2px);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-decoration: none;
}

.dash-band-done,
.dash-band-unplanned {
	background: var(--area-sport);
	color: var(--surface);
}

.dash-band-appointment {
	background: color-mix(in srgb, var(--ink-muted) 30%, var(--surface));
}

.dash-band-now {
	position: absolute;
	top: -0.375rem;
	bottom: -0.375rem;
	width: 2px;
	margin-left: -1px;
	background: var(--danger-ink);
	border-radius: 1px;
	pointer-events: none;
}

.dash-band-hours {
	position: relative;
	height: 1.25rem;
	margin-top: var(--space-1);
	font-size: 0.6875rem;
	color: var(--ink-muted);
}

.dash-band-hours span {
	position: absolute;
	transform: translateX(-50%);
}

.dash-band-hours span:first-child {
	transform: none;
}

.dash-band-hours span:last-child {
	transform: translateX(-100%);
}

/* Spec 202: a Kalender entry's tags — chips with «×», a field to add, the ones used
   before to tap in. Labels only, in the ink on the sunken grey. */
.tags-chosen,
.tags-known {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2);
}

.tags-known {
	margin-top: var(--space-2);
}

.tag-chip {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	min-height: 2rem;
	padding: 0 var(--space-3);
	border-radius: var(--radius-pill);
	background: var(--surface-sunken);
	color: var(--ink);
	font-size: 0.875rem;
}

:where(.page) .tag-remove {
	min-height: 0;
	padding: 0 0 0 var(--space-1);
	border: 0;
	background: none;
	color: var(--ink-muted);
	font-size: 1rem;
	line-height: 1;
	box-shadow: none;
}

:where(.page) .tag-offer {
	border: 1px dashed var(--border-strong);
	background: var(--surface);
	color: var(--ink-muted);
	font: inherit;
	font-size: 0.875rem;
	box-shadow: none;
}

:where(.page) .tags-chosen input {
	flex: 1 1 10rem;
	width: auto;
}

/* Like a field's label: the word above, the chips under it. */
.tags-wrap {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
	font-size: 0.8125rem;
	color: var(--ink-muted);
}

/* Spec 203: the weather in Thun; spec 226: one day at a time. */
:where(.page) .dash-weather {
	margin: 0;
}

.dash-weather-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-2);
	/* Spec 227: as high as the Kalender's title line. */
	height: 1.5rem;
	margin-bottom: var(--space-3);
}

:where(.page) .dash-weather-head h2 {
	margin: 0;
	font-size: 0.9375rem;
}

.dash-weather-note {
	font-size: 0.8125rem;
	color: var(--ink-muted);
}

/* Spec 226: one day, spread over the card; ‹ › to the next and back. */
.weather-steps {
	display: flex;
	align-items: center;
	gap: var(--space-2);
}

.weather-steps-day {
	min-width: 10.5rem;
	text-align: center;
	font-weight: 600;
	font-size: 0.9375rem;
	font-variant-numeric: tabular-nums;
}

.page .weather-steps .dash-step:disabled {
	opacity: 0.35;
	cursor: default;
}

/* On a phone the head is «Wetter», the day's steps and the ⓘ (spec 227). */
@media (max-width: 47.99rem) {
	.weather-steps-day {
		min-width: 5.5rem;
	}

	.weather-wide {
		display: none;
	}
}

/* Spec 210: the day in detail, opened under the tiles — not over the page. */
/* Spec 216: more about a day, or the situation, over the page — the page stays as it is. */
.weather-pop {
	position: fixed;
	z-index: 60;
	overflow-y: auto;
	padding: var(--space-3);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface);
	box-shadow: 0 8px 28px rgb(0 0 0 / 0.16);
	font-size: 0.875rem;
}

.weather-pop[hidden] {
	display: none;
}

:where(.page) .weather-pop p {
	margin: 0 0 var(--space-1);
}

.weather-detail-head {
	font-size: 0.9375rem;
}

.weather-detail-sail {
	font-size: 0.875rem;
}

.weather-detail-note {
	font-size: 0.75rem;
	color: var(--ink-muted);
}

/* Spec 213: the hours as a table, each row named; the time to sail tinted. */
/* The card may not grow; a table too wide scrolls inside the popup. */
.dash-weather {
	min-width: 0;
}

.weather-table-wrap {
	max-width: 100%;
	overflow-x: auto;
	margin: var(--space-2) 0;
}

.weather-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.8125rem;
	font-variant-numeric: tabular-nums;
}

.weather-table th,
.weather-table td {
	padding: 3px 4px;
	text-align: center;
	white-space: nowrap;
}

.weather-table tbody th {
	text-align: left;
	font-weight: 400;
	color: var(--ink-muted);
}

.weather-table thead th,
.weather-table thead td {
	color: var(--ink-muted);
	font-weight: 400;
	border-bottom: 1px solid var(--border);
}

.weather-table thead th {
	text-align: left;
}

.weather-table .weather-table-sail {
	background: var(--area-sport-tint);
	color: var(--area-sport);
}

/* Spec 211: the lake's line, the situation in words to open, MeteoSchweiz's words for a day. */
.weather-extra:empty {
	display: none;
}

.weather-extra {
	margin-top: var(--space-2);
	padding: var(--space-2) var(--space-2) 0;
	border-top: 1px solid var(--border);
	font-size: 0.875rem;
}

:where(.page) .weather-lake {
	margin: 0 0 var(--space-1);
	color: var(--ink-muted);
}

/* Spec 212: the situation behind an icon in the head. */
.dash-weather-side {
	display: flex;
	align-items: center;
	gap: var(--space-1);
}

.weather-situation-button[aria-expanded='true'] {
	color: var(--area-sport);
}

:where(.page) .weather-pop p {
	margin: 0 0 var(--space-2);
	line-height: 1.5;
}

.weather-words {
	font-size: 0.9375rem;
	line-height: 1.55;
}

/* Spec 215: a plan's details beside its block, while the mouse is over it. */
.tblock-hover {
	position: fixed;
	z-index: 50;
	display: flex;
	flex-direction: column;
	gap: 2px;
	max-width: 18rem;
	padding: var(--space-2) var(--space-3);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface);
	box-shadow: 0 4px 16px rgb(0 0 0 / 0.12);
	font-size: 0.8125rem;
	color: var(--ink-muted);
	pointer-events: none;
}

.tblock-hover-name {
	color: var(--ink);
	font-size: 0.875rem;
}

.tblock-hover-note {
	color: var(--ink);
	white-space: pre-line;
	display: -webkit-box;
	-webkit-line-clamp: 6;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Spec 217: an entry's menu at the right mouse button, and the copy cursor at an Alt drag. */
.plan-menu {
	position: fixed;
	z-index: 70;
	padding: 4px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface);
	box-shadow: 0 6px 20px rgb(0 0 0 / 0.14);
}

.plan-menu button {
	display: block;
	width: 100%;
	padding: 6px 14px;
	border: 0;
	border-radius: var(--radius-sm);
	background: none;
	color: var(--ink);
	font: inherit;
	font-size: 0.875rem;
	text-align: left;
	cursor: pointer;
}

.plan-menu button:hover {
	background: var(--surface-sunken);
}

body.drag-copy,
body.drag-copy * {
	cursor: copy !important;
}

/* Spec 220: Einträge's pages. */
.entries-pager {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-2);
	margin-top: var(--space-3);
}

/*
 * Spec 223: one family of controls, everywhere.
 * - Text buttons — the main one (`button.primary`, `a.button-primary`), the others
 *   (`.choice`, button or link) and «Löschen» (`.choice-danger`): one height, one
 *   pill, one type size, one padding; they differ only in colour.
 * - Round icon buttons with a ring (‹ ›, +, Polar's refresh): one size.
 * - Icon buttons without one (×, ⓘ): round too, a tint under the mouse.
 * - Chips (favourites, tags): one size. A task's tick: one size.
 * Declared last and with `.page`, so it wins over the older rules of each page.
 */
.page :is(button.primary, a.button-primary, .choice, .dash-today, .dash-new) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
	min-height: var(--tap);
	padding: 0 1.125rem;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-pill);
	background: var(--surface);
	color: var(--ink);
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	box-shadow: none;
	cursor: pointer;
}

.page :is(button.primary, a.button-primary) {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 600;
}

.page .choice.choice-danger {
	border-color: var(--border);
	color: var(--danger-ink);
}

.page .choice.choice-on {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 600;
}

.page :is(button.primary, .choice):disabled {
	opacity: 0.45;
	cursor: default;
}

@media (hover: hover) and (pointer: fine) {
	.page :is(.choice, .dash-today, .dash-new):hover:not(:disabled, .choice-on) {
		border-color: var(--accent);
		background: var(--surface);
	}

	.page .choice.choice-danger:hover:not(:disabled) {
		border-color: var(--danger-ink);
	}

	.page :is(button.primary, a.button-primary):hover:not(:disabled) {
		filter: brightness(1.12);
	}
}

/* Round icon buttons with a ring. */
.page :is(.dash-step, .dash-add, .polar-refresh) {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 2.5rem;
	min-width: 0;
	height: 2.5rem;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-pill);
	background: var(--surface);
	color: var(--ink);
	font-size: 1.25rem;
	line-height: 1;
	box-shadow: none;
	text-decoration: none;
}

/* Icon buttons without a ring: round, quiet. */
.page .icon-button {
	border-radius: var(--radius-pill);
}

@media (hover: hover) and (pointer: fine) {
	.page :is(.dash-step, .dash-add, .polar-refresh):hover:not(:disabled) {
		border-color: var(--accent);
		background: var(--surface);
	}

	.page .icon-button:hover {
		background: var(--surface-sunken);
	}
}

/* Chips. */
.page :is(.chip, .tag-chip) {
	display: inline-flex;
	align-items: center;
	min-height: 2rem;
	padding: 0 0.75rem;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-pill);
	font-size: 0.875rem;
	line-height: 1.2;
}

/* A task's tick, on its page and on the Dashboard alike. */
.page :is(.task-tick, .dash-tick) {
	width: 1.5rem;
	min-width: 0;
	height: 1.5rem;
	min-height: 0;
	border-width: 2px;
}

/* In a row of buttons the main one sits on the line with the others. */
.page :is(.food-capture-actions, .plan-polar-actions, .entries-pager, .page-actions, .wizard-nav) > button.primary {
	margin-top: 0;
}

/* Spec 223: a link in running text, wherever it stands, looks like `.link` — never the browser's blue. */
.page :is(p, td, .session-values) a:not([class]) {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/*
 * Spec 224: colour where it means something, not as a veil. The page a warm off-white,
 * the cards pure white on it; an area's colour full in a small round mark with a white
 * sign, and in the ring of the tile one has chosen — the tiles themselves white.
 */
.page .dash-tile {
	border: 1px solid var(--border);
	background: var(--surface);
	box-shadow: var(--shadow);
}

.page .dash-tile[aria-pressed='true'] {
	border-color: var(--c);
	box-shadow: 0 0 0 1px var(--c);
}

.page :is(.area-icon, .dash-icon),
.page .dash-tile :is(.dash-icon),
.page .dash-tile[aria-pressed='true'] .dash-icon {
	background: var(--c);
	color: var(--surface);
}

/* Spec 225: the Kalender white — its days white columns with a hairline between them and
   the hours as fine lines; today a faint wash of the accent. */
.page :is(.tgrid-col, .tgrid-untimed) {
	border-radius: 0;
	background-color: var(--surface);
	border-left: 1px solid var(--border);
}

.page .tgrid-col {
	background-image: linear-gradient(to bottom, var(--border) 1px, transparent 1px);
}

.page :is(.tgrid-col, .tgrid-untimed).tgrid-today {
	background-color: color-mix(in srgb, var(--today) 45%, var(--surface));
}

.page .week-day {
	background: var(--surface);
	border: 1px solid var(--border);
}

.page .week-day.week-today {
	background: color-mix(in srgb, var(--today) 45%, var(--surface));
}

.page .tgrid {
	column-gap: 0;
}

/* Spec 226: the hours in even columns; the time to sail in the sail box's green. */
@media (min-width: 48rem) {
	.dash-weather .weather-table {
		table-layout: fixed;
	}

	.dash-weather .weather-table tr > :first-child {
		width: 6.5rem;
	}
}

.page .weather-table .weather-table-sail {
	background: var(--accent-quiet);
	color: var(--accent);
}

/* Spec 227: the weather as small as the Kalender's band — small steps in the head, the
   day's Beaufort on the hours' line, the time to sail a green block, one line under it. */
.page .weather-steps .dash-step {
	width: 1.75rem;
	height: 1.75rem;
	font-size: 1rem;
}

.weather-steps-day {
	min-width: 8.5rem;
	font-size: 0.875rem;
}

/* Spec 228: the day in the Kalender band's height — symbol, temperatures, the time to
   sail, MeteoSchweiz's words cut to fit. */
.weather-summary {
	display: grid;
	grid-template-columns: auto minmax(9rem, auto) minmax(11rem, auto) minmax(0, 1fr);
	align-items: center;
	gap: var(--space-4);
	/* The card as high as the Kalender's band beside it. */
	height: 6rem;
}

.weather-summary-icon {
	width: 4.5rem;
	height: 4.5rem;
}

:where(.page) .weather-summary p {
	margin: 0;
}

.weather-summary-degrees {
	color: var(--ink-muted);
	font-size: 1rem;
	font-variant-numeric: tabular-nums;
}

.weather-summary-degrees strong {
	font-size: 2.25rem;
	font-weight: 650;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--ink);
}

.weather-summary-facts {
	font-size: 0.8125rem;
	color: var(--ink-muted);
}

.weather-summary-sail {
	align-self: stretch;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: var(--space-2) var(--space-3);
	border-radius: var(--radius-sm);
	background: var(--accent-quiet);
	font-size: 0.875rem;
}

.weather-summary-sail-title {
	font-weight: 600;
	color: var(--accent);
}

.weather-summary-sail-more {
	font-size: 0.8125rem;
	color: var(--ink-muted);
}

.weather-summary-sail-none {
	background: var(--surface-sunken);
	color: var(--ink-muted);
}

.weather-sail-stark strong {
	color: var(--warn-ink);
}

.weather-summary-words {
	align-self: stretch;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	font-size: 0.875rem;
	line-height: 1.35;
	color: var(--ink);
}

:where(.page) .weather-summary-words p {
	display: inline;
}

:where(.page) .weather-summary-words p + p::before {
	content: ' ';
}

/* On a phone: the symbol, the temperatures and the time to sail on one row. */
@media (max-width: 47.99rem) {
	.weather-summary {
		grid-template-columns: auto minmax(0, 1fr) auto;
		height: 6rem;
		gap: var(--space-3);
	}

	.weather-summary-icon {
		width: 3.5rem;
		height: 3.5rem;
	}

	.weather-summary-degrees strong {
		font-size: 1.75rem;
	}

	.weather-summary-temp {
		min-width: 0;
	}

	.weather-summary-facts {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	/* On a phone the words are behind the ⓘ only — the card keeps the band's height. */
	.weather-summary-words {
		display: none;
	}
}

.weather-pop .weather-words {
	font-size: 0.875rem;
	margin: var(--space-2) 0;
}

/* Spec 230: the weather's and the Kalender's titles as the other cards' — an icon disc in
   the accent, then the name. */
:where(.page) .dash-band-title {
	display: flex;
	align-items: center;
	gap: var(--space-2);
}

.page .dash-icon-accent {
	--c: var(--accent);
	--tint: var(--accent-quiet);
}

.dash-band-title .card-link {
	color: var(--ink);
	text-decoration: none;
}

.page .dash-band-title .dash-icon {
	width: 1.5rem;
	height: 1.5rem;
}

.page .dash-band > .dash-band-title {
	height: 1.5rem;
}

/* As high as the Kalender's band with its title's icon (measured: 179 px). */
.page .weather-summary {
	height: calc(6rem + 1px);
}

@media (max-width: 47.99rem) {
	.weather-steps {
		gap: var(--space-1);
	}

	.weather-steps-day {
		min-width: 4.25rem;
	}

	.page .dash-weather-head .weather-situation-button {
		margin-right: calc(var(--space-2) * -1);
	}
}

/* Spec 231: the time to sail as plain text beside the temperatures — no box, no colour,
   a hairline before it; its title quiet, the wind in the ink. */
.page .weather-summary-sail {
	align-self: center;
	padding: 0 0 0 var(--space-4);
	border-left: 1px solid var(--border);
	border-radius: 0;
	background: none;
	font-size: 0.875rem;
	gap: 1px;
}

.page .weather-summary-sail-title {
	font-size: 0.8125rem;
	font-weight: 400;
	color: var(--ink-muted);
}

.page .weather-summary-sail strong {
	font-weight: 600;
	color: var(--ink);
}

/* Spec 232: MeteoSchweiz's words one running text, four lines and «…», no line cut in
   half; a click opens the details. */
.page .weather-summary-words {
	align-self: center;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
	max-height: calc(4 * 1.35em);
	padding: 0;
	border: 0;
	background: none;
	color: var(--ink);
	font: inherit;
	font-size: 0.875rem;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
	.page .weather-summary-words:hover {
		color: var(--accent);
	}
}

@media (max-width: 47.99rem) {
	.page .weather-summary-words {
		display: none;
	}
}

/* Spec 234: a day without a forecast keeps the card's height. */
:where(.page) .weather-none {
	display: flex;
	align-items: center;
	height: calc(6rem + 1px);
	margin: 0;
}

/* Spec 235: a Journal entry in Einträge, in the accent. */
.area-journal {
	--c: var(--accent);
	--tint: var(--accent-quiet);
}

/* Spec 236: a rule's missed days, in the danger's ink. */
.task-missed {
	color: var(--danger-ink);
}

/* Spec 237: a day's Polar values on one line, the older days behind a link. */
.proposal-day-values {
	color: var(--ink);
	font-size: 0.9375rem;
}

:where(.page) .proposal-more {
	display: block;
	margin-top: var(--space-1);
}

/* Spec 238: the export's area and range, side by side above the text. */
.export-choose {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2) var(--space-4);
	margin-bottom: var(--space-2);
}

/* Spec 239: the bar fits a phone — «Abschluss» for «Tagesabschluss», the tabs closer. */
.tab-short {
	display: none;
}

@media (max-width: 30rem) {
	:where(#chrome) .tab {
		padding: 0 0.375rem;
		font-size: 0.8125rem;
	}

	.tab-long {
		display: none;
	}

	.tab-short {
		display: inline;
	}
}

/* Spec 239: the tiles' card, then the weather and the Kalender — with room between. */
.dash-day-board > .dash-board .dash-tiles {
	margin-bottom: var(--space-4);
}

/* Spec 240: a page head's further actions behind «Mehr». */
.more-menu {
	position: relative;
}

.more-menu > summary {
	list-style: none;
}

.more-menu > summary::-webkit-details-marker {
	display: none;
}

.more-menu > summary::after {
	content: '▾';
	margin-left: 0.375rem;
	font-size: 0.75rem;
	color: var(--ink-muted);
}

.more-items {
	position: absolute;
	right: 0;
	top: calc(100% + 0.375rem);
	z-index: 40;
	display: grid;
	min-width: 13rem;
	padding: 0.25rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface);
	box-shadow: 0 8px 24px rgb(0 0 0 / 0.12);
}

.page .more-item {
	display: block;
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 0;
	border-radius: 0.5rem;
	background: none;
	color: var(--ink);
	font: inherit;
	font-size: 0.9375rem;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}

.page .more-item:hover {
	background: var(--surface-sunken);
}

/* Spec 242: planning — «Was» and «Wann» side by side, the favourites as chips. */
.plan-columns {
	display: grid;
	gap: var(--space-3) var(--space-5);
}

@media (min-width: 48rem) {
	.plan-columns {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.plan-col {
	display: grid;
	gap: var(--space-2);
	align-content: start;
	min-width: 0;
}

:where(.page) .plan-col-head {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-muted);
}

.page .plan-favorites {
	margin: 0;
}

.page .chip.chip-on {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--on-accent);
}

:where(.page) .plan-col :is(input, select) {
	width: 100%;
	max-width: none;
}

/* Spec 243: a saved session's figures, large, above its fields. */
.sport-figures:empty {
	display: none;
}

.sport-figures {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2) var(--space-6);
	margin-bottom: var(--space-2);
	padding-bottom: var(--space-3);
	border-bottom: 1px solid var(--border);
}

.sport-figure {
	display: grid;
}

.sport-figure span {
	font-size: 0.8125rem;
	color: var(--ink-muted);
}

.sport-figure strong {
	font-size: 1.5rem;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
}

.sport-values > label {
	flex: 1 1 9rem;
	min-width: 0;
}

/* Spec 244: the Journal's timer named and smaller. */
.journal-clock-label {
	font-size: 0.8125rem;
	color: var(--ink-muted);
}

.page .journal-timer {
	font-size: 1.125rem;
}

/* Spec 244: «Ankommen» as two boxes. */
.wizard-reminders {
	display: grid;
	gap: var(--space-1);
}

/*
 * Spec 245, the second round of the review.
 */

/* A task row with buttons: on a phone the buttons go under the text, not beside it. */
@media (max-width: 40rem) {
	.list > li.task {
		flex-wrap: wrap;
		row-gap: var(--space-2);
	}

	.list > li.task > .list-link {
		flex: 1 1 calc(100% - 3rem);
	}

	.list > li.task > .list-link + .choice {
		margin-left: calc(1.75rem + var(--space-3));
	}
}

/* Polar's days: ✓ and ✕ as round buttons beside the day, on one line. */
.list > li.proposal-value {
	flex-wrap: nowrap;
	padding-bottom: 0;
}

.page .proposal-icon {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-pill);
	background: var(--surface);
	color: var(--ink-muted);
	font: inherit;
	font-size: 1rem;
	cursor: pointer;
}

.page .proposal-icon-take {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--on-accent);
}

.page .proposal-icon:disabled {
	opacity: 0.45;
}

.proposal-value .proposal-actions {
	gap: var(--space-2);
}

/* Polar folded under Einträge. */
.polar-fold > summary {
	cursor: pointer;
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--accent);
	min-height: var(--tap);
	display: flex;
	align-items: center;
}

/* The Dashboard's card: its tile names it — no second icon and name over it. */
.dash-board .dash-card-head .dash-icon,
.dash-board .dash-card-head h2 {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Its «+» beside the card's field (the tasks' quick field), or alone at the right. */
.page .dash-board .dash-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: var(--space-2);
	align-items: center;
}

.dash-board .dash-card > * {
	grid-column: 1 / -1;
}

.dash-board .dash-card > .dash-card-head {
	grid-column: 2;
	grid-row: 1;
}

.dash-board .dash-card > .dash-quick {
	grid-column: 1;
	grid-row: 1;
}

/* A session's start the whole width on a phone. */
.sport-form .row > label:has(input[type='datetime-local']) {
	flex: 1 1 15rem;
}

/* The Kalender's empty days on a phone: one slim line each. */
@media (max-width: 59.99rem) {
	.page .week-day:not(:has(.week-entry)) {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		min-height: 0;
		padding: var(--space-2) var(--space-3);
		text-align: left;
	}
}

/* The weather's sun times only where there is room. */
@media (max-width: 47.99rem) {
	.weather-sun {
		display: none;
	}
}

.dash-board .dash-card > .dash-empty {
	grid-column: 1;
	grid-row: 1;
	margin: 0;
}

/*
 * Spec 246, the review's third round.
 */

/* «Erfassen» on the Dashboard: the main button, its ways in under it. */
.page .capture-summary {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	min-height: var(--tap);
	padding: 0 1.125rem;
	border: 1px solid var(--accent);
	border-radius: var(--radius-pill);
	background: var(--accent);
	color: var(--on-accent);
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}

.page .capture-summary::-webkit-details-marker {
	display: none;
}

.capture-menu > summary::after {
	content: none;
}

.dash-head {
	align-items: flex-end;
}

.dash-nav {
	display: flex;
	align-items: center;
	gap: var(--space-2);
}

/* A tile with nothing yet: a word, quiet, where the figure stands. */
:where(.page) .dash-figure-empty {
	font-size: 1rem;
	color: var(--ink-muted);
	min-height: 2.25rem;
	display: flex;
	align-items: flex-end;
}

/* The bar's sections at the bottom of a phone, an icon over each word; the name and the
   account stay at the top. */
.tab-icon {
	display: none;
}

@media (max-width: 40rem) {
	:where(#chrome) .top .tabs {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 30;
		display: grid;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: 0;
		margin: 0;
		padding: 0 0 env(safe-area-inset-bottom, 0px);
		border-top: 1px solid var(--border);
		background: var(--bg);
		overflow: visible;
	}

	:where(#chrome) .top .tabs .tab {
		flex-direction: column;
		justify-content: center;
		gap: 0.125rem;
		min-height: 3.5rem;
		padding: 0.375rem 0.125rem;
		border: 0;
		font-size: 0.6875rem;
		text-align: center;
	}

	:where(#chrome) .top .tabs .tab-on {
		color: var(--accent);
		border: 0;
	}

	.tab-icon {
		display: grid;
		place-items: center;
	}

	body {
		padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
	}
}

/* Spec 247: the weather's days as small chips in its head — only the weather changes. */
.weather-chips {
	display: flex;
	gap: 0.25rem;
	margin-left: auto;
}

.page .weather-chip {
	min-width: 2rem;
	height: 1.75rem;
	padding: 0 0.5rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	background: var(--surface);
	color: var(--ink-muted);
	font: inherit;
	font-size: 0.8125rem;
	cursor: pointer;
}

.page .weather-chip[aria-pressed='true'] {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 600;
}

@media (max-width: 40rem) {
	.weather-word {
		display: none;
	}

	.weather-chips {
		gap: 0.125rem;
	}

	.page .weather-chip {
		min-width: 0;
		padding: 0 0.375rem;
		font-size: 0.75rem;
	}
}

/* ---------------------------------------------------------------- spec 248
   The review's fourth round. */

/* The Tagesabschluss's steps on a phone: the number and, small under it, its name. */
@media (max-width: 59.99rem) {
	.wizard-step {
		flex: 1 1 0;
		min-width: 0;
	}

	.wizard-step button {
		flex-direction: column;
		justify-content: center;
		gap: 0.125rem;
		padding: var(--space-1) 0;
		text-align: center;
	}

	.wizard-title {
		display: block;
		max-width: 100%;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		font-size: 0.6875rem;
		line-height: 1.2;
	}
}

/* Einträge: «So 11.10.» over its time, a narrow column — the values keep their line. */
.list-key.entries-when {
	flex-basis: 4.5rem;
}

/* «Sport eingeben»: the open plans older than a week, folded under the recent ones. */
.plans-older > summary {
	margin-top: var(--space-3);
	color: var(--ink-muted);
	font-size: 0.875rem;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.plans-older[open] > summary {
	margin-bottom: var(--space-2);
}

.list > li.proposal > .list-link + .proposal-icon {
	flex: 0 0 auto;
}

/* A plan «Nicht gemacht» stays in the week, pale and struck through. */
.page :is(.tblock, .week-entry).status-skipped {
	opacity: 0.55;
	text-decoration: line-through;
}

/* The weather on a phone: its own height (the Kalender's is only beside it at a desk),
   and day chips big enough for a thumb. */
@media (max-width: 40rem) {
	.page .weather-summary {
		height: auto;
		padding-block: var(--space-2);
	}

	.page .weather-chip {
		height: 2.25rem;
		min-width: 2rem;
	}
}

/* A narrow phone (360 px): «21° / 7°» keeps its line; the sail's lines may wrap. */
@media (max-width: 24rem) {
	.page .weather-summary {
		gap: var(--space-2);
	}

	.weather-summary-icon {
		width: 2.75rem;
		height: 2.75rem;
	}

	.weather-summary-degrees {
		white-space: nowrap;
	}

	.page .weather-summary-sail {
		min-width: 0;
		padding-inline: var(--space-2);
	}

	.wizard-steps {
		gap: 0;
	}

	.wizard-title {
		font-size: 0.625rem;
	}
}

.nowrap {
	white-space: nowrap;
}

/* ---------------------------------------------------------------- spec 249
   The review's fifth round. */

/* On a phone «Erfassen» is a round «+» over the bar, at the thumb; its menu opens
   upwards. The day and its ‹ › keep the head's one row. */
@media (max-width: 40rem) {
	.page .capture-menu {
		position: fixed;
		right: var(--space-4);
		bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
		z-index: 35;
	}

	.page .capture-summary {
		justify-content: center;
		width: 3.5rem;
		height: 3.5rem;
		padding: 0;
		border-radius: 999px;
		box-shadow: 0 6px 18px rgb(0 0 0 / 0.22);
	}

	.page .capture-summary svg {
		width: 1.5rem;
		height: 1.5rem;
	}

	.capture-word {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.capture-menu > .more-items {
		top: auto;
		bottom: calc(100% + 0.5rem);
	}

	.page .dash-steps .dash-step {
		width: 2.25rem;
		height: 2.25rem;
	}

	.page .dash-steps .dash-today {
		min-height: 2.25rem;
		padding: 0 var(--space-3);
	}
}

/* «Nährwerte», «Weitere Werte», «ältere Tage»: a chevron says they open — without it
   «Nährwerte» read as an empty heading (a flex summary loses the platform's triangle). */
:is(.food-macros, .plans-older) > summary {
	list-style: none;
}

:is(.food-macros, .plans-older) > summary::-webkit-details-marker {
	display: none;
}

:is(.food-macros, .plans-older) > summary::before {
	content: '';
	flex: 0 0 auto;
	display: inline-block;
	width: 0.4rem;
	height: 0.4rem;
	margin-right: 0.25rem;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(-45deg);
	transition: transform 0.15s ease;
	align-self: center;
}

:is(.food-macros, .plans-older)[open] > summary::before {
	transform: rotate(45deg);
}

.plans-older > summary {
	display: flex;
	align-items: center;
}

/* The pages of Admin and Hilfe on a phone: one row that scrolls sideways, never two. */
@media (max-width: 40rem) {
	.subnav {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		margin-inline: calc(var(--space-4) * -1);
		padding-inline: var(--space-4);
	}

	.subnav::-webkit-scrollbar {
		display: none;
	}

	.subnav a {
		flex: 0 0 auto;
	}
}

/* Room under the Dashboard's last card, so the round «+» covers nothing at its end. */
@media (max-width: 40rem) {
	body:has(.capture-menu) {
		padding-bottom: calc(8.5rem + env(safe-area-inset-bottom, 0px));
	}
}

/* ---------------------------------------------------------------- spec 250
   The Tagesabschluss: «Woche» on a Sunday, and on a phone a step without scrolling up. */

.week-review .sport-figures {
	margin-bottom: var(--space-3);
}

.week-table td,
.week-table th {
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.week-table tr.week-today td {
	font-weight: 600;
}

/* On a phone «Zurück» and «Weiter» stand at the bottom, over the bar — the thumb reaches
   them wherever the step was read to; the head keeps the step's name. */
@media (max-width: 40rem) {
	.page .wizard-head .wizard-nav {
		position: fixed;
		left: 0;
		right: 0;
		bottom: calc(3.5rem + 1px + env(safe-area-inset-bottom, 0px));
		z-index: 34;
		display: flex;
		gap: var(--space-2);
		margin: 0;
		padding: var(--space-2) var(--space-4);
		border-top: 1px solid var(--border);
		background: var(--bg);
	}

	.page .wizard-head .wizard-nav > * {
		flex: 1 1 0;
		margin: 0;
	}

	body:has(.wizard-nav) {
		padding-bottom: calc(8rem + env(safe-area-inset-bottom, 0px));
	}

	/* The rail a little lower, the Journal's text a little shorter: more of a step in sight. */
	.page .wizard-rail {
		padding-block: var(--space-2);
	}

	.page .journal-write textarea#journal-text {
		height: 12rem;
	}
}

/* ---------------------------------------------------------------- spec 251 */

/* An empty Kalender day on a phone: its line «Nichts geplant · Planen», no empty track. */
@media (max-width: 47.99rem) {
	.dash-band-empty :is(.dash-band-line, .dash-band-hours) {
		display: none;
	}
}

/* ---------------------------------------------------------------- spec 252
   The curves: small under «Gemessen», large on a Messart's page. One colour for the
   values (Körper's), a quiet second line for Dia; nothing coloured for good or bad. */

.trends {
	margin-top: var(--space-3);
}

.trends:empty {
	display: none;
}

:where(.page) .trends-head {
	margin: 0 0 var(--space-1);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ink-muted);
}

.trends-rows {
	margin: 0;
	padding: 0;
	list-style: none;
}

.trends-rows li + li {
	border-top: 1px solid var(--border);
}

.trend-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(4.5rem, auto);
	align-items: center;
	gap: var(--space-3);
	min-height: var(--tap);
	color: var(--ink);
	text-decoration: none;
}

.trend-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.trend-last {
	text-align: right;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.trend-unit {
	font-weight: 400;
	font-size: 0.8125rem;
	color: var(--ink-muted);
}

@media (hover: hover) and (pointer: fine) {
	.trend-row:hover .trend-name {
		text-decoration: underline;
	}
}

.curve-line {
	fill: none;
	stroke: var(--area-body);
	stroke-width: 2;
	stroke-linejoin: round;
	stroke-linecap: round;
}

.curve-line-second {
	stroke: var(--ink-muted);
}

.curve-dot {
	fill: var(--area-body);
	stroke: var(--surface);
	stroke-width: 1.5;
}

.curve-dot-second {
	fill: var(--ink-muted);
}

.curve {
	display: block;
	width: 100%;
	height: auto;
	touch-action: pan-y;
}

.curve-grid {
	stroke: var(--border);
	stroke-width: 1;
}

.curve-tick {
	fill: var(--ink-muted);
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

.curve-marker {
	stroke: var(--ink-muted);
	stroke-width: 1;
	stroke-dasharray: 3 3;
}

:where(.page) .curve-readout {
	margin: var(--space-3) 0 0;
	min-height: 1.4em;
	font-size: 0.875rem;
	font-variant-numeric: tabular-nums;
	color: var(--ink);
}

:where(.page) .curve-legend {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	margin: var(--space-2) 0 0;
	font-size: 0.8125rem;
	color: var(--ink-muted);
}

.curve-key {
	display: inline-block;
	width: 1rem;
	height: 2px;
	background: var(--area-body);
}

.curve-key-second {
	margin-left: var(--space-3);
	background: var(--ink-muted);
}

.curve-value .row-body {
	font-variant-numeric: tabular-nums;
}
