/*
 * Football News — the whole stylesheet.
 *
 * A classic theme has no theme.json, so the eight semantic tokens the design
 * is built on are plain custom properties, and a colour scheme is one body
 * class that redefines them. Nothing below names a colour directly: every rule
 * reads a token, so adding a scheme is adding eight lines and nothing else.
 */

/* ------------------------------------------------------------------ *
 * Fonts
 * ------------------------------------------------------------------ */

@font-face {
	font-family: "IBM Plex Sans Thai";
	src: url("../fonts/IBMPlexSansThai-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "IBM Plex Sans Thai";
	src: url("../fonts/IBMPlexSansThai-Medium.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "IBM Plex Sans Thai";
	src: url("../fonts/IBMPlexSansThai-SemiBold.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "IBM Plex Sans Thai";
	src: url("../fonts/IBMPlexSansThai-Bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* ------------------------------------------------------------------ *
 * Schemes
 * ------------------------------------------------------------------ */

body {
	--fbnews-surface: #15112e;
	--fbnews-surface-raised: #201b41;
	--fbnews-on-surface: #e9e6f7;
	--fbnews-on-surface-muted: #a9a4cf;
	--fbnews-primary: #a99bff;
	--fbnews-accent: #ffd166;
	--fbnews-border: #322c5c;
	--fbnews-pitch: #48d597;
}

body.fbnews-scheme-dark {
	--fbnews-surface: #0e1117;
	--fbnews-surface-raised: #171b23;
	--fbnews-on-surface: #eef1f6;
	--fbnews-on-surface-muted: #9aa4b4;
	--fbnews-primary: #6ea8ff;
	--fbnews-accent: #ffc94d;
	--fbnews-border: #2a3040;
	--fbnews-pitch: #39c07d;
}

body.fbnews-scheme-light {
	--fbnews-surface: #ffffff;
	--fbnews-surface-raised: #f4f6fa;
	--fbnews-on-surface: #12161f;
	--fbnews-on-surface-muted: #5b6474;
	--fbnews-primary: #0b5fff;
	--fbnews-accent: #ffb703;
	--fbnews-border: #dfe3ea;
	--fbnews-pitch: #0f7b46;
}

body.fbnews-scheme-emerald {
	--fbnews-surface: #f7fbf8;
	--fbnews-surface-raised: #e7f3ec;
	--fbnews-on-surface: #0d1b13;
	--fbnews-on-surface-muted: #4d6357;
	--fbnews-primary: #0f7b46;
	--fbnews-accent: #f2b705;
	--fbnews-border: #cbe0d4;
	--fbnews-pitch: #0a5c33;
}

body.fbnews-scheme-crimson {
	--fbnews-surface: #fffafa;
	--fbnews-surface-raised: #f8ebeb;
	--fbnews-on-surface: #1c1113;
	--fbnews-on-surface-muted: #6b5254;
	--fbnews-primary: #c1121f;
	--fbnews-accent: #f2a516;
	--fbnews-border: #e6d2d3;
	--fbnews-pitch: #146b45;
}

/* ------------------------------------------------------------------ *
 * Scale
 * ------------------------------------------------------------------ */

body {
	--fbnews-space-1: 0.5rem;
	--fbnews-space-2: 1rem;
	--fbnews-space-3: 1.5rem;
	--fbnews-space-4: 2.5rem;
	--fbnews-space-5: 4rem;

	--fbnews-text-s: 0.875rem;
	--fbnews-text-m: 1rem;
	--fbnews-text-l: 1.375rem;
	--fbnews-text-xl: 1.875rem;
	--fbnews-text-xxl: 2.5rem;

	--fbnews-radius: 8px;
	--fbnews-content: 42rem;
	--fbnews-wide: 76rem;
}

/* ------------------------------------------------------------------ *
 * Reset and base
 * ------------------------------------------------------------------ */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--fbnews-surface);
	color: var(--fbnews-on-surface);
	font-family: "IBM Plex Sans Thai", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: var(--fbnews-text-m);
	line-height: 1.7;
}

img,
video {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--fbnews-primary);
}

h1,
h2,
h3,
h4 {
	line-height: 1.3;
	font-weight: 700;
	color: var(--fbnews-on-surface);
}

h1 {
	font-size: var(--fbnews-text-xxl);
}

h2 {
	font-size: var(--fbnews-text-xl);
}

h3 {
	font-size: var(--fbnews-text-l);
}

:where(a, button, input, select, textarea):focus-visible {
	outline: 2px solid var(--fbnews-accent);
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: -9999px;
}

.skip-link:focus {
	left: var(--fbnews-space-2);
	top: var(--fbnews-space-2);
	z-index: 100;
	padding: var(--fbnews-space-1) var(--fbnews-space-2);
	background: var(--fbnews-surface-raised);
	border-radius: var(--fbnews-radius);
}

/* ------------------------------------------------------------------ *
 * Layout
 * ------------------------------------------------------------------ */

.fbnews-container {
	width: 100%;
	max-width: var(--fbnews-wide);
	margin-inline: auto;
	padding-inline: var(--fbnews-space-2);
}

.fbnews-main {
	padding-block: var(--fbnews-space-4) var(--fbnews-space-5);
}

.fbnews-prose {
	max-width: var(--fbnews-content);
}

.fbnews-columns {
	display: grid;
	gap: var(--fbnews-space-5);
	align-items: start;
}

.fbnews-columns--70-30 {
	grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
}

.fbnews-columns--75-25 {
	grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
}

.fbnews-columns--100 {
	grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 62rem) {
	.fbnews-columns {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--fbnews-space-4);
	}
}

/* ------------------------------------------------------------------ *
 * Masthead
 * ------------------------------------------------------------------ */

.fbnews-masthead {
	background: var(--fbnews-surface-raised);
	border-bottom: 1px solid var(--fbnews-border);
}

/* Opt-in from the settings page: the masthead follows the reader down. */
.fbnews-sticky .fbnews-masthead {
	position: sticky;
	top: 0;
	z-index: 20;
}

/* The admin bar is itself fixed, so the masthead has to start below it. */
.fbnews-sticky.admin-bar .fbnews-masthead {
	top: 32px;
}

@media (max-width: 782px) {
	.fbnews-sticky.admin-bar .fbnews-masthead {
		top: 46px;
	}
}

.fbnews-masthead__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--fbnews-space-3);
	flex-wrap: wrap;
	padding-block: var(--fbnews-space-2);
}

/* Branding and menu are one unit on the left; the buttons sit opposite. */
.fbnews-masthead__lead {
	display: flex;
	align-items: center;
	gap: var(--fbnews-space-3);
	flex-wrap: wrap;
	min-width: 0;
}

.fbnews-brand {
	display: flex;
	align-items: center;
	gap: var(--fbnews-space-2);
	min-width: 0;
}

.fbnews-brand__logo img {
	display: block;
	width: auto;
	max-height: var(--fbnews-logo-header, 44px);
}

.fbnews-brand__title {
	margin: 0;
	font-size: var(--fbnews-text-l);
	font-weight: 700;
	line-height: 1.2;
}

.fbnews-brand__title a {
	color: var(--fbnews-on-surface);
	text-decoration: none;
}

.fbnews-brand__tagline {
	margin: 0;
	color: var(--fbnews-on-surface-muted);
	font-size: var(--fbnews-text-s);
}

/* Navigation */

.fbnews-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fbnews-space-3);
	margin: 0;
	padding: 0;
	list-style: none;
}

.fbnews-nav a {
	color: var(--fbnews-on-surface);
	text-decoration: none;
	font-weight: 500;
}

.fbnews-nav a:hover,
.fbnews-nav a:focus-visible {
	color: var(--fbnews-primary);
}

.fbnews-nav .current-menu-item > a,
.fbnews-nav .current_page_item > a {
	color: var(--fbnews-primary);
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

.fbnews-nav__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 2.6rem;
	height: 2.6rem;
	padding: 0;
	background: transparent;
	border: 1px solid var(--fbnews-border);
	border-radius: var(--fbnews-radius);
	color: var(--fbnews-on-surface);
	cursor: pointer;
}

/*
 * Three bars drawn from one element: the middle bar is the box itself, the
 * other two are its pseudo-elements. On open they cross, so the button shows
 * what it will do next without a second icon to keep in step.
 */
.fbnews-nav__icon {
	position: relative;
}

.fbnews-nav__icon,
.fbnews-nav__icon::before,
.fbnews-nav__icon::after {
	display: block;
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.fbnews-nav__icon::before,
.fbnews-nav__icon::after {
	content: "";
	position: absolute;
	left: 0;
}

.fbnews-nav__icon::before {
	transform: translateY(-6px);
}

.fbnews-nav__icon::after {
	transform: translateY(6px);
}

.fbnews-nav__toggle[aria-expanded="true"] .fbnews-nav__icon {
	background: transparent;
}

.fbnews-nav__toggle[aria-expanded="true"] .fbnews-nav__icon::before {
	transform: rotate(45deg);
}

.fbnews-nav__toggle[aria-expanded="true"] .fbnews-nav__icon::after {
	transform: rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
	.fbnews-nav__icon,
	.fbnews-nav__icon::before,
	.fbnews-nav__icon::after {
		transition: none;
	}
}

@media (max-width: 48rem) {
	.fbnews-nav__toggle {
		display: inline-flex;
	}

	/* The open menu hangs off the masthead, so opening it cannot squeeze the
	   site name onto two lines the way an in-flow row did. */
	.fbnews-masthead {
		position: relative;
	}

	.fbnews-masthead__lead {
		width: 100%;
		flex-wrap: nowrap;
		justify-content: space-between;
		gap: var(--fbnews-space-2);
	}

	.fbnews-nav {
		display: flex;
		justify-content: flex-end;
		flex: 0 0 auto;
	}

	.fbnews-nav ul {
		display: none;
		position: absolute;
		inset-inline: 0;
		top: 100%;
		z-index: 30;
		flex-direction: column;
		gap: 0;
		padding: var(--fbnews-space-1) var(--fbnews-space-2) var(--fbnews-space-2);
		background: var(--fbnews-surface-raised);
		border-bottom: 1px solid var(--fbnews-border);
	}

	.fbnews-nav[data-open="true"] ul {
		display: flex;
	}

	.fbnews-nav li + li {
		border-top: 1px solid var(--fbnews-border);
	}

	.fbnews-nav li a {
		display: block;
		padding: 0.6rem 0;
	}

	/* The buttons take a centred row of their own rather than hanging left. */
	.fbnews-buttons {
		width: 100%;
		justify-content: center;
	}
}
/* Buttons */

.fbnews-buttons {
	display: flex;
	gap: var(--fbnews-space-1);
	flex-wrap: wrap;
}

.fbnews-button {
	display: inline-block;
	padding: 0.45rem 1.1rem;
	border-radius: 999px;
	border: 1px solid var(--fbnews-on-surface);
	color: var(--fbnews-on-surface);
	font-size: var(--fbnews-text-s);
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}

.fbnews-button--solid {
	background: var(--fbnews-primary);
	border-color: var(--fbnews-primary);
	color: var(--fbnews-surface);
}

.fbnews-button:hover,
.fbnews-button:focus-visible {
	opacity: 0.88;
}

/* ------------------------------------------------------------------ *
 * Post grid
 * ------------------------------------------------------------------ */

.fbnews-section + .fbnews-section {
	margin-top: var(--fbnews-space-5);
}

.fbnews-section__title {
	margin: 0 0 var(--fbnews-space-3);
	font-size: var(--fbnews-text-l);
}

.fbnews-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: var(--fbnews-space-3);
	margin: 0;
	padding: 0;
	list-style: none;
}

.fbnews-card {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	min-width: 0;
}

.fbnews-card__thumb {
	display: block;
	border-radius: var(--fbnews-radius);
	overflow: hidden;
	background: var(--fbnews-surface-raised);
	aspect-ratio: 16 / 9;
}

.fbnews-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fbnews-card__title {
	margin: 0;
	font-size: var(--fbnews-text-m);
	font-weight: 600;
	line-height: 1.45;
}

.fbnews-card__title a {
	color: var(--fbnews-on-surface);
	text-decoration: none;
}

.fbnews-card__title a:hover,
.fbnews-card__title a:focus-visible {
	color: var(--fbnews-primary);
}

.fbnews-card__excerpt {
	margin: 0;
	color: var(--fbnews-on-surface-muted);
	font-size: var(--fbnews-text-s);
}

.fbnews-card__meta {
	color: var(--fbnews-on-surface-muted);
	font-size: var(--fbnews-text-s);
}

/* ------------------------------------------------------------------ *
 * Article
 * ------------------------------------------------------------------ */

.fbnews-article__title {
	margin: 0 0 var(--fbnews-space-2);
}

.fbnews-article__meta {
	margin: 0 0 var(--fbnews-space-3);
	color: var(--fbnews-on-surface-muted);
	font-size: var(--fbnews-text-s);
}

.fbnews-article__thumb {
	margin: 0 0 var(--fbnews-space-3);
	border-radius: var(--fbnews-radius);
	overflow: hidden;
}

.fbnews-entry > * {
	margin-block: 0 var(--fbnews-space-2);
}

.fbnews-entry img {
	border-radius: var(--fbnews-radius);
}

.fbnews-entry blockquote {
	margin-inline: 0;
	padding-left: var(--fbnews-space-2);
	border-left: 3px solid var(--fbnews-accent);
	color: var(--fbnews-on-surface-muted);
}

.fbnews-pagination {
	display: flex;
	gap: var(--fbnews-space-1);
	justify-content: center;
	margin-top: var(--fbnews-space-4);
}

.fbnews-pagination .page-numbers {
	padding: 0.3rem 0.7rem;
	border: 1px solid var(--fbnews-border);
	border-radius: var(--fbnews-radius);
	color: var(--fbnews-on-surface);
	text-decoration: none;
}

.fbnews-pagination .page-numbers.current {
	background: var(--fbnews-primary);
	border-color: var(--fbnews-primary);
	color: var(--fbnews-surface);
}

/* Search form */

.fbnews-search {
	display: flex;
	gap: var(--fbnews-space-1);
}

.fbnews-search input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.45rem 0.7rem;
	background: var(--fbnews-surface-raised);
	border: 1px solid var(--fbnews-border);
	border-radius: var(--fbnews-radius);
	color: var(--fbnews-on-surface);
	font: inherit;
}

.fbnews-search button {
	padding: 0.45rem 1rem;
	background: var(--fbnews-primary);
	border: 0;
	border-radius: var(--fbnews-radius);
	color: var(--fbnews-surface);
	font: inherit;
	cursor: pointer;
}

/* ------------------------------------------------------------------ *
 * Sidebar
 * ------------------------------------------------------------------ */

.fbnews-sidebar > * + * {
	margin-top: var(--fbnews-space-4);
}

.fbnews-sidebar__title {
	margin: 0 0 var(--fbnews-space-2);
	padding-top: var(--fbnews-space-1);
	border-top: 2px solid var(--fbnews-accent);
	display: inline-block;
	font-size: var(--fbnews-text-s);
	font-weight: 600;
	letter-spacing: 0.08em;
}

/* ------------------------------------------------------------------ *
 * Slider
 * ------------------------------------------------------------------ */

.fbnews-slider__track {
	display: flex;
	gap: var(--fbnews-space-2);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.fbnews-slider__track::-webkit-scrollbar {
	display: none;
}

.fbnews-slider__slide {
	position: relative;
	flex: 0 0 100%;
	scroll-snap-align: center;
	border-radius: var(--fbnews-radius);
	overflow: hidden;
	aspect-ratio: 2 / 1;
	background: var(--fbnews-surface-raised);
}

.fbnews-slider__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fbnews-slider__body {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	padding: var(--fbnews-space-3);
	background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent);
	color: #fff;
}

.fbnews-slider__title {
	margin: 0;
	font-size: var(--fbnews-text-l);
}

.fbnews-slider__title a {
	color: inherit;
	text-decoration: none;
}

.fbnews-slider__controls {
	display: flex;
	gap: var(--fbnews-space-1);
	justify-content: center;
	align-items: center;
	margin-top: var(--fbnews-space-2);
}

.fbnews-slider__dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--fbnews-border);
	cursor: pointer;
}

.fbnews-slider__dot[aria-current="true"] {
	background: var(--fbnews-primary);
}

.fbnews-slider__pause {
	margin-left: var(--fbnews-space-1);
	padding: 0.2rem 0.6rem;
	background: transparent;
	border: 1px solid var(--fbnews-border);
	border-radius: 999px;
	color: var(--fbnews-on-surface-muted);
	font: inherit;
	font-size: var(--fbnews-text-s);
	cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
	.fbnews-slider__track {
		scroll-behavior: auto;
	}
}

/* ------------------------------------------------------------------ *
 * Football — fixtures
 * ------------------------------------------------------------------ *
 *
 * One match is a two-line row, not a bordered card: a quiet meta line, then
 * the two sides with the score between them. The status used to be dragged
 * back over the team row with a negative margin, which printed "จบแล้ว" on
 * top of the away side's name.
 */

.fbnews-fixtures {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--fbnews-border);
}

.fbnews-fixtures__match {
	display: grid;
	gap: 0.15rem;
	padding: 0.6rem 0.1rem 0.7rem;
	border-bottom: 1px solid var(--fbnews-border);
}

.fbnews-fixtures__meta {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--fbnews-space-1);
	color: var(--fbnews-on-surface-muted);
	font-size: 0.72rem;
	line-height: 1.5;
}

.fbnews-fixtures__status {
	flex: 0 0 auto;
	padding: 0.05rem 0.45rem;
	border: 1px solid var(--fbnews-border);
	border-radius: 999px;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

/* Only a result is worth a colour; a fixture nobody has played is just a date. */
.fbnews-fixtures__match[data-status="finished"] .fbnews-fixtures__status {
	border-color: color-mix(in srgb, var(--fbnews-pitch) 45%, transparent);
	color: var(--fbnews-pitch);
}

.fbnews-fixtures__teams {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 0.5rem;
	font-size: var(--fbnews-text-s);
	line-height: 1.35;
}

/* The two sides lean towards the score between them. */
.fbnews-fixtures__home {
	text-align: right;
}

.fbnews-fixtures__away {
	text-align: left;
}

.fbnews-fixtures__home,
.fbnews-fixtures__away {
	color: var(--fbnews-on-surface-muted);
}

/* The winner is the one fact a results list exists to carry. */
[data-outcome="win"] {
	color: var(--fbnews-on-surface);
	font-weight: 600;
}

.fbnews-fixtures__score {
	min-width: 3.4rem;
	padding: 0.1rem 0.4rem;
	border-radius: 6px;
	background: var(--fbnews-surface-raised);
	text-align: center;
	font-weight: 700;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	color: var(--fbnews-on-surface);
}

.fbnews-fixtures__match[data-status="upcoming"] .fbnews-fixtures__score {
	background: transparent;
	color: var(--fbnews-on-surface-muted);
	font-weight: 500;
}

/* ------------------------------------------------------------------ *
 * Football — standings
 * ------------------------------------------------------------------ */

.wp-block-fbnews-standings {
	overflow-x: auto;
}

.fbnews-standings {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--fbnews-text-s);
	font-variant-numeric: tabular-nums;
}

.fbnews-standings th,
.fbnews-standings td {
	padding: 0.42rem 0.4rem;
	text-align: right;
	border-bottom: 1px solid var(--fbnews-border);
}

.fbnews-standings thead th {
	padding-bottom: 0.3rem;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fbnews-on-surface-muted);
}

.fbnews-standings thead th:nth-child(2) {
	text-align: left;
}

.fbnews-standings td.fbnews-standings__position {
	width: 2.2rem;
	padding-right: 0.2rem;
	text-align: center;
}

.fbnews-standings__position span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.45rem;
	height: 1.45rem;
	border-radius: 6px;
	color: var(--fbnews-on-surface-muted);
	font-size: 0.72rem;
	font-weight: 600;
}

/*
 * The places that decide a season. Which places those are differs by league,
 * so only the top three are marked — that much is true everywhere.
 */
.fbnews-standings__row[data-position="1"] .fbnews-standings__position span,
.fbnews-standings__row[data-position="2"] .fbnews-standings__position span,
.fbnews-standings__row[data-position="3"] .fbnews-standings__position span {
	background: color-mix(in srgb, var(--fbnews-accent) 22%, transparent);
	color: var(--fbnews-on-surface);
}

.fbnews-standings__row[data-position="1"] .fbnews-standings__position span {
	background: var(--fbnews-accent);
	color: #1a1205;
}

.fbnews-standings th.fbnews-standings__team {
	text-align: left;
	font-weight: 500;
	color: var(--fbnews-on-surface);
}

.fbnews-standings td.fbnews-standings__points {
	font-weight: 700;
	color: var(--fbnews-on-surface);
}

.fbnews-standings__row--highlight {
	background: color-mix(in srgb, var(--fbnews-accent) 16%, transparent);
}

.fbnews-standings__row--highlight th.fbnews-standings__team {
	font-weight: 700;
}

.fbnews-standings tbody tr:last-child th,
.fbnews-standings tbody tr:last-child td {
	border-bottom: 0;
}

.fbnews-capture-notice {
	margin: var(--fbnews-space-2) 0 0;
	color: var(--fbnews-on-surface-muted);
	font-size: 0.72rem;
}

/*
 * Shown by a football block that has nothing stored yet. The read path never
 * calls the network, so a site is a cron run away from its first table.
 */
.fbnews-empty {
	margin: 0;
	padding: 0.75rem 0.875rem;
	border: 1px dashed var(--fbnews-border);
	border-radius: 6px;
	color: var(--fbnews-on-surface-muted);
	font-size: var(--fbnews-text-s);
}

/* ------------------------------------------------------------------ *
 * Footer
 * ------------------------------------------------------------------ */

.fbnews-footer {
	background: var(--fbnews-surface-raised);
	border-top: 1px solid var(--fbnews-border);
	padding-block: var(--fbnews-space-4) var(--fbnews-space-3);
}

/*
 * The brand column is wider than the link columns but not by much. At 2fr it
 * left a hand's width of nothing between the site name and the first heading,
 * which read as a layout that had lost a column rather than one built this way.
 */
.fbnews-footer__widgets {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr);
	gap: var(--fbnews-space-4);
}

@media (max-width: 60rem) {
	.fbnews-footer__widgets {
		grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
		gap: var(--fbnews-space-3);
	}
}

.fbnews-footer__logo {
	margin: 0 0 var(--fbnews-space-2);
}

.fbnews-footer__logo img {
	display: block;
	width: auto;
	max-height: var(--fbnews-logo-footer, 48px);
}

.fbnews-footer__brand {
	margin: 0 0 var(--fbnews-space-1);
	font-size: var(--fbnews-text-l);
	font-weight: 700;
	letter-spacing: -0.01em;
}

.fbnews-footer__brand a {
	color: var(--fbnews-on-surface);
	text-decoration: none;
}

.fbnews-footer__brand a:hover,
.fbnews-footer__brand a:focus-visible {
	color: var(--fbnews-primary);
}

.fbnews-footer__note {
	margin: 0 0 var(--fbnews-space-1);
	max-width: 34ch;
	color: var(--fbnews-on-surface-muted);
	font-size: var(--fbnews-text-s);
	line-height: 1.6;
}

/*
 * Column labels, not headings: small, spaced, under a short accent rule so the
 * columns read as groups without needing rules between them.
 */
.fbnews-footer .widget-title,
.fbnews-footer__heading,
.fbnews-footer :is(h1, h2, h3, h4) {
	display: inline-block;
	margin: 0 0 var(--fbnews-space-2);
	padding-top: var(--fbnews-space-1);
	border-top: 2px solid var(--fbnews-accent);
	font-size: var(--fbnews-text-s);
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.5;
}

/* The brand is the one thing in the footer that is not a column label. */
.fbnews-footer .fbnews-footer__brand {
	display: block;
	padding-top: 0;
	border-top: 0;
	font-size: var(--fbnews-text-l);
	letter-spacing: -0.01em;
}

.fbnews-footer ul,
.fbnews-footer ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.fbnews-footer li {
	margin: 0;
}

.fbnews-footer li a {
	display: block;
	padding: 0.28rem 0;
	color: var(--fbnews-on-surface-muted);
	font-size: var(--fbnews-text-s);
	text-decoration: none;
	transition: color 0.15s ease;
}

.fbnews-footer li a:hover,
.fbnews-footer li a:focus-visible {
	color: var(--fbnews-primary);
}

/* Each headline is its own row, separated by a hairline rather than a gap. */
.fbnews-footer__posts li {
	padding: 0.4rem 0;
	border-bottom: 1px solid var(--fbnews-border);
}

.fbnews-footer__posts li:first-child {
	padding-top: 0;
}

.fbnews-footer__posts li:last-child {
	border-bottom: 0;
}

.fbnews-footer__posts a {
	padding: 0;
	color: var(--fbnews-on-surface);
	line-height: 1.45;
}

.fbnews-footer__posts time {
	display: block;
	margin-top: 0.1rem;
	color: var(--fbnews-on-surface-muted);
	font-size: 0.72rem;
}

.fbnews-footer__bar {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fbnews-space-2);
	justify-content: space-between;
	align-items: center;
	margin-top: var(--fbnews-space-4);
	padding-top: var(--fbnews-space-2);
	border-top: 1px solid var(--fbnews-border);
	color: var(--fbnews-on-surface-muted);
	font-size: 0.78rem;
}

.fbnews-footer__bar p {
	margin: 0;
}

/* ------------------------------------------------------------------ *
 * Widgets
 * ------------------------------------------------------------------ *
 *
 * WordPress 5.8 turned widgets into blocks, so a widget title is a plain
 * heading and not the <h2 class="widget-title"> that before_title used to
 * wrap. Both shapes are styled here, or a site with any widget at all ends
 * up with core's unstyled defaults sitting in the middle of the design.
 */

.fbnews-sidebar .widget,
.fbnews-footer .widget {
	margin: 0;
}

.fbnews-sidebar .widget + .widget,
.fbnews-footer .widget + .widget {
	margin-top: var(--fbnews-space-4);
}

.fbnews-sidebar :is(h1, h2, h3, h4, .widget-title),
.fbnews-footer :is(h1, h2, h3, h4, .widget-title) {
	margin: 0 0 var(--fbnews-space-2);
	padding-top: var(--fbnews-space-1);
	border-top: 2px solid var(--fbnews-accent);
	display: inline-block;
	font-size: var(--fbnews-text-s);
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.5;
}

.fbnews-sidebar ul,
.fbnews-sidebar ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.fbnews-sidebar li {
	padding: 0.35rem 0;
	border-bottom: 1px solid var(--fbnews-border);
	font-size: var(--fbnews-text-s);
	line-height: 1.5;
}

.fbnews-sidebar li:last-child {
	border-bottom: 0;
}

.fbnews-sidebar a,
.fbnews-footer .widget a {
	color: var(--fbnews-on-surface);
	text-decoration: none;
}

.fbnews-sidebar a:hover,
.fbnews-sidebar a:focus-visible,
.fbnews-footer .widget a:hover,
.fbnews-footer .widget a:focus-visible {
	color: var(--fbnews-primary);
	text-decoration: underline;
}

.fbnews-sidebar .wp-block-latest-posts__post-date,
.fbnews-sidebar .wp-block-latest-comments__comment-date,
.fbnews-sidebar .post-date {
	display: block;
	color: var(--fbnews-on-surface-muted);
	font-size: 0.74rem;
}

/* Form controls anywhere on the page, so a core search widget is not a white
   box dropped into a dark column. */
input[type="search"],
input[type="text"],
input[type="email"],
input[type="url"],
textarea,
select {
	max-width: 100%;
	padding: 0.45rem 0.7rem;
	background: var(--fbnews-surface);
	border: 1px solid var(--fbnews-border);
	border-radius: var(--fbnews-radius);
	color: var(--fbnews-on-surface);
	font: inherit;
}

input[type="submit"],
button:not(.fbnews-nav__toggle):not(.fbnews-slider__dot):not(.fbnews-slider__pause),
.wp-block-search__button {
	padding: 0.45rem 1rem;
	background: var(--fbnews-primary);
	border: 0;
	border-radius: var(--fbnews-radius);
	color: var(--fbnews-surface);
	font: inherit;
	cursor: pointer;
}

.wp-block-search__inside-wrapper {
	gap: var(--fbnews-space-1);
}

.fbnews-sidebar .wp-block-group,
.fbnews-footer .wp-block-group {
	margin: 0;
}

/* The core search widget labels itself without a heading, so it needs the same
   label treatment or it reads as a stray word above an input. */
.fbnews-sidebar .wp-block-search__label,
.fbnews-footer .wp-block-search__label {
	display: inline-block;
	margin: 0 0 var(--fbnews-space-2);
	padding-top: var(--fbnews-space-1);
	border-top: 2px solid var(--fbnews-accent);
	font-size: var(--fbnews-text-s);
	font-weight: 600;
	letter-spacing: 0.08em;
}

.fbnews-sidebar__section + .widget,
.widget + .fbnews-sidebar__section {
	margin-top: var(--fbnews-space-4);
}

/* ------------------------------------------------------------------ *
 * Page head and eyebrow
 * ------------------------------------------------------------------ */

.fbnews-pagehead {
	margin-bottom: var(--fbnews-space-4);
	padding-bottom: var(--fbnews-space-3);
	border-bottom: 1px solid var(--fbnews-border);
}

.fbnews-pagehead__title {
	margin: 0;
	font-size: clamp(1.9rem, 1.3rem + 2vw, var(--fbnews-text-xxl));
	letter-spacing: -0.01em;
}

/*
 * A short label above a headline. It carries the accent colour, which is the
 * one place the palette is allowed to shout, and it is what makes a listing
 * read as a news page rather than as a list of links.
 */
.fbnews-eyebrow {
	margin: 0 0 0.35rem;
	color: var(--fbnews-accent);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	line-height: 1.4;
}

/* ------------------------------------------------------------------ *
 * Lead article
 * ------------------------------------------------------------------ */

.fbnews-lead {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	gap: var(--fbnews-space-4);
	align-items: center;
	margin-bottom: var(--fbnews-space-5);
	padding-bottom: var(--fbnews-space-4);
	border-bottom: 1px solid var(--fbnews-border);
}

@media (max-width: 48rem) {
	.fbnews-lead {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--fbnews-space-2);
	}
}

.fbnews-lead__thumb {
	display: block;
	border-radius: var(--fbnews-radius);
	overflow: hidden;
	background: var(--fbnews-surface-raised);
	aspect-ratio: 16 / 9;
}

.fbnews-lead__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.fbnews-lead:hover .fbnews-lead__thumb img {
	transform: scale(1.03);
}

.fbnews-lead__title {
	margin: 0 0 var(--fbnews-space-2);
	font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem);
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.fbnews-lead__title a {
	color: var(--fbnews-on-surface);
	text-decoration: none;
}

.fbnews-lead__title a:hover,
.fbnews-lead__title a:focus-visible {
	color: var(--fbnews-primary);
}

.fbnews-lead__excerpt {
	margin: 0 0 var(--fbnews-space-2);
	color: var(--fbnews-on-surface-muted);
}

/* ------------------------------------------------------------------ *
 * Cards — a thumbnail placeholder keeps the grid from going ragged
 * ------------------------------------------------------------------ */

.fbnews-card__thumb {
	position: relative;
}

.fbnews-card__thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	border: 1px solid var(--fbnews-border);
	border-radius: var(--fbnews-radius);
	pointer-events: none;
}

.fbnews-card__thumb img {
	transition: transform 0.4s ease;
}

.fbnews-card:hover .fbnews-card__thumb img {
	transform: scale(1.04);
}

/* ------------------------------------------------------------------ *
 * Article
 * ------------------------------------------------------------------ */

.fbnews-article__head {
	margin-bottom: var(--fbnews-space-3);
}

.fbnews-article__title {
	margin: 0 0 var(--fbnews-space-2);
	font-size: clamp(1.9rem, 1.3rem + 2vw, var(--fbnews-text-xxl));
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.fbnews-article__standfirst {
	margin: 0 0 var(--fbnews-space-2);
	color: var(--fbnews-on-surface-muted);
	font-size: 1.125rem;
	line-height: 1.6;
}

.fbnews-article__thumb {
	margin: 0 0 var(--fbnews-space-4);
	border-radius: var(--fbnews-radius);
	overflow: hidden;
}

.fbnews-article__thumb figcaption {
	padding-top: var(--fbnews-space-1);
	color: var(--fbnews-on-surface-muted);
	font-size: var(--fbnews-text-s);
}

/* Long text wants a little more room to breathe than a card does. */
.fbnews-entry {
	font-size: 1.0625rem;
	line-height: 1.85;
}

.fbnews-entry > * {
	margin-block: 0 var(--fbnews-space-3);
}

.fbnews-entry :is(h2, h3, h4) {
	margin-top: var(--fbnews-space-4);
	margin-bottom: var(--fbnews-space-2);
}

.fbnews-entry h2 {
	font-size: 1.5rem;
}

.fbnews-entry h3 {
	font-size: 1.25rem;
}

.fbnews-entry a {
	text-underline-offset: 0.2em;
}

.fbnews-entry ul,
.fbnews-entry ol {
	padding-left: 1.25rem;
}

.fbnews-entry li + li {
	margin-top: 0.35rem;
}

.fbnews-entry blockquote {
	margin-inline: 0;
	padding: var(--fbnews-space-1) 0 var(--fbnews-space-1) var(--fbnews-space-3);
	border-left: 3px solid var(--fbnews-accent);
	color: var(--fbnews-on-surface-muted);
	font-size: 1.125rem;
}

.fbnews-entry :is(code, pre) {
	background: var(--fbnews-surface-raised);
	border-radius: 6px;
	font-size: 0.9em;
}

.fbnews-entry code {
	padding: 0.1rem 0.35rem;
}

.fbnews-entry pre {
	padding: var(--fbnews-space-2);
	overflow-x: auto;
}

.fbnews-article__tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fbnews-space-1);
	margin: var(--fbnews-space-4) 0 0;
}

.fbnews-article__tags a {
	padding: 0.2rem 0.7rem;
	border: 1px solid var(--fbnews-border);
	border-radius: 999px;
	color: var(--fbnews-on-surface-muted);
	font-size: var(--fbnews-text-s);
	text-decoration: none;
}

.fbnews-article__tags a:hover,
.fbnews-article__tags a:focus-visible {
	border-color: var(--fbnews-primary);
	color: var(--fbnews-primary);
}

/* ------------------------------------------------------------------ *
 * Previous and next
 * ------------------------------------------------------------------ */

.fbnews-adjacent {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
	gap: var(--fbnews-space-2);
	margin-top: var(--fbnews-space-5);
	padding-top: var(--fbnews-space-3);
	border-top: 1px solid var(--fbnews-border);
}

.fbnews-adjacent a {
	display: block;
	padding: var(--fbnews-space-2);
	border: 1px solid var(--fbnews-border);
	border-radius: var(--fbnews-radius);
	color: var(--fbnews-on-surface);
	text-decoration: none;
	line-height: 1.45;
}

.fbnews-adjacent a:hover,
.fbnews-adjacent a:focus-visible {
	border-color: var(--fbnews-primary);
	color: var(--fbnews-primary);
}

.fbnews-adjacent__prev {
	text-align: left;
}

.fbnews-adjacent__next {
	text-align: right;
}

.fbnews-adjacent__label {
	display: block;
	color: var(--fbnews-on-surface-muted);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.1em;
}

.fbnews-related {
	margin-top: var(--fbnews-space-5);
	padding-top: var(--fbnews-space-4);
	border-top: 1px solid var(--fbnews-border);
}

/* A lead with no picture is a headline, not half an empty row. */
.fbnews-lead--text {
	grid-template-columns: minmax(0, 1fr);
}

.fbnews-lead--text .fbnews-lead__title {
	max-width: 24ch;
}

/* Two slots, always. One link stretched across the page reads as a banner. */
.fbnews-adjacent {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 40rem) {
	.fbnews-adjacent {
		grid-template-columns: minmax(0, 1fr);
	}

	.fbnews-adjacent__prev {
	text-align: left;
}

.fbnews-adjacent__next {
		text-align: left;
	}
}
