/* Statistics pages (on top of ../css/style.css). Generated pages; see
   scripts/build_statistics.py. */

body { max-width: 932px; }

header a { display: inline-block; }

.stats-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	justify-content: center;
	margin-bottom: 1em;
	font-size: 12px;
}
.stats-nav a[aria-current="page"] { color: #333; font-weight: bold; text-decoration: none; }

.panel h1 { font-size: 20px; margin-bottom: 0.3em; }
.panel h2 + p, .panel p + .table-wrap, .panel p + ol { margin-top: 0.4em; }
.lede { font-size: 14px; margin-bottom: 10px; }
.note { color: #666; font-size: 12px; margin-top: 0.8em; }

/* Term colors: darker relatives of the main map's yellow / cyan / magenta,
   so they stay readable as small marks. */
.pop { --c: #c49a00; }
.soda { --c: #0a8fbf; }
.coke { --c: #d13a8a; }
.other { --c: #555; }

.dot {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	margin-right: 5px;
	background: var(--c);
}

.bar {
	display: flex;
	width: 100%;
	height: 14px;
	border-radius: 2px;
	overflow: hidden;
	background: #fff;
}
.panel > .bar { height: 22px; }
.bar .seg { background: var(--c); }
.bar .seg + .seg { box-shadow: inset 1px 0 0 #fff; }

.term-key { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 12px; }

/* Tables */
.table-wrap { overflow-x: auto; margin-top: 8px; }
table { border-collapse: collapse; width: 100%; background: #fff; font-size: 12px; }
th, td { padding: 4px 8px; text-align: left; border-bottom: 1px solid #eee; }
thead th { border-bottom: 2px solid #ccc; white-space: nowrap; vertical-align: bottom; }
tbody th { font-weight: normal; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-col { width: 30%; min-width: 120px; }
tr.group th { background: #f6f6f6; font-weight: bold; padding-top: 10px; }
tbody.subtotal th, tbody.subtotal td { font-weight: bold; border-top: 2px solid #ccc; }
tfoot th, tfoot td { font-weight: bold; border-top: 2px solid #ccc; }
td.num small { display: block; color: #888; font-size: 10px; font-weight: normal; }

.sortable thead th[data-sort] { cursor: pointer; user-select: none; }
.sortable thead th[data-sort]:hover { background: #f6f6f6; }
.sortable thead th[aria-sort]::after { content: " ▾"; color: #999; }
.sortable thead th[aria-sort="ascending"]::after { content: " ▴"; }

/* "Other" answers */
ol.answers {
	list-style: none;
	padding: 0;
	columns: 3 200px;
	column-gap: 24px;
	margin-top: 8px;
}
ol.answers li { break-inside: avoid; padding: 1px 0; }
ol.answers .n {
	display: inline-block;
	min-width: 3.5em;
	text-align: right;
	margin-right: 6px;
	color: #777;
	font-variant-numeric: tabular-nums;
}
.answer-table .answer { font-weight: bold; }
.answer-table .where { color: #555; }

@media (max-width: 640px) {
	.bar-col { display: none; }
	.panel { padding: 12px; }
	th, td { padding: 4px 3px; }
	.dot { margin-right: 3px; }
}
