/* The site's only stylesheet: hand-written, no framework, no build step. */

:root {
	--ink: #14110f;
	--paper: #faf7f2;
	--muted: #6b625a;
	--rule: #ddd4c7;
	--gold: #9a7b16;
	--discord: #5865f2;
	--card: #fffdfa;
}

@media (prefers-color-scheme: dark) {
	:root {
		--ink: #f2ece3;
		--paper: #14110f;
		--muted: #a2988c;
		--rule: #372f28;
		--gold: #e0bb51;
		--card: #1b1714;
	}
}

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

body {
	margin: 0 auto;
	padding: 2.5rem 1rem 4rem;
	max-width: 44rem;
	background: var(--paper);
	color: var(--ink);
	font-family: system-ui, sans-serif;
	line-height: 1.5;
}

h1 {
	margin: 0 0 1.5rem;
	font-size: clamp(2rem, 7vw, 3rem);
	letter-spacing: -0.02em;
	color: var(--gold);
}

h2 {
	margin: 2.5rem 0 0.75rem;
	padding-bottom: 0.35rem;
	border-bottom: 1px solid var(--rule);
	font-size: 1.1rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--muted);
}

.lede {
	font-size: 1.15rem;
}

.criteria {
	margin: 0;
	padding-left: 1.25rem;
}

.criteria li {
	margin-bottom: 0.4rem;
}

/* The nominees are cards now: a portrait, the season, and what it took. */
.nominees {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

.card {
	display: flex;
	gap: 0.9rem;
	padding: 0.9rem;
	border: 1px solid var(--rule);
	border-radius: 0.5rem;
	background: var(--card);
}

.card .portrait {
	flex: none;
	width: 110px;
	height: 141px;
	border-radius: 0.35rem;
	background: var(--rule);
	object-fit: cover;
}

.card-body {
	min-width: 0;
}

.card h3 {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.2;
}

.card .club {
	margin: 0.15rem 0 0;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--gold);
}

.card .meta {
	margin: 0.1rem 0 0;
	font-size: 0.8rem;
	color: var(--muted);
}

.stats {
	display: flex;
	gap: 0.85rem;
	margin: 0.5rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--muted);
}

.stats .figure {
	display: block;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	font-variant-numeric: tabular-nums;
	color: var(--ink);
}

/* Discipline speaks to the third criterion, so it is shown -- but only the
   cards a Player actually collected. */
.discipline {
	display: flex;
	gap: 0.3rem;
	margin: 0.5rem 0 0;
	font-size: 0.7rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

/* Read by assistive tech and by a no-CSS render; invisible otherwise. */
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.discipline > span {
	padding: 0.05rem 0.3rem;
	border-radius: 0.2rem;
	color: #14110f;
}

.discipline .yellow {
	background: #e3b341;
}

.discipline .red {
	background: #d4453a;
	color: #fff;
}

.honours {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin: 0.5rem 0 0;
	padding: 0;
	list-style: none;
}

.honours li {
	padding: 0.1rem 0.4rem;
	border: 1px solid var(--rule);
	border-radius: 0.2rem;
	font-size: 0.68rem;
	color: var(--muted);
}

.nominations {
	margin: 0.5rem 0 0;
	font-size: 0.72rem;
	color: var(--muted);
}

.login {
	display: inline-block;
	margin-top: 2rem;
	padding: 0.8rem 1.4rem;
	border-radius: 0.4rem;
	background: var(--discord);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.login:hover,
.login:focus-visible {
	background: #4752c4;
}

.saved,
.problem {
	margin: 0 0 1.5rem;
	padding: 0.75rem 1rem;
	border-left: 4px solid var(--gold);
	background: color-mix(in srgb, var(--gold) 12%, transparent);
}

.problem {
	border-color: #b3261e;
	background: color-mix(in srgb, #b3261e 12%, transparent);
}

.ranking {
	display: grid;
	gap: 2rem;
	grid-template-columns: 1fr 1fr;
	align-items: start;
}

@media (max-width: 40rem) {
	.ranking {
		grid-template-columns: 1fr;
	}
}

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

.chosen li {
	display: flex;
	gap: 0.6rem;
	align-items: baseline;
	margin-bottom: 0.35rem;
	padding: 0.4rem 0.6rem;
	border: 1px dashed var(--rule);
	border-radius: 0.3rem;
}

.chosen li.filled {
	border-style: solid;
	border-color: var(--gold);
}

.chosen .rank {
	min-width: 1.5rem;
	font-weight: 700;
	color: var(--gold);
}

.chosen .points,
.chosen .name {
	font-size: 0.85rem;
	color: var(--muted);
}

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

/* One nominee per line: the pool reads as a list to pick down, not a cloud. */
.pool li {
	display: block;
}

.pool li:not(.taken),
.chosen li.filled {
	cursor: grab;
}

/* Sortable marks the placeholder and the element under the cursor. */
.sortable-ghost {
	opacity: 0.35;
}

.chosen li.sortable-chosen {
	border-color: var(--gold);
}

.pool button,
.chosen .drop {
	margin: 0 0.3rem 0.3rem 0;
	padding: 0.35rem 0.6rem;
	border: 1px solid var(--rule);
	border-radius: 0.3rem;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.chosen .drop {
	flex: 1;
	margin: 0;
	border-color: transparent;
	text-align: left;
}

.pool button:disabled {
	opacity: 0.35;
	cursor: default;
}

.submit {
	margin: 1rem 0 2rem;
	padding: 0.7rem 1.2rem;
	border: 0;
	border-radius: 0.4rem;
	background: var(--gold);
	color: var(--paper);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.submit:disabled {
	opacity: 0.4;
	cursor: default;
}

/* The frozen Ballot on the locked page is read-only: ranks, no controls. */
.chosen.frozen {
	list-style: decimal inside;
}

.chosen.frozen li {
	display: list-item;
	border-style: solid;
	border-color: var(--gold);
}

/* Results: the leaderboard, then one frozen Ballot per counted Voter. */
.leaderboard {
	width: 100%;
	max-width: 32rem;
	border-collapse: collapse;
}

.leaderboard th,
.leaderboard td,
.voters th,
.voters td {
	padding: 0.35rem 0.6rem;
	border-bottom: 1px solid var(--rule);
	text-align: left;
}

.leaderboard th:not(:nth-child(2)),
.leaderboard .rank,
.leaderboard .points,
.leaderboard .appearances {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.leaderboard .points {
	font-weight: 600;
}

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

.voter-ballot h3 {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.avatar {
	border-radius: 50%;
}

/* Admin: every Voter, with the two tools that act on one. */
.voters {
	width: 100%;
	border-collapse: collapse;
}

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

.voters .actions {
	display: flex;
	gap: 0.4rem;
	align-items: baseline;
}

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

/* The identity strip every page carries. */
.nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 2rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--rule);
}

.wordmark {
	font-weight: 700;
	font-size: 0.95rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	text-decoration: none;
	color: var(--ink);
}

.wordmark span {
	color: var(--gold);
}

.who {
	display: flex;
	gap: 0.7rem;
	align-items: center;
	font-size: 0.85rem;
}

.who .avatar {
	width: 28px;
	height: 28px;
}

.who .initial {
	display: grid;
	width: 28px;
	height: 28px;
	place-items: center;
	border-radius: 50%;
	background: var(--gold);
	color: var(--paper);
	font-size: 0.8rem;
	font-weight: 700;
}

.who .username {
	font-weight: 600;
}

.nav-link {
	color: var(--muted);
	text-decoration: none;
	text-transform: uppercase;
	font-size: 0.72rem;
	letter-spacing: 0.08em;
}

.nav-link:hover,
.nav-link:focus-visible,
.wordmark:hover {
	color: var(--gold);
}

.logout {
	padding: 0.25rem 0.55rem;
	border: 1px solid var(--rule);
	border-radius: 0.3rem;
	background: transparent;
	color: var(--muted);
	font: inherit;
	font-size: 0.75rem;
	cursor: pointer;
}

.logout:hover {
	color: var(--ink);
	border-color: var(--muted);
}

/* The navbar's sign-in is the same button, sized for a strip. */
.login.small {
	margin: 0;
	padding: 0.4rem 0.75rem;
	font-size: 0.8rem;
}

/* The pool on the vote page: a face and a club, still compact enough to drag. */
.pool button {
	display: flex;
	width: 100%;
	/* The right margin was for inline flow; full-width buttons would overflow. */
	margin: 0 0 0.3rem;
	gap: 0.45rem;
	align-items: center;
	text-align: left;
}

.pool .thumb {
	width: 28px;
	height: 36px;
	border-radius: 0.2rem;
	background: var(--rule);
	object-fit: cover;
}



/* The podium: the payoff, and the only place the gold is the point. */
.podium {
	display: flex;
	gap: 1rem;
	align-items: end;
	justify-content: center;
	margin: 2rem 0;
	padding: 0;
	list-style: none;
	text-align: center;
}

.place {
	display: flex;
	flex: 1;
	max-width: 12rem;
	flex-direction: column;
	align-items: center;
	gap: 0.15rem;
	padding: 0.9rem 0.6rem;
	border: 1px solid var(--rule);
	border-radius: 0.5rem;
	background: var(--card);
}

/* Rank order in the DOM, podium order on screen. */
.place-1 {
	order: 2;
	border-color: var(--gold);
	box-shadow: 0 0 0 1px var(--gold);
}

.place-2 {
	order: 1;
}

.place-3 {
	order: 3;
}

.place .portrait {
	width: 100%;
	max-width: 150px;
	aspect-ratio: 39 / 50;
	border-radius: 0.35rem;
	background: var(--rule);
	object-fit: cover;
}

.place-1 .portrait {
	max-width: 190px;
}

.place-rank {
	margin-top: 0.5rem;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--gold);
}

.place-name {
	font-weight: 600;
	line-height: 1.2;
}

.place-points {
	font-size: 0.8rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}


@media (max-width: 34rem) {
	.podium {
		flex-direction: column;
		align-items: stretch;
	}

	/* Stacked, the visual order is the rank order again. */
	.place-1,
	.place-2,
	.place-3 {
		order: 0;
		max-width: none;
	}
}
