/*
 * The event page and the catalogue.
 *
 * ## How opinionated this is allowed to be
 *
 * The markup sits inside whatever the theme draws, so this stylesheet cannot be
 * scoped the way the admin one is. What it does instead is confine itself to
 * this plugin's own class names and take everything it can from the page it
 * finds itself on: the font is inherited, the link colour is inherited, and the
 * palette is built out of `currentColor` and one accent that DEFAULTS to the
 * theme's own link colour.
 *
 * So it is designed rather than shy — spacing, rhythm, a type scale, cards with
 * a real elevation — but a site that changes its brand changes these too,
 * without editing a line. Four custom properties are the whole surface:
 *
 *     .events-scope { --event-accent: #b4530a; --event-radius: 14px; }
 *
 * ## Light and dark without asking the theme
 *
 * Every colour is mixed from `currentColor` against `--event-ground`, which is
 * `Canvas` — the CSS system colour for a page background. On a dark theme
 * `currentColor` is light and `Canvas` is dark, and every mix inverts with them.
 * That is why there is no `prefers-color-scheme` block: the scheme is whatever
 * the surrounding page already decided, which is more reliable than guessing at
 * the OS setting and disagreeing with the theme.
 */

/* -- Skipping to it -------------------------------------------------------- */

/* The first link on the page, to the main content: out of sight until it has focus. */
.events-skip {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.events-skip:focus {
	position: fixed;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + 0.5rem);
	left: 0.5rem;
	z-index: 100000;
	width: auto;
	height: auto;
}

.events-catalogue,
.event-page,
.event-hero,
.event-schedule,
.event-passes,
.event-register,
.event-plan,
.events-archive {
	--event-ground: Canvas;

	/* The theme's own link colour, unless a site says otherwise. */
	--event-accent: LinkText;

	--event-line: color-mix(in srgb, currentColor 14%, transparent);
	--event-line-strong: color-mix(in srgb, currentColor 28%, transparent);
	--event-line-soft: color-mix(in srgb, currentColor 8%, transparent);
	--event-soft: color-mix(in srgb, currentColor 62%, transparent);
	--event-faint: color-mix(in srgb, currentColor 45%, transparent);
	--event-raised: color-mix(in srgb, currentColor 3%, var(--event-ground));
	--event-sunk: color-mix(in srgb, currentColor 5%, var(--event-ground));

	--event-radius: 14px;
	--event-radius-sm: 10px;

	--event-shadow: 0 1px 2px color-mix(in srgb, currentColor 8%, transparent),
		0 8px 24px -12px color-mix(in srgb, currentColor 22%, transparent);

	--event-gap: clamp(1.75rem, 5vw, 3rem);
}

/* -- The page's own measure ------------------------------------------------ */

/*
 * The event page sets its own width, and that is a change of position worth
 * stating. Everywhere else this plugin defers to the theme — but this page IS
 * the plugin's template, loaded through `template_include`, so there is no
 * theme layout here to defer to: a bare theme gives the content the whole
 * window, and a description at 1,400px runs to about 200 characters a line,
 * which is unreadable at any font size.
 *
 * Two measures, not one. The furniture — hero, schedule, passes, the form —
 * takes the full column, because a grid of pass cards wants the room. The
 * DESCRIPTION is narrower, because prose does not: 42rem is about 75 characters
 * at this size, which is the range every typographic measure lands on.
 */

.event-page {
	max-width: 62rem;
	margin-inline: auto;
	padding-inline: clamp(1rem, 4vw, 2rem);
	padding-block-end: clamp(2rem, 6vw, 4rem);
}

.event-page__body {
	max-width: 42rem;
}

.events-archive {
	max-width: 76rem;
	margin-inline: auto;
	padding-inline: clamp(1rem, 4vw, 2rem);
	padding-block-end: clamp(2rem, 6vw, 4rem);
}

/* -- One type scale, whatever the theme's is -------------------------------- */

/*
 * The FURNITURE sets its own base size; the author's PROSE does not.
 *
 * This is not a style preference, it is a bug fix with a rule attached. These
 * components mix `rem` (absolute, off the root) and `em` (relative, off the
 * inherited size), and on a theme whose base is 1.6rem that mixture came apart:
 * the card's title, set in `rem`, stayed at 18px while the date beside it, set
 * in `em`, grew to 24px — so every card in the catalogue announced its date
 * twice the size of its name.
 *
 * Declaring the base here makes `em` and `rem` agree again, and makes this
 * plugin's proportions its own rather than an accident of the theme's body size.
 *
 * `.event-page__body` is deliberately NOT in this list. That is the author's
 * writing, and it should read at whatever size the rest of the site reads at.
 */
.event-summary,
.event-schedule,
.event-passes,
.events-filter,
.event-card__link,
.events-pager {
	font-size: 1rem;
}

/* -- Section rhythm -------------------------------------------------------- */

.event-schedule,
.event-passes,
.event-register,
.event-plan {
	margin-block: var(--event-gap);
}

.event-section__title {
	margin: 0 0 1rem;
	font-size: clamp(1.05rem, 2.4vw, 1.3rem);
	line-height: 1.2;
	letter-spacing: -0.01em;
}

/* -- The hero -------------------------------------------------------------- */

.event-hero {
	display: block;
	margin: 0 0 clamp(1.25rem, 4vw, 2rem);
}

.event-hero img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 7;
	object-fit: cover;
	border-radius: var(--event-radius);
	background: var(--event-sunk);
}

/*
 * Smaller on a phone or tablet, not just a different shape: inset from the
 * measure everything else on the page uses, rather than matching it the way
 * the desktop crop does.
 */
@media (max-width: 782px) {
	.event-hero img {
		width: 85%;
		margin-inline: auto;
		aspect-ratio: 4 / 3;
	}
}

/* -- Title and summary ----------------------------------------------------- */

.event-page__header {
	margin-bottom: clamp(1.25rem, 4vw, 2rem);
}

.event-page__title {
	margin: 0 0 0.6rem;
	font-size: clamp(1.9rem, 5.5vw, 3rem);
	line-height: 1.08;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

/*
 * The summary is a row of facts rather than a sentence, so it wraps as a row of
 * facts: each one stays whole and the line breaks between them.
 */
.event-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem 0.65rem;
	margin: 0;
	color: var(--event-soft);
	font-size: 1rem;
}

.event-summary__when {
	font-weight: 650;
	color: currentColor;
}

.event-summary__price {
	padding: 0.15em 0.6em;
	border-radius: 999px;
	background: var(--event-sunk);
	font-weight: 600;
	font-size: 0.9em;
}

.event-summary__sep {
	color: var(--event-faint);
}

/* The location link: the line's own colour, underlined — it sits on a poster's picture too. */
.event-summary .event-venue {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

.event-summary .event-venue:hover,
.event-summary .event-venue:focus-visible {
	text-decoration-thickness: 2px;
}

.event-page__body {
	margin-block: var(--event-gap);
	font-size: 1.05rem;
	line-height: 1.65;
}

.event-description > :first-child {
	margin-top: 0;
}

.event-description > :last-child {
	margin-bottom: 0;
}

/* -- Schedule -------------------------------------------------------------- */

.event-schedule__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.5rem;
}

.event-schedule__item {
	margin: 0;
}

.event-schedule__when {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.85rem 1rem;
	background: var(--event-raised);
	border: 1px solid var(--event-line-soft);
	border-radius: var(--event-radius-sm);
}

/*
 * The date chip. Tabular figures and a fixed width so a column of them lines up
 * whether the day is 1 or 31 — a chip that shifts by a character is the thing
 * that makes a list look unmade.
 */
.event-chip {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 3.1rem;
	padding: 0.4rem 0;
	border-radius: var(--event-radius-sm);
	background: var(--event-sunk);
	line-height: 1.05;
	font-variant-numeric: tabular-nums;
}

.event-chip__day {
	font-size: 1.3rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.event-chip__month {
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--event-soft);
}

.event-schedule__text {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

.event-schedule__full {
	font-weight: 600;
}

.event-schedule__label {
	color: var(--event-soft);
	font-size: 0.92em;
}

/* -- Passes ---------------------------------------------------------------- */

/*
 * A grid that answers the width it is given rather than a fixed column count:
 * the same list has to work in a theme's narrow content column and in a
 * full-width block.
 */
.event-passes__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
	gap: 0.75rem;
}

.event-passes__item {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	padding: 1rem 1.1rem;
	background: var(--event-raised);
	border: 1px solid var(--event-line);
	border-radius: var(--event-radius-sm);
}

.event-passes__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
}

.event-passes__name {
	font-weight: 650;
}

.event-passes__price {
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.event-passes__price--free {
	font-size: 1rem;
	color: var(--event-soft);
}

.event-passes__note {
	color: var(--event-soft);
	font-size: 0.9em;
}

/* -- The registration form ------------------------------------------------- */

/*
 * The form is drawn by the Forms plugin and carries its own stylesheet. All
 * this does is give it the same frame as everything else on the page, so the
 * event does not visibly end where the form begins.
 */
.event-register {
	padding: clamp(1.1rem, 3.5vw, 1.75rem);
	background: var(--event-raised);
	border: 1px solid var(--event-line);
	border-radius: var(--event-radius);
	box-shadow: var(--event-shadow);
	scroll-margin-top: 1.5rem;
}

.event-register .event-section__title {
	margin-top: 0;
}

/* -- Poster ---------------------------------------------------------------- */

.event-poster {
	position: relative;
	margin-bottom: clamp(1.25rem, 4vw, 2rem);
	border-radius: var(--event-radius);
	overflow: hidden;
}

.event-poster .event-hero {
	margin: 0;
}

.event-poster .event-hero img {
	aspect-ratio: 21 / 9;
	border-radius: 0;
}

/*
 * A gradient scrim rather than a flat wash: a flat one dims the whole picture to
 * protect two lines of text at the bottom of it.
 */
.event-poster__overlay {
	position: absolute;
	inset: auto 0 0 0;
	padding: clamp(3rem, 12vw, 6rem) clamp(1.1rem, 4vw, 2.25rem) clamp(1.1rem, 3vw, 1.75rem);
	background: linear-gradient(to top, rgb(0 0 0 / 0.82), rgb(0 0 0 / 0.45) 45%, rgb(0 0 0 / 0));
	color: #fff;
}

.event-poster__title {
	margin: 0 0 0.45rem;
	color: #fff;
	font-size: clamp(1.8rem, 5.5vw, 3.2rem);
	line-height: 1.05;
	letter-spacing: -0.025em;
	text-wrap: balance;
	text-shadow: 0 1px 12px rgb(0 0 0 / 0.35);
}

.event-poster__overlay .event-summary {
	color: rgb(255 255 255 / 0.88);
}

.event-poster__overlay .event-summary__price {
	background: rgb(255 255 255 / 0.16);
	color: #fff;
}

.event-poster__overlay .event-summary__sep {
	color: rgb(255 255 255 / 0.45);
}

/*
 * The CARD shrinks, not just the picture inside it: `.event-poster` is what
 * `.event-poster__overlay` is positioned against (`inset: auto 0 0 0`) and
 * what carries the rounded corners. Insetting only the `<img>` — the generic
 * `.event-hero img` rule above — would leave the overlay and the card's own
 * background spanning the old, wider box behind a narrower photo. So the
 * card is resized instead, and the image is set back to filling ITS card
 * edge-to-edge, the same way it does on desktop.
 */
@media (max-width: 782px) {
	.event-poster {
		width: 85%;
		margin-inline: auto;
	}

	.event-poster .event-hero img {
		width: 100%;
		margin-inline: 0;
		aspect-ratio: 4 / 5;
	}
}

/* -- Compact --------------------------------------------------------------- */

.event-page--compact .event-schedule {
	margin-top: 1rem;
}

/* -- The catalogue --------------------------------------------------------- */

.events-archive__header {
	margin-bottom: clamp(1.25rem, 4vw, 2rem);
}

.events-archive__title {
	margin: 0;
	font-size: clamp(1.8rem, 5vw, 2.6rem);
	line-height: 1.1;
	letter-spacing: -0.025em;
}

.events-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: flex-end;
	margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
	padding: 1rem;
	background: var(--event-raised);
	border: 1px solid var(--event-line-soft);
	border-radius: var(--event-radius);
}

.events-filter__field {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	flex: 1 1 9.5rem;
	min-width: 0;
}

.events-filter__field--grow {
	flex: 2 1 14rem;
}

.events-filter__field > span {
	font-size: 0.75em;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--event-faint);
}

/*
 * EVERY control in the filter, one rule, one height.
 *
 * It used to be `.events-filter input, .events-filter__go` — two of the three
 * things in there — so a `<select>` was left to the browser and the catalogue
 * dropdown sat beside the date fields at a different height, with a different
 * border and different corners. Naming the ELEMENTS is what makes a control
 * added later look like the ones already there.
 *
 * `height` and not `min-height`: a date input carries a picker button and a
 * select carries its own chrome, and both are intrinsically taller than a text
 * box at the same padding. A minimum lets them each find their own height, and
 * the row then steps up and down across four controls that are supposed to be
 * one row.
 *
 * `appearance: none` is what lets a select take this box at all; without it
 * Safari keeps its own and ignores most of what follows.
 */
.events-filter input,
.events-filter select,
.events-filter button {
	appearance: none;
	-webkit-appearance: none;
	box-sizing: border-box;
	height: 44px;
	padding: 0 0.8rem;
	border: 1px solid var(--event-line);
	border-radius: var(--event-radius-sm);
	background: var(--event-ground);
	color: inherit;
	font: inherit;
	/* 16px so a phone does not zoom the page when one is focused. */
	font-size: 16px;
	line-height: normal;
}

/* Only the fields fill their column. The button is as wide as its word. */
.events-filter input,
.events-filter select {
	width: 100%;
}

/*
 * A select needs its arrow back, since `appearance: none` took the browser's.
 * Drawn as an inline SVG background so it needs no extra element, no icon font
 * and no request.
 */
.events-filter select {
	padding-inline-end: 2rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 0.7rem;
	cursor: pointer;
}

.events-filter input:hover,
.events-filter select:hover {
	border-color: var(--event-line-strong);
}

.events-filter input:focus-visible,
.events-filter select:focus-visible,
.events-filter button:focus-visible {
	outline: 2px solid var(--event-accent);
	outline-offset: 2px;
}

/*
 * The submit. More specific than the shared rule above on purpose — a bare
 * `.events-filter__go` loses to `.events-filter button`, which is one class and
 * one element, and the button silently went full width and wrapped onto a row
 * of its own.
 */
.events-filter .events-filter__go {
	flex: 0 0 auto;
	width: auto;
	padding-inline: 1.4rem;
	background: var(--event-accent);
	border-color: var(--event-accent);
	color: var(--event-ground);
	font-weight: 650;
	cursor: pointer;
}

.events-filter .events-filter__go:hover {
	filter: brightness(1.08);
}

.events-catalogue__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
	gap: clamp(1rem, 2.5vw, 1.75rem);
}

/*
 * A card is a CARD: a frame, a ground and padding inside it.
 *
 * It used to be a bare column of text under an image, with the type running to
 * the very edge of its grid track — so a row of them read as three columns of a
 * table rather than as three things you could click. The padding is what draws
 * the boundary; the border and the hover lift only confirm it.
 */
.event-card__link {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	height: 100%;
	padding: 0.85rem 0.9rem 1rem;
	text-decoration: none;
	color: inherit;
	background: var(--event-raised);
	border: 1px solid var(--event-line);
	border-radius: var(--event-radius);

	/* Only the transform and shadow move; nothing that would reflow the grid. */
	transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.event-card__link:hover,
.event-card__link:focus-visible {
	transform: translateY(-2px);
	box-shadow: var(--event-shadow);
	border-color: var(--event-line-strong, var(--event-soft));
}

.event-card__link:focus-visible {
	outline: 2px solid var(--event-accent);
	outline-offset: 3px;
}

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

	.event-card__link:hover,
	.event-card__link:focus-visible {
		transform: none;
	}
}

.event-card__image {
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	/* One step tighter than the card's own corner, so the two read as nested
	   rather than as two shapes that happen to be round. */
	border-radius: var(--event-radius-sm);
	background: var(--event-sunk);
	margin-bottom: 0.35rem;
}

/*
 * The name is the biggest thing on the card, and everything else is smaller
 * than it. Obvious, and worth pinning down in `em` off the base declared above
 * so it stays true: a card is read name-first, and a date set larger than the
 * event it belongs to reads as a listing of dates that happen to have names.
 */
.event-card__title {
	margin: 0;
	font-size: 1.2em;
	font-weight: 650;
	line-height: 1.25;
	letter-spacing: -0.015em;
	text-wrap: balance;
}

.event-card__when {
	font-size: 0.95em;
	font-weight: 600;
	color: var(--event-soft);
}

.event-card__venue,
.event-card__excerpt {
	color: var(--event-soft);
	font-size: 0.9em;
}

.event-card__excerpt {
	margin: 0;
	line-height: 1.5;
}

.event-card__price {
	margin-top: auto;
	padding-top: 0.5rem;
	font-size: 0.95em;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.events-catalogue__empty {
	padding: 2.5rem 1rem;
	text-align: center;
	color: var(--event-soft);
	background: var(--event-raised);
	border: 1px dashed var(--event-line);
	border-radius: var(--event-radius);
}

.events-pager {
	display: flex;
	gap: 1rem;
	align-items: center;
	justify-content: center;
	margin-top: 2.5rem;
}

.events-pager__link {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	padding-inline: 1rem;
	border: 1px solid var(--event-line);
	border-radius: var(--event-radius-sm);
	text-decoration: none;
}

.events-pager__link:hover {
	background: var(--event-sunk);
}

.events-pager__count {
	color: var(--event-faint);
	font-size: 0.9em;
	font-variant-numeric: tabular-nums;
}

/* -- Name your price ------------------------------------------------------- */

/*
 * A pass with no single price says so in words rather than in figures, so it is
 * set at the weight of a label instead of the weight of a number — a price is
 * the biggest thing on a pass card, and "Name your price" set that large reads
 * as a shout.
 */
.event-passes__price--chosen {
	font-size: 0.9em;
	font-weight: 600;
	letter-spacing: 0;
	color: var(--event-accent);
	white-space: normal;
	text-align: right;
}

.event-passes__terms {
	color: var(--event-faint);
	font-size: 0.85em;
	font-variant-numeric: tabular-nums;
}

/* -- Feedback -------------------------------------------------------------- */

/*
 * The same frame as the registration section — it is the same kind of thing in
 * the same place on the page, and giving it a look of its own would make a
 * finished event feel like a different site.
 */
.event-feedback__intro {
	margin: 0 0 1.25rem;
	color: var(--event-soft);
}

/* -- What people said ------------------------------------------------------ */

.event-reviews {
	margin-block: var(--event-gap);
}

.event-reviews__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem 1rem;
	margin-bottom: 1rem;
}

.event-reviews__head .event-section__title {
	margin: 0;
}

.event-reviews__summary {
	display: flex;
	align-items: baseline;
	gap: 0.35rem;
	margin: 0;
	color: var(--event-soft);
	font-size: 0.95em;
}

.event-reviews__average {
	font-size: 1.35em;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: currentColor;
	font-variant-numeric: tabular-nums;
}

.event-reviews__count {
	color: var(--event-faint);
}

.event-reviews__nav {
	display: flex;
	gap: 0.4rem;
	margin-inline-start: auto;
}

.event-reviews__button {
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 1px solid var(--event-line);
	border-radius: 999px;
	background: var(--event-ground);
	color: inherit;
	font-size: 1.2rem;
	line-height: 1;
	cursor: pointer;
}

.event-reviews__button:hover:not(:disabled) {
	background: var(--event-sunk);
}

.event-reviews__button:disabled {
	opacity: 0.35;
	cursor: default;
}

/*
 * The track. An ordinary scroll container with snapping — no carousel, nothing
 * hidden, and it works before any script runs.
 *
 * `scroll-padding-inline` keeps a snapped card off the very edge of the
 * container, which otherwise looks like the row is clipped rather than scrolled.
 */
.event-reviews__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(15rem, 20rem);
	gap: 0.85rem;
	margin: 0;
	padding: 0 0 0.5rem;
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 0.1rem;
}

@media (max-width: 640px) {
	.event-reviews__track {
		/*
		 * A FIXED track size, not a `minmax()` with a floor of nought.
		 *
		 * `minmax(0, 82%)` reads as "up to 82%", and a grid whose columns may be
		 * nought wide does not overflow — it squeezes. Seven cards in a phone's
		 * width collapsed to about thirty pixels each, a column of single
		 * letters, and the scroller had nothing to scroll. A single value is a
		 * fixed track: seven of them are 574% of the container, which is what
		 * makes it scroll.
		 *
		 * 82% rather than 100% so the next card peeks in, which is what tells
		 * somebody there IS a next card.
		 */
		grid-auto-columns: 82%;
	}
}

.event-review {
	scroll-snap-align: start;
	/*
	 * POSITIONED, so the score's visually-hidden text has a containing block.
	 *
	 * That text is `position: absolute`, and an absolutely positioned element is
	 * laid out against its nearest POSITIONED ancestor — not its nearest
	 * scrolling one. With none, the containing block is the page itself, so the
	 * hidden span belonging to the seventh card escaped the scroller entirely
	 * and sat two thousand pixels out, stretching the document that wide. The
	 * page scrolled sideways to a column of nothing; the slider looked fine.
	 */
	position: relative;
	display: flex;
	flex-direction: column;
	/* A grid item's default `min-width: auto` lets long words push a card wider
	   than its track and drag the whole row out of alignment. */
	min-width: 0;
	overflow-wrap: anywhere;
	gap: 0.55rem;
	padding: 1rem 1.1rem;
	background: var(--event-raised);
	border: 1px solid var(--event-line);
	border-radius: var(--event-radius-sm);
}

.event-review__score {
	margin: 0;
}

.event-review__stars {
	display: flex;
	gap: 0.05em;
	font-size: 1.05rem;
	line-height: 1;
}

/*
 * An unfilled star is a drawn outline rather than a paler fill, so the row reads
 * as "four out of five" instead of "four stars and something else". `color-mix`
 * against the card's ground is what keeps it visible on light and dark alike.
 */
.event-review__star {
	color: color-mix(in srgb, currentColor 18%, var(--event-ground));
}

.event-review__star.is-on {
	color: #f5a524;
}

.event-review__text {
	margin: 0;
	font-size: 0.95em;
	line-height: 1.5;
}

.event-review__by {
	display: flex;
	flex-wrap: wrap;
	gap: 0.2rem 0.5rem;
	margin: auto 0 0;
	padding-top: 0.3rem;
	color: var(--event-faint);
	font-size: 0.85em;
}

.event-review__who {
	font-weight: 600;
}

/*
 * The theme may not define this, and the score's text alternative depends on it
 * — without it every card would print "Scored 4 out of 5" beside its pips.
 */
.event-reviews .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}
