/*
 * The station, line, connection and stop-timetable pages' own styles
 * (docs/station-pages.md, *The stylesheet in a file of its own*).
 *
 * Until 2026-11-25 these 123 KB stood inside every one of those pages, in
 * a <style> block of docker/station.html: half the bytes of Sargans, and
 * thirty-nine fortieths of a stop timetable's, fetched again with every
 * page by every reader and every crawler. They are the same for every page
 * and every language, so they are one file now.
 *
 * The planner's service serves it, not nginx: the file is compiled into the
 * service beside the template that links it, under an address that carries
 * its hash (/station.css?v=...), so a page and its styles are always of one
 * build and the copy in a browser can be kept for a year. nginx holds the
 * same file for the minutes the service is away.
 *
 * Loaded after /site.css (the palette) and before /sitenav.css (the strip),
 * where the block stood.
 */
/* The width the boards take (see .board-view below): the column's
   own until a screen is wide enough for them to outgrow it. Set
   here and not only for the wide screens, because a value that
   exists only under a condition is not one (scripts/check-site-css.py). */
:root {
	--wide: 100%;
}

.page {
	--measure: 880px;
	padding: 26px clamp(18px, 4vw, 48px) 56px;
}

.kicker {
	margin: 0 0 6px;
	color: var(--muted);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

h1 {
	margin: 0 0 4px;
	font-size: clamp(2rem, 6vw, 3.1rem);
	line-height: 1.05;
	letter-spacing: -0.03em;
	text-wrap: balance;
}

/* A connection's heading names both stations, and each leads to its
   page: a link, drawn as the heading it is. */
h1 a {
	color: inherit;
	text-decoration: none;
}

h1 a:hover {
	text-decoration: underline;
	text-decoration-thickness: 3px;
	text-underline-offset: 6px;
}

.subtitle {
	margin: 0 0 18px;
	color: var(--ink-soft);
	font-size: 1.15rem;
	font-weight: 600;
}

.lede {
	margin: 0 0 22px;
	max-width: 62ch;
	color: var(--muted);
	font-size: 1.02rem;
	line-height: 1.6;
}

.doors {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 34px;
}

section {
	margin: 0 0 34px;
}

/* The day's count in the first sentence, in the ink of the words
   around it rather than their grey (page.rs, `COUNT_MARK`). */
.lede strong {
	color: var(--ink);
	font-weight: 700;
}

/* From here and to here, side by side and equally wide where the
   column has room for both, one over the other on a phone too
   narrow for two (page.rs, `station_page`). The pills keep their
   round ends on one line and soften to a card where a long name
   wraps. */
.doors.two {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.doors.two .pill {
	flex-direction: column;
	gap: 1px;
	min-width: 0;
	padding: 9px 20px;
	border-radius: 18px;
	line-height: 1.25;
	text-align: center;
	white-space: normal;
}

.doors .door-way {
	color: var(--muted);
	font-size: 0.82rem;
	font-weight: 600;
}

/* Which door is which before a word is read (page.rs,
   `DOOR_FROM_MARK`): the planner's thread in small, a coral dot
   with an arrow leaving it for from, an arrow into a blue ring for
   to, each on a disc of its own colour. With the mark the words
   line up beside it rather than centred under nothing. */
.door {
	--door: var(--coral-ink);
	--door-soft: var(--coral-soft);
}

.door-to {
	--door: #1f4ea1;
	--door-soft: #dde6f5;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .door-to {
		--door: #8fb1ec;
		--door-soft: #1c2a42;
	}
}

:root[data-theme="dark"] .door-to {
	--door: #8fb1ec;
	--door-soft: #1c2a42;
}

.doors.two .pill.door {
	flex-direction: row;
	justify-content: flex-start;
	gap: 12px;
	padding: 9px 18px 9px 10px;
	text-align: left;
}

.door-mark {
	display: grid;
	flex: none;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--door-soft);
	color: var(--door);
}

.door-text {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}

.pill.door:hover {
	border-color: var(--door);
}

.pill.door:hover .door-mark svg {
	transform: translateX(2px);
}

.door-mark svg {
	transition: transform 0.15s ease;
}

@media (prefers-reduced-motion: reduce) {
	.door-mark svg {
		transition: none;
	}
}

/* A station page's head (page.rs, `station_page`; docs/station-
   pages.md, *The head, and the width*): on a phone one column, the
   small blue board under the doors; on a wide screen the board
   beside the sentence and the doors, where it is found before the
   page is scrolled. */
.station-head .doors {
	margin-bottom: 22px;
}

@media (min-width: 1000px) {
	.station-head:has(> .glance) {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(22rem, 32rem);
		column-gap: clamp(28px, 3.5vw, 56px);
		align-items: start;
		margin-bottom: 8px;
	}

	.station-head > .glance {
		margin-top: 4px;
	}

	.station-head .glance-board {
		max-width: none;
	}
}

h2 {
	margin: 0 0 6px;
	font-size: 1.3rem;
	letter-spacing: -0.01em;
}

/* What is on the page, under the doors (page.rs, `station_page`): a
   chip per section with how many it holds, each an anchor. Quieter
   than the doors, which are what to do; these are where to look. */
.doors:has(+ .jump) {
	margin-bottom: 16px;
}

.jump {
	margin: 0 0 34px;
}

.jump ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.jump a {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	padding: 5px 12px;
	border: 1px solid var(--outline);
	border-radius: 999px;
	background: var(--paper-low);
	color: var(--ink-soft);
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none;
}

.jump a:hover,
.jump a:focus-visible {
	border-color: var(--coral-ink);
	color: var(--coral-ink);
}

.jump .count {
	color: var(--muted);
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}

/* A jump lands the heading below the sticky strip, not under it. */
h2,
tr#next,
section#home {
	scroll-margin-top: 84px;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* A connection's day (page.rs, `connection_page`): the trips that
   have left are quieter, the next is marked and linked from over the
   table. Every row stays, for the whole day's timetable. */
.next-trip {
	margin: 4px 0 12px;
}

.next-trip a {
	color: var(--coral-ink);
	font-weight: 700;
	text-decoration: none;
}

.next-trip a::after {
	content: " ↓";
}

.next-trip a:hover {
	text-decoration: underline;
}

tr.past td {
	color: var(--muted);
}

tr.past td a {
	color: color-mix(in srgb, var(--coral-ink) 60%, var(--muted));
}

tr.past .plate {
	opacity: 0.6;
}

tr.next td {
	background: var(--coral-soft);
	font-weight: 600;
}

/* A board's row from the next service day (page.rs, `board_table`). */
td.time .day {
	display: block;
	color: var(--muted);
	font-size: 0.74rem;
}

.tag {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 7px;
	border-radius: 999px;
	background: var(--coral-fill);
	color: var(--coral-on);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	vertical-align: 1px;
}

.section-lede,
.note {
	margin: 0 0 12px;
	color: var(--muted);
	font-size: 0.88rem;
	line-height: 1.5;
}

.note {
	margin: 10px 0 0;
}

/* Tables that a narrow screen scrolls sideways inside their own box,
   never the page. */
.table-wrap {
	overflow-x: auto;
	border: 1px solid var(--outline);
	border-radius: var(--radius);
	background: var(--paper-low);
}

/* A connection's day in a box of its own height (page.rs,
   `connection_page`; docs/station-pages.md, *The next trip in
   view*): every trip of the day is in the page, 255 for a Basel
   tram, and /station-trips.js opens the box at the next one with
   the heads of the columns held over it. On a phone the box leaves
   a third of the screen to scroll the page by, so a thumb that
   lands on the list is never trapped in it; at either end of the
   list the page scrolls on. */
.day-scroll {
	position: relative;
	max-height: min(30rem, 62vh);
	max-height: min(30rem, 62svh);
	overflow: auto;
}

/* `position` above is not decoration: each row's hidden words for a
   screen reader are placed absolutely, and with no positioned box
   between them and the page they escaped the box's clipping and
   stretched the page to the table's full ten thousand pixels, blank
   below the footer. */

.day-scroll thead th {
	position: sticky;
	top: 0;
	z-index: 1;
	background: var(--paper-low);
	box-shadow: inset 0 -1px 0 var(--outline-soft);
}

.day-scroll tr#next {
	scroll-margin-top: 4.5rem;
}

/* On a phone the day comes straight after the two doors, before
   the question and its answer, so the next trips are on the first
   screen and not under it. Only the drawing order: the document
   keeps the question where the search engines read it
   (docs/search-clicks.md, A4), and a screen reader hears it first,
   which is the order a sentence and then its table make sense in. */
@media (max-width: 999px) {
	.pair {
		display: flex;
		flex-direction: column;
	}

	.pair > * {
		order: 2;
	}

	.pair > .subtitle,
	.pair > .lede,
	.pair > .doors {
		order: 0;
	}

	.pair > .trips {
		order: 1;
	}
}

/* And on a wide screen the day stands beside the page rather than
   under it: the trips on the right, held in view down to the
   screen's foot while the answer, the stations and the hand-offs
   scroll by on the left. Twelve rows of `auto` take the left
   column's sections whatever their number, the last row takes the
   rest, and the trips span them all. */
@media (min-width: 1000px) {
	.page:has(.pair) {
		--measure: 1320px;
	}

	.pair {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
		grid-template-rows: repeat(12, auto) 1fr;
		column-gap: clamp(28px, 3vw, 48px);
	}

	.pair > * {
		grid-column: 1;
	}

	.pair > .trips {
		grid-column: 2;
		grid-row: 1 / -1;
		align-self: start;
		position: sticky;
		top: calc(var(--sitenav-h, 50px) + 16px);
		margin: 0;
	}

	.pair .day-scroll {
		max-height: max(22rem, calc(100vh - 11rem));
	}
}

@media (min-width: 1900px) {
	.page:has(.pair) {
		--measure: 1560px;
	}
}

/* A line's page on a wide screen: the diagram on the left, and the
   next departures and the day's times on the right, held in view
   while the stops scroll by. The side scrolls on its own where it
   is taller than the screen, so its foot is never out of reach. */
@media (min-width: 1000px) {
	.page:has(.line-split) {
		--measure: 1320px;
	}

	.line-split {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		column-gap: clamp(28px, 3vw, 48px);
		align-items: start;
	}

	.line-split > .line-map {
		grid-column: 1;
		grid-row: 1;
	}

	.line-split > .line-side {
		grid-column: 2;
		grid-row: 1;
		position: sticky;
		top: calc(var(--sitenav-h, 50px) + 16px);
		max-height: calc(100vh - var(--sitenav-h, 50px) - 32px);
		overflow-y: auto;
		scrollbar-width: thin;
	}

	.line-split > .line-side > section:first-child {
		margin-top: 0;
	}
}

/* A station page takes the width a wide screen has, as a
   connection's does, rather than 880 px between two empty margins
   (owner, 2026-11-04). What is read as prose keeps its measure —
   the sentences under each heading stop at 75 characters — and the
   lists that run long go two abreast, read down the first column
   and then the second; the connections' cards and the boards were
   already laid out to fill what they are given. */
@media (min-width: 1000px) {
	.page:has(.station-head) {
		--measure: 1320px;
	}

	.page:has(.station-head) .section-lede,
	.page:has(.station-head) .note {
		max-width: 75ch;
	}

	.page:has(.station-head) .lines ul,
	.page:has(.station-head) ul.sheets {
		columns: 2;
		column-gap: clamp(28px, 3.5vw, 56px);
	}

	.page:has(.station-head) .lines li,
	.page:has(.station-head) ul.sheets li {
		break-inside: avoid;
	}

	/* A rule under each sheet rather than over it, so the second
	   column does not open on a line the first does not. */
	.page:has(.station-head) ul.sheets li {
		border-top: 0;
		border-bottom: 1px solid var(--outline);
	}

	.page:has(.station-head) .change-lines {
		grid-template-columns: repeat(auto-fill, minmax(min(100%, 36rem), 1fr));
		align-items: start;
	}
}

@media (min-width: 1900px) {
	.page:has(.station-head) {
		--measure: 1560px;
	}
}

/* A line on a large screen — a 4K monitor at its own size — keeps
   both columns wide enough to read without the page shrinking to a
   strip in the middle of it; past 2600 px the diagram's rows and
   the side's times grow a step so they are read from a chair's
   distance, not leaned into. */
@media (min-width: 1900px) {
	.page:has(.line-split) {
		--measure: 1560px;
	}
}

@media (min-width: 2600px) {
	.page:has(.line-split) {
		--measure: 1960px;
	}

	/* The page's sizes are in rem, so the step is the root's. */
	:root:has(.line-split) {
		font-size: 115%;
	}
}

@media print {
	.day-scroll {
		max-height: none;
		overflow: visible;
	}
}

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

th,
td {
	padding: 9px 12px;
	border-bottom: 1px solid var(--outline-soft);
	text-align: left;
	vertical-align: baseline;
}

tr:last-child td {
	border-bottom: 0;
}

th {
	color: var(--muted);
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

td.time,
td.num {
	white-space: nowrap;
}

td.num,
th.num {
	text-align: right;
}

.plate {
	display: inline-block;
	min-width: 2.4em;
	padding: 1px 7px;
	border-radius: 5px;
	background: var(--paper-high);
	color: var(--ink);
	font-size: 0.84rem;
	font-weight: 700;
	text-align: center;
	white-space: nowrap;
}

.plate + .plate,
.plate + a.plate-link,
a.plate-link + .plate,
a.plate-link + a.plate-link {
	margin-left: 4px;
}

/* A line in its own colour (a Zurich tram, a replacement bus): the
   ground and numeral come with it, and the theme's outline keeps the
   plate's edge where the page would swallow it — a pale 12 or 13 on
   the light page, tram 7's black on the dark one. */
.plate.own {
	box-shadow: inset 0 0 0 1px var(--outline);
}

/* A plate that opens its line's sheet to print: the plate as it
   is, ringed in ink under the pointer and the keyboard's focus. */
a.plate-link {
	display: inline-block;
	border-radius: 5px;
	text-decoration: none;
}

a.plate-link:hover,
a.plate-link:focus-visible {
	text-decoration: none;
	outline: none;
}

/* A plate that opens its line stands on a keycap's edge, so it
   reads as pressable on a phone, where nothing hovers: «S23» at
   Olten looked like every other grey tag and went nowhere
   (2026-11-16). A plate that is only a picture stays flat. */
a.plate-link .plate {
	box-shadow: 0 1.5px 0 var(--outline);
}

a.plate-link .plate.own {
	box-shadow: inset 0 0 0 1px var(--outline), 0 1.5px 0 var(--outline);
}

a.plate-link:active .plate {
	transform: translateY(1px);
	box-shadow: none;
}

a.plate-link:hover .plate,
a.plate-link:focus-visible .plate {
	box-shadow: inset 0 0 0 1px var(--outline), 0 0 0 2px var(--ink);
}

/* The line's door inside a folded planned change, whose plate is the
   summary that opens it and so cannot be a link of its own. */
.change-line .line-door {
	margin: 6px 0 2px;
}

.change-line .line-door a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 650;
}

.lines a.plate-link {
	justify-self: start;
}

/* A ride's line in its page's heading: the board's plate, grown to
   the heading's size rather than the table's. */
h1 .plate {
	min-width: 0;
	padding: 0.04em 0.28em;
	border-radius: 0.16em;
	font-size: 0.86em;
	vertical-align: 0.04em;
}

/* A pill here carries a station's name, and site.css keeps a pill on
   one line: "Verbindungen nach Luzern Gütsch (Talstation)" ran 48 px
   past a phone's edge and the page scrolled sideways (2026-10-28). */
main .pill {
	max-width: 100%;
	padding: 8px 20px;
	white-space: normal;
	text-align: center;
}

/* The switch over the next departures (page.rs, `board_section`):
   the list, or a board per kind of transport. A checkbox drawn as
   the switch it is, so on and off read before the words do, and
   the stylesheet alone swaps the views, so it works with scripts
   off. */
.board-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 16px;
	margin: 0 0 8px;
}

.board-head h2 {
	margin: 0;
}

.view-switch {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--ink-soft);
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
}

.view-switch input {
	appearance: none;
	position: relative;
	flex: none;
	width: 40px;
	height: 24px;
	margin: 0;
	border-radius: 12px;
	background: var(--outline);
	box-shadow: inset 0 0 0 1px var(--outline-soft);
	cursor: pointer;
	transition: background-color 120ms ease;
}

.view-switch input::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgb(0 0 0 / 0.3);
	transition: transform 120ms ease;
}

.view-switch input:checked {
	background: var(--coral-fill);
}

.view-switch input:checked::before {
	transform: translateX(16px);
}

.view-switch input:focus-visible {
	outline: 2px solid var(--coral-ink);
	outline-offset: 2px;
}

.board-kinds,
.board-view:has(#by-kind:checked) .board-list {
	display: none;
}

.board-view:has(#by-kind:checked) .board-kinds {
	display: grid;
}

/* A board per kind, two abreast where the page has the width, each
   framed in the colour its line plates wear in the apps (the
   planner's --m-* palette), so the boat's board is found by its
   blue before its name is read. */
.board-kinds {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
	gap: 16px;
	align-items: start;
}

/* The boards take the width the bar over the page has, not the
   880 px the words read in: at that measure they stood two abreast,
   380 px each, every one scrolling sideways in its own little box
   beside a screen's worth of empty dark (owner on Zürich, Central,
   2026-10-30). Edge to edge with the bar's content above, three
   abreast at 1320 px and four on a screen past 1900. The list
   stays at the measure: four columns across 1320 px is a row the
   eye loses. */
@media (min-width: 1000px) {
	.board-view {
		--wide: calc(min(100vw, 1320px) - 2 * clamp(16px, 4vw, 48px));
		width: var(--wide);
		margin-inline: calc((100% - var(--wide)) / 2);
	}

	.board-view .board-list {
		max-width: calc(880px - 2 * clamp(18px, 4vw, 48px));
	}
}

@media (min-width: 1900px) {
	.board-view {
		--wide: calc(1560px - 2 * 48px);
	}
}

/* And each board fits whatever width it is given, rather than
   scrolling: a board narrower than its widest row — on a phone, or
   two abreast on a tablet — sets its cells tighter and shortens the
   platform's head, and the narrowest steps the type down. The box
   still scrolls if all of that is not enough, so no row is ever
   cut. */
.kind-board .table-wrap {
	container-type: inline-size;
}

/* The time, the plate and the platform as narrow as what they
   hold, and every pixel left to the direction: left to the table,
   a 33 under PLATFORM kept 70 px while "Romanshorn" broke in two
   beside it. */
.kind-board td:not(:nth-child(3)),
.kind-board th:not(:nth-child(3)) {
	width: 1%;
}

.kind-board td:not(:nth-child(3)) {
	white-space: nowrap;
}

.kind-board td:nth-child(3) {
	overflow-wrap: anywhere;
	hyphens: auto;
}

th .short {
	display: none;
}

/* A board narrower than 26rem — on a phone, two abreast on a
   tablet, three on a laptop — sets its cells tighter and heads the
   platform the way the boards on the platforms do: Pl., Gl., Voie,
   Bin. */
@container (max-width: 26rem) {
	.kind-board th,
	.kind-board td {
		padding: 7px 6px;
	}

	.kind-board th:first-child,
	.kind-board td:first-child {
		padding-left: 10px;
	}

	.kind-board th:last-child,
	.kind-board td:last-child {
		padding-right: 10px;
	}

	.kind-board th {
		font-size: 0.68rem;
		letter-spacing: 0.02em;
	}

	.kind-board th .long {
		display: none;
	}

	.kind-board th .short {
		display: inline;
	}
}

/* The narrowest, a 320 px phone, steps the type down, and a
   train's plate with its number breaks at its space — "IRLEX"
   over "2966" — rather than take Luzern's directions' room. */
@container (max-width: 21rem) {
	.kind-board table {
		font-size: 0.82rem;
	}

	.kind-board td .plate {
		padding-inline: 4px;
		font-size: 0.76rem;
		white-space: normal;
	}

	.kind-board td:nth-child(2) {
		white-space: normal;
	}
}

.kind-board {
	--kind: #eb0000;
	--plate: #fff;
	min-width: 0;
	margin: 0;
}

.kind-board h3 {
	margin: 0;
	padding: 7px 12px;
	border-radius: var(--radius) var(--radius) 0 0;
	background: var(--kind);
	color: var(--kind-on, #fff);
	font-size: 0.95rem;
}

/* The drawing of the board's vehicle (page.rs, `board_drawing`), at
   the heading's far end so the words never wait for it. On a plate
   of its own in the page's paper: a red InterCity on the long-distance
   red, or the yellow coach on the bus board's yellow, would vanish
   into it — and a white plate in the dark was a lit window on every
   board (owner, 2026-10-28), so the plate is dark there. */
.kind-board h3:has(img) {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-block: 5px;
}

.kind-board h3 img {
	flex: none;
	height: 30px;
	width: auto;
	max-width: 45%;
	object-fit: contain;
	padding: 2px 8px;
	border-radius: 8px;
	background: var(--plate);
}

/* The coaches' canvas is 709 px with the coach in the middle 400:
   cover at this width crops the empty ends, not the coach. */
.kind-board h3 img.coach {
	width: 116px;
	object-fit: cover;
}

.kind-board .table-wrap {
	border: 2px solid var(--kind);
	border-top: 0;
	border-radius: 0 0 var(--radius) var(--radius);
}

.kind-board th,
.kind-board td {
	padding: 8px 10px;
}

.kind-longDistance { --kind: #8e0000; }
.kind-regional { --kind: #eb0000; }
.kind-tram { --kind: #0074b7; }
.kind-bus { --kind: #b98a00; --kind-on: #000; }
.kind-boat { --kind: #283593; }
.kind-mountain { --kind: #2e7d32; }

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .kind-longDistance { --kind: #c62828; }
	:root:not([data-theme="light"]) .kind-regional { --kind: #ff6259; --kind-on: #000; }
	:root:not([data-theme="light"]) .kind-tram { --kind: #4fc3f7; --kind-on: #000; }
	:root:not([data-theme="light"]) .kind-bus { --kind: #ffcc00; --kind-on: #000; }
	:root:not([data-theme="light"]) .kind-boat { --kind: #7986cb; --kind-on: #000; }
	:root:not([data-theme="light"]) .kind-mountain { --kind: #66bb6a; --kind-on: #000; }
	:root:not([data-theme="light"]) .kind-board { --plate: #0d1014; }
}

:root[data-theme="dark"] .kind-longDistance { --kind: #c62828; }
:root[data-theme="dark"] .kind-regional { --kind: #ff6259; --kind-on: #000; }
:root[data-theme="dark"] .kind-tram { --kind: #4fc3f7; --kind-on: #000; }
:root[data-theme="dark"] .kind-bus { --kind: #ffcc00; --kind-on: #000; }
:root[data-theme="dark"] .kind-boat { --kind: #7986cb; --kind-on: #000; }
:root[data-theme="dark"] .kind-mountain { --kind: #66bb6a; --kind-on: #000; }
:root[data-theme="dark"] .kind-board { --plate: #0d1014; }

/* «from Zug, Bahnhofsteg (See)»: which of the stops around the
   station a row on a board by kind leaves from. */
td .from {
	display: block;
	color: var(--muted);
	font-size: 0.82rem;
}

td .from a {
	color: inherit;
}

/* The small station clock after a place's name (page.rs, `go`): the
   one way from a timetable to the place's own page, now that the
   names there open the trip. Quieter than the name, a finger's
   24 px to press, and taking no height from the row.

   It never starts a line of its own. A browser may break before
   any drawn element, and no white-space rule stops it, so the
   room is kept as padding at the end of the name, which belongs
   to its last word, and the arrow is laid over it with a margin
   that takes back its own width: it has none to wrap for. */
.named > :first-child {
	padding-right: 24px;
}

a.go {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin: -6px 0 -6px -24px;
	vertical-align: middle;
	border-radius: 6px;
	color: var(--muted);
}

a.go svg {
	width: 13px;
	height: 13px;
}

a.go:hover {
	color: var(--coral-ink);
	background: var(--paper-high);
}

/* The trip from this station to the stop picked on a ride's list
   (page.rs, `ride_page`): the page's answer, drawn as the planner
   draws a leg of a connection (web/plan's .jcard and .leg), so a
   rider who knows the app knows this. The times and the length at
   the head; then the mode's glyph over a rail down the left, in
   the colour the boards give its kind of transport, and beside it
   the line, where it leaves, the vehicle, where it arrives. */
.trip {
	margin: 4px 0 28px;
	padding: 14px 16px 16px;
	border: 1px solid var(--outline);
	border-radius: var(--radius);
	background: var(--paper-low);
	box-shadow: 0 6px 22px rgb(0 0 0 / 0.08);
}

.trip-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 4px 16px;
	margin: 0 0 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--outline-soft);
}

.trip-times {
	display: inline-flex;
	align-items: baseline;
	gap: 10px;
	font-size: 1.6rem;
	font-weight: 800;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.trip-arrow {
	color: var(--coral-ink);
}

.trip-meta {
	margin-left: auto;
	text-align: right;
	line-height: 1.2;
}

.trip-meta b {
	font-size: 1.05rem;
	font-variant-numeric: tabular-nums;
}

.trip-changes {
	display: block;
	color: var(--muted);
	font-size: 0.8rem;
	font-weight: 700;
}

/* The leg: the rail's column and the words, as the planner lays
   them out. The glyph stands at the top of the rail, level with the
   line it is the picture of; the rail runs from under it to the
   arrival, one straight line at half strength. */
.leg {
	display: grid;
	grid-template-columns: 26px minmax(0, 1fr);
	column-gap: 12px;
	padding: 2px 0;
}

.leg-rail {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding-top: 2px;
	color: var(--kind);
}

.leg-rail svg {
	position: relative;
	z-index: 1;
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.leg-rail::before {
	content: "";
	position: absolute;
	top: 28px;
	bottom: 0.45em;
	left: 50%;
	transform: translateX(-50%);
	width: 3px;
	border-radius: 2px;
	background: var(--kind);
	opacity: 0.5;
}

.leg-body {
	min-width: 0;
}

.leg-body p {
	margin: 0;
}

.leg-title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
	font-weight: 700;
}

/* Where the vehicle carries on to is a qualifier, not the
   destination: quieter than the stops under it. */
.leg-title .headsign {
	color: var(--muted);
	font-weight: 500;
}

.leg-stop {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px;
	margin-top: 5px !important;
	font-size: 1.02rem;
}

.leg-stop .t {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.leg-stop .s {
	font-weight: 600;
}

.leg-stop .pl {
	margin-left: auto;
	color: var(--muted);
	font-size: 0.84rem;
	font-weight: 700;
	white-space: nowrap;
}

/* The vehicle on the page itself, as the planner draws it under a
   leg: the drawings are cut out, so the dark page needs no plate
   under a bus. The coaches' canvas is cropped as over the boards. */
.leg-vehicle {
	display: block;
	height: 30px;
	width: auto;
	margin: 7px 0 3px;
}

.leg-vehicle.coach {
	width: 116px;
	object-fit: cover;
}

/* A ride's page under its lede: the vehicle drawn and what it is,
   with who runs it — a bus is a city's, PostAuto's or the RBS's,
   and its plate says none of it (2026-11-09). */
.ride-vehicle {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 8px 0 14px !important;
	color: var(--muted);
	font-size: 0.95rem;
	font-weight: 600;
}

.ride-vehicle img {
	display: block;
	height: 30px;
	width: auto;
}

.ride-vehicle img.coach {
	width: 116px;
	object-fit: cover;
}

/* The pills to the whole line and to the line's stop timetable
   carry the line's plate, as the board's row does. */
.sheet-pill .plate,
.line-pill .plate {
	margin-right: 2px;
	vertical-align: 0.05em;
}

.leg-between {
	margin: 2px 0 6px !important;
	color: var(--muted);
	font-size: 0.86rem;
}

/* The stops on the way, folded into the line that counts them and
   opened in place, as the planner's "Show 3 stops" does: the card is
   the picture of the trip. The chevron says it opens before anybody
   has to try; the times and names are the ends' own, a size down. */
details.leg-between summary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 32px;
	cursor: pointer;
	list-style: none;
	color: var(--coral-ink);
	font-weight: 600;
}

details.leg-between summary::-webkit-details-marker {
	display: none;
}

details.leg-between summary::after {
	content: "";
	width: 6px;
	height: 6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.15s;
}

details.leg-between[open] summary::after {
	transform: translateY(1px) rotate(-135deg);
}

.leg-calls {
	margin: 2px 0 4px;
	padding: 0;
	list-style: none;
}

.leg-calls .leg-stop {
	margin-top: 3px !important;
	color: var(--ink);
	font-size: 0.92rem;
}

.leg-calls .leg-stop .t,
.leg-calls .leg-stop .s {
	font-weight: 500;
}

.trip .doors {
	margin: 14px 0 0;
}

/* A ride's stops: those it made before it came here are where it
   came from, quieter; this station is the row the reader is on. */
.stops tr.before td {
	color: var(--muted);
}

.stops tr.before td a {
	color: inherit;
}

.stops tr.here td {
	background: var(--paper-high);
	font-weight: 700;
}

/* On a trip picked: its stops are marked down the left, the stop
   to get off at is the second bold row, and those past it are
   quieter, as the ones before this station are. */
.stops tr.on-trip td:first-child,
.stops tr.dest td:first-child {
	box-shadow: inset 3px 0 0 var(--coral);
}

.stops tr.dest td {
	background: var(--paper-high);
	font-weight: 700;
}

.stops tr.beyond td {
	color: var(--muted);
}

.stops .hint {
	color: var(--muted);
	font-size: 0.86rem;
	font-weight: 400;
}

.notes {
	margin: 0;
	padding-left: 1.2em;
}

td a,
.lines a,
.nearby a,
.letters a {
	color: var(--coral-ink);
	text-decoration: none;
}

td a:hover,
.lines a:hover,
.nearby a:hover,
.letters a:hover {
	text-decoration: underline;
}

/* The door to the invitation, beside the star: a quiet link. */
.invite-door {
	margin-left: 10px;
	color: var(--ink);
	font-size: 0.9rem;
	font-weight: 700;
	text-underline-offset: 3px;
}

/* ── Folded to what a reader came for (/station-fold.js) ─────────────
   The sections that are the same tomorrow fold to their heading; the
   heading is the button, with the FAQ's plus and minus. Written
   whole: without the script nothing here applies and every section
   stands open, as it always did. */
section.foldable > h2 {
	margin-bottom: 0;
}

.fold-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	width: 100%;
	padding: 14px 16px;
	border: 1px solid var(--outline);
	border-radius: var(--radius);
	background: var(--paper-low);
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.fold-toggle::after {
	content: "+";
	flex: none;
	color: var(--muted);
	font-size: 1.4rem;
	font-weight: 400;
	line-height: 1;
}

.fold-toggle[aria-expanded="true"]::after {
	content: "\2212";
}

.fold-toggle:hover::after {
	color: var(--coral);
}

section.foldable.folded > :not(h2) {
	display: none;
}

section.foldable:not(.folded) > h2 {
	margin-bottom: 14px;
}

section.foldable {
	margin-top: 14px;
}

/* A connection's next trip in large, over its doors
   (/station-trips.js): the time, the minutes until it, the line and
   the platform. */
.next-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 2px 16px;
	max-width: 34rem;
	margin: 4px 0 16px;
	padding: 14px 18px;
	border: 1.5px solid var(--coral);
	border-radius: 18px;
	background: var(--coral-soft);
	color: var(--ink);
	text-decoration: none;
	font-variant-numeric: tabular-nums;
}

.next-hero[hidden] {
	display: none;
}

.next-hero-word {
	grid-column: 1 / -1;
	color: var(--coral-ink);
	font-size: 0.86rem;
	font-weight: 700;
}

.next-hero-times {
	font-size: clamp(1.9rem, 7vw, 2.6rem);
	font-weight: 800;
	line-height: 1.1;
}

.next-hero-times small {
	color: var(--muted);
	font-size: 0.55em;
	font-weight: 700;
}

.next-hero-in {
	grid-row: 2;
	grid-column: 2;
	padding: 4px 14px;
	border-radius: 999px;
	background: var(--coral-fill);
	color: var(--coral-on);
	font-size: 1.3rem;
	font-weight: 800;
}

.next-hero-meta {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
}

/* A connection's day as a strip: a tick per trip along the hours. */
.day-strip {
	margin: 0 2px 12px;
}

.day-strip-track {
	position: relative;
	height: 22px;
	border-bottom: 2px solid var(--outline);
}

.day-strip-track i {
	position: absolute;
	bottom: 0;
	width: 2px;
	height: 14px;
	margin-left: -1px;
	border-radius: 1px;
	background: var(--rail);
}

.day-strip-track i.past {
	background: var(--outline);
}

.day-strip-track i.next {
	height: 22px;
	width: 3px;
	background: var(--coral);
}

.day-strip-hours {
	position: relative;
	height: 18px;
	color: var(--muted);
	font-size: 0.72rem;
	font-variant-numeric: tabular-nums;
}

.day-strip-hours span {
	position: absolute;
	top: 2px;
	transform: translateX(-50%);
}

/* Worth knowing, under the head: one line from the planned changes
   and the connection missed most often, each under its section's
   own heading. */
.worth {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
	gap: 12px;
	margin: 14px 0 22px;
}

.worth-card {
	padding: 14px 16px;
	border: 1px solid var(--outline);
	border-left: 4px solid var(--coral);
	border-radius: var(--radius);
	background: var(--paper-low);
}

.worth-card p {
	margin: 6px 0 0;
}

.worth-door {
	color: var(--ink);
	font-weight: 800;
	text-underline-offset: 3px;
}

.worth-door::after {
	content: " ↓";
}

/* The planned changes past the fifth, and the button that opens them:
   a count, which every language reads. */
.change-lines > .clipped {
	display: none;
}

.more-toggle {
	display: block;
	width: 100%;
	margin: 8px 0;
	padding: 10px;
	border: 1px dashed var(--outline);
	border-radius: var(--radius);
	background: none;
	color: var(--coral-ink);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

/* The field over the places reached with a change. */
.list-filter {
	display: block;
	width: 100%;
	max-width: 26rem;
	margin: 0 0 14px;
	padding: 11px 14px;
	border: 1.5px solid var(--outline);
	border-radius: 12px;
	background: var(--paper-low);
	color: var(--ink);
	font: inherit;
}

.list-filter:focus {
	border-color: var(--coral);
	outline: 0;
}

/* A phone's bar, once the doors under the title have scrolled away:
   from here, to here, the star, the live board. The doors' own marks,
   so the two are the two a reader has just seen. */
.stop-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 20;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 1fr;
	gap: 8px;
	padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--outline);
	background: color-mix(in srgb, var(--paper) 94%, transparent);
	backdrop-filter: blur(8px);
}

.stop-bar[hidden] {
	display: none;
}

.stop-bar a,
.stop-bar button {
	display: grid;
	place-items: center;
	min-height: 46px;
	border: 1px solid var(--outline);
	border-radius: 999px;
	background: var(--paper-low);
	color: var(--ink);
	font: inherit;
	font-weight: 800;
	text-decoration: none;
	cursor: pointer;
}

.stop-bar .door-mark {
	display: grid;
}

.stop-bar-from {
	color: var(--coral-ink);
}

.stop-bar-live {
	border-color: var(--coral);
	color: var(--coral-ink);
}

.stop-bar-star[aria-pressed="true"] {
	color: var(--coral-ink);
}

body.has-stop-bar {
	padding-bottom: 72px;
}

/* A time is ink, not coral. Every time in a board and in a
   connection's day is a link to its ride, and drawn in the link's
   orange-red a column of them read as a column of late trains — on
   a timetable red is what a delay is written in (the look of
   2026-11-24, docs/site-delight-plan.md, point 6). The quiet line
   under it is what still says it opens something. */
td.time a {
	color: var(--ink);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--outline);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

td.time a:hover {
	text-decoration-color: currentColor;
}

tr.past td.time a {
	color: var(--muted);
	font-weight: 400;
}

.lines {
	display: grid;
	gap: 14px;
}

.lines h3 {
	margin: 0 0 6px;
	font-size: 0.95rem;
}

.lines ul,
.nearby,
.letter-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* A line per row, in three columns that line up down the list: the
   plate, where it goes, how often. Run together as one wrapping row,
   the counts sat wherever each sentence happened to end. */
.lines li {
	display: grid;
	grid-template-columns: 3.4em minmax(0, 1fr) auto;
	gap: 2px 12px;
	align-items: baseline;
	padding: 6px 0;
	border-bottom: 1px solid var(--outline-soft);
	font-size: 0.92rem;
}

.lines .plate {
	justify-self: start;
}

.lines .per-day {
	color: var(--muted);
	text-align: right;
	white-space: nowrap;
}

/* On a phone the count goes under the directions rather than
   squeezing them into a column a word wide. */
@media (max-width: 560px) {
	.lines li {
		grid-template-columns: 3.4em minmax(0, 1fr);
	}

	.lines .per-day {
		grid-column: 2;
		text-align: left;
	}
}

.nearby {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
}

/* Other sites' pages for the same station or connection: the
   planner's hand-off rows, a name and a quiet hint beside it. */
.elsewhere {
	margin: 0;
	padding: 0;
	list-style: none;
	border: 1px solid var(--outline);
	border-radius: var(--radius);
	background: var(--paper-low);
}

.elsewhere li {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	align-items: baseline;
	padding: 11px 14px;
	border-bottom: 1px solid var(--outline-soft);
}

.elsewhere li:last-child {
	border-bottom: 0;
}

.elsewhere a {
	color: var(--coral-ink);
	font-weight: 600;
	text-decoration: none;
}

.elsewhere a::after {
	content: " ↗";
}

/* Our own planner, first in the list, stays in this tab. */
.elsewhere a.own::after {
	content: none;
}

.elsewhere a:hover {
	text-decoration: underline;
}

.elsewhere .hint {
	color: var(--muted);
	font-size: 0.86rem;
}

.offline {
	padding: clamp(18px, 3vw, 28px);
	border: 1px solid var(--outline);
	border-radius: 18px;
	background: var(--paper-low);
}

.offline p {
	margin: 0 0 14px;
	max-width: 62ch;
	line-height: 1.6;
}

.source {
	color: var(--muted);
	font-size: 0.82rem;
	line-height: 1.5;
}

/* The stop timetable (docs/station-pages.md, *The sheet in the
   shelter*): the station page's list of them, and the sheet itself
   — the grid of the week, as hung in the shelter, in the colour of
   its board. */
.sheets {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sheets li {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 8px 12px;
	align-items: baseline;
	padding: 8px 0;
	border-top: 1px solid var(--outline);
}

.sheets li:first-child {
	border-top: 0;
}

/* The planned changes (page.rs, `changes_section`): a card per line
   and direction, the days down the left and what happens on them
   beside, the days over the words on a phone. The edge is the coral
   of anything that asks to be read, the replacement plate's orange
   for a replacement service (BS-KI p. 244). */
.change-lines {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.change-line {
	padding: 12px 14px 12px 16px;
	border: 1px solid var(--outline);
	border-left: 4px solid var(--coral);
	border-radius: var(--radius);
	background: var(--paper-low);
}

.change-line.replacement {
	border-left-color: #ff6300;
}

.change-line:has(> details) {
	padding: 9px 12px 9px 14px;
}

.change-head {
	margin: 0 0 8px;
	font-weight: 650;
	line-height: 1.5;
}

.change-head .plate {
	margin-right: 4px;
}

.change-head .from {
	display: block;
	color: var(--muted);
	font-size: 0.9rem;
	font-weight: 400;
}

/* Folded, the head is the button: the first day under it, and the
   chevron the stops on the way have. */
.change-line summary.change-head {
	position: relative;
	margin: 0;
	padding-right: 26px;
	cursor: pointer;
	list-style: none;
}

.change-line summary.change-head::-webkit-details-marker {
	display: none;
}

.change-line summary.change-head::after {
	content: "";
	position: absolute;
	top: 0.55em;
	right: 4px;
	width: 7px;
	height: 7px;
	border-right: 2px solid var(--coral-ink);
	border-bottom: 2px solid var(--coral-ink);
	transform: rotate(45deg);
	transition: transform 0.15s;
}

.change-line details[open] summary.change-head::after {
	transform: translateY(4px) rotate(-135deg);
}

.change-line details[open] summary.change-head {
	margin-bottom: 8px;
}

.change-head .next {
	display: block;
	color: var(--muted);
	font-size: 0.88rem;
	font-weight: 500;
}

.change-days {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.change-days li {
	display: grid;
	grid-template-columns: minmax(10rem, 16rem) 1fr;
	gap: 2px 16px;
	font-size: 0.94rem;
	line-height: 1.45;
}

.change-days .when {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
	.change-days li {
		grid-template-columns: 1fr;
	}
}

/* «Leute hierher einladen» (stations/invite.rs): the form, folded
   on the station's page, and the invitation's own page. */
.invite-offer {
	margin: 24px 0 8px;
	max-width: 72ch;
}

.invite-offer summary {
	cursor: pointer;
	font-weight: 700;
}

.invite-form {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	gap: 10px 14px;
	margin: 10px 0;
}

.invite-form label {
	display: grid;
	gap: 4px;
	font-size: 0.82rem;
	font-weight: 700;
}

.invite-form label:first-child {
	flex: 1 1 16rem;
}

.invite-form input {
	font: inherit;
	font-weight: 400;
	font-size: 1rem;
	padding: 7px 10px;
	border: 1px solid currentColor;
	border-radius: 8px;
	background: transparent;
	color: inherit;
	min-width: 0;
}

.invite-form button {
	font: inherit;
	cursor: pointer;
}

.invite-card {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	align-items: start;
}

.invite-card > div {
	flex: 1 1 18rem;
	min-width: 0;
}

.invite-card h2 {
	margin-top: 0;
}

.invite-qr {
	width: min(220px, 60vw);
	height: auto;
	border-radius: 6px;
}

/* The board for another website, folded at the page's foot
   (stations/embed.rs). */
.embed-offer {
	margin: 24px 0 8px;
	max-width: 72ch;
}

.embed-offer summary {
	cursor: pointer;
	font-weight: 700;
}

.embed-code {
	margin: 8px 0;
	padding: 10px 12px;
	border-radius: 8px;
	background: var(--coral-soft);
	font-size: 0.82rem;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	user-select: all;
}

/* A ride of a day gone (page::PastRide): said first, and the
   column of how late it was beside the times it was due. */
.past-note {
	margin: 12px 0;
	padding: 10px 14px;
	border-radius: 10px;
	background: var(--coral-soft);
	max-width: 65ch;
}

.stops td.actual {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	font-weight: 600;
}

.stops td.actual.on-time { color: var(--good); }
.stops td.actual.slight { color: var(--fair); }
.stops td.actual.late,
.stops td.actual.cancelled { color: var(--poor); }
.stops td.actual.unseen { color: inherit; opacity: 0.6; font-weight: 400; }

/* The star that keeps the stop in the planner's favourites
   (station-star.js): written hidden, shown by the script. On a
   stop timetable the home screen's door stands beside it
   (stop-home.js). */
/* The railway a station is named after, whole and on paper
   (Bel-Air LEB, page::railway_of_name). */
.railway-line,
.star-row {
	margin: 8px 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pill.star,
.pill.home-install {
	font: inherit;
	cursor: pointer;
}

.pill.star .star-on,
.pill.star[aria-pressed="true"] .star-off {
	display: none;
}

.pill.star[aria-pressed="true"] .star-on {
	display: inline;
}

/* What the timetable change in December does here and to a line
   (stations/change_ahead.rs): a plate and a sentence per line on a
   station's page, the facts as a short list on a line's. */
.tc-here {
	list-style: none;
	padding: 0;
	margin: 0 0 12px;
	display: grid;
	gap: 8px;
	line-height: 1.45;
}

.tc-here li {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 8px;
}

.tc-here .more {
	font-size: 0.88rem;
	color: var(--muted);
}

.tc-facts {
	margin: 0 0 12px;
	padding-left: 1.2em;
	line-height: 1.5;
}

.tc-facts li + li {
	margin-top: 4px;
}

.changes .badge {
	display: inline-block;
	margin-left: 6px;
	padding: 0 7px;
	border-radius: 999px;
	background: var(--coral-soft);
	color: var(--coral-ink);
	font-size: 0.74rem;
	font-weight: 700;
	vertical-align: 1px;
}

.holidays {
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
	font-weight: 600;
}

.holidays time {
	font-variant-numeric: tabular-nums;
}

/* The lines with a train or two each, folded: there and readable,
   and not between a rider and the replacement bus. */
details.smaller {
	margin: 12px 0 0;
}

details.smaller summary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 36px;
	cursor: pointer;
	list-style: none;
	color: var(--coral-ink);
	font-weight: 600;
}

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

details.smaller summary::after {
	content: "";
	width: 6px;
	height: 6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.15s;
}

details.smaller[open] summary::after {
	transform: translateY(1px) rotate(-135deg);
}

details.smaller .change-lines,
details.smaller .onward-rows {
	margin-top: 8px;
}

details.smaller .change-line {
	border-left-color: var(--outline);
}

/* Under the doors, on a day the changes are today's or tomorrow's:
   which lines, and the way to them. */
.doors:has(+ .heads-up) {
	margin-bottom: 14px;
}

.heads-up {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
	margin: 0 0 16px;
	padding: 10px 14px;
	border-radius: var(--radius);
	background: var(--coral-soft);
	color: var(--ink);
	font-size: 0.94rem;
	font-weight: 600;
}

.heads-up .plate + .plate {
	margin-left: 0;
}

.heads-up a {
	color: var(--coral-ink);
	font-weight: 700;
	text-underline-offset: 3px;
}

.heads-up + .jump {
	margin-top: 0;
}

/* The connections (page.rs, `onward_section`): a card per pair of
   lines, the two plates either side of an arrow, how often and how
   long to change under them, and how often it worked as a figure
   and a bar. Green from 95 in a hundred, amber from 85, coral
   below. */
.onward,
.line-record,
.line-map,
.line-next,
.stops {
	--good: #2a7f52;
	--fair: #a87b00;
	--poor: var(--coral-ink);
	--on-tone: #ffffff;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .onward,
	:root:not([data-theme="light"]) .line-record,
	:root:not([data-theme="light"]) .line-map,
	:root:not([data-theme="light"]) .line-next,
	:root:not([data-theme="light"]) .stops {
		--good: #5cc98a;
		--fair: #e0b84a;
		--on-tone: #10201a;
	}
}

:root[data-theme="dark"] .onward,
:root[data-theme="dark"] .line-record,
:root[data-theme="dark"] .line-map,
:root[data-theme="dark"] .line-next,
:root[data-theme="dark"] .stops {
	--good: #5cc98a;
	--fair: #e0b84a;
	--on-tone: #10201a;
}

.onward-rows {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.onward-row {
	padding: 12px 14px;
	border: 1px solid var(--outline);
	border-radius: var(--radius);
	background: var(--paper-low);
}

.onward-row p {
	margin: 0;
}

.onward-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 8px;
	font-weight: 650;
	line-height: 1.45;
}

.onward-head .leg {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
}

.onward-head .leg .plate {
	flex: none;
}

.onward-head .arrow {
	color: var(--muted);
}

.onward-facts {
	margin-top: 4px !important;
	color: var(--muted);
	font-size: 0.88rem;
}

.onward-record {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 4px 10px;
	margin-top: 10px !important;
	font-size: 0.9rem;
}

.onward-record .share {
	font-size: 1.25rem;
	font-weight: 750;
	font-variant-numeric: tabular-nums;
}

.onward-record.good .share { color: var(--good); }
.onward-record.fair .share { color: var(--fair); }
.onward-record.poor .share { color: var(--poor); }

.onward-record .meter {
	height: 6px;
	border-radius: 3px;
	background: var(--outline);
	overflow: hidden;
}

.onward-record .meter > span {
	display: block;
	height: 100%;
	border-radius: 3px;
}

.onward-record.good .meter > span { background: var(--good); }
.onward-record.fair .meter > span { background: var(--fair); }
.onward-record.poor .meter > span { background: var(--poor); }

.onward-record .said {
	grid-column: 1 / -1;
	color: var(--ink-soft);
}

.onward-more {
	margin-top: 4px !important;
	color: var(--muted);
	font-size: 0.86rem;
}

/* The lines of a stop around the station, under its name. */
h3.sheets-from {
	margin: 18px 0 2px;
	font-size: 0.95rem;
}

h3.sheets-from a {
	color: var(--ink);
	text-underline-offset: 3px;
}

.sheets .plate {
	justify-self: start;
}

.sheets .dirs a,
.sheets a.pdf {
	color: var(--ink);
	text-underline-offset: 3px;
}

.sheets a.pdf {
	padding: 2px 9px;
	border: 1.5px solid var(--outline);
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 700;
	text-decoration: none;
}

.sheets a.pdf:hover,
.sheets a.pdf:focus-visible {
	border-color: var(--ink);
}

.sheet-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin: 0 0 18px;
	color: var(--muted);
	font-size: 0.9rem;
}

nav.dirs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: -4px 0 16px;
}

nav.dirs a {
	padding: 6px 12px;
	border-radius: 8px;
	background: var(--paper-high);
	color: var(--ink);
	font-size: 0.92rem;
	text-decoration: none;
}

nav.dirs a[aria-current="page"] {
	background: var(--ink);
	color: var(--paper);
	font-weight: 700;
}

/* Ink for a sheet with no kind, and only for one: at the specificity
   of `:where`, nothing, so a `.kind-*` on the same element always
   wins. As a plain `.sheet` it won over the bus's yellow, later in
   the file at the same weight, while the bus's black lettering
   stayed: the head of every bus sheet in the light theme was black
   on black (owner, 2026-11-05). */
:where(.sheet) {
	--kind: var(--ink);
}

:where(.sheet:not([class*="kind-"])) {
	--kind-on: var(--paper);
}

.sheet {
	border: 2px solid var(--kind);
}

.sheet table {
	font-variant-numeric: tabular-nums;
}

.sheet thead th {
	background: var(--kind);
	color: var(--kind-on, #fff);
	font-size: 0.9rem;
}

.sheet th.h {
	width: 2.2em;
	text-align: right;
}

/* Ink, not the kind's colour: the bus's yellow on paper is too faint
   to read an hour by. */
.sheet tbody th.h {
	color: var(--ink);
	background: var(--paper-high);
	font-weight: 800;
}

.sheet td {
	padding: 5px 8px;
	vertical-align: top;
}

.sheet td span {
	display: inline-block;
	min-width: 2.2em;
}

.sheet td sup {
	margin-left: 1px;
	color: var(--muted);
	font-size: 0.62em;
	line-height: 0;
}

.sheet tbody tr:nth-child(even) td {
	background: color-mix(in srgb, var(--paper-high) 55%, transparent);
}

.sheet-notes {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	margin: 12px 0 0;
	font-size: 0.9rem;
}

.sheet-notes b {
	color: var(--kind, var(--ink));
}

/* The run of stops on a stop timetable, drawn as the line it is: a
   stop under the other on a rail, the minutes from here at the right,
   this stop's dot filled. The stops before here fold under one line
   (page::sheet_run); until 2026-11-18 they were one paragraph of
   underlined names under a title promising minutes most had none of. */
.run {
	margin-top: 30px;
}

.run h2 {
	margin-bottom: 10px;
}

.run-list {
	max-width: 520px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.95rem;
	font-variant-numeric: tabular-nums;
}

.run-list li {
	position: relative;
	display: flex;
	align-items: baseline;
	gap: 12px;
	padding: 6px 10px 6px 28px;
}

/* The rail, and the stop's dot on it. */
.run-list li::before {
	content: "";
	position: absolute;
	left: 7px;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--ink-soft);
}

.run-list li::after {
	content: "";
	position: absolute;
	left: 3px;
	top: calc(50% - 5.5px);
	width: 11px;
	height: 11px;
	border: 2.5px solid var(--ink-soft);
	border-radius: 50%;
	box-sizing: border-box;
	background: var(--paper);
}

.run-list li:first-child::before {
	top: 50%;
}

.run-list li:last-child::before {
	bottom: 50%;
}

/* The stops before here: where the vehicle comes from, in grey, the
   rail running on into the list under them. */
.run-list li.before,
.run-list li.before a {
	color: var(--muted);
}

.run-list li.before::before,
.run-list li.before::after {
	border-color: var(--outline);
}

.run-list li.before::before {
	background: var(--outline);
}

.run-before .run-list li:last-child::before {
	bottom: 0;
}

.run-before + .run-list li:first-child::before {
	top: 0;
}

.run-list li.here {
	margin: 2px 0;
	padding-top: 9px;
	padding-bottom: 9px;
	border-radius: 8px;
	background: var(--paper-high);
}

.run-list li.here::after {
	left: 1px;
	top: calc(50% - 7.5px);
	width: 15px;
	height: 15px;
	border-color: var(--coral);
	background: var(--coral);
}

.run-name {
	flex: 1 1 auto;
	min-width: 0;
}

.run-name a {
	color: inherit;
	text-decoration: none;
}

.run-name a:hover,
.run-name a:focus-visible {
	text-decoration: underline;
}

.run-min {
	font-weight: 700;
}

.run-min::after {
	content: "\2032";
	margin-left: 1px;
	color: var(--muted);
	font-weight: 400;
}

.run-here {
	color: var(--muted);
	font-size: 0.85rem;
}

.run-before {
	max-width: 520px;
}

.run-before summary {
	position: relative;
	padding: 6px 0 6px 28px;
	color: var(--muted);
	cursor: pointer;
	font-size: 0.92rem;
	list-style: none;
}

.run-before summary::-webkit-details-marker {
	display: none;
}

/* The folded stops, as a dotted stretch of rail with a chevron. */
.run-before summary::before {
	content: "";
	position: absolute;
	left: 7px;
	top: 0;
	bottom: 0;
	border-left: 3px dotted var(--outline);
}

.run-before summary::after {
	content: " \25BE";
}

.run-before[open] summary::after {
	content: " \25B4";
}

.run-before summary:hover,
.run-before summary:focus-visible {
	color: var(--ink);
}

/* A sheet page's next departures, taken from the QR code's page by
   stop-now.js, and the doors under them closer than a page's usual
   gap, since the grid they open onto follows at once. */
.sheet-now {
	margin: 0 0 16px;
}

.sheet-doors {
	margin: 0 0 22px;
}

.sheet-doors .pill {
	padding-top: 8px;
	padding-bottom: 8px;
	font-size: 0.92rem;
}

.subtitle a {
	color: inherit;
	text-decoration-color: var(--outline);
	text-underline-offset: 3px;
}

.subtitle a:hover,
.subtitle a:focus-visible {
	text-decoration-color: currentColor;
}

/* Today's column and the hour it is now, marked by stop-now.js. */
.sheet thead th.today {
	box-shadow: inset 0 -3px 0 var(--kind-on, #fff);
}

.sheet tbody tr.now-hour th.h {
	background: var(--coral);
	color: #fff;
}

.sheet tbody tr.now-hour td {
	background: color-mix(in srgb, var(--coral) 12%, transparent);
}

.sheet tbody tr.now-hour td.today {
	background: color-mix(in srgb, var(--coral) 24%, transparent);
	font-weight: 700;
}

.sheet thead .short {
	display: none;
}

/* On a phone held upright the day columns stay side by side, as on
   the sheet in the shelter: the heads go short (Mo–Fr, Sa, So), the
   columns share the width equally and the minutes wrap inside their
   hour. Stacking Saturday and Sunday under every hour was tried
   first and read as a puzzle (2026-10-30). */
@media (max-width: 640px) {
	.sheet table {
		table-layout: fixed;
		font-size: 0.9rem;
	}

	.sheet thead .long {
		display: none;
	}

	.sheet thead .short {
		display: inline;
	}

	.sheet th,
	.sheet td {
		padding: 6px 4px;
	}

	.sheet th.h {
		width: 2em;
		padding-right: 6px;
	}

	.sheet tbody th.h {
		font-size: 0.9rem;
		vertical-align: top;
	}

	.sheet td span {
		min-width: 1.9em;
	}

	.sheet td + td {
		border-left: 1px solid var(--outline-soft);
	}
}

@media print {
	.site-strip,
	.doors,
	nav.dirs,
	.jump,
	footer {
		display: none;
	}
}

.letters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	margin: 0 0 24px;
	font-weight: 700;
}

/* On a letter page, the letter you are on: ink, underlined, not a link
   to press. */
.letters a[aria-current="page"] {
	color: var(--ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.letter-list {
	columns: 15rem auto;
	column-gap: 24px;
}

.letter-list li {
	padding: 3px 0;
	break-inside: avoid;
}

/* A column of names to look one up in: ink, not a wall of coral, and
   a faint line under each so it reads as something to press (the
   places with a change on a station's page looked like plain text,
   2026-10-28). */
.letter-list a {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: var(--outline);
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

.letter-list a:hover {
	color: var(--coral-ink);
	text-decoration: underline;
}

/* The field that narrows the list (/station-find.js): one rounded
   field like the strip's, under the lede and over everything it
   narrows. What was typed is marked in each name that is left. */
[hidden] {
	display: none !important;
}

/* The field rides under the site's bar while the list scrolls, so a
   name can be looked up from anywhere in three thousand of them; once
   it is riding, it takes the page's own paper and a line under it,
   and the names slide under that rather than into the field. */
.find {
	position: sticky;
	top: var(--sitenav-h, 50px);
	z-index: 5;
	margin: -4px -16px 18px;
	padding: 8px 16px 2px;
}

.find.stuck {
	background: var(--paper);
	box-shadow: 0 1px 0 var(--outline-soft), 0 10px 18px -14px rgb(20 23 27 / 0.35);
}

.find-sentinel {
	height: 0;
}

/* The key that reaches the field from anywhere on the page. */
.find-key {
	position: absolute;
	top: 50%;
	right: 16px;
	display: grid;
	place-items: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border: 1px solid var(--outline);
	border-radius: 6px;
	background: var(--paper);
	color: var(--muted);
	font: 600 0.78rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
	transform: translateY(-50%);
	pointer-events: none;
}

.find.typed .find-key,
.find input:focus ~ .find-key {
	display: none;
}

/* The names a query most likely means, as cards over the lists: the
   first one is what Enter opens, and says so with its ring and the
   return key. */
.find-best {
	margin: 0 0 22px;
}

.find-best h2 {
	margin: 0 0 10px;
	color: var(--muted);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.find-best ol {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.find-best a {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 10px 40px 10px 14px;
	border: 1.5px solid var(--outline-soft);
	border-radius: 14px;
	background: var(--paper-low);
	color: var(--ink);
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.12s, transform 0.12s;
}

.find-best a::after {
	content: "→";
	position: absolute;
	right: 14px;
	color: var(--muted);
	font-weight: 700;
}

.find-best a.first {
	border-color: var(--coral);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--coral) 16%, transparent);
}

.find-best a.first::after {
	content: "↵";
	color: var(--coral-ink);
}

.find-best a:hover,
.find-best a:focus-visible {
	border-color: var(--coral);
	outline: none;
}

.find-best a:focus-visible {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--coral) 32%, transparent);
}

.find-best mark,
.letter-list a:focus-visible mark {
	border-radius: 2px;
	background: var(--coral-soft);
	color: inherit;
}

.letter-list a:focus-visible {
	outline: 2px solid var(--coral);
	outline-offset: 2px;
	border-radius: 3px;
}

@media (prefers-reduced-motion: no-preference) {
	.find-best a:hover {
		transform: translateY(-1px);
	}
}

.find-field {
	position: relative;
	max-width: 30rem;
}

.find-icon,
.find-clear svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

.find-icon {
	position: absolute;
	top: 50%;
	left: 16px;
	width: 20px;
	height: 20px;
	color: var(--muted);
	transform: translateY(-50%);
	pointer-events: none;
}

.find input {
	width: 100%;
	min-height: 50px;
	padding: 0 48px 0 46px;
	border: 1.5px solid var(--outline);
	border-radius: 999px;
	background: var(--paper-low);
	color: var(--ink);
	font: inherit;
	font-size: 1.02rem;
	appearance: none;
}

.find input::placeholder {
	color: var(--muted);
	opacity: 1;
}

.find input::-webkit-search-cancel-button {
	appearance: none;
}

.find input:hover {
	border-color: color-mix(in srgb, var(--ink) 30%, var(--outline));
}

.find input:focus-visible {
	outline: none;
	border-color: var(--coral);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--coral) 28%, transparent);
}

.find-clear {
	position: absolute;
	top: 50%;
	right: 5px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--muted);
	cursor: pointer;
	transform: translateY(-50%);
}

.find-clear:hover {
	background: var(--paper-high);
	color: var(--ink);
}

.find-clear svg {
	width: 18px;
	height: 18px;
}

.find-count {
	min-height: 1.4em;
	margin: 8px 0 0 18px;
	color: var(--muted);
	font-size: 0.88rem;
}

.letter-list mark {
	border-radius: 2px;
	background: var(--coral-soft);
	color: inherit;
}

.find-all {
	margin: 12px 0 0;
}

.find-all a {
	color: var(--coral-ink);
	font-weight: 600;
	text-decoration: none;
}

.find-all a::after {
	content: " →";
}

.find-all a:hover {
	text-decoration: underline;
}

/* On a phone the destinations keep their name, time, count and door;
   which lines go there is the next section's to say. And every table
   is set a little tighter, so the platform fits beside the
   direction instead of off the right edge, where a rider
   on Zürich, Central's page had to scroll the board for the letter
   of their tram's platform. A name breaks after its slash
   (page.rs, `named`), never inside a word. */
@media (max-width: 560px) {
	.by-line {
		display: none;
	}

	/* Two tables ran off a phone's right edge (2026-11-24, points 2
	   and 3). The destinations' last column said «Jetzt, mit
	   Verspätungen» on every row and was cut at «Verspätunge»: on a
	   phone the door is an arrow, its words kept for a screen
	   reader in the link's own label. A connection's day lost its
	   platform behind the «Nächste» tag, which the row's ground and
	   the line over the table already say. */
	.now-door {
		text-align: right;
	}

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

	td.now-door a {
		display: inline-block;
		min-width: 2.4em;
		padding: 3px 10px;
		border: 1px solid var(--outline);
		border-radius: 999px;
		text-align: center;
	}

	td.now-door a::after {
		content: "→";
	}

	td.time .tag {
		display: none;
	}

	th,
	td {
		padding: 8px 7px;
	}

	th:first-child,
	td:first-child {
		padding-left: 11px;
	}

	th:last-child,
	td:last-child {
		padding-right: 11px;
	}

	table {
		font-size: 0.88rem;
	}

	th {
		font-size: 0.66rem;
		letter-spacing: 0.02em;
	}
}

a:focus-visible {
	outline: 2px solid var(--coral);
	outline-offset: 2px;
	border-radius: 3px;
}

/* What a rider reads first (docs/what-searchers-want.md). */

/* The station at the stop's door, the stop at the station's, and
   the map: one quiet line under the lede. */
.place-links {
	margin: -6px 0 14px;
	color: var(--ink-soft);
	font-size: 0.92rem;
}

.place-links a {
	color: var(--ink);
	font-weight: 600;
	text-underline-offset: 3px;
}

/* The place on a map, in either of two (page.rs, `map_links`): a
   pin and the words, then a chip per map, each named for where it
   goes and marked as leaving the site. */
.map-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px;
	font-size: 0.92rem;
}

.map-word {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-right: 2px;
	color: var(--ink-soft);
	font-weight: 600;
}

.map-word svg {
	color: var(--coral-ink);
}

.map-links a.map {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 34px;
	padding: 0 12px;
	border: 1.5px solid var(--outline);
	border-radius: 999px;
	color: var(--ink);
	font-weight: 650;
	text-decoration: none;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.map-links a.map::after {
	content: "↗";
	color: var(--muted);
	font-size: 0.85em;
}

.map-links a.map:hover,
.map-links a.map:focus-visible {
	border-color: color-mix(in srgb, var(--ink) 40%, transparent);
	background: color-mix(in srgb, var(--ink) 4%, transparent);
}

/* The small blue board: the hall's board (web/plan's `.hall`) in
   miniature, white on its blue, and the whole of it the door to
   the real one. */
.glance {
	margin: 0 0 18px;
}

/* What a QR code on a stop's sheet opens (page::now_page): this
   line's next departures, white on blue like the station's board,
   the next one large enough to read with the phone at arm's length.
   The live colours are the board's own, since the board is blue in
   either theme. */
.now {
	max-width: 620px;
	margin: 4px 0 18px;
}

.now h2 {
	margin: 0 0 8px;
	font-size: 1rem;
}

.now-list {
	margin: 0;
	padding: 0;
	list-style: none;
	overflow: hidden;
	border-radius: var(--radius);
	background: #0a2a6a;
	color: #fff;
	font-variant-numeric: tabular-nums;
}

.now-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 12px;
	padding: 10px 14px;
	border-top: 1px solid rgb(255 255 255 / 0.12);
}

.now-row:first-child {
	border-top: 0;
}

.now-row.first {
	padding: 16px 14px;
	background: #0d3480;
}

.now-time {
	min-width: 3.2em;
	font-size: 1.05rem;
	font-weight: 700;
}

.now-row.first .now-time {
	font-size: 1.6rem;
}

.now-row.cancelled .now-time {
	text-decoration: line-through;
}

.now-in {
	flex: 1 1 auto;
	color: rgb(255 255 255 / 0.85);
}

.now-row.first .now-in {
	color: #fff;
	font-size: 1.25rem;
	font-weight: 700;
}

.now-live {
	font-size: 0.9rem;
	font-weight: 700;
}

.now-live.on-time {
	color: #8fe3b0;
}

.now-live.late {
	color: #ffd166;
}

.now-live.cancelled {
	color: #ffab9e;
}

.now-pl {
	margin-left: auto;
	color: rgb(255 255 255 / 0.8);
	font-size: 0.85rem;
}

.now-to {
	flex-basis: 100%;
	color: rgb(255 255 255 / 0.72);
	font-size: 0.82rem;
}

.now-note,
.now-none {
	margin: 6px 0 0;
	font-size: 0.8rem;
	opacity: 0.8;
}

.now-doors {
	margin: 0 0 20px;
}

.glance-board {
	display: block;
	max-width: 620px;
	overflow: hidden;
	border-radius: var(--radius);
	background: #0a2a6a;
	color: #fff;
	font-variant-numeric: tabular-nums;
	text-decoration: none;
	box-shadow: 0 1px 0 rgb(0 0 0 / 0.08);
}

.glance-board:hover,
.glance-board:focus-visible {
	box-shadow: 0 0 0 3px var(--coral);
	outline: none;
}

.glance-head {
	display: flex;
	align-items: baseline;
	gap: 12px;
	padding: 8px 14px 6px;
	background: #071f52;
}

.glance-word {
	flex: 1 1 auto;
	color: rgb(255 255 255 / 0.72);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.glance-clock {
	font-size: 1.05rem;
	font-weight: 700;
}

/* One grid for all the rows, each row a subgrid of it, so the
   platform column is as wide as its widest platform and still lines
   up: a fixed 1.8rem cut Zürich HB's «41/42» to «41/4» (2026-11-04). */
.glance-rows {
	display: grid;
	grid-template-columns: 3.4rem minmax(0, 1fr) auto;
	column-gap: 10px;
	padding: 4px 0;
}

.glance-rows.with-platform {
	grid-template-columns: 3.4rem minmax(0, 1fr) auto minmax(1.2rem, auto);
}

.glance-row {
	display: grid;
	grid-column: 1 / -1;
	grid-template-columns: subgrid;
	align-items: center;
	padding: 5px 14px;
	font-weight: 700;
}

.glance-row + .glance-row {
	border-top: 1px solid rgb(255 255 255 / 0.12);
}

/* The columns' names, faint, as the hall's board has them: without
   them the platform was a lone number at the end of a row. */
.glance-cols {
	display: grid;
	grid-column: 1 / -1;
	grid-template-columns: subgrid;
	padding: 4px 14px 2px;
	color: rgb(255 255 255 / 0.6);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.glance-row[hidden] {
	display: none;
}

.glance-line .plate {
	box-shadow: 0 0 0 1px rgb(255 255 255 / 0.55);
}

/* Where it goes, and under it the same line's later departures as
   the clock, after «then» (page.rs, `glance_section`): the time
   column says one thing, when this row's next one leaves. */
.glance-to {
	min-width: 0;
}

.glance-dest {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.glance-then {
	display: flex;
	flex-wrap: wrap;
	gap: 0 8px;
	margin-top: 1px;
	color: rgb(255 255 255 / 0.66);
	font-size: 0.8rem;
	font-weight: 600;
}

.glance-then[hidden],
.glance-then time[hidden] {
	display: none;
}

.glance-then-word {
	color: rgb(255 255 255 / 0.5);
	font-weight: 500;
}

.glance-when {
	text-align: right;
	white-space: nowrap;
}

.glance-pl {
	text-align: right;
}

.glance-open {
	display: block;
	padding: 8px 14px 10px;
	border-top: 1px solid rgb(255 255 255 / 0.18);
	color: #fff;
	font-size: 0.9rem;
	font-weight: 650;
	text-decoration: underline;
	text-underline-offset: 3px;
}

@media (max-width: 420px) {
	.glance-rows {
		grid-template-columns: 3rem minmax(0, 1fr) auto;
		column-gap: 8px;
	}

	.glance-rows.with-platform {
		grid-template-columns: 3rem minmax(0, 1fr) auto minmax(1rem, auto);
	}

	.glance-row,
	.glance-cols {
		padding-inline: 10px;
	}
}

/* The planned changes in a few sentences, before the cards. */
.in-short {
	margin: 0 0 14px;
	padding: 12px 16px;
	border-radius: var(--radius);
	background: var(--coral-soft);
}

.in-short h3 {
	margin: 0 0 6px;
	font-size: 1rem;
}

.in-short ul {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
	line-height: 1.5;
}

.in-short .when {
	font-weight: 700;
}

.in-short .when::after {
	content: ":";
}

.in-short .to {
	color: var(--ink-soft);
	font-size: 0.92rem;
}

/* The chips over the changes and the connections. */
.day-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 0 0 12px;
}

.day-chips[hidden] {
	display: none;
}

.day-chips .chips-word {
	margin-right: 4px;
	color: var(--muted);
	font-size: 0.88rem;
}

.day-chips .chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 4px 12px;
	border: 1.5px solid var(--outline);
	border-radius: 999px;
	background: var(--paper);
	color: var(--ink);
	font: inherit;
	font-size: 0.88rem;
	font-weight: 650;
	cursor: pointer;
}

.day-chips .chip[aria-pressed="true"] {
	border-color: var(--coral-ink);
	background: var(--coral-soft);
	color: var(--coral-ink);
}

.day-chips .chip.pick input {
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
}

.day-none {
	margin: 0 0 12px;
	font-weight: 600;
}

.change-line[hidden],
.change-days li[hidden],
.onward-row[hidden],
details.smaller[hidden] {
	display: none;
}

.change-days .later-head {
	display: block;
	margin-top: 4px;
	color: var(--muted);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* A departure on the board that a planned change concerns. */
a.mark {
	display: inline-block;
	margin-left: 4px;
	padding: 0 7px;
	border-radius: 999px;
	background: var(--coral-soft);
	color: var(--coral-ink);
	font-size: 0.74rem;
	font-weight: 700;
	text-decoration: none;
	vertical-align: 1px;
}

/* A connection: the verdict in a word, what a miss costs, and the
   counts folded under them. */
.onward-record .said strong {
	color: var(--ink);
	font-weight: 700;
}

.onward-worst,
.onward-miss {
	margin-top: 4px !important;
	color: var(--ink-soft);
	font-size: 0.88rem;
}

.onward-figures {
	margin-top: 6px;
	font-size: 0.86rem;
}

.onward-figures summary,
.onward-times summary {
	color: var(--muted);
	cursor: pointer;
}

/* The day's changes one by one, in a fold: arrival → departure, a
   column of them as wide as the card allows, the one missed most
   often in the verdict's coral. */
.onward-times {
	margin-top: 6px;
	font-size: 0.86rem;
}

.onward-times-head {
	margin-top: 6px !important;
	color: var(--muted);
	font-size: 0.8rem;
}

.onward-times-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(8.5em, 1fr));
	gap: 2px 12px;
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
	font-variant-numeric: tabular-nums;
}

.onward-times-list .worst {
	grid-column: span 2;
	color: var(--poor);
	font-weight: 650;
}

.onward-times-list .missed {
	font-weight: 500;
}

/* The door to the onward line's sheet, last on the card. */
.onward-sheet {
	margin-top: 8px !important;
	font-size: 0.88rem;
}

.onward-sheet a {
	font-weight: 600;
}

/* A railway's own name after its directions: «Lausanne–Echallens–
   Bercher» beside the R20. */
.lines .line-name {
	display: block;
	color: var(--muted);
	font-size: 0.86rem;
}

/* Since 2026-11-05 the same place opens the line's own page
   (stations/line_page.rs): a link, in the links' colour. */
.lines a.line-name {
	color: var(--coral-ink);
}

/* A line's page (docs/station-pages.md, *Lines*): the three kinds
   of day in a small table, each direction's stops as the sheet's
   run of stops, the stations with IC and IR trains in bold. */
table.line-days th[scope="row"] {
	color: var(--ink);
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: 0;
	text-align: left;
	text-transform: none;
}

table.line-days td.none {
	color: var(--muted);
}

/* A line's stops as one diagram (docs/station-pages.md, *A line's
   page, from where you stand*): a row per stop, the rail in the
   line's colour beside it, a track per branch, and the minutes to
   and from the stop picked on the right. The rail is drawn piece by
   piece in each row — above the stop, below it, the stop — so that a
   name that wraps stretches its row and the rail with it. */
.line-map ol.map {
	--tw: 24px;
	--dy: calc(7px + 0.7em);
	--rail: var(--ink);
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.line-map .r {
	display: grid;
	grid-template-columns: calc(var(--tracks, 1) * var(--tw)) minmax(0, 1fr) auto 34px;
	column-gap: 12px;
	align-items: start;
	padding: 7px 10px 7px 6px;
	border-radius: var(--radius);
	line-height: 1.4;
}

.line-map .r.sel {
	background: var(--paper-low);
	box-shadow: inset 0 0 0 1px var(--outline);
}

.line-map .r.sel .nm,
.line-map .r.ld .nm {
	font-weight: 700;
}

.line-map .rail {
	position: relative;
	grid-row: 1 / span 2;
	align-self: stretch;
	margin: -7px 0;
}

.line-map .tk {
	position: absolute;
	top: 0;
	bottom: 0;
	width: var(--tw);
}

.line-map .t1 {
	left: var(--tw);
}

.line-map .t2 {
	left: calc(2 * var(--tw));
}

.line-map .tk .u,
.line-map .tk .d {
	position: absolute;
	left: calc(50% - 2px);
	width: 4px;
	background: var(--rail);
}

.line-map .tk .u {
	top: 0;
	height: var(--dy);
}

.line-map .tk .d {
	top: var(--dy);
	bottom: 0;
}

.line-map .tk .b {
	position: absolute;
	top: calc(var(--dy) - 5px);
	left: calc(50% - 5px);
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--rail);
	z-index: 1;
}

.line-map .tk .b.some {
	background: var(--paper);
	box-shadow: inset 0 0 0 2.5px var(--rail);
}

.line-map .tk .b.ld {
	top: calc(var(--dy) - 7px);
	left: calc(50% - 7px);
	width: 14px;
	height: 14px;
	background: var(--paper);
	box-shadow: inset 0 0 0 3px var(--ink);
}

.line-map .r.sel .tk .b {
	outline: 3px solid color-mix(in srgb, var(--rail) 35%, transparent);
	outline-offset: 2px;
}

/* A branch's curve, from the main track's centre to its own. */
.line-map .c {
	position: absolute;
	left: calc(var(--tw) / 2);
	box-sizing: border-box;
	border: 0 solid var(--rail);
	border-right-width: 4px;
}

.line-map .c.k1 {
	width: calc(var(--tw) + 2px);
}

.line-map .c.k2 {
	width: calc(2 * var(--tw) + 2px);
}

.line-map .c.in {
	top: 0;
	height: calc(var(--dy) + 2px);
	border-bottom-width: 4px;
	border-bottom-right-radius: var(--tw);
}

.line-map .c.out {
	top: calc(var(--dy) - 2px);
	bottom: 0;
	border-top-width: 4px;
	border-top-right-radius: var(--tw);
}

.line-map .nm small {
	margin-left: 6px;
	color: var(--muted);
	font-size: 0.8rem;
	font-weight: 400;
}

.line-map .mn {
	min-width: 3.5ch;
	white-space: nowrap;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	text-align: right;
}

.line-map .r.sel .mn {
	color: var(--muted);
	font-size: 0.85rem;
	font-weight: 400;
}

/* A row picks its stop (line-page.js): the whole row is the
   target, the name the button a keyboard finds. The small door at
   the row's end is the only thing that leaves the page, for the
   stop's own, and draws itself as leaving: a box with an arrow out
   of it, in a column of its own so it is never tapped for the name. */
.line-map .r {
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.line-map .r:hover:not(.sel) {
	background: color-mix(in srgb, var(--paper-low) 70%, transparent);
}

.line-map .sn[role="button"]:focus-visible {
	outline: 2px solid var(--door, var(--ink));
	outline-offset: 2px;
	border-radius: 4px;
}

.line-map .go {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	margin: -6px 0 -6px 0;
	border-radius: 8px;
	color: var(--muted);
}

.line-map .go svg {
	width: 15px;
	height: 15px;
}

.line-map .go:hover,
.line-map .go:focus-visible {
	background: var(--paper-low);
	color: var(--ink);
}

.line-map .go:focus-visible {
	outline: 2px solid var(--door, var(--ink));
	outline-offset: 0;
}

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

/* The stop picked, opened: the next train each way and the doors
   from the stop, under its name, the rail running on beside it. */
.line-map .stop-card {
	grid-column: 2 / -1;
	grid-row: 2;
	display: grid;
	gap: 10px;
	margin: 8px 0 4px;
	cursor: auto;
}

.stop-card .card-next {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.stop-card .card-next li {
	display: grid;
	grid-template-columns: 14px minmax(0, 1fr) auto;
	grid-template-areas: "dir to time" ". mid mid";
	align-items: baseline;
	column-gap: 8px;
	row-gap: 2px;
	font-variant-numeric: tabular-nums;
}

@media (min-width: 420px) {
	.stop-card .card-next li {
		grid-template-columns: 14px minmax(0, 1fr) auto auto;
		grid-template-areas: "dir to time mid";
	}
}

.line-map .dir {
	display: inline-block;
	flex: none;
	grid-area: dir;
	width: 0;
	height: 0;
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-bottom: 9px solid var(--rail);
	transform: translateY(-1px);
}

.line-map .dir.down {
	transform: rotate(180deg) translateY(1px);
}

.stop-card .to {
	grid-area: to;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 650;
}

.stop-card time {
	grid-area: time;
	font-weight: 750;
}

.stop-card .mid {
	grid-area: mid;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 8px;
	font-size: 0.9rem;
}

.stop-card .in {
	color: var(--poor);
	font-weight: 650;
}

.stop-card .pl {
	grid-column: 2 / -1;
	color: var(--muted);
	font-size: 0.82rem;
}

/* The last train tonight, under the next; amber when it is the one. */
.stop-card .last {
	grid-column: 2 / -1;
	color: var(--muted);
	font-size: 0.82rem;
}

.stop-card .last.is {
	color: var(--fair);
	font-weight: 700;
}

/* How punctual the line ran at this hour, in its tone. */
.stop-card .card-hour {
	margin: 0;
	font-size: 0.88rem;
}

.stop-card .card-hour.good { color: var(--good); }
.stop-card .card-hour.fair { color: var(--fair); }
.stop-card .card-hour.poor { color: var(--poor); }

.stop-card .pill.star[aria-pressed="true"] {
	box-shadow: inset 0 0 0 1.5px var(--fair);
}

/* What the timetable notes on the line's trips: chips, the ones a
   rider must act on first and marked. */
.line-notes ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 8px 0 6px;
	padding: 0;
	list-style: none;
}

.line-notes li {
	padding: 4px 11px;
	border-radius: 999px;
	background: var(--paper-low);
	box-shadow: inset 0 0 0 1px var(--outline);
	font-size: 0.88rem;
}

.line-notes li span {
	color: var(--muted);
}

.line-notes li.booking,
.line-facts li.booking {
	box-shadow: inset 0 0 0 1.5px var(--poor);
	color: var(--poor);
	font-weight: 700;
}

.line-notes li.important {
	box-shadow: inset 0 0 0 1.5px var(--fair);
	font-weight: 650;
}

.stop-card li.gone time,
.stop-card li.gone .to {
	color: var(--muted);
	text-decoration: line-through;
}

.stop-card .card-doors {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.stop-card .card-doors .pill {
	padding: 6px 14px;
	font-size: 0.88rem;
}

.line-map .mn[role="button"] {
	cursor: pointer;
	border-radius: 6px;
	padding: 0 4px;
}

.line-map .mn[role="button"]:hover {
	background: var(--paper-low);
}

.line-map .mn[role="button"]:focus-visible {
	outline: 2px solid var(--door, var(--ink));
	outline-offset: 2px;
}

.map-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
	color: var(--muted);
	font-size: 0.85rem;
}

.map-legend li {
	display: flex;
	align-items: center;
	gap: 8px;
}

.map-legend .key {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
}

.map-legend .key.ld {
	box-shadow: inset 0 0 0 3px var(--ink);
}

.map-legend .key.some {
	box-shadow: inset 0 0 0 2.5px var(--ink);
	width: 10px;
	height: 10px;
}

/* The next departures from the stop picked, both ways: timetable
   times counting down (line-page.js); the live board is the door
   above them. */
.line-next .next-cols {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
	gap: 12px;
	margin-top: 12px;
}

.line-next .next-col {
	padding: 12px 14px;
	border: 1px solid var(--outline);
	border-radius: var(--radius);
	background: var(--paper-low);
}

.line-next h3 {
	margin: 0 0 8px;
	color: var(--muted);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.line-next ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.line-next li {
	display: grid;
	grid-template-columns: 3.4em minmax(6.5em, max-content) minmax(0, 1fr);
	gap: 8px;
	align-items: baseline;
	padding: 5px 0;
	border-top: 1px solid var(--outline-soft);
	font-variant-numeric: tabular-nums;
}

.line-next li:first-child {
	border-top: 0;
}

.line-next time {
	font-weight: 700;
}

.line-next .in {
	color: var(--coral-ink);
	font-size: 0.9rem;
	font-weight: 600;
}

.line-next .mid {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 6px;
}

.line-next .to {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.line-next .next-none {
	margin: 0;
	color: var(--muted);
}

/* Every departure of a day from the stop picked, behind a button
   under the table of days: a <details>, so it opens with no script;
   hour by hour and each way, as the stop sheets print them. */
.line-all {
	margin: 14px 0 0;
}

.line-all > summary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	list-style: none;
}

.line-all > summary::-webkit-details-marker {
	display: none;
}

.line-all > summary::after {
	content: "";
	width: 7px;
	height: 7px;
	margin-top: -3px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.15s;
}

.line-all[open] > summary::after {
	margin-top: 3px;
	transform: rotate(-135deg);
}

.line-all .tt-days {
	margin: 14px 0 4px;
}

.line-all .tt-date {
	margin: 8px 0;
}

table.tt {
	width: 100%;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
}

table.tt th,
table.tt td {
	padding: 5px 10px;
	border-top: 1px solid var(--outline-soft);
	text-align: left;
	vertical-align: top;
}

table.tt thead th {
	border-top: 0;
	color: var(--muted);
	font-size: 0.8rem;
	font-weight: 700;
}

table.tt th[scope="row"],
table.tt th.h {
	width: 3.2em;
	background: var(--paper-high);
	font-weight: 800;
	text-align: center;
}

table.tt td span {
	display: inline-block;
	min-width: 2.6ch;
	margin-right: 0.7ch;
}

table.tt sup {
	margin-left: 1px;
	color: var(--coral-ink);
	font-size: 0.7em;
	font-weight: 700;
}

/* The day's last departure each way: the way home to know. */
table.tt span.last,
.tt-legend span.last {
	padding: 0 4px;
	border-radius: 4px;
	background: var(--coral-soft);
	color: var(--coral-ink);
	font-weight: 750;
}

.tt-legend span.last {
	display: inline-block;
	font-variant-numeric: tabular-nums;
}

.tt-legend {
	margin: 8px 0 0;
	color: var(--muted);
	font-size: 0.85rem;
}

.tt-legend b {
	color: var(--coral-ink);
}

/* The line's usual train under the head (line_train.rs): the coaches
   seen on its trains, on a rail, pressed to shunt off and back. A
   long train scrolls in its track rather than shrinking to specks. */
/* A line's head (2026-11-17): its plate solid, the facts as chips
   under the title, and the sentence that says it all smaller under
   them. A line with no colour of its own had a pale beige plate the
   title swallowed; it is drawn in ink, as its rail is. */
.page:has(.line-split) h1 .plate:not(.own) {
	background: var(--ink);
	color: var(--paper);
}

.line-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 4px 0 10px;
	padding: 0;
	list-style: none;
}

.line-facts li {
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--paper-low);
	box-shadow: inset 0 0 0 1px var(--outline);
	font-size: 0.88rem;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.line-facts li.good {
	color: var(--good);
}

.line-facts li.fair {
	color: var(--fair);
}

.line-facts li.poor {
	color: var(--poor);
}

.lede.line-lede {
	color: var(--muted);
	font-size: 0.95rem;
	line-height: 1.5;
}

/* The usual train's caption in one line; how it is known folded. */
.line-train .train-more summary {
	cursor: pointer;
	list-style: none;
	color: var(--ink);
	font-weight: 600;
}

.line-train .train-more summary::-webkit-details-marker {
	display: none;
}

.line-train .train-more summary::after {
	content: " ›";
	display: inline-block;
	color: var(--muted);
	transition: transform 0.15s;
}

.line-train .train-more[open] summary::after {
	transform: rotate(90deg);
}

.line-train .train-more p {
	margin: 4px 0 0;
}

/* It pulls in once when the page opens, braking to a stand. */
.line-train .strip.arrive {
	animation: train-arrive 1.6s cubic-bezier(0.05, 0.45, 0.25, 1) both;
}

@keyframes train-arrive {
	from { transform: translateX(105%); }
	to { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
	.line-train .strip.arrive {
		animation: none;
	}
}

/* How the table of days is read, folded behind a small «ⓘ». */
.read-how {
	margin: 10px 0 0;
}

.read-how summary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--muted);
	font-size: 0.85rem;
	cursor: pointer;
	list-style: none;
}

.read-how summary::-webkit-details-marker {
	display: none;
}

.read-how summary::before {
	content: "i";
	display: inline-grid;
	place-items: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1.5px currentColor;
	font-size: 0.7rem;
	font-style: italic;
	font-weight: 800;
}

.read-how .note {
	margin-top: 6px;
}

/* What December changes, where it changes nothing much: a small
   box, not a section the size of one with news. */
.tc-ahead.quiet {
	padding: 12px 16px;
	border-radius: var(--radius);
	background: var(--paper-low);
	box-shadow: inset 0 0 0 1px var(--outline);
}

.tc-ahead.quiet h2 {
	margin: 0 0 4px;
	font-size: 1rem;
}

.tc-ahead.quiet p {
	margin: 0;
	color: var(--muted);
	font-size: 0.9rem;
}

/* Under the diagram: share the line, take it on paper. */
.line-map .line-take {
	margin-top: 18px;
}

.line-train {
	margin: 4px 0 18px;
}

.line-train .track {
	overflow-x: auto;
	overflow-y: hidden;
	padding: 6px 0 0;
	scrollbar-width: thin;
}

.line-train .train-go {
	display: block;
	min-width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 0 0 3px;
	border: 0;
	border-bottom: 2px solid var(--outline);
	background: none;
	cursor: pointer;
	overflow: hidden;
}

/* The drawn vehicle answers a press — a bus indicates and pulls out,
   a tram sparks, a boat rocks — and nothing on the page said so
   (2026-11-24, docs/site-delight-plan.md, point 55). Once, a moment
   after the page has settled, it rolls a hand's breadth forward and
   back: the smallest way of saying «I move». Not for a reader who
   asked for less motion, and not again. */
@media (prefers-reduced-motion: no-preference) {
	.line-train .train-go .strip {
		animation: train-nudge 900ms ease-in-out 1.8s 1;
	}
}

@keyframes train-nudge {
	35% {
		transform: translateX(12px);
	}

	70% {
		transform: translateX(-4px);
	}
}

/* On a phone the diagram comes before the words about the line
   (point 52). The page's best part — the stops, the minutes from the
   one picked and the trains moving between them — stood under a
   paragraph, a drawing and two buttons, a screen and a half down.
   The title, the line at a glance and the stop's own doors stay over
   it; the paragraph and the drawn train follow it. Nothing leaves the
   page: the order in the HTML is the one a search engine and a
   desktop are given. */
@media (max-width: 720px) {
	main:has(> .line-split) {
		display: flex;
		flex-direction: column;
	}

	main:has(> .line-split) > .line-lede,
	main:has(> .line-split) > .line-train {
		order: 1;
	}

	/* Everything after the diagram keeps its place after the two
	   that moved, whatever sections a line has. */
	main:has(> .line-split) > .line-split ~ * {
		order: 2;
	}
}

.line-train .train-go:focus-visible {
	outline: 2px solid var(--coral-ink);
	outline-offset: 3px;
}

.line-train .strip {
	display: flex;
	align-items: flex-end;
	width: max-content;
}

.line-train .strip > span {
	display: block;
	flex: none;
	overflow: visible;
}

.line-train .strip img {
	display: block;
	max-width: none;
	height: auto;
}

.line-train.lone .strip img {
	height: 40px;
	width: auto;
}

.line-train figcaption {
	max-width: 65ch;
	margin-top: 6px;
	color: var(--muted);
	font-size: 0.85rem;
}

/* The vehicle, pressed (/line-vehicle.mjs, docs/station-pages.md,
   *The vehicle that answers*): the script moves the strip and turns
   the lamps up and down through the custom properties and
   attributes below; this is only what each lamp looks like and
   where it sits. A vehicle sits on its wheels, so it pitches about
   the bottom of the drawing; a cabin hangs from the top of its. */
.line-train .strip {
	position: relative;
	transform-origin: 50% 100%;
}

.line-train[data-kind="cable"] .strip {
	transform-origin: 50% 3%;
}

/* A lone vehicle stands on a road as wide as the column, so it has
   somewhere to drive: in a frame its own width it could only
   twitch. */
.line-train.lone {
	width: 100%;
}

.line-train.lone .train-go {
	width: 100%;
	box-sizing: border-box;
	padding-top: 14px;
}

/* A bus drawn facing left pulls away to the left: room for it. */
.line-train.lone[data-kind="bus"][data-nose="left"] .train-go {
	padding-left: 84px;
}

/* A lone vehicle pulls in nose first from the edge behind it. */
.line-train.lone .strip.arrive {
	animation-name: vehicle-arrive;
	animation-duration: 2.2s;
}

.line-train.lone[data-nose="right"] .strip.arrive {
	animation-name: vehicle-arrive-right;
}

@keyframes vehicle-arrive {
	from { transform: translateX(100vw); }
	to { transform: translateX(0); }
}

@keyframes vehicle-arrive-right {
	from { transform: translateX(-105%); }
	to { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
	.line-train.lone .strip.arrive {
		animation: none;
	}
}

/* Lamp colours are paint, not palette: a brake lamp is the same red
   in dark mode. They snap rather than fade: these are filaments. */
.line-train .lv {
	position: absolute;
	display: block;
	pointer-events: none;
}

.line-train .lamp {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	opacity: 0;
	transform: translateY(50%);
}

.line-train .at-nose { left: -1px; }
.line-train .at-tail { right: -1px; }
.line-train[data-nose="right"] .at-nose { left: auto; right: -1px; }
.line-train[data-nose="right"] .at-tail { right: auto; left: -1px; }
.line-train .ahead { right: 100%; }
.line-train .behind { left: 100%; }
.line-train[data-nose="right"] .ahead { right: auto; left: 100%; }
.line-train[data-nose="right"] .behind { left: auto; right: 100%; }

.line-train .lamp.head {
	width: 5px;
	height: 5px;
	background: #fffbe6;
	box-shadow: 0 0 6px 3px rgba(255, 236, 160, 0.9);
	opacity: var(--head, 0);
}

/* The tail lamp and the brake lamp are one lamp turned up: the
   script sets how bright, and flashes it under hard braking as an
   adaptive brake light does. */
.line-train .lamp.rear {
	background: #e5231b;
	box-shadow: 0 0 6px 2px rgba(229, 35, 27, 0.8);
	opacity: var(--rear, 0);
}

/* A white lamp on a white skirt vanished into the bodywork: the dark
   ring is its housing, as on the planner's bus (base.css). */
.line-train .lamp.reverse {
	width: 3px;
	height: 3px;
	background: #f2faff;
	box-shadow: 0 0 0 1px rgba(20, 30, 40, 0.45), 0 0 5px 2px rgba(190, 228, 255, 0.95);
}

.line-train .lamp.blink {
	background: #ffae1a;
	box-shadow: 0 0 6px 2px rgba(255, 160, 20, 0.85);
}

.line-train .strip[data-reverse] .lamp.reverse,
.line-train .strip[data-blink] .lamp.blink {
	opacity: 1;
}

/* Pulling in when the page opens, it brakes all the way. */
.line-train .strip[data-arriving] {
	--head: 0.8;
	--rear: 0.9;
}

/* The headlamps' light on the road ahead, as long as the speed. */
.line-train .beam {
	width: 36px;
	height: 14px;
	opacity: var(--beam, 0);
	transform: translateY(50%);
	background: linear-gradient(to left, rgba(255, 240, 180, 0.6), rgba(255, 240, 180, 0));
	clip-path: polygon(100% 38%, 0 0, 0 100%, 100% 62%);
}

.line-train[data-nose="right"] .beam {
	background: linear-gradient(to right, rgba(255, 240, 180, 0.6), rgba(255, 240, 180, 0));
	clip-path: polygon(0 38%, 100% 0, 100% 100%, 0 62%);
}

/* A tram's pantograph, a trolleybus's poles: an arc at the wire. */
.line-train .spark {
	top: -4px;
	right: var(--from-tail, 0);
	width: 9px;
	height: 9px;
	margin-right: -4px;
	border-radius: 50%;
	background: radial-gradient(circle, #ffffff 0 25%, #9fdcff 45%, rgba(120, 190, 255, 0) 70%);
	opacity: 0;
}

.line-train[data-nose="right"] .spark {
	right: auto;
	left: var(--from-tail, 0);
	margin: 0 0 0 -4px;
}

.line-train .strip[data-spark] .spark {
	opacity: 1;
}

/* The dust a bus out of patience throws back as it leaves. */
.line-train .dust {
	width: 34px;
	height: 18px;
	border-radius: 50%;
	background: radial-gradient(ellipse at center, rgba(150, 140, 125, 0.75), rgba(150, 140, 125, 0) 70%);
	opacity: 0;
}

.line-train .strip[data-dust] .dust {
	animation: vehicle-dust 1.1s ease-out forwards;
}

@keyframes vehicle-dust {
	from { opacity: 0.9; transform: scale(0.4); }
	to { opacity: 0; transform: scale(1.8) translateY(-6px); }
}

/* A boat: the bow wave, the wake behind it, the water churned at
   the stern, and the horn's steam from the funnel. */
.line-train .bow,
.line-train .churn {
	width: 16px;
	height: 9px;
	border-radius: 50%;
	background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.95), rgba(220, 238, 250, 0) 70%);
	transform: translateY(40%);
}

.line-train .bow {
	opacity: var(--wake, 0);
}

.line-train .churn {
	width: 22px;
	opacity: var(--churn, 0);
}

.line-train .wake {
	height: 5px;
	width: calc(var(--wake, 0) * 110px);
	opacity: var(--wake, 0);
	transform: translateY(30%);
	background: linear-gradient(to right, rgba(255, 255, 255, 0.9), rgba(200, 230, 248, 0));
	border-radius: 3px;
}

.line-train[data-nose="right"] .wake {
	background: linear-gradient(to left, rgba(255, 255, 255, 0.9), rgba(200, 230, 248, 0));
}

.line-train .puff {
	top: -6px;
	left: var(--from-nose, 0);
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 0 0 1px rgba(120, 130, 140, 0.35);
	opacity: clamp(0, calc((1 - var(--puff, -1)) * (var(--puff, -1) + 1) * 1.4), 1);
	transform: translateY(calc(var(--puff, 0) * -18px)) scale(calc(0.6 + var(--puff, 0) * 0.9));
}

.line-train .puff.late {
	margin-left: 5px;
	transform: translateY(calc(var(--puff, 0) * -11px)) scale(calc(0.4 + var(--puff, 0) * 0.6));
}

.line-train[data-nose="right"] .puff {
	left: auto;
	right: var(--from-nose, 0);
}

/* Where the delay builds (line_record.rs): a sentence for each way,
   and the button that shows it on the diagram. */
.line-record .record-builds {
	margin-top: 22px;
}

.line-record .record-builds h3 {
	margin: 0 0 4px;
	font-size: 1.05rem;
}

.line-record .builds-said {
	max-width: 75ch;
	margin: 8px 0;
}

.line-record .builds-show {
	margin: 12px 0 0;
}

/* Each way's ladder: the station, the share that left it on time
   as a bar, the number, and the drop where the delay builds. Side
   by side where there is room, one under the other on a phone. */
.line-record .builds-ways {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
	gap: 8px 28px;
}

.line-record .builds-ladder {
	display: grid;
	gap: 2px;
	margin: 6px 0 10px;
	padding: 0;
	list-style: none;
	font-variant-numeric: tabular-nums;
}

.line-record .builds-ladder li {
	display: grid;
	grid-template-columns: minmax(0, 9.5em) minmax(40px, 1fr) 3.4em 2.6em;
	align-items: center;
	gap: 10px;
	min-height: 28px;
	padding: 0 6px;
	border-radius: 6px;
	font-size: 0.92rem;
}

.line-record .builds-ladder .st {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.line-record .builds-ladder .bar {
	height: 8px;
	border-radius: 4px;
	background: var(--paper-high);
	overflow: hidden;
}

.line-record .builds-ladder .bar i {
	display: block;
	height: 100%;
	border-radius: 4px;
	background: currentColor;
}

.line-record .builds-ladder li.good .bar { color: var(--good); }
.line-record .builds-ladder li.fair .bar { color: var(--fair); }
.line-record .builds-ladder li.poor .bar { color: var(--poor); }

.line-record .builds-ladder b {
	text-align: right;
	font-weight: 700;
}

.line-record .builds-ladder li.good b { color: var(--good); }
.line-record .builds-ladder li.fair b { color: var(--fair); }
.line-record .builds-ladder li.poor b { color: var(--poor); }

.line-record .builds-ladder em {
	color: var(--fair);
	font-size: 0.82rem;
	font-style: normal;
	font-weight: 700;
}

/* The stretch where it builds most, marked as the sentence names it. */
.line-record .builds-ladder li.big {
	background: var(--paper-low);
	box-shadow: inset 0 0 0 1px var(--outline);
}

.line-record .builds-ladder li.big em {
	color: var(--poor);
}

.line-record .builds-note {
	margin: 4px 0 0;
	color: var(--muted);
	font-size: 0.85rem;
}

/* How punctual the line has been (line_record.rs): the share in
   large type, the counts, and a bar per hour of arrival. */
.line-record .record-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
	margin: 8px 0 4px;
}

.line-record .record-head strong {
	font-size: 2.4rem;
	font-weight: 800;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.line-record .record-head.good strong { color: var(--good); }
.line-record .record-head.fair strong { color: var(--fair); }
.line-record .record-head.poor strong { color: var(--poor); }

.line-record .record-head span {
	color: var(--muted);
	font-weight: 600;
}

.record-hours {
	margin: 16px 0 0;
}

.record-hours .bars {
	display: flex;
	align-items: flex-end;
	gap: 3px;
	height: 96px;
	padding-bottom: 18px;
	overflow-x: auto;
}

.record-hours .bar {
	position: relative;
	display: flex;
	flex: 1 0 14px;
	align-items: flex-end;
	height: 100%;
	border-radius: 3px 3px 0 0;
	background: var(--paper-high);
}

.record-hours .bar i {
	display: block;
	width: 100%;
	border-radius: 3px 3px 0 0;
}

.record-hours .bar.good i { background: var(--good); }
.record-hours .bar.fair i { background: var(--fair); }
.record-hours .bar.poor i { background: var(--poor); }

.record-hours .bar b {
	position: absolute;
	bottom: -18px;
	left: 50%;
	transform: translateX(-50%);
	color: var(--muted);
	font-size: 0.7rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.record-hours .bar:nth-child(odd) b {
	visibility: hidden;
}

.record-hours .bar[role="button"] {
	cursor: pointer;
}

.record-hours .bar[role="button"]:focus-visible {
	outline: 2px solid var(--door, var(--ink));
	outline-offset: 2px;
}

.record-hours .bar.worst,
.record-hours .bar.on {
	box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink);
}

.record-hours .bar.worst b,
.record-hours .bar.on b {
	visibility: visible;
	color: var(--ink);
}

.record-hours .bar-said {
	margin: 8px 0 0;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
}

.line-record .worst-hour {
	margin: 14px 0 0;
	font-weight: 650;
}

.line-record .worst-hour.fair {
	color: var(--fair);
}

.line-record .worst-hour.poor {
	color: var(--poor);
}

.record-hours figcaption {
	margin-top: 8px;
	color: var(--muted);
	font-size: 0.85rem;
}

/* A line's planned changes (line_changes.rs): a card per change,
   when first, then which way and what, then from where. */
.line-changes-list {
	display: grid;
	gap: 10px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.line-changes-list li {
	padding: 12px 14px;
	border: 1px solid var(--outline);
	border-radius: var(--radius);
	background: var(--paper-low);
}

.line-changes-list p {
	margin: 0;
}

.line-changes-list .when {
	font-weight: 700;
}

.line-changes-list .when .badge {
	margin-left: 6px;
}

.line-changes-list .what {
	margin-top: 2px;
}

.line-changes-list .towards {
	color: var(--muted);
	font-weight: 650;
}

.line-changes-list .where {
	margin-top: 4px;
	color: var(--muted);
	font-size: 0.9rem;
}

.line-changes-more {
	margin-top: 10px;
}

.line-changes-more > summary {
	cursor: pointer;
}

/* The line, live (line-page.js): the trains running now drawn on
   the diagram, a marker each, moving between the dots of the stops
   they are between; green, amber or coral by how late, hollow where
   only the timetable says where they are. Above the diagram, a line
   that counts them, and the operators' messages about the line. */
.line-map {
	position: relative;
}

.line-map .trains {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 2;
}

.line-map .train {
	--tone: var(--good);
	position: absolute;
	left: 0;
	top: 0;
	width: 0;
	height: 0;
	transition: transform 1s linear;
}

.line-map .train .tn {
	position: absolute;
	left: 0;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
	min-width: 22px;
	height: 22px;
	padding: 0 5px;
	box-sizing: border-box;
	border-radius: 999px;
	background: var(--tone);
	color: var(--on-tone);
	box-shadow: 0 0 0 2px var(--paper), 0 2px 6px rgba(0, 0, 0, 0.22);
	transform: translate(-50%, -50%);
	cursor: pointer;
	pointer-events: auto;
}

.line-map .trains.jump .train {
	transition: none;
}

.line-map .train.fair {
	--tone: var(--fair);
}

.line-map .train.poor {
	--tone: var(--poor);
}

.line-map .train.plan .tn {
	background: var(--paper);
	box-shadow: inset 0 0 0 2.5px var(--muted), 0 0 0 2px var(--paper);
}

.line-map .train .chev {
	flex: none;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-bottom: 7px solid var(--on-tone);
}

.line-map .train.down .chev {
	transform: rotate(180deg);
}

.line-map .train.plan .chev {
	border-bottom-color: var(--muted);
}

.line-map .train .delay {
	font-size: 0.75rem;
	font-weight: 800;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.line-map .train .delay[hidden] {
	display: none;
}

.line-map .train .tn:hover {
	box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--tone), 0 3px 10px rgba(0, 0, 0, 0.3);
}

.line-map .train:hover {
	z-index: 1;
}

.line-map .train-tip {
	position: absolute;
	z-index: 3;
	display: grid;
	gap: 1px;
	max-width: min(260px, 70vw);
	padding: 8px 12px;
	border-radius: var(--radius);
	background: var(--ink);
	color: var(--paper);
	font-size: 0.85rem;
	line-height: 1.35;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
	pointer-events: none;
}

.line-map .train-tip[hidden] {
	display: none;
}

.line-map .live-now {
	display: grid;
	gap: 8px;
	margin: 10px 0 4px;
	padding: 10px 14px;
	border-radius: var(--radius);
	background: var(--paper-low);
	box-shadow: inset 0 0 0 1px var(--outline);
}

.line-map .live-now[hidden] {
	display: none;
}

.line-map .live-state {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin: 0;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
}

.line-map .live-dot {
	flex: none;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--muted);
	transform: translateY(-1px);
}

.line-map .live-now.on .live-dot {
	background: var(--good);
	box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent);
	animation: live-pulse 2s ease-out infinite;
}

@keyframes live-pulse {
	0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 55%, transparent); }
	100% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--good) 0%, transparent); }
}

.line-map .live-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--muted);
	font-size: 0.8rem;
}

.line-map .live-legend li {
	display: flex;
	align-items: center;
	gap: 6px;
}

.line-map .live-now:not(.on) .live-legend li:not([data-kind="plan"]):not([data-kind="lane"]) {
	display: none;
}

.line-map .train.mini {
	position: relative;
	width: 12px;
	height: 12px;
}

.line-map .train.mini .tn {
	left: 50%;
	top: 50%;
	min-width: 12px;
	height: 12px;
	padding: 0;
	box-shadow: none;
	cursor: default;
	pointer-events: none;
}

.line-map .train.mini.plan .tn {
	box-shadow: inset 0 0 0 2px var(--muted);
}

.line-map .live-msgs {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.line-map .live-msgs[hidden] {
	display: none;
}

.line-map .live-msgs li {
	position: relative;
	padding: 6px 10px 6px 30px;
	border-radius: 8px;
	background: color-mix(in srgb, var(--fair) 14%, var(--paper));
	font-size: 0.9rem;
}

.line-map .live-msgs li::before {
	content: "!";
	position: absolute;
	left: 9px;
	top: 7px;
	display: grid;
	place-items: center;
	width: 15px;
	height: 15px;
	border-radius: 50%;
	background: var(--fair);
	color: var(--on-tone);
	font-size: 0.7rem;
	font-weight: 800;
}

/* The platform under a departure's end: «Gleis 2». */
.line-next .to .pl {
	display: block;
	color: var(--muted);
	font-size: 0.8rem;
	font-weight: 500;
}

/* Over the diagram: the next train each way from the stop picked,
   in a sentence (line-page.js, `drawYours`). */
.line-map .live-yours {
	display: grid;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.95rem;
	line-height: 1.4;
}

.line-map .live-yours:empty {
	display: none;
}

.line-map .live-yours li {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.line-map .live-yours li.fair strong {
	color: var(--fair);
}

.line-map .live-yours li.poor strong,
.line-map .live-yours li.gone strong {
	color: var(--poor);
}

/* The diagram's two views, a switch drawn as the pair it is: the
   trains as they run now, and how punctual each way has been. */
.line-map .view-switch {
	display: inline-flex;
	margin: 12px 0 2px;
	padding: 3px;
	border-radius: 999px;
	background: var(--paper-low);
	box-shadow: inset 0 0 0 1px var(--outline);
}

.line-map .view-switch[hidden] {
	display: none;
}

.line-map .view-switch button {
	min-height: 34px;
	padding: 4px 16px;
	border: 0;
	border-radius: 999px;
	background: none;
	color: var(--muted);
	font: inherit;
	font-size: 0.92rem;
	font-weight: 650;
	cursor: pointer;
}

.line-map .view-switch button[aria-pressed="true"] {
	background: var(--ink);
	color: var(--paper);
}

.line-map .view-switch button:focus-visible {
	outline: 2px solid var(--door, var(--ink));
	outline-offset: 2px;
}

.line-map .rec-now {
	display: grid;
	gap: 6px;
	margin: 10px 0 4px;
	padding: 10px 14px;
	border-radius: var(--radius);
	background: var(--paper-low);
	box-shadow: inset 0 0 0 1px var(--outline);
	font-size: 0.92rem;
}

.line-map .rec-now[hidden] {
	display: none;
}

.line-map .rec-now p {
	margin: 0;
	color: var(--muted);
}

.line-map .rec-now ul {
	display: grid;
	gap: 2px;
	margin: 0;
	padding-left: 18px;
}

/* Each way's lane, coloured by how punctual its trains left the
   station at the end of each section; the rail itself faded. */
.line-map .rec-lanes {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

.line-map .rec-seg {
	--tone: var(--good);
	position: absolute;
	height: 6px;
	margin-top: -3px;
	background: var(--tone);
	transform-origin: 0 50%;
}

.line-map .rec-seg.fair {
	--tone: var(--fair);
}

.line-map .rec-seg.poor {
	--tone: var(--poor);
}

/* Where the way loses most: twice as wide. */
.line-map .rec-seg.worst {
	height: 12px;
	margin-top: -6px;
}

.line-map.rec .tk .u,
.line-map.rec .tk .d,
.line-map.rec .c {
	opacity: 0.3;
}

.line-map.rec .trains {
	display: none;
}

.line-map .rec-worse {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	margin: 2px 0 0 0;
	padding: 1px 8px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--poor) 14%, transparent);
	color: var(--poor);
	font-size: 0.8rem;
	font-weight: 700;
	white-space: normal;
}

.line-map .rec-worse .dir {
	border-bottom-color: currentColor;
}

.line-map .nm .rec-worse {
	display: flex;
	width: fit-content;
}

.line-map .mn .rec-pc {
	display: flex;
	align-items: baseline;
	justify-content: flex-end;
	gap: 4px;
	font-size: 0.85rem;
	white-space: nowrap;
}

.line-map .rec-pc .dir {
	border-left-width: 4px;
	border-right-width: 4px;
	border-bottom: 6px solid currentColor;
}

.line-map .rec-pc.good {
	color: var(--good);
}

.line-map .rec-pc.fair {
	color: var(--fair);
}

.line-map .rec-pc.poor {
	color: var(--poor);
}

/* The train the stop picked is waiting for: ringed in ink, and a
   tag beside it that counts down to it. */
.line-map .train.yours .tn {
	box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink), 0 2px 8px rgba(0, 0, 0, 0.28);
}

.line-map .train.yours {
	z-index: 1;
}

.line-map .train .tag {
	position: absolute;
	left: 16px;
	top: 0;
	transform: translateY(-50%);
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--ink);
	color: var(--paper);
	font-size: 0.75rem;
	font-weight: 750;
	line-height: 1.35;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
	pointer-events: none;
}

/* From the left lane, past the right one, so a train coming the
   other way is not hidden under it. */
.line-map .train.up .tag {
	left: 38px;
}

/* The next departures' live delays: «+3 Min.» beside the time,
   a cancelled one struck through. */
.line-next .late,
.stop-card .late {
	padding: 0 6px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 750;
	white-space: nowrap;
}

.line-next .late.slight,
.stop-card .late.slight {
	background: color-mix(in srgb, var(--muted) 14%, transparent);
	color: var(--muted);
}

.line-next .late.fair,
.stop-card .late.fair {
	background: color-mix(in srgb, var(--fair) 18%, transparent);
	color: var(--fair);
}

.line-next .late.poor,
.stop-card .late.poor {
	background: color-mix(in srgb, var(--poor) 16%, transparent);
	color: var(--poor);
}

.line-next .late.good {
	color: var(--good);
}

.line-next li.gone time,
.line-next li.gone .to {
	text-decoration: line-through;
	color: var(--muted);
}

.line-next li.live:not(.gone) .in {
	color: var(--good);
}

@media (prefers-reduced-motion: reduce) {
	.line-map .train {
		transition: none;
	}

	.line-map .live-now.on .live-dot {
		animation: none;
	}
}

/* What else leaves from a stop of the diagram: a small glyph per
   kind of transport, after its name. */
.line-map .modes {
	display: inline-flex;
	gap: 3px;
	margin-left: 6px;
	vertical-align: -2px;
}

.line-map .to-mode {
	width: 15px;
	height: 15px;
	fill: var(--muted);
}

/* The page's stop picker: every section below answers for it. */
.stop-pick {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin: 14px 0 0;
	font-weight: 600;
}

/* Room between the stop picked and the doors it opens. */
.stop-pick + .doors {
	margin-top: 18px;
}

.stop-pick select {
	min-width: 0;
	max-width: 100%;
	padding: 6px 10px;
	border: 1px solid var(--outline);
	border-radius: var(--radius);
	background: var(--paper-low);
	color: var(--ink);
	font: inherit;
	font-weight: 400;
}

.line-sheets li {
	grid-template-columns: minmax(0, 1fr) auto;
}

/* On a phone the five columns of days fit without scrolling. */
@media (max-width: 560px) {
	table.line-days th,
	table.line-days td {
		padding-left: 6px;
		padding-right: 6px;
	}

	table.line-days td,
	table.line-days th[scope="row"] {
		font-size: 0.86rem;
	}

	table.line-days th[scope="row"] {
		white-space: normal;
	}
}

.line-sheets li > a:first-child {
	color: var(--coral-ink);
	font-weight: 600;
	text-decoration: none;
}

/* The index of lines: a town's plates in one wrapping row, each
   plate a link to its line. */
section.line-town {
	margin: 0 0 14px;
}

.line-town h2 {
	margin: 0 0 6px;
	font-size: 1.02rem;
}

.line-plates {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.line-plates a {
	color: var(--ink);
	text-decoration: none;
}

.line-plates .line-name {
	font-size: 0.86rem;
	color: var(--coral-ink);
}

.line-list li {
	grid-template-columns: auto minmax(0, 1fr) auto;
}

.line-list li > a {
	color: var(--coral-ink);
	font-weight: 600;
	text-decoration: none;
}
