.pat-root {
	--pat-burgundy: #9e1b32;
	--pat-burgundy-dark: #741326;
	--pat-green: #0b3d2e;
	--pat-gold: #d4af37;
	--pat-cream: #faf9f6;
	--pat-ink: #20231f;
	--pat-muted: #69716c;
	--pat-line: #e4e3de;
	--pat-soft-green: #eef5f1;
	--pat-white: #ffffff;
	color: var(--pat-ink);
	font-family: inherit;
	line-height: 1.5;
	margin: 0 auto 2rem;
	max-width: 1440px;
}

.pat-root *,
.pat-root *::before,
.pat-root *::after {
	box-sizing: border-box;
}

.pat-root button,
.pat-root select {
	font: inherit;
}

.pat-page-header {
	background: var(--pat-white);
	border-left: 5px solid var(--pat-burgundy);
	margin-bottom: 1.15rem;
	padding: 0.45rem 0 0.45rem 1.25rem;
}

.pat-page-header h2 {
	color: var(--pat-green);
	font-size: clamp(1.7rem, 3vw, 2.55rem);
	letter-spacing: -0.035em;
	line-height: 1.08;
	margin: 0.15rem 0 0.45rem;
}

.pat-page-header > p:not(.pat-eyebrow) {
	color: #4f5752;
	font-size: 1rem;
	margin: 0;
	max-width: 760px;
}

.pat-eyebrow {
	color: var(--pat-burgundy);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.13em;
	margin: 0;
	text-transform: uppercase;
}

.pat-summary {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1rem;
	margin-top: 0.8rem;
}

.pat-summary span {
	color: var(--pat-muted);
	font-size: 0.8rem;
	font-style: italic;
	position: relative;
}

.pat-summary span + span::before {
	color: var(--pat-gold);
	content: "•";
	font-style: normal;
	left: -0.63rem;
	position: absolute;
}

.pat-view-controls {
	align-items: center;
	background: var(--pat-soft-green);
	border: 1px solid #d7e4dc;
	border-radius: 14px;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	margin-bottom: 1.25rem;
	padding: 0.7rem;
}

.pat-view-switch {
	background: var(--pat-white);
	border: 1px solid #d5dbd7;
	border-radius: 10px;
	display: inline-flex;
	padding: 3px;
}

.pat-view-button {
	appearance: none;
	background: transparent;
	border: 0;
	border-radius: 7px;
	color: var(--pat-green);
	cursor: pointer;
	font-size: 0.84rem;
	font-weight: 800;
	letter-spacing: 0.025em;
	line-height: 1;
	min-height: 40px;
	padding: 0.7rem 1.05rem;
	text-transform: uppercase;
	transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.pat-view-button:hover,
.pat-view-button:focus-visible {
	background: #f5efef;
	color: var(--pat-burgundy);
}

.pat-view-button.is-active {
	background: var(--pat-burgundy);
	box-shadow: 0 3px 10px rgba(116, 19, 38, 0.2);
	color: var(--pat-white);
}

.pat-view-button:focus-visible,
.pat-root select:focus-visible,
.pat-root a:focus-visible {
	outline: 3px solid rgba(212, 175, 55, 0.6);
	outline-offset: 2px;
}

.pat-week-control {
	align-items: center;
	color: var(--pat-green);
	display: flex;
	font-size: 0.78rem;
	font-weight: 800;
	gap: 0.6rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.pat-week-control select,
.pat-table-filters select {
	appearance: none;
	background-color: var(--pat-white);
	background-image: linear-gradient(45deg, transparent 50%, var(--pat-burgundy) 50%), linear-gradient(135deg, var(--pat-burgundy) 50%, transparent 50%);
	background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
	background-repeat: no-repeat;
	background-size: 5px 5px, 5px 5px;
	border: 1px solid #c9d0cc;
	border-radius: 8px;
	color: var(--pat-ink);
	cursor: pointer;
	font-weight: 700;
	min-height: 40px;
	padding: 0.48rem 2rem 0.48rem 0.75rem;
}

.pat-feature-grid {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: minmax(0, 7fr) minmax(310px, 5fr);
	margin-bottom: 1.25rem;
}

.pat-section {
	background: var(--pat-white);
	border: 1px solid var(--pat-line);
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(11, 61, 46, 0.055);
	margin-bottom: 1.25rem;
	overflow: hidden;
	padding: clamp(1rem, 2.5vw, 1.4rem);
}

.pat-feature-grid .pat-section {
	height: 100%;
	margin-bottom: 0;
}

.pat-section--hog-race {
	border-top: 4px solid var(--pat-burgundy);
}

.pat-section--position-leaders {
	border-top: 4px solid var(--pat-gold);
}

.pat-section--tracker {
	border-top: 4px solid var(--pat-green);
}

.pat-section-heading {
	margin-bottom: 1.1rem;
}

.pat-section-heading h3 {
	color: var(--pat-green);
	font-size: clamp(1.18rem, 2vw, 1.48rem);
	letter-spacing: -0.02em;
	line-height: 1.15;
	margin: 0.16rem 0 0;
}

.pat-section-heading--tracker {
	align-items: end;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
}

.pat-podium {
	align-items: end;
	display: grid;
	gap: 0.65rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	min-height: 360px;
}

.pat-podium-card {
	background: linear-gradient(180deg, #ffffff 0%, var(--pat-cream) 100%);
	border: 1px solid var(--pat-line);
	border-radius: 14px 14px 9px 9px;
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 1rem 0.75rem 0.85rem;
	position: relative;
	text-align: center;
}

.pat-podium-card--1 {
	background: linear-gradient(180deg, #fffdf2 0%, #f7edc5 100%);
	border-color: #dfc86f;
	min-height: 330px;
	padding-top: 1.25rem;
}

.pat-podium-card--2 {
	background: linear-gradient(180deg, #ffffff 0%, #e9edef 100%);
	border-color: #cbd0d3;
	min-height: 292px;
}

.pat-podium-card--3 {
	background: linear-gradient(180deg, #fffdfa 0%, #ebd6c2 100%);
	border-color: #c99f79;
	min-height: 270px;
}

.pat-medal {
	align-items: center;
	background: var(--pat-gold);
	border: 3px solid var(--pat-white);
	border-radius: 999px;
	box-shadow: 0 2px 9px rgba(0, 0, 0, 0.18);
	color: #473607;
	display: flex;
	font-size: 1rem;
	font-weight: 900;
	height: 42px;
	justify-content: center;
	left: 50%;
	position: absolute;
	top: -21px;
	transform: translateX(-50%);
	width: 42px;
}

.pat-podium-card--2 .pat-medal {
	background: #cbd0d3;
	color: #33383a;
}

.pat-podium-card--3 .pat-medal {
	background: #b88050;
	color: #ffffff;
}

.pat-podium-site {
	font-size: 0.92rem;
	font-weight: 850;
	line-height: 1.2;
	margin: 1rem 0 0.65rem;
	min-height: 2.25em;
}

.pat-site-name {
	color: var(--pat-green);
	font-weight: 800;
	text-decoration: none;
}

a.pat-site-name:hover {
	color: var(--pat-burgundy);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.pat-podium-score .pat-accuracy {
	color: var(--pat-burgundy);
	display: block;
	font-size: clamp(1.35rem, 2.7vw, 1.8rem);
	font-weight: 900;
	letter-spacing: -0.04em;
	line-height: 1;
}

.pat-podium-score small {
	color: var(--pat-muted);
	display: block;
	font-size: 0.61rem;
	font-weight: 750;
	letter-spacing: 0.055em;
	margin-top: 0.3rem;
	text-transform: uppercase;
}

.pat-podium-stats {
	border-top: 1px solid rgba(90, 90, 80, 0.14);
	display: grid;
	gap: 0.38rem;
	grid-template-columns: 1fr 1fr;
	margin: auto 0 0;
	padding-top: 0.7rem;
}

.pat-podium-stats div:first-child {
	grid-column: 1 / -1;
}

.pat-podium-stats dt {
	color: var(--pat-muted);
	font-size: 0.57rem;
	font-weight: 750;
	letter-spacing: 0.035em;
	line-height: 1.1;
	text-transform: uppercase;
}

.pat-podium-stats dd {
	color: var(--pat-ink);
	font-size: 0.82rem;
	font-weight: 850;
	margin: 0.1rem 0 0;
}

.pat-position-grid {
	display: grid;
	gap: 0.75rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pat-position-card {
	align-items: center;
	background: var(--pat-cream);
	border: 1px solid var(--pat-line);
	border-left: 5px solid var(--pat-position-color);
	border-radius: 10px;
	display: grid;
	gap: 0.25rem 0.55rem;
	grid-template-columns: auto minmax(0, 1fr) auto;
	min-height: 82px;
	padding: 0.72rem;
}

.pat-position-pill {
	align-items: center;
	background: var(--pat-position-color);
	border-radius: 999px;
	color: #ffffff;
	display: inline-flex;
	font-size: 0.67rem;
	font-weight: 900;
	height: 31px;
	justify-content: center;
	letter-spacing: 0.04em;
	min-width: 42px;
	padding: 0 0.55rem;
}

.pat-position-site {
	font-size: 0.76rem;
	line-height: 1.2;
	min-width: 0;
	overflow-wrap: anywhere;
}

.pat-position-score .pat-accuracy {
	color: var(--pat-ink);
	font-size: 1rem;
	font-weight: 900;
	white-space: nowrap;
}

.pat-position-card--empty {
	grid-template-columns: auto 1fr;
}

.pat-table-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	justify-content: flex-end;
}

.pat-table-filters label {
	color: var(--pat-muted);
	display: grid;
	font-size: 0.62rem;
	font-weight: 800;
	gap: 0.16rem;
	letter-spacing: 0.055em;
	text-transform: uppercase;
}

.pat-table-filters select {
	font-size: 0.78rem;
	min-height: 37px;
	min-width: 145px;
	padding-bottom: 0.38rem;
	padding-top: 0.38rem;
	text-transform: none;
}

.pat-table-wrap {
	border: 1px solid var(--pat-line);
	border-radius: 10px;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
}

.pat-table {
	border: 0;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 0.78rem;
	margin: 0;
	min-width: 930px;
	width: 100%;
}

.pat-table--position {
	min-width: 920px;
}

.pat-table thead th {
	background: var(--pat-green);
	border: 0;
	color: #ffffff;
	font-size: 0.64rem;
	font-weight: 800;
	letter-spacing: 0.045em;
	padding: 0.75rem 0.6rem;
	text-align: center;
	text-transform: uppercase;
	white-space: nowrap;
}

.pat-table thead th:nth-child(2) {
	text-align: left;
}

.pat-table tbody td,
.pat-table tbody th {
	background: #ffffff;
	border: 0;
	border-bottom: 1px solid #ecece8;
	color: var(--pat-ink);
	font-size: 0.78rem;
	padding: 0.72rem 0.6rem;
	text-align: center;
	vertical-align: middle;
}

.pat-table tbody th {
	font-weight: 800;
	min-width: 155px;
	text-align: left;
}

.pat-table tbody tr:nth-child(even) td,
.pat-table tbody tr:nth-child(even) th {
	background: #fafbf9;
}

.pat-table tbody tr:last-child td,
.pat-table tbody tr:last-child th {
	border-bottom: 0;
}

.pat-table tbody tr:hover td,
.pat-table tbody tr:hover th {
	background: #f3f7f4;
}

.pat-table .pat-accuracy {
	font-weight: 750;
	white-space: nowrap;
}

.pat-table .pat-overall-cell .pat-accuracy {
	color: var(--pat-burgundy);
	font-weight: 900;
}

.pat-rank {
	align-items: center;
	background: var(--pat-soft-green);
	border-radius: 999px;
	color: var(--pat-green);
	display: inline-flex;
	font-weight: 900;
	height: 28px;
	justify-content: center;
	min-width: 28px;
	padding: 0 0.4rem;
}

.pat-table-position {
	border-bottom: 3px solid transparent;
	display: inline-block;
	padding-bottom: 0.2rem;
}

.pat-table-position--qb { border-color: #d96075; }
.pat-table-position--rb { border-color: #54cf79; }
.pat-table-position--wr { border-color: #f0cf5c; }
.pat-table-position--te { border-color: #58b8ea; }
.pat-table-position--k { border-color: #c0c5cc; }
.pat-table-position--def { border-color: #c99a76; }

.pat-selected-position {
	box-shadow: inset 0 -3px 0 var(--pat-position-color);
	font-weight: 900;
}

.pat-movement {
	font-size: 0.72rem;
	font-weight: 850;
	white-space: nowrap;
}

.pat-movement--up {
	color: #15783a;
}

.pat-movement--down {
	color: var(--pat-burgundy);
}

.pat-movement--same,
.pat-muted {
	color: var(--pat-muted);
}

.pat-loading {
	color: var(--pat-muted);
	font-size: 0.85rem;
	padding: 2rem 1rem;
	text-align: center;
}

.pat-empty {
	align-items: center;
	background: var(--pat-cream);
	border: 1px dashed #d5d2c7;
	border-radius: 10px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 165px;
	padding: 1.2rem;
	text-align: center;
}

.pat-empty-rule {
	background: linear-gradient(90deg, var(--pat-burgundy) 0 67%, var(--pat-gold) 67% 100%);
	border-radius: 999px;
	display: block;
	height: 5px;
	width: 52px;
}

.pat-empty p {
	color: var(--pat-muted);
	font-size: 0.84rem;
	margin: 0.65rem 0 0;
	max-width: 390px;
}

.pat-admin-note {
	background: #fff7d8;
	border-left: 4px solid var(--pat-gold);
	color: #5e4b0d;
	font-size: 0.82rem;
	margin: 0.85rem 0 0;
	padding: 0.75rem 0.9rem;
}

.pat-admin-note a {
	color: var(--pat-burgundy);
	font-weight: 800;
}

.pat-sr-only {
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

@media (max-width: 1050px) {
	.pat-feature-grid {
		grid-template-columns: 1fr;
	}

	.pat-position-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.pat-page-header {
		padding-left: 0.9rem;
	}

	.pat-view-controls,
	.pat-section-heading--tracker {
		align-items: stretch;
		flex-direction: column;
	}

	.pat-view-switch {
		display: grid;
		grid-template-columns: 1fr 1fr;
		width: 100%;
	}

	.pat-view-button {
		font-size: 0.72rem;
		padding-left: 0.55rem;
		padding-right: 0.55rem;
	}

	.pat-week-control {
		justify-content: space-between;
	}

	.pat-week-control select {
		min-width: 82px;
	}

	.pat-position-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.pat-table-filters {
		justify-content: stretch;
	}

	.pat-table-filters label {
		flex: 1 1 140px;
	}

	.pat-table-filters select {
		min-width: 0;
		width: 100%;
	}
}

@media (max-width: 560px) {
	.pat-section {
		border-radius: 12px;
		padding: 0.9rem;
	}

	.pat-podium {
		align-items: stretch;
		grid-template-columns: 1fr;
		min-height: 0;
		padding-top: 0.7rem;
	}

	.pat-podium-card,
	.pat-podium-card--1,
	.pat-podium-card--2,
	.pat-podium-card--3 {
		min-height: 0;
		padding: 0.85rem 0.8rem;
	}

	.pat-podium-card--1 { order: 1; }
	.pat-podium-card--2 { order: 2; }
	.pat-podium-card--3 { order: 3; }

	.pat-podium-site {
		margin-top: 0.8rem;
		min-height: 0;
	}

	.pat-podium-stats {
		margin-top: 0.8rem;
	}

	.pat-position-card {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.pat-position-score {
		grid-column: 2;
	}

	.pat-summary span {
		flex-basis: 100%;
	}

	.pat-summary span + span::before {
		content: "";
	}
}

@media (max-width: 390px) {
	.pat-position-grid {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pat-root *,
	.pat-root *::before,
	.pat-root *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
