/* NBATracker: the soccer page. Built from the approved mockup
   (sports-prediction-models/docs/design/soccer-a3.html) in the Timing Tower
   system (DESIGN-BRIEF.md): the same six colour tokens, the same two type
   families, hard corners, hairline rules, no depth effects. The sport stops
   on the masthead rule are in line.css. */

:root {
	/* tier 1: brand tokens, unchanged from the Timing Tower brief */
	--ink: oklch(0.13 0.025 262);
	--ink-2: oklch(0.19 0.025 262);
	--rule: oklch(0.32 0.02 262);
	--paper: oklch(0.94 0.008 80);
	--steel: oklch(0.64 0.025 250);
	--signal: oklch(0.74 0.19 48);

	--display: "Big Shoulders Display", "Arial Narrow", "Helvetica Neue Condensed", Impact, sans-serif;
	--text: "Archivo", Helvetica, Arial, sans-serif;

	/* tier 2: semantic aliases, no new colours */
	--bg: var(--ink);
	--bg-raised: var(--ink-2);
	--line: var(--rule);
	--text-hi: var(--paper);
	--text-lo: var(--steel);
	--mark-model: var(--signal);
	--mark-typical: var(--paper);
	--mark-bar: var(--steel);
	--control-line: var(--steel);

	/* tier 3: layout tokens for this page */
	--gutter: 24px;
	--strip: 48px;
	--rail-w: 240px;
	--gap: 8px;

	--c-time: 56px;
	--c-name: 200px;
	--c-lg: 80px;
	--c-block: 216px;
	--c-rule: 300px;
	--c-rem: 200px;
	--c-caret: 16px;

	/* the written note: the one reading-size text on the page.
	   34em of Archivo is about 65 characters a line. */
	--say: 16px;
	--say-lede: 18px;
	--measure: 544px;
	--measure-lede: 612px;
}

* {
	box-sizing: border-box;
	border-radius: 0;
}

[hidden] {
	display: none !important;
}

html,
body {
	margin: 0;
	padding: 0;
	background: var(--bg);
	color: var(--text-hi);
	font-family: var(--text);
	font-size: 13px;
	line-height: 1.4;
	-webkit-font-smoothing: antialiased;
}

body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.num {
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum" 1;
}

button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	text-align: left;
}

button:focus-visible,
a:focus-visible,
.strip:focus-visible,
.ledger:focus-visible {
	outline: 2px solid var(--paper);
	outline-offset: -2px;
}

a {
	color: var(--paper);
	text-decoration: underline;
	text-underline-offset: 3px;
}

h2 {
	margin: 0;
	font: inherit;
}

.label {
	color: var(--text-lo);
	font-size: 12px;
	font-weight: 500;
}

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

.skip {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 10;
	background: var(--paper);
	color: var(--ink);
	padding: 8px 12px;
	text-decoration: none;
}

.skip:focus {
	left: 8px;
}

/* ---------- masthead ---------- */

.masthead {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	column-gap: var(--gutter);
	align-items: end;
	padding: 32px var(--gutter) 16px;
	border-bottom: 2px solid var(--paper);
}

.masthead .date {
	grid-column: 1 / span 6;
	justify-self: start;
	margin: 0;
	font-family: var(--display);
	font-weight: 900;
	font-size: 96px;
	line-height: 1;
	letter-spacing: -0.005em;
	white-space: nowrap;
	position: relative;
}

/* the card is from an earlier week: the date is struck through, as on the NBA page */
.masthead .date.stale::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 52%;
	height: 2px;
	background: var(--signal);
}

.masthead .meta {
	grid-column: 7 / span 6;
	color: var(--text-lo);
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	text-align: right;
	gap: 4px;
	padding-bottom: 8px;
}

.masthead .meta .gen.stale {
	color: var(--signal);
}

/* a practice card reads in paper, a step brighter than the steel of a live card's line */
.masthead .meta .gen.practice {
	color: var(--paper);
}

.masthead .how {
	color: var(--text-lo);
}

/* ---------- page grid: words, record, rail, tower ---------- */

.page {
	flex: 1;
	display: grid;
	grid-template-columns: var(--rail-w) minmax(0, 1fr);
	grid-template-areas:
		"rec words"
		"rail tower";
}

/* no card to show: the one plain sentence takes the whole width */
.page.nocard {
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "words";
}

/* the words: the week's written note beside the standing
   sentences. Both read before the matches, never folded away. */
.words {
	grid-area: words;
	padding: 24px var(--gutter);
	border-bottom: 1px solid var(--line);
	display: grid;
	grid-template-columns: minmax(0, var(--measure-lede)) minmax(0, 1fr);
	column-gap: 48px;
	row-gap: 24px;
	align-items: start;
}

/* no note yet: the standing sentences take the whole band */
.words.bare {
	grid-template-columns: minmax(0, 1fr);
}

.std h2 {
	margin-bottom: 16px;
}

.standing {
	margin: 0;
	padding: 0;
	list-style: none;
	columns: 1;
	column-gap: 48px;
	counter-reset: s;
}

.words.bare .standing {
	columns: 2;
}

.standing li {
	break-inside: avoid;
	display: grid;
	grid-template-columns: 24px minmax(0, 1fr);
	max-width: 68ch;
	margin: 0 0 8px;
	font-size: 16px;
	line-height: 1.5;
}

.standing li::before {
	counter-increment: s;
	content: counter(s);
	color: var(--text-lo);
	font-size: 12px;
	font-weight: 500;
	padding-top: 4px;
	font-variant-numeric: tabular-nums;
}

/* no card, or a card that could not be read: one plain sentence in the same slot */
.state-line {
	margin: 0;
	max-width: 68ch;
	font-size: 16px;
	line-height: 1.5;
}

.state-line.pad {
	padding: 16px var(--gutter);
}

/* ---------- the written note ---------- */

.voice .head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 8px;
}

.by {
	margin: 0 0 8px;
	color: var(--text-lo);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
}

.voice .head .by {
	margin: 0;
}

.by abbr {
	text-decoration: underline dotted;
	text-underline-offset: 3px;
	cursor: help;
}

.by .short {
	display: none;
}

.say {
	margin: 0;
	max-width: var(--measure);
	font-size: var(--say);
	line-height: 1.55;
	font-weight: 400;
	color: var(--text-hi);
}

.voice.lede .say {
	max-width: var(--measure-lede);
	font-size: var(--say-lede);
	line-height: 1.5;
}

.more {
	display: none;
	min-height: 32px;
	align-items: center;
	color: var(--paper);
	font-size: 13px;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
}

/* how this has done */
.rec {
	grid-area: rec;
	padding: 24px var(--gutter);
	border-right: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.rec h2 {
	margin-bottom: 16px;
}

.rec .fig {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 8px;
	margin: 0 0 12px;
}

.rec .fig b {
	font-family: var(--display);
	font-weight: 700;
	font-size: 32px;
	line-height: 1;
}

.rec .fig b.words-only {
	font-size: 24px;
}

.rec p {
	margin: 0 0 8px;
	max-width: 60ch;
}

.rec .lo {
	color: var(--text-lo);
}

.rec abbr {
	text-decoration: underline dotted;
	text-underline-offset: 3px;
	cursor: help;
}

/* ---------- rail ---------- */

.rail {
	grid-area: rail;
	border-right: 1px solid var(--line);
	position: sticky;
	top: 0;
	align-self: start;
	max-height: 100vh;
	overflow-y: auto;
}

.search-wrap {
	padding: 16px var(--gutter) 8px;
}

.search {
	width: 100%;
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--control-line);
	color: var(--paper);
	padding: 8px 0;
	font: inherit;
}

.search::-webkit-search-decoration,
.search::-webkit-search-cancel-button {
	-webkit-appearance: none;
	display: none;
}

.search::placeholder {
	color: var(--text-lo);
}

.search:focus {
	outline: none;
	border-bottom: 2px solid var(--signal);
	padding-bottom: 7px;
}

.groups-label {
	padding: 16px var(--gutter) 8px;
}

.groups {
	display: flex;
	flex-direction: column;
	border-top: 1px solid var(--line);
}

.tile {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 8px var(--gutter);
	border-left: 4px solid transparent;
	border-bottom: 1px solid var(--line);
}

.tile .tlabel {
	color: var(--text-lo);
	font-size: 12px;
	font-weight: 500;
}

.tile .tip {
	font-family: var(--display);
	font-weight: 700;
	font-size: 32px;
	line-height: 1;
}

.tile .pair {
	color: var(--text-lo);
}

.tile .tnote {
	color: var(--paper);
	font-size: 12px;
	line-height: 1.3;
}

.tile.active {
	border-left-color: var(--paper);
}

.tile.active .pair {
	color: var(--paper);
}

/* ---------- tower ---------- */

.tower {
	grid-area: tower;
	min-width: 0;
	padding-bottom: 32px;
}

.tower-tools {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 40px;
	padding: 0 var(--gutter);
	color: var(--text-lo);
	border-bottom: 1px solid var(--line);
	flex-wrap: wrap;
}

.tower-tools .count {
	margin-left: auto;
	white-space: nowrap;
}

.key {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.key > span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}

.key i {
	display: inline-block;
}

.k-cut {
	width: 2px;
	height: 14px;
	background: var(--mark-model);
}

.k-typ {
	width: 1px;
	height: 16px;
	background: var(--mark-typical);
}

.k-win {
	width: 16px;
	height: 6px;
	background: var(--mark-bar);
}

.k-draw {
	width: 16px;
	height: 6px;
	border: 1px solid var(--mark-bar);
}

.k-out {
	width: 2px;
	height: 14px;
	background: var(--steel);
}

.sort-row {
	display: flex;
	align-items: center;
	gap: 16px;
	height: 40px;
	padding: 0 var(--gutter);
	border-bottom: 1px solid var(--line);
	color: var(--text-lo);
	overflow-x: auto;
	scrollbar-width: none;
}

.sort-opt {
	color: var(--paper);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}

.sort-opt.on {
	color: var(--signal);
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* the strip grid */
.grid-row {
	display: grid;
	grid-template-columns:
		4px var(--c-time) minmax(var(--c-name), 1fr) var(--c-lg)
		var(--c-block) var(--c-rule) var(--c-rem) var(--c-caret);
	grid-template-areas: "band time names lg block rule rem caret";
	column-gap: var(--gap);
	align-items: center;
	padding-right: var(--gutter);
}

.band,
.h-band {
	grid-area: band;
}
.time,
.h-time {
	grid-area: time;
}
.names,
.h-match {
	grid-area: names;
}
.lg,
.h-lg {
	grid-area: lg;
}
.block,
.block-head {
	grid-area: block;
}
.rule,
.axis {
	grid-area: rule;
}
.rem,
.h-rem {
	grid-area: rem;
}
.caret-wrap,
.h-end {
	grid-area: caret;
}

.thead {
	min-height: 40px;
	color: var(--text-lo);
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	background: var(--bg);
	z-index: 2;
}

.thead .h {
	white-space: nowrap;
	font-size: 12px;
	font-weight: 500;
}

.thead abbr {
	text-decoration: none;
	cursor: help;
}

.block,
.thead .block-head {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: 4px;
}

/* the split rule axis */
.axis {
	position: relative;
	height: 28px;
}

.axis .base {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 6px;
	height: 1px;
	background: var(--steel);
}

.axis .tick {
	position: absolute;
	bottom: 6px;
	width: 1px;
	height: 3px;
	background: var(--steel);
}

.axis .tick.major {
	height: 6px;
}

.axis .tl {
	position: absolute;
	bottom: 13px;
	font-size: 12px;
	line-height: 1;
	color: var(--text-lo);
	transform: translateX(-50%);
	white-space: nowrap;
}

.axis .tl.first {
	transform: none;
}

.axis .tl.last {
	transform: translateX(-100%);
}

/* strips */

.item {
	border-bottom: 1px solid var(--line);
}

.strip {
	min-height: var(--strip);
	cursor: pointer;
	/* a row reached by keyboard stops below the sticky column head (40px,
	   50px on a phone), never under it */
	scroll-margin-top: 44px;
}

.band {
	align-self: stretch;
	display: flex;
	flex-direction: column;
}

.band i {
	flex: 1;
	background: var(--b1);
}

.band i + i {
	background: var(--b2);
}

.time {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.time .d {
	color: var(--text-lo);
	font-size: 12px;
}

.time .t {
	font-weight: 500;
	white-space: nowrap;
}

/* a name is never clipped: the two clubs sit side by side while they fit, then
   the away club drops to a second line. Each club stays whole on a wide screen. */
.names {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: 8px;
	row-gap: 2px;
	min-width: 0;
	padding: 4px 0;
}

.names .l1,
.names .l2 {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	max-width: 100%;
	white-space: nowrap;
}

.names .n {
	font-family: var(--display);
	font-weight: 700;
	font-size: 22px;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.01em;
}

.names .vs {
	color: var(--text-lo);
}

.names .l3 {
	display: none;
}

.strip:hover .n,
.strip:focus-visible .n {
	color: var(--signal);
}

.lg {
	color: var(--text-lo);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pr {
	display: flex;
	align-items: baseline;
	gap: 4px;
}

.pr b {
	font-size: 18px;
	font-weight: 600;
}

.pr i {
	font-style: normal;
	color: var(--text-lo);
}

/* the split rule */

.rule {
	position: relative;
	height: 28px;
}

.rule .seg {
	position: absolute;
	top: 11px;
	height: 6px;
}

.rule .seg.win {
	background: var(--mark-bar);
}

.rule .seg.draw {
	border: 1px solid var(--mark-bar);
}

.rule .typ {
	position: absolute;
	top: 3px;
	width: 1px;
	height: 20px;
	background: var(--mark-typical);
}

.rule .cut {
	position: absolute;
	top: 6px;
	width: 2px;
	height: 16px;
	background: var(--mark-model);
}

/* the notes column: every row note, word for word, visible without opening */
.rem {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 12px;
	line-height: 1.3;
	color: var(--paper);
	padding: 4px 0;
}

.caret-wrap {
	color: var(--text-lo);
	display: inline-flex;
	justify-content: flex-end;
}

.item.open .caret {
	transform: rotate(90deg);
}

/* rows out of the record: void or late. Greyed, never hidden. */
.item.out .n,
.item.out .pr b,
.item.out .time .t {
	color: var(--steel);
}

.item.out .rule .cut {
	background: var(--steel);
}

.item.out .rule .typ {
	background: var(--steel);
}

.item.void .time .t {
	text-decoration: line-through;
}

/* ---------- opened row ---------- */

.detail {
	background: var(--bg-raised);
}

/* the note sits first, over the chances and the price check,
   with the match facts beside it */
.detail-inner {
	padding: 16px var(--gutter) 32px 24px;
	display: grid;
	grid-template-columns: minmax(0, 2.15fr) minmax(0, 0.85fr);
	column-gap: 32px;
	row-gap: 24px;
}

.d-main {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.d-cols {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	column-gap: 32px;
	row-gap: 24px;
}

.dk {
	color: var(--text-lo);
	font-size: 12px;
	font-weight: 500;
	margin: 0 0 8px;
}

.dt {
	border-collapse: collapse;
	width: 100%;
	max-width: 440px;
}

.dt th,
.dt td {
	padding: 4px 12px 4px 0;
	text-align: right;
	font-weight: 400;
	color: var(--text-lo);
	vertical-align: baseline;
}

.dt th:first-child,
.dt td:first-child {
	text-align: left;
}

.dt thead th {
	font-weight: 500;
	font-size: 12px;
	border-bottom: 1px solid var(--line);
}

.dt tr.model td {
	color: var(--paper);
	font-weight: 600;
	font-size: 16px;
}

.dt tr.mkt td {
	color: var(--paper);
}

.item.out .dt tr.model td {
	color: var(--steel);
}

.dp {
	margin: 8px 0 0;
	color: var(--text-lo);
	max-width: 60ch;
}

.dp b {
	color: var(--paper);
	font-weight: 500;
}

.mk {
	margin-top: 16px;
}

/* price check */

.settle {
	margin: 0 0 24px;
	max-width: 60ch;
	color: var(--paper);
}

.ctl {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 8px;
}

.ctl > .label {
	width: 72px;
}

.opt {
	min-height: 40px;
	padding: 0 12px;
	border: 1px solid var(--control-line);
	display: inline-flex;
	align-items: center;
	font-weight: 500;
	white-space: nowrap;
}

.opt[aria-pressed="true"] {
	background: var(--paper);
	color: var(--ink);
	border-color: var(--paper);
}

.field {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin: 8px 0 0;
}

.field > .label {
	width: 72px;
}

.price {
	appearance: none;
	-webkit-appearance: none;
	width: 136px;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--control-line);
	color: var(--paper);
	font: inherit;
	font-size: 18px;
	font-weight: 600;
	padding: 6px 0 7px;
}

.price::placeholder {
	color: var(--text-lo);
	font-weight: 400;
}

.price:focus {
	outline: none;
	border-bottom: 2px solid var(--signal);
	padding-bottom: 6px;
}

.practice {
	margin: 0 0 12px;
	color: var(--paper);
	font-weight: 500;
	max-width: 60ch;
}

.hint {
	color: var(--text-lo);
	font-size: 12px;
}

.bo-out {
	margin: 16px 0 0;
}

.bo-grid {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	column-gap: 24px;
	row-gap: 6px;
	margin: 0;
	max-width: 440px;
}

.bo-grid dt {
	color: var(--text-lo);
}

.bo-grid dd {
	margin: 0;
	color: var(--paper);
	font-weight: 600;
}

.bo-grid dd .lo {
	color: var(--text-lo);
	font-weight: 400;
}

.bo-err {
	color: var(--paper);
	margin: 0 0 8px;
}

.small {
	margin: 12px 0 0;
	color: var(--text-lo);
	font-size: 12px;
	max-width: 60ch;
}

/* this match */

.facts {
	border-left: 1px solid var(--line);
	padding-left: 24px;
	color: var(--text-lo);
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-self: start;
}

.facts b {
	color: var(--paper);
	font-weight: 500;
}

.facts .noteline {
	color: var(--paper);
}

/* ---------- footer ledger ---------- */

.ledger {
	border-top: 1px solid var(--line);
	padding: 24px var(--gutter) 32px;
	color: var(--text-lo);
	max-width: 72ch;
}

.ledger p {
	margin: 0 0 8px;
}

.ledger a {
	color: var(--text-lo);
}

.keys-toggle {
	color: var(--paper);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.empty {
	padding: 32px var(--gutter);
	color: var(--text-lo);
}

/* a card with no matches: the rail is gone, the empty message takes the width */
@media (min-width: 1280px) {
	.page.norows {
		grid-template-areas:
			"rec words"
			"tower tower";
	}
}

/* ---------- motion: there is none to carry. Rows open and close in one frame. ---------- */

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}
}

/* ---------- breakpoints ---------- */

@media (max-width: 1439px) {
	:root {
		--c-block: 192px;
		--c-rule: 240px;
		--c-rem: 168px;
		--say-lede: 16px;
		--measure-lede: 544px;
	}
	.grid-row {
		grid-template-columns:
			4px var(--c-time) minmax(var(--c-name), 1fr)
			var(--c-block) var(--c-rule) var(--c-rem) var(--c-caret);
		grid-template-areas: "band time names block rule rem caret";
	}
	.lg,
	.thead .h-lg {
		display: none;
	}
	.pr b {
		font-size: 16px;
	}
	/* the facts drop under the note and the columns */
	.detail-inner {
		grid-template-columns: minmax(0, 1fr);
	}
	.facts {
		border-left: 0;
		padding-left: 0;
		border-top: 1px solid var(--line);
		padding-top: 16px;
	}
}

@media (max-width: 1279px) {
	/* "Week of 26 Nov" at 96px is about 610px: give it eight columns */
	.masthead .date {
		grid-column: 1 / span 8;
	}
	.masthead .meta {
		grid-column: 9 / span 4;
	}
	.page {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"words"
			"rec"
			"rail"
			"tower";
	}
	.rec {
		border-right: 0;
		display: grid;
		grid-template-columns: auto repeat(3, minmax(0, 1fr));
		column-gap: 24px;
		align-items: start;
	}
	.rec h2 {
		grid-column: 1 / -1;
	}
	.rail {
		position: static;
		max-height: none;
		border-right: 0;
		border-bottom: 1px solid var(--line);
		display: grid;
		grid-template-columns: minmax(0, 1fr) 200px;
		align-items: center;
		column-gap: 16px;
	}
	.groups-label {
		display: none;
	}
	.groups {
		order: 1;
		flex-direction: row;
		overflow-x: auto;
		border-top: 0;
		border-right: 1px solid var(--line);
		align-self: stretch;
	}
	.search-wrap {
		order: 2;
		padding: 8px var(--gutter) 8px 0;
	}
	.tile {
		border-bottom: 0;
		border-left: 0;
		border-top: 4px solid transparent;
		border-right: 1px solid var(--line);
		min-width: 200px;
		flex: 0 0 auto;
	}
	.tile.active {
		border-top-color: var(--paper);
	}
}

@media (max-width: 1023px) {
	:root {
		--c-block: 168px;
		--c-rule: 200px;
	}
	.masthead .date,
	.masthead .meta {
		grid-column: 1 / -1;
	}
	.masthead .meta {
		align-items: flex-start;
		text-align: left;
		padding: 8px 0 0;
	}
	.words {
		grid-template-columns: minmax(0, 1fr);
	}
	.standing {
		columns: 2;
	}
	/* the notes leave their column and run under the row */
	.grid-row {
		grid-template-columns:
			4px var(--c-time) minmax(0, 1fr)
			var(--c-block) var(--c-rule) var(--c-caret);
		grid-template-areas:
			"band time names block rule caret"
			"band .    rem   rem   rem  .";
	}
	.rem {
		padding: 0 0 8px;
	}
	.thead .h-rem {
		display: none;
	}
	.names .n {
		font-size: 20px;
	}
}

@media (max-width: 767px) {
	:root {
		--gutter: 16px;
		--strip: 56px;
		--gap: 6px;
		--c-caret: 12px;
	}
	.masthead {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		padding: 24px var(--gutter) 16px;
	}
	.masthead .date {
		font-size: 56px;
		white-space: normal;
	}
	.masthead .meta {
		padding-bottom: 0;
		align-items: flex-start;
		text-align: left;
	}
	/* phone: the week's note shows its first two lines and the
	   label shortens, so the matches move down as little as
	   possible; the standing sentences stay whole */
	.words {
		padding: 16px var(--gutter) 24px;
		row-gap: 16px;
	}
	.standing,
	.words.bare .standing {
		columns: 1;
	}
	.voice.lede:not(.open) .say {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		overflow: hidden;
	}
	.voice.lede.cut .more {
		display: inline-flex;
	}
	.voice.lede .by .long {
		display: none;
	}
	.voice.lede .by .short {
		display: inline;
	}
	.rec {
		display: block;
		border-top: 1px solid var(--line);
		border-bottom: 0;
	}
	.page {
		grid-template-areas:
			"words"
			"rail"
			"tower"
			"rec";
	}
	.rail {
		grid-template-columns: minmax(0, 1fr);
	}
	.groups {
		border-right: 0;
	}
	.search-wrap {
		padding: 8px var(--gutter);
	}
	.search {
		font-size: 16px;
		min-height: 44px;
	}
	.sort-row {
		height: auto;
		min-height: 48px;
	}
	.sort-opt {
		min-height: 44px;
	}
	.more {
		min-height: 44px;
	}
	.keys-toggle {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		min-width: 44px;
	}
	.masthead .how,
	.ledger p > a {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
	}
	.tile .tip {
		font-size: 24px;
	}
	.tower-tools {
		gap: 12px;
		padding-top: 8px;
		padding-bottom: 8px;
	}
	.key {
		gap: 12px;
	}
	/* phone: the three numbers sit over the line, home left, draw
	   centre, away right, so the line labels its own segments;
	   notes run full width under the row */
	.strip {
		scroll-margin-top: 54px;
	}
	.grid-row {
		grid-template-columns: 4px minmax(0, 1fr) clamp(150px, 46vw, 196px) var(--c-caret);
		grid-template-areas:
			"band names block caret"
			"band names rule  caret"
			"band rem   rem   rem";
		row-gap: 2px;
	}
	.grid-row > .block,
	.grid-row > .block-head {
		display: flex;
		justify-content: space-between;
	}
	.time,
	.thead .h-time {
		display: none;
	}
	.names {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: flex-start;
		gap: 0;
		line-height: 1.15;
	}
	.names .n {
		font-size: 18px;
	}
	.names .l2 {
		gap: 4px;
	}
	.names .l2 .n {
		font-family: var(--text);
		font-size: 13px;
		font-weight: 500;
		text-transform: none;
		letter-spacing: 0;
	}
	.names .l3 {
		display: block;
		color: var(--text-lo);
		font-size: 12px;
		white-space: normal;
	}
	.item.void .names .l3 {
		text-decoration: line-through;
	}
	/* on a phone a long name may wrap between words; it is never cut */
	.names,
	.names .l1,
	.names .l2 {
		max-width: 100%;
		white-space: normal;
		overflow-wrap: break-word;
	}
	.names .l2 {
		flex-wrap: wrap;
	}
	.pr {
		line-height: 1.15;
	}
	.pr b {
		font-size: 15px;
	}
	.pr i {
		font-size: 12px;
	}
	.thead .block-head .h-sub {
		display: none;
	}
	.rem {
		padding: 0 0 8px;
	}
	.detail-inner {
		padding: 16px var(--gutter) 24px;
	}
	.d-cols {
		grid-template-columns: minmax(0, 1fr);
	}
	.ctl > .label,
	.field > .label {
		width: 100%;
	}
	.opt {
		min-height: 44px;
	}
	.ledger {
		padding: 24px var(--gutter);
	}
}
