/**
 * AI Search — frontend styles.
 *
 * Two pieces: a small trigger that sits in the page, and a dialog that owns
 * the screen while it is open.
 *
 * The dialog exists because the results are not a list. A garden centre's
 * answer to one query is five products in a grid, three events with dates, a
 * branch with its opening hours and a couple of guides — and none of that
 * fits in a dropdown hanging off a field in a theme sidebar.
 *
 * Everything is scoped under .aips / .aips-modal so a theme's own resets
 * cannot reach in, and driven by custom properties so a shop can recolour it
 * with one shortcode attribute.
 */

/* Coolings palette: the deep purple of the site's menu bar, the blush cream
   of its page ground, and the pink of its location pin for small accents.
   Light only, on purpose — the site itself never goes dark, and a dark
   dialog opening over it reads as a different brand. */
.aips,
.aips-modal {
	--aips-accent: #3d0b62;
	--aips-accent-soft: rgba(61, 11, 98, 0.08);
	--aips-pink: #a0509a;
	--aips-bg: #ffffff;
	--aips-surface: #ffffff;
	--aips-sunken: #faf3ef;
	--aips-text: #241430;
	--aips-muted: #6b5873;
	--aips-faint: #9a8a9f;
	--aips-line: #ecdfd8;
	--aips-line-soft: #f4ebe6;
	--aips-hover: #f7eee9;
	--aips-radius: 10px;
	--aips-shadow: 0 1px 2px rgba(40, 8, 60, 0.05), 0 24px 60px -12px rgba(40, 8, 60, 0.3), 0 60px 120px -40px rgba(40, 8, 60, 0.32);

	font-family: inherit;
	color: var(--aips-text);
	-webkit-font-smoothing: antialiased;
}

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

/* The browser paints <mark> yellow. Here it marks the part the visitor
   already typed, which wants emphasis, not a highlighter. */
.aips mark,
.aips-modal mark {
	background: none;
	color: var(--aips-pink);
	font-weight: 700;
}

/* ================================================================ trigger */

.aips {
	position: relative;
	max-width: 640px;
	margin: 0 auto;
}

.aips__label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.01em;
	margin: 0 0 8px;
	color: var(--aips-muted);
}

.aips__trigger {
	display: flex;
	align-items: center;
	gap: 11px;
	width: 100%;
	padding: 14px 14px 14px 16px;
	background: var(--aips-bg);
	border: 1px solid var(--aips-line);
	border-radius: var(--aips-radius);
	font: inherit;
	font-size: 15px;
	color: var(--aips-faint);
	text-align: left;
	cursor: text;
	transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.aips__trigger:hover {
	border-color: var(--aips-accent);
}

.aips__trigger:focus-visible {
	outline: 0;
	border-color: var(--aips-accent);
	box-shadow: 0 0 0 4px var(--aips-accent-soft);
}

.aips__trigger svg {
	flex: 0 0 auto;
	color: var(--aips-muted);
}

.aips__trigger-text {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.aips__trigger-key {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	border: 1px solid var(--aips-line);
	border-bottom-width: 2px;
	border-radius: 5px;
	font-size: 12px;
	font-weight: 600;
	color: var(--aips-muted);
	background: var(--aips-sunken);
}

.aips__hint {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin: 10px 2px 0;
	font-size: 12px;
	line-height: 1.5;
	color: var(--aips-muted);
}

.aips__hint svg {
	flex: 0 0 auto;
	margin-top: 3px;
	color: var(--aips-accent);
}

/* ================================================================== modal */

.aips-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 6vh 20px 20px;
}

.aips-modal[hidden] {
	display: none;
}

.aips-modal__scrim {
	position: absolute;
	inset: 0;
	background: rgba(40, 8, 60, 0.45);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	animation: aips-fade 0.18s ease;
}

.aips-modal__win {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(1120px, 100%);
	height: min(84vh, 800px);
	background: var(--aips-surface);
	border: 1px solid var(--aips-line);
	/* The site's purple menu bar, carried onto the dialog's top edge. */
	border-top: 5px solid var(--aips-accent);
	border-radius: 14px;
	box-shadow: var(--aips-shadow);
	overflow: hidden;
	animation: aips-rise 0.2s cubic-bezier(0.2, 0, 0.2, 1);
}

@keyframes aips-fade {
	from {
		opacity: 0;
	}
}

@keyframes aips-rise {
	from {
		opacity: 0;
		transform: translateY(-10px) scale(0.99);
	}
}

@media (prefers-reduced-motion: reduce) {
	.aips-modal__scrim,
	.aips-modal__win {
		animation: none;
	}
}

/* ------------------------------------------------------------------ head */

.aips-modal__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 0 16px;
	border-bottom: 1px solid var(--aips-line);
	flex: 0 0 auto;
}

.aips-modal__lead {
	display: flex;
	color: var(--aips-accent);
}

.aips-modal__input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	font: inherit;
	font-size: 19px;
	line-height: 1.4;
	padding: 20px 0;
	color: var(--aips-text);
	appearance: none;
}

.aips-modal__input::placeholder {
	color: var(--aips-faint);
}

.aips-modal__spinner {
	display: none;
	flex: 0 0 auto;
	width: 15px;
	height: 15px;
	border: 2px solid var(--aips-line);
	border-top-color: var(--aips-accent);
	border-radius: 50%;
	animation: aips-spin 0.6s linear infinite;
}

.aips-modal.is-loading .aips-modal__spinner {
	display: block;
}

@keyframes aips-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.aips-modal__spinner {
		animation-duration: 1.6s;
	}
}

.aips-modal__clear {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border: 0;
	border-radius: 50%;
	background: var(--aips-hover);
	color: var(--aips-muted);
	cursor: pointer;
	padding: 0;
}

.aips-modal__clear:hover {
	color: var(--aips-text);
}

.aips-modal__close {
	flex: 0 0 auto;
	border: 1px solid var(--aips-line);
	border-bottom-width: 2px;
	border-radius: 6px;
	background: var(--aips-sunken);
	font: inherit;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: var(--aips-muted);
	padding: 4px 8px;
	cursor: pointer;
}

.aips-modal__close:hover {
	color: var(--aips-text);
	border-color: var(--aips-accent);
}

/* ------------------------------------------------------------------ body */

.aips-modal__body {
	flex: 1 1 auto;
	display: flex;
	min-height: 0;
}

/* ----------------------------------------------------------------- aside */

.aips-nav {
	flex: 0 0 232px;
	border-right: 1px solid var(--aips-line);
	background: var(--aips-sunken);
	padding: 12px 10px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.aips-nav:empty {
	display: none;
}

.aips-nav__title {
	display: block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--aips-faint);
	padding: 6px 10px 8px;
}

.aips-nav__item {
	display: flex;
	align-items: center;
	gap: 9px;
	width: 100%;
	border: 0;
	background: none;
	font: inherit;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--aips-muted);
	text-align: left;
	padding: 8px 10px;
	border-radius: 9px;
	cursor: pointer;
	transition: background 0.12s ease, color 0.12s ease;
}

.aips-nav__item:hover {
	background: var(--aips-hover);
	color: var(--aips-text);
}

.aips-nav__item.is-current {
	background: var(--aips-accent);
	color: #fff;
}

.aips-nav__item.is-current .aips-nav__n {
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
}

.aips-nav__item svg {
	flex: 0 0 auto;
	opacity: 0.9;
}

.aips-nav__label {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.aips-nav__n {
	flex: 0 0 auto;
	font-size: 11px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	background: var(--aips-hover);
	color: var(--aips-muted);
	border-radius: 999px;
	padding: 2px 7px;
	line-height: 1.4;
}

.aips-nav__foot {
	margin-top: 10px;
	padding: 10px 10px 4px;
	border-top: 1px solid var(--aips-line);
	font-size: 11.5px;
	line-height: 1.5;
	color: var(--aips-faint);
}

.aips-nav__foot a {
	color: var(--aips-accent);
	font-weight: 600;
	text-decoration: none;
	/* The query is quoted in the link; a long one must wrap, not widen the
	   sidebar into a horizontal scroll. */
	white-space: normal;
	overflow-wrap: anywhere;
}

.aips-nav__foot a:hover {
	text-decoration: underline;
}

/* ------------------------------------------------------------------ main */

.aips-main {
	flex: 1 1 auto;
	min-width: 0;
	overflow-y: auto;
	/* Results only ever scroll vertically; a card that misbehaves must be
	   clipped, not turn the whole pane into a sideways scroll. */
	overflow-x: hidden;
	overscroll-behavior: contain;
	scroll-behavior: smooth;
	padding: 0 0 26px;
}

@media (prefers-reduced-motion: reduce) {
	.aips-main {
		scroll-behavior: auto;
	}
}

/* ------------------------------------------------------------ corrected */

.aips-corrected {
	margin: 16px 22px 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--aips-muted);
}

.aips-corrected strong {
	color: var(--aips-accent);
	font-weight: 700;
}

.aips-corrected + .aips-answer {
	margin-top: 10px;
}

@media (max-width: 720px) {
	.aips-corrected {
		margin-left: 15px;
		margin-right: 15px;
	}
}

/* ------------------------------------------------------------- coverage */

.aips-coverage {
	margin: 16px 22px 0;
	padding: 10px 14px;
	border-radius: 10px;
	border: 1px solid var(--aips-line-soft);
	background: var(--aips-accent-soft);
	font-size: 13px;
	line-height: 1.5;
	color: var(--aips-muted);
}

.aips-coverage strong {
	color: var(--aips-accent);
	font-weight: 700;
}

.aips-corrected + .aips-coverage {
	margin-top: 8px;
}

.aips-coverage + .aips-answer {
	margin-top: 10px;
}

@media (max-width: 720px) {
	.aips-coverage {
		margin-left: 15px;
		margin-right: 15px;
	}
}

/* --------------------------------------------------------------- answer */

.aips-answer {
	display: flex;
	gap: 12px;
	margin: 18px 22px 4px;
	padding: 15px 17px;
	border-radius: 12px;
	background: linear-gradient(180deg, var(--aips-accent-soft), transparent 150%);
	border: 1px solid var(--aips-line-soft);
}

.aips-answer__icon {
	flex: 0 0 auto;
	color: var(--aips-accent);
	margin-top: 2px;
}

.aips-answer__tag {
	display: block;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--aips-accent);
	margin-bottom: 5px;
}

.aips-answer__text {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--aips-text);
}

/* Offered, not yet fetched: one line and a button, so it never pushes the
   results further down than the answer itself would. */
.aips-answer--ask {
	align-items: center;
}

.aips-answer--ask .aips-answer__icon {
	margin-top: 0;
}

.aips-answer__ask {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px 16px;
}

.aips-answer__ask .aips-answer__text {
	font-size: 14px;
	color: var(--aips-muted);
}

.aips-ask {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 0;
	border-radius: 999px;
	background: var(--aips-accent);
	color: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	padding: 8px 14px;
	cursor: pointer;
	transition: background 0.14s ease;
}

.aips-ask:hover,
.aips-ask:focus-visible {
	background: var(--aips-pink);
	outline: 0;
}

.aips-ask .aips-key {
	background: rgba(255, 255, 255, 0.16);
	border-color: rgba(255, 255, 255, 0.3);
	color: #fff;
}

.aips-answer__lines {
	flex: 1 1 auto;
}

.aips-answer--pending .aips-sk__line {
	display: block;
	max-width: 520px;
}

/* -------------------------------------------------------------- sections */

.aips-sec {
	padding: 20px 22px 4px;
	scroll-margin-top: 8px;
}

.aips-sec + .aips-sec {
	border-top: 1px solid var(--aips-line-soft);
	margin-top: 14px;
	padding-top: 20px;
}

.aips-sec__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 13px;
}

.aips-sec__title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--aips-accent);
}

.aips-sec__title svg {
	color: var(--aips-pink);
}

.aips-sec__more {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--aips-accent);
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}

.aips-sec__more:hover {
	color: var(--aips-pink);
	text-decoration: underline;
}

/* ---------------------------------------------------------- product grid */

.aips-products {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 14px;
}

.aips-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--aips-line);
	border-radius: 12px;
	overflow: hidden;
	background: var(--aips-bg);
	text-decoration: none;
	color: inherit;
	transition: border-color 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

.aips-card:hover,
.aips-card.is-active {
	border-color: var(--aips-accent);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px -8px rgba(16, 24, 32, 0.22);
}

.aips-card__media {
	position: relative;
	aspect-ratio: 1 / 1;
	background: var(--aips-sunken);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--aips-faint);
	overflow: hidden;
}

.aips-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.aips-card__body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 5px;
	padding: 10px 11px 12px;
}

.aips-card__title {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--aips-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.aips-card__sub {
	display: block;
	font-size: 11.5px;
	color: var(--aips-faint);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.aips-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: auto;
	padding-top: 6px;
}

.aips-price {
	font-size: 14.5px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--aips-text);
}

.aips-pill {
	display: inline-flex;
	align-items: center;
	font-size: 10.5px;
	font-weight: 600;
	line-height: 1;
	padding: 3px 7px;
	border-radius: 999px;
	background: var(--aips-hover);
	color: var(--aips-muted);
	white-space: nowrap;
}

.aips-pill--in {
	background: rgba(34, 150, 80, 0.13);
	color: #1d8046;
}

.aips-pill--out {
	background: rgba(200, 60, 60, 0.11);
	color: #b34141;
}

/* ------------------------------------------------------------ media grid */

/* Events and courses. Wider than a product tile because the picture is a
   banner, not a cut-out, and the card carries a date and a line of prose. */
.aips-media {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
	gap: 14px;
}

.aips-media .aips-card__media {
	aspect-ratio: 16 / 9;
}

.aips-media .aips-card__body {
	padding: 12px 13px 14px;
}

.aips-media .aips-card__title {
	font-size: 14px;
}

.aips-card__text {
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--aips-muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.aips-card__date {
	position: absolute;
	left: 9px;
	top: 9px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: var(--aips-surface);
	color: var(--aips-accent);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 4px 8px;
	border-radius: 999px;
	box-shadow: 0 2px 8px rgba(16, 24, 32, 0.16);
}

.aips-card__date--past {
	color: var(--aips-faint);
}

/* ----------------------------------------------------------- place cards */

/* Garden centres and places to eat. These are the results someone acts on in
   the physical world, so the card leads with what they need before they set
   off — the hours — rather than with a thumbnail. */
.aips-places {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 14px;
}

.aips-place {
	display: flex;
	gap: 13px;
	padding: 14px 15px;
	border: 1px solid var(--aips-line);
	border-radius: 12px;
	background: var(--aips-bg);
	text-decoration: none;
	color: inherit;
	transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.aips-place:hover,
.aips-place.is-active {
	border-color: var(--aips-accent);
	box-shadow: 0 8px 20px -10px rgba(16, 24, 32, 0.22);
}

.aips-place__pin {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--aips-accent-soft);
	color: var(--aips-accent);
}

.aips-place__body {
	min-width: 0;
	flex: 1 1 auto;
}

.aips-place__name {
	display: block;
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 5px;
}

.aips-fact {
	display: flex;
	align-items: flex-start;
	gap: 7px;
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--aips-muted);
	margin-top: 3px;
}

.aips-fact svg {
	flex: 0 0 auto;
	margin-top: 2px;
	color: var(--aips-faint);
}

.aips-place__text {
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--aips-faint);
	margin-top: 7px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------------------------------------------------------- people cards */

/* The role line is a sentence from the expert's page ("Carol is our expert
   on shrubs and…"), not a job title, so the card is a rounded box with room
   for two lines rather than a pill that can only hold a word or two. */
.aips-people {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 12px;
}

.aips-person {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	min-width: 0;
	padding: 13px 15px;
	border: 1px solid var(--aips-line);
	border-radius: 12px;
	background: var(--aips-bg);
	text-decoration: none;
	color: inherit;
	transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.aips-person:hover,
.aips-person.is-active {
	border-color: var(--aips-accent);
	box-shadow: 0 8px 20px -10px rgba(40, 8, 60, 0.22);
}

.aips-person__face {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--aips-accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 700;
}

.aips-person__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.aips-person__name {
	display: block;
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--aips-accent);
}

.aips-person__role {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--aips-muted);
}

/* ------------------------------------------------------------- read list */

/* Guides, articles, pages, departments. Two columns of text, because these
   are things to read and a picture next to each one adds nothing. */
.aips-reads {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
	gap: 4px 18px;
}

.aips-read {
	display: flex;
	gap: 11px;
	padding: 9px 10px;
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
	transition: background 0.12s ease;
}

.aips-read:hover,
.aips-read.is-active {
	background: var(--aips-hover);
}

.aips-read__icon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 8px;
	background: var(--aips-accent-soft);
	color: var(--aips-accent);
}

.aips-read__body {
	min-width: 0;
}

.aips-read__title {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--aips-text);
}

.aips-read__text {
	font-size: 12px;
	line-height: 1.45;
	color: var(--aips-faint);
	margin-top: 2px;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ----------------------------------------------------------- completions */

.aips-terms {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	padding: 16px 22px 2px;
}

.aips-term {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid var(--aips-line);
	background: var(--aips-bg);
	color: var(--aips-text);
	font: inherit;
	font-size: 13px;
	line-height: 1;
	padding: 8px 13px;
	border-radius: 999px;
	cursor: pointer;
	transition: border-color 0.12s ease, background 0.12s ease;
}

.aips-term:hover,
.aips-term.is-active {
	border-color: var(--aips-accent);
	background: var(--aips-accent-soft);
}

.aips-term svg {
	color: var(--aips-faint);
}

/* --------------------------------------------------------------- states */

.aips-state {
	padding: 64px 30px;
	text-align: center;
	max-width: 480px;
	margin: 0 auto;
}

.aips-state__icon {
	color: var(--aips-faint);
	margin-bottom: 14px;
}

.aips-state__title {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 6px;
}

.aips-state__text {
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--aips-muted);
	margin: 0 0 18px;
}

.aips-state .aips-terms {
	justify-content: center;
	padding: 0;
}

/* Skeleton mirrors the product grid, because that is what the great
   majority of searches resolve to — the layout should not jump. */
.aips-sk {
	padding: 22px;
}

.aips-sk__bar {
	height: 11px;
	width: 130px;
	margin-bottom: 16px;
}

.aips-sk__grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 14px;
}

.aips-sk__card {
	border: 1px solid var(--aips-line-soft);
	border-radius: 12px;
	overflow: hidden;
}

.aips-sk__media {
	aspect-ratio: 1 / 1;
}

.aips-sk__lines {
	padding: 11px;
}

.aips-sk__line {
	height: 9px;
}

.aips-sk__line + .aips-sk__line {
	margin-top: 7px;
	width: 60%;
}

.aips-sk__bar,
.aips-sk__media,
.aips-sk__line {
	background: linear-gradient(90deg, var(--aips-line-soft) 25%, var(--aips-hover) 37%, var(--aips-line-soft) 63%);
	background-size: 400% 100%;
	animation: aips-shimmer 1.3s ease infinite;
	border-radius: 6px;
}

@keyframes aips-shimmer {
	to {
		background-position: -135% 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.aips-sk__bar,
	.aips-sk__media,
	.aips-sk__line {
		animation: none;
	}
}

/* ------------------------------------------------------------------ foot */

.aips-modal__foot {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 10px 18px;
	border-top: 1px solid var(--aips-line);
	background: var(--aips-surface);
	font-size: 11.5px;
	color: var(--aips-faint);
}

.aips-keys {
	display: flex;
	align-items: center;
	gap: 12px;
}

.aips-keys span {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	white-space: nowrap;
}

.aips-key {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border: 1px solid var(--aips-line);
	border-bottom-width: 2px;
	border-radius: 4px;
	font-size: 10px;
	font-style: normal;
	font-weight: 600;
	color: var(--aips-muted);
	background: var(--aips-bg);
}

.aips-store {
	color: var(--aips-accent);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.aips-store:hover {
	text-decoration: underline;
}

/* ============================================================ responsive */

@media (max-width: 1080px) {
	.aips-products,
	.aips-sk__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	.aips-nav {
		flex-basis: 190px;
	}

	.aips-products,
	.aips-sk__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 720px) {
	.aips-modal {
		padding: 0;
	}

	.aips-modal__win {
		width: 100%;
		height: 100%;
		border: 0;
		border-radius: 0;
	}

	.aips-modal__body {
		flex-direction: column;
	}

	/* The sidebar becomes a scrolling strip along the top: the same jump
	   links, in the space a phone can spare for them. */
	.aips-nav {
		flex: 0 0 auto;
		display: flex;
		gap: 7px;
		border-right: 0;
		border-bottom: 1px solid var(--aips-line);
		padding: 9px 12px;
		overflow-x: auto;
		overflow-y: hidden;
		scrollbar-width: none;
	}

	.aips-nav::-webkit-scrollbar {
		display: none;
	}

	.aips-nav__title,
	.aips-nav__foot {
		display: none;
	}

	.aips-nav__item {
		width: auto;
		flex: 0 0 auto;
		border-radius: 999px;
		border: 1px solid var(--aips-line);
		background: var(--aips-bg);
		font-size: 12.5px;
		padding: 7px 11px;
	}

	.aips-nav__item svg {
		display: none;
	}

	.aips-sec {
		padding-left: 15px;
		padding-right: 15px;
	}

	.aips-answer {
		margin-left: 15px;
		margin-right: 15px;
	}

	.aips-products,
	.aips-sk__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.aips-media,
	.aips-places,
	.aips-people,
	.aips-reads {
		grid-template-columns: minmax(0, 1fr);
	}

	.aips-modal__input {
		font-size: 16px; /* Below 16px iOS zooms the page on focus. */
		padding: 16px 0;
	}

	.aips-keys {
		display: none;
	}

	.aips-modal__foot {
		justify-content: flex-end;
	}
}
