:root {
	color-scheme: light;
	--ink: #17383a;
	--deep: #12383c;
	--deep-soft: #097110;
	--paper: #f3f5f1;
	--white: #fff;
	--muted: #647574;
	--line: #dce4df;
	--line-strong: #c8d4ce;
	--coral: #e97859;
	--coral-dark: #ad4d37;
	--gold: #e3bd61;
	--mint: #eaf2ed;
	--radius: 5px;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-width: 320px;
	background-color: var(--paper);
	background-image:
		linear-gradient(rgba(23, 56, 58, .025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(23, 56, 58, .025) 1px, transparent 1px);
	background-size: 26px 26px;
	color: var(--ink);
	font-family: "Trebuchet MS", "Gill Sans", sans-serif;
	-webkit-font-smoothing: antialiased;
}

button,
input,
select {
	font: inherit;
}

.masthead {
	position: relative;
	overflow: hidden;
	background-color: var(--deep);
	background-image:
		repeating-linear-gradient(155deg, transparent 0 31px, rgba(255, 255, 255, .035) 32px, transparent 33px 64px),
		linear-gradient(110deg, #12383c 0%, #17464a 65%, #245a59 100%);
	color: #f6f7f1;
}

.masthead-inner {
	position: relative;
	z-index: 1;
	display: flex;
	width: min(1160px, calc(100% - 48px));
	min-height: 88px;
	margin: 0 auto;
	align-items: center;
	justify-content: space-between;
}

.brand {
	display: inline-flex;
	min-width: 0;
	align-items: center;
	gap: 12px;
	color: inherit;
	text-decoration: none;
}

.brand-mark {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	border-radius: 3px;
	object-fit: contain;
}

.brand-copy {
	display: grid;
	gap: 3px;
}

.brand-kicker,
.eyebrow {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .12em;
}

.brand-kicker {
	color: #c0d5cb;
}

.brand-name {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 20px;
}

.season-stamp {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #d0e0d7;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .12em;
}

.season-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--coral);
	box-shadow: 0 0 0 4px rgba(233, 120, 89, .16);
}

.masthead-rule {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--coral) 0 24%, var(--gold) 24% 36%, transparent 36% 100%);
}

.page-shell {
	width: min(1160px, calc(100% - 48px));
	margin: 0 auto;
}

.intro {
	display: flex;
	min-height: 150px;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 24px 0 20px;
}

.intro-actions {
	display: grid;
	justify-items: end;
	gap: 14px;
}

.eyebrow {
	margin: 0 0 8px;
	color: var(--coral-dark);
}

h1,
h2,
p {
	margin-top: 0;
}

h1,
h2 {
	margin-bottom: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 500;
}

h1 {
	font-size: 38px;
	line-height: 1.12;
}

.title-period {
	color: var(--coral);
}

.scoring-note {
	display: inline-flex;
	margin: 18px 2px 0 0;
	align-items: center;
	gap: 8px;
	color: var(--deep-soft);
	font-size: 13px;
	font-weight: 700;
}

.scoring-note span {
	color: var(--coral-dark);
	font-size: 20px;
}

.view-toggle {
	min-height: 40px;
	padding: 0 17px;
	border: 1px solid var(--deep);
	border-radius: var(--radius);
	background: var(--deep);
	color: #fff;
	cursor: pointer;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	transition: background-color .16s ease, border-color .16s ease;
}

.view-toggle:hover:not(:disabled),
.view-toggle:focus-visible {
	border-color: var(--deep-soft);
	background: var(--deep-soft);
	outline: 2px solid rgba(27, 77, 80, .2);
}

.view-toggle:disabled {
	opacity: .55;
}

.season-summary {
	display: grid;
	grid-template-columns: .78fr .9fr 1.7fr .85fr;
	min-height: 85px;
	border: 1px solid var(--line);
	border-left: 3px solid var(--coral);
	background: rgba(255, 255, 255, .87);
}

.summary-item {
	display: grid;
	min-width: 0;
	align-content: center;
	gap: 5px;
	padding: 13px 20px;
	border-right: 1px solid var(--line);
}

.summary-item:last-child {
	border-right: 0;
}

.summary-label {
	color: var(--muted);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.summary-item strong {
	overflow: hidden;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 22px;
	font-weight: 500;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.summary-leader strong {
	font-size: 19px;
}

.summary-total strong {
	color: var(--deep-soft);
}

.ranking-section {
	margin-top: 42px;
}

.section-heading {
	display: flex;
	min-height: 58px;
	align-items: end;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 15px;
}

.section-heading .eyebrow {
	margin-bottom: 5px;
}

h2 {
	font-size: 27px;
}

.table-tools {
	display: flex;
	align-items: center;
	gap: 8px;
}

.search-field,
.sort-field {
	display: flex;
	height: 38px;
	align-items: center;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	background: var(--white);
}

.search-field {
	width: 215px;
	gap: 8px;
	padding: 0 10px;
}

.search-field svg {
	width: 17px;
	height: 17px;
	flex: 0 0 auto;
	fill: none;
	stroke: var(--muted);
	stroke-linecap: round;
	stroke-width: 1.6;
}

.search-field input {
	width: 100%;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--ink);
	font-size: 12px;
}

.search-field:focus-within,
.sort-field:focus-within {
	outline: 2px solid rgba(233, 120, 89, .24);
	border-color: var(--coral);
}

.sort-field select {
	width: 100%;
	height: 100%;
	padding: 0 27px 0 10px;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--ink);
	font-size: 12px;
}

.table-frame {
	overflow: visible;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--white);
	box-shadow: 0 8px 22px rgba(24, 57, 55, .045);
}

.ranking-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.ranking-table thead {
	position: sticky;
	top: 0;
	z-index: 5;
	background: #eaf0ec;
}

.ranking-table th {
	position: sticky;
	top: 0;
	z-index: 5;
	height: 43px;
	padding: 0 14px;
	color: #536764;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .09em;
	text-align: left;
	text-transform: uppercase;
}

.ranking-table th:first-child,
.ranking-table td:first-child {
	width: 74px;
	padding-left: 20px;
}

.ranking-table th:nth-child(2) {
	width: auto;
}

.ranking-table .races-heading,
.ranking-table .races-cell {
	width: 122px;
	text-align: center;
}

.ranking-table .points-heading,
.ranking-table .points-cell {
	width: 130px;
	text-align: right;
}

.ranking-table .expand-heading,
.ranking-table .expand-cell {
	width: 64px;
	padding-right: 16px;
	text-align: right;
}

.ranking-row > td {
	height: 60px;
	padding: 8px 14px;
	border-top: 1px solid #e9eeeb;
	font-size: 14px;
}

.ranking-row:first-child > td {
	border-top: 0;
}

.ranking-row:hover > td,
.ranking-row.is-open > td {
	background: #f6f9f6;
}

.ranking-row.is-open > td:first-child {
	box-shadow: inset 3px 0 var(--coral);
}

.rank-cell {
	font-variant-numeric: tabular-nums;
}

.rank-mark {
	display: inline-grid;
	width: 30px;
	height: 30px;
	place-items: center;
	border: 1px solid transparent;
	border-radius: 50%;
	color: #71807c;
	font-size: 12px;
	font-weight: 700;
}

.rank-mark.rank-first {
	border-color: #e4c879;
	background: #f8f0d8;
	color: #715916;
}

.rank-mark.rank-second {
	border-color: #c3d1ca;
	background: #eef3f0;
	color: #4c655e;
}

.rank-mark.rank-third {
	border-color: #e3b7a8;
	background: #f8ebe6;
	color: #96513e;
}

.sailor-name {
	display: block;
	overflow-wrap: anywhere;
	font-weight: 700;
}

.sailor-id {
	display: block;
	margin-top: 3px;
	color: #73817e;
	font-size: 10px;
	letter-spacing: .06em;
}

.races-cell {
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.races-cell strong {
	color: var(--ink);
	font-size: 14px;
}

.points-cell {
	color: #16704d;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 21px !important;
	font-variant-numeric: tabular-nums;
}

.expand-toggle {
	display: inline-grid;
	width: 32px;
	height: 32px;
	place-items: center;
	border: 1px solid var(--line-strong);
	border-radius: 50%;
	background: transparent;
	color: var(--deep-soft);
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.expand-toggle:hover,
.expand-toggle:focus-visible {
	border-color: var(--coral);
	background: #fff2ed;
	outline: 0;
}

.expand-toggle[aria-expanded="true"] {
	transform: rotate(45deg);
	border-color: var(--coral);
	background: #fff2ed;
	color: var(--coral-dark);
}

.detail-row[hidden] {
	display: none;
}

.detail-row > td {
	padding: 2px 20px 18px 94px;
	border-bottom: 1px solid var(--line);
	background: #f6f9f6;
}

.race-results {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.race-result {
	display: grid;
	min-width: 0;
	min-height: 55px;
	grid-template-columns: 35px minmax(0, 1fr) auto;
	align-items: center;
	gap: 8px;
	border-bottom: 1px solid #e0e8e2;
}

.race-index {
	color: var(--coral-dark);
	font-size: 10px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.race-name {
	display: block;
	overflow: hidden;
	font-size: 11px;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.race-context {
	display: block;
	margin-top: 3px;
	color: var(--muted);
	font-size: 10px;
}

.race-points {
	min-width: 34px;
	padding: 5px 7px;
	border-radius: 3px;
	background: #e7f2eb;
	color: #16704d;
	font-size: 12px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	text-align: center;
}

.race-points.is-dnc {
	background: #fbe6e3;
	color: #a4483d;
}

.matrix-section {
	margin-top: 26px;
}

.matrix-heading {
	display: flex;
	min-height: 58px;
	align-items: end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 15px;
}

.matrix-heading .eyebrow {
	margin-bottom: 5px;
}

.matrix-race-count {
	padding-bottom: 4px;
	color: var(--muted);
	font-size: 11px;
}

.matrix-scroll {
	max-height: min(72vh, 720px);
	overflow: auto;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	background: var(--white);
	overscroll-behavior: contain;
	box-shadow: 0 8px 22px rgba(24, 57, 55, .045);
}

.matrix-scroll:focus-visible {
	outline: 2px solid rgba(233, 120, 89, .4);
	outline-offset: 2px;
}

.matrix-table {
	width: max-content;
	min-width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-variant-numeric: tabular-nums;
}

.matrix-table th,
.matrix-table td {
	padding: 8px 10px;
	border-right: 1px solid #e5ebe7;
	border-bottom: 1px solid #e5ebe7;
	background: var(--white);
	font-size: 11px;
	text-align: center;
	white-space: nowrap;
}

.matrix-table thead th {
	position: sticky;
	top: 0;
	z-index: 4;
	min-width: 62px;
	height: 46px;
	background: #eaf0ec;
	color: #536764;
	font-size: 10px;
	font-weight: 700;
}

.matrix-table th small,
.matrix-table td small {
	display: block;
	margin-top: 3px;
	color: #71807c;
	font-size: 9px;
	font-weight: 400;
}

.matrix-table .matrix-rank {
	width: 48px;
	min-width: 48px;
	color: #687975;
}

.matrix-table .matrix-name {
	width: 220px;
	min-width: 220px;
	max-width: 220px;
	text-align: left;
}

.matrix-table .matrix-races {
	width: 142px;
	min-width: 142px;
	color: #586c66;
}

.matrix-table .matrix-total {
	width: 80px;
	min-width: 80px;
	color: #16704d;
	font-size: 13px;
	font-weight: 700;
}

.matrix-table .matrix-score {
	min-width: 72px;
	color: #16704d;
	font-weight: 700;
}

.matrix-table .matrix-dnc {
	background: #fbe6e3;
	color: #a4483d;
	font-size: 10px;
}

.matrix-legend {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 24px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.matrix-legend li {
	display: grid;
	min-width: 0;
	grid-template-columns: 38px minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 8px;
	padding: 9px 4px;
	border-bottom: 1px solid var(--line);
	font-size: 11px;
}

.matrix-legend strong {
	color: var(--coral-dark);
	font-size: 10px;
}

.matrix-legend span {
	overflow-wrap: anywhere;
}

.matrix-legend small {
	color: var(--muted);
	font-size: 10px;
	white-space: nowrap;
}

.matrix-table .sticky-rank,
.matrix-table .sticky-name {
	position: sticky;
	background: #fff;
}

.matrix-table .sticky-rank {
	left: 0;
	z-index: 2;
}

.matrix-table .sticky-name {
	left: 48px;
	z-index: 2;
	box-shadow: 1px 0 #dce4df;
}

.matrix-table thead .sticky-rank,
.matrix-table thead .sticky-name {
	z-index: 6;
	background: #eaf0ec;
}

.matrix-table tbody tr:hover td {
	background: #f6f9f6;
}

.matrix-table tbody tr:hover .sticky-rank,
.matrix-table tbody tr:hover .sticky-name {
	background: #f6f9f6;
}

.empty-row td {
	padding: 24px;
	color: var(--muted);
	text-align: center;
}

.load-status {
	margin: 0;
	padding: 22px 0;
	color: var(--muted);
	font-size: 13px;
}

.load-status.is-error {
	color: #9c3d32;
}

.result-count {
	margin: 10px 0 0;
	color: var(--muted);
	font-size: 11px;
}

.page-footer {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 34px;
	padding: 16px 0 24px;
	border-top: 1px solid var(--line-strong);
	color: var(--muted);
	font-size: 10px;
	letter-spacing: .03em;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 700px) {
	.masthead-inner,
	.page-shell {
		width: min(100% - 32px, 560px);
	}

	.masthead-inner {
		min-height: 74px;
	}

	.brand-mark {
		width: 36px;
		height: 36px;
		flex-basis: 36px;
	}

	.brand-name {
		font-size: 18px;
	}

	.intro {
		min-height: 128px;
		align-items: start;
		flex-direction: column;
		justify-content: center;
		gap: 10px;
		padding: 22px 0 17px;
	}

	.intro-actions {
		width: 100%;
		align-items: center;
		grid-template-columns: 1fr auto;
		gap: 10px;
	}

	.view-toggle {
		min-height: 36px;
		padding: 0 12px;
		font-size: 10px;
	}

	h1 {
		font-size: 32px;
	}

	.scoring-note {
		margin: 0;
		font-size: 12px;
	}

	.season-summary {
		grid-template-columns: 1fr 1fr;
	}

	.summary-item {
		min-height: 72px;
		padding: 11px 14px;
		border-bottom: 1px solid var(--line);
	}

	.summary-item:nth-child(2) {
		border-right: 0;
	}

	.summary-item:nth-child(n+3) {
		border-bottom: 0;
	}

	.summary-item strong {
		font-size: 20px;
	}

	.summary-leader strong {
		font-size: 16px;
	}

	.ranking-section {
		margin-top: 32px;
	}

	.section-heading {
		align-items: start;
		flex-direction: column;
		gap: 13px;
	}

	.table-tools {
		width: 100%;
	}

	.search-field {
		width: auto;
		flex: 1 1 auto;
	}

	.sort-field {
		width: 150px;
		flex: 0 0 150px;
	}

	.ranking-table th {
		height: 38px;
		padding: 0 7px;
		font-size: 9px;
		letter-spacing: .04em;
	}

	.ranking-table th:first-child,
	.ranking-table td:first-child {
		width: 43px;
		padding-left: 8px;
	}

	.ranking-table .races-heading,
	.ranking-table .races-cell {
		width: 58px;
	}

	.ranking-table .points-heading,
	.ranking-table .points-cell {
		width: 66px;
	}

	.ranking-table .expand-heading,
	.ranking-table .expand-cell {
		width: 43px;
		padding-right: 7px;
	}

	.ranking-row > td {
		height: 58px;
		padding: 7px;
		font-size: 12px;
	}

	.rank-mark {
		width: 27px;
		height: 27px;
		font-size: 11px;
	}

	.sailor-name {
		font-size: 12px;
		line-height: 1.25;
	}

	.sailor-id {
		font-size: 9px;
	}

	.ranking-table .races-cell,
	.ranking-table .points-cell {
		padding-right: 4px;
		padding-left: 4px;
	}

	.points-cell {
		font-size: 18px !important;
	}

	.races-cell strong {
		font-size: 12px;
	}

	.expand-toggle {
		width: 29px;
		height: 29px;
	}

	.detail-row > td {
		padding: 0 10px 12px 51px;
	}

	.race-results {
		grid-template-columns: minmax(0, 1fr);
	}

	.race-result {
		min-height: 51px;
	}

	.matrix-heading {
		align-items: start;
	}

	.matrix-scroll {
		max-height: 68vh;
	}

	.matrix-table .matrix-name {
		width: 135px;
		min-width: 135px;
		max-width: 135px;
	}

	.matrix-table .matrix-races {
		width: 105px;
	min-width: 105px;
		white-space: normal;
	}

	.matrix-table th,
	.matrix-table td {
		padding: 8px 7px;
		font-size: 10px;
	}

	.matrix-legend {
		grid-template-columns: minmax(0, 1fr);
	}

	.page-footer {
		margin-top: 25px;
		font-size: 9px;
	}
}

@media (max-width: 370px) {
	.masthead-inner,
	.page-shell {
		width: calc(100% - 24px);
	}

	.season-stamp {
		font-size: 9px;
	}

	.sort-field {
		width: 132px;
		flex-basis: 132px;
	}

	.ranking-table th:first-child,
	.ranking-table td:first-child {
		width: 37px;
		padding-left: 5px;
	}

	.ranking-table .races-heading,
	.ranking-table .races-cell {
		width: 52px;
	}

	.ranking-table .points-heading,
	.ranking-table .points-cell {
		width: 58px;
	}

	.ranking-table .expand-heading,
	.ranking-table .expand-cell {
		width: 38px;
		padding-right: 5px;
	}
}

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