/*
 * Patch notes. Everything here reads the tokens landing.css already defines, so the page ages
 * with the rest of the site instead of drifting into its own palette.
 */

/* landing.css does not define this - every page that offers a skip link styles it itself, and
   without a rule it is simply a visible blue link parked over the wordmark. */
.skip-link {
	position: fixed;
	top: 10px;
	left: 10px;
	z-index: 100;
	transform: translateY(-160%);
	border: 1px solid var(--line-strong);
	border-radius: 7px;
	background: var(--void-2);
	color: var(--text);
	padding: 9px 13px;
}

.skip-link:focus { transform: translateY(0); }

.patches-hero {
	padding-bottom: 18px;
}

.live-build {
	margin-top: 14px;
	font-size: 13px;
	color: var(--muted);
	letter-spacing: 0.01em;
}

.live-build strong {
	color: var(--gold-hi);
	font-weight: 700;
}

/* ---------------------------------------------------------------- filters */

.filters {
	max-width: 940px;
	margin: 0 auto;
	padding: 0 24px 18px;
}

.filter-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.filter-chip {
	padding: 7px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: rgba(21, 16, 34, 0.55);
	color: var(--muted);
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}

.filter-chip:hover {
	border-color: var(--line-strong);
	color: var(--text);
}

.filter-chip[aria-pressed="true"] {
	border-color: var(--purple-hi);
	background: rgba(143, 85, 223, 0.18);
	color: var(--text);
}

.filter-chip:focus-visible {
	outline: 2px solid var(--purple-hi);
	outline-offset: 2px;
}

.filter-count {
	margin-top: 10px;
	font-size: 12px;
	color: var(--faint);
}

/* --------------------------------------------------------------- releases */

.releases {
	max-width: 940px;
	margin: 0 auto;
	padding: 0 24px 40px;
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.release {
	border: 1px solid var(--line);
	border-radius: 14px;
	background: var(--panel);
	overflow: hidden;
	scroll-margin-top: 90px;
}

/* The one players are running. A quiet lift, not a spotlight. */
.release.is-live {
	border-color: rgba(124, 217, 146, 0.45);
	box-shadow: 0 0 0 1px rgba(124, 217, 146, 0.12), 0 14px 34px rgba(0, 0, 0, 0.34);
}

.release-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px 14px;
	padding: 18px 22px 14px;
	border-bottom: 1px solid var(--line);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
}

.release-name {
	font-family: var(--display);
	font-size: 27px;
	color: var(--gold-hi);
	letter-spacing: 0.02em;
}

/* Our word for the release, kept for anyone comparing against a client version. */
.release-version {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--faint);
}

.release-date {
	margin-left: auto;
	font-size: 12px;
	color: var(--faint);
	white-space: nowrap;
}

.release-status {
	padding: 3px 10px;
	border-radius: 999px;
	border: 1px solid var(--line);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
}

.release-status.live {
	border-color: rgba(124, 217, 146, 0.5);
	color: var(--live);
}

.release-status.rolling {
	border-color: rgba(226, 192, 130, 0.5);
	color: var(--gold-hi);
}

.release-summary {
	padding: 14px 22px 4px;
	color: var(--muted);
	line-height: 1.6;
	max-width: 74ch;
}

.change-list {
	list-style: none;
	padding: 8px 22px 20px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* The sprite gutter is reserved on every row, not only the ones carrying art. Sized by flex it
   left an unsprited headline sitting 46px to the left of a sprited one, and that ragged edge
   read as a layout bug. */
.change {
	display: grid;
	grid-template-columns: 34px 1fr;
	gap: 12px;
	align-items: start;
}

.change-body {
	grid-column: 2;
	min-width: 0;
}

/* Item art, where it earns its place. Sized to the sprite's own pixels so it stays crisp. */
.change-sprite {
	flex: 0 0 auto;
	width: 34px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 1px;
}

.change-sprite img {
	max-width: 32px;
	max-height: 30px;
	image-rendering: pixelated;
}

/* Screenshot slot. Empty until a file is dropped in, and the whole frame is removed rather than
   shown broken if there is nothing there, so a live page never displays a placeholder. */
.change-shot {
	margin-top: 11px;
	border: 1px solid var(--line);
	border-radius: 9px;
	overflow: hidden;
	background: rgba(11, 8, 18, 0.55);
	max-width: 560px;
}

.change-shot img {
	display: block;
	width: 100%;
	height: auto;
}

.change-shot.is-empty {
	display: none;
}

/* Headline, then one line of plain English. The old layout gave both the same weight and put a
   tag column in front of them, so there was nothing to skim and three things to read before the
   point arrived. */
.change-head {
	display: flex;
	align-items: baseline;
	gap: 9px;
	margin-bottom: 5px;
}

.change-title {
	font-size: 17px;
	font-weight: 700;
	color: var(--text);
	line-height: 1.35;
}

.change-kind {
	flex: 0 0 auto;
	padding: 2px 7px;
	border-radius: 4px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border: 1px solid var(--line);
	color: var(--muted);
	white-space: nowrap;
}

.change-kind.added {
	border-color: rgba(124, 217, 146, 0.45);
	color: var(--live);
}

.change-kind.changed {
	border-color: rgba(178, 140, 242, 0.5);
	color: var(--purple-hi);
}

.change-kind.fixed {
	border-color: rgba(226, 192, 130, 0.45);
	color: var(--gold-hi);
}

.change-text {
	color: var(--muted);
	line-height: 1.66;
	max-width: 68ch;
}

/* -------------------------------------------------------------- also list */

.also {
	margin: 0 22px 20px;
	padding: 14px 18px 16px;
	border: 1px solid rgba(143, 85, 223, 0.16);
	border-radius: 10px;
	background: rgba(11, 8, 18, 0.4);
}

.also-title {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--faint);
	margin-bottom: 8px;
}

.also-list {
	margin: 0;
	padding-left: 18px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.55;
}

.also-list li::marker {
	color: var(--purple);
}

.release.is-filtered-out {
	display: none;
}

.empty-state {
	padding: 26px 22px;
	text-align: center;
	color: var(--muted);
}

/* ----------------------------------------------------------------- narrow */

@media (max-width: 640px) {
	.filters,
	.releases {
		padding-left: 16px;
		padding-right: 16px;
	}

	.release-head {
		padding: 16px 16px 12px;
	}

	.release-date {
		/* Stops the date being squeezed onto its own line mid-word on a phone. */
		margin-left: 0;
		width: 100%;
	}

	.release-summary,
	.change-list {
		padding-left: 16px;
		padding-right: 16px;
	}

	.also {
		margin-left: 16px;
		margin-right: 16px;
	}

	/* A 34px gutter is a tenth of a phone screen. The sprite sits inline with the tag instead. */
	.change {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.change-body {
		grid-column: 1;
	}

	.change-sprite {
		display: none;
	}

	/* The tag drops above the headline instead of squeezing it into a few words a line. */
	.change-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 5px;
	}

	/* The headline keeps its size; the body steps down instead, so the two stay distinguishable
	   by more than font weight on a phone. */
	.change-text {
		font-size: 15px;
	}

	.also-list {
		font-size: 13px;
	}
}
