/*
Theme Name: Wanderlust Muse
Theme URI: https://thewanderlustmuse.com/
Author: The Wanderlust Muse
Author URI: https://thewanderlustmuse.com/
Description: The Wanderlust Muse — a native full-site-editing block theme for a travel publication about timing: where to be, and when. Faithful conversion of the TWM Colonnade design system: Ivar serifs, hairline rules, square corners, a transparent-to-solid masthead, a full-screen menu drawer, and the fixed-footer reveal.
Requires at least: 7.0
Tested up to: 7.0
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: wanderlust-muse
Tags: blog, news, one-column, custom-colors, custom-logo, custom-menu, editor-style, featured-images, full-site-editing, block-patterns, block-styles, translation-ready
*/

/* =========================================================================
   1. Foundations
   ========================================================================= */

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	overflow-x: clip;
}

img {
	max-width: 100%;
	height: auto;
}

/* The design's breakpoint gutters: 80 → 24 → 18. The gutter preset is the
   single source; breakpoints below pin it to the design's exact steps. */
@media (max-width: 1024px) {
	body {
		--wp--preset--spacing--gutter: 24px;
	}
}

@media (max-width: 640px) {
	body {
		--wp--preset--spacing--gutter: 18px;
	}
}

/* Meta grammar — one class, reused everywhere the design uses the 12/16.8/+2 line. */
.twm-meta,
.twm-meta a {
	font-family: var(--wp--preset--font-family--meta);
	font-size: var(--wp--preset--font-size--meta);
	line-height: var(--wp--custom--type--meta--line-height);
	letter-spacing: var(--wp--custom--type--meta--letter-spacing);
	text-transform: uppercase;
	font-weight: 400;
}

.twm-meta a {
	text-decoration: none;
}

.twm-meta a:hover,
.twm-meta a:focus-visible {
	text-decoration: underline;
}

.twm-secondary {
	color: var(--wp--preset--color--secondary);
}

.twm-muted {
	color: var(--wp--preset--color--muted);
}

.twm-sep {
	opacity: 0.6;
}

/* Serif display ladder helpers */
.twm-display {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--display);
	line-height: var(--wp--custom--type--display--line-height);
	letter-spacing: var(--wp--custom--type--display--letter-spacing);
	font-weight: 400;
	text-wrap: pretty;
}

.twm-card-title,
.twm-card-title a {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--card);
	line-height: var(--wp--custom--type--card--line-height);
	letter-spacing: var(--wp--custom--type--card--letter-spacing);
	font-weight: 400;
	text-decoration: none;
	text-wrap: pretty;
}

/* Flourish heading block style: italic, lowercase serif */
.is-style-twm-flourish {
	font-family: var(--wp--preset--font-family--display) !important;
	font-style: italic;
	font-weight: 400;
	font-size: var(--wp--preset--font-size--section);
	line-height: var(--wp--custom--type--section--line-height);
	letter-spacing: var(--wp--custom--type--section--letter-spacing);
	margin: 0;
}

/* Hairline + ink separators */
.wp-block-separator {
	border: 0;
	height: 1px;
	background: var(--wp--preset--color--hairline);
	opacity: 1;
	margin: 0;
	width: 100%;
}

.wp-block-separator.is-style-twm-ink-rule {
	width: 96px;
	height: 2px;
	background: var(--wp--preset--color--ink);
}

/* Buttons: outline chip is the element default (theme.json). Contexts: */
.wp-block-button__link {
	border-radius: 0;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.is-style-twm-solid .wp-block-button__link {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--label);
	letter-spacing: 0.3px;
	padding: 0 24px;
	min-height: 30px;
	display: inline-flex;
	align-items: center;
	text-transform: none;
}

.is-style-twm-solid .wp-block-button__link:hover,
.is-style-twm-solid .wp-block-button__link:focus-visible {
	opacity: 0.8;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
}

/* Chips on ink surfaces invert to white */
.twm-ink .wp-block-button__link {
	color: var(--wp--preset--color--white);
	border-color: var(--wp--custom--color--on-ink--chip-border);
}

.twm-ink .wp-block-button__link:hover,
.twm-ink .wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
}

/* Focus visibility (matches button pseudo styling tone) */
:where(a, button, input, [tabindex]):focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Reduced motion: collapse every transition/animation the theme declares */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}

/* =========================================================================
   2. Frame + section rhythm
   ========================================================================= */

.twm-head-top {
	padding-top: var(--wp--custom--spacing--head-top);
}

.twm-section {
	padding-top: var(--wp--custom--spacing--section-gap);
}

/* Fixed-header offset for inner pages (solid chrome: 76 + 46 rows). */
.twm-page-top {
	padding-top: 122px;
}

@media (max-width: 1024px) {
	.twm-page-top {
		padding-top: 72px;
	}

	.twm-head-top {
		padding-top: 150px;
	}

	.twm-section {
		padding-top: 56px;
	}
}

@media (max-width: 640px) {
	.twm-head-top {
		padding-top: 128px;
	}

	.twm-section {
		padding-top: 44px;
	}
}

/* =========================================================================
   3. Header
   ========================================================================= */

.twm-header {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	left: 0;
	right: 0;
	z-index: 20;
	background: var(--wp--preset--color--paper);
	color: var(--wp--custom--color--header-solid-text);
	transition: background-color 0.25s ease, color 0.25s ease;
}

.twm-header a {
	color: inherit;
	text-decoration: none;
}

.twm-header-row {
	height: var(--wp--custom--spacing--header-row-solid);
	padding: 0 44px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: relative;
	transition: height 0.25s ease;
}

.twm-header-tools {
	display: flex;
	align-items: center;
	gap: 30px;
}

.twm-header-spacer {
	width: 52px;
	flex: none;
}

/* Centered logo/title lockup */
.twm-header-brand {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.twm-header-brand .wp-block-site-logo {
	margin: 0;
}

.twm-header-brand .wp-block-site-logo img {
	display: block;
	width: 80px;
	height: 28px;
	object-fit: contain;
}

/* Monochrome logo inverts over dark heroes via filter (single asset). */
.twm-header-brand .wp-block-site-title {
	margin: 0;
	white-space: nowrap;
}

/* Search icon link (accessible name in markup) */
.twm-search-link {
	display: flex;
	align-items: center;
}

.twm-search-link svg {
	display: block;
}

/* Burger: core Navigation open button restyled to the two-line glyph */
.twm-burger .wp-block-navigation__responsive-container-open {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: 5px;
	width: 30px;
	min-height: 44px;
	padding: 0;
	margin: 0;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
}

.twm-burger .wp-block-navigation__responsive-container-open svg {
	display: none;
}

.twm-burger .wp-block-navigation__responsive-container-open::before,
.twm-burger .wp-block-navigation__responsive-container-open::after {
	content: "";
	display: block;
	height: 1.4px;
	background: currentColor;
}

.twm-burger .wp-block-navigation__responsive-container-open::before {
	width: 22px;
}

.twm-burger .wp-block-navigation__responsive-container-open::after {
	width: 14px;
}

/* Shelf strip (row two) */
.twm-header-nav {
	height: var(--wp--custom--spacing--header-nav-solid);
	padding: 0 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-bottom: 1px solid var(--wp--preset--color--hairline);
	transition: height 0.25s ease, border-color 0.25s ease;
}

.twm-header-nav .wp-block-navigation {
	height: 100%;
}

.twm-header-nav .wp-block-navigation__container {
	gap: 42px;
	height: 100%;
	align-items: stretch;
	flex-wrap: nowrap;
}

.twm-header-nav .wp-block-navigation-item {
	position: static;
	display: flex;
	align-items: center;
}

.twm-header-nav .wp-block-navigation-item > a {
	position: relative;
	display: flex;
	align-items: center;
	height: 100%;
	white-space: nowrap;
	text-decoration: none;
}

.twm-header-nav .wp-block-navigation-item > a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 3px;
	background: transparent;
	transition: background-color 0.2s ease;
}

.twm-header-nav .wp-block-navigation-item > a:hover,
.twm-header-nav .wp-block-navigation-item > a:focus-visible {
	text-decoration: none;
}

.twm-header-nav .wp-block-navigation-item > a:hover::after,
.twm-header-nav .wp-block-navigation-item > a:focus-visible::after,
.twm-header-nav .wp-block-navigation-item.current-menu-item > a::after,
.twm-header-nav .wp-block-navigation-item.current-menu-ancestor > a::after {
	background: currentColor;
}

/* Mega panel: the full-width white links sheet under the header */
.twm-header-nav .wp-block-navigation__submenu-icon {
	display: none;
}

.twm-header-nav .wp-block-navigation__submenu-container {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	width: auto;
	min-width: 0;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--hairline);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	padding: 44px 44px 52px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	transition: opacity 0.15s ease;
	z-index: 5;
}

.twm-header-nav .wp-block-navigation-item.has-child:hover > .wp-block-navigation__submenu-container,
.twm-header-nav .wp-block-navigation-item.has-child:focus-within > .wp-block-navigation__submenu-container {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.twm-header-nav .wp-block-navigation__submenu-container .wp-block-navigation-item {
	display: block;
}

.twm-header-nav .wp-block-navigation__submenu-container .wp-block-navigation-item > a {
	display: inline-block;
	height: auto;
	color: var(--wp--preset--color--ink);
	padding: 0;
}

.twm-header-nav .wp-block-navigation__submenu-container .wp-block-navigation-item > a::after {
	content: none;
}

.twm-header-nav .wp-block-navigation__submenu-container .wp-block-navigation-item > a:hover,
.twm-header-nav .wp-block-navigation__submenu-container .wp-block-navigation-item > a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* First submenu entry = "All {Shelf}" gets the bold weight */
.twm-header-nav .wp-block-navigation__submenu-container > .wp-block-navigation-item:first-child > a {
	font-weight: 700;
}

/* State model, as the design defines it: pages that open with a flush hero
   (front page, hub) start transparent over the photograph and turn solid
   once the page is scrolled past 40px; every other route is solid from the
   start. The resting state is pure CSS, so it is correct without
   JavaScript — the script only reports the scroll position. */
body:has(.twm-hero-flush) .twm-header {
	background: transparent;
	color: var(--wp--preset--color--paper);
}

body:has(.twm-hero-flush) .twm-header-row {
	height: var(--wp--custom--spacing--header-row);
}

body:has(.twm-hero-flush) .twm-header-nav {
	height: var(--wp--custom--spacing--header-nav);
	border-bottom-color: var(--wp--custom--color--on-ink--nav-border);
}

/* One monochrome mark serves both states: it inverts to white over the hero. */
body:has(.twm-hero-flush) .twm-header-brand .wp-block-site-logo img {
	filter: invert(1) brightness(1.6);
}

body:has(.twm-hero-flush) .twm-header .wp-block-navigation__submenu-container {
	color: var(--wp--preset--color--ink);
}

/* Scrolled, or the mega panel open: the solid masthead returns. The design
   sets its solid flag on `y > 40 || activeMenu`, and activeMenu is only set
   by hovering or focusing a shelf that has a panel — not by the header
   generally. */
html[data-twm-scrolled] body:has(.twm-hero-flush) .twm-header,
body:has(.twm-hero-flush) .twm-header:has(.wp-block-navigation-item.has-child:hover),
body:has(.twm-hero-flush) .twm-header:has(.wp-block-navigation-item.has-child:focus-within) {
	background: var(--wp--preset--color--paper);
	color: var(--wp--custom--color--header-solid-text);
}

html[data-twm-scrolled] body:has(.twm-hero-flush) .twm-header-row,
body:has(.twm-hero-flush) .twm-header:has(.wp-block-navigation-item.has-child:hover) .twm-header-row,
body:has(.twm-hero-flush) .twm-header:has(.wp-block-navigation-item.has-child:focus-within) .twm-header-row {
	height: var(--wp--custom--spacing--header-row-solid);
}

html[data-twm-scrolled] body:has(.twm-hero-flush) .twm-header-nav,
body:has(.twm-hero-flush) .twm-header:has(.wp-block-navigation-item.has-child:hover) .twm-header-nav,
body:has(.twm-hero-flush) .twm-header:has(.wp-block-navigation-item.has-child:focus-within) .twm-header-nav {
	height: var(--wp--custom--spacing--header-nav-solid);
	border-bottom-color: var(--wp--preset--color--hairline);
}

html[data-twm-scrolled] body:has(.twm-hero-flush) .twm-header-brand .wp-block-site-logo img,
body:has(.twm-hero-flush) .twm-header:has(.wp-block-navigation-item.has-child:hover) .twm-header-brand .wp-block-site-logo img,
body:has(.twm-hero-flush) .twm-header:has(.wp-block-navigation-item.has-child:focus-within) .twm-header-brand .wp-block-site-logo img {
	filter: none;
}

/* =========================================================================
   4. Menu drawer (navigation-overlay)
   ========================================================================= */

.twm-burger .wp-block-navigation__responsive-container.has-custom-overlay.is-menu-open {
	background: var(--wp--preset--color--paper);
	padding: 0;
	animation: twm-drawer-in 0.28s ease both;
}

@keyframes twm-drawer-in {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

.twm-burger .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.twm-burger .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog,
.twm-burger .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__overlay-container {
	height: 100%;
	display: block;
	padding: 0;
}

.twm-drawer {
	display: flex;
	height: 100%;
	min-height: 100dvh;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}

.twm-drawer-panel {
	width: 42%;
	min-width: 540px;
	flex-shrink: 0;
	box-sizing: border-box;
	padding: 40px 80px;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.twm-drawer-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--wp--preset--color--hairline);
}

.twm-drawer-top .wp-block-site-logo img {
	display: block;
	width: 80px;
	height: 28px;
	object-fit: contain;
	object-position: left center;
}

.twm-drawer .wp-block-navigation-overlay-close {
	display: flex;
	align-items: center;
	gap: 10px;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--meta);
	font-size: var(--wp--preset--font-size--meta);
	line-height: var(--wp--custom--type--meta--line-height);
	letter-spacing: var(--wp--custom--type--meta--letter-spacing);
	text-transform: uppercase;
}

.twm-drawer .wp-block-navigation-overlay-close svg {
	width: 13px;
	height: 13px;
}

.twm-drawer-scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 24px 0;
}

/* Shelf list: serif 30/40, translate on hover */
.twm-drawer-list .wp-block-navigation__container {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.twm-drawer-list .wp-block-navigation-item__content.wp-block-navigation-item__content {
	display: block;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--section);
	line-height: var(--wp--custom--type--section--line-height);
	letter-spacing: var(--wp--custom--type--section--letter-spacing);
	text-decoration: none;
	color: var(--wp--preset--color--ink);
	transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.twm-drawer-list .wp-block-navigation-item__content.wp-block-navigation-item__content:hover,
.twm-drawer-list .wp-block-navigation-item__content.wp-block-navigation-item__content:focus-visible {
	transform: translateX(12px);
	text-decoration: none;
}

/* The drawer lists the shelves only — subcategories stay hidden, as in the
   design (the shelf strip's mega panel is where they surface). Specificity
   matches core's `.wp-block-navigation .has-child .…__submenu-container`. */
.twm-drawer-list.wp-block-navigation .has-child .wp-block-navigation__submenu-container,
.twm-drawer-list.wp-block-navigation .wp-block-navigation__submenu-icon {
	display: none;
}

.twm-drawer-bottom {
	flex: none;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	border-top: 1px solid var(--wp--preset--color--hairline);
	padding-top: 24px;
}

.twm-drawer-utility .wp-block-navigation__container {
	display: flex;
	flex-wrap: nowrap;
	gap: 20px;
}

.twm-drawer-utility .wp-block-navigation-item__content.wp-block-navigation-item__content {
	color: var(--wp--preset--color--secondary);
	text-decoration: none;
}

.twm-drawer-utility .wp-block-navigation-item__content.wp-block-navigation-item__content:hover,
.twm-drawer-utility .wp-block-navigation-item__content.wp-block-navigation-item__content:focus-visible {
	text-decoration: underline;
}

/* Right feature panel: sand cover with kicker + serif line */
.twm-drawer-feature {
	flex: 1 1 auto;
	position: relative;
	overflow: hidden;
	background: var(--wp--preset--color--sand);
	display: flex;
	align-items: flex-end;
	min-height: 0;
}

.twm-drawer-feature-copy {
	position: relative;
	z-index: 2;
	padding: 0 56px 56px;
	animation: twm-drawer-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* "This week" label surfaces on the small-screen drawer only */
.twm-drawer-feature-label {
	display: none;
}

@keyframes twm-drawer-rise {
	from {
		opacity: 0;
		transform: translateY(14px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.twm-drawer-feature-copy .twm-card-title {
	max-width: 640px;
	margin-top: 14px;
	display: block;
	font-size: var(--wp--preset--font-size--section);
	line-height: var(--wp--custom--type--section--line-height);
	letter-spacing: var(--wp--custom--type--section--letter-spacing);
}

/* =========================================================================
   5. Footer + fixed reveal
   ========================================================================= */

.twm-footer {
	box-sizing: border-box;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	padding: 44px 0 34px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 34px;
}

.twm-footer-frame {
	max-width: 1360px;
	margin: 0 auto;
	width: 100%;
	box-sizing: border-box;
	padding-left: var(--wp--preset--spacing--gutter);
	padding-right: var(--wp--preset--spacing--gutter);
}

.twm-footer-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 56px;
}

.twm-footer-brand {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
}

.twm-footer-brand .wp-block-site-logo img {
	display: block;
	width: 80px;
	height: 28px;
	object-fit: contain;
	object-position: left center;
	filter: invert(1) brightness(1.6);
}

.twm-footer-tagline {
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-size: var(--wp--preset--font-size--card);
	line-height: var(--wp--custom--type--card--line-height);
	letter-spacing: var(--wp--custom--type--card--letter-spacing);
	color: var(--wp--preset--color--white);
	margin: 0;
}

.twm-footer-secondary .wp-block-navigation__container {
	display: flex;
	align-items: baseline;
	gap: 14px 32px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.twm-footer-secondary .wp-block-navigation-item__content.wp-block-navigation-item__content {
	color: var(--wp--custom--color--on-ink--link);
	text-decoration: none;
	transition: color 0.2s ease;
}

.twm-footer-secondary .wp-block-navigation-item__content.wp-block-navigation-item__content:hover,
.twm-footer-secondary .wp-block-navigation-item__content.wp-block-navigation-item__content:focus-visible {
	color: var(--wp--preset--color--white);
	text-decoration: none;
}

.twm-footer-legal {
	border-top: 1px solid var(--wp--custom--color--on-ink--rule);
	padding-top: 20px;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 24px;
	color: var(--wp--custom--color--on-ink--legal);
}

.twm-footer-legal .wp-block-navigation__container {
	display: flex;
	align-items: baseline;
	gap: 32px;
}

.twm-footer-legal .wp-block-navigation-item__content.wp-block-navigation-item__content {
	color: var(--wp--custom--color--on-ink--legal);
	text-decoration: none;
	transition: color 0.2s ease;
}

.twm-footer-legal .wp-block-navigation-item__content.wp-block-navigation-item__content:hover,
.twm-footer-legal .wp-block-navigation-item__content.wp-block-navigation-item__content:focus-visible {
	color: var(--wp--preset--color--white);
	text-decoration: none;
}

/* The reveal: page body rides above the fixed footer on desktop */
.twm-above-footer {
	position: relative;
	z-index: 2;
	background: var(--wp--preset--color--paper);
	padding-bottom: 104px;
}

@media (min-width: 1025px) {
	.twm-above-footer {
		box-shadow: 0 30px 60px rgba(0, 0, 0, 0.28);
		margin-bottom: var(--wp--custom--spacing--footer-height);
	}

	.twm-footer {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 1;
		height: var(--wp--custom--spacing--footer-height);
	}
}

@media (max-width: 1024px) {
	.twm-above-footer {
		padding-bottom: 80px;
	}

	.twm-footer {
		padding: 44px 0 30px;
		gap: 30px;
	}

	.twm-footer-secondary .wp-block-navigation__container {
		gap: 12px 24px;
	}

	.twm-footer-secondary {
		max-width: 420px;
	}
}

@media (max-width: 640px) {
	.twm-above-footer {
		padding-bottom: 64px;
	}

	.twm-footer {
		padding: 40px 0 26px;
		gap: 28px;
	}

	.twm-footer-top {
		flex-direction: column;
		align-items: flex-start;
		gap: 26px;
	}

	.twm-footer-secondary .wp-block-navigation__container {
		justify-content: flex-start;
		gap: 14px 22px;
	}

	.twm-footer-secondary {
		max-width: none;
	}

	.twm-footer-legal {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
}

/* =========================================================================
   6. Cards, grids, lead treatment
   ========================================================================= */

.twm-grid .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 44px 28px;
	margin: 28px 0 0;
	padding: 0;
	list-style: none;
}

.twm-grid-3 .wp-block-post-template {
	grid-template-columns: repeat(3, 1fr);
	gap: 36px;
	margin-top: 36px;
}

.twm-grid-lately .wp-block-post-template {
	gap: 36px 28px;
}

.twm-grid .wp-block-post,
.twm-rows .wp-block-post {
	margin: 0;
}

.twm-card-media {
	margin: 0;
	background: var(--wp--preset--color--sand);
	aspect-ratio: 2 / 3;
	overflow: hidden;
}

.twm-card-media .wp-block-post-featured-image,
.twm-card-media a,
.twm-card-media img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
}

.twm-card-media img {
	object-fit: cover;
	object-position: 50% 40%;
}

.twm-card-media-34 {
	aspect-ratio: 3 / 4;
}

.twm-card-meta {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-top: 18px;
	flex-wrap: wrap;
}

.twm-card-meta > * {
	margin: 0;
}

.twm-card-meta .wp-block-post-terms {
	display: inline;
}

.twm-grid .twm-card-title {
	margin-top: 12px;
}

.twm-grid .wp-block-post:where(:hover, :focus-within) {
	opacity: 0.74;
	transition: opacity 0.2s ease;
}

/* Card excerpts only surface in the lead treatment */
.twm-grid .wp-block-post-excerpt {
	display: none;
}

/* Lead story: page one, first result, 7fr/4fr side-by-side */
@media (min-width: 1025px) {
	.twm-has-lead .wp-block-post-template {
		grid-template-columns: repeat(4, 1fr);
	}

	.twm-has-lead .wp-block-post-template > .wp-block-post:first-child {
		grid-column: 1 / -1;
		display: grid;
		grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
		grid-template-rows: 1fr auto auto auto;
		column-gap: 64px;
		row-gap: 0;
		padding-bottom: 80px;
	}

	.twm-has-lead .wp-block-post-template > .wp-block-post:first-child .twm-card-media {
		aspect-ratio: 3 / 4;
		grid-column: 1;
		grid-row: 1 / 5;
	}

	.twm-has-lead .wp-block-post-template > .wp-block-post:first-child .twm-card-meta {
		border-top: 1px solid var(--wp--preset--color--ink);
		padding-top: 16px;
		margin-top: 0;
		grid-row: 2;
	}

	.twm-has-lead .wp-block-post-template > .wp-block-post:first-child .twm-card-title {
		font-size: var(--wp--preset--font-size--display);
		line-height: var(--wp--custom--type--display--line-height);
		letter-spacing: var(--wp--custom--type--display--letter-spacing);
		margin-top: 22px;
		grid-row: 3;
	}

	.twm-has-lead .wp-block-post-template > .wp-block-post:first-child .twm-card-title a {
		font-size: inherit;
		line-height: inherit;
		letter-spacing: inherit;
	}

	.twm-has-lead .wp-block-post-template > .wp-block-post:first-child .wp-block-post-excerpt {
		display: block;
		margin-top: 20px;
		color: var(--wp--preset--color--secondary);
		padding-bottom: 6px;
		grid-row: 4;
	}

	.twm-has-lead .wp-block-post-template > .wp-block-post:first-child :is(.twm-card-meta, .twm-card-title, .wp-block-post-excerpt) {
		grid-column: 2;
	}
}

@media (max-width: 1024px) {
	.twm-grid .wp-block-post-template {
		grid-template-columns: repeat(2, 1fr);
		gap: 36px 20px;
	}

	/* Stacked lead: image 4:5, meta rule flips beneath the copy */
	.twm-has-lead .wp-block-post-template > .wp-block-post:first-child {
		grid-column: 1 / -1;
	}

	.twm-has-lead .wp-block-post-template > .wp-block-post:first-child .twm-card-media {
		aspect-ratio: 4 / 5;
	}

	.twm-has-lead .wp-block-post-template > .wp-block-post:first-child .twm-card-title {
		font-size: var(--wp--preset--font-size--section);
		line-height: var(--wp--custom--type--section--line-height);
		letter-spacing: var(--wp--custom--type--section--letter-spacing);
	}

	.twm-has-lead .wp-block-post-template > .wp-block-post:first-child .wp-block-post-excerpt {
		display: block;
		margin-top: 20px;
		color: var(--wp--preset--color--secondary);
		border-bottom: 1px solid var(--wp--preset--color--ink);
		padding-bottom: 44px;
	}
}

@media (max-width: 640px) {
	.twm-grid .wp-block-post-template,
	.twm-grid-3 .wp-block-post-template {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.twm-grid .twm-card-media {
		aspect-ratio: 4 / 5;
	}
}

/* Pagination: the chip grammar, centered */
.twm-pagination {
	display: flex;
	justify-content: center;
	padding-top: 48px;
}

.twm-pagination .wp-block-query-pagination {
	display: flex;
	align-items: center;
	gap: 10px;
	justify-content: center;
}

.twm-pagination a,
.twm-pagination .wp-block-query-pagination-numbers .current {
	font-family: var(--wp--preset--font-family--meta);
	font-size: var(--wp--preset--font-size--meta);
	line-height: var(--wp--custom--type--meta--line-height);
	letter-spacing: var(--wp--custom--type--meta--letter-spacing);
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wp--preset--color--ink);
	border: 1px solid var(--wp--preset--color--hairline);
	padding: 13px 26px;
	display: inline-block;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.twm-pagination .wp-block-query-pagination-numbers {
	display: flex;
	gap: 10px;
}

.twm-pagination a:hover,
.twm-pagination a:focus-visible {
	background: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	text-decoration: none;
}

.twm-pagination .wp-block-query-pagination-numbers .current {
	background: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
}

/* =========================================================================
   7. Front page
   ========================================================================= */

.twm-hero {
	position: relative;
	height: 1000px;
	background: var(--wp--preset--color--sand);
	overflow: hidden;
	display: flex;
	align-items: flex-end;
	margin: 0;
	min-height: 0;
	padding: 0;
}

.twm-hero .wp-block-cover__background {
	margin: 0;
}

/* The design's two hero-copy states, verbatim:
   no photo  → dark 0.86 box, 36/40/40 padding, −40px offset;
   photo     → transparent copy directly on the image, side padding and
               offset removed (image-slot[data-filled] rules in the zip). */
.twm-hero .twm-hero-copy {
	position: relative;
	z-index: 2;
	margin-left: calc(max(80px, 50% - 700px) - 40px);
	margin-bottom: 170px;
	width: min(820px, 52%);
	box-sizing: border-box;
	padding: 36px 40px 40px;
	background: var(--wp--custom--color--copy-box-empty);
	color: var(--wp--preset--color--white);
}

.twm-hero:has(img) .twm-hero-copy {
	background: transparent;
	padding-left: 0;
	padding-right: 0;
	margin-left: max(80px, calc(50% - 700px));
}

/* The hero scrim only rides on a photograph (design: #hero-scrim opacity
   0 → 1 on fill). Specificity matches core's dim-ratio rule. */
.wp-block-cover.twm-hero:not(:has(img)) > .wp-block-cover__background.has-background-dim.has-background-dim-100 {
	opacity: 0;
}

.twm-hero-copy .twm-meta a {
	color: var(--wp--preset--color--white);
}

.twm-hero-title {
	margin: 26px 0 0;
	max-width: 860px;
	color: var(--wp--preset--color--white);
}

.twm-hero-title a {
	color: inherit;
	text-decoration: none;
	pointer-events: none;
}

.twm-hero-stand {
	margin: 30px 0 0;
	max-width: 780px;
	color: var(--wp--custom--color--on-ink--standfirst);
}

.twm-hero-stand p {
	margin: 0;
}

@media (max-width: 1024px) {
	.twm-hero {
		height: min(78vh, 660px);
	}

	.twm-hero .twm-hero-copy,
	.twm-hero:has(img) .twm-hero-copy {
		margin-left: 24px;
		margin-right: 24px;
		margin-bottom: 36px;
		width: auto;
	}

	.twm-hero-title {
		font-size: 34px;
		line-height: 44px;
		letter-spacing: 1px;
		margin-top: 18px;
	}

	.twm-hero-stand {
		margin-top: 18px;
	}
}

@media (max-width: 640px) {
	.twm-hero {
		height: min(80vh, 560px);
	}

	.twm-hero .twm-hero-copy,
	.twm-hero:has(img) .twm-hero-copy {
		margin-left: 18px;
		margin-right: 18px;
		margin-bottom: 28px;
		padding: 20px;
	}

	/* With a photograph the copy still sits flush to the frame. */
	.twm-hero:has(img) .twm-hero-copy {
		padding-left: 0;
		padding-right: 0;
	}

	.twm-hero-title {
		font-size: 28px;
		line-height: 38px;
		letter-spacing: 0.6px;
	}
}

/* the week in four — flourish head row */
.twm-rule-row {
	display: flex;
	align-items: baseline;
	gap: 28px;
}

.twm-rule-row .wp-block-separator {
	flex: 1 1 auto;
	align-self: center;
	margin: 0;
	width: auto;
}

.twm-rule-row .is-style-twm-flourish {
	white-space: nowrap;
}

.twm-week {
	padding-top: 72px;
}

.twm-week .is-style-twm-flourish {
	line-height: 1.1;
	letter-spacing: 0.9px;
}

.twm-week .wp-block-post-template {
	margin-top: 36px;
	gap: 32px;
}

.twm-week .twm-card-title {
	margin-top: 10px;
}

.twm-week .twm-card-meta {
	margin-top: 18px;
}

@media (max-width: 1024px) {
	.twm-week {
		padding-top: 56px;
	}

	.twm-week .wp-block-post-template {
		gap: 24px 20px;
	}
}

@media (max-width: 640px) {
	.twm-rule-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.twm-rule-row .wp-block-separator {
		display: none;
	}
}

/* the Seasons ink band */
.twm-ink {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
}

.twm-seasons {
	margin-top: 96px;
	padding-top: 76px;
	padding-bottom: 84px;
}

.twm-band-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
}

.twm-band-head .is-style-twm-flourish {
	color: var(--wp--preset--color--white);
}

.twm-band-dek {
	margin: 14px 0 0;
	color: var(--wp--preset--color--white);
}

.twm-seasons .wp-block-post-template {
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
	margin-top: 44px;
}

.twm-seasons .twm-card-media {
	aspect-ratio: 3 / 4;
}

.twm-seasons .twm-card-title,
.twm-seasons .twm-card-title a,
.twm-seasons .twm-card-meta,
.twm-seasons .twm-card-meta a,
.twm-seasons .wp-block-post-date {
	color: var(--wp--preset--color--white);
}

.twm-seasons .twm-card-title {
	margin-top: 10px;
}

@media (max-width: 1024px) {
	.twm-seasons {
		margin-top: 64px;
		padding-top: 56px;
		padding-bottom: 60px;
	}

	.twm-seasons .wp-block-post-template {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px 20px;
	}
}

@media (max-width: 640px) {
	.twm-band-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.twm-seasons .wp-block-post-template {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}

/* Feature story */
.twm-feature {
	padding-top: 88px;
}

.twm-feature-layout {
	display: flex;
	gap: 64px;
	align-items: center;
}

.twm-feature .twm-card-media {
	width: 600px;
	flex: none;
	aspect-ratio: 2 / 3;
}

.twm-feature-copy {
	flex: 1 1 auto;
	min-width: 0;
}

.twm-feature-title {
	margin: 20px 0 0;
	max-width: 720px;
}

.twm-feature-title a {
	text-decoration: none;
}

.twm-feature .wp-block-post-excerpt {
	display: block;
	margin-top: 20px;
	max-width: 620px;
}

.twm-feature .wp-block-post-excerpt p {
	margin: 0;
}

@media (max-width: 1024px) {
	.twm-feature {
		padding-top: 64px;
	}

	.twm-feature-layout {
		flex-direction: column;
		align-items: stretch;
		gap: 24px;
	}

	.twm-feature .twm-card-media {
		width: 100%;
		aspect-ratio: 4 / 3;
	}

	.twm-feature-title {
		font-size: var(--wp--preset--font-size--section);
		line-height: var(--wp--custom--type--section--line-height);
		letter-spacing: var(--wp--custom--type--section--letter-spacing);
	}
}

@media (max-width: 640px) {
	.twm-feature-title {
		font-size: var(--wp--preset--font-size--card);
		line-height: var(--wp--custom--type--card--line-height);
		letter-spacing: var(--wp--custom--type--card--letter-spacing);
	}
}

/* Weekly letter strip */
.twm-letter {
	margin-top: 80px;
	border-top: 1px solid var(--wp--preset--color--hairline);
	border-bottom: 1px solid var(--wp--preset--color--hairline);
	padding-top: 34px;
	padding-bottom: 34px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.twm-letter-line {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--card);
	line-height: var(--wp--custom--type--card--line-height);
	letter-spacing: var(--wp--custom--type--card--letter-spacing);
	margin: 0;
}

@media (max-width: 1024px) {
	.twm-letter {
		margin-top: 64px;
		flex-direction: column;
		align-items: flex-start;
		gap: 18px;
	}
}

/* =========================================================================
   8. Single article
   ========================================================================= */

.twm-article-head .twm-display,
.twm-article-head .wp-block-post-title {
	margin: 22px 0 0;
	max-width: 1000px;
}

.twm-article-stand {
	margin-top: 22px;
	max-width: 720px;
}

.twm-article-stand p {
	margin: 0;
}

.twm-article-tags {
	margin-top: 26px;
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 16px;
	color: var(--wp--preset--color--secondary);
}

.twm-article-tags .wp-block-post-terms,
.twm-article-tags .wp-block-post-terms a {
	color: var(--wp--preset--color--secondary);
}

.twm-article-hero {
	margin-top: 40px;
}

.twm-article-hero .wp-block-post-featured-image {
	aspect-ratio: 16 / 9;
	background: var(--wp--preset--color--sand);
	margin: 0;
}

.twm-article-hero img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Prose column: 672px via layout contentSize; rhythm below */
.twm-prose {
	padding-top: 80px;
	margin-top: 0;
}

.twm-prose > p {
	margin-top: 24px;
	margin-bottom: 0;
}

.twm-prose > p:first-child {
	margin-top: 0;
}

.twm-prose > h2 {
	margin-top: 44px;
	margin-bottom: 0;
}

.twm-prose > h2 + p {
	margin-top: 20px;
}

.twm-prose a {
	text-decoration: none;
}

.twm-prose a:hover,
.twm-prose a:focus-visible {
	text-decoration: underline;
}

/* Pull quote: italic serif + uppercase attribution */
.twm-prose .wp-block-quote,
.twm-quote {
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-size: var(--wp--preset--font-size--section);
	line-height: var(--wp--custom--type--section--line-height);
	letter-spacing: var(--wp--custom--type--section--letter-spacing);
	margin: 44px 0 0;
	padding: 0;
	border: 0;
	text-wrap: pretty;
}

.twm-prose .wp-block-quote p {
	margin: 0;
	font-size: inherit;
	line-height: inherit;
	letter-spacing: inherit;
	font-family: inherit;
}

.twm-prose .wp-block-quote cite {
	display: block;
	margin-top: 18px;
	font-family: var(--wp--preset--font-family--meta);
	font-style: normal;
	font-size: var(--wp--preset--font-size--meta);
	line-height: var(--wp--custom--type--meta--line-height);
	letter-spacing: var(--wp--custom--type--meta--letter-spacing);
	text-transform: uppercase;
	color: var(--wp--preset--color--secondary);
}

/* The arrangements endnote */
.twm-endnote {
	margin-top: 48px;
	border-top: 1px solid var(--wp--preset--color--hairline);
	padding-top: 24px;
}

.twm-endnote-label {
	margin: 0;
	color: var(--wp--preset--color--secondary);
}

.twm-endnote-rows {
	margin-top: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.twm-endnote-row {
	display: flex;
	align-items: baseline;
	gap: 20px;
}

.twm-endnote-row > .twm-endnote-key {
	width: 120px;
	flex: none;
	margin: 0;
	color: var(--wp--preset--color--secondary);
}

.twm-endnote-row > p:last-child {
	margin: 0;
}

@media (max-width: 1024px) {
	.twm-prose {
		padding-top: 56px;
	}
}

@media (max-width: 640px) {
	.twm-prose {
		padding-top: 44px;
	}
}

/* Related rail */
.twm-related-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}

.twm-related-tags .wp-block-post-terms {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 24px;
}

.twm-related-tags .wp-block-post-terms__separator {
	display: none;
}

.twm-related-tags .wp-block-post-terms a {
	color: var(--wp--preset--color--ink);
	border-bottom: 1px solid currentColor;
	padding-bottom: 2px;
	text-decoration: none;
	white-space: nowrap;
}

.twm-related-tags .wp-block-post-terms a:hover,
.twm-related-tags .wp-block-post-terms a:focus-visible {
	text-decoration: none;
}

/* =========================================================================
   9. Archives: head, chips, tools
   ========================================================================= */

.twm-archive-title-row {
	margin-top: 22px;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 64px;
}

.twm-archive-title-row .wp-block-query-title,
.twm-archive-title-row h1 {
	margin: 0;
	max-width: 640px;
}

.twm-archive-dek,
.twm-archive-dek .wp-block-term-description {
	max-width: 420px;
}

.twm-archive-dek p {
	margin: 0;
}

@media (max-width: 1024px) {
	.twm-archive-title-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 22px;
	}

	.twm-archive-dek,
	.twm-archive-dek .wp-block-term-description {
		max-width: 600px;
	}
}

@media (max-width: 640px) {
	.twm-archive-title-row {
		gap: 18px;
	}
}

.twm-tools {
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
	justify-content: space-between;
}

@media (max-width: 1024px) {
	.twm-tools {
		gap: 18px;
	}
}

@media (max-width: 640px) {
	.twm-tools {
		gap: 16px;
	}
}

.twm-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 14px 26px;
	flex: 1 1 auto;
	min-width: 0;
}

.twm-chip {
	color: var(--wp--preset--color--secondary);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	padding-bottom: 3px;
}

.twm-chip:hover,
.twm-chip:focus-visible {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.twm-chip.is-current {
	color: var(--wp--preset--color--ink);
	border-bottom-color: var(--wp--preset--color--ink);
}

.twm-count {
	white-space: nowrap;
	color: var(--wp--preset--color--secondary);
	margin: 0;
}



/* Empty result line */
.twm-empty {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--card);
	line-height: var(--wp--custom--type--card--line-height);
	letter-spacing: var(--wp--custom--type--card--letter-spacing);
	color: var(--wp--preset--color--secondary);
}

.twm-empty p {
	margin: 0;
}

/* =========================================================================
   10. Tag hub
   ========================================================================= */

.twm-hub-hero {
	position: relative;
	height: min(62vh, 560px);
	background: var(--wp--preset--color--sand);
	overflow: hidden;
	display: flex;
	align-items: flex-end;
	margin: 0;
	padding: 0;
	min-height: 0;
}

.twm-hub-hero-copy {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1360px;
	margin: 0 auto;
	box-sizing: border-box;
	padding: 0 var(--wp--preset--spacing--gutter) 56px;
}

.twm-hub-hero .wp-block-query-title {
	margin: 20px 0 0;
	max-width: 900px;
}

@media (max-width: 1024px) {
	.twm-hub-hero {
		height: min(52vh, 420px);
	}
}

@media (max-width: 640px) {
	.twm-hub-hero {
		height: min(46vh, 340px);
	}
}

.twm-constellation-head {
	margin-top: 34px;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}

/* the way of the place */
.twm-way {
	max-width: 720px;
}

.twm-way .wp-block-term-description {
	margin: 24px 0 0;
	color: var(--wp--preset--color--ink);
}

.twm-way .wp-block-term-description p {
	margin: 0 0 24px;
}

.twm-way .wp-block-term-description p:last-child {
	margin-bottom: 0;
}

/* when to be here — month band */
.twm-month-band {
	margin-top: 80px;
	padding-top: 64px;
	padding-bottom: 68px;
}

.twm-month-band .twm-band-head {
	align-items: baseline;
	flex-wrap: wrap;
}

.twm-month-window {
	color: var(--wp--custom--color--on-ink--band-label);
	margin: 0;
}

.twm-months {
	margin-top: 34px;
	display: grid;
	grid-template-columns: repeat(12, 1fr);
}

.twm-month {
	display: block;
	padding: 18px 0 22px;
	border-top: 1px solid var(--wp--custom--color--on-ink--band-rule);
	color: var(--wp--custom--color--on-ink--band-muted);
	text-decoration: none;
}

.twm-month.is-live {
	border-top-color: var(--wp--custom--color--on-ink--band-rule-active);
	color: var(--wp--preset--color--white);
	transition: opacity 0.2s ease;
}

.twm-month.is-live:hover,
.twm-month.is-live:focus-visible {
	opacity: 0.7;
	text-decoration: none;
}

@media (max-width: 1024px) {
	.twm-month-band {
		margin-top: 56px;
		padding-top: 44px;
		padding-bottom: 48px;
	}

	.twm-months {
		grid-template-columns: repeat(6, 1fr);
		row-gap: 22px;
	}
}

@media (max-width: 640px) {
	.twm-months {
		grid-template-columns: repeat(4, 1fr);
	}

	.twm-month-band .twm-band-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
}

/* Hub cards carry the shelf label in ink */
.twm-card-meta .twm-term-top a,
.twm-card-meta .twm-term-child a {
	color: var(--wp--preset--color--ink);
}

/* =========================================================================
   11. Search
   ========================================================================= */

.twm-search-field {
	margin-top: 22px;
}

.twm-search-field .wp-block-search__inside-wrapper {
	display: flex;
	align-items: center;
	gap: 20px;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--ink);
	padding: 0 0 14px;
}

.twm-search-field .wp-block-search__inside-wrapper::before {
	content: "";
	flex: none;
	width: 22px;
	height: 22px;
	background-color: var(--wp--preset--color--secondary);
	-webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" fill="none" stroke="black" stroke-width="1.1"><circle cx="7.6" cy="7.6" r="5.9"/><line x1="12" y1="12" x2="17" y2="17"/></svg>') no-repeat center / contain;
	mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" fill="none" stroke="black" stroke-width="1.1"><circle cx="7.6" cy="7.6" r="5.9"/><line x1="12" y1="12" x2="17" y2="17"/></svg>') no-repeat center / contain;
}

.twm-search-field .wp-block-search__input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	outline: none;
	background: transparent;
	padding: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--display);
	line-height: var(--wp--custom--type--display--line-height);
	letter-spacing: var(--wp--custom--type--display--letter-spacing);
	color: var(--wp--preset--color--ink);
	border-radius: 0;
}

.twm-search-field .wp-block-search__input::placeholder {
	color: var(--wp--preset--color--muted);
	opacity: 1;
}

.twm-search-field .wp-block-search__button {
	display: none;
}

.twm-search-count {
	margin: 22px 0 0;
	color: var(--wp--preset--color--secondary);
}

/* Result rows */
.twm-rows .wp-block-post-template {
	display: block;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
}

.twm-rows .wp-block-post {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 36px;
	align-items: start;
	padding: 26px 0;
	border-top: 1px solid var(--wp--preset--color--hairline);
}

.twm-rows .wp-block-post:where(:hover, :focus-within) {
	opacity: 0.72;
	transition: opacity 0.2s ease;
}

.twm-rows .twm-card-media {
	aspect-ratio: 3 / 2;
}

.twm-rows .twm-card-meta {
	margin-top: 0;
}

.twm-rows .twm-card-title {
	margin-top: 12px;
	display: block;
}

.twm-rows .wp-block-post-excerpt {
	display: block;
	margin-top: 10px;
	max-width: 640px;
	color: var(--wp--preset--color--secondary);
}

.twm-rows .wp-block-post-excerpt p {
	margin: 0;
}

.twm-rows .twm-row-copy {
	min-width: 0;
}

@media (max-width: 640px) {
	.twm-rows .wp-block-post {
		grid-template-columns: 1fr;
		gap: 18px;
	}
}

/* Empty-state suggestions */
.twm-suggest {
	border-top: 1px solid var(--wp--preset--color--hairline);
	padding-top: 32px;
	margin-top: 24px;
}

.twm-suggest-row {
	margin-top: 24px;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 32px;
}

.twm-suggest-row a {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--card);
	line-height: var(--wp--custom--type--card--line-height);
	letter-spacing: var(--wp--custom--type--card--letter-spacing);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	border-bottom: 1px solid var(--wp--preset--color--hairline);
	transition: border-color 0.2s ease;
}

.twm-suggest-row a:hover,
.twm-suggest-row a:focus-visible {
	border-bottom-color: var(--wp--preset--color--ink);
	text-decoration: none;
}

/* =========================================================================
   12. 404
   ========================================================================= */

.twm-routes {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 14px 44px;
}

.twm-routes a {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--card);
	line-height: var(--wp--custom--type--card--line-height);
	letter-spacing: var(--wp--custom--type--card--letter-spacing);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.twm-routes a:hover,
.twm-routes a:focus-visible {
	opacity: 0.55;
	text-decoration: none;
}

.twm-404-stand {
	margin-top: 24px;
	max-width: 620px;
	color: var(--wp--preset--color--secondary);
}

.twm-404-chip {
	margin-top: 30px;
}

.twm-404-chip .wp-block-button__link {
	padding: 13px 24px;
}

/* =========================================================================
   13. Standing page anatomy
   ========================================================================= */

.twm-page-stand {
	margin-top: 26px;
	max-width: 680px;
	color: var(--wp--preset--color--secondary);
}

.twm-page-stand p {
	margin: 0;
}

.twm-page-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	gap: 80px;
	align-items: start;
}

.twm-page-prose {
	max-width: 720px;
}

.twm-page-prose > h2 {
	scroll-margin-top: 110px;
	margin: 44px 0 0;
}

.twm-page-prose > h2:first-child {
	margin-top: 0;
}

.twm-page-prose > h2 + p {
	margin-top: 20px;
}

.twm-page-prose > p {
	margin: 22px 0 0;
}

.twm-credo {
	margin-top: 44px;
	border-top: 1px solid var(--wp--preset--color--ink);
	padding-top: 26px;
}

.twm-credo p {
	margin: 0;
	max-width: 600px;
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-size: var(--wp--preset--font-size--section);
	line-height: var(--wp--custom--type--section--line-height);
	letter-spacing: var(--wp--custom--type--section--letter-spacing);
	text-wrap: pretty;
}

.twm-principles {
	list-style: none;
	margin: 22px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.twm-principles li {
	display: grid;
	grid-template-columns: 22px 1fr;
	gap: 14px;
	align-items: baseline;
}

.twm-principles li::marker {
	content: "";
}

.twm-principles .twm-meta {
	color: var(--wp--preset--color--secondary);
}

.twm-detail-pairs {
	margin-top: 44px;
	border-top: 1px solid var(--wp--preset--color--hairline);
	padding-top: 26px;
}

.twm-detail-pair {
	display: grid;
	grid-template-columns: 150px 1fr;
	gap: 20px;
	align-items: baseline;
	padding: 13px 0;
	border-bottom: 1px solid var(--wp--preset--color--hairline);
	margin: 0;
}

.twm-detail-pair > p {
	margin: 0;
}

.twm-updated {
	margin-top: 26px;
	color: var(--wp--preset--color--secondary);
}

.twm-page-rail {
	position: sticky;
	top: 110px;
}

.twm-rail-label {
	margin: 0;
	color: var(--wp--preset--color--secondary);
}

.twm-rail-nav {
	margin-top: 14px;
	display: flex;
	flex-direction: column;
}

.twm-rail-nav a {
	padding: 11px 0;
	border-top: 1px solid var(--wp--preset--color--hairline);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--card);
	line-height: var(--wp--custom--type--card--line-height);
	letter-spacing: var(--wp--custom--type--card--letter-spacing);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.twm-rail-nav a:hover,
.twm-rail-nav a:focus-visible {
	opacity: 0.55;
	text-decoration: none;
}

.twm-page-prose {
	overflow-wrap: break-word;
}

@media (max-width: 640px) {
	/* Detail pairs stack per the design's own breakpoint */
	.twm-detail-pair {
		grid-template-columns: 1fr;
		gap: 4px;
	}

	.twm-page-prose {
		max-width: none;
	}

	.twm-page-prose > h2 {
		font-size: var(--wp--preset--font-size--card);
		line-height: var(--wp--custom--type--card--line-height);
		letter-spacing: var(--wp--custom--type--card--letter-spacing);
	}
}

@media (max-width: 1024px) {
	.twm-page-grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.twm-page-rail {
		position: static;
		order: -1;
		max-width: 640px;
	}

	.twm-rail-nav {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 10px 28px;
		margin-top: 12px;
	}

	.twm-rail-nav a {
		padding: 0;
		border-top: 0;
		border-bottom: 1px solid var(--wp--preset--color--hairline);
		font-family: var(--wp--preset--font-family--meta);
		font-size: var(--wp--preset--font-size--meta);
		line-height: var(--wp--custom--type--meta--line-height);
		letter-spacing: var(--wp--custom--type--meta--letter-spacing);
		text-transform: uppercase;
	}

	.twm-page-prose {
		max-width: 640px;
	}
}

/* =========================================================================
   14. Collections index
   ========================================================================= */

.twm-collection-rows {
	margin-top: 28px;
}

.twm-collection-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
	padding: 16px 0;
	border-top: 1px solid var(--wp--preset--color--hairline);
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.twm-collection-row:hover,
.twm-collection-row:focus-visible {
	opacity: 0.74;
	text-decoration: none;
}

.twm-collection-row .twm-collection-name {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--section);
	line-height: var(--wp--custom--type--section--line-height);
	letter-spacing: var(--wp--custom--type--section--letter-spacing);
	color: var(--wp--preset--color--ink);
	text-wrap: pretty;
}

.twm-collection-row .twm-collection-count {
	color: var(--wp--preset--color--secondary);
	white-space: nowrap;
}

/* Shelf index: native Categories block restyled to the design grammar */
.twm-shelf-index .wp-block-categories {
	list-style: none;
	margin: 28px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0 64px;
}

.twm-shelf-index .wp-block-categories > li {
	padding: 16px 0;
	border-top: 1px solid var(--wp--preset--color--hairline);
}

.twm-shelf-index .wp-block-categories > li > a {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--section);
	line-height: var(--wp--custom--type--section--line-height);
	letter-spacing: var(--wp--custom--type--section--letter-spacing);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.twm-shelf-index .wp-block-categories > li > a:hover,
.twm-shelf-index .wp-block-categories > li > a:focus-visible {
	opacity: 0.74;
}

.twm-shelf-index .children {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 26px;
}

.twm-shelf-index .children a {
	font-family: var(--wp--preset--font-family--meta);
	font-size: var(--wp--preset--font-size--meta);
	line-height: var(--wp--custom--type--meta--line-height);
	letter-spacing: var(--wp--custom--type--meta--letter-spacing);
	text-transform: uppercase;
	color: var(--wp--preset--color--secondary);
	text-decoration: none;
}

.twm-shelf-index .children a:hover,
.twm-shelf-index .children a:focus-visible {
	color: var(--wp--preset--color--ink);
	text-decoration: underline;
}

@media (max-width: 781px) {
	.twm-shelf-index .wp-block-categories {
		grid-template-columns: 1fr;
	}
}

/* =========================================================================
   15. The Calendar
   ========================================================================= */

.twm-cal-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 64px;
}

.twm-cal-head-main {
	min-width: 0;
}

.twm-cal-dek {
	width: 420px;
	flex: none;
}

.twm-cal-dek p {
	margin: 0;
}

.twm-cal-crumb,
.twm-cal-crumb a {
	color: var(--wp--preset--color--muted);
}

.twm-cal-crumb a:first-child {
	color: var(--wp--preset--color--ink);
}

@media (max-width: 1024px) {
	.twm-cal-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 24px;
	}

	.twm-cal-dek {
		width: auto;
		max-width: 600px;
	}
}

.twm-cal-tabs {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
	border-bottom: 1px solid var(--wp--preset--color--hairline);
	padding-bottom: 14px;
}

.twm-cal-tabs nav {
	display: flex;
	align-items: center;
	gap: 36px;
}

.twm-cal-tabs nav a {
	color: var(--wp--preset--color--muted);
	text-decoration: none;
	white-space: nowrap;
}

.twm-cal-tabs nav a:hover,
.twm-cal-tabs nav a:focus-visible {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.twm-cal-tabs nav a.is-current {
	color: var(--wp--preset--color--ink);
}

.twm-cal-span {
	color: var(--wp--preset--color--muted);
	white-space: nowrap;
	margin: 0;
}

@media (max-width: 1024px) {
	.twm-cal-tabs {
		flex-wrap: wrap;
		gap: 14px 24px;
	}

	.twm-cal-tabs nav {
		gap: 24px;
		flex-wrap: wrap;
	}
}

@media (max-width: 640px) {
	.twm-cal-tabs {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
		padding-bottom: 12px;
	}

	.twm-cal-tabs nav {
		width: 100%;
		gap: 22px;
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.twm-cal-span {
		order: 2;
		color: var(--wp--preset--color--secondary);
		font-family: var(--wp--preset--font-family--soft);
		font-style: italic;
		font-size: var(--wp--preset--font-size--body);
		line-height: var(--wp--custom--type--body--line-height);
		letter-spacing: var(--wp--custom--type--body--letter-spacing);
		text-transform: none;
	}
}

/* the year at a glance */
.twm-glance .wp-block-post-template {
	display: block;
	margin: 28px 0 0;
	padding: 0;
	list-style: none;
}

.twm-glance .wp-block-post {
	display: grid;
	grid-template-columns: 96px 240px 1fr auto;
	align-items: baseline;
	gap: 24px;
	padding: 18px 0;
	border-top: 1px solid var(--wp--preset--color--hairline);
}

.twm-glance .wp-block-post:first-child {
	border-top: 0;
}

.twm-glance .wp-block-post-date {
	color: var(--wp--preset--color--ink);
}

.twm-glance .twm-glance-place,
.twm-glance .twm-glance-place a {
	color: var(--wp--preset--color--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
}

.twm-glance .twm-card-title,
.twm-glance .twm-card-title a {
	margin: 0;
}

.twm-glance .twm-glance-season,
.twm-glance .twm-glance-season a {
	color: var(--wp--preset--color--muted);
	white-space: nowrap;
}

@media (max-width: 1024px) {
	.twm-glance .wp-block-post {
		grid-template-columns: 80px 148px 1fr;
		gap: 18px;
	}

	.twm-glance .twm-glance-season {
		display: none;
	}
}

@media (max-width: 640px) {
	.twm-glance .wp-block-post {
		grid-template-columns: 1fr;
		gap: 6px;
		padding: 16px 0;
	}

	.twm-glance .twm-card-title,
	.twm-glance .twm-card-title a {
		font-size: var(--wp--preset--font-size--body);
		line-height: var(--wp--custom--type--body--line-height);
	}
}

/* the bookings worth making now (pattern) */
.twm-bookings {
	margin-top: 80px;
	padding-top: 72px;
	padding-bottom: 80px;
}

.twm-bookings-grid {
	margin-top: 40px;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px;
}

.twm-booking {
	display: flex;
	flex-direction: column;
	gap: 16px;
	color: var(--wp--preset--color--white);
	border-top: 1px solid var(--wp--custom--color--on-ink--band-rule);
	padding-top: 18px;
	transition: border-color 0.25s ease;
}

.twm-booking:hover,
.twm-booking:focus-within {
	border-top-color: var(--wp--preset--color--white);
}

.twm-booking-meta {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	color: var(--wp--custom--color--on-ink--legal);
	margin: 0;
}

.twm-booking-media {
	aspect-ratio: 4 / 5;
	background: var(--wp--custom--color--on-ink--plate);
	margin: 0;
	overflow: hidden;
}

.twm-booking-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.twm-booking .twm-card-title {
	color: var(--wp--preset--color--white);
	margin: 0;
}

.twm-booking .twm-booking-when {
	margin-top: auto;
	color: var(--wp--custom--color--on-ink--legal);
}

@media (max-width: 1024px) {
	.twm-bookings {
		margin-top: 56px;
		padding-top: 48px;
		padding-bottom: 52px;
	}

	.twm-bookings-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.twm-bookings {
		padding-top: 44px;
		padding-bottom: 48px;
	}

	.twm-bookings-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}
}

/* =========================================================================
   16. Header responsive + no-JS fallback
   ========================================================================= */

@media (max-width: 1024px) {
	.twm-header-row {
		height: 72px;
		padding: 0 24px;
	}

	.twm-header-nav {
		display: none;
	}

	body:has(.twm-hero-flush) .twm-header-row {
		height: 72px;
	}
}

@media (max-width: 640px) {
	.twm-header-row {
		padding: 0 18px;
	}
}

/* Drawer responsive */
@media (max-width: 1024px) {
	.twm-drawer {
		flex-direction: column;
		overflow-y: auto;
		height: 100%;
	}

	.twm-drawer-feature {
		order: 0;
		flex: none;
		width: 100%;
		height: 300px;
		margin-top: 8px;
	}

	.twm-drawer-feature-copy {
		padding: 0 24px 24px;
	}

	.twm-drawer-panel {
		width: 100%;
		min-width: 0;
		flex: none;
		padding: 24px 24px 28px;
	}

	.twm-drawer-scroll {
		overflow-y: visible;
		flex: none;
		padding: 22px 0 0;
	}

	.twm-drawer-list .wp-block-navigation__container {
		gap: 0;
	}

	.twm-drawer-list .wp-block-navigation-item {
		border-top: 1px solid var(--wp--preset--color--hairline);
	}

	.twm-drawer-list .wp-block-navigation-item:first-child {
		border-top: 0;
	}

	.twm-drawer-list .wp-block-navigation-item__content.wp-block-navigation-item__content {
		padding: 19px 0;
	}

	.twm-drawer-list .wp-block-navigation-item > a:hover {
		transform: none;
	}
}

@media (max-width: 640px) {
	.twm-drawer-feature {
		height: 240px;
	}

	.twm-drawer-feature-copy {
		padding: 0 18px 18px;
	}

	.twm-drawer-feature-label {
		display: block;
		color: var(--wp--custom--color--on-ink--band-label);
		margin: 0 0 12px;
	}

	.twm-drawer-panel {
		padding: 20px 18px 34px;
	}

	.twm-drawer-list .wp-block-navigation-item__content.wp-block-navigation-item__content {
		padding: 17px 0;
		font-size: 26px;
		line-height: 34px;
	}
}

/* No JavaScript: the drawer trigger is inert, so surface the shelf strip
   at every width and let the hidden burger step aside. */
.twm-nojs-nav {
	display: none;
}

/* =========================================================================
   17. Misc: screen-reader text, breadcrumbs, admin bar
   ========================================================================= */

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal;
}

.wp-block-breadcrumbs {
	margin: 0;
}

.wp-block-breadcrumbs ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
}

.wp-block-breadcrumbs li {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

/* Core draws the separator (li::after); the design fades it to 0.6 at an 8px gap */
.wp-block-breadcrumbs li:not(:last-child)::after {
	opacity: 0.6;
	margin: 0 8px;
}

.wp-block-breadcrumbs li[aria-current] ,
.wp-block-breadcrumbs li:last-child:not(:only-child) {
	color: var(--wp--preset--color--ink);
}

/* Query title defaults (archive H1s) */
.wp-block-query-title {
	margin: 0;
	font-weight: 400;
	text-wrap: pretty;
}

/* Term description body tone */
.wp-block-term-description {
	font-family: var(--wp--preset--font-family--soft);
	font-size: var(--wp--preset--font-size--body);
	line-height: var(--wp--custom--type--body--line-height);
	letter-spacing: var(--wp--custom--type--body--letter-spacing);
}

/* =========================================================================
   18. Refinements
   ========================================================================= */

/* Breadcrumb current item reads ink */
.wp-block-breadcrumbs span[aria-current] {
	color: var(--wp--preset--color--ink);
}

/* Article head rhythm (56px under the 122px chrome offset) */
.twm-article-head {
	padding-top: 56px;
}

.twm-article-head .wp-block-post-title {
	margin: 22px 0 0;
	max-width: 1000px;
}

/* Page / archive H1 rhythm */
.twm-page-title,
.twm-index-title {
	margin: 22px 0 0;
	max-width: 900px;
}

/* Site-title reused as the index kicker */
.twm-index-kicker,
.twm-index-kicker a {
	font-family: var(--wp--preset--font-family--meta) !important;
	font-size: var(--wp--preset--font-size--meta) !important;
	line-height: var(--wp--custom--type--meta--line-height) !important;
	letter-spacing: var(--wp--custom--type--meta--letter-spacing) !important;
	text-transform: uppercase;
	color: var(--wp--preset--color--secondary);
}

/* Header tools spacing (flex layout default gap is :where(), this wins) */
.twm-header-tools {
	gap: 30px;
}

.twm-card-meta {
	gap: 8px;
}

.twm-drawer-utility .wp-block-navigation__container {
	gap: 20px;
}

/* Cover internals for the front hero */
.twm-hero .wp-block-cover__inner-container {
	width: 100%;
	margin: 0;
}

.twm-hero .wp-block-cover__image-background {
	object-position: 50% 42%;
}

/* Rail nav paragraphs are plain wrappers */
.twm-rail-nav p {
	margin: 0;
	padding: 11px 0;
	border-top: 1px solid var(--wp--preset--color--hairline);
}

.twm-rail-nav a {
	padding: 0;
	border-top: 0;
}

@media (max-width: 1024px) {
	.twm-rail-nav p {
		padding: 0;
		border-top: 0;
	}
}

/* Search rows: query wrapper spacing under the head */
.twm-rows.twm-section {
	padding-top: 32px;
}

/* Booking meta spans sit at both ends */
.twm-booking-meta span:last-child {
	margin-left: auto;
}

/* Post date block renders a div; keep it inline in meta rows */
.twm-card-meta .wp-block-post-date,
.twm-glance .wp-block-post-date {
	display: inline-block;
	margin: 0;
}

/* Front hero query wrapper is invisible chrome */
.twm-hero-flush {
	margin: 0;
}

/* Letter strip button wrapper */
.twm-letter .wp-block-buttons {
	flex: none;
}

/* Group blocks the theme lays out itself: cancel the flow gap inside them.
   Child rules that set their own margins are more specific and still win. */
.twm-bookings-grid > .wp-block-group,
.twm-booking > *,
.twm-endnote-rows > .twm-endnote-row,
.twm-page-grid > .twm-page-prose,
.twm-page-grid > .twm-page-rail,
.twm-feature-layout > .twm-feature-copy,
.twm-feature-layout > .twm-card-media,
.twm-footer-top > .wp-block-navigation,
.twm-footer-legal > .wp-block-navigation,
.twm-drawer > .twm-drawer-feature,
.twm-drawer-top > .wp-block-navigation-overlay-close,
.twm-drawer-bottom > .wp-block-navigation,
.twm-band-head > .wp-block-buttons,
.twm-band-head > .wp-block-group,
.twm-rule-row > .wp-block-separator,
.twm-rule-row > p,
.twm-related-head > .wp-block-group,
.twm-archive-title-row > .twm-archive-dek,
.twm-constellation-head > p,
.twm-cal-head > .twm-cal-dek,
.twm-letter > .wp-block-buttons {
	margin-block-start: 0;
	margin-block-end: 0;
}

/* =========================================================================
   19. Type and media steps at the design's breakpoints
   The design steps these values at 1024px and 640px rather than
   interpolating; everything below is transcribed from its media queries.
   Kept last so the cascade is deterministic.
   ========================================================================= */

@media (max-width: 1024px) {
	.twm-hero-title {
		font-size: 34px;
		line-height: 44px;
		letter-spacing: 1px;
	}

	.twm-feature-title {
		font-size: 30px;
		line-height: 40px;
	}

	.twm-feature .twm-card-media {
		aspect-ratio: 4 / 3;
	}

	.wp-block-query-title,
	.twm-page-title,
	.twm-hub-title,
	.twm-404-title,
	.twm-index-title {
		font-size: 30px;
		line-height: 40px;
		letter-spacing: 1px;
	}

	.twm-has-lead .wp-block-post-template > .wp-block-post:first-child .twm-card-media {
		aspect-ratio: 4 / 5;
	}

	.twm-search-field .wp-block-search__input {
		font-size: 30px;
		line-height: 40px;
		letter-spacing: 1px;
	}

	.twm-drawer-feature-copy .twm-card-title {
		font-size: 22px;
		line-height: 30px;
		letter-spacing: 0.5px;
	}

	.twm-collection-row .twm-collection-name {
		font-size: 22px;
		line-height: 30px;
		letter-spacing: 0.5px;
	}
}

@media (max-width: 640px) {
	.twm-hero-title {
		font-size: 28px;
		line-height: 38px;
		letter-spacing: 0.6px;
	}

	.twm-feature-title {
		font-size: 22px;
		line-height: 30px;
	}

	.wp-block-query-title,
	.twm-page-title,
	.twm-hub-title,
	.twm-404-title,
	.twm-index-title {
		font-size: 22px;
		line-height: 30px;
		letter-spacing: 0.5px;
	}

	.twm-has-lead .wp-block-post-template > .wp-block-post:first-child .twm-card-title {
		font-size: 30px;
		line-height: 40px;
		letter-spacing: 1px;
	}

	.twm-search-field .wp-block-search__input {
		font-size: 24px;
		line-height: 34px;
		letter-spacing: 0.5px;
	}

	.twm-rows .twm-card-title,
	.twm-rows .twm-card-title a {
		font-size: 18px;
		line-height: 26px;
	}

	.twm-collection-row .twm-collection-name {
		font-size: 22px;
		line-height: 28px;
		letter-spacing: 0.5px;
	}

	/* Card media: the archive, hub, lately and calendar grids go 4:5; the
	   front page keeps its own ratios (week 2:3, the Seasons 3:4). */
	.twm-grid .twm-card-media {
		aspect-ratio: 4 / 5;
	}

	.twm-week .twm-card-media {
		aspect-ratio: 2 / 3;
	}

	.twm-seasons .twm-card-media {
		aspect-ratio: 3 / 4;
	}

	/* The front page grids keep the 32px gap the design gives them. */
	.twm-week .wp-block-post-template,
	.twm-seasons .wp-block-post-template {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}

/* The lead story's title keeps its 22px offset at every width, and holds the
   display size until the design steps it down at 640. */
.twm-has-lead .wp-block-post-template > .wp-block-post:first-child .twm-card-title {
	margin-top: 22px;
}

@media (max-width: 1024px) {
	.twm-has-lead .wp-block-post-template > .wp-block-post:first-child .twm-card-title {
		font-size: var(--wp--preset--font-size--display);
		line-height: var(--wp--custom--type--display--line-height);
		letter-spacing: var(--wp--custom--type--display--letter-spacing);
	}
}

@media (max-width: 640px) {
	.twm-has-lead .wp-block-post-template > .wp-block-post:first-child .twm-card-title {
		font-size: 30px;
		line-height: 40px;
		letter-spacing: 1px;
	}
}

/* The article screen keeps its 80px side padding down to 640 — its 1024
   breakpoint reduces only the top offset and the column padding, unlike the
   other screens, which drop to 24px. (80px − the 24px gutter = 56px.) */
@media (min-width: 641px) and (max-width: 1024px) {
	.twm-article-head,
	.twm-article-hero,
	.twm-prose,
	.twm-related {
		padding-left: 56px;
		padding-right: 56px;
	}
}

/* The related rail keeps three columns until the design collapses it at 640. */
@media (max-width: 1024px) {
	.twm-grid-3 .wp-block-post-template {
		grid-template-columns: repeat(3, 1fr);
		gap: 36px;
	}
}

@media (max-width: 640px) {
	.twm-grid-3 .wp-block-post-template {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}

/* Collection hub: the design's exact head and band offsets. */
.twm-hub-title {
	margin-top: 20px;
	max-width: 900px;
}

.twm-way .wp-block-post-content p {
	margin-top: 24px;
}

.twm-month-band .twm-months {
	margin-top: 34px;
}

/* =========================================================================
   20. Shelf archive: dropdowns, collections rail, Load More
   Transcribed from the category comp; the dropdowns are native disclosure
   elements so they open without JavaScript.
   ========================================================================= */

.twm-tools-right {
	display: flex;
	align-items: center;
	gap: 22px;
	margin-left: auto;
}

.twm-drop {
	position: relative;
}

.twm-drop > summary {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	white-space: nowrap;
	color: var(--wp--preset--color--ink);
	list-style: none;
}

.twm-drop > summary::-webkit-details-marker {
	display: none;
}

.twm-drop > summary > span {
	max-width: 200px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.twm-drop > summary svg {
	flex: none;
	transition: transform 0.2s ease;
}

.twm-drop[open] > summary svg {
	transform: rotate(180deg);
}

.twm-drop-panel {
	position: absolute;
	left: 0;
	top: calc(100% + 14px);
	z-index: 15;
	width: 260px;
	max-width: calc(100vw - 36px);
	max-height: min(56vh, 340px);
	overflow-y: auto;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--hairline);
	padding: 6px 0;
}

.twm-drop-panel-right {
	left: auto;
	right: 0;
}

.twm-drop-panel a {
	display: block;
	padding: 11px 18px;
	text-decoration: none;
	color: var(--wp--preset--color--secondary);
}

.twm-drop-list a {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
	padding: 9px 18px;
}

.twm-drop-panel a:hover,
.twm-drop-panel a:focus-visible {
	background: rgba(0, 0, 0, 0.03);
	text-decoration: none;
}

.twm-drop-panel a.is-current {
	color: var(--wp--preset--color--ink);
}

.twm-drop-count {
	color: var(--wp--preset--color--secondary);
}

.twm-drop-find {
	padding: 10px 18px 12px;
	border-bottom: 1px solid var(--wp--preset--color--hairline);
}

.twm-drop-find input {
	width: 100%;
	box-sizing: border-box;
	border: 0;
	outline: none;
	background: transparent;
	font-family: var(--wp--preset--font-family--soft);
	font-size: var(--wp--preset--font-size--body);
	line-height: var(--wp--custom--type--body--line-height);
	letter-spacing: var(--wp--custom--type--body--letter-spacing);
	color: var(--wp--preset--color--ink);
}

/* The subcategory dropdown stands in for the chips below 1024. */
.twm-sub-drop {
	display: none;
}

/* Collections rail */
.twm-hubs-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}

.twm-flourish {
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-weight: 400;
	font-size: var(--wp--preset--font-size--section);
	line-height: var(--wp--custom--type--section--line-height);
	letter-spacing: var(--wp--custom--type--section--letter-spacing);
	margin: 0;
}

.twm-hubs-actions {
	display: flex;
	align-items: center;
	gap: 22px;
}

.twm-hubs-nav {
	display: flex;
	align-items: center;
	gap: 10px;
}

.twm-hubs-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	flex: none;
	border: 1px solid var(--wp--preset--color--hairline);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.twm-hubs-arrow:hover,
.twm-hubs-arrow:focus-visible {
	background: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	text-decoration: none;
}

.twm-hubs-all-inline,
.twm-hubs-all {
	font-family: var(--wp--preset--font-family--meta);
	font-size: var(--wp--preset--font-size--meta);
	line-height: var(--wp--custom--type--meta--line-height);
	letter-spacing: var(--wp--custom--type--meta--letter-spacing);
	text-transform: uppercase;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	border: 1px solid var(--wp--preset--color--hairline);
	padding: 12px 22px;
	white-space: nowrap;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.twm-hubs-all-inline:hover,
.twm-hubs-all-inline:focus-visible,
.twm-hubs-all:hover,
.twm-hubs-all:focus-visible {
	background: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	text-decoration: none;
}

.twm-hubs-all {
	display: none;
	margin-top: 24px;
	text-align: center;
	padding: 14px 22px;
}

.twm-hubs-row {
	margin-top: 28px;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 84px) / 4);
	gap: 0 28px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.twm-hubs-row::-webkit-scrollbar {
	display: none;
}

.twm-hub-card {
	display: block;
	scroll-snap-align: start;
	text-decoration: none;
	color: var(--wp--preset--color--ink);
	transition: opacity 0.2s ease;
}

.twm-hub-card:hover,
.twm-hub-card:focus-visible {
	opacity: 0.74;
	text-decoration: none;
}

.twm-hub-card-media {
	display: block;
	aspect-ratio: 4 / 5;
	background: var(--wp--preset--color--sand);
	overflow: hidden;
}

.twm-hub-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 40%;
	display: block;
}

.twm-hub-card-name {
	display: block;
	margin-top: 16px;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--card);
	line-height: var(--wp--custom--type--card--line-height);
	letter-spacing: var(--wp--custom--type--card--letter-spacing);
	text-wrap: pretty;
}

.twm-hub-card-count {
	display: block;
	margin-top: 8px;
	color: var(--wp--preset--color--secondary);
}

@media (max-width: 1024px) {
	.twm-chips {
		display: none;
	}

	.twm-sub-drop {
		display: block;
		flex: none;
	}

	.twm-tools {
		flex-wrap: nowrap;
		justify-content: space-between;
	}

	.twm-tools-right {
		flex: none;
		margin-left: 0;
		gap: 20px;
		flex-wrap: nowrap;
	}

	.twm-hubs-row {
		grid-auto-columns: calc((100% - 36px) / 3);
		gap: 0 18px;
	}
}

@media (max-width: 640px) {
	.twm-tools-right {
		gap: 16px;
	}

	.twm-tools-right > .twm-count {
		display: none;
	}

	.twm-hubs-head {
		flex-wrap: nowrap;
		gap: 16px;
	}

	.twm-hubs-head .twm-flourish {
		font-size: 22px;
		line-height: 30px;
		letter-spacing: 0.5px;
	}

	.twm-hubs-actions {
		flex: none;
		gap: 10px;
	}

	.twm-hubs-actions > .twm-hubs-all-inline {
		display: none;
	}

	.twm-hubs-all {
		display: block;
	}

	.twm-hubs-row {
		grid-auto-columns: calc((100% - 18px) / 2);
		gap: 0 18px;
	}
}
