/**
 * Spartans Season Pages
 *
 * Takes its palette from the fixtures widget so a season page reads as one
 * piece: the results tables, the awards and the committee all sit on the same
 * type scale and the same rules.
 *
 * The copy runs the full width of its container and is justified. Because the
 * measure is long, the running text is set a little larger and a little more
 * open than a narrow column would need, and hyphenation is on so justification
 * does not open rivers of white space.
 */

.sp-sp {
	--sp-a: #eb0000;
	--sp-a-dark: #b80000;
	--sp-tint: #fdf3f2;
	--sp-tint-2: #fbe6e4;
	--sp-tint-line: #f0cdc9;
	--sp-ink: #111111;
	--sp-ink2: #3f3f3f;
	--sp-mut: #7a7a7a;
	--sp-ln: #e2e2e2;
	--sp-bd: #f4f4f4;

	box-sizing: border-box;
	width: 100%;
	color: var(--sp-ink);
	font-family: inherit;
}

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

/* -------------------------------------------------------- Running copy */

.sp-sp__excerpt p,
.sp-sp__body p {
	text-align: justify;
	text-justify: inter-word;
	-webkit-hyphens: auto;
	hyphens: auto;
	hyphenate-limit-chars: 8 4 4;
}

/* ------------------------------------------------------------- Excerpt */

.sp-sp__excerpt {
	width: 100%;
	margin: 0 0 30px;
}

.sp-sp__excerpt p {
	margin: 0 0 16px;
	font-size: 20px;
	line-height: 1.62;
	color: var(--sp-ink2);
}

.sp-sp__excerpt p:last-child {
	margin-bottom: 0;
}

.sp-sp__excerpt strong {
	color: var(--sp-ink);
	font-weight: 600;
}

/* ----------------------------------------------- The history, folded up

 * This is the main invitation on the page, so it is a panel rather than a
 * rule: a pale red ground, a solid red spine down the left, and a red label.
 * When it is open the body sits on white so the reading area stays clean.
 */

.sp-sp__history {
	margin: 0 0 10px;
	border: 1px solid var(--sp-tint-line);
	border-left: 5px solid var(--sp-a);
	border-radius: 4px;
	background: #ffffff;
	overflow: hidden;
}

.sp-sp__history > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 22px 24px;
	list-style: none;
	cursor: pointer;
	background: var(--sp-tint);
	font-size: 15px;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--sp-a);
	transition: background-color 0.18s ease;
}

.sp-sp__history > summary::-webkit-details-marker {
	display: none;
}

.sp-sp__history > summary:hover {
	background: var(--sp-tint-2);
	color: var(--sp-a-dark);
}

.sp-sp__history > summary:focus-visible {
	outline: 2px solid var(--sp-a);
	outline-offset: -4px;
}

.sp-sp__history[open] > summary {
	border-bottom: 1px solid var(--sp-tint-line);
}

.sp-sp__sum {
	display: flex;
	align-items: baseline;
	gap: 14px;
	flex-wrap: wrap;
}

.sp-sp__mins {
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
	color: var(--sp-mut);
}

.sp-sp__chev {
	position: relative;
	flex: none;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--sp-a);
	transition: transform 0.25s ease, background-color 0.18s ease;
}

.sp-sp__history > summary:hover .sp-sp__chev {
	background: var(--sp-a-dark);
}

.sp-sp__chev::before {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 9px;
	height: 9px;
	border-right: 2.5px solid #ffffff;
	border-bottom: 2.5px solid #ffffff;
	transform: translateY(-3px) rotate(45deg);
}

.sp-sp__history[open] > summary .sp-sp__chev {
	transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
	.sp-sp__chev,
	.sp-sp__history > summary { transition: none; }
}

.sp-sp__body {
	width: 100%;
	padding: 28px 24px 40px;
	background: #ffffff;
}

.sp-sp__body p {
	margin: 0 0 20px;
	font-size: 17.5px;
	line-height: 1.8;
}

.sp-sp__body h2,
.sp-sp__body h3,
.sp-sp__body h4 {
	margin: 44px 0 14px;
	font-size: 24px;
	font-weight: 800;
	line-height: 1.2;
	color: var(--sp-ink);
	text-align: left;
	-webkit-hyphens: manual;
	hyphens: manual;
}

.sp-sp__body h2::after,
.sp-sp__body h3::after,
.sp-sp__body h4::after {
	content: "";
	display: block;
	width: 34px;
	height: 3px;
	margin-top: 10px;
	background: var(--sp-a);
}

.sp-sp__body > *:first-child {
	margin-top: 8px;
}

.sp-sp__body img {
	max-width: 100%;
	height: auto;
}

/* ------------------------------------------------------------- Sections */

.sp-sp__results {
	margin: 34px 0 0;
}

.sp-sp__section {
	margin: 60px 0 0;
}

.sp-sp__h2 {
	margin: 0 0 4px;
	font-size: 30px;
	font-weight: 900;
	line-height: 1.1;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	color: var(--sp-ink);
	text-align: left;
}

.sp-sp__h2::after {
	content: "";
	display: block;
	width: 42px;
	height: 4px;
	margin-top: 10px;
	background: var(--sp-a);
}

.sp-sp__intro {
	margin: 16px 0 24px;
	font-size: 15px;
	line-height: 1.6;
	color: var(--sp-mut);
	text-align: left;
}

.sp-sp__note {
	margin: 14px 0 0;
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--sp-mut);
	text-align: left;
}

.sp-sp__missing {
	padding: 14px 16px;
	border-left: 3px solid var(--sp-a);
	background: var(--sp-bd);
	font-size: 14px;
	color: var(--sp-mut);
}

/* --------------------------------------------------------------- Tables */

.sp-sp__scroll {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.sp-sp__table {
	width: 100%;
	min-width: 480px;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.4;
}

.sp-sp__table caption {
	padding: 0 0 10px;
	font-size: 13px;
	text-align: left;
	color: var(--sp-mut);
}

.sp-sp__table th,
.sp-sp__table td {
	padding: 12px 16px;
	border: 1px solid var(--sp-ln);
	text-align: left;
	vertical-align: middle;
}

.sp-sp__table thead th {
	background: var(--sp-ink);
	color: #ffffff;
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	white-space: nowrap;
}

.sp-sp__table tbody td {
	background: #ffffff;
	color: var(--sp-ink2);
}

/* The group column stays narrow, the award or role takes a fixed share and
 * the name takes the rest, so the awards and committee tables line up. */
.sp-sp__grp {
	width: 16%;
	background: var(--sp-bd) !important;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--sp-mut) !important;
	white-space: nowrap;
	vertical-align: top !important;
}

.sp-sp__table tbody td:nth-child(2) {
	width: 34%;
}

.sp-sp__val {
	font-weight: 700;
	color: var(--sp-ink) !important;
}

.sp-sp__none {
	font-style: italic;
	color: #a5a5a5 !important;
}

.sp-sp__table tbody tr.is-group td {
	border-top: 2px solid var(--sp-ln);
}

/* --------------------------------------------------- Photograph gallery

 * Two rows of four by default, the rest folded away behind a Show all
 * control. The control is a checkbox and a label, so it works with no
 * JavaScript and stays keyboard operable.
 */

.sp-sp__gallery {
	margin-top: 34px;
}

/* The checkbox is the state, never seen. Kept in the layout rather than
 * display:none so it can still take keyboard focus. */
.sp-sp__toggle {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.sp-sp__grid {
	display: grid;
	grid-template-columns: repeat(var(--sp-cols, 4), minmax(0, 1fr));
	gap: 14px;
}

.sp-sp__figure {
	margin: 0;
}

.sp-sp__figure.is-extra {
	display: none;
}

.sp-sp__toggle:checked ~ .sp-sp__grid .sp-sp__figure.is-extra {
	display: block;
}

.sp-sp__figure a {
	display: block;
	line-height: 0;
}

.sp-sp__img,
.sp-sp__figure img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 3px;
	background: var(--sp-bd);
	transition: opacity 0.2s ease;
}

.sp-sp__figure a:hover img {
	opacity: 0.88;
}

.sp-sp__figure figcaption {
	margin-top: 7px;
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--sp-mut);
	text-align: left;
}

.sp-sp__more {
	display: inline-block;
	margin-top: 22px;
	padding: 12px 24px;
	border: 1px solid var(--sp-tint-line);
	border-radius: 3px;
	background: var(--sp-tint);
	color: var(--sp-a);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.sp-sp__more:hover {
	background: var(--sp-a);
	border-color: var(--sp-a);
	color: #ffffff;
}

.sp-sp__toggle:focus-visible ~ .sp-sp__more {
	outline: 2px solid var(--sp-a);
	outline-offset: 3px;
}

/* One label, two captions, swapped by the checkbox. */
.sp-sp__more-shut { display: none; }
.sp-sp__toggle:checked ~ .sp-sp__more .sp-sp__more-open { display: none; }
.sp-sp__toggle:checked ~ .sp-sp__more .sp-sp__more-shut { display: inline; }

@media (prefers-reduced-motion: reduce) {
	.sp-sp__more { transition: none; }
}

@media (max-width: 900px) {
	.sp-sp__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
	.sp-sp__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* --------------------------------------------------------------- Video */

.sp-sp__videos {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	margin-top: 34px;
}

.sp-sp__video {
	margin: 0;
}

.sp-sp__frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000000;
	border-radius: 3px;
	overflow: hidden;
}

.sp-sp__frame iframe,
.sp-sp__frame video,
.sp-sp__frame embed,
.sp-sp__frame object {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.sp-sp__video > video {
	width: 100%;
	height: auto;
	border-radius: 3px;
	background: #000000;
}

.sp-sp__video figcaption {
	margin-top: 8px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--sp-mut);
	text-align: left;
}

@media (max-width: 700px) {
	.sp-sp__videos { grid-template-columns: 1fr; }
}

/* --------------------------------------------- Empty section, editors only */

.sp-sp__empty {
	margin-top: 34px;
	padding: 26px 28px;
	border: 1px dashed var(--sp-ln);
	border-radius: 4px;
	background: var(--sp-bd);
}

.sp-sp__empty-lead {
	margin: 0 0 8px;
	font-size: 17px;
	font-weight: 700;
	color: var(--sp-ink);
	text-align: left;
}

.sp-sp__empty-help {
	margin: 0 0 10px;
	font-size: 15px;
	line-height: 1.6;
	color: var(--sp-ink2);
	text-align: left;
}

.sp-sp__empty-note {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--sp-mut);
	text-align: left;
}

/* ------------------------------------------------------------- Narrow up */

@media (max-width: 1024px) {
	.sp-sp__excerpt p { font-size: 19px; }
	.sp-sp__body p { font-size: 17px; line-height: 1.76; }
}

/* Below this the line is too short to justify well, so the copy goes back to
 * ranged left and hyphenation is switched off with it. */
@media (max-width: 640px) {
	.sp-sp__excerpt p,
	.sp-sp__body p {
		text-align: left;
		-webkit-hyphens: manual;
		hyphens: manual;
	}

	.sp-sp__excerpt p { font-size: 17.5px; line-height: 1.6; }
	.sp-sp__body p { font-size: 16.5px; line-height: 1.72; margin-bottom: 18px; }
	.sp-sp__body { padding: 22px 16px 32px; }
	.sp-sp__history > summary { padding: 18px 16px; font-size: 13.5px; }
	.sp-sp__chev { width: 30px; height: 30px; }
	.sp-sp__h2 { font-size: 24px; }
	.sp-sp__section { margin-top: 44px; }
	.sp-sp__table { font-size: 14px; }
	.sp-sp__table th,
	.sp-sp__table td { padding: 9px 11px; }
	.sp-sp__grp { width: auto; white-space: normal; }
	.sp-sp__body h2,
	.sp-sp__body h3,
	.sp-sp__body h4 { font-size: 21px; margin-top: 36px; }
}
