.rrls-league {
	--rrls-primary: #174f78;
	--rrls-border: #d7dde3;
	--rrls-muted: #64748b;
	color: #17212b;
	font-size: 16px;
}

body.rrls-standalone-page {
	background: #eef2f5;
	color: #17212b;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	margin: 0;
	padding: 28px;
}

.rrls-standalone-shell {
	margin: 0 auto;
	max-width: 1240px;
}

.rrls-league-header {
	border-bottom: 3px solid var(--rrls-primary);
	margin-bottom: 20px;
	padding-bottom: 12px;
}

.rrls-league-brand {
	align-items: center;
	display: flex;
	gap: 20px;
}

.rrls-league-logo img {
	display: block;
	height: auto;
	max-height: 110px;
	max-width: 180px;
	object-fit: contain;
}

.rrls-league-header h2,
.rrls-schedule h3 {
	margin: 0 0 6px;
}

.rrls-league-description p:last-child {
	margin-bottom: 0;
}

.rrls-schedule-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 20px;
}

.rrls-team-filter-wrap {
	align-items: center;
	background: #fff;
	border: 1px solid var(--rrls-border);
	border-radius: 7px;
	display: flex;
	gap: 12px;
	margin: 0 0 20px;
	padding: 12px 14px;
}

.rrls-team-filter {
	background: #fff;
	border: 1px solid #9aa7b2;
	border-radius: 4px;
	font: inherit;
	min-width: 220px;
	padding: 8px 10px;
}

.rrls-schedule-links a,
.rrls-button {
	background: var(--rrls-primary);
	border: 1px solid var(--rrls-primary);
	border-radius: 5px;
	color: #fff !important;
	cursor: pointer;
	display: inline-block;
	font: inherit;
	font-size: .9rem;
	font-weight: 600;
	line-height: 1.2;
	padding: 9px 13px;
	text-decoration: none !important;
}

.rrls-button-secondary {
	background: #fff;
	color: var(--rrls-primary) !important;
}

.rrls-schedule {
	background: #fff;
	border: 1px solid var(--rrls-border);
	border-radius: 8px;
	margin: 0 0 28px;
	padding: 20px;
}

.rrls-schedule-heading {
	display: flex;
	gap: 16px;
	justify-content: space-between;
	margin-bottom: 16px;
}

.rrls-summary {
	color: var(--rrls-muted);
	margin: 0;
}

.rrls-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.rrls-table-wrap {
	overflow-x: auto;
}

.rrls-league table {
	border-collapse: collapse;
	font-size: .94rem;
	margin: 0;
	width: 100%;
}

.rrls-league th,
.rrls-league td {
	border: 1px solid var(--rrls-border);
	padding: 9px 10px;
	text-align: left;
	vertical-align: middle;
}

.rrls-league thead th {
	background: var(--rrls-primary);
	color: #fff;
}

.rrls-public-matrix {
	min-width: 760px;
	table-layout: auto;
}

.rrls-public-records[hidden],
.rrls-public-matrix-wrap[hidden],
.rrls-public-record[hidden] {
	display: none !important;
}

.rrls-public-record-table {
	table-layout: auto;
}

.rrls-public-record-table th:first-child,
.rrls-public-record-table td:first-child {
	text-align: center;
	width: 70px;
}

.rrls-public-record-table th:nth-child(2),
.rrls-public-record-table th:nth-child(3),
.rrls-public-record-table th:nth-child(4) {
	white-space: nowrap;
}

.rrls-record-versus {
	color: var(--rrls-muted);
	font-size: .85em;
	padding: 0 4px;
}

.rrls-public-matrix thead th {
	font-size: 1rem;
	font-weight: 700;
	min-width: 175px;
	text-align: center;
}

.rrls-public-matrix .rrls-public-draw-column {
	left: 0;
	min-width: 145px;
	position: sticky;
	text-align: left;
	z-index: 2;
}

.rrls-public-matrix tbody .rrls-public-draw-column {
	background: #f1f5f8;
}

.rrls-public-matrix-cell,
.rrls-public-bye-cell {
	min-width: 175px;
	text-align: center !important;
}

.rrls-public-game {
	display: flex;
	flex-direction: column;
	gap: 3px;
	line-height: 1.25;
	padding: 4px;
}

.rrls-public-game + .rrls-public-game {
	border-top: 1px solid var(--rrls-border);
	margin-top: 8px;
	padding-top: 10px;
}

.rrls-public-game span {
	color: var(--rrls-muted);
	font-size: .78rem;
}

.rrls-round-divider th {
	background: #dce9f2 !important;
	border-color: #b7cad9 !important;
	color: #123f60 !important;
	font-size: .9rem;
	font-weight: 800;
	letter-spacing: .04em;
	padding: 7px 10px;
	text-align: left !important;
	text-transform: uppercase;
}

.rrls-public-bye-cell {
	background: #fff8dc !important;
}

.rrls-public-matrix-cell.rrls-filter-empty::after {
	color: var(--rrls-muted);
	content: "—";
}

.rrls-league tbody tr:nth-child(even) td,
.rrls-league tbody tr:nth-child(even) th {
	background: #f7f9fb;
}

@media (max-width: 680px) {
	body.rrls-standalone-page {
		padding: 12px;
	}

	.rrls-schedule-heading {
		align-items: flex-start;
		flex-direction: column;
	}

	.rrls-league-brand,
	.rrls-team-filter-wrap {
		align-items: flex-start;
		flex-direction: column;
	}

	.rrls-team-filter {
		box-sizing: border-box;
		min-width: 0;
		width: 100%;
	}

	.rrls-public-record-table thead {
		display: none;
	}

	.rrls-public-record-table,
	.rrls-public-record-table tbody,
	.rrls-public-record-table tr,
	.rrls-public-record-table td {
		display: block;
		width: 100%;
	}

	.rrls-public-record-table tr {
		border: 1px solid var(--rrls-border);
		box-sizing: border-box;
		margin-bottom: 12px;
	}

	.rrls-public-record-table td,
	.rrls-public-record-table td:first-child {
		border: 0;
		box-sizing: border-box;
		display: grid;
		grid-template-columns: 90px 1fr;
		text-align: left;
		width: 100%;
	}

	.rrls-public-record-table td::before {
		content: attr(data-label);
		font-weight: 700;
	}

}

@media print {
	@page {
		margin: 12mm;
		size: landscape;
	}

	body.rrls-printing * {
		visibility: hidden !important;
	}

	body.rrls-printing .rrls-is-printing,
	body.rrls-printing .rrls-is-printing * {
		visibility: visible !important;
	}

	body.rrls-printing .rrls-is-printing {
		background: #fff;
		border: 0;
		left: 0;
		margin: 0;
		padding: 0;
		position: absolute;
		top: 0;
		width: 100%;
	}

	.rrls-no-print {
		display: none !important;
	}

	.rrls-table-wrap {
		overflow: visible;
	}

	.rrls-league table {
		font-size: 10pt;
	}

	.rrls-league th,
	.rrls-league td {
		border-color: #555;
		padding: 5px;
	}
}
