/* Typography scale: reduce by ~1/3 */
html { font-size: 85%; }
body { font-size: 1rem; }

/* Adjust Bootstrap heading sizes proportionally */
h1, .h1 { font-size: 1.666rem; }
h2, .h2 { font-size: 1.333rem; }
h3, .h3 { font-size: 1.166rem; }
h4, .h4 { font-size: 1rem; }
h5, .h5 { font-size: 0.9rem; }
h6, .h6 { font-size: 0.85rem; }

.lead { font-size: 1rem; }
.navbar .brand { font-size: 1.2rem; }
.table-sm td, .table-sm th { padding: .2rem .3rem; }
.data-table th { white-space: nowrap; }
.foot-note { font-size: 0.9rem; }

/* Minimalist modern look */
:root {
	--bg: #f8fafb;
	--text: #212529;
	--muted: #6c757d;
	--border: #e9ecef;
	--header-bg: #f8f9fa;
	--pos: #137333; /* subtle green */
	--neg: #a50e0e; /* subtle red */
	--neu: #6c757d; /* muted gray */
	--link: #0d6efd; /* match domain link blue */
}

body {
	background-color: var(--bg);
	color: var(--text);
}

.site-header {
	border-bottom: 1px solid var(--border);
} 

a {
	color: var(--link);
	text-decoration: none;
	transition: color .15s;
}
a:hover, a:focus {
	color: #084298;
	text-decoration: underline;
}

/* Table spacing per request */
.table-responsive { margin: 1rem 0 1.5rem; }
.data-table { margin: 1rem 0 1.5rem; }

/* Header cells: add more vertical padding and subtle style */
.data-table thead th {
	padding-top: .5rem;
	padding-bottom: .5rem;
	vertical-align: middle;
	font-weight: 700;
	color: black;
	background-color: #eaf2fb;
	letter-spacing: 0.01em;
	font-size: 1.05em;
	text-shadow: 0 1px 0 #fff, 0 0.5px 0 #eaf2fb;
}

/* Make header titles centered by default, but keep first column header left-aligned */
.data-table thead th { text-align: center; }
.data-table thead th:first-child { text-align: left; }

/* Prevent wrapping for all table cells */
.data-table th, .data-table td { white-space: nowrap; }

/* Alignments: center rank columns (2 and 3), right-align other data columns */
.data-table th:nth-child(2),
.data-table th:nth-child(3),
.data-table th:nth-child(4),
.data-table td:nth-child(2),
.data-table td:nth-child(3),
.data-table td:nth-child(4) {
	text-align: center;
}
.data-table tbody td:not(:first-child):not(:nth-child(2)):not(:nth-child(3)):not(:nth-child(4)) {
	text-align: right;
}

/* Center all header titles except the first column */
.data-table thead th:not(:first-child) {
	text-align: center;
}

/* Sticky first column on desktop */
@media (min-width: 992px) {
	.data-table thead th:first-child,
	.data-table tbody th.sticky-col,
	.data-table td:first-child {
		position: sticky;
		left: 0;
		z-index: 3;
		background: #fff;
		border-right: 1px solid var(--border);
	}
	/* keep header above body sticky cell - match other header background */
	.data-table thead th:first-child { z-index: 4; background-color: #eaf2fb; }
}

/* Subtle borders and hover clarity */
.table { border-color: var(--border); }
.table-hover tbody tr:hover { background-color: rgba(0,0,0,.025); }

/* Semantic diff coloring */
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.neu { color: var(--neu); }
.rank-diff { font-weight: 500; }

/* Sort arrows for table headers (blue chevron) */
.data-table thead th { position: relative; padding-right: 1.1rem; }
.data-table thead th.sortable { cursor: pointer; }
.data-table thead th::after {
	display: none;
	content: '';
	position: absolute;
	right: 0;
	top: 50%;
	width: 14px; height: 14px; /* more prominent */
	background-repeat: no-repeat;
	background-position: center;
	background-size: 14px 14px;
	color: var(--link);
	transform: translateY(-50%);
}
/* Up = ascending (chevron up), Down = descending */
.data-table thead th.sorted-asc::after {
	display: inline-block;
	/* chevron (stroke uses currentColor) */
	/* Use explicit blue color for Chrome/macOS (currentColor not applied in data-URI) */
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='%230d6efd' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 15 12 9 18 15'/></svg>");
}
.data-table thead th.sorted-desc::after {
	display: inline-block;
	/* Use explicit blue color for Chrome/macOS */
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='%230d6efd' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}
