/*
 * Carolina Varsity: the shared stylesheet.
 *
 * Every generated page uses this one file. Change a color or a font here and
 * the whole site follows. It is organized top to bottom:
 *
 *   1. Design tokens   colors, fonts, sizes (start here)
 *   2. Base            the page, links, headings
 *   3. Layout          the page width, columns
 *   4. Masthead        top line, nameplate, menu
 *   5. Pieces          section heads, buttons, chips, tables, tiles
 *   6. Pages           front page, schools list, school and sport pages
 *   7. Footer
 *   8. Small screens
 *
 * The look: a newspaper. Black ink and the logo's red on white paper,
 * Playfair Display for headlines, Jost for everything else.
 */

/* 1. Design tokens ----------------------------------------------------- */
:root {
	--red: #d71920;          /* the logo's red: kickers, buttons, accents */
	--red-dark: #a8121a;     /* hover on red */
	--ink: #111111;          /* headlines and rules */
	--text: #2b2b2b;         /* body text */
	--muted: #6b6b6b;        /* secondary text */
	--rule: #dcdcdc;         /* thin lines between rows */
	--paper: #ffffff;        /* cards and tables */
	--page: #f2f2ef;         /* behind the cards: newsprint gray */
	--chip: #f4f4f2;
	--win: #1b7f3b;
	--loss: #b3261e;
	--tie: #8a6d00;
	--preview: #fff3c4;

	--serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--sans: "Jost", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--wide: 1200px;          /* widest the content gets */
	--gap: 24px;
	--radius: 2px;
	--shadow: 0 1px 2px rgba(0, 0, 0, 0.07);
}

/* 2. Base ---------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--page);
	color: var(--text);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.5;
}

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

a {
	color: var(--ink);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

a:hover {
	color: var(--red);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
	outline: 2px solid var(--red);
	outline-offset: 2px;
}

h1,
h2,
h3 {
	color: var(--ink);
	line-height: 1.15;
}

p {
	margin: 0 0 12px;
}

.skip {
	position: absolute;
	left: -9999px;
}

.skip:focus {
	left: 16px;
	top: 16px;
	z-index: 10;
	padding: 8px 12px;
	background: var(--paper);
}

.muted {
	color: var(--muted);
}

.nowrap {
	white-space: nowrap;
}

/* 3. Layout ------------------------------------------------------------- */
.wrap {
	max-width: var(--wide);
	margin: 0 auto;
	padding: 0 16px;
}

main {
	display: block;
	padding: 24px 0 48px;
}

main section {
	margin-bottom: 32px;
}

.columns {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--gap);
}

@media (min-width: 900px) {
	.columns {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.columns--rank {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	}

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

/* 4. Masthead ----------------------------------------------------------- */
.preview-bar {
	background: var(--preview);
	color: #5a4500;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	padding: 6px 16px;
}

.masthead {
	background: var(--paper);
	box-shadow: var(--shadow);
}

.topline {
	background: var(--ink);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.topline__inner {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding-top: 7px;
	padding-bottom: 7px;
}

.topline a {
	color: #fff;
	text-decoration: none;
}

.topline a:hover {
	color: #ffb3b5;
}

.nameplate {
	display: flex;
	justify-content: center;
	padding-top: 18px;
	padding-bottom: 14px;
}

.nameplate__brand {
	display: flex;
	align-items: center;
	gap: 18px;
	text-decoration: none;
	color: var(--ink);
}

.nameplate__logo {
	width: 92px;
	height: auto;
}

.nameplate__words {
	display: flex;
	flex-direction: column;
}

.nameplate__title {
	font-family: var(--serif);
	font-weight: 900;
	font-size: clamp(34px, 6vw, 58px);
	line-height: 1;
	letter-spacing: -0.01em;
}

.nameplate__tag {
	margin-top: 6px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--red);
}

.sitenav {
	border-top: 1px solid var(--ink);
	border-bottom: 4px double var(--ink);
}

.sitenav__inner {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 4px 26px;
	padding-top: 10px;
	padding-bottom: 10px;
}

.sitenav a {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--ink);
	padding: 2px 0;
	border-bottom: 2px solid transparent;
}

.sitenav a:hover,
.sitenav a[aria-current="page"] {
	color: var(--red);
	border-bottom-color: var(--red);
}

/* 5. Pieces --------------------------------------------------------------- */
.kicker {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--red);
}

.section-head {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: end;
	gap: 0 16px;
	margin-bottom: 14px;
	padding-top: 10px;
	border-top: 3px solid var(--ink);
}

.section-head .kicker {
	grid-column: 1 / -1;
}

.section-head__title {
	margin: 0;
	font-family: var(--serif);
	font-size: 26px;
	font-weight: 700;
}

.section-head__more {
	font-size: 14px;
	font-weight: 600;
	color: var(--red);
	text-decoration: none;
	white-space: nowrap;
}

.section-head__more:hover {
	text-decoration: underline;
}

.button {
	display: inline-block;
	padding: 9px 16px;
	background: var(--red);
	border: 2px solid var(--red);
	border-radius: var(--radius);
	color: #fff;
	font: 600 15px/1.2 var(--sans);
	text-decoration: none;
	cursor: pointer;
}

.button:hover {
	background: var(--red-dark);
	border-color: var(--red-dark);
	color: #fff;
}

.button--quiet {
	background: transparent;
	border-color: var(--ink);
	color: var(--ink);
}

.button--quiet:hover {
	background: var(--ink);
	border-color: var(--ink);
	color: #fff;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 14px;
	align-items: center;
	margin: 16px 0 0;
}

.text-link {
	font-weight: 600;
	color: var(--red);
	text-decoration: none;
}

.text-link:hover {
	text-decoration: underline;
}

.note {
	margin-top: 10px;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--muted);
}

.tag {
	display: inline-block;
	margin-left: 4px;
	padding: 0 6px;
	border: 1px solid var(--rule);
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: var(--muted);
	vertical-align: 1px;
}

.tag--accent {
	border-color: var(--red);
	color: var(--red);
}

.chips {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.chips a {
	display: inline-block;
	padding: 5px 12px;
	background: var(--chip);
	border: 1px solid var(--rule);
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.chips a:hover {
	background: var(--ink);
	border-color: var(--ink);
	color: #fff;
}

.strip-label {
	margin: 18px 0 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}

/* Tables: data in rows. Wide tables scroll sideways inside their box, so
   the page itself never does. */
.table-wrap {
	overflow-x: auto;
	background: var(--paper);
	box-shadow: var(--shadow);
}

.table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.table th {
	padding: 8px 10px;
	border-bottom: 2px solid var(--ink);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: left;
	color: var(--ink);
	white-space: nowrap;
}

.table td {
	padding: 8px 10px;
	border-bottom: 1px solid var(--rule);
	vertical-align: top;
}

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

.table tbody tr:hover {
	background: #fafaf7;
}

.table .num {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.table .rank {
	font-weight: 700;
	color: var(--ink);
	width: 2.5em;
}

.team-name {
	font-weight: 600;
}

.team-name a,
a.team-name {
	text-decoration: none;
}

.team-name a:hover,
a.team-name:hover {
	text-decoration: underline;
}

.team-sub {
	display: block;
	font-size: 13px;
	color: var(--muted);
}

.result {
	display: inline-block;
	min-width: 1.6em;
	padding: 0 4px;
	border-radius: var(--radius);
	color: #fff;
	font-weight: 700;
	font-size: 13px;
	text-align: center;
}

.result--w { background: var(--win); }
.result--l { background: var(--loss); }
.result--t { background: var(--tie); }

.schedule .site {
	display: inline-block;
	min-width: 1.6em;
	color: var(--muted);
	font-size: 14px;
}

.schedule .is-ahead td {
	background: #fbfbf8;
}

.pick {
	font-weight: 600;
}

.mini-rank {
	display: inline-block;
	min-width: 1.8em;
	margin-right: 4px;
	font-size: 12px;
	font-weight: 700;
	color: var(--muted);
}

/* Stat tiles across the top of a team page. */
.tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 12px;
}

.tile {
	padding: 14px 16px;
	background: var(--paper);
	border-top: 3px solid var(--ink);
	box-shadow: var(--shadow);
}

.tile__label {
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.tile__value {
	margin: 2px 0 0;
	font-family: var(--serif);
	font-size: 32px;
	font-weight: 700;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}

.tile__slash {
	margin: 0 4px;
	color: var(--muted);
	font-weight: 400;
}

.tile__note {
	margin: 0;
	font-size: 13px;
	color: var(--muted);
}

.link-list {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	background: var(--paper);
	box-shadow: var(--shadow);
}

.link-list li {
	border-bottom: 1px solid var(--rule);
}

.link-list li:last-child {
	border-bottom: 0;
}

.link-list a {
	display: flex;
	justify-content: space-between;
	padding: 10px 14px;
	font-weight: 600;
	text-decoration: none;
}

.link-list a::after {
	content: "\2192";
	color: var(--red);
}

.crumbs {
	margin-bottom: 14px;
	font-size: 14px;
	color: var(--muted);
}

.crumbs a {
	color: var(--muted);
}

.page-head {
	margin-bottom: 24px;
	padding: 20px 24px;
	background: var(--paper);
	border-top: 6px solid var(--ink);
	box-shadow: var(--shadow);
}

.page-head__title {
	margin: 0;
	font-family: var(--serif);
	font-weight: 900;
	font-size: clamp(32px, 5vw, 52px);
}

.page-head__record {
	margin-left: 8px;
	font-family: var(--sans);
	font-weight: 600;
	font-size: 0.55em;
	color: var(--muted);
	white-space: nowrap;
}

.page-head__dek {
	margin: 8px 0 0;
	font-size: 17px;
	color: var(--muted);
}

/* 6. Pages ---------------------------------------------------------------- */

/* Front page: two lead stories. */
.leads {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--gap);
	margin-bottom: 36px;
}

@media (min-width: 960px) {
	.leads {
		grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	}
}

.lead {
	display: flex;
	flex-direction: column;
	background: var(--paper);
	border-top: 4px solid var(--red);
	box-shadow: var(--shadow);
}

.lead__image {
	display: block;
	line-height: 0;
	background: var(--ink);
}

.lead__image img {
	width: 100%;
	aspect-ratio: 1200 / 630;
	object-fit: cover;
}

.lead__body {
	padding: 18px 22px 22px;
}

.lead__headline {
	margin: 0 0 10px;
	font-family: var(--serif);
	font-weight: 700;
	font-size: clamp(26px, 3.2vw, 38px);
}

.lead__headline--side {
	font-size: clamp(22px, 2.4vw, 28px);
}

.lead__headline a {
	text-decoration: none;
}

.lead__headline a:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.lead__dek {
	margin: 0;
	color: var(--muted);
	font-size: 16.5px;
}

/* Games to watch. */
.watch {
	list-style: none;
	margin: 0;
	padding: 0;
	background: var(--paper);
	box-shadow: var(--shadow);
}

.watch__game {
	padding: 12px 16px;
	border-bottom: 1px solid var(--rule);
}

.watch__game:last-child {
	border-bottom: 0;
}

.watch__when {
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.watch__teams {
	display: flex;
	flex-wrap: wrap;
	gap: 0 8px;
	margin: 2px 0;
	font-weight: 600;
	font-size: 17px;
}

.watch__teams a {
	text-decoration: none;
}

.watch__at {
	color: var(--muted);
	font-weight: 400;
}

.watch__pick {
	margin: 0;
	font-size: 14.5px;
}

/* No. 1 in each classification. */
.leaders {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 12px;
}

.leader {
	padding: 12px 14px 14px;
	background: var(--paper);
	border-top: 3px solid var(--red);
	box-shadow: var(--shadow);
}

.leader__class {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.1em;
	color: var(--red);
	text-decoration: none;
}

.leader__team {
	margin: 4px 0 2px;
	font-family: var(--serif);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.15;
}

.leader__team a {
	text-decoration: none;
}

.leader__line,
.leader__conf {
	margin: 0;
	font-size: 14px;
	color: var(--muted);
}

/* Find your school. */
.finder {
	padding: 16px;
	background: var(--paper);
	box-shadow: var(--shadow);
}

.finder__label,
.filters label {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.finder__row {
	display: flex;
	gap: 8px;
}

input[type="search"],
select {
	width: 100%;
	min-width: 0;
	padding: 9px 12px;
	border: 1px solid #b9b9b9;
	border-radius: var(--radius);
	background: #fff;
	color: var(--text);
	font: 16px/1.3 var(--sans);
}

/* Inside the reports: a grid of links. */
.link-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}

.link-grid a {
	display: block;
	height: 100%;
	padding: 14px 16px;
	background: var(--paper);
	border-left: 4px solid var(--ink);
	box-shadow: var(--shadow);
	text-decoration: none;
}

.link-grid a:hover {
	border-left-color: var(--red);
}

.link-grid strong {
	display: block;
	font-size: 16px;
}

.link-grid span {
	display: block;
	font-size: 14px;
	color: var(--muted);
}

/* Schools list. */
.filters {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	padding: 16px;
	background: var(--paper);
	box-shadow: var(--shadow);
}

@media (min-width: 760px) {
	.filters {
		grid-template-columns: 2fr 1fr 1fr 1fr;
	}
}

.filters__count {
	margin: 12px 0 8px;
	font-weight: 600;
	color: var(--muted);
}

.directory tr[hidden] {
	display: none;
}

/* School page. */
.sport-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: var(--gap);
}

.sport-card {
	padding: 18px 22px 22px;
	background: var(--paper);
	border-top: 4px solid var(--red);
	box-shadow: var(--shadow);
}

.sport-card__record {
	margin: 0 0 10px;
	font-family: var(--serif);
	font-size: 40px;
}

.sport-card__record a {
	text-decoration: none;
}

.sport-card__line {
	margin: 6px 0 0;
	font-size: 15px;
}

.facts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 8px 16px;
	margin: 0 0 12px;
}

.facts dt {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.facts dd {
	margin: 0;
	font-weight: 600;
}

.titles {
	list-style: none;
	margin: 0;
	padding: 0;
	background: var(--paper);
	box-shadow: var(--shadow);
}

.titles li {
	padding: 9px 14px;
	border-bottom: 1px solid var(--rule);
}

.titles li:last-child {
	border-bottom: 0;
}

.titles .is-champion strong {
	color: var(--red);
}

/* 7. Footer --------------------------------------------------------------- */
.sitefoot {
	background: var(--ink);
	color: #d7d7d7;
	font-size: 14px;
}

.sitefoot__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px 40px;
	padding-top: 28px;
	padding-bottom: 20px;
}

@media (min-width: 760px) {
	.sitefoot__inner {
		grid-template-columns: 2fr 1fr;
	}
}

.sitefoot__brand {
	margin-bottom: 6px;
	font-family: var(--serif);
	font-size: 22px;
	font-weight: 700;
	color: #fff;
}

.sitefoot a {
	color: #fff;
}

.sitefoot__links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sitefoot__links li {
	margin-bottom: 6px;
}

.sitefoot__fine {
	padding-top: 12px;
	padding-bottom: 20px;
	border-top: 1px solid #333;
	font-size: 12.5px;
	color: #9a9a9a;
}

/* 8. Small screens --------------------------------------------------------- */
@media (max-width: 600px) {
	main {
		padding-top: 16px;
	}

	.topline__social {
		display: none;
	}

	.topline__inner {
		justify-content: center;
	}

	.nameplate {
		padding-top: 12px;
		padding-bottom: 10px;
	}

	.nameplate__brand {
		gap: 12px;
	}

	.nameplate__logo {
		width: 58px;
	}

	.nameplate__tag {
		font-size: 11px;
		letter-spacing: 0.1em;
	}

	.sitenav__inner {
		gap: 2px 16px;
	}

	.sitenav a {
		font-size: 13px;
	}

	.page-head,
	.lead__body,
	.sport-card {
		padding-left: 16px;
		padding-right: 16px;
	}

	.table {
		font-size: 14px;
	}

	.table th,
	.table td {
		padding: 7px 8px;
	}

	.section-head__title {
		font-size: 22px;
	}
}

/* A season two sources record differently (history tables). */
.disputed {
	margin-left: 2px;
	color: var(--red);
	font-weight: 700;
	cursor: help;
}

.other-record {
	display: block;
	font-size: 12px;
	color: var(--muted);
	white-space: nowrap;
}

/* Earlier names of a school (school_alias). */
.aka {
	font-size: 14px;
	color: var(--muted);
}
