/* ==========================================================================
   Hebrides People 2026 - page layouts (1.3.3)
   Used by the "Page, 2026 layout" template, where each page carries its own
   header band and full-width sections. One layout, no per-device copies:
   everything reflows by width.
   ========================================================================== */

.hp-layout {
	--hp-gap: clamp(1.5rem, 1rem + 2.5vw, 4rem);
}

.hp-layout > .wp-block-post-content > * + * {
	margin-block-start: 0;
}

/* --------------------------------------------------------------------------
   Header band
   -------------------------------------------------------------------------- */

.hp-head {
	border-bottom: 1px solid #e6e3d6;
}

.hp-head__cols {
	gap: var(--hp-gap) !important;
	margin-block: 0 !important; /* keep the side margins auto so it centres on wide screens */
}

.hp-head__text {
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
}

.hp-head__text > * {
	margin: 0 !important;
}

/* Orange rule above the breadcrumb, not between it and the title */
.hp-head__text::before {
	content: "";
	display: block;
	width: 48px;
	height: 4px;
	background: var(--hp-orange);
}

.hp-head .wp-block-post-title.hp-rule::before {
	display: none;
}

.hp-head .wp-block-post-title {
	margin: 0;
	font-size: clamp(2.25rem, 1.5rem + 2.6vw, 4rem);
	font-weight: 500;
	line-height: 1.04;
	color: var(--hp-teal);
}

.hp-head .wp-block-boldblocks-breadcrumb-block {
	font-size: 0.9375rem;
}

.hp-head .wp-block-boldblocks-breadcrumb-block a {
	text-decoration: none;
}

.hp-head .wp-block-boldblocks-breadcrumb-block a:hover {
	text-decoration: underline;
}

.hp-head__media > * {
	margin: 0 !important;
}

.hp-head__img img,
.hp-head__media > .wp-block-image:not(.hp-tree) img {
	width: 100%;
	height: clamp(220px, 28vw, 380px);
	object-fit: cover;
	border-radius: var(--hp-radius-card);
}

.hp-head__img--tall img {
	height: clamp(280px, 40vw, 520px);
}

/* Dark header (Donate, Emigrant Stories, Images) */
.hp-head.has-contrast-background-color {
	border-bottom: 0;
}

.hp-head.has-contrast-background-color .wp-block-post-title,
.hp-head.has-contrast-background-color .hp-lead {
	color: #fff;
}

.hp-head.has-contrast-background-color .wp-block-boldblocks-breadcrumb-block,
.hp-head.has-contrast-background-color .wp-block-boldblocks-breadcrumb-block a {
	color: var(--hp-straw) !important;
}

/* Find your family: the island chain sits beside the title, never under it */
@media (min-width: 900px) {
	.hp-head--chain {
		background-image: url("../img/island-chain.png");
		background-repeat: no-repeat;
		background-size: auto 120%;
		background-position: left -40px center;
	}

	.hp-head--chain .hp-head__text {
		padding-left: clamp(4rem, 8vw, 8rem);
	}
}

/* --------------------------------------------------------------------------
   Sections and type
   -------------------------------------------------------------------------- */

.hp-sec > * + * {
	margin-block-start: var(--wp--preset--spacing--50);
}

.hp-sec--dark,
.hp-dark-col,
.hp-cta--teal,
.hp-role--remote,
.hp-step--dark {
	--hp-link: #fff;
}

:is(.hp-sec--dark, .hp-dark-col, .hp-cta--teal, .hp-role--remote, .hp-step--dark, .hp-head.has-contrast-background-color) :is(h1, h2, h3, h4) {
	color: #fff;
}

:is(.hp-sec--dark, .hp-dark-col, .hp-cta--teal, .hp-role--remote, .hp-step--dark, .hp-head.has-contrast-background-color) a:not(.wp-element-button) {
	color: #fff;
}

:is(.hp-sec--dark, .hp-dark-col, .hp-cta--teal, .hp-role--remote, .hp-step--dark) p,
:is(.hp-sec--dark, .hp-dark-col, .hp-cta--teal, .hp-role--remote, .hp-step--dark) li {
	color: var(--hp-on-teal);
}

.hp-lead {
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem);
	font-weight: 400;
	line-height: 1.32;
	color: var(--hp-teal);
}

:is(.hp-sec--dark, .hp-dark-col, .hp-cta--teal) .hp-lead {
	color: #fff;
}

.hp-statement,
.hp-statement-p {
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem);
	font-weight: 400;
	line-height: 1.15;
	color: var(--hp-teal);
}

:is(.hp-sec--dark, .hp-dark-col) .hp-statement,
:is(.hp-sec--dark, .hp-dark-col) .hp-statement-p {
	color: #fff;
}

.hp-label {
	font-weight: 600;
	color: var(--hp-teal);
}

.hp-gaelic-title {
	font-style: italic;
	font-size: clamp(2.5rem, 1.8rem + 2.4vw, 4rem);
}

.hp-sec--dark .hp-gaelic-title {
	color: var(--hp-straw) !important;
}

.hp-pull {
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.625rem);
	line-height: 1.4;
	color: var(--hp-teal);
	border-top: 3px solid var(--hp-orange);
	padding-top: 1.25rem;
	margin-block: 0.5rem;
}

.hp-sec-head {
	align-items: flex-end;
	gap: 1rem !important;
}

.hp-sec-head > * {
	margin: 0 !important;
}

/* --------------------------------------------------------------------------
   Column layouts
   -------------------------------------------------------------------------- */

.hp-intro,
.hp-two-up,
.hp-timeline,
.hp-roles,
.hp-read {
	gap: var(--hp-gap) !important;
	margin-bottom: 0 !important;
}

.hp-two-up {
	align-items: stretch !important;
}

.hp-two-up--top {
	align-items: center !important;
}

.hp-intro > .wp-block-column > * + *,
.hp-two-up > .wp-block-column > * + * {
	margin-block-start: 1.25rem;
}

.hp-two-up > .wp-block-column.has-background,
.hp-roles > .wp-block-column {
	border-radius: var(--hp-radius-card);
}

/* Timeline: Our History */
.hp-timeline > .wp-block-column {
	position: relative;
	border-top: 2px solid rgba(229, 229, 187, 0.5);
	padding-top: 1.5rem;
}

.hp-timeline > .wp-block-column::before {
	content: "";
	position: absolute;
	top: -8px;
	left: 0;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--hp-orange);
}

.hp-timeline h3 {
	color: var(--hp-straw) !important;
	margin-top: 0;
}

/* Steps: Getting Started */
.hp-steps {
	grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)) !important;
	gap: 1.25rem !important;
	counter-reset: hp-step;
}

.hp-step {
	background: var(--hp-paper);
	border-radius: var(--hp-radius-card);
	padding: var(--wp--preset--spacing--50);
	counter-increment: hp-step;
}

.hp-step::before {
	content: counter(hp-step);
	display: block;
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: 3.5rem;
	line-height: 1;
	color: var(--hp-orange);
	margin-bottom: 0.75rem;
}

.hp-step--dark {
	background: var(--hp-teal);
}

/* Long read: body plus side cards */
.hp-read__body > * + * {
	margin-block-start: 1.375rem;
}

.hp-read__body p {
	font-size: 1.125rem;
	line-height: 1.75;
	max-width: 46rem;
}

.hp-read__aside > * + * {
	margin-block-start: 1rem;
}

.hp-longread > * + * {
	margin-block-start: 1.5rem;
}

.hp-longread p {
	font-size: 1.1875rem;
	line-height: 1.75;
}

.hp-longread .hp-pair {
	max-width: var(--wp--style--global--wide-size, 1340px) !important;
	margin-block: clamp(2rem, 4vw, 4rem) !important;
}

.has-drop-cap:not(:focus)::first-letter {
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: 4.2em;
	line-height: 0.8;
	font-weight: 400;
	margin: 0.08em 0.12em 0 0;
	color: var(--hp-teal);
}

.hp-highlight {
	border-radius: var(--hp-radius-card);
}

.hp-break {
	margin-block: 1rem !important;
}

/* Roles: Volunteer */
.hp-role ul {
	padding-left: 1.25rem;
}

.hp-role > .wp-block-list:first-child {
	list-style: none;
	padding-left: 0;
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: 1.25rem;
	line-height: 1.35;
	color: var(--hp-teal);
}

.hp-role--remote > .wp-block-list:first-child {
	color: #fff;
}

/* --------------------------------------------------------------------------
   Panels, calls to action, pairs
   -------------------------------------------------------------------------- */

.hp-panel > * + *,
.hp-cta > * + * {
	margin-block-start: 1rem;
}

.hp-panel > :first-child,
.hp-cta > :first-child {
	margin-top: 0;
}

.hp-cta__title {
	font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
	margin: 0;
}

.hp-boxed {
	border: 1px solid var(--hp-line);
	border-radius: var(--hp-radius-card);
}

.hp-pair {
	margin: 0 !important;
}

.hp-pair.wp-block-gallery.has-nested-images figure.wp-block-image img {
	height: clamp(200px, 24vw, 360px);
	object-fit: cover;
	border-radius: var(--hp-radius-card);
}

.hp-pair--head.wp-block-gallery.has-nested-images figure.wp-block-image img {
	height: clamp(200px, 26vw, 360px);
}

.hp-pair--wide.wp-block-gallery.has-nested-images figure.wp-block-image img {
	height: clamp(220px, 28vw, 420px);
}

.hp-tree img {
	width: clamp(110px, 14vw, 200px);
	height: auto;
}

.hp-head__media > .hp-tree {
	display: flex;
	justify-content: flex-end;
}

.hp-stamp img,
.hp-badge img {
	max-width: 240px;
	height: auto;
}

.hp-donate-box,
.hp-form-card {
	border-radius: var(--hp-radius-card);
	color: var(--hp-ink);
}

.hp-map iframe,
.hp-map .wp-block-html iframe {
	width: 100%;
	min-height: 420px;
	border: 0;
	border-radius: var(--hp-radius-card);
}

/* Contact lines with icons */
.hp-contact-line {
	position: relative;
	padding-left: 2rem;
}

.hp-contact-line::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2em;
	width: 20px;
	height: 20px;
	background: var(--hp-straw);
	-webkit-mask: var(--hp-icon) center / contain no-repeat;
	mask: var(--hp-icon) center / contain no-repeat;
}

.hp-contact-line--place { --hp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M10 18s6-5.5 6-10a6 6 0 10-12 0c0 4.5 6 10 6 10z'/%3E%3Ccircle cx='10' cy='8' r='2.2'/%3E%3C/svg%3E"); }
.hp-contact-line--phone { --hp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M4 2.5h3l1.5 4-2 1.5a10 10 0 005.5 5.5l1.5-2 4 1.5v3c0 1-1 1.5-2 1.5C9 17.5 2.5 11 2.5 4.5c0-1 .5-2 1.5-2z'/%3E%3C/svg%3E"); }
.hp-contact-line--mail { --hp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6'%3E%3Crect x='2' y='4' width='16' height='12' rx='1.5'/%3E%3Cpath d='M2.5 5l7.5 6 7.5-6'/%3E%3C/svg%3E"); }

/* --------------------------------------------------------------------------
   Lists
   -------------------------------------------------------------------------- */

.is-style-hp-ticks {
	list-style: none;
	padding-left: 0;
}

.is-style-hp-ticks > li {
	position: relative;
	padding-left: 2rem;
}

.is-style-hp-ticks > li + li {
	margin-top: 0.75rem;
}

.is-style-hp-ticks > li::before {
	content: "";
	position: absolute;
	left: 0.125rem;
	top: 0.45em;
	width: 14px;
	height: 7px;
	border-left: 2.5px solid var(--hp-orange);
	border-bottom: 2.5px solid var(--hp-orange);
	transform: rotate(-45deg);
}

.is-style-hp-prices {
	list-style: none;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
	gap: 1rem;
}

.is-style-hp-prices > li {
	background: #fff;
	color: var(--hp-teal) !important;
	border-radius: var(--hp-radius-card);
	padding: 1.75rem;
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: 1.5rem;
	line-height: 1.25;
	margin: 0;
}

.is-style-hp-prices > li:last-child {
	background: var(--hp-straw);
}

.hp-price-line {
	list-style: none;
	padding: 0;
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
	line-height: 1.25;
	color: var(--hp-teal);
}

/* --------------------------------------------------------------------------
   Pills (shop and island links)
   -------------------------------------------------------------------------- */

.hp-pillrow {
	gap: 0.5rem !important;
}

.wp-block-button.hp-pill > .wp-block-button__link {
	min-height: 40px;
	padding: 0.375rem 1rem;
	border: 1px solid var(--hp-sage);
	border-radius: 999px;
	background: #fff;
	color: var(--hp-teal);
	font-size: 0.9375rem;
	font-weight: 500;
}

.wp-block-button.hp-pill > .wp-block-button__link:hover {
	border-color: var(--hp-teal);
	background: #fff;
	color: var(--hp-teal);
	text-decoration: underline;
}

.hp-pillrow--credits .wp-block-button.hp-pill > .wp-block-button__link {
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: 1.25rem;
	min-height: 52px;
	padding-inline: 1.375rem;
}

/* --------------------------------------------------------------------------
   Galleries
   -------------------------------------------------------------------------- */

.wp-block-gallery.is-style-hp-masonry.has-nested-images,
.wp-block-gallery.hp-mosaic.has-nested-images {
	/* Core sets max-width:100% on galleries, which beats the page's width
	   limit; keep them to the normal page width */
	max-width: var(--wp--style--global--wide-size, 1340px) !important;
	margin-inline: auto !important;
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
	gap: 12px !important;
}

.wp-block-gallery.is-style-hp-masonry.has-nested-images figure.wp-block-image,
.wp-block-gallery.hp-mosaic.has-nested-images figure.wp-block-image {
	width: auto !important;
	margin: 0 !important;
}

.wp-block-gallery.is-style-hp-masonry.has-nested-images figure.wp-block-image img,
.wp-block-gallery.hp-mosaic.has-nested-images figure.wp-block-image img {
	width: 100%;
	height: 100% !important;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--hp-radius);
}

/* --------------------------------------------------------------------------
   Related pages (hp/related)
   -------------------------------------------------------------------------- */

.hp-explore__title {
	margin-bottom: var(--wp--preset--spacing--40) !important;
}

.hp-related {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}

/* Cards wrap as a flexible row, so an odd last row fills the width
   (five cards: three, then two) rather than leaving one stranded */
.hp-related--cards {
	display: flex;
	flex-wrap: wrap;
}

.hp-related--cards > .hp-related__item {
	flex: 1 1 340px;
}

/* A synced section dropped into a page that still uses the old template:
   line up with that page's content instead of adding its own side padding */
body:not(.page-template-page-layout) .hp-sec.alignfull {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.hp-related__item {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	isolation: isolate;
	background: var(--hp-paper);
	border-radius: var(--hp-radius-card);
}

.hp-related__body {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	padding: 1.75rem;
	flex: 1;
}

.hp-related__title {
	margin: 0;
	font-size: 1.5rem;
	line-height: 1.2;
}

.hp-related__title a {
	color: var(--hp-teal);
	text-decoration: none;
}

/* The whole card is clickable through the title link */
.hp-related__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.hp-related__title a:focus-visible::after {
	outline: var(--hp-focus);
	outline-offset: -3px;
	border-radius: var(--hp-radius-card);
}

.hp-related__excerpt {
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--hp-muted);
}

.hp-related__excerpt a,
.hp-related__more {
	position: relative;
	z-index: 2;
	font-weight: 600;
	color: var(--hp-teal);
}

.hp-related__terms {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--hp-orange-ink);
}

.hp-related__terms a {
	position: relative;
	z-index: 2;
	color: inherit;
	text-decoration: none;
}

.hp-related__media img {
	display: block;
	width: 100%;
	height: 200px;
	object-fit: cover;
}

/* Cards: whole fingerprint bleeding off the top-right corner, text kept clear of it */
.hp-related--cards .hp-related__item::before {
	content: "";
	position: absolute;
	z-index: -1;
	top: -58px;
	right: -46px;
	width: 120px;
	aspect-ratio: 122 / 156;
	background-color: var(--hp-sage);
	-webkit-mask: var(--hp-print) center / contain no-repeat;
	mask: var(--hp-print) center / contain no-repeat;
	pointer-events: none;
}

@media (min-width: 900px) {
	.hp-related--cards .hp-related__body {
		padding-right: 5rem;
	}
}

@media (max-width: 899px) {
	.hp-related--cards .hp-related__item::before {
		display: none;
	}
}

/* Story cards: orange top edge, tag label */
.hp-related--stories .hp-related__item {
	border-top: 3px solid var(--hp-orange);
}

.hp-related--stories .hp-related__title {
	font-size: 1.625rem;
}

/* Doorways: photo cards with the text over a teal veil */
.hp-related--doorways {
	grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
}

.hp-related--doorways .hp-related__item {
	min-height: 440px;
	justify-content: flex-end;
	background: var(--hp-teal);
}

.hp-related--doorways .hp-related__media {
	position: absolute;
	inset: 0;
	z-index: -2;
}

.hp-related--doorways .hp-related__media img {
	height: 100%;
}

.hp-related--doorways .hp-related__item::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(11, 51, 54, 0.66);
}

.hp-related--doorways .hp-related__body {
	flex: 0;
	padding: 2.25rem;
}

.hp-related--doorways .hp-related__body::before {
	content: "";
	width: 48px;
	height: 4px;
	background: var(--hp-orange);
}

.hp-related--doorways .hp-related__title {
	font-size: clamp(2rem, 1.6rem + 1.2vw, 2.5rem);
}

.hp-related--doorways .hp-related__title a,
.hp-related--doorways .hp-related__excerpt,
.hp-related--doorways .hp-related__excerpt a {
	color: #fff;
}

/* Resources: big image cards */
.hp-related--resources {
	grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
	gap: 1.5rem;
}

.hp-related--resources .hp-related__media img {
	height: clamp(220px, 22vw, 300px);
}

.hp-related--resources .hp-related__title {
	font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem);
}

.hp-related--resources .hp-related__excerpt {
	font-size: 1rem;
	color: var(--hp-ink);
}

.hp-related--resources .hp-related__more {
	align-self: flex-start;
	text-decoration: underline;
}

/* Featured single card (Tell us your story) */
.hp-related--feature {
	grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr));
}

/* Cream cards on a plain section; white cards on a coloured one */
.hp-related--feature .hp-related__item {
	background: var(--hp-paper);
}

.has-background .hp-related--feature .hp-related__item {
	background: #fff;
}

.hp-related--feature .hp-related__title {
	font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);
}

/* --------------------------------------------------------------------------
   Story lists (All Village Histories, All Emigrant Stories)
   -------------------------------------------------------------------------- */

.hp-list .wp-block-post-template {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: repeat(auto-fill, minmax(min(400px, 100%), 1fr));
	list-style: none;
	padding: 0;
}

.hp-list .wp-block-post {
	position: relative;
	background: var(--hp-paper);
	border-top: 3px solid var(--hp-orange);
	border-radius: var(--hp-radius-card);
	padding: 1.75rem;
	margin: 0 !important;
}

.hp-list .wp-block-post-title {
	font-size: 1.5rem;
	margin: 0 0 0.625rem;
}

.hp-list .wp-block-post-title a {
	text-decoration: none;
}

.hp-list .wp-block-post-excerpt {
	font-size: 0.9375rem;
	color: var(--hp-muted);
}

.hp-list .wp-block-separator {
	display: none;
}

.hp-list .wp-block-query-pagination {
	margin-top: var(--wp--preset--spacing--50);
}

/* --------------------------------------------------------------------------
   Phones
   -------------------------------------------------------------------------- */

@media (max-width: 781px) {
	.hp-two-up > .wp-block-column.has-background,
	.hp-roles > .wp-block-column {
		padding: var(--wp--preset--spacing--40) !important;
	}

	.hp-related--doorways .hp-related__item {
		min-height: 340px;
	}

	.hp-pillrow .wp-block-button {
		width: auto;
	}
}

/* --------------------------------------------------------------------------
   Redevelopment page: key facts, milestones, money lists
   -------------------------------------------------------------------------- */

.hp-facts {
	grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)) !important;
	gap: 1rem !important;
}

.hp-fact {
	border-top: 3px solid var(--hp-orange);
	padding-top: 1rem;
}

.hp-fact > * {
	margin: 0 !important;
}

.hp-fact__big {
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: clamp(1.625rem, 1.3rem + 1vw, 2.25rem);
	line-height: 1.1;
	color: var(--hp-teal);
}

.hp-fact__small {
	color: var(--hp-muted);
	margin-top: 0.375rem !important;
}

.hp-milestones {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
	gap: 2rem 1.5rem;
}

.hp-milestone {
	position: relative;
	border-top: 2px solid rgba(229, 229, 187, 0.5);
	padding-top: 1.25rem;
}

.hp-milestone::before {
	content: "";
	position: absolute;
	top: -8px;
	left: 0;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--hp-orange);
}

.hp-milestone > * {
	margin: 0 !important;
}

.hp-milestone > * + * {
	margin-top: 0.5rem !important;
}

.hp-when {
	color: var(--hp-straw) !important;
	font-size: 1.0625rem;
}

.hp-money {
	list-style: none;
	padding: 0;
}

.hp-money > li {
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--hp-line);
}

.hp-band > .wp-block-column > * {
	margin: 0;
}

.hp-band .wp-block-buttons {
	justify-content: flex-end;
}

@media (max-width: 781px) {
	.hp-band .wp-block-buttons {
		justify-content: flex-start;
	}
}

/* Small print with an orange edge, e.g. the 1920 cut-off on Search the Database */
.hp-note {
	font-size: var(--wp--preset--font-size--small);
	font-style: italic;
	border-left: 3px solid var(--hp-orange);
	padding-left: 1rem;
}

/* A map or diagram: show it whole, never cropped */
.hp-map-img img {
	height: auto !important;
	object-fit: contain !important;
	aspect-ratio: auto !important;
}

/* Shop search (Ivory Search) in the shop page heads: line up under the title,
   not centred, using the same edge as the orange rule */
.hp-page-head > .is-search-form {
	margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size, 1340px)) / 2)) !important;
	margin-right: auto !important;
}

/* WooCommerce "Hand-picked products" (e.g. Croft Histories): the shop's card
   look, equal heights, buttons lined up along the bottom */
.wc-block-grid.wp-block-handpicked-products .wc-block-grid__products {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
	gap: 1.25rem;
	margin: 0 !important;
	padding: 0;
}

.wc-block-grid.wp-block-handpicked-products .wc-block-grid__product {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 1.75rem 1.5rem 1.5rem !important;
	border: 0 !important;
	background: var(--hp-paper);
	border-radius: var(--hp-radius-card);
	text-align: center;
}

.wc-block-grid.wp-block-handpicked-products .wc-block-grid__product-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none !important;
	color: var(--hp-teal);
}

.wc-block-grid.wp-block-handpicked-products .wc-block-grid__product-image {
	margin-bottom: 1.25rem !important;
}

.wc-block-grid.wp-block-handpicked-products .wc-block-grid__product-image img {
	width: auto !important;
	max-width: 100%;
	height: 220px !important;
	object-fit: contain;
	box-shadow: 0 10px 22px rgba(17, 70, 74, 0.14);
	background: #fff;
}

.wc-block-grid.wp-block-handpicked-products .wc-block-grid__product-title {
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: 1.125rem !important;
	font-weight: 500;
	line-height: 1.3;
	color: var(--hp-teal);
	margin: 0 0 0.5rem !important;
}

.wc-block-grid.wp-block-handpicked-products .wc-block-grid__product-link:hover .wc-block-grid__product-title {
	text-decoration: underline;
}

.wc-block-grid.wp-block-handpicked-products .wc-block-grid__product-price {
	margin: 0 0 1rem !important;
	font-weight: 600;
}

.wc-block-grid.wp-block-handpicked-products .wc-block-grid__product-add-to-cart {
	margin-top: auto !important;
}

/* Find your family: the two Genealogy Service images shown whole (the family
   tree must not be cropped), on white cards with a soft shadow */
.hp-pair--feature.wp-block-gallery.has-nested-images figure.wp-block-image img {
	height: clamp(240px, 28vw, 400px);
	object-fit: contain;
	background: #fff;
	box-shadow: 0 12px 28px rgba(17, 70, 74, 0.14);
}

/* Photo bands (St Kilda) inside the page width get the same rounded corners
   as the cards around them; full-width ones stay square */
.wp-block-cover.hp-band-image:not(.alignfull) {
	border-radius: var(--hp-radius-card);
	overflow: hidden;
}

/* Image-and-text cards (the shared "Explore the Shop" block and similar)
   get the same rounded corners as every other card */
.wp-block-media-text.has-background:not(.alignfull):not(.alignwide) {
	border-radius: var(--hp-radius-card);
	overflow: hidden;
}

/* Smaller sets (e.g. St Kilda Archive, 8 pictures): bigger tiles, four across */
.wp-block-gallery.hp-mosaic--wide.has-nested-images {
	grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)) !important;
}
