/*
Theme Name: Plinth
Author: ShifteQ
Author URI: https://shifteq.com/
Description: Plinth is a block theme for engineering, architecture and construction firms. A plinth is the solid base that a column or a building stands on, and Plinth is built to carry a firm's work the same way. It comes with full pages for projects, practice, team, pricing, careers and case studies, a blog, ready-made sections, and color schemes you can switch in one click.
Requires at least: 6.9
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: plinth
Tags: block-patterns, block-styles, full-site-editing, style-variations, wide-blocks, custom-colors, editor-style, translation-ready, rtl-language-support, portfolio, blog, one-column, featured-images, custom-logo, threaded-comments, full-width-template
*/

/*
 * Long words (names, links, long titles) wrap instead of pushing the page
 * sideways.
 */
body {
	overflow-wrap: break-word;
}

/* Code keeps its lines and scrolls inside its own box. */
pre {
	overflow-x: auto;
}

/*
 * Media from the classic editor, embeds and comments never run wider than the
 * column.
 */
img,
video,
iframe,
embed,
object {
	max-width: 100%;
}

img {
	height: auto;
}

/*
 * Classic captions carry a fixed width; core's content width rule is as strong
 * as one class, so this uses two.
 */
:is(.wp-block-post-content, .wp-block-comment-content) .wp-caption {
	max-width: 100%;
}

:where(.wp-caption-text, .gallery-caption) {
	margin-top: 0.6em;
	font-size: 0.75rem;
	line-height: 1.4;
	color: var(--wp--preset--color--muted);
}

:where(.alignleft) {
	float: left;
	margin: 0.3em 1.5em 1em 0;
}

:where(.alignright) {
	float: right;
	margin: 0.3em 0 1em 1.5em;
}

:where(.aligncenter) {
	display: block;
	margin-inline: auto;
}

/*
 * Headings, titles and any block set to the heading font follow the active
 * style's width (Plinth uses condensed Archivo).
 */
h1,
h2,
h3,
h4,
h5,
h6,
.wp-block-site-title,
.has-heading-font-family,
.wp-block-quote p,
.wp-block-pullquote p,
.wp-block-accordion-heading__toggle {
	font-stretch: var(--wp--custom--heading-stretch, 100%);
}

/*
 * Spec sheet table: rows ruled top and bottom, no cell boxes. Rules follow the
 * text color, so they work on light and night sections.
 */
.wp-block-table.is-style-spec td,
.wp-block-table.is-style-spec th {
	border: 0;
	border-top: 1px solid color-mix(in srgb, currentcolor 24%, transparent);
	padding: 0.75em 0;
}

.wp-block-table.is-style-spec tr:last-child td {
	border-bottom: 1px solid color-mix(in srgb, currentcolor 24%, transparent);
}

/* Title block table: the stamp box from an engineering drawing. */
.wp-block-table.is-style-title-block table {
	border: 2px solid currentcolor;
	background: var(--wp--preset--color--base);
}

.wp-block-table.is-style-title-block td {
	border: 1px solid currentcolor;
	padding: 0.85em 1em;
	vertical-align: top;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.wp-block-table.is-style-title-block strong {
	display: block;
	margin-top: 0.35em;
	font-family: var(--wp--preset--font-family--heading);
	font-stretch: var(--wp--custom--heading-stretch, 100%);
	font-size: 1.25rem;
	font-weight: var(--wp--custom--heading--weight, 800);
	letter-spacing: 0;
	line-height: 1.05;
}

/* FAQ list: ruled rows, large titles, plus and minus markers. */
.is-style-faq .wp-block-details {
	border-top: 1px solid var(--wp--preset--color--line);
	padding: 1.1em 0;
	margin: 0;
}

.is-style-faq .wp-block-details:last-child {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.is-style-faq .wp-block-details summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	gap: 1em;
	font-family: var(--wp--preset--font-family--heading);
	font-stretch: var(--wp--custom--heading-stretch, 100%);
	font-size: var(--wp--preset--font-size--large);
	font-weight: var(--wp--custom--heading--weight, 800);
	line-height: 1.1;
	text-transform: var(--wp--custom--heading--transform, uppercase);
}

.is-style-faq .wp-block-details summary::-webkit-details-marker {
	display: none;
}

.is-style-faq .wp-block-details summary::after {
	content: "+";
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 400;
}

.is-style-faq .wp-block-details[open] summary::after {
	content: "-";
}

.is-style-faq .wp-block-details > :not(summary) {
	margin-top: 0.75em;
}

/*
 * Header menu: stay in the burger menu until the menu and button have room side
 * by side (core switches at 600px).
 */
@media (min-width: 600px) and (max-width: 899px) {

	:is(header, .plinth-header) .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	:is(header, .plinth-header) .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

/*
 * Header menu with 8 or more top-level links (for example, before a menu is
 * set, when WordPress lists every page): it stays behind the menu button at
 * every width, so the header keeps one line. The plinth-header class carries
 * these rules into the editor, where a header part has no header element.
 */
:is(header, .plinth-header) .wp-block-navigation:has(:is(.wp-block-navigation__container, .wp-block-page-list) > li:nth-child(8)) .wp-block-navigation__responsive-container-open:not(.always-shown) {
	display: flex;
}

:is(header, .plinth-header) .wp-block-navigation:has(:is(.wp-block-navigation__container, .wp-block-page-list) > li:nth-child(8)) .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
	display: none;
}

/* Header buttons keep their label on one line. */
:is(header, .plinth-header) .wp-block-button__link {
	white-space: nowrap;
}

/*
 * On narrow phones a long translated label (for example in German) may wrap
 * over two balanced lines instead of making the page wider than the screen.
 */
@media (max-width: 479px) {

	:is(header, .plinth-header) .wp-block-button__link {
		white-space: normal;
		text-wrap: balance;
	}
}

/*
 * Footer menus: child pages show as an indented list under their parent, not as
 * hover flyouts.
 */
footer .wp-block-navigation .wp-block-navigation__submenu-icon {
	display: none;
}

footer .wp-block-navigation .has-child {
	flex-direction: column;
	align-items: flex-start;
	gap: inherit;
}

footer .wp-block-navigation .has-child .wp-block-navigation__submenu-container {
	position: static;
	visibility: visible;
	opacity: 1;
	width: auto;
	min-width: 0;
	height: auto;
	overflow: visible;
	border: 0;
	background: transparent;
	color: inherit;
	gap: inherit;
	padding: 0;
	padding-inline-start: 1em;
}

footer .wp-block-navigation .has-child .wp-block-navigation__submenu-container .wp-block-navigation-item > .wp-block-navigation-item__content {
	padding: 0;
}

/*
 * A full-width band with nothing inside (for example the comments band on a
 * post with comments closed) is not shown.
 */
.wp-block-group.alignfull:empty {
	display: none;
}

/*
 * Post lists: a post without a featured image drops the empty photo column and
 * its text takes the row at reading width.
 */
.wp-block-post-template .wp-block-column:empty {
	display: none;
}

.wp-block-post-template .wp-block-columns:has(> .wp-block-column:empty) > .wp-block-column {
	flex-basis: 100% !important;
	max-width: var(--wp--style--global--content-size);
}

/* Tap targets: at least 24px tall. */
.is-style-faq .wp-block-details summary {
	padding-block: 0.3em;
}

.wp-lightbox-container button.lightbox-trigger {
	width: 2rem;
	height: 2rem;
}

/*
 * Balanced grids: no orphan on its own row at any width.
 * Cards: 1 per row on phones; any even count goes 2 across from 600px;
 * multiples of 3 go 3 across from 782px;
 * multiples of 4 go 4 across from 1024px. Compact (figures, facts, city lists)
 * keeps 2 across on phones.
 *
 */
.is-layout-grid.is-style-balanced,
.is-layout-grid.is-style-balanced-compact {
	grid-template-columns: repeat(var(--plinth-grid-columns, 1), minmax(0, 1fr)) !important;
}

.is-layout-grid.is-style-balanced-compact {
	--plinth-grid-columns: 2;
}

@media (min-width: 600px) {

	.is-layout-grid.is-style-balanced:has(> :nth-child(2n):last-child) {
		--plinth-grid-columns: 2;
	}
}

@media (min-width: 782px) {

	.is-layout-grid.is-style-balanced:has(> :nth-child(3n):last-child) {
		--plinth-grid-columns: 3;
	}
}

@media (min-width: 1024px) {

	.is-layout-grid.is-style-balanced:has(> :nth-child(4n):last-child),
	.is-layout-grid.is-style-balanced-compact:has(> :nth-child(4n):last-child) {
		--plinth-grid-columns: 4;
	}
}

/*
 * Two-column grids (previous and next project, partner cards) stack on phones.
 * WordPress 7.0 and later already do this from the minimum column width; this
 * keeps earlier versions the same.
 */
@media (max-width: 599px) {

	.is-layout-grid.plinth-pair {
		grid-template-columns: minmax(0, 1fr);
	}
}

/*
 * Figures in the photo hero and entries in the logbook: a rule on the side
 * where reading starts (left, or right in right-to-left languages).
 */
.plinth-stat,
.plinth-log-entry {
	padding-inline-start: var(--wp--preset--spacing--30);
}

.plinth-stat {
	border-inline-start: 1px solid var(--wp--preset--color--night-line);
}

.plinth-log-entry {
	border-inline-start: 2px solid var(--wp--preset--color--contrast);
}

/*
 * Social icons ship without links. The site shows a list, and the "Follow the
 * work" row of the contact hero, only once at least one icon has a link. The
 * editor still shows the empty icons to fill in.
 */
.wp-block-social-links:not(:has(li)),
.plinth-follow:not(:has(.wp-social-link)) {
	display: none;
}

/*
 * Header, page and footer meet edge to edge: no root gap showing the page color
 * between bands.
 */
.wp-site-blocks > * {
	margin-block: 0;
}

/*
 * Register table: like the comparison table, but every column left-aligned
 * (project lists, schedules).
 */
.wp-block-table.is-style-register th,
.wp-block-table.is-style-register td {
	border: 0;
	border-bottom: 1px solid color-mix(in srgb, currentcolor 24%, transparent);
	padding-block: 0.85em;
	padding-inline: 0 1em;
	text-align: start;
	word-break: normal;
	overflow-wrap: normal;
}

.wp-block-table.is-style-register thead th {
	border-bottom: 2px solid currentcolor;
	font-family: var(--wp--preset--font-family--heading);
	font-stretch: var(--wp--custom--heading-stretch, 100%);
	font-size: 1.125rem;
	font-weight: var(--wp--custom--heading--weight, 800);
	text-transform: var(--wp--custom--heading--transform, uppercase);
	vertical-align: bottom;
}

/*
 * Small screens: registers with four or more columns keep a minimum width and
 * scroll sideways; two and three columns fit the screen.
 */
@media (max-width: 781px) {

	.wp-block-table.is-style-register table {
		table-layout: auto;
	}

	.wp-block-table.is-style-register table:has(tr > :nth-child(4)) {
		min-width: 40rem;
	}
}

/*
 * Headings that are links: no underline at rest, underline on hover and focus
 * (body links keep their underline).
 */
:where(h1, h2, h3, h4, h5, h6) a,
.wp-block-post-title a {
	text-decoration: none;
}

:where(h1, h2, h3, h4, h5, h6) a:where(:hover, :focus-visible),
.wp-block-post-title a:where(:hover, :focus-visible) {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.12em;
}

/* Smooth jumps to in-page links, unless the visitor prefers less motion. */
@media (prefers-reduced-motion: no-preference) {

	html {
		scroll-behavior: smooth;
	}
}

/* Ruled list: one item per ruled row with a plus marker. */
.wp-block-list.is-style-ruled {
	list-style: none;
	padding-inline-start: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

/*
 * The marker is positioned, not a flex item, so bold text and links inside an
 * item stay in one line of text.
 */
.wp-block-list.is-style-ruled li {
	position: relative;
	padding-block: 0.65em;
	padding-inline: 1.4em 0;
	border-top: 1px solid var(--wp--preset--color--line);
}

.wp-block-list.is-style-ruled li::before {
	content: "+";
	position: absolute;
	inset-inline-start: 0;
	font-family: var(--wp--preset--font-family--mono);
	color: var(--wp--preset--color--accent);
}

/*
 * Index list: in-page contents in the heading font, one ruled row per link,
 * arrow at the end.
 */
.wp-block-list.is-style-index {
	list-style: none;
	padding-inline-start: 0;
	border-top: 1px solid currentcolor;
}

.wp-block-list.is-style-index li {
	border-bottom: 1px solid var(--wp--preset--color--line);
	font-family: var(--wp--preset--font-family--heading);
	font-stretch: var(--wp--custom--heading-stretch, 100%);
	font-size: var(--wp--preset--font-size--large);
	font-weight: var(--wp--custom--heading--weight, 800);
	line-height: 1.1;
	text-transform: var(--wp--custom--heading--transform, uppercase);
}

.wp-block-list.is-style-index li a {
	display: flex;
	justify-content: space-between;
	gap: 1em;
	padding: 0.7em 0;
	text-decoration: none;
}

.wp-block-list.is-style-index li a::after {
	content: "\2192";
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 400;
	color: var(--wp--preset--color--accent);
}

.rtl .wp-block-list.is-style-index li a::after {
	content: "\2190";
}

/*
 * Phone numbers read left to right in every language, so "+1 555 0100" never
 * shows reversed on right-to-left sites.
 */
a[href^="tel:"] {
	direction: ltr;
	unicode-bidi: isolate;
}

/*
 * Columns reversed on desktop only, so phones always show the first column (the
 * photo) first.
 */
@media (min-width: 782px) {

	.wp-block-columns.is-style-reverse {
		flex-direction: row-reverse;
	}
}

/* Comparison table: ruled rows, label column left, options centered. */
.wp-block-table.is-style-matrix th,
.wp-block-table.is-style-matrix td {
	border: 0;
	border-bottom: 1px solid color-mix(in srgb, currentcolor 24%, transparent);
	padding: 0.85em 0.75em;
	text-align: center;
	word-break: normal;
	overflow-wrap: normal;
}

.wp-block-table.is-style-matrix th:first-child,
.wp-block-table.is-style-matrix td:first-child {
	text-align: start;
	padding-inline-start: 0;
}

.wp-block-table.is-style-matrix thead th {
	border-bottom: 2px solid currentcolor;
	font-family: var(--wp--preset--font-family--heading);
	font-stretch: var(--wp--custom--heading-stretch, 100%);
	font-size: 1.125rem;
	font-weight: var(--wp--custom--heading--weight, 800);
	text-transform: var(--wp--custom--heading--transform, uppercase);
	vertical-align: bottom;
}

/*
 * Comparison and register tables on small screens: natural column widths,
 * sideways scroll inside the table box.
 */
@media (max-width: 781px) {

	.wp-block-table.is-style-matrix table {
		table-layout: auto;
		min-width: 38rem;
	}
}

/*
 * Full-width photo bands: content spans the page width box even when pinned to
 * a corner (core shrinks it to fit otherwise).
 */
.wp-block-cover.alignfull.has-custom-content-position.has-custom-content-position > .wp-block-cover__inner-container {
	width: 100%;
}

/*
 * Footer menu on phones: start from the left so a wrapped item never hangs
 * alone on the right.
 */
@media (max-width: 599px) {

	footer .wp-block-navigation.is-content-justification-right .wp-block-navigation__container,
	footer .wp-block-navigation.is-content-justification-right {
		justify-content: flex-start;
	}
}

/*
 * Night sections and night cards: figures, list markers and rules switch to
 * their night colors.
 */
.is-style-section-night .is-style-figure {
	color: var(--wp--preset--color--highlight);
}

.is-style-section-night .wp-block-list.is-style-ruled,
.is-style-section-night .wp-block-list.is-style-ruled li {
	border-color: var(--wp--preset--color--night-line);
}

.is-style-section-night .wp-block-list.is-style-ruled li::before {
	color: var(--wp--preset--color--highlight);
}

/*
 * Forms: one look for every form field, from any source (comments, search, form
 * plugins).
 * Built only from the active style's presets, so every style variation restyles
 * forms too.
 *
 */
:where(form) label,
:where(form) legend {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: var(--wp--custom--label-tracking, 0.1em);
	text-transform: uppercase;
	line-height: 1.4;
}

:where(form) :is(input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="reset"], [type="hidden"], [type="file"], [type="range"], [type="color"]), select, textarea) {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	padding: 0.8em 0.9em;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.4;
	color: var(--wp--preset--color--contrast);
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--contrast);
	border-radius: var(--wp--custom--radius--control, 0);
	box-shadow: none;
}

:where(form) textarea {
	min-height: 8em;
}

:where(form) :is(input, select, textarea):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/*
 * On dark bands the focus ring uses the highlight color, so it keeps 3:1
 * against the band.
 */
:is(.is-style-section-night, .is-style-over-photo) :where(form) :is(input, select, textarea):focus-visible {
	outline-color: var(--wp--preset--color--highlight);
}

/*
 * On highlight panels the focus ring uses the night color, like the text there.
 */
.has-highlight-background-color :is(.wp-element-button, .wp-block-button__link):focus,
.has-highlight-background-color :where(form) :is(input, select, textarea):focus-visible {
	outline-color: var(--wp--preset--color--night);
}

:where(form) ::placeholder {
	color: var(--wp--preset--color--muted);
	opacity: 1;
}

:where(form) :is(input[type="checkbox"], input[type="radio"]) {
	accent-color: var(--wp--preset--color--contrast);
	width: 1.1em;
	height: 1.1em;
}

:where(form) :is(input[type="submit"], button[type="submit"]):not(.wp-block-search__button) {
	display: inline-block;
	width: auto;
	padding: 1.05em 1.6em;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1;
	text-transform: uppercase;
	color: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--contrast);
	border: 1px solid var(--wp--preset--color--contrast);
	border-radius: var(--wp--custom--radius--control, 0);
	cursor: pointer;
}

:where(form) :is(input[type="submit"], button[type="submit"]):not(.wp-block-search__button):hover {
	color: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
}

/* Form panel: the slot in contact patterns where a form plugin's block goes. */
.is-style-form-panel :where(form) {
	margin: 0;
}

/*
 * Checkbox and radio labels read as sentences (consent lines), so they use the
 * body font, not the small label style.
 */
:where(form) label:has(> input[type="checkbox"], > input[type="radio"]),
:where(form) :is(input[type="checkbox"], input[type="radio"]) + label,
:where(form) :is(input[type="checkbox"], input[type="radio"]) ~ span {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	line-height: 1.5;
}

/*
 * One height for every single-line field and dropdown, whatever the browser's
 * own sizing (date fields and selects differ).
 */
:where(form) :is(input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="reset"], [type="hidden"], [type="file"], [type="range"], [type="color"]), select:not([multiple])) {
	height: calc(1.4em + 1.6em + 2px);
}

/*
 * File uploads: the choose button looks like an outline button, the file name
 * like a label.
 */
:where(form) input[type="file"] {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted);
	max-width: 100%;
}

:where(form) input[type="file"]::file-selector-button {
	margin-inline-end: 1em;
	padding: 0.85em 1.3em;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--contrast);
	background: transparent;
	border: 1px solid var(--wp--preset--color--contrast);
	border-radius: var(--wp--custom--radius--control, 0);
	cursor: pointer;
}

:where(form) input[type="file"]::file-selector-button:hover {
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--contrast);
}

/* Sliders follow the style's color. */
:where(form) input[type="range"] {
	accent-color: var(--wp--preset--color--contrast);
	width: 100%;
}

/*
 * Invalid fields in any form that marks them with aria-invalid (core comments,
 * Jetpack Forms, most plugins): accent border.
 */
:where(form) :is(input, textarea, select)[aria-invalid="true"]:not([type="checkbox"], [type="radio"]) {
	border-color: var(--wp--preset--color--accent);
}

/*
 * Framed image: the 1px frame sits on the outer box, 10px from the photo, so
 * its edge lines up with the text beside and above it.
 */
.wp-block-image.is-style-framed {
	border: 1px solid var(--wp--preset--color--contrast);
}

.is-style-section-night .wp-block-image.is-style-framed {
	border-color: var(--wp--preset--color--night-line);
}

/*
 * Meta lines (dates, categories, tags, comment links): links underline only on
 * hover or focus, like heading links.
 */
.is-style-eyebrow a {
	color: inherit;
	text-decoration: none;
}

.is-style-eyebrow a:is(:hover, :focus) {
	text-decoration: underline;
}

/*
 * Pagination for posts and comments: label style, every link at least 2.5rem
 * tall; page numbers are square cells, the current page filled.
 */
:is(.wp-block-query-pagination, .wp-block-comments-pagination) {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: var(--wp--custom--label-tracking, 0.1em);
	text-transform: uppercase;
}

:is(.wp-block-query-pagination, .wp-block-comments-pagination) a {
	display: inline-flex;
	align-items: center;
	min-height: 2.5rem;
	text-decoration: none;
}

:is(.wp-block-query-pagination, .wp-block-comments-pagination) a:is(:hover, :focus) {
	text-decoration: underline;
}

:is(.wp-block-query-pagination-numbers, .wp-block-comments-pagination-numbers) {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}

:is(.wp-block-query-pagination-numbers, .wp-block-comments-pagination-numbers) .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	min-height: 2.5rem;
	padding: 0 0.5rem;
	border: 1px solid var(--wp--preset--color--line);
	letter-spacing: 0;
}

:is(.wp-block-query-pagination-numbers, .wp-block-comments-pagination-numbers) .page-numbers.current {
	color: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
}

:is(.wp-block-query-pagination-numbers, .wp-block-comments-pagination-numbers) .page-numbers.dots {
	border-color: transparent;
}

/*
 * Previous and next post: a small label above the post title in the heading
 * style; next sits on the right.
 */
.plinth-post-nav > .wp-block-post-navigation-link {
	flex: 1 1 16rem;
	min-width: 0;
	max-width: 28rem;
}

.plinth-post-nav > .post-navigation-link-next {
	margin-inline-start: auto;
	text-align: end;
}

.wp-block-post-navigation-link a {
	display: block;
	text-decoration: none;
}

.wp-block-post-navigation-link .post-navigation-link__label {
	display: block;
	margin-bottom: 0.5em;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: var(--wp--custom--label-tracking, 0.1em);
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.wp-block-post-navigation-link .post-navigation-link__title {
	font-family: var(--wp--preset--font-family--heading);
	font-stretch: var(--wp--custom--heading-stretch, 100%);
	font-size: var(--wp--preset--font-size--large);
	font-weight: var(--wp--custom--heading--weight, 800);
	line-height: 1.1;
	text-transform: var(--wp--custom--heading--transform, uppercase);
}

.wp-block-post-navigation-link a:is(:hover, :focus) .post-navigation-link__title {
	text-decoration: underline;
}

/*
 * Page patterns open with a full-width section that holds the page's own H1.
 * On such a page the template title steps aside, so the page keeps one H1 and
 * the opening section meets the header. A full-width section at the end meets
 * the footer with no gap. This matches the Page without title template.
 */
body.page main:has(> .wp-block-post-content > .alignfull:first-child h1) > .wp-block-post-title {
	display: none;
}

body.page main:has(> .wp-block-post-content > .alignfull:first-child h1) > .wp-block-post-content {
	margin-block-start: 0;
}

body.page main:has(> .wp-block-post-content > .alignfull:first-child h1) {
	padding-top: 0 !important;
}

body.page main:has(> .wp-block-post-content > .alignfull:last-child) {
	padding-bottom: 0 !important;
}

/*
 * Article scale for single posts: headings and quotes inside the post step down
 * so the title stays the largest line. Content that opens with a full-width
 * section holding its own H1 (the page patterns) keeps its designed scale.
 */
.plinth-prose:not(:has(> .alignfull:first-child h1)) h2 {
	margin-top: var(--wp--preset--spacing--50);
	font-size: var(--wp--preset--font-size--x-large);
}

.plinth-prose:not(:has(> .alignfull:first-child h1)) h3 {
	margin-top: var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--large);
}

.plinth-prose:not(:has(> .alignfull:first-child h1)) :is(h4, h5, h6) {
	margin-top: var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--medium);
}

.plinth-prose:not(:has(> .alignfull:first-child h1)) .wp-block-quote {
	margin-block: var(--wp--preset--spacing--50);
	font-size: var(--wp--preset--font-size--large);
}

/*
 * In articles (posts, and pages that show a title) quotes keep the heading font
 * but read in sentence case,
 * so a long quote stays easy to read. Quotes from the classic editor get the
 * same look.
 */
.plinth-prose:not(:has(> .alignfull:first-child h1)) :is(.wp-block-quote, blockquote:not([class])) {
	text-transform: none;
}

.plinth-prose:not(:has(> .alignfull:first-child h1)) blockquote:not([class]) {
	margin-block: var(--wp--preset--spacing--50);
	margin-inline: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-stretch: var(--wp--custom--heading-stretch, 100%);
	font-size: var(--wp--preset--font-size--large);
	font-weight: var(--wp--custom--heading--weight, 800);
	line-height: 1.1;
}

/*
 * Tables from the classic editor or plain HTML: ruled rows, like the table
 * block.
 */
:is(.wp-block-post-content, .wp-block-comment-content) > table {
	width: 100%;
	border-collapse: collapse;
}

:is(.wp-block-post-content, .wp-block-comment-content) > table :is(th, td) {
	padding-block: 0.6em;
	padding-inline: 0 1em;
	border-bottom: 1px solid var(--wp--preset--color--line);
	text-align: start;
	vertical-align: top;
}

.plinth-prose:not(:has(> .alignfull:first-child h1)) :is(ul, ol):not([class*="is-style-"]) {
	padding-inline-start: 1.25em;
}

.plinth-prose:not(:has(> .alignfull:first-child h1)) :is(ul, ol):not([class*="is-style-"]) li + li {
	margin-top: 0.4em;
}

/*
 * Numbered lists inside a comment keep their numbers. Core hides list markers
 * on every list in the comment thread, which is meant for the reply lists only.
 */
.wp-block-comment-template .wp-block-comment-content ol {
	list-style-type: decimal;
}

/* Quote citations read as a plain label, not italic. */
.wp-block-quote cite {
	font-style: normal;
}

/*
 * Meta and standalone links (terms, dates, author names and photos, comment
 * actions, read more, log in, calendar months, file names) are at least 24px
 * tall to tap.
 */
:is(.wp-block-post-terms, .wp-block-post-date, .wp-block-post-author-name, .wp-block-avatar, .wp-block-comment-date, .wp-block-comment-reply-link, .wp-block-comment-edit-link, .wp-block-loginout, .wp-calendar-nav, .wp-block-file) a,
a.wp-block-read-more {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
}

/*
 * Gallery captions sit under each photo as a small label, not over the photo on
 * a dark fade.
 */
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption.wp-element-caption {
	position: static;
	flex: none;
	max-height: none;
	margin: 0.6em 0 0;
	padding: 0;
	overflow: visible;
	font-size: 0.75rem;
	line-height: 1.4;
	text-align: start;
	text-shadow: none;
	color: var(--wp--preset--color--muted);
	background: none;
}

.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before,
.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::after {
	display: none;
}

.is-style-section-night .wp-block-gallery.has-nested-images figure.wp-block-image figcaption.wp-element-caption {
	color: var(--wp--preset--color--night-muted);
}

/*
 * Legal page: the list of links stays in view while the text scrolls (desktop
 * only); links in the label style, numbered.
 */
@media (min-width: 782px) {

	.plinth-sticky {
		position: sticky;
		top: var(--wp--preset--spacing--40);
	}
}

.plinth-toc {
	margin: 0;
	padding-inline-start: 2.5em;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	letter-spacing: var(--wp--custom--label-tracking, 0.1em);
	text-transform: uppercase;
}

.plinth-toc li {
	padding-inline-start: 0.25em;
}

.plinth-toc li::marker {
	color: var(--wp--preset--color--accent);
}

.plinth-toc a {
	display: inline-block;
	padding-block: 0.45em;
	text-decoration: none;
}

.plinth-toc a:is(:hover, :focus) {
	text-decoration: underline;
}

/*
 * Wide template: blocks take the wide width by default, while text keeps its
 * reading width.
 */
.plinth-wide > :is(p, h1, h2, h3, h4, h5, h6, ul, ol, dl, blockquote, .wp-block-details, .wp-block-buttons) {
	max-width: var(--wp--style--global--content-size);
}

/*
 * Author box on posts: the photo keeps its size; the name and bio sit beside
 * it, or below it on narrow screens.
 */
.plinth-author > .wp-block-avatar {
	flex-shrink: 0;
}

.plinth-author > :not(.wp-block-avatar) {
	flex: 1 1 16rem;
}

.plinth-author .wp-block-post-author-name a {
	text-decoration: none;
}

.plinth-author .wp-block-post-author-name a:is(:hover, :focus) {
	text-decoration: underline;
}

/*
 * Section headings with an anchor leave room above them when reached from a
 * link.
 */
.plinth-prose:not(:has(> .alignfull:first-child h1)) :is(h2, h3)[id] {
	scroll-margin-top: var(--wp--preset--spacing--40);
}

/*
 * Menu links: underline on hover and focus; the current page keeps an accent
 * underline.
 */
.wp-block-navigation .wp-block-navigation-item__content {
	text-underline-offset: 0.45em;
	text-decoration-thickness: 1px;
}

.wp-block-navigation .wp-block-navigation-item__content:is(:hover, :focus) {
	text-decoration: underline;
}

.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation .wp-block-navigation-item__content[aria-current="page"] {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--accent);
	text-decoration-thickness: 2px;
}

/*
 * Phone menu: opens on the page color with the same side padding as the page;
 * items are large, left aligned and ruled.
 */

/*
 * Core's overlay rules carry :not(.disable-default-overlay), so these match
 * that strength.
 */
.wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	text-align: start;
}

.wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation__responsive-container-content {
	--navigation-layout-justification-setting: stretch;
	padding-top: var(--wp--preset--spacing--60);
	align-items: stretch;
}

.wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation__responsive-container-content :is(.wp-block-navigation__container, .wp-block-navigation-item) {
	--navigation-layout-justification-setting: stretch;
	align-items: stretch;
}

.wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation__container {
	width: 100%;
	gap: 0;
	border-top: 1px solid var(--wp--preset--color--line);
}

/*
 * One rule under every menu row, child pages included, so nested pages never
 * get a double line. Custom overlays (template parts) keep their own design.
 */
.wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding-block: 0.45em;
	font-family: var(--wp--preset--font-family--heading);
	font-stretch: var(--wp--custom--heading-stretch, 100%);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: var(--wp--custom--heading--weight, 800);
	line-height: 1.1;
	letter-spacing: 0;
	text-align: start;
	text-transform: var(--wp--custom--heading--transform, uppercase);
}

/* Child pages in the phone menu: indented under their parent, one size down. */
.wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation__responsive-container-content .has-child .wp-block-navigation__submenu-container {
	padding: 0;
	padding-inline-start: 1em;
}

.wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	box-sizing: border-box;
	padding-inline: 0;
	font-size: var(--wp--preset--font-size--large);
}

/*
 * Close button of a custom menu overlay: takes the text color around it (a
 * plain button would stay black on dark bands) and is at least 24px to tap.
 */
button.wp-block-navigation-overlay-close {
	min-width: 24px;
	min-height: 24px;
	color: inherit;
}

/*
 * Terms Query lists: a term's name and count share a line, its description
 * sits under them.
 */
.wp-block-term-template > li {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25em 0.5em;
}

.wp-block-term-template > li > * {
	margin: 0;
}

.wp-block-term-template > li > .wp-block-term-description {
	flex-basis: 100%;
}

.wp-block-navigation__responsive-container-close,
.wp-block-navigation__responsive-container-open {
	min-width: 24px;
	min-height: 24px;
}

/*
 * Social icons (logos only): drawn in the surrounding text color instead of
 * each brand's color, accent on hover; at least 24px to tap.
 */
.wp-block-social-links.is-style-logos-only:not(.has-icon-color) .wp-social-link {
	color: inherit;
}

.wp-block-social-links.is-style-logos-only:not(.has-icon-color) .wp-social-link:is(:hover, :focus-within) {
	color: var(--wp--preset--color--accent);
}

.is-style-section-night .wp-block-social-links.is-style-logos-only:not(.has-icon-color) .wp-social-link:is(:hover, :focus-within) {
	color: var(--wp--preset--color--highlight);
}

.wp-block-social-links .wp-social-link a {
	min-width: 24px;
	min-height: 24px;
	align-items: center;
	justify-content: center;
}

/*
 * Logo images: one height, never stretched; the Logo duotone on each image
 * draws them in the text color of the scheme, and night bands turn them light.
 */
.wp-block-image.is-style-logo {
	margin: 0;
}

.wp-block-image.is-style-logo img {
	width: auto;
	max-width: 100%;
	height: 2rem;
	object-fit: contain;
	opacity: 0.85;
}

.is-style-section-night .wp-block-image.is-style-logo img {
	filter: grayscale(1) invert(1);
}

/*
 * Scrolling row: a centered row that wraps until the script runs (or for
 * reduced motion); then a loop with faded ends that pauses on hover.
 */
.is-style-marquee > .wp-block-group {
	justify-content: center;
}

.is-style-marquee.is-running {
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.is-style-marquee.is-running .plinth-marquee-track {
	display: flex;
	width: max-content;
	animation: plinth-marquee 40s linear infinite;
}

/*
 * Right-to-left pages lay the row out from the right, so the copy sits on the
 * left and the row travels right.
 */
.rtl .is-style-marquee.is-running .plinth-marquee-track {
	--plinth-marquee-shift: 50%;
}

.is-style-marquee.is-running .plinth-marquee-track > .wp-block-group {
	flex-wrap: nowrap;
	justify-content: flex-start;
}

.is-style-marquee.is-running:hover .plinth-marquee-track {
	animation-play-state: paused;
}

@keyframes plinth-marquee {

	to {
		transform: translateX(var(--plinth-marquee-shift, -50%));
	}
}


/*
 * Sticky header: when the header's outer group uses the "Sticky" style, the
 * header stays at the top while the page scrolls, on the page color.
 * (The admin bar scrolls away on phones, so the offset drops to 0 there.)
 */
.wp-site-blocks > header:has(> .is-style-sticky) {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
}

.is-style-sticky {
	background-color: var(--wp--preset--color--base);
}

@media (max-width: 600px) {

	.admin-bar .wp-site-blocks > header:has(> .is-style-sticky) {
		top: 0;
	}
}

/*
 * Centered stacks (the centered header): a site title or tagline that wraps
 * keeps its lines centered.
 */
.is-layout-flex.is-vertical.is-content-justification-center > :is(.wp-block-site-title, .wp-block-site-tagline) {
	text-align: center;
}

/*
 * Header over a photo: on a page whose content opens with a full photo (the
 * "Header over photo" template, or any page
 * without a title above its content), the header floats over the photo on a
 * soft dark fade. Anywhere else it stays
 * a night band, so its light text never lands on the page color.
 */
.wp-site-blocks:has(> main > .wp-block-post-content:first-child > .wp-block-cover:first-child) > header:has(> .is-style-over-photo) {
	position: absolute;
	inset-inline: 0;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
}

.wp-site-blocks:has(> main > .wp-block-post-content:first-child > .wp-block-cover:first-child) > header > .is-style-over-photo {
	background: linear-gradient(color-mix(in srgb, var(--wp--preset--color--night) 70%, transparent), transparent);
}

/*
 * The photo's content keeps clear of the floating header, even when a short
 * screen leaves no room above it.
 */
.wp-site-blocks:has(> header > .is-style-over-photo) > main > .wp-block-post-content:first-child > .wp-block-cover:first-child > .wp-block-cover__inner-container {
	margin-top: var(--wp--preset--spacing--50);
}

/*
 * Menus on dark bands: the current page is underlined in the light highlight
 * color instead of the accent.
 */

/* (The phone menu opens on the page color, so it keeps the accent.) */
:is(.is-style-section-night, .is-style-over-photo) :is(.current-menu-item > .wp-block-navigation-item__content, .wp-block-navigation-item__content[aria-current="page"]):not(.is-menu-open *) {
	text-decoration-color: var(--wp--preset--color--highlight);
}

/*
 * Hero bento: four columns on desktop (photo two wide and two tall), two on
 * tablets, one on phones.
 */
.plinth-bento.is-layout-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1023px) {

	.plinth-bento.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.plinth-bento.is-layout-grid > .plinth-bento-photo,
	.plinth-bento.is-layout-grid > .is-style-section-night {
		grid-column: span 2;
		grid-row: span 1;
	}
}

@media (max-width: 599px) {

	.plinth-bento.is-layout-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.plinth-bento.is-layout-grid > * {
		grid-column: auto;
		grid-row: auto;
	}

	.plinth-bento.is-layout-grid > .plinth-bento-photo {
		min-height: 20rem !important;
	}
}

/*
 * Split band: the photo column fills its half edge to edge; on phones the photo
 * sits on top at a shorter height.
 */
.plinth-split > .wp-block-column:first-child {
	display: flex;
}

.plinth-split > .wp-block-column:first-child > .plinth-split-photo {
	flex: 1;
}

@media (max-width: 781px) {

	.plinth-split > .wp-block-column:first-child > .plinth-split-photo {
		min-height: 18rem !important;
	}
}

/*
 * Comment form consent line: the box lines up with the fields' left edge and
 * sits on the first line of the text (which may wrap on phones).
 */
.comment-form .comment-form-cookies-consent {
	align-items: flex-start;
	gap: 0.6em;
}

.comment-form .comment-form-cookies-consent input[type="checkbox"],
.comment-form .comment-form-cookies-consent #wp-comment-cookies-consent {
	flex: none;
	width: 1.125rem;
	height: 1.125rem;
	margin: 0.1rem 0 0;
}

/*
 * Core blocks: every block in the inserter follows the theme instead of browser
 * or core defaults.
 * Rules use the line, surface and muted colors, or a mix of the current text
 * color where a block can sit on a dark band.
 *
 */

/*
 * Separator: one thin rule (core's default border is cleared first); the dots
 * style uses the muted color so it stays visible.
 */
.wp-block-separator:not(.is-style-dots) {
	border: 0;
	border-top: 1px solid currentcolor;
}

.wp-block-separator.is-style-dots:not(.has-text-color)::before {
	color: var(--wp--preset--color--muted);
}

.is-style-section-night .wp-block-separator.is-style-dots:not(.has-text-color)::before {
	color: var(--wp--preset--color--night-muted);
}

/*
 * Accordion: ruled rows like the questions sections, titles in the large
 * heading size, plus sign in the mono face.
 */
.wp-block-accordion .wp-block-accordion-item {
	margin-block: 0;
	border-top: 1px solid color-mix(in srgb, currentcolor 24%, transparent);
}

.wp-block-accordion .wp-block-accordion-item:last-child {
	border-bottom: 1px solid color-mix(in srgb, currentcolor 24%, transparent);
}

.wp-block-accordion .wp-block-accordion-heading {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.1;
}

.wp-block-accordion .wp-block-accordion-heading__toggle {
	padding-block: 1.1em;
}

.wp-block-accordion .wp-block-accordion-heading__toggle-icon {
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 400;
}

.wp-block-accordion .wp-block-accordion-panel {
	padding-block-end: 1.1em;
}

/* Details (default style): the summary reads as a small heading. */
.wp-block-details summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--heading);
	font-stretch: var(--wp--custom--heading-stretch, 100%);
	font-weight: var(--wp--custom--heading--weight, 800);
	text-transform: var(--wp--custom--heading--transform, uppercase);
}

/*
 * Tables: cell rules follow the text color at low strength, so they work on
 * light and dark bands; stripes use the same mix.
 */
.wp-block-table table :is(th, td) {
	border-color: color-mix(in srgb, currentcolor 24%, transparent);
}

.wp-block-table.is-style-stripes {
	border-bottom-color: color-mix(in srgb, currentcolor 24%, transparent);
}

.wp-block-table.is-style-stripes:not(.has-background) tbody tr:nth-child(odd) {
	background-color: color-mix(in srgb, currentcolor 6%, transparent);
}

/*
 * Calendar: palette colors instead of core's gray, mono numbers, the month as a
 * label.
 */
.wp-block-calendar .wp-calendar-table {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8125rem;
}

.wp-block-calendar .wp-calendar-table:not(.has-text-color) {
	color: inherit;
}

.wp-block-calendar .wp-calendar-table:not(.has-text-color) :is(th, td) {
	border-color: color-mix(in srgb, currentcolor 24%, transparent);
}

.wp-block-calendar .wp-calendar-table:not(.has-background) th {
	background: color-mix(in srgb, currentcolor 6%, transparent);
}

.wp-block-calendar .wp-calendar-table :is(th, td) {
	padding: 0.5em 0.25em;
}

.wp-block-calendar .wp-calendar-table caption,
.wp-block-calendar .wp-calendar-nav {
	margin-block: 0.5em;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	letter-spacing: var(--wp--custom--label-tracking, 0.1em);
	text-transform: uppercase;
}

/*
 * Inline code inside text: a light tint behind it. Code blocks have their own
 * panel (theme.json).
 */
:where(p, li, td, dd, figcaption) code {
	padding: 0.1em 0.35em;
	font-size: 0.875em;
	background: color-mix(in srgb, currentcolor 8%, transparent);
	border-radius: 2px;
}

/*
 * Lists of posts and comments: titles in the heading style, dates and names as
 * mono labels.
 */
.wp-block-latest-posts .wp-block-latest-posts__post-title {
	font-family: var(--wp--preset--font-family--heading);
	font-stretch: var(--wp--custom--heading-stretch, 100%);
	font-size: var(--wp--preset--font-size--large);
	font-weight: var(--wp--custom--heading--weight, 800);
	line-height: 1.1;
	text-decoration: none;
	text-transform: var(--wp--custom--heading--transform, uppercase);
}

.wp-block-latest-posts .wp-block-latest-posts__post-title:is(:hover, :focus) {
	text-decoration: underline;
}

:is(.wp-block-latest-posts__post-date, .wp-block-latest-posts__post-author, .wp-block-latest-comments__comment-date) {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	letter-spacing: var(--wp--custom--label-tracking, 0.1em);
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

/*
 * Post titles in a query loop default to a card size; a size chosen on the
 * block still wins.
 */
.wp-block-post-template .wp-block-post-title {
	font-size: var(--wp--preset--font-size--x-large);
}

/*
 * Read more, breadcrumbs and tabs: mono labels like the rest of the theme's
 * small links.
 */
.wp-block-read-more,
.wp-block-breadcrumbs,
.wp-block-tab-list [role="tab"] {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	letter-spacing: var(--wp--custom--label-tracking, 0.1em);
	text-transform: uppercase;
}

.wp-block-read-more {
	text-decoration: none;
}

.wp-block-read-more:is(:hover, :focus) {
	text-decoration: underline;
}

/* Footnotes: one step smaller than the text. */
.wp-block-footnotes {
	font-size: var(--wp--preset--font-size--small);
}
