/* ==========================================================================
   Thoralby Through Time
   Yorkshire Dales heritage styles for the City Town child theme.
   Accessibility rules: no italics, no capitals, no underlines for emphasis,
   readable sizes, visible focus, linear layout at 200% zoom.
   ========================================================================== */

:root {
	--ttt-limestone: #F5F1E8;
	--ttt-paper: #FCFAF5;
	--ttt-parchment: #EFE9DD;
	--ttt-rule: #D8CFBF;
	--ttt-slate: #2A2E31;
	--ttt-ink: #1E2124;
	--ttt-muted: #53585C;
	--ttt-moss: #435634;
	--ttt-moss-dark: #33432A;
	--ttt-brown: #6A4E35;
	--ttt-red: #8A3A2C;
	--ttt-ochre: #8A5E17;
	--ttt-ochre-light: #E2B55E;
	--ttt-radius: 6px;
	--ttt-focus: 3px solid var(--ttt-ochre);
	--ttt-contours:
		repeating-radial-gradient(ellipse 130% 90% at 78% 28%, transparent 0 34px, rgba(245, 241, 232, 0.09) 34px 35px),
		repeating-radial-gradient(ellipse 110% 80% at 12% 92%, transparent 0 28px, rgba(245, 241, 232, 0.07) 28px 29px);
}

/* ---------- Base ---------- */

body {
	/* Plain light background. The earlier paper-grain image could render as solid black in some browsers. */
	background-color: var(--ttt-limestone) !important;
	background-image: none !important;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

/* No italics anywhere: easier for dyslexic readers. Emphasis uses weight. */
em, i, cite, blockquote, figcaption, .wp-element-caption, address, dfn, var {
	font-style: normal !important;
}
em, i {
	font-weight: 700;
}

p, li, td, th, dd, dt {
	text-align: left;
	hyphens: none;
}

/* Inline links in text keep an underline so they are not shown by colour alone. */
.wp-block-post-content a,
.ttt-sources a,
.ttt-note a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}
a:hover {
	text-decoration-thickness: 2px;
}

/* Visible focus for keyboard users. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.wp-element-button:focus-visible,
[tabindex]:focus-visible {
	outline: var(--ttt-focus);
	outline-offset: 3px;
	border-radius: 2px;
	box-shadow: 0 0 0 6px var(--ttt-paper);
}

::selection {
	background: var(--ttt-ochre-light);
	color: var(--ttt-ink);
}

.skip-link.screen-reader-text:focus {
	background: var(--ttt-paper);
	color: var(--ttt-ink);
	font-size: 1.125rem;
	padding: 1rem 1.25rem;
	z-index: 100000;
}

img {
	height: auto;
}

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

.ttt-topbar {
	font-size: 1rem;
}
.ttt-topbar p {
	margin: 0;
}
.ttt-topbar a {
	color: var(--ttt-limestone);
	font-weight: 700;
}
.ttt-topbar a:hover {
	color: var(--ttt-ochre-light);
}

.ttt-header {
	background: var(--ttt-paper);
	border-bottom: 1px solid var(--ttt-rule);
	box-shadow: 0 3px 0 -1px var(--ttt-paper), 0 4px 0 -1px var(--ttt-rule);
}
.ttt-brand {
	gap: 0.85rem;
}
.ttt-brand-mark {
	flex: 0 0 auto;
	width: 3rem;
	height: 3rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--ttt-moss);
	color: var(--ttt-paper);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.3rem;
	line-height: 1;
	margin: 0;
	box-shadow: inset 0 0 0 3px var(--ttt-moss), inset 0 0 0 4px rgba(252, 250, 245, 0.55);
}
.ttt-brand .wp-block-site-title {
	margin: 0;
}
.ttt-tagline {
	margin: 0.15rem 0 0;
	color: var(--ttt-muted);
	font-size: 1rem;
	line-height: 1.35;
}

.ttt-header .wp-block-navigation {
	gap: 0.25rem 1.5rem;
}
.ttt-header .wp-block-navigation-item__content {
	padding: 0.6rem 0.15rem;
	text-decoration: none;
	color: var(--ttt-slate);
}
.ttt-header .wp-block-navigation-item__content:hover,
.ttt-header .current-menu-item > .wp-block-navigation-item__content,
.ttt-header .wp-block-navigation-item__content[aria-current="page"] {
	color: var(--ttt-moss-dark);
	text-decoration: underline;
	text-decoration-thickness: 3px;
	text-underline-offset: 0.45em;
	text-decoration-color: var(--ttt-ochre);
}
.ttt-header .wp-block-navigation__submenu-icon {
	width: 0.85rem;
	height: 0.85rem;
	margin-left: 0.35rem;
}
.ttt-header .wp-block-navigation__submenu-container {
	background: var(--ttt-paper) !important;
	border: 1px solid var(--ttt-rule) !important;
	border-top: 3px solid var(--ttt-moss) !important;
	border-radius: 0 0 var(--ttt-radius) var(--ttt-radius);
	padding: 0.5rem 0 !important;
	min-width: 16rem !important;
	box-shadow: 0 12px 28px rgba(30, 33, 36, 0.12);
}
.ttt-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.65rem 1.1rem !important;
	font-weight: 400;
}
.ttt-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background: var(--ttt-parchment);
	text-decoration: none;
}
.ttt-header .wp-block-navigation-submenu__toggle {
	padding: 0.6rem 0.15rem;
	font-weight: 700;
	color: var(--ttt-slate);
}

/* Mobile menu button and overlay. */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	min-width: 48px;
	min-height: 48px;
	border: 2px solid var(--ttt-slate);
	border-radius: var(--ttt-radius);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0 0.75rem;
}
.wp-block-navigation__responsive-container-open::after {
	content: "Menu";
	font-weight: 700;
	font-size: 1rem;
}
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--ttt-paper) !important;
	color: var(--ttt-slate) !important;
	padding: 1.25rem !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.25rem;
	padding: 0.6rem 0 !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	border: 0 !important;
	box-shadow: none;
	padding-left: 1rem !important;
	border-left: 3px solid var(--ttt-rule) !important;
}

/* ---------- Breadcrumbs ---------- */

.ttt-breadcrumbs ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0;
	font-size: 1rem;
}
.ttt-breadcrumbs li {
	display: inline-flex;
	align-items: center;
}
.ttt-breadcrumbs li + li::before {
	content: "";
	display: inline-block;
	width: 0.45rem;
	height: 0.45rem;
	border-right: 2px solid var(--ttt-muted);
	border-top: 2px solid var(--ttt-muted);
	transform: rotate(45deg);
	margin: 0 0.75rem 0 0.55rem;
}
.ttt-breadcrumbs a {
	color: var(--ttt-moss-dark);
	text-underline-offset: 0.2em;
}
.ttt-breadcrumbs [aria-current] {
	color: var(--ttt-muted);
}
.ttt-on-dark .ttt-breadcrumbs a,
.ttt-on-dark .ttt-breadcrumbs [aria-current] {
	color: var(--ttt-limestone);
}
.ttt-on-dark .ttt-breadcrumbs li + li::before {
	border-color: var(--ttt-ochre-light);
}

/* ---------- Page header band ---------- */

.ttt-page-header {
	position: relative;
	background-color: var(--ttt-parchment);
	border-bottom: 1px solid var(--ttt-rule);
}
.ttt-page-header::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 4px;
	border-bottom: 1px solid var(--ttt-rule);
	pointer-events: none;
}
/* Internal page headers: breadcrumbs, title and summary all start at the same
   left edge as the site title and the menu (the site's wide width, 78rem).
   The title and summary keep a comfortable line length by stopping short on
   the right, rather than being narrowed and centred. */
/* ---------- World War One biography pages ---------- */

/* Line under the title: dates, place and the "ultimate sacrifice" badge */
.ttt-bio-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  margin-top: 0 !important;
  margin-bottom: 2.25rem !important;
  padding: 0 0 1.25rem;
  border-bottom: 1px solid var(--ttt-rule);
  font-size: 1.0625rem;
  color: var(--ttt-muted);
}
.ttt-bio-meta > p { margin: 0 !important; }
.ttt-bio-dates { font-weight: 700; color: var(--ttt-ochre); letter-spacing: 0.02em; }
.ttt-bio-fallen {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.85rem;
  border-radius: 999px;
  background: #F4E4DF;
  color: var(--ttt-red);
  font-weight: 700;
}
.ttt-bio-fallen::before {
  content: "+" / "";
  font-size: 1.35em;
  line-height: 1;
  font-weight: 700;
  color: #B3261E;
}

/* Text on the left, portrait on the right; stacks on narrow screens */
.wp-block-columns.ttt-bio-layout {
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

/* Framed photographs */
.ttt-bio-layout figure.wp-block-image,
.ttt-bio-gallery figure.wp-block-image,
.ttt-bio-set {
  margin: 0 0 1.5rem;
  background: var(--ttt-paper);
  border: 1px solid var(--ttt-rule);
  border-radius: var(--ttt-radius);
  box-shadow: 0 1px 2px rgba(30, 33, 36, 0.08), 0 8px 20px rgba(30, 33, 36, 0.08);
  overflow: hidden;
}
.ttt-bio-layout figure.wp-block-image img,
.ttt-bio-gallery figure.wp-block-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 0;
  box-shadow: none;
}
/* Small pictures in a shared frame (such as medals) keep their own size */
.ttt-bio-set .wp-block-columns figure.wp-block-image img { width: auto; }
.ttt-bio-layout figure.wp-block-image figcaption,
.ttt-bio-gallery figure.wp-block-image figcaption,
.ttt-bio-set > .ttt-bio-caption {
  margin: 0 !important;
  padding: 0.65rem 0.9rem 0.75rem;
  border-top: 1px solid var(--ttt-rule);
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ttt-muted);
  text-align: left;
}

/* Photographs below the text, in a grid of two or three */
.ttt-bio-gallery {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.5rem !important;
}
.ttt-bio-gallery > * { margin: 0 !important; max-width: none !important; }

/* Several small pictures that share one caption, such as a set of medals */
.ttt-bio-set .wp-block-columns {
  gap: 0.75rem;
  align-items: center;
  margin: 0 !important;
  padding: 0.75rem;
}
.ttt-bio-set .wp-block-columns figure.wp-block-image {
  margin: 0 !important;
  border: 0;
  box-shadow: none;
  background: none;
}

/* Source and credit lines */
.ttt-bio-source { font-size: 0.9375rem; color: var(--ttt-muted); }

/* One-sentence summary under the name, with a gold rule on the left */
.ttt-bio-standfirst {
  box-sizing: border-box;
  margin-top: 0 !important;
  margin-bottom: 2.25rem !important;
  padding: 0.15rem 0 0.15rem 1.1rem;
  border-left: 3px solid var(--ttt-ochre);
  font-family: var(--wp--preset--font-family--heading, Georgia, serif);
  font-size: 1.3125rem;
  line-height: 1.5;
  color: var(--ttt-ink);
}

/* Dark information box in the right-hand column */
.ttt-bio-box {
  margin: 0 0 1.5rem !important;
  padding: 1.25rem 1.35rem;
  border-radius: var(--ttt-radius);
  background: var(--ttt-slate);
  color: var(--ttt-limestone);
  box-shadow: 0 1px 2px rgba(30, 33, 36, 0.08), 0 8px 20px rgba(30, 33, 36, 0.08);
}
.ttt-bio-box > * { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
.ttt-bio-box h2, .ttt-bio-box h3 {
  margin: 0 0 0.75rem !important;
  color: var(--ttt-ochre-light);
  font-size: 1.0625rem;
  letter-spacing: 0.03em;
}
.ttt-bio-box h2::before, .ttt-bio-box h3::before { content: "✦ " / ""; }
.ttt-bio-box p, .ttt-bio-box li { color: var(--ttt-limestone); font-size: 0.9375rem; line-height: 1.5; }
.ttt-bio-box ul { list-style: none; margin: 0 !important; padding: 0; }
.ttt-bio-box li { padding: 0.6rem 0; border-bottom: 1px solid rgba(245, 241, 232, 0.18); }
.ttt-bio-box li:first-child { padding-top: 0; }
.ttt-bio-box li:last-child { border-bottom: 0; padding-bottom: 0; }
.ttt-bio-box strong { display: block; color: #FFFFFF; font-size: 1rem; }

/* "Remembered" box for those who died */
.ttt-bio-remembered {
  margin: 0 0 1.5rem !important;
  padding: 1.1rem 1.35rem;
  border: 1px solid #E3C2BA;
  border-radius: var(--ttt-radius);
  background: #F8EDEA;
}
.ttt-bio-remembered > * { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
.ttt-bio-remembered h2, .ttt-bio-remembered h3 { margin: 0 0 0.5rem !important; color: var(--ttt-red); font-size: 1.0625rem; }
.ttt-bio-remembered h2::before, .ttt-bio-remembered h3::before { content: "+ " / ""; color: #B3261E; font-weight: 700; }
.ttt-bio-remembered p { margin: 0 !important; font-size: 0.9375rem; line-height: 1.5; color: var(--ttt-ink); }

/* Photographs below the text: two columns, as on the Bolt design */
@media (min-width: 700px) {
  .ttt-bio-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Boxes inside articles: content fills the box instead of a narrow centred column */
.ttt-sources.is-layout-constrained > *,
.ttt-note.is-layout-constrained > * {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.ttt-page-header.is-layout-constrained > * {
	max-width: var(--wp--style--global--wide-size) !important;
	margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size)) / 2)) !important;
	margin-right: auto !important;
}
.ttt-page-header.is-layout-constrained > .wp-block-post-title {
	margin-top: 0.75rem;
	max-width: min(22ch, var(--wp--style--global--wide-size)) !important;
}
.ttt-page-header.is-layout-constrained > .ttt-page-summary {
	max-width: min(46rem, var(--wp--style--global--wide-size)) !important;
}
.ttt-page-summary {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
	color: var(--ttt-slate);
	margin-top: 0.75rem;
}

/* Article header (contour band, or the featured image when one is set). */
.ttt-article-hero {
	background-image: var(--ttt-contours);
}
.ttt-article-hero .wp-block-post-title {
	color: var(--ttt-paper);
	max-width: 20ch;
}
.ttt-article-hero .ttt-page-summary {
	color: var(--ttt-limestone);
}
.ttt-article-hero .wp-block-post-terms a {
	color: var(--ttt-ochre-light);
	font-weight: 700;
}
.ttt-article-hero .wp-block-post-date,
.ttt-article-hero .ttt-meta-line {
	color: var(--ttt-limestone);
}

/* Covers: contour lines on the overlay; full colour until a photograph is added. */
.ttt-hero .wp-block-cover__background,
.ttt-article-hero .wp-block-cover__background {
	background-image: var(--ttt-contours);
}
.ttt-hero:not(:has(.wp-block-cover__image-background)) .wp-block-cover__background,
.ttt-article-hero:not(:has(.wp-block-cover__image-background)) .wp-block-cover__background {
	opacity: 1;
}
.ttt-hero .wp-block-cover__background {
	background-image:
		linear-gradient(180deg, rgba(30, 33, 36, 0) 40%, rgba(30, 33, 36, 0.55) 100%),
		var(--ttt-contours);
}
/* When a photograph is used, show it clean: no contour lines over it. */
.wp-block-cover:has(.wp-block-cover__image-background) .wp-block-cover__background,
.wp-block-cover:has(.wp-block-cover__video-background) .wp-block-cover__background {
	background-image: none;
}
.ttt-hero:has(.wp-block-cover__image-background),
.ttt-article-hero:has(.wp-block-cover__image-background) {
	background-image: none;
}

/* ---------- Content ---------- */

.ttt-summary {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.55;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--ttt-rule);
}
/* The template shows the summary from the excerpt, so hide the duplicate in content when the page header shows it. */
.ttt-has-summary .wp-block-post-content > .ttt-summary:first-child {
	display: none;
}

.wp-block-post-content h2 {
	margin-top: 2.75rem;
	padding-top: 1rem;
	border-top: 1px solid var(--ttt-rule);
}
.wp-block-post-content h2:first-child,
.wp-block-post-content .ttt-card h2,
.wp-block-post-content .ttt-note h2,
.wp-block-post-content .ttt-sources h2 {
	border-top: 0;
	padding-top: 0;
	margin-top: 0;
}
.wp-block-post-content h3 {
	margin-top: 2rem;
}

.ttt-status {
	background: var(--ttt-paper);
	border: 1px solid var(--ttt-rule);
	border-left: 5px solid var(--ttt-ochre);
	padding: 0.85rem 1.1rem;
	border-radius: 0 var(--ttt-radius) var(--ttt-radius) 0;
}
.ttt-status::before {
	content: "In progress: ";
	font-weight: 700;
	color: var(--ttt-brown);
}

.ttt-small {
	font-size: 1rem;
	color: var(--ttt-muted);
}

/* Archival captions: fine rule above, plain style. */
.wp-block-image figcaption,
.wp-block-gallery figcaption,
.wp-block-table figcaption,
.wp-block-embed figcaption {
	border-top: 1px solid var(--ttt-rule);
	padding-top: 0.55rem;
	margin-top: 0.6rem;
	text-align: left;
	color: var(--ttt-muted);
	font-size: 1rem;
}
.wp-block-image img {
	border-radius: 2px;
	box-shadow: 0 0 0 1px var(--ttt-rule), 0 0 0 6px var(--ttt-paper), 0 0 0 7px var(--ttt-rule);
}
.wp-block-image {
	margin-top: 2rem;
	margin-bottom: 2rem;
}

/* Pull quotes. */
.wp-block-pullquote {
	text-align: left;
	margin-top: 2.25rem;
	margin-bottom: 2.25rem;
}
.wp-block-pullquote blockquote {
	margin: 0;
}
.wp-block-pullquote p {
	font-size: inherit;
	line-height: 1.35;
}
.wp-block-pullquote cite {
	display: block;
	margin-top: 0.75rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	color: var(--ttt-muted);
	text-transform: none;
}

/* Notes and sources. */
.ttt-note,
.ttt-sources {
	border-radius: var(--ttt-radius);
	padding: clamp(1.25rem, 3vw, 2rem) !important;
	margin-top: 2.5rem;
}
.ttt-note {
	background: var(--ttt-moss);
	color: var(--ttt-paper);
	background-image: var(--ttt-contours);
}
.ttt-note h2,
.ttt-note h3,
.ttt-note p {
	color: var(--ttt-paper);
}
.ttt-note a:not(.wp-element-button) {
	color: var(--ttt-paper);
}
.ttt-note .wp-element-button {
	background: var(--ttt-ochre-light);
	border-color: var(--ttt-ochre-light);
	color: var(--ttt-ink);
}
.ttt-note .wp-element-button:hover {
	background: var(--ttt-paper);
	border-color: var(--ttt-paper);
	color: var(--ttt-ink);
}
.ttt-sources {
	background: var(--ttt-paper);
	border: 1px solid var(--ttt-rule);
	border-top: 3px double var(--ttt-rule);
	font-size: 1rem;
}
.ttt-sources h2 {
	font-size: var(--wp--preset--font-size--large);
}
.ttt-sources ul {
	padding-left: 1.2rem;
}

/* Jump navigation. */
.ttt-jumpnav {
	background: var(--ttt-paper);
	border: 1px solid var(--ttt-rule);
	border-radius: var(--ttt-radius);
	padding: 1rem 1.25rem !important;
}
.ttt-jump-label {
	font-weight: 700;
	margin: 0 0 0.5rem;
}
.ttt-jump {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
}
.ttt-coming li::marker {
	color: var(--ttt-ochre);
}

/* Stats. */
.ttt-stats {
	gap: 1rem !important;
}
.ttt-stat {
	background: var(--ttt-paper);
	border: 1px solid var(--ttt-rule);
	border-radius: var(--ttt-radius);
	padding: 1rem 1.25rem;
	margin: 0;
	color: var(--ttt-muted);
}
.ttt-stat strong {
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 400;
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: 1.05;
	color: var(--ttt-moss-dark);
}

/* ---------- Tables ---------- */

.wp-block-table {
	overflow-x: auto;
}
.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
	background: var(--ttt-paper);
}
.wp-block-table th,
.wp-block-table td {
	border: 0;
	border-bottom: 1px solid var(--ttt-rule);
	padding: 0.75rem 1rem;
	vertical-align: top;
}
.wp-block-table thead th {
	background: var(--ttt-moss-dark);
	color: var(--ttt-paper);
	font-weight: 700;
	border-bottom: 0;
}
.wp-block-table tbody tr:nth-child(even) {
	background: var(--ttt-limestone);
}
.wp-block-table thead {
	border-bottom: 0;
}
.ttt-records td:first-child {
	font-weight: 700;
	white-space: nowrap;
}
.ttt-facts table {
	border-top: 3px double var(--ttt-rule);
}
.ttt-facts th {
	width: 38%;
	font-weight: 700;
	color: var(--ttt-moss-dark);
	background: var(--ttt-parchment);
}
.ttt-timeline-table td:first-child {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.2rem;
	color: var(--ttt-moss-dark);
	white-space: nowrap;
	width: 9rem;
}

/* ---------- Cards ---------- */

.ttt-card,
.ttt-card-grid .ttt-card {
	position: relative;
	background: var(--ttt-paper);
	border: 1px solid var(--ttt-rule);
	border-top: 4px solid var(--ttt-moss);
	border-radius: 0 0 var(--ttt-radius) var(--ttt-radius);
	padding: 1.35rem 1.4rem 1.5rem !important;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.ttt-card > * {
	margin-top: 0;
	margin-bottom: 0.6rem;
}
.ttt-card > *:last-child {
	margin-bottom: 0;
}
.ttt-card h3 {
	font-size: 1.35rem;
	margin: 0.25rem 0 0.6rem;
}
.ttt-card-link {
	color: var(--ttt-slate);
	text-decoration: none;
}
/* Make the whole card a large click target. */
.ttt-card-link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}
.ttt-card:hover,
.ttt-card:focus-within {
	border-top-color: var(--ttt-ochre);
	box-shadow: 0 10px 24px rgba(42, 46, 49, 0.10);
}
.ttt-card:hover .ttt-card-link,
.ttt-card:focus-within .ttt-card-link {
	color: var(--ttt-moss-dark);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
}
.ttt-card-link:focus-visible {
	outline: none;
	box-shadow: none;
}
.ttt-card:focus-within {
	outline: var(--ttt-focus);
	outline-offset: 3px;
}
.ttt-card a:not(.ttt-card-link) {
	position: relative;
	z-index: 2;
}
.ttt-card-label,
.ttt-tag {
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--ttt-brown);
	letter-spacing: 0.01em;
}
.ttt-card-image {
	display: block;
	width: calc(100% + 2.8rem);
	max-width: none;
	margin: -1.35rem -1.4rem 1rem !important;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}
.ttt-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
	gap: 1.5rem;
}

/* Map cards get a small map-sheet header. */
.ttt-map-card {
	padding-top: 6.5rem !important;
	border-top-width: 1px !important;
}
.ttt-map-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 5.25rem;
	background-color: var(--ttt-moss);
	background-image:
		repeating-radial-gradient(ellipse 120% 90% at 70% 30%, transparent 0 12px, rgba(245, 241, 232, 0.18) 12px 13px),
		linear-gradient(90deg, rgba(245, 241, 232, 0.12) 1px, transparent 1px),
		linear-gradient(0deg, rgba(245, 241, 232, 0.12) 1px, transparent 1px);
	background-size: auto, 2.5rem 2.5rem, 2.5rem 2.5rem;
	border-bottom: 3px double var(--ttt-rule);
}
.ttt-map-card:nth-child(3n+2)::before { background-color: var(--ttt-brown); }
.ttt-map-card:nth-child(3n+3)::before { background-color: var(--ttt-slate); }
.ttt-meta {
	font-size: 1rem;
	color: var(--ttt-muted);
}
.ttt-year {
	font-weight: 700;
	color: var(--ttt-slate);
}

/* ---------- Filters ---------- */

.ttt-filter-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 1rem 1.25rem;
	background: var(--ttt-paper);
	border: 1px solid var(--ttt-rule);
	border-radius: var(--ttt-radius);
	padding: 1.1rem 1.25rem;
	margin-bottom: 1.25rem;
}
.ttt-filter-bar label {
	display: block;
	font-weight: 700;
	margin-bottom: 0.35rem;
}
.ttt-filter-field {
	flex: 1 1 14rem;
}
.ttt-filter-bar input,
.ttt-filter-bar select {
	width: 100%;
	min-height: 48px;
	font: inherit;
	font-size: 1.0625rem;
	color: var(--ttt-ink);
	background: #fff;
	border: 2px solid var(--ttt-muted);
	border-radius: var(--ttt-radius);
	padding: 0.5rem 0.75rem;
}
.ttt-filter-bar button {
	min-height: 48px;
	font: inherit;
	font-weight: 700;
	background: transparent;
	color: var(--ttt-moss-dark);
	border: 2px solid var(--ttt-moss);
	border-radius: var(--ttt-radius);
	padding: 0.5rem 1rem;
	cursor: pointer;
}
.ttt-filter-bar button:hover {
	background: var(--ttt-parchment);
}
.ttt-filter-count {
	flex-basis: 100%;
	margin: 0;
	font-weight: 700;
	color: var(--ttt-moss-dark);
}
.ttt-filter-empty {
	padding: 1rem 1.25rem;
	background: var(--ttt-paper);
	border: 1px dashed var(--ttt-muted);
	border-radius: var(--ttt-radius);
}

/* ---------- Forms ---------- */

.ttt-form {
	background: var(--ttt-paper);
	border: 1px solid var(--ttt-rule);
	border-radius: var(--ttt-radius);
	padding: clamp(1.25rem, 3vw, 2rem);
}
.ttt-field {
	margin: 0 0 1.5rem;
	border: 0;
	padding: 0;
}
.ttt-field label,
.ttt-field legend {
	display: block;
	font-weight: 700;
	margin-bottom: 0.35rem;
}
.ttt-hint {
	display: block;
	color: var(--ttt-muted);
	margin-bottom: 0.4rem;
}
.ttt-form input[type="text"],
.ttt-form input[type="email"],
.ttt-form textarea,
.wp-block-search__input {
	width: 100%;
	min-height: 52px;
	font: inherit;
	color: var(--ttt-ink);
	background: #fff;
	border: 2px solid var(--ttt-muted);
	border-radius: var(--ttt-radius);
	padding: 0.6rem 0.85rem;
}
.ttt-radios label.ttt-radio {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-weight: 400;
	min-height: 44px;
	margin: 0;
	cursor: pointer;
}
.ttt-radios input[type="radio"] {
	width: 1.4rem;
	height: 1.4rem;
	accent-color: var(--ttt-moss);
}
.ttt-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.ttt-form-message {
	border-radius: var(--ttt-radius);
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
	border: 2px solid;
}
.ttt-form-success {
	background: #EEF2E6;
	border-color: var(--ttt-moss);
}
.ttt-form-error {
	background: #F7E9E5;
	border-color: var(--ttt-red);
}

/* Search block. */
.wp-block-search__label {
	font-weight: 700;
	font-size: 1.125rem;
}
.wp-block-search__inside-wrapper {
	gap: 0.5rem;
	border: 0 !important;
	padding: 0 !important;
}
.wp-block-search__button {
	min-height: 52px;
	margin-left: 0 !important;
}

/* ---------- Homepage ---------- */

.ttt-hero {
	position: relative;
	background-image: var(--ttt-contours);
}
.ttt-hero .wp-block-cover__inner-container {
	max-width: 78rem;
}
.ttt-hero-kicker {
	color: var(--ttt-ochre-light);
	font-weight: 700;
	font-size: 1.0625rem;
	margin-bottom: 0.75rem;
}
.ttt-hero h1 {
	color: var(--ttt-paper);
	max-width: 14ch;
	margin-top: 0;
	text-wrap: balance;
}
.ttt-hero-intro {
	color: var(--ttt-limestone);
	font-size: var(--wp--preset--font-size--large);
	max-width: 40rem;
	line-height: 1.55;
}
.ttt-hero .wp-block-buttons {
	margin-top: 2rem;
	gap: 0.85rem;
}
.ttt-hero .wp-block-button:first-child .wp-element-button {
	background: var(--ttt-ochre-light);
	border-color: var(--ttt-ochre-light);
	color: var(--ttt-ink);
}
.ttt-hero .wp-block-button:first-child .wp-element-button:hover {
	background: var(--ttt-paper);
	border-color: var(--ttt-paper);
}
.ttt-hero .is-style-outline .wp-element-button {
	background: rgba(30, 33, 36, 0.35);
	border-color: var(--ttt-limestone);
	color: var(--ttt-paper);
}
.ttt-hero .is-style-outline .wp-element-button:hover {
	background: var(--ttt-paper);
	color: var(--ttt-ink);
}
.ttt-hero-caption {
	color: var(--ttt-limestone);
	font-size: 1rem;
	border-top: 1px solid rgba(245, 241, 232, 0.35);
	padding-top: 0.5rem;
	margin-top: 2.5rem;
	max-width: 30rem;
}

.ttt-section {
	padding-top: clamp(3rem, 7vw, 5.5rem);
	padding-bottom: clamp(3rem, 7vw, 5.5rem);
}
.ttt-section-head {
	margin-bottom: 2rem;
	max-width: 46rem;
}
.ttt-section-label {
	color: var(--ttt-brown);
	font-weight: 700;
	margin-bottom: 0.4rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.ttt-section-label::before {
	content: "";
	width: 2.25rem;
	height: 0;
	border-top: 3px double var(--ttt-ochre);
	padding-top: 2px;
}
.ttt-section-head h2 {
	margin-top: 0;
}
.ttt-section-head p {
	color: var(--ttt-muted);
	font-size: 1.125rem;
}
.ttt-band {
	background-color: var(--ttt-parchment);
	border-top: 1px solid var(--ttt-rule);
	border-bottom: 1px solid var(--ttt-rule);
}
.ttt-band-dark {
	background-color: var(--ttt-slate);
	background-image: var(--ttt-contours);
	color: var(--ttt-limestone);
}
.ttt-band-dark h2,
.ttt-band-dark h3 {
	color: var(--ttt-paper);
}
.ttt-band-dark .ttt-section-label {
	color: var(--ttt-ochre-light);
}
.ttt-band-dark .ttt-section-head p {
	color: var(--ttt-limestone);
}

/* Featured story grid: first card spans two columns on wide screens. */
.ttt-featured-grid {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
	gap: 1.5rem;
}
@media (min-width: 64rem) {
	.ttt-featured-grid {
		grid-template-columns: repeat(3, 1fr);
	}
	.ttt-featured-grid > .ttt-card:first-child {
		grid-column: span 2;
		grid-row: span 2;
		background-color: var(--ttt-moss-dark);
		background-image: var(--ttt-contours);
		border-top-color: var(--ttt-ochre-light);
		padding: 2.25rem !important;
		display: flex;
		flex-direction: column;
		justify-content: flex-end;
		min-height: 26rem;
	}
	.ttt-featured-grid > .ttt-card:first-child h3 {
		font-size: var(--wp--preset--font-size--xx-large);
		max-width: 16ch;
	}
	.ttt-featured-grid > .ttt-card:first-child .ttt-card-link,
	.ttt-featured-grid > .ttt-card:first-child p {
		color: var(--ttt-paper);
	}
	.ttt-featured-grid > .ttt-card:first-child .ttt-card-label {
		color: var(--ttt-ochre-light);
	}
	.ttt-featured-grid > .ttt-card:first-child p:last-child {
		font-size: 1.2rem;
		max-width: 36rem;
	}
}

/* Timeline. */
.ttt-timeline {
	position: relative;
	list-style: none;
	margin: 0;
	padding: 0;
}
.ttt-timeline::before {
	content: "";
	position: absolute;
	top: 0.5rem;
	bottom: 0.5rem;
	left: 0.55rem;
	border-left: 3px double rgba(245, 241, 232, 0.4);
}
.ttt-tl-item {
	position: relative;
	padding-left: 2.75rem !important;
	padding-bottom: 2rem;
}
.ttt-tl-item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.35rem;
	width: 1.15rem;
	height: 1.15rem;
	border-radius: 50%;
	background: var(--ttt-slate);
	border: 3px solid var(--ttt-ochre-light);
}
.ttt-tl-item > * {
	margin-top: 0;
	margin-bottom: 0.35rem;
}
.ttt-tl-date {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.1;
	color: var(--ttt-ochre-light);
}
.ttt-tl-item h3 {
	font-size: 1.3rem;
}
.ttt-tl-item p {
	color: var(--ttt-limestone);
	max-width: 40rem;
}
.ttt-tl-item a {
	color: var(--ttt-paper);
}
@media (min-width: 56rem) {
	.ttt-timeline::before {
		left: 12.55rem;
	}
	.ttt-tl-item {
		display: grid !important;
		grid-template-columns: 11rem 1fr;
		column-gap: 3.5rem;
		padding-left: 0 !important;
	}
	.ttt-tl-item::before {
		left: 12rem;
	}
	.ttt-tl-date {
		grid-column: 1;
		grid-row: 1 / span 3;
		text-align: right;
	}
	.ttt-tl-item > :not(.ttt-tl-date) {
		grid-column: 2;
	}
}

/* Archive spotlight list. */
.ttt-spotlight {
	gap: 0 !important;
	border-top: 3px double var(--ttt-rule);
}
.ttt-spot {
	position: relative;
	display: grid !important;
	grid-template-columns: 1fr;
	gap: 0.25rem 2rem;
	padding: 1.4rem 0.25rem !important;
	border-bottom: 1px solid var(--ttt-rule);
}
.ttt-spot > * {
	margin: 0 !important;
}
.ttt-spot h3 {
	font-size: 1.4rem;
}
.ttt-spot .ttt-spot-range {
	font-family: var(--wp--preset--font-family--heading);
	color: var(--ttt-moss-dark);
	font-size: 1.15rem;
}
.ttt-spot p:last-child {
	color: var(--ttt-muted);
}
.ttt-spot:hover {
	background: var(--ttt-paper);
}
@media (min-width: 52rem) {
	.ttt-spot {
		grid-template-columns: 10rem 18rem 1fr;
		align-items: baseline;
	}
}

/* Places. */
.ttt-place-list {
	gap: 1rem !important;
}
.ttt-place {
	position: relative;
	background: var(--ttt-paper);
	border: 1px solid var(--ttt-rule);
	border-left: 5px solid var(--ttt-brown);
	border-radius: 0 var(--ttt-radius) var(--ttt-radius) 0;
	padding: 1.1rem 1.25rem !important;
}
.ttt-place > * {
	margin: 0 0 0.35rem !important;
}
.ttt-place h3 {
	font-size: 1.25rem;
}
.ttt-place p {
	font-size: 1rem;
	color: var(--ttt-muted);
}
.ttt-place:hover,
.ttt-place:focus-within {
	border-left-color: var(--ttt-moss);
	box-shadow: 0 8px 20px rgba(42, 46, 49, 0.08);
}

/* Contribute band. */
.ttt-contribute {
	background-color: var(--ttt-moss);
	background-image: var(--ttt-contours);
	color: var(--ttt-paper);
}
.ttt-contribute h2,
.ttt-contribute p,
.ttt-contribute li {
	color: var(--ttt-paper);
}
.ttt-contribute ul {
	padding-left: 1.2rem;
}
.ttt-contribute li::marker {
	color: var(--ttt-ochre-light);
}
.ttt-contribute .wp-element-button {
	background: var(--ttt-ochre-light);
	border-color: var(--ttt-ochre-light);
	color: var(--ttt-ink);
}
.ttt-contribute .wp-element-button:hover {
	background: var(--ttt-paper);
	border-color: var(--ttt-paper);
	color: var(--ttt-ink);
}

/* ---------- Footer ---------- */

.ttt-footer {
	background-color: var(--ttt-ink);
	color: var(--ttt-limestone);
	border-top: 6px double var(--ttt-moss);
}
.ttt-footer h2 {
	color: var(--ttt-paper);
	font-size: 1.3rem;
	margin-bottom: 0.75rem;
}
.ttt-footer p,
.ttt-footer li {
	color: var(--ttt-limestone);
	font-size: 1rem;
}
.ttt-footer ul {
	list-style: none;
	padding: 0;
	margin: 0;
}
.ttt-footer li {
	margin-bottom: 0.55rem;
}
.ttt-footer a {
	color: var(--ttt-paper);
	text-decoration: underline;
	text-decoration-color: rgba(226, 181, 94, 0.6);
	text-underline-offset: 0.25em;
}
.ttt-footer a:hover {
	color: var(--ttt-ochre-light);
	text-decoration-color: var(--ttt-ochre-light);
}
.ttt-footer-mission {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.3rem !important;
	line-height: 1.45;
	color: var(--ttt-paper) !important;
}
.ttt-footer-bottom {
	border-top: 1px solid rgba(245, 241, 232, 0.2);
}
.ttt-footer .wp-block-search__input {
	min-height: 48px;
}
.ttt-footer .wp-block-search__label {
	color: var(--ttt-paper);
}

/* ---------- Post lists ---------- */

.ttt-post-list .wp-block-post {
	position: relative;
	background: var(--ttt-paper);
	border: 1px solid var(--ttt-rule);
	border-top: 4px solid var(--ttt-moss);
	border-radius: 0 0 var(--ttt-radius) var(--ttt-radius);
	padding: 1.35rem 1.4rem 1.5rem;
}
.ttt-post-list .wp-block-post-title {
	font-size: 1.35rem;
	margin: 0.25rem 0 0.5rem;
}
.ttt-post-list .wp-block-post-title a {
	color: var(--ttt-slate);
	text-decoration: none;
}
.ttt-post-list .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}
.ttt-post-list .wp-block-post:hover .wp-block-post-title a,
.ttt-post-list .wp-block-post:focus-within .wp-block-post-title a {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}
.ttt-post-list .wp-block-post:focus-within {
	outline: var(--ttt-focus);
	outline-offset: 3px;
}
.ttt-post-list .wp-block-post-title a:focus-visible {
	outline: none;
	box-shadow: none;
}
.ttt-post-list .wp-block-post-featured-image {
	margin: -1.35rem -1.4rem 1rem;
}
.ttt-post-list .wp-block-post-excerpt__more-link {
	display: none;
}

/* Previous and next. */
.ttt-post-nav {
	border-top: 3px double var(--ttt-rule);
	padding-top: 1.5rem;
	gap: 1rem;
}
.ttt-post-nav .wp-block-post-navigation-link {
	flex: 1 1 16rem;
	background: var(--ttt-paper);
	border: 1px solid var(--ttt-rule);
	border-radius: var(--ttt-radius);
	padding: 1rem 1.25rem;
}
.ttt-post-nav .post-navigation-link__label {
	display: block;
	font-weight: 700;
	color: var(--ttt-brown);
	font-size: 1rem;
}
.ttt-post-nav a {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.2rem;
}
.ttt-post-nav .post-navigation-link-next {
	text-align: right;
}

.wp-block-query-pagination {
	gap: 0.75rem;
	font-weight: 700;
}
.wp-block-query-pagination a {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	padding: 0 0.75rem;
	border: 2px solid var(--ttt-moss);
	border-radius: var(--ttt-radius);
	text-decoration: none;
}

/* ==========================================================================
   Light pages only: every section uses a light background with dark text.
   Contrast (WCAG 2.2 AA, 4.5:1 for text): slate on parchment 11.3:1,
   muted 5.9:1, moss-dark 8.8:1, brown 6.3:1, ochre 4.7:1. Paper on moss
   (buttons) 7.7:1. Dark backgrounds remain only behind photographs.
   ========================================================================== */

:root {
	--ttt-contours-light:
		repeating-radial-gradient(ellipse 130% 90% at 78% 28%, transparent 0 34px, rgba(67, 86, 52, 0.07) 34px 35px),
		repeating-radial-gradient(ellipse 110% 80% at 12% 92%, transparent 0 28px, rgba(67, 86, 52, 0.05) 28px 29px);
}

/* Top bar. */
.ttt-topbar,
.ttt-topbar.has-slate-background-color {
	background-color: var(--ttt-parchment) !important;
	color: var(--ttt-slate) !important;
	border-bottom: 1px solid var(--ttt-rule);
}
.ttt-topbar a {
	color: var(--ttt-moss-dark);
}
.ttt-topbar a:hover {
	color: var(--ttt-red);
}

/* Table headings. */
.wp-block-table thead th {
	background: var(--ttt-parchment);
	color: var(--ttt-slate);
	border-bottom: 3px solid var(--ttt-moss);
}

/* Notes and the contribute band. */
.ttt-note,
.ttt-contribute {
	background-color: var(--ttt-paper);
	background-image: var(--ttt-contours-light);
	color: var(--ttt-slate);
}
.ttt-note {
	border: 1px solid var(--ttt-rule);
	border-left: 6px solid var(--ttt-moss);
}
.ttt-contribute {
	border-top: 1px solid var(--ttt-rule);
	border-bottom: 1px solid var(--ttt-rule);
}
.ttt-note h2,
.ttt-note h3,
.ttt-note p,
.ttt-contribute h2,
.ttt-contribute p,
.ttt-contribute li {
	color: var(--ttt-slate);
}
.ttt-note a:not(.wp-element-button) {
	color: var(--ttt-moss-dark);
}
.ttt-contribute li::marker {
	color: var(--ttt-moss);
}
.ttt-note .wp-element-button,
.ttt-contribute .wp-element-button {
	background: var(--ttt-moss);
	border-color: var(--ttt-moss);
	color: var(--ttt-paper);
}
.ttt-note .wp-element-button:hover,
.ttt-contribute .wp-element-button:hover {
	background: var(--ttt-moss-dark);
	border-color: var(--ttt-moss-dark);
	color: var(--ttt-paper);
}

/* Timeline band. */
.ttt-band-dark {
	background-color: var(--ttt-paper);
	background-image: var(--ttt-contours-light);
	color: var(--ttt-slate);
	border-top: 1px solid var(--ttt-rule);
	border-bottom: 1px solid var(--ttt-rule);
}
.ttt-band-dark h2,
.ttt-band-dark h3 {
	color: var(--ttt-slate);
}
.ttt-band-dark .ttt-section-label {
	color: var(--ttt-brown);
}
.ttt-band-dark .ttt-section-head p {
	color: var(--ttt-muted);
}
.ttt-timeline::before {
	border-left-color: var(--ttt-rule);
}
.ttt-tl-item::before {
	background: var(--ttt-paper);
	border-color: var(--ttt-moss);
}
.ttt-tl-date {
	color: var(--ttt-moss-dark);
}
.ttt-tl-item p {
	color: var(--ttt-slate);
}
.ttt-tl-item a {
	color: var(--ttt-moss-dark);
}

/* Featured story: the large first card. */
@media (min-width: 64rem) {
	.ttt-featured-grid > .ttt-card:first-child {
		background-color: var(--ttt-paper);
		background-image: var(--ttt-contours-light);
		border-top: 6px solid var(--ttt-moss);
	}
	.ttt-featured-grid > .ttt-card:first-child .ttt-card-link,
	.ttt-featured-grid > .ttt-card:first-child p {
		color: var(--ttt-slate);
	}
	.ttt-featured-grid > .ttt-card:first-child .ttt-card-label {
		color: var(--ttt-brown);
	}
}

/* Map cards: light map-sheet header. */
.ttt-map-card::before,
.ttt-map-card:nth-child(3n+2)::before,
.ttt-map-card:nth-child(3n+3)::before {
	background-color: var(--ttt-parchment);
	background-image:
		repeating-radial-gradient(ellipse 120% 90% at 70% 30%, transparent 0 12px, rgba(67, 86, 52, 0.16) 12px 13px),
		linear-gradient(90deg, rgba(67, 86, 52, 0.10) 1px, transparent 1px),
		linear-gradient(0deg, rgba(67, 86, 52, 0.10) 1px, transparent 1px);
}

/* Footer. */
.ttt-footer {
	background-color: var(--ttt-parchment);
	color: var(--ttt-slate);
	border-top: 6px double var(--ttt-moss);
}
.ttt-footer h2,
.ttt-footer-mission {
	color: var(--ttt-slate) !important;
}
.ttt-footer p,
.ttt-footer li {
	color: var(--ttt-slate);
}
.ttt-footer a {
	color: var(--ttt-moss-dark);
	text-decoration-color: var(--ttt-moss);
}
.ttt-footer a:hover {
	color: var(--ttt-red);
	text-decoration-color: var(--ttt-red);
}
.ttt-footer-bottom {
	border-top-color: var(--ttt-rule);
}
.ttt-footer .wp-block-search__label {
	color: var(--ttt-slate);
}

/* Headers without a photograph: light, with dark text. */
.ttt-hero:not(:has(.wp-block-cover__image-background)) .wp-block-cover__background,
.ttt-article-hero:not(:has(.wp-block-cover__image-background)) .wp-block-cover__background {
	background-color: var(--ttt-parchment) !important;
	background-image: var(--ttt-contours-light);
	opacity: 1;
}
.ttt-article-hero:not(:has(.wp-block-cover__image-background)) {
	border-bottom: 1px solid var(--ttt-rule);
}
.ttt-hero:not(:has(.wp-block-cover__image-background)) .wp-block-cover__inner-container,
.ttt-article-hero:not(:has(.wp-block-cover__image-background)) .wp-block-cover__inner-container,
.ttt-hero:not(:has(.wp-block-cover__image-background)) h1,
.ttt-article-hero:not(:has(.wp-block-cover__image-background)) .wp-block-post-title,
.ttt-hero:not(:has(.wp-block-cover__image-background)) .ttt-hero-intro,
.ttt-article-hero:not(:has(.wp-block-cover__image-background)) .ttt-page-summary,
.ttt-article-hero:not(:has(.wp-block-cover__image-background)) .wp-block-post-date,
.ttt-article-hero:not(:has(.wp-block-cover__image-background)) .ttt-meta-line {
	color: var(--ttt-slate);
}
.ttt-hero:not(:has(.wp-block-cover__image-background)) .ttt-hero-kicker,
.ttt-article-hero:not(:has(.wp-block-cover__image-background)) .wp-block-post-terms a {
	color: var(--ttt-brown);
}
.ttt-article-hero:not(:has(.wp-block-cover__image-background)) .ttt-breadcrumbs a {
	color: var(--ttt-moss-dark);
}
.ttt-article-hero:not(:has(.wp-block-cover__image-background)) .ttt-breadcrumbs [aria-current] {
	color: var(--ttt-muted);
}
.ttt-article-hero:not(:has(.wp-block-cover__image-background)) .ttt-breadcrumbs li + li::before {
	border-color: var(--ttt-muted);
}
.ttt-hero:not(:has(.wp-block-cover__image-background)) .wp-block-button:first-child .wp-element-button {
	background: var(--ttt-moss);
	border-color: var(--ttt-moss);
	color: var(--ttt-paper);
}
.ttt-hero:not(:has(.wp-block-cover__image-background)) .is-style-outline .wp-element-button {
	background: transparent;
	border-color: var(--ttt-moss);
	color: var(--ttt-moss-dark);
}

/* Over a photograph, keep text light on a strong overlay for contrast. */
.ttt-hero:has(.wp-block-cover__image-background) .wp-block-cover__background,
.ttt-article-hero:has(.wp-block-cover__image-background) .wp-block-cover__background {
	opacity: 0.7;
}

/* Homepage hero: line the heading, intro and buttons up with the wide content below
   (featured stories, menu bar), instead of hugging the left edge of the screen. */
.ttt-hero > .wp-block-cover__inner-container {
	width: 100% !important;
	max-width: calc(var(--wp--style--global--wide-size) + var(--wp--style--root--padding-left) + var(--wp--style--root--padding-right)) !important;
	margin-left: auto !important;
	margin-right: auto !important;
}
.ttt-hero > .wp-block-cover__inner-container > * {
	margin-left: 0 !important;
	margin-right: auto !important;
}

/* Text for screen readers only (for example "census, Thoralby" after a year link). */
.screen-reader-text:not(:focus) {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Census year links: a grid of large, easy-to-press year boxes. */
.ttt-year-links {
	list-style: none;
	padding: 0 !important;
	margin-top: 1rem;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
	gap: 0.75rem;
}
.ttt-year-links li {
	margin: 0;
}
.ttt-year-links a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 3.25rem;
	padding: 0.5rem 0.75rem;
	background: var(--ttt-paper);
	border: 2px solid var(--ttt-moss);
	border-radius: var(--ttt-radius);
	color: var(--ttt-moss-dark);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.25rem;
	text-decoration: none !important;
}
.ttt-year-links a:hover {
	background: var(--ttt-moss);
	color: var(--ttt-paper);
}
.ttt-year-links a:focus-visible {
	outline: var(--ttt-focus);
	outline-offset: 3px;
}

/* Census transcription tables. */
.ttt-census-table table {
	font-size: 0.91rem;
}
.ttt-census-table th,
.ttt-census-table td {
	padding: 0.4rem 0.5rem;
}
.ttt-census-table thead th {
	position: sticky;
	top: 0;
	z-index: 1;
}
.ttt-records.ttt-census-table td:first-child {
	white-space: nowrap;
}
/* Tables inside a filterable group use the full width of the group,
   instead of being narrowed and centred (this removed the large side margins). */
.ttt-filterable.is-layout-constrained > .wp-block-table,
.ttt-filterable.is-layout-constrained > .ttt-filter-bar,
.ttt-filterable.is-layout-constrained > .ttt-filter-empty,
.ttt-census.is-layout-constrained > .wp-block-table {
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* Census pages use the same centred 72rem column as every other internal page:
   the text, the search box and the table all share the same left and right
   edges. A table with more columns than fit scrolls sideways inside its own box. */

/* A firmer line where each new household (numbered row) begins. */
.ttt-census-table tbody tr:has(> td:first-child:not(:empty)) td {
	border-top: 2px solid var(--ttt-moss);
}
/* Remove the zebra stripes so households read as blocks. */
.ttt-census-table tbody tr:nth-child(even) {
	background: transparent;
}

/* Masthead and the separate navigation bar. */
.ttt-masthead {
	box-shadow: none;
}
.ttt-masthead .ttt-tagline {
	margin-top: 0.35rem;
}
.ttt-navbar {
	position: relative;
	z-index: 20;
}
/* On the homepage the bar sits inside the main content area: let it run full width,
   with the menu lined up to the wide content (the featured stories grid). */
.has-global-padding > .wp-block-template-part:has(> .ttt-navbar) {
	max-width: none !important;
	margin-left: calc(var(--wp--style--root--padding-left) * -1) !important;
	margin-right: calc(var(--wp--style--root--padding-right) * -1) !important;
}
.ttt-navbar > .wp-block-navigation {
	max-width: var(--wp--style--global--wide-size);
	margin-left: auto !important;
	margin-right: auto !important;
	width: 100%;
}
.ttt-navbar .wp-block-navigation__container {
	flex-wrap: wrap;
	column-gap: 1.75rem;
}
.ttt-hero + .wp-block-template-part .ttt-navbar,
.wp-block-cover + .wp-block-template-part .ttt-navbar {
	border-top: 0;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
	.ttt-card:hover {
		transform: translateY(-2px);
	}
	.ttt-hero .ttt-reveal {
		animation: ttt-rise 0.7s ease-out both;
	}
	.ttt-hero .ttt-reveal:nth-child(2) { animation-delay: 0.08s; }
	.ttt-hero .ttt-reveal:nth-child(3) { animation-delay: 0.16s; }
	.ttt-hero .ttt-reveal:nth-child(4) { animation-delay: 0.24s; }
}
@keyframes ttt-rise {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}
}

/* ---------- Print ---------- */

@media print {
	.ttt-topbar, .ttt-header nav, .ttt-footer, .ttt-filter-bar, .ttt-note, .wp-block-search { display: none !important; }
	body { background: #fff; }
	a { color: #000; }
}
