/**
 * Rental Search.
 *
 * The results grid deliberately has almost nothing here: it reuses the
 * .property-directory and .property-box classes the site's Property grid
 * already carries, so a search result looks like every other Property card
 * rather than like a second design. What is left is the filter form, the Rent
 * line and the pagination, none of which existed before.
 */

.aur-rental-search__filters {
	align-items: end;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-block-end: 1.5rem;
}

/*
 * Fields are sized by what their widest option says rather than split evenly.
 * An even split truncated "Any Property Category" and "Any time, including
 * future dates" while leaving "Bedrooms" half empty.
 */
.aur-rental-search__field {
	display: flex;
	flex: 1 1 11rem;
	flex-direction: column;
	gap: 0.35rem;
	min-inline-size: 0;
}

.aur-rental-search__field--wide {
	flex: 2 1 15rem;
}

.aur-rental-search__field--narrow {
	flex: 0 1 8rem;
}

.aur-rental-search__field label {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/*
 * One control height across selects and number inputs. They come from
 * different UA stylesheets and were landing a couple of pixels apart, which
 * reads as a wobbly row once six of them sit side by side.
 */
.aur-rental-search__field select,
.aur-rental-search__field input {
	block-size: 2.75rem;
	inline-size: 100%;
	margin: 0;
	max-inline-size: 100%;
	padding-block: 0;
	text-overflow: ellipsis;
}

/*
 * The rent inputs are the only numeric pair here. Their spinners eat width a
 * three-digit figure needs, and nobody nudges a rent 25 at a time — the
 * keyboard is the control.
 */
.aur-rental-search__field--narrow input[type="number"] {
	appearance: textfield;
}

/*
 * The attribute selector is doing real work: the theme styles number inputs at
 * the same specificity as the rule above and loads after this file, so a plain
 * `input` selector loses. Both declarations here are repeats of ones that rule
 * already makes and cannot win — without them the rent boxes sit 8px shorter
 * than the selects beside them and carry 10px of margin the other five do not,
 * which shows up as a ragged bottom edge across the row.
 */
.aur-rental-search__field input[type="number"] {
	block-size: 2.75rem;
	margin: 0;
}

.aur-rental-search__field--narrow input[type="number"]::-webkit-inner-spin-button,
.aur-rental-search__field--narrow input[type="number"]::-webkit-outer-spin-button {
	appearance: none;
	margin: 0;
}

.aur-rental-search__field label {
	white-space: nowrap;
}

/* Below the theme's 768 breakpoint, two per row beats six squeezed into one. */
@media (max-width: 767px) {
	.aur-rental-search__field,
	.aur-rental-search__field--wide,
	.aur-rental-search__field--narrow {
		flex: 1 1 calc(50% - 0.5rem);
	}
}

/*
 * The actions sit on the same flex line as the fields, and a field is a label
 * stacked on a control while this is a bare button. Aligning to the end puts
 * the button on the controls' baseline instead of floating at the top of the
 * row against the labels.
 */
.aur-rental-search__actions {
	align-items: flex-end;
	align-self: flex-end;
	display: flex;
	gap: 1rem;
}

/*
 * The theme gives every button 26px of bottom margin, which lifted this one off
 * the controls' baseline even with the box aligned correctly. Named by element
 * and class because the theme's own rule loads later and a looser selector
 * loses — the same reason the rent inputs need their height stated twice.
 */
.aur-rental-search__actions button.aur-rental-search__submit[type="submit"],
.aur-rental-search__actions input.aur-rental-search__submit[type="submit"] {
	margin: 0;
}

/*
 * Text that only a screen reader reads. The block needs its own rather than the
 * theme's, because the block renders from a plugin that outlives any theme and
 * a card whose only label went missing is a card nobody can identify.
 */
.aur-rental-search__sr {
	block-size: 1px;
	clip-path: inset(50%);
	inline-size: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
}

/*
 * The filters in force.
 *
 * Under the form, because that is where the answer to "what am I looking at"
 * is wanted, and because the row disappears entirely when nothing is filtered
 * — a search with no filters on it should look exactly as it always did.
 */
.aur-rental-search__applied {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.75rem;
	margin-block-end: 1.5rem;
}

.aur-rental-search__applied-label {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/*
 * The chips are a list, and the theme puts bullets and margins on every list
 * inside `.page-content`. These selectors carry the element name so they reach
 * past that rule rather than under it; that is the whole reason for the
 * `ul` and `li` in them.
 */
.aur-rental-search ul.aur-rental-search__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.aur-rental-search ul.aur-rental-search__chips li {
	list-style: none;
	margin: 0;
}

/*
 * One filter, and the way to remove it.
 *
 * Deliberately drawn in nothing but the theme's own colours: the surface grey
 * the site already uses for a raised panel, and whatever colour this site's
 * links happen to be — which is red on the red treatment and purple on the
 * purple one, and correct on both without this file knowing which is running.
 * A chip that hardcoded its own text colour would be a fifth brand colour on a
 * page that has four, and would be wrong on one of the two treatments.
 *
 * The whole chip is the hit area, and it is 2.25rem tall so that it is one on
 * a phone.
 */
.aur-rental-search__chip {
	align-items: center;
	background-color: var(--wp--preset--color--surface-shade, #ececec);
	border: 1px solid currentcolor;
	display: inline-flex;
	font-size: 0.85rem;
	gap: 0.5rem;
	line-height: 1.2;
	min-block-size: 2.25rem;
	padding-block: 0.4rem;
	padding-inline: 0.75rem;
	text-decoration: none;
}

.aur-rental-search__chip:hover,
.aur-rental-search__chip:focus {
	background-color: var(--wp--preset--color--white, #fff);
	text-decoration: underline;
}

.aur-rental-search__chip-remove {
	font-size: 1.1em;
	line-height: 1;
}

.aur-rental-search__reset {
	font-size: 0.85rem;
}

/*
 * A zero-height marker sitting just above the filter bar.
 *
 * CSS has no selector for "this sticky element is currently stuck", so the
 * script watches this instead: once it leaves the viewport the bar is against
 * the top of the window. The negative margin keeps it out of the layout.
 */
.aur-rental-search__sentinel {
	block-size: 1px;
	margin-block-end: -1px;
}

/*
 * The line the grid opens with.
 *
 * This is now the only count on the page outside the map's caption. There used
 * to be a second one above the map, which said less -- a bare total against
 * this line's "Showing 1-12 of 61" -- and sat where the pinned bar scrolled
 * over it. The sort control belongs here too, beside the results it reorders
 * rather than up in the filter form.
 */
.aur-rental-search__results-header {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	justify-content: space-between;
	margin-block: 1rem 0.5rem;
}

/*
 * The count, carrying the weight needed to keep its own margins.
 *
 * It is the only paragraph in the header, so it is also that header's
 * `:last-of-type`, and the theme gives every such paragraph in `.page-content`
 * a 26px bottom margin. In a centred flex row that margin is part of the box
 * being centred, so the text rides half of it above the row's middle and the
 * count reads as pinned to the top while the sort sits in the space below.
 */
.aur-rental-search .aur-rental-search__results-header p.aur-rental-search__showing {
	font-weight: 700;
	margin: 0;
}

.aur-rental-search__sort {
	align-items: center;
	display: flex;
	gap: 0.5rem;
	margin: 0;
}

.aur-rental-search__sort label {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

/*
 * The sort select sizes to its own options, not to the row.
 *
 * `inline-size` is the fourth declaration the theme's form group has taken from
 * this block -- it sets selects to 100% so they fill a stacked form, which is
 * right there and wrong in a flex row: the select claimed the full width, the
 * header wrapped, and the count ended up stranded on a line of its own with the
 * control sprawling beneath it. `max-inline-size` alone did not answer that,
 * because nothing was setting a width for it to cap.
 *
 * Auto, so the two halves of the header sit on one line and centre against each
 * other. On a phone the control is meant to span the screen, and the rule below
 * gets that back with flex-grow inside a full-width form rather than by setting
 * a width here.
 */
.aur-rental-search__sort select {
	block-size: 2.75rem;
	inline-size: auto;
	margin: 0;
	max-inline-size: 100%;
	padding-block: 0;
}

/*
 * The sort button is what makes the control work with JavaScript switched off.
 * The script hides it once it can submit the form on change, in that order.
 */
.aur-rental-search__sort-submit {
	font-size: 0.85rem;
	margin: 0;
	padding-block: 0.5rem;
	padding-inline: 0.9rem;
}

/*
 * The theme gives every button a `display`, at a specificity the browser's own
 * `[hidden]` rule cannot reach. Without this the script hides the button and
 * nothing happens.
 */
.aur-rental-search__sort-submit[hidden] {
	display: none;
}

/* Below the theme's breakpoint the two halves stack rather than squeeze. */
@media (max-width: 767px) {

	.aur-rental-search__results-header {
		align-items: flex-start;
		flex-direction: column;
	}

	.aur-rental-search__sort {
		inline-size: 100%;
	}

	.aur-rental-search__sort select {
		flex: 1 1 auto;
		min-inline-size: 0;
	}
}

/*
 * A search that matched nothing.
 *
 * A panel rather than a sentence, so that the page reads as having answered
 * rather than as having failed to draw. The button is the theme's own
 * `in-page-button`, which is the site's way of writing "here is the way on".
 */
.aur-rental-search__empty {
	border: 1px solid var(--wp--preset--color--border, #d8d8d8);
	margin-block: 1.5rem;
	padding-block: 1.5rem;
	padding-inline: 1.5rem;
	text-align: center;
}

.aur-rental-search__empty-title {
	margin-block-start: 0;
}

/*
 * The element name is doing the same work it does on the chips: the theme sets
 * `margin-inline: 0` on every paragraph in `.page-content`, and without the
 * extra weight here the centred column is centred on nothing.
 */
.aur-rental-search .aur-rental-search__empty p {
	margin-inline: auto;
	max-inline-size: 44rem;
}

/*
 * Both of these are undoing a bottom margin the theme puts on the thing they
 * are — a last paragraph, and an `in-page-button` — and both carry the extra
 * weight needed to reach it. The panel provides its own padding; the theme's
 * margins on top of that left a hand's width of empty box under the button.
 */
.aur-rental-search .aur-rental-search__empty p.aur-rental-search__empty-actions {
	margin-block-end: 0;
}

a.aur-rental-search__empty-reset {
	margin-block-end: 0;
}

/*
 * The availability line. A Property that is leased today but free on a known
 * future date is the one a pre-leasing renter is looking for, so it is not
 * dimmed or set apart — it reads as an offer.
 */
.aur-rental-search__timeframe {
	font-size: 1rem;
	line-height: 1.2;
	padding-block: 0.35rem;
	padding-inline: 0.6rem;
}

/*
 * The rent line. Last paragraph of the card body, so the same theme rule that
 * was pushing the result count off centre was adding 26px under every card's
 * price; the Amenity list that sometimes follows is a `ul` and does not take
 * the `:last-of-type` away from it.
 */
.aur-rental-search .property-information p.aur-rental-search__rent {
	font-size: 1.15rem;
	line-height: 1.3;
	margin-block: 0.4rem 0;
}

.aur-rental-search__rent-amount {
	font-weight: 900;
}

.aur-rental-search__rent-caption {
	font-size: 0.85em;
}

/* The per-bedroom line sits under the total, as the second of a pair. */
.aur-rental-search .property-information p.aur-rental-search__rent + p.aur-rental-search__rent {
	font-size: 1rem;
	margin-block-start: 0.1rem;
}

/*
 * Amenity badges.
 *
 * A badge only ever states what an Amenity term actually attached to this
 * Property, and a Property with none renders no markup here at all — see
 * RentalSearch::amenities(). There is never an empty state to style.
 *
 * The theme's `.page-content ul` rule (`list-style: revert`, a block margin
 * and an inline-start padding) plus its `li { margin-block-end: 10px }` load
 * after this file and would turn the badges into a bulleted, indented list
 * with a gap under each one. Both selectors here carry the element name and
 * the same weight of class as `.aur-rental-search__chips` above, which beats
 * the identical theme rule for the same reason.
 */
.aur-rental-search ul.aur-rental-search__amenities {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	list-style: none;
	margin: 0.5rem 0 0;
	padding: 0;
}

.aur-rental-search ul.aur-rental-search__amenities li.aur-rental-search__amenity {
	background-color: var(--wp--preset--color--surface-shade, #ececec);
	border-radius: 999px;
	display: inline-flex;
	font-size: 0.75rem;
	line-height: 1.2;
	list-style: none;
	margin: 0;
	padding-block: 0.25rem;
	padding-inline: 0.6rem;
}

/*
 * Pagination.
 *
 * Previous and next at the ends, and every target at least 44px in both
 * directions — the size a thumb can actually hit. The bare numbers this
 * replaces were 11px tall and a finger's width apart.
 */
.aur-rental-search__pagination {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	justify-content: center;
	margin-block-start: 1.5rem;
}

.aur-rental-search__pages {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	justify-content: center;
}

.aur-rental-search__page {
	align-items: center;
	display: inline-flex;
	justify-content: center;
	min-block-size: 2.75rem;
	min-inline-size: 2.75rem;
	padding-inline: 0.5rem;
	text-decoration: none;
}

.aur-rental-search__page:hover,
.aur-rental-search__page:focus {
	background-color: var(--wp--preset--color--surface-shade, #ececec);
}

/*
 * The current page is filled rather than underlined. Underlining it made it
 * look like the one link in the row that had been visited.
 */
.aur-rental-search__page.is-current {
	background-color: var(--wp--preset--color--purple, #492879);
	color: var(--wp--preset--color--white, #fff);
	font-weight: 900;
}

.aur-rental-search__page--step {
	font-weight: 700;
	padding-inline: 1rem;
}

/*
 * Previous at page one, next at the last: kept in place and greyed rather than
 * removed, so the numbers do not shift under a thumb that is aiming at one.
 */
.aur-rental-search__page.is-disabled {
	color: var(--wp--preset--color--disabled, #999);
	cursor: default;
}

.aur-rental-search__page.is-disabled:hover,
.aur-rental-search__page.is-disabled:focus {
	background-color: transparent;
}

/*
 * The map.
 *
 * It sits above the grid and is a second way of reading the same results, never
 * the only way: the grid below it is server-rendered and complete, so a visitor
 * with no JavaScript, no Google Maps key or no network still has the whole
 * search. Everything here therefore degrades to empty space rather than to a
 * hole in the page.
 */
.aur-rental-search__map {
	margin-block-end: 0.5rem;
	position: relative;
}

.aur-rental-search__map-canvas {
	block-size: clamp(18rem, 45vh, 32rem);
	inline-size: 100%;
}

.aur-rental-search__map-status {
	font-size: 0.9rem;
	margin: 0;
	padding-block: 0.75rem;
}

/*
 * Why there are fewer points than cards. Shown only when something actually
 * collapsed, because the explanation is only owed when the counts differ.
 */
.aur-rental-search .aur-rental-search__map-column p.aur-rental-search__map-caption {
	font-size: 0.85rem;
	margin-block: 0 1.5rem;
}

.aur-map-bubble__title {
	margin-block: 0 0.25rem;
}

.aur-map-bubble__address,
.aur-map-bubble__count {
	font-size: 0.85rem;
	margin-block: 0 0.5rem;
}

.aur-map-bubble__units {
	list-style: none;
	margin: 0;
	max-block-size: 14rem;
	overflow-y: auto;
	padding: 0;
}

.aur-map-unit {
	border-block-start: 1px solid rgb(0 0 0 / 12%);
	display: flex;
	flex-direction: column;
	padding-block: 0.4rem;
}

.aur-map-unit:first-child {
	border-block-start: 0;
}

.aur-map-unit__link {
	font-weight: 700;
}

.aur-map-unit__facts,
.aur-map-unit__availability {
	font-size: 0.8rem;
}

.aur-map-unit__rent {
	display: block;
	font-weight: 700;
}

.aur-map-unit__rent-caption {
	font-weight: 400;
}

/*
 * The tie between a card and its point on the map.
 *
 * ## Why this is an outline and a background and nothing else
 *
 * A result card is deliberately the theme's own `.property-box`, so that a
 * search result looks like every other Property card on the site. Highlighting
 * one must therefore change nothing about how it is built — no border that
 * would move it, no shadow the site does not use elsewhere. An outline is drawn
 * outside the layout and costs no space, and the fill is the exact grey the
 * theme's own `.property-box:hover` already uses, so a highlighted card looks
 * like a card being pointed at rather than like a different kind of card.
 */
.aur-rental-search__results .property-box {
	outline: 3px solid transparent;
	outline-offset: 2px;
	transition: outline-color 150ms ease, background-color 150ms ease;
}

.aur-rental-search__results .property-box.is-aur-highlighted {
	background-color: var(--wp--preset--color--surface-shade, #ececec);
	outline-color: var(--wp--preset--color--purple, #492879);
}

/*
 * The theme gives `.property-box` a hover state and a `:focus` state, but the
 * focusable element is the link inside the box, so the `:focus` rule can never
 * match and a keyboard user gets nothing. This is that same state, reaching the
 * keyboard — the theme's colour, the theme's rule, one selector it predates.
 */
.aur-rental-search__results .property-box:focus-within {
	background-color: var(--wp--preset--color--surface-shade, #ececec);
}

/*
 * A pin's bubble, for the units whose cards are not on the page being read.
 *
 * The map draws the whole search and the grid draws twelve of it, so most pins
 * point at least partly off the page. The line saying so, and the link to the
 * page the card is on, are the way out of that — see map.js.
 */
.aur-map-unit__page,
.aur-map-unit__show {
	font-size: 0.8rem;
	margin-block-start: 0.15rem;
}

/*
 * "Show in results" is a link to the card's own id, so it works without
 * JavaScript and needs no styling of its own — it is the same link the rest of
 * this bubble is made of. It was a `<button>` first, and the theme's own button
 * treatment turned it into a full-width uppercase call to action inside a
 * 240px bubble, which pushed the other three units out of view.
 */

/*
 * Pagination on a phone.
 *
 * Previous, six numbers and Next need 468px of row and a phone has 345. Rather
 * than let the three parts wrap into three stacked lines — which put Next
 * below the numbers, a long way from the thumb that wanted it — the two steps
 * take the ends of the first line and the numbers take the second. Both rows
 * stay 44px tall.
 */
@media (max-width: 767px) {

	.aur-rental-search__pagination {
		justify-content: space-between;
	}

	.aur-rental-search__page--prev {
		order: 1;
	}

	.aur-rental-search__page--next {
		order: 2;
	}

	.aur-rental-search__pages {
		flex-basis: 100%;
		order: 3;
	}
}

/*
 * ==========================================================================
 * The desktop layout: the map beside the cards.
 * ==========================================================================
 *
 * ## What the scrollbar has to do with any of this
 *
 * The block renders inside `#inner-content.wrap`, which from 1030 up is a
 * centred column of a fixed width. Getting out of it means being as wide as
 * the viewport, and the usual way of writing that — `100vw` — is a viewport
 * width that *includes* the classic scrollbar. On a page tall enough to
 * scroll, a `100vw` element is therefore a scrollbar's width wider than the
 * space there is, which is a horizontal scrollbar on every page that carries
 * this block.
 *
 * So the scrollbar is measured rather than assumed. `100%` of `<body>` is the
 * viewport minus the scrollbar, and `100vw` is the viewport, so the difference
 * between them is the scrollbar itself. That difference is only a number once
 * it is computed on `<body>`, which is what `@property` with a `<length>`
 * syntax buys: a registered custom property computes where it is declared and
 * inherits as a length, where an unregistered one would inherit as the literal
 * text and re-resolve its `100%` against whatever element used it — 1020px,
 * the wrong box entirely.
 *
 * The declaration on `<body>` sets a custom property and nothing else: it
 * changes no rendering anywhere, and this file only loads on a page that
 * renders this block.
 *
 * **Failure mode.** If `<body>` ever gains a horizontal margin, padding or
 * border, that width is measured as though it were scrollbar and the block
 * comes out that much narrower than the viewport — centred, with a hairline of
 * page either side. In a browser with no `@property` support the fallback is
 * the same shape: the subtraction resolves against the block's own container
 * and the block simply stays inside it, un-bled. Both failures are narrower
 * than intended. Neither can produce the horizontal scrollbar this is written
 * to avoid, which is the reason for measuring rather than assuming.
 */
@property --aur-scrollbar-width {
	syntax: "<length>";
	inherits: true;
	initial-value: 0px;
}

body {
	--aur-scrollbar-width: calc(100vw - 100%);
}

/*
 * ## Why `overflow-x` on `<body>` had to be answered
 *
 * `assets/vendor/css/slidebars.min.css` sets `body, html { overflow-x: hidden }`
 * so the off-canvas menu can sit outside the page without being reachable.
 * `overflow-x: hidden` on `<body>` makes `<body>` a scroll container that never
 * scrolls, and a sticky element's nearest scroll container is what it sticks
 * inside — so every `position: sticky` under this theme is pinned to a box that
 * does not move, which is to say it does nothing. The map stuck to nothing on
 * the first attempt for exactly this reason.
 *
 * `overflow-x: clip` clips the same content and is *not* a scroll container, so
 * the sticky map sticks to the viewport as intended and the menu is hidden
 * exactly as before. It is scoped with `:has()` to pages that actually carry
 * this block, and it leaves the `<html>` rule — the one that does the clipping
 * that matters — alone.
 *
 * Setting `overflow-x` alone is deliberate: `hidden` on one axis forces the
 * other to `auto`, which is where the theme's `overflow-y: auto` on `<body>`
 * came from. `clip` carries no such rule, so `overflow-y` goes back to
 * `visible` and the page scrolls on the viewport, as it already did.
 *
 * **Failure mode.** A browser with no `:has()` or no `overflow: clip` matches
 * nothing here, the sticky has a dead scroll container again, and the map
 * scrolls away with the cards — the behaviour of the day before this change,
 * beside the results rather than above them. Nothing overlaps and nothing is
 * clipped that was not clipped before.
 */
@media (min-width: 1030px) {

	body:has(.aur-rental-search__layout) {
		overflow-x: clip;
	}
}

/*
 * 1030 is where this switches, because 1030 is where the theme's `.wrap` stops
 * being the full width of the screen and becomes a fixed centred column. Below
 * it there is nothing to escape from and no room for two columns of cards
 * beside a map, so the layout below it is the one that was there before: map,
 * then cards, stacked — including the phone layout, which is untouched.
 */
@media (min-width: 1030px) {

	.aur-rental-search {
		--aur-bleed-width: calc(100vw - var(--aur-scrollbar-width, 0px));

		inline-size: var(--aur-bleed-width);
		margin-inline: calc(50% - (var(--aur-bleed-width) / 2));
		max-inline-size: none;

		/*
		 * Edge to edge is the point, but text against the glass is not: the
		 * filter row, the chips and the cards keep a margin that grows with
		 * the screen.
		 */
		padding-inline: clamp(1rem, 2.5vw, 3rem);
	}

	/*
	 * The map column is sized in `fr` rather than given a width, so the two
	 * halves stay in proportion from 1030 to a very wide screen. The minimum
	 * is what a map of Athens is still readable at.
	 */
	.aur-rental-search__layout {
		align-items: start;
		display: grid;
		gap: 2rem;
		grid-template-columns: minmax(26rem, 3fr) 2fr;
	}

	/*
	 * ## Why sticky and not fixed, and not a scrolling pane
	 *
	 * `position: sticky` is the one of the three that is still in the page's
	 * flow: it stops at the bottom of its own column, so when the cards run
	 * out the map goes with them and the footer is never scrolled underneath a
	 * map that will not leave. A fixed map would be pinned to the viewport for
	 * the whole document and would need JavaScript to know when to let go; an
	 * inner scrolling pane would put a second scrollbar on the page and take
	 * the wheel away from the cards.
	 *
	 * `align-items: start` on the grid is load-bearing. A grid item stretches
	 * to the height of its row by default, and a sticky element with nothing
	 * to move inside its own box never moves.
	 */
	/*
	 * The filter bar sticks to the top of the window, and the map sticks
	 * directly beneath it. Both offsets are driven by --aur-filters-height,
	 * which map.js measures, because the bar wraps to a second row at narrower
	 * widths and a guessed number would either overlap the map or leave a gap.
	 * The fallback keeps this sane if the script never runs.
	 */
	.aur-rental-search__filters {
		background: #fff;
		inset-block-start: 0;
		margin-block-end: 0;
		padding-block: 1rem;
		position: sticky;
		z-index: 3;
	}

	.aur-rental-search__map-column {
		position: sticky;
		inset-block-start: calc(var(--aur-filters-height, 6rem) + 1rem);
		z-index: 1;
	}

	/*
	 * ## The pinned bar gives its second row back
	 *
	 * At rest the bar is two rows below about 1240px and it can afford to be:
	 * the page is at the top and nothing is competing for the space. Pinned, it
	 * holds that height for the whole scroll, and 160px of permanent chrome on
	 * a laptop screen is most of what a card would occupy.
	 *
	 * Pinned, the labels go and the fields narrow, which is enough to bring the
	 * row count down. The labels are hidden the accessible way rather than with
	 * `display: none`, so a screen reader still announces every field; nothing
	 * is lost for a sighted user either, because each control was already sized
	 * to its widest option and says what it is -- "Any Property Category", "Any
	 * time, including pre-leasing".
	 *
	 * The height is republished by the same ResizeObserver that measures the bar
	 * at rest, so the map's offset follows the collapse without being told.
	 */
	.aur-rental-search.is-pinned .aur-rental-search__filters {
		padding-block: 0.5rem;
	}

	.aur-rental-search.is-pinned .aur-rental-search__field {
		flex-basis: 8rem;
	}

	.aur-rental-search.is-pinned .aur-rental-search__field--wide {
		flex-basis: 10rem;
	}

	.aur-rental-search.is-pinned .aur-rental-search__field > label {
		block-size: 1px;
		clip-path: inset(50%);
		inline-size: 1px;
		overflow: hidden;
		position: absolute;
		white-space: nowrap;
	}

	/*
	 * ## The short viewport
	 *
	 * A sticky element taller than the screen scrolls its bottom out of reach
	 * and takes the page with it. The map is therefore measured against the
	 * screen rather than given a height: whatever is left after the offset
	 * above it and a little air below, and never more than 40rem on a tall
	 * one. At 650px of viewport it is about 520px and the whole of it is
	 * visible, which is what the sticky is for.
	 *
	 * `vh` first and `dvh` second: on a phone browser with a retracting
	 * toolbar the dynamic unit is the honest one, and the static unit is what
	 * answers where it is not understood. Neither applies below 1030 anyway.
	 */
	/*
	 * Full height of what is actually visible: the window, less the sticky
	 * filter bar above it and a little breathing room. No upper cap — the point
	 * of the side-by-side layout is that the map is worth looking at, and a map
	 * rewards size in a way a card does not. dvh so a mobile browser's
	 * collapsing chrome does not leave a gap.
	 */
	.aur-rental-search__map-canvas {
		block-size: calc(100vh - var(--aur-filters-height, 6rem) - 3rem);
		block-size: calc(100dvh - var(--aur-filters-height, 6rem) - 3rem);
		min-block-size: 18rem;
	}

	/*
	 * Two columns of cards, not three. The card itself is untouched — this is
	 * the same `inline-size` the theme sets on `.property-box` at 768, said
	 * once for the narrower column it now sits in.
	 */
	.aur-rental-search__results .property-box {
		inline-size: 50%;
	}

	/* A Group's page has no map beside its cards: back to the theme's three. */
	.aur-group-listing .aur-rental-search__results .property-box {
		inline-size: 33.333%;
	}

	/*
	 * The map's own bottom margin was spacing it off the cards below it. There
	 * are no cards below it any more.
	 */
	.aur-rental-search .aur-rental-search__map-column p.aur-rental-search__map-caption {
		margin-block-end: 0;
	}

	.aur-rental-search__results-column {
		min-inline-size: 0;
	}
}

/*
 * A Group's intro, written in its Description, sits under the centred name
 * as one centred, readable column.
 */
.aur-group-intro {
	margin-inline: auto;
	max-inline-size: 44rem;
	text-align: center;
}

.page-content .aur-group-intro p {
	margin-inline: auto;
}
