/* NBATracker: the NFL page. Built from the approved mockup
   (sports-prediction-models/docs/design/nfl-a2.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-own: var(--paper);
	--mark-bar: var(--steel);
	--control-edge: var(--steel);

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

	--c-name: 184px;
	--c-game: 112px;
	--c-block: 208px;
	--c-ruler: 240px;
	--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,
.tower:focus-visible,
.gn: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:empty {
	display: none;
}

.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);
}

/* text links that stand on their own line are at least 24px tall */
.masthead .how,
.ledger p > a,
.keys-toggle {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
}

/* ---------- 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";
}

.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 b {
	color: var(--paper);
	font-weight: 600;
}

.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);
	overflow-wrap: break-word;
}

.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;
}

.close {
	min-height: 32px;
	color: var(--text-lo);
	font-size: 12px;
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
}

/* the game notes: at the top of the list when a game is picked in the rail
   or asked for from an opened row */
.gnotes {
	padding: 24px var(--gutter);
	border-bottom: 1px solid var(--line);
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.gnotes:empty {
	display: none;
}

/* 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 p {
	margin: 0 0 8px;
	max-width: 60ch;
}

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

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

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

.filters {
	padding: 8px 0 16px;
}

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

.search {
	width: 100%;
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--control-edge);
	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;
}

.filter-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 8px var(--gutter);
}

.filter-row .label {
	width: 100%;
}

.sq {
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--control-edge);
	font-weight: 500;
}

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

.games-label {
	padding: 16px var(--gutter) 8px;
	border-top: 1px solid var(--line);
}

.games {
	display: flex;
	flex-direction: column;
}

.day {
	padding: 16px var(--gutter) 4px;
	color: var(--text-lo);
	font-weight: 500;
}

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

.tile .tipline {
	display: flex;
	align-items: baseline;
	gap: 6px;
}

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

.keyline {
	margin: 0;
	padding: 8px var(--gutter);
	color: var(--text-lo);
	border-bottom: 1px solid var(--line);
	max-width: none;
}

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

.tile .pair {
	overflow-wrap: anywhere;
}

.tile.played .tip {
	color: var(--steel);
}

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

.tile.active {
	border-left-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;
}

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

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

.key i {
	display: inline-block;
	flex: none;
}

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

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

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

.k-span {
	width: 12px;
	height: 2px;
	background: 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;
	min-height: 28px;
}

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

/* groups: whitespace, not size, makes the heading */
.pos-h {
	margin: 0;
	padding: 40px var(--gutter) 12px;
	font-size: 16px;
	font-weight: 600;
	display: flex;
	align-items: baseline;
	gap: 4px 12px;
	flex-wrap: wrap;
}

.pos-h span {
	font-size: 13px;
	font-weight: 400;
	color: var(--text-lo);
}

.grid-row {
	display: grid;
	grid-template-columns:
		4px minmax(var(--c-name), 1fr) var(--c-game) var(--c-block)
		var(--c-ruler) var(--c-rem) var(--c-caret);
	grid-template-areas: "band name game block ruler rem caret";
	column-gap: var(--gap);
	align-items: center;
	padding-right: var(--gutter);
}

.band,
.h-band {
	grid-area: band;
}
.name,
.h-name {
	grid-area: name;
}
.game,
.h-game {
	grid-area: game;
}
.block,
.block-head {
	grid-area: block;
}
.ruler,
.track,
.axis {
	grid-area: ruler;
}
.rem,
.h-rem {
	grid-area: rem;
}
.caret-wrap,
.h-end {
	grid-area: caret;
}

.thead {
	min-height: 40px;
	color: var(--text-lo);
	border-top: 1px solid var(--line);
	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 .h.lead {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.thead .h.lead.on {
	color: var(--signal);
}

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

.block,
.thead .block-head {
	display: grid;
	grid-template-columns: 48px 56px 52px 44px;
	align-items: baseline;
	white-space: nowrap;
}

.ph {
	display: none;
}

.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 or opened stops below the sticky column head,
	   never under it (nfl.js sets --head-h to the head's real height) */
	scroll-margin-top: calc(var(--head-h, 56px) + 4px);
}

.band {
	align-self: stretch;
	background: var(--band);
}

/* a name is never clipped: the surname and the first name sit side by side
   while they fit, then the first name drops to a second line. A very long
   name may break inside a word as a last resort; it is never cut. */
.name {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: 8px;
	row-gap: 0;
	min-width: 0;
	padding: 4px 0;
}

.surname {
	max-width: 100%;
	font-family: var(--display);
	font-weight: 700;
	font-size: 22px;
	line-height: 1.05;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	overflow-wrap: anywhere;
}

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

.first {
	max-width: 100%;
	color: var(--text-lo);
	overflow-wrap: anywhere;
}

.first .pos-mark {
	color: var(--paper);
	font-weight: 500;
}

.match-inline {
	display: none;
}

.game {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.game .gm {
	overflow-wrap: anywhere;
}

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

.block .pred {
	font-size: 18px;
	font-weight: 600;
}

.block .line,
.block .pover {
	color: var(--text-lo);
}

.ruler,
.track {
	position: relative;
	height: 24px;
}

.ruler .span {
	position: absolute;
	top: 11px;
	height: 2px;
	background: var(--mark-bar);
}

.ruler .iqr {
	position: absolute;
	top: 9px;
	height: 6px;
	background: var(--mark-bar);
}

.ruler .naive,
.track .own {
	position: absolute;
	top: 3px;
	width: 1px;
	height: 18px;
	background: var(--mark-own);
}

/* what happened: a hollow square on the ruler where the result fell,
   and the result in words where the game column said "played" */
.ruler .got {
	position: absolute;
	top: 8px;
	width: 8px;
	height: 8px;
	box-sizing: border-box;
	border: 2px solid var(--paper);
	background: transparent;
}

.game .when.res {
	color: var(--paper);
	font-weight: 600;
}

.dp.result {
	color: var(--paper);
}

.ruler .pred,
.track .pred {
	position: absolute;
	top: 5px;
	width: 2px;
	height: 14px;
	background: var(--mark-model);
}

/* the chance track: a 0 to 100 baseline, his own rate in white,
   the model's chance in orange. No fill: a fill would read as a
   range, and a long one as good. */
.track .base {
	position: absolute;
	left: 0;
	right: 0;
	top: 12px;
	height: 1px;
	background: var(--steel);
}

/* 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;
	min-width: 0;
	overflow-wrap: break-word;
}

.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 made after kick-off. Greyed, never hidden. */
.item.out .surname,
.item.out .block .pred {
	color: var(--steel);
}

.item.out .ruler .pred,
.item.out .track .pred {
	background: var(--steel);
}

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

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

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

/* the note sits first, over the numbers and the price check,
   with the player's 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;
}

.d-cols > div {
	min-width: 0;
}

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

.big {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 12px;
	margin: 0 0 8px;
	color: var(--text-lo);
}

.big b {
	color: var(--paper);
	font-size: 22px;
	font-weight: 600;
	line-height: 1;
}

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

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

.item.out .big b {
	color: var(--steel);
}

/* the chances table: the handmade element. Each yard line is a rung,
   its bar the chance of more; read top to bottom it is a ladder
   stepping down. All bars steel, on one 0 to 100 scale, never
   coloured by size. */
.ladder {
	margin-top: 24px;
}

.lt {
	border-collapse: collapse;
	width: 100%;
	max-width: 460px;
}

.lt th,
.lt td {
	padding: 3px 10px 3px 0;
	text-align: right;
	font-weight: 400;
	color: var(--paper);
	vertical-align: middle;
	white-space: nowrap;
}

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

.lt thead th {
	color: var(--text-lo);
	font-weight: 500;
	font-size: 12px;
	border-bottom: 1px solid var(--line);
	padding-bottom: 6px;
}

.lt .lbar {
	width: 96px;
	text-align: left;
}

.lt .lbar i {
	display: block;
	height: 6px;
	background: var(--mark-bar);
}

.lt td.ch {
	font-weight: 600;
}

.lt td.dec {
	white-space: normal;
}

.lt tr.avg td {
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.lt tr.avg td:first-child span {
	color: var(--text-lo);
	font-size: 12px;
}

.lt tr.off td {
	color: var(--text-lo);
}

.lt tr.off td.tail {
	white-space: normal;
	text-align: left;
}

/* 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-edge);
	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;
	min-height: 36px;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--control-edge);
	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: 460px;
}

.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;
	max-width: 60ch;
}

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

/* this player */

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

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

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

.linkbtn {
	align-self: flex-start;
	min-height: 32px;
	color: var(--paper);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- 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);
}

/* ---------- 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-name: 168px;
		--c-ruler: 200px;
		--c-rem: 168px;
		--say-lede: 16px;
		--measure-lede: 544px;
	}
	.grid-row {
		grid-template-columns:
			4px minmax(var(--c-name), 1fr) var(--c-block)
			var(--c-ruler) var(--c-rem) var(--c-caret);
		grid-template-areas: "band name block ruler rem caret";
	}
	.game,
	.thead .h-game {
		display: none;
	}
	.match-inline {
		display: inline;
	}
	.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) {
	.masthead .date {
		grid-column: 1 / span 5;
	}
	.masthead .meta {
		grid-column: 6 / span 7;
	}
	.page {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"words"
			"rec"
			"rail"
			"tower";
	}
	.rec {
		border-right: 0;
	}
	.rail {
		position: static;
		max-height: none;
		border-right: 0;
		border-bottom: 1px solid var(--line);
		display: grid;
		grid-template-columns: minmax(0, 1fr);
	}
	.games-label,
	.day {
		display: none;
	}
	.games {
		order: 1;
		flex-direction: row;
		overflow-x: auto;
		border-bottom: 1px solid var(--line);
	}
	.filters {
		order: 2;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		column-gap: 24px;
		padding: 8px var(--gutter);
	}
	.filter-row,
	.search-wrap {
		padding: 0;
	}
	.filter-row .label {
		width: auto;
	}
	.search-wrap {
		width: 180px;
	}
	.tile {
		border-bottom: 0;
		border-left: 0;
		border-top: 4px solid transparent;
		border-right: 1px solid var(--line);
		min-width: 136px;
		flex: 0 0 auto;
	}
	.tile.active {
		border-top-color: var(--paper);
	}
}

@media (max-width: 1023px) {
	.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 minmax(0, 1fr) var(--c-block) var(--c-ruler) var(--c-caret);
		grid-template-areas:
			"band name block ruler caret"
			"band rem  rem   rem   .";
	}
	.rem {
		padding: 0 0 8px;
	}
	.thead .h-rem {
		display: none;
	}
	.d-cols {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 767px) {
	:root {
		--gutter: 16px;
		--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;
	}
	.page {
		grid-template-areas:
			"words"
			"rail"
			"tower"
			"rec";
	}
	.words {
		padding: 16px var(--gutter) 24px;
		row-gap: 16px;
	}
	.standing,
	.words.bare .standing {
		columns: 1;
	}
	/* phone: the week's note shows its first two lines and the label
	   shortens, so the players move down as little as possible; the
	   standing sentences stay whole */
	.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 {
		border-top: 1px solid var(--line);
		border-bottom: 0;
	}
	.filters {
		column-gap: 12px;
	}
	.filter-row {
		padding: 4px 0;
	}
	.search-wrap {
		width: 100%;
	}
	.search {
		font-size: 16px;
		min-height: 44px;
	}
	.sq {
		width: 44px;
		height: 44px;
	}
	.sort-row {
		height: auto;
		min-height: 48px;
	}
	.sort-opt {
		min-height: 44px;
	}
	.more,
	.close,
	.linkbtn {
		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;
	}
	.tile {
		min-height: 44px;
	}
	.tower-tools {
		gap: 4px 12px;
		padding-top: 8px;
		padding-bottom: 8px;
	}
	.key {
		gap: 4px 12px;
	}
	.pos-h {
		padding-top: 32px;
	}
	/* phone: the name on the left over two lines of numbers on the right;
	   the ruler runs under the numbers and the notes run full width under
	   the row. Each number carries its own short label here, since there is
	   no room for a column header over each. */
	.grid-row {
		grid-template-columns: 4px minmax(0, 1fr) clamp(140px, 44vw, 188px) var(--c-caret);
		grid-template-areas:
			"band name block caret"
			"band name ruler caret"
			"band rem  rem   rem";
		row-gap: 2px;
	}
	.grid-row > .block,
	.grid-row > .block-head {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		column-gap: 6px;
		line-height: 1.15;
	}
	.ph {
		display: inline;
	}
	.block .line .dot {
		display: none;
	}
	.block .pred {
		font-size: 16px;
		grid-row: 1;
		grid-column: 1;
	}
	.block .pover {
		grid-row: 1;
		grid-column: 2;
		font-size: 12px;
	}
	.block .line {
		grid-row: 2;
		grid-column: 1;
		font-size: 12px;
	}
	.block .delta {
		grid-row: 2;
		grid-column: 2;
		font-size: 12px;
		color: var(--text-lo);
	}
	.block {
		white-space: normal;
	}
	.thead .block-head .h:nth-child(2),
	.thead .block-head .h:nth-child(3) {
		display: none;
	}
	.name {
		line-height: 1.15;
	}
	.surname {
		font-size: 18px;
	}
	.first {
		font-size: 12px;
	}
	.rem {
		padding: 0 0 8px;
	}
	.detail-inner {
		padding: 16px var(--gutter) 24px;
	}
	.ctl > .label,
	.field > .label {
		width: 100%;
	}
	.opt {
		min-height: 44px;
	}
	.price {
		min-height: 44px;
	}
	.ledger {
		padding: 24px var(--gutter);
	}
}

/* the ladder bar needs room to mean anything; on a narrow phone
   the numbers carry the table */
@media (max-width: 479px) {
	.lt .lbar {
		display: none;
	}
	.lt th,
	.lt td {
		padding-right: 8px;
	}
}
