:root {
	--edge-band: var(--wp--custom--edge-band);
	--edge-rise: var(--wp--custom--edge-rise);
	/* The stripe gap ratio is the logo's ratio of the gap between its stripes to their width, so
	   the footer edge keeps the logo's proportions at any size. */
	--edge-gap: calc(var(--edge-band) * var(--wp--custom--stripe-gap-ratio));
	--edge-height: calc(var(--edge-rise) + 4 * (var(--edge-band) + var(--edge-gap)));
	--header-offset: var(--wp-admin--admin-bar--height, 0px);
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: 96px;
}

body {
	font-feature-settings: "kern", "liga";
	text-rendering: optimizeLegibility;
}

/* The page-heading ribbon leans out past the right edge of the window on narrower screens.
   Safari on iPhone ignores overflow-x on body when scrolling by touch, so clipping there alone
   still lets the page be dragged sideways. Clipping on main works. It is clip rather than hidden
   because hidden would make main a scroll container, and position: sticky inside it would stop
   working. */
.site-main {
	overflow-x: clip;
}

a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 3px solid var(--wp--preset--color--fjord);
	outline-offset: 3px;
	border-radius: 2px;
}

.site-footer :focus-visible {
	outline-color: var(--wp--preset--color--sky);
}

h1,
h2,
h3 {
	hyphens: auto;
	overflow-wrap: break-word;
	text-wrap: balance;
}

/* With automatic hyphenation on, Chrome ignores a soft hyphen and picks its own break point. On
   phones it split "20-års&shy;jubileum" as "20-årsjubi-leum" instead of at the compound
   boundary, and in an h3 in a narrow column it split the brand name "Facebook" as "Face-book".
   With manual hyphenation, a long word in an h1 or h3 breaks only at a soft hyphen in the
   markup. */
h1,
h3 {
	hyphens: manual;
}

p {
	text-wrap: pretty;
}

/* Header */

/* The header sticks through the template part's wrapper, not the .site-header group inside it.
   A sticky element can't move beyond its parent, and the wrapper is exactly as tall as the
   group, so a sticky group would have no room to stick. The offset is the admin bar's height, so
   for a logged-in user the header sticks just below the admin bar instead of sliding under it. */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: var(--header-offset);
	z-index: 50;
	border-bottom: 1px solid transparent;
	background: var(--wp--preset--color--white);
	transition: border-color 0.2s ease;
}

/* header.js adds is-stuck once the page has scrolled, and the border then separates the header
   from the content scrolling under it. The border is always there, transparent until then, so the
   header doesn't change height when it appears. */
.wp-site-blocks > header.wp-block-template-part.is-stuck {
	border-bottom-color: var(--wp--custom--color--rule);
}

.header-inner {
	gap: 24px;
	min-height: 76px;
}

/* The auto right margin pushes the menu and the language link over to the right. WordPress
   resets the margins of every child of a flex layout with a rule that outranks a single class.
   With .site-brand alone the logo lost its margin, and the menu sat centred between the logo and
   the language link. The extra .header-inner is there to outrank that reset. */
.header-inner .site-brand {
	flex: none;
	margin: 0 auto 0 0;
}

.site-brand img {
	width: auto;
	height: 46px;
	aspect-ratio: 1200 / 528;
}

@media (max-width: 380px) {
	.site-brand img {
		height: 38px;
	}
}

.lang-link {
	flex: none;
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.lang-link a {
	display: block;
	padding: 8px 14px;
	border-radius: var(--wp--custom--radius);
	box-shadow: inset 0 0 0 1.5px var(--wp--custom--color--rule);
	color: var(--wp--preset--color--night);
	text-decoration: none;
}

.lang-link a:hover {
	box-shadow: inset 0 0 0 1.5px var(--wp--preset--color--night);
	color: var(--wp--preset--color--night);
}

/* Below this width the menu, the logo and the language link no longer fit on one row, so the menu
   switches to its Menu button and moves after the language link. The site-nav block's style.css
   and view.js use the same width, so change them together. */
@media (max-width: 960px) {
	.header-inner {
		gap: 12px;
	}

	.site-nav {
		order: 2;
	}

	.lang-link a {
		padding: 8px 10px;
	}
}

/* Front page */

.home {
	--home-header-padding: clamp(16px, 2.5vw, 32px);
	--home-logo-height: clamp(64px, 2rem + 8vw, 140px);
}

/* On a narrow phone the logo gets the width left over in the header row, so the row never
   overflows. The 240px is the room the menu button, the language link, the gaps between them and
   the page's side padding take. The 0.44 is the logo's height over its width, from its
   aspect-ratio under Header, so the leftover width becomes a height. */
@media (max-width: 420px) {
	.home {
		--home-logo-height: min(64px, (100vw - 240px) * 0.44);
	}
}

/* The front page header starts tall, with a large logo, and shrinks once the page scrolls. A sticky
   header takes up room in the page, so shrinking it would pull the content up with it. Here the
   header is fixed instead, and this padding holds its place. The padding must equal the tall
   header's full height, its top padding plus the logo plus the bottom border, so change it with
   them. */
.home .wp-site-blocks {
	padding-top: calc(var(--home-header-padding) + var(--home-logo-height) + 1px);
}

.home .wp-site-blocks > header.wp-block-template-part {
	position: fixed;
	right: 0;
	left: 0;
}

.home .header-inner {
	align-items: flex-start;
	padding-top: var(--home-header-padding);
	transition: padding-top 0.25s ease;
}

.home .header-inner .site-brand img {
	height: var(--home-logo-height);
	transition: height 0.25s ease;
}

/* The min-height is a menu link's height. While the tall header aligns its items to the top, that
   keeps the menu and the language button on one centre line. */
.home nav.site-nav,
.home .lang-link {
	display: flex;
	align-items: center;
	min-height: 50px;
	margin-top: 8px;
}

/* Once the page scrolls, the header shrinks to the size it has on the other pages. The logo
   heights here repeat the ones under Header, so change them together. */
.home .is-stuck .header-inner {
	align-items: center;
	padding-top: 0;
}

.home .is-stuck .header-inner .site-brand img {
	height: 46px;
}

.home .is-stuck :is(nav.site-nav, .lang-link) {
	min-height: 0;
	margin-top: 0;
}

@media (max-width: 380px) {
	.home .is-stuck .header-inner .site-brand img {
		height: 38px;
	}
}

.hero-intro {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: clamp(24px, 4vw, 72px);
	align-items: end;
	padding-block: clamp(20px, 2.5vw, 36px) clamp(24px, 3vw, 40px);
}

.hero-intro > * {
	margin-block: 0;
}

.hero-intro .wp-block-post-title {
	max-width: 13ch;
	margin: 0;
	font-size: clamp(2rem, 1.1rem + 3vw, 3.5rem);
}

.hero-intro .page-heading-button {
	margin-block-start: 24px;
}

.hero-photo {
	margin-block: 0;
}

.hero-photo img {
	width: 100%;
	height: min(68vh, 52vw);
	min-height: 300px;
	object-fit: cover;
	object-position: 50% 64%;
}

@media (max-width: 800px) {
	.hero-intro {
		grid-template-columns: 1fr;
		align-items: start;
	}

	.hero-photo img {
		height: auto;
		min-height: 0;
		aspect-ratio: 4 / 3;
	}
}

/* Lightbox */

.lightbox {
	width: 100vw;
	height: 100vh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(3, 20, 31, 0.96);
	color: var(--wp--preset--color--white);
}

.lightbox::backdrop {
	background: rgba(3, 20, 31, 0.96);
}

.lightbox figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	margin: 0;
	padding: 64px 72px 24px;
}

.lightbox img {
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: calc(100vh - 160px);
	object-fit: contain;
}

.lightbox figcaption {
	padding-top: 14px;
	text-align: center;
}

.lightbox figcaption:empty {
	display: none;
}

.lb-btn {
	position: absolute;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	color: var(--wp--preset--color--white);
	cursor: pointer;
}

.lb-btn:hover {
	background: rgba(255, 255, 255, 0.22);
}

.lb-btn svg {
	width: 24px;
	height: 24px;
}

.lb-close {
	top: 12px;
	right: 12px;
}

.lb-prev,
.lb-next {
	top: 50%;
	translate: 0 -50%;
}

.lb-prev {
	left: 12px;
}

.lb-next {
	right: 12px;
}

@media (max-width: 640px) {
	.lightbox figure {
		padding: 64px 12px 88px;
	}

	.lightbox img {
		max-height: calc(100vh - 240px);
	}

	.lb-prev,
	.lb-next {
		top: auto;
		bottom: 16px;
		translate: none;
	}

	.lb-prev {
		left: calc(50% - 64px);
	}

	.lb-next {
		right: calc(50% - 64px);
	}
}

/* Page heading */

/* WordPress puts its block gap between the header and main. The page heading's ribbon starts
   right under the header, so that its stripes seem to lean out from under it, and the gap would
   leave a white strip between the two. */
.wp-site-blocks > header.wp-block-template-part + * {
	margin-block-start: 0;
}

.page-head {
	--band: clamp(14px, 3.2vw, 48px);
	--gap: calc(var(--band) * var(--wp--custom--stripe-gap-ratio));
	--ribbon-width: calc(4 * var(--band) + 3 * var(--gap));
	padding-block: clamp(32px, 5vw, 72px) clamp(28px, 4vw, 48px);
}

.page-head :is(.wp-block-post-title, .wp-block-query-title, h1.wp-block-heading) {
	max-width: 16ch;
	margin-block: 0 0.5em;
}

.page-head .wp-block-query-title {
	max-width: none;
}

.page-lede {
	max-width: 34em;
	margin-block: 0;
	line-height: 1.5;
}

.page-lede p {
	margin: 0;
}

.page-head .page-heading-button {
	margin-block: 28px 0;
}

/* The ribbon is anchored at its bottom and leans right as it rises, so it reaches furthest left
   at the bottom of the heading. The right padding clears that point with a small gap. The
   min-height gives the stripes some length on pages with a short heading. */
.has-ribbon {
	position: relative;
	min-height: clamp(180px, 20vw, 300px);
	padding-right: calc(var(--ribbon-width) + clamp(24px, 3vw, 48px));
}

/* The ribbon is the logo's four stripes, drawn as one stripe and three box-shadow copies set off
   to its right, so the template needs no extra markup for it. Shadows follow border-radius, so
   all four keep the rounded bottom ends of the logo's stripes, and as shapes rather than a
   gradient they get anti-aliased slanted edges. The first stripe is placed so that the last copy
   ends at the right edge of the wide column. Skewing around the bottom keeps the bottom ends
   there while the tops lean out to the right, past the column and, on narrower screens, past the
   window, where main's overflow-x clip cuts them off. */
.has-ribbon::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: clamp(20px, 3vw, 40px);
	right: calc(var(--ribbon-width) - var(--band));
	width: var(--band);
	border-radius: 0 0 calc(var(--band) * 0.14) calc(var(--band) * 0.14);
	background: var(--wp--preset--color--sky);
	box-shadow:
		calc(var(--band) + var(--gap)) 0 0 var(--wp--custom--color--stripe-2),
		calc(2 * (var(--band) + var(--gap))) 0 0 var(--wp--custom--color--stripe-3),
		calc(3 * (var(--band) + var(--gap))) 0 0 var(--wp--custom--color--stripe-4);
	transform: skewX(calc(-1 * var(--wp--custom--slant)));
	transform-origin: bottom;
	pointer-events: none;
}

@media (max-width: 760px) {
	.has-ribbon {
		min-height: 0;
		padding-right: 0;
	}

	.has-ribbon::before {
		display: none;
	}
}

.page-photo {
	margin-block: 0;
}

.page-photo img {
	width: 100%;
	max-height: 70vh;
	object-fit: cover;
}

/* WordPress's constrained layout centres every block in the post content with margin-left: auto
   and !important. Here the text column starts at the left edge of the wide column instead, in
   line with the heading, and the max() is that edge's offset inside the full-width post content.
   The extra class and !important let this rule beat core's. */
.page-content.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull):not(.alignwide)) {
	margin-left: max(0px, (100% - var(--wp--style--global--wide-size)) / 2) !important;
}

/* Core puts its block gap between full-width sections, which would leave white strips between
   coloured sections. Here they sit flush against each other. The post content block is itself
   full width, and it keeps its gap so that text on a plain page doesn't touch the lead photo. The
   sections are wrapped in :where so that rules for a particular section, such as the night
   section's pull-up in blocks/group.css, override this one wherever the section sits. */
.wp-block-post-content > :where(.alignfull),
.site-main > :where(.alignfull:not(.wp-block-post-content)),
.site-main > :where(.wp-block-post-content:has(> .alignfull:first-child)) {
	margin-block-start: 0;
}

.section-head > * {
	margin-block: 0;
}

.section-head > * + * {
	margin-block-start: 8px;
}

.section-head p {
	max-width: 36em;
}

/* Form fields */

/* The fields are listed inside :where() so that this shared rule weighs no more than
   .wp-site-blocks alone, and more specific rules for one kind of field, such as the textarea's
   min-height below, override it. */
.wp-site-blocks :where(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="submit"]), select, textarea) {
	width: 100%;
	min-height: 52px;
	padding: 12px 14px;
	border: 1.5px solid var(--wp--custom--color--field-border);
	border-radius: var(--wp--custom--radius);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--night);
	font: inherit;
}

.wp-site-blocks textarea {
	min-height: 140px;
	resize: vertical;
}

.wp-site-blocks input[type="date"] {
	display: block;
	min-width: 0;
	max-width: 100%;
	appearance: none;
}

.wp-site-blocks input[type="date"]::-webkit-date-and-time-value {
	text-align: left;
}

/* iOS Safari ignores padding and min-height on a select drawn with its native appearance, so a
   select there shows as a thin native control, shorter than the other fields. Turning the native
   appearance off lets the shared field styles above apply. It also removes the arrow, so the
   background draws one. The arrow's colour is the night colour from theme.json written out as a
   hex value, because a data URI can't use a CSS variable. Change it along with the night colour. */
.wp-site-blocks select {
	appearance: none;
	padding-right: 44px;
	background: var(--wp--preset--color--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23062a3f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px;
}

.wp-site-blocks :where(input, select, textarea):focus {
	border-color: var(--wp--preset--color--fjord);
	outline: 3px solid color-mix(in srgb, var(--wp--preset--color--fjord) 25%, transparent);
	outline-offset: 0;
}

/* Password-protected pages */

.post-password-form {
	display: grid;
	gap: 16px;
	max-width: 34em;
	margin-block: 0 var(--wp--preset--spacing--70);
}

.post-password-form p {
	margin: 0;
}

.post-password-form p:has(label) {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	gap: 12px;
}

.post-password-form label {
	display: flex;
	flex: 1 1 16em;
	flex-direction: column;
	gap: 6px;
	font-weight: 600;
}

.post-password-form input[type="submit"] {
	min-height: 52px;
	border: 0;
	cursor: pointer;
}

/* Members' documents: the traditions document. */

.doc-original .byline {
	color: var(--wp--preset--color--muted);
	font-size: 0.9375rem;
}

.doc-original h2 {
	hyphens: manual;
}

.doc-original * + h2 {
	margin-block-start: 1.6em;
}

.doc-original * + h3 {
	margin-block-start: 1.4em;
}

.doc-original .toc {
	margin: 2em 0 0;
	padding: 20px 24px;
	border-radius: var(--wp--custom--radius);
	background: var(--wp--preset--color--ice);
}

.doc-original .toc h2 {
	margin: 0 0 8px;
	font-size: 1.125rem;
}

.doc-original .toc ol {
	margin: 0;
	padding-left: 1.3em;
}

.doc-original .doc-figure {
	margin: 1.4em 0;
}

.doc-original .doc-figure img {
	width: 100%;
	height: auto;
	border-radius: 3px;
}

.doc-original .doc-figure figcaption {
	padding-top: 8px;
	color: var(--wp--preset--color--muted);
	font-size: 0.875rem;
}

/* A list item can't hold an image block, so the uniform picture sits after the .trad-items list
   item it belongs to. It gets the list's indent so that it lines up with the item's text. */
.doc-original .doc-figure-uniform {
	max-width: 220px;
	margin-inline-start: 1.2em;
}

/* Only the bottom margin is set here, as on .plain-lines and .doc-logos below. The flow layout puts
   its block gap above each block, and a margin shorthand would override that with a top margin of
   0, which leaves no space between a heading and the list under it. */
.doc-original .trad-items {
	margin-block-end: 1.5em;
	padding-left: 1.2em;
}

.doc-original .trad-items > li + li {
	margin-top: 1em;
}

.doc-original .trad-items ul {
	margin: 0.4em 0 0;
}

.doc-original .plain-lines {
	margin-block-end: 1.2em;
	padding: 0;
	list-style: none;
}

.doc-original .plain-lines li + li {
	margin-top: 0.2em;
}

.doc-original .doc-chip {
	display: inline-block;
	padding: 0 8px;
	border-radius: 999px;
	background: var(--wp--preset--color--ice);
	color: var(--wp--preset--color--fjord);
	font-size: 0.875em;
	font-weight: 600;
	text-decoration: none;
}

.doc-original .doc-logos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 24px;
	margin-block-end: 1.2em;
}

.doc-original .doc-logos figure {
	margin: 0;
}

.doc-original .doc-logos figure:first-child {
	width: min(100%, 300px);
}

.doc-original .doc-logos figure:last-child {
	width: 150px;
}

.doc-original .doc-logos img {
	width: 100%;
	height: auto;
}

.doc-original .doc-rule {
	margin: 2.5em 0 1.5em;
	border: 0;
	border-top: 2px dashed var(--wp--custom--color--rule);
}

.doc-original sup.fn {
	line-height: 0;
}

.doc-original sup.fn a {
	text-decoration: none;
}

.doc-original .wp-block-footnotes {
	margin: 2.5em 0 0;
	padding: 1.2em 0 0 1.4em;
	border-top: 1px solid var(--wp--custom--color--rule);
	color: var(--wp--preset--color--muted);
	font-size: 0.875rem;
}

.doc-original .doc-footer {
	margin-top: 1.5em;
	color: var(--wp--preset--color--muted);
	font-size: 0.875rem;
}

/* Running text */

.wp-block-post-content * + h2.wp-block-heading {
	margin-block-start: 1.6em;
}

/* The traditions document indents and spaces its lists in the .doc-original rules above. These two
   rules are more specific than those, so they leave out the lists inside .doc-original, which they
   would otherwise re-indent and re-space. */
.wp-block-post-content
	:is(ul, ol).wp-block-list:not([class*="is-style-"], .doc-original *) {
	padding-left: 1.2em;
}

.wp-block-post-content
	:is(ul, ol).wp-block-list:not([class*="is-style-"], .doc-original *)
	li + li {
	margin-block-start: 0.35em;
}

/* Search results */

.page-head .site-search {
	max-width: 34em;
	margin-block-start: 28px;
}

/* The list isn't called .search-results, because WordPress already gives the search page's body
   that class, and rules for it would style the whole page. */
.search-result-list {
	max-width: 40em;
	padding-block-end: var(--wp--preset--spacing--70);
}

.search-result-list .wp-block-post-template {
	max-width: 40em;
	padding: 0;
	list-style: none;
}

.search-result-list .wp-block-post {
	padding-block: 20px;
	border-bottom: 1px solid var(--wp--custom--color--rule);
}

.search-result-list .wp-block-post-date {
	color: var(--wp--preset--color--muted);
	font-size: 0.9375rem;
}

.search-result-list .wp-block-post-title {
	margin-block: 4px 6px;
	font-size: var(--wp--preset--font-size--large);
}

.search-result-list .wp-block-post-excerpt p {
	margin: 0;
}

/* Archived posts */

.archived-post {
	padding-block-end: var(--wp--preset--spacing--70);
}

.archived-post .page-head {
	padding-block-end: 0;
}

.page-notice {
	margin-block-end: 32px;
	padding: 16px 20px;
	border-left: 4px solid var(--wp--preset--color--sky);
	background: var(--wp--preset--color--ice);
	font-size: 0.9375rem;
}

.page-notice p {
	margin: 0;
}

.post-meta {
	color: var(--wp--preset--color--muted);
	font-size: 0.9375rem;
}

.post-body {
	max-width: 40em;
}

.post-body img {
	height: auto;
}

.post-body figcaption,
.post-body .wp-caption-text {
	color: var(--wp--preset--color--muted);
	font-size: 0.875rem;
}

.post-body iframe {
	max-width: 100%;
}

.post-body .alignright {
	float: right;
	margin: 0 0 1em 1.5em;
}

.post-body .alignleft {
	float: left;
	margin: 0 1.5em 1em 0;
}

.post-body .aligncenter {
	margin-inline: auto;
}

.post-body::after {
	content: "";
	display: table;
	clear: both;
}

.post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-block-start: 56px;
	padding-block-start: 24px;
	border-top: 2px solid var(--wp--preset--color--night);
}

/* The flow layout puts its block gap above every child but the first, which pushed the newer-post
   link lower than the older one beside it in the grid. */
.post-nav > * {
	margin-block: 0;
}

.post-nav .post-navigation-link-next {
	grid-column: 2;
	text-align: right;
}

@media (max-width: 560px) {
	.post-nav {
		grid-template-columns: 1fr;
	}

	.post-nav .post-navigation-link-next {
		grid-column: auto;
		text-align: left;
	}
}

/* Footer */

/* The footer opens with a slanted edge, the logo's four stripes rising across its full width.
   The footer is pulled up over the end of the page by the edge's height, and nothing above its
   slanted top is painted, so whatever background sits there shows above the stripes and through
   the gaps between them. The page ends with that much room so that no text sits under the
   stripes. On an ordinary page the room is main's bottom padding, filled by the page's own
   background. */
.site-main {
	padding-block-end: var(--edge-height);
}

/* When a page ends with a full-width section that has its own background, directly in main or at
   the end of the post content, the room goes inside that section, so that its colour fills the
   gaps between the stripes. A section style takes the room as --room-below, which it adds to its
   bottom padding, because the night style's pseudo-elements already draw its ribbon edge. A plain
   group with a background draws no edge, so it gets a spacer after its content instead.
   Full-width blocks without a background are left out on purpose, because the post content block
   is itself full width, and matching it as well would double the room. These rules match the
   has-background class and the section styles, so a section that gets its background any other
   way needs adding here. */
.site-main:has(> .alignfull:is(.has-background, [class*="is-style-section-"]):last-child),
.site-main:has(> .wp-block-post-content:last-child > .alignfull:is(.has-background, [class*="is-style-section-"]):last-child) {
	padding-block-end: 0;
}

.site-main > .alignfull[class*="is-style-section-"]:last-child,
.site-main > .wp-block-post-content:last-child > .alignfull[class*="is-style-section-"]:last-child {
	--room-below: var(--edge-height);
}

.site-main > .alignfull.has-background:not([class*="is-style-section-"]):last-child::after,
.site-main > .wp-block-post-content:last-child > .alignfull.has-background:not([class*="is-style-section-"]):last-child::after {
	content: "";
	display: block;
	height: var(--edge-height);
}

/* The query container is the template part's wrapper rather than .site-footer, because the
   wrapper has no padding, so 100cqw in the stripes' skew is the footer's full width. Measured on
   the padded .site-footer it would fall short, and the right end of the stripes would rise past
   the footer's top. */
.wp-site-blocks > footer.wp-block-template-part {
	margin-block-start: calc(-1 * var(--edge-height));
	container-type: inline-size;
}

/* The two edge layers below sit at z-index -1 inside the stacking context that isolation creates
   here. That puts them under the footer's own text but above the page content the footer
   overlaps. */
.site-footer {
	position: relative;
	isolation: isolate;
	padding-top: calc(var(--edge-height) + clamp(56px, 7vw, 96px));
	font-size: 1rem;
}

/* The footer's background is drawn here rather than on .site-footer so that it can be clipped to
   the slanted top, leaving everything above the slant unpainted. At each end the slant sits one
   gap below the last stripe. */
.site-footer::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--wp--preset--color--night);
	clip-path: polygon(
		0 var(--edge-height),
		100% calc(var(--edge-height) - var(--edge-rise)),
		100% 100%,
		0 100%
	);
}

/* This draws the four stripes as shapes, so that their slanted edges are anti-aliased. Chrome and
   Safari don't anti-alias hard colour stops in a gradient, so stripes painted that way on a
   skewed layer show staircase edges. The element itself is the sky stripe, and each box-shadow
   is a hard-edged copy one band and one gap further down, in the next stripe's colour. The skew
   is anchored at the top left and lifts the right end by --edge-rise. The first stripe starts
   --edge-rise down at the left, and the right end rises into that headroom, so no stripe reaches
   past the footer's top. */
.site-footer::after {
	content: "";
	position: absolute;
	top: var(--edge-rise);
	left: 0;
	right: 0;
	z-index: -1;
	height: var(--edge-band);
	background: var(--wp--preset--color--sky);
	box-shadow:
		0 calc(var(--edge-band) + var(--edge-gap)) 0 var(--wp--custom--color--stripe-2),
		0 calc(2 * (var(--edge-band) + var(--edge-gap))) 0 var(--wp--custom--color--stripe-3),
		0 calc(3 * (var(--edge-band) + var(--edge-gap))) 0 var(--wp--custom--color--stripe-4);
	transform: skewY(calc(-1 * atan2(var(--edge-rise), 100cqw)));
	transform-origin: left top;
}

.site-footer a {
	color: var(--wp--preset--color--white);
}

.site-footer a:hover {
	color: var(--wp--preset--color--sky);
}

.footer-top {
	display: grid;
	grid-template-columns: minmax(0, 4fr) repeat(2, minmax(0, 2fr));
	gap: 40px;
	padding-bottom: 48px;
}

.footer-top > * {
	margin-block: 0;
}

.footer-logo {
	margin: 0 0 20px;
}

.footer-logo img {
	width: 220px;
	aspect-ratio: 1200 / 528;
}

.footer-about p {
	max-width: 24em;
	margin: 0;
	color: var(--wp--custom--color--on-night);
}

.footer-label {
	margin: 0 0 12px;
	color: var(--wp--custom--color--on-night-label);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	letter-spacing: 0;
}

.footer-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-list li + li {
	margin-top: 6px;
}

.footer-bottom {
	gap: 12px 32px;
	margin-block-start: 0;
	padding-block: 20px 28px;
	border-top: 1px solid var(--wp--custom--color--night-line);
	color: var(--wp--custom--color--on-night-label);
	font-size: var(--wp--preset--font-size--small);
}

.footer-links {
	gap: 8px 24px;
}

.footer-links > * {
	margin: 0;
}

.footer-bottom .footer-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
}

.footer-bottom .footer-list li + li {
	margin-top: 0;
}

@media (max-width: 900px) {
	.footer-top {
		grid-template-columns: 1fr 1fr;
	}

	.footer-top > :first-child {
		grid-column: 1 / -1;
	}
}

@media (max-width: 480px) {
	.footer-top {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
