/*
 * Canongate — the one stylesheet.
 *
 * A dusk palette drawn from the city itself: castle basalt, thistle purple,
 * gorse gold, pale stone. Headlines in Fraunces (self-hosted variable file),
 * body text on the system stack. Mobile-first; two breakpoints (640/980).
 */

/* ------------------------------------------------------------------ */
/* Fonts                                                               */
/* ------------------------------------------------------------------ */

@font-face {
	font-family: 'Fraunces';
	font-style: normal;
	font-weight: 400 900;
	font-display: swap;
	src: url('../fonts/fraunces-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------------ */
/* Tokens                                                              */
/* ------------------------------------------------------------------ */

:root {
	--basalt: #241c30;        /* castle rock at dusk — dark surfaces */
	--basalt-soft: #332a42;   /* raised panels on dark */
	--basalt-deep: #1b1425;   /* footer base bar */
	--thistle: #5a3d85;       /* links, buttons — AA on white (8.6:1) */
	--thistle-deep: #46306a;  /* hover state */
	--gorse: #e3b04b;         /* gold accents on dark surfaces */
	--stone: #f5f2f7;         /* tinted bands */
	--ink: #221c2a;           /* body text */
	--quiet: #5f5869;         /* secondary text */
	--mist: #e7e3ec;          /* hairlines */
	--paper: #ffffff;         /* page */
	--snow: #ffffff;          /* text on dark */
	--on-dark-soft: #cfc6dd;  /* secondary text on dark */
	--arc: 8px;
	--measure: 1140px;
	--measure-slim: 700px;
	--font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
	--font-body: -apple-system, 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', Arial, sans-serif;
	--shadow: 0 2px 6px rgba(34, 26, 48, 0.08), 0 14px 34px rgba(34, 26, 48, 0.13);
	--skyline-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 40' preserveAspectRatio='none'%3E%3Cpath d='M0%2040%20L0%2030%20L14%2030%20L16%2018%20L20%2018%20L20%2014%20L23%2014%20L23%2018%20L27%2018%20L27%2021%20L34%2021%20L34%2017%20L37%2017%20L37%2013%20L40%2013%20L40%2017%20L43%2017%20L43%2021%20L50%2021%20L50%2024%20L58%2024%20L62%2030%20L74%2030%20L77%2014%20L79%208%20L81%2014%20L82%2030%20L96%2030%20L97%2022%20L99%2022%20L99%2018%20L103%2010%20L104%206%20L105%2010%20L109%2018%20L109%2022%20L111%2022%20L112%2030%20L124%2030%20L124%2024%20L136%2024%20L136%2030%20L148%2030%20L150%2010%20L152%204%20L154%2010%20L156%2030%20L170%2030%20L170%2025%20L182%2025%20L182%2030%20L196%2030%20L197%2020%20L199%2020%20L199%2016%20L201%2016%20L201%2020%20L203%2020%20L204%2030%20L218%2030%20L232%2020%20L246%2026%20L260%2016%20L280%2026%20L296%2030%20L320%2030%20L320%2040%20Z' fill='%23ffffff'/%3E%3C/svg%3E");
	--skyline-basalt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 40' preserveAspectRatio='none'%3E%3Cpath d='M0%2040%20L0%2030%20L14%2030%20L16%2018%20L20%2018%20L20%2014%20L23%2014%20L23%2018%20L27%2018%20L27%2021%20L34%2021%20L34%2017%20L37%2017%20L37%2013%20L40%2013%20L40%2017%20L43%2017%20L43%2021%20L50%2021%20L50%2024%20L58%2024%20L62%2030%20L74%2030%20L77%2014%20L79%208%20L81%2014%20L82%2030%20L96%2030%20L97%2022%20L99%2022%20L99%2018%20L103%2010%20L104%206%20L105%2010%20L109%2018%20L109%2022%20L111%2022%20L112%2030%20L124%2030%20L124%2024%20L136%2024%20L136%2030%20L148%2030%20L150%2010%20L152%204%20L154%2010%20L156%2030%20L170%2030%20L170%2025%20L182%2025%20L182%2030%20L196%2030%20L197%2020%20L199%2020%20L199%2016%20L201%2016%20L201%2020%20L203%2020%20L204%2030%20L218%2030%20L232%2020%20L246%2026%20L260%2016%20L280%2026%20L296%2030%20L320%2030%20L320%2040%20Z' fill='%23241c30'/%3E%3C/svg%3E");
}

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

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: 5rem; /* clear the sticky top bar on anchor jumps */
	overflow-x: clip;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.68;
	color: var(--ink);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-display);
	font-weight: 620;
	line-height: 1.16;
	letter-spacing: 0;
	color: inherit;
	margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.15rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.45rem); }

p {
	margin: 0 0 1.1em;
}

a {
	color: var(--thistle);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.16em;
	text-decoration-color: color-mix(in srgb, var(--thistle) 40%, transparent);
	transition: color 120ms ease, text-decoration-color 120ms ease;
}

a:hover {
	color: var(--thistle-deep);
	text-decoration-color: var(--gorse);
	text-decoration-thickness: 2px;
}

@supports not (color: color-mix(in srgb, red 50%, blue)) {
	a { text-decoration-color: var(--mist); }
}

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

:focus-visible {
	outline: 2px solid var(--thistle);
	outline-offset: 2px;
	border-radius: 2px;
}

.topbar :focus-visible,
.foot :focus-visible,
.cover :focus-visible,
.hub-head :focus-visible {
	outline-color: var(--gorse);
}

.wrap {
	max-width: var(--measure);
	margin-inline: auto;
	padding-inline: 22px;
}

.wrap-slim {
	max-width: var(--measure-slim);
	margin-inline: auto;
	padding-inline: 22px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: 10px;
	left: 10px;
	z-index: 1000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0.7em 1.1em;
	clip: auto;
	clip-path: none;
	background: var(--thistle);
	color: var(--snow);
	border-radius: var(--arc);
	text-decoration: none;
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

.btn,
.wp-block-button__link,
.wp-element-button,
.search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	padding: 0.68em 1.35em;
	font-family: var(--font-body);
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
	color: var(--snow);
	background: var(--thistle);
	border: 0;
	border-radius: var(--arc);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 120ms ease;
}

.btn:hover,
.wp-block-button__link:hover,
.wp-element-button:hover,
.search-submit:hover {
	background: var(--thistle-deep);
	color: var(--snow);
}

/* ------------------------------------------------------------------ */
/* Top bar                                                             */
/* ------------------------------------------------------------------ */

.topbar {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--basalt);
	border-top: 3px solid var(--gorse);
	transition: box-shadow 160ms ease;
}

.topbar.is-stuck {
	box-shadow: var(--shadow);
}

.topbar-row {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 66px;
	padding-block: 8px;
}

.brand {
	margin-right: auto;
	min-width: 0;
}

.brand-link {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	text-decoration: none;
}

.brand-mark {
	flex: 0 0 auto;
	display: block;
}

.brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.05;
	min-width: 0;
}

.brand-name {
	font-family: var(--font-display);
	font-weight: 650;
	font-size: 1.3rem;
	color: var(--snow);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.brand-tag {
	font-size: 0.6rem;
	font-weight: 600;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--gorse);
	margin-top: 3px;
}

.custom-logo {
	display: block;
	max-height: 48px;
	width: auto;
}

/* Mobile menu button — three bars drawn with box-shadow. */
.menu-btn {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 0.55em 0.9em;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: var(--arc);
	color: var(--snow);
	font-family: var(--font-body);
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
}

.menu-btn-icon {
	display: block;
	width: 17px;
	height: 2px;
	background: currentColor;
	box-shadow: 0 5px 0 currentColor, 0 -5px 0 currentColor;
}

.menu-btn-text {
	letter-spacing: 0.04em;
}

/* Primary nav: hidden drawer on mobile, opened by body.menu-open. */
.primary-nav {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: var(--basalt-soft);
	border-bottom: 2px solid var(--gorse);
	max-height: calc(100vh - 66px);
	overflow-y: auto;
	box-shadow: var(--shadow);
}

body.menu-open .primary-nav,
.no-js .primary-nav {
	display: block;
}

.no-js .menu-btn {
	display: none;
}

.primary-nav .menu {
	list-style: none;
	margin: 0;
	padding: 10px 0;
}

.primary-nav .menu a {
	display: block;
	padding: 0.72em 24px;
	color: var(--snow);
	font-size: 0.98rem;
	text-decoration: none;
}

.primary-nav .menu a:hover {
	background: rgba(255, 255, 255, 0.07);
	color: var(--gorse);
}

.primary-nav .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0 0 0 18px;
}

.primary-nav .sub-menu a {
	font-size: 0.9rem;
	color: var(--on-dark-soft);
}

/* Quick search flyout (a native <details>). */
.quicksearch {
	position: relative;
}

.quicksearch-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: var(--arc);
	border: 1px solid rgba(255, 255, 255, 0.28);
	color: var(--snow);
	cursor: pointer;
	list-style: none;
}

.quicksearch-btn::-webkit-details-marker {
	display: none;
}

.quicksearch[open] .quicksearch-btn {
	background: rgba(255, 255, 255, 0.1);
	border-color: var(--gorse);
}

.quicksearch-panel {
	position: absolute;
	top: calc(100% + 12px);
	right: 0;
	width: min(340px, calc(100vw - 44px));
	padding: 14px;
	background: var(--basalt-soft);
	border: 1px solid rgba(227, 176, 75, 0.4);
	border-radius: var(--arc);
	box-shadow: var(--shadow);
	z-index: 50;
}

/* ------------------------------------------------------------------ */
/* Search form                                                         */
/* ------------------------------------------------------------------ */

.search-form {
	display: flex;
	gap: 8px;
}

.search-field {
	flex: 1;
	min-width: 0;
	padding: 0.62em 0.9em;
	font-family: var(--font-body);
	font-size: 1rem;
	color: var(--ink);
	background: var(--paper);
	border: 1px solid var(--mist);
	border-radius: var(--arc);
}

.search-field:focus {
	outline: none;
	border-color: var(--thistle);
	box-shadow: 0 0 0 3px rgba(90, 61, 133, 0.18);
}

.search-submit {
	min-width: 48px;
	padding-inline: 0.9em;
}

/* ------------------------------------------------------------------ */
/* Cover (front page)                                                  */
/* ------------------------------------------------------------------ */

.cover {
	position: relative;
	display: flex;
	align-items: center;
	min-height: clamp(430px, 58vh, 640px);
	background: var(--basalt);
	overflow: hidden;
}

.cover-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cover-flat {
	background: radial-gradient(120% 120% at 50% 0%, var(--basalt-soft) 0%, var(--basalt) 62%);
}

.cover-scrim {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to top, rgba(27, 20, 37, 0.88) 0%, rgba(27, 20, 37, 0.45) 42%, rgba(36, 28, 48, 0.28) 100%);
}

.cover-inner {
	position: relative;
	z-index: 2;
	width: 100%;
	text-align: center;
	padding-block: clamp(3.4rem, 8vw, 5.5rem) clamp(4.6rem, 10vw, 6.5rem);
}

.cover-title {
	color: var(--snow);
	font-size: clamp(2.5rem, 7vw, 4.4rem);
	font-weight: 660;
	margin-bottom: 0.35em;
	text-shadow: 0 2px 22px rgba(27, 20, 37, 0.55);
}

.cover-lede {
	color: var(--on-dark-soft);
	font-size: clamp(1.02rem, 2vw, 1.22rem);
	max-width: 44em;
	margin: 0 auto 1.5em;
	text-shadow: 0 1px 14px rgba(27, 20, 37, 0.6);
}

.cover-search {
	max-width: 540px;
	margin: 0 auto;
}

.cover-search .search-field {
	border-color: transparent;
	box-shadow: 0 6px 26px rgba(27, 20, 37, 0.35);
	padding-block: 0.78em;
}

.cover-cta {
	margin-top: 1.3em;
	background: var(--gorse);
	color: var(--basalt);
}

.cover-cta:hover {
	background: #edc272;
	color: var(--basalt);
}

/* The city bites into the bottom of the photo. */
.cover-edge {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: clamp(26px, 4.5vw, 46px);
	background: var(--skyline-paper);
	background-size: 100% 100%;
	background-repeat: no-repeat;
	z-index: 3;
	pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* Bands and headings                                                  */
/* ------------------------------------------------------------------ */

.band,
.more-guides {
	padding-block: clamp(2.8rem, 6.5vw, 4.4rem);
}

.band-stone,
.more-guides {
	background: var(--stone);
}

.band-head {
	text-align: center;
	margin-bottom: clamp(1.7rem, 4vw, 2.6rem);
}

.band-head h2 {
	margin-bottom: 0;
}

.band-head h2::after {
	content: '';
	display: block;
	width: 54px;
	height: 3px;
	margin: 0.55em auto 0;
	background: var(--gorse);
	border-radius: 2px;
}

.band-head .band-more {
	display: inline-block;
	margin-top: 0.9em;
	font-size: 0.95rem;
}

/* ------------------------------------------------------------------ */
/* Clusters (card grids)                                               */
/* ------------------------------------------------------------------ */

.cluster {
	display: grid;
	grid-template-columns: 1fr;
	gap: 26px;
}

/* ------------------------------------------------------------------ */
/* Tiles (cards)                                                       */
/* ------------------------------------------------------------------ */

.tile {
	display: flex;
	flex-direction: column;
	background: var(--paper);
	border: 1px solid var(--mist);
	border-radius: var(--arc);
	overflow: hidden;
	transition: border-color 140ms ease;
}

.tile:hover {
	border-color: var(--gorse);
}

.tile-media {
	display: block;
	overflow: hidden;
}

.tile-img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	transition: transform 300ms ease;
}

.tile:hover .tile-img {
	transform: scale(1.03);
}

.tile-img-blank {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	background:
		var(--skyline-paper) bottom / 100% 34% no-repeat,
		linear-gradient(150deg, var(--basalt-soft), var(--thistle));
	opacity: 0.92;
}

/* Topic tiles: the image sits in an arch, like a close off the Royal Mile. */
.tile-topic .tile-media {
	padding: 16px 16px 0;
}

.tile-topic .tile-img,
.tile-topic .tile-img-blank {
	aspect-ratio: 1 / 1;
	border-radius: 999px 999px var(--arc) var(--arc) / 62% 62% var(--arc) var(--arc);
}

.tile-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 18px 20px 20px;
}

.tile-tag {
	display: inline-block;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--thistle);
	text-decoration: none;
	margin-bottom: 0.55em;
}

.tile-tag::before {
	content: '';
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-right: 7px;
	background: var(--gorse);
	transform: rotate(45deg) translateY(-1px);
}

.tile-tag:hover {
	color: var(--thistle-deep);
	text-decoration: underline;
}

.tile-title {
	font-size: 1.22rem;
	margin-bottom: 0.45em;
}

.tile-title a {
	color: var(--ink);
	text-decoration: none;
}

.tile-title a:hover {
	color: var(--thistle);
	text-decoration: underline;
	text-decoration-color: var(--gorse);
}

.tile-text {
	color: var(--quiet);
	font-size: 0.94rem;
	margin-bottom: 1em;
}

.tile-foot {
	margin-top: auto;
	padding-top: 0.8em;
	border-top: 1px dotted var(--mist);
	color: var(--quiet);
	font-size: 0.82rem;
	letter-spacing: 0.02em;
}

.tile-topic .tile-body {
	text-align: center;
}

.tile-topic .tile-foot {
	border-top: 0;
	padding-top: 0;
}

/* ------------------------------------------------------------------ */
/* Trail (breadcrumbs)                                                 */
/* ------------------------------------------------------------------ */

.trail {
	font-size: 0.84rem;
	color: var(--quiet);
	overflow-x: auto;
	white-space: nowrap;
	-webkit-overflow-scrolling: touch;
	padding-block: 2px;
}

.trail ol,
.trail ul {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
}

.trail li + li::before {
	content: '›';
	margin-inline: 0.55em;
	color: var(--gorse);
}

.trail a {
	color: var(--quiet);
	text-decoration: none;
}

.trail a:hover {
	color: var(--thistle);
	text-decoration: underline;
}

/* Breadcrumb output from SEO plugins. */
.trail .separator {
	margin-inline: 0.55em;
	color: var(--gorse);
}

/* ------------------------------------------------------------------ */
/* Story (single post / page)                                          */
/* ------------------------------------------------------------------ */

.story {
	padding-block: clamp(2.2rem, 5vw, 3.4rem);
}

.story-head {
	text-align: center;
	margin-bottom: clamp(1.6rem, 4vw, 2.4rem);
}

.story .trail {
	justify-content: center;
	text-align: center;
	margin-bottom: 1.4em;
}

.story .trail ol,
.story .trail ul {
	justify-content: center;
}

.story-tag {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--thistle);
	text-decoration: none;
	margin-bottom: 0.9em;
}

.story-tag:hover {
	text-decoration: underline;
	text-decoration-color: var(--gorse);
}

.story-title {
	margin-bottom: 0.4em;
}

.byline {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4em;
	color: var(--quiet);
	font-size: 0.87rem;
}

.byline-item + .byline-item::before {
	content: '·';
	margin-right: 0.4em;
	color: var(--gorse);
}

.story-photo {
	margin: 0 0 clamp(1.6rem, 4vw, 2.4rem);
}

.story-photo img {
	width: 100%;
	border-radius: var(--arc);
}

.story-photo figcaption {
	margin-top: 0.7em;
	text-align: center;
	font-size: 0.82rem;
	color: var(--quiet);
}

/* ------------------------------------------------------------------ */
/* Copy (long-form typography + core blocks)                           */
/* ------------------------------------------------------------------ */

.copy {
	font-size: 1.09rem;
	line-height: 1.74;
}

.copy > * {
	margin-block: 0 1.25em;
}

.copy h2 {
	margin-top: 1.7em;
}

.copy h3 {
	margin-top: 1.4em;
}

.copy img {
	border-radius: var(--arc);
}

.copy ul,
.copy ol {
	padding-left: 1.4em;
}

.copy li {
	margin-bottom: 0.45em;
}

.copy blockquote,
.copy .wp-block-quote {
	margin-inline: 0;
	padding: 0.3em 0 0.3em 1.2em;
	border-left: 3px solid var(--gorse);
	font-family: var(--font-display);
	font-size: 1.12em;
	font-style: italic;
	color: var(--quiet);
}

.copy blockquote p:last-child {
	margin-bottom: 0;
}

.copy table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.copy th,
.copy td {
	padding: 0.6em 0.8em;
	border: 1px solid var(--mist);
	text-align: left;
}

.copy th {
	background: var(--stone);
	font-weight: 600;
}

.copy .wp-block-table {
	overflow-x: auto;
}

.copy code {
	padding: 0.15em 0.4em;
	background: var(--stone);
	border-radius: 4px;
	font-size: 0.92em;
}

.copy hr,
.copy .wp-block-separator {
	width: 54px;
	height: 3px;
	margin: 2.4em auto;
	border: 0;
	background: var(--gorse);
	border-radius: 2px;
}

.copy .wp-block-image figcaption,
.copy .wp-caption-text,
.copy .wp-element-caption {
	text-align: center;
	font-size: 0.82rem;
	color: var(--quiet);
	margin-top: 0.6em;
}

/* Gutenberg alignments. */
.copy .alignwide {
	width: calc(100vw - 44px);
	max-width: var(--measure);
	margin-left: calc(50% - 50vw + 22px);
}

@media (min-width: 1184px) {
	.copy .alignwide {
		margin-left: calc((var(--measure) - var(--measure-slim)) / -2 + 22px);
	}
}

.copy .alignfull {
	width: 100vw;
	max-width: none;
	margin-left: calc(50% - 50vw);
}

.copy .alignleft {
	float: left;
	margin: 0.3em 1.4em 1em 0;
	max-width: 50%;
}

.copy .alignright {
	float: right;
	margin: 0.3em 0 1em 1.4em;
	max-width: 50%;
}

.copy .aligncenter {
	display: block;
	margin-inline: auto;
}

.page-links {
	margin-top: 2em;
	font-size: 0.95rem;
	color: var(--quiet);
}

.page-links a {
	display: inline-block;
	min-width: 2em;
	padding: 0.25em 0.5em;
	margin-inline: 0.15em;
	text-align: center;
	border: 1px solid var(--mist);
	border-radius: var(--arc);
	text-decoration: none;
}

.page-links a:hover {
	border-color: var(--thistle);
}

/* ------------------------------------------------------------------ */
/* Pager (previous / next within the pillar)                           */
/* ------------------------------------------------------------------ */

.pager {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	padding-block: clamp(1.8rem, 4vw, 2.6rem);
}

.pager-card {
	display: block;
	padding: 16px 18px;
	border: 1px solid var(--mist);
	border-radius: var(--arc);
	text-decoration: none;
	transition: border-color 140ms ease;
}

.pager-card:hover {
	border-color: var(--gorse);
}

.pager-next {
	text-align: right;
}

.pager-label {
	display: block;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--quiet);
	margin-bottom: 0.4em;
}

.pager-title {
	font-family: var(--font-display);
	font-weight: 620;
	font-size: 1.05rem;
	color: var(--ink);
	line-height: 1.3;
}

.pager-card:hover .pager-title {
	color: var(--thistle);
}

/* ------------------------------------------------------------------ */
/* Hub pages (category and other archives)                             */
/* ------------------------------------------------------------------ */

.hub-head {
	background:
		var(--skyline-paper) bottom / 100% clamp(20px, 3.5vw, 36px) no-repeat,
		radial-gradient(130% 130% at 50% -10%, var(--basalt-soft) 0%, var(--basalt) 60%);
	color: var(--snow);
	text-align: center;
	padding-block: clamp(2.6rem, 6vw, 4rem) clamp(3.4rem, 7vw, 4.8rem);
}

.hub-head .trail {
	justify-content: center;
	color: var(--on-dark-soft);
	margin-bottom: 1.2em;
}

.hub-head .trail ol,
.hub-head .trail ul {
	justify-content: center;
}

.hub-head .trail a {
	color: var(--on-dark-soft);
}

.hub-head .trail a:hover {
	color: var(--snow);
}

.hub-title {
	color: var(--snow);
	margin-bottom: 0.25em;
}

.hub-count {
	color: var(--gorse);
	font-size: 0.86rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin: 0 0 0.5em;
}

.hub-search {
	max-width: 480px;
	margin: 1.4em auto 0;
}

.subtopics {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	list-style: none;
	margin: 1.5em 0 0;
	padding: 0;
}

.subtopics a {
	display: inline-block;
	padding: 0.42em 1em;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	color: var(--snow);
	font-size: 0.86rem;
	text-decoration: none;
	transition: border-color 120ms ease, color 120ms ease;
}

.subtopics a:hover {
	border-color: var(--gorse);
	color: var(--gorse);
}

.hub-intro {
	padding-top: clamp(2rem, 4.5vw, 3rem);
}

.hub-grid {
	padding-block: clamp(2.4rem, 5.5vw, 3.6rem);
}

.empty-note {
	text-align: center;
	color: var(--quiet);
	padding-block: 2.5rem;
}

.empty-block {
	text-align: center;
}

/* ------------------------------------------------------------------ */
/* Pagination                                                          */
/* ------------------------------------------------------------------ */

.pagination {
	margin-top: clamp(2rem, 4vw, 3rem);
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 0.8em;
	border: 1px solid var(--mist);
	border-radius: 999px;
	color: var(--ink);
	font-size: 0.92rem;
	text-decoration: none;
}

.page-numbers.current {
	background: var(--basalt);
	border-color: var(--basalt);
	color: var(--snow);
}

.page-numbers.dots {
	border: 0;
	color: var(--quiet);
}

a.page-numbers:hover {
	border-color: var(--thistle);
	color: var(--thistle);
}

/* ------------------------------------------------------------------ */
/* Responses (comments)                                                */
/* ------------------------------------------------------------------ */

.responses {
	padding-block: clamp(1.8rem, 4vw, 2.6rem);
}

.responses-title {
	font-size: 1.35rem;
}

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

.comment-list .children {
	list-style: none;
	padding-left: clamp(14px, 3vw, 30px);
}

.comment-list .comment {
	padding-block: 1.2em;
	border-top: 1px solid var(--mist);
}

.responses-closed {
	color: var(--quiet);
	font-style: italic;
}

.comment-form input[type='text'],
.comment-form input[type='email'],
.comment-form input[type='url'],
.comment-form textarea {
	width: 100%;
	padding: 0.6em 0.85em;
	font-family: var(--font-body);
	font-size: 1rem;
	color: var(--ink);
	border: 1px solid var(--mist);
	border-radius: var(--arc);
}

.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: var(--thistle);
	box-shadow: 0 0 0 3px rgba(90, 61, 133, 0.18);
}

.comment-form .submit {
	color: var(--snow);
	background: var(--thistle);
	border: 0;
	border-radius: var(--arc);
	padding: 0.68em 1.35em;
	font-weight: 600;
	cursor: pointer;
}

.comment-form .submit:hover {
	background: var(--thistle-deep);
}

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

.foot {
	background: var(--basalt);
	color: var(--on-dark-soft);
	margin-top: clamp(2.5rem, 6vw, 4rem);
}

.foot-skyline {
	height: clamp(22px, 3.5vw, 38px);
	background: var(--skyline-basalt);
	background-size: 100% 100%;
	background-repeat: no-repeat;
	transform: translateY(-99%);
	margin-bottom: calc(-1 * clamp(22px, 3.5vw, 38px));
	pointer-events: none;
}

.foot-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 34px;
	padding-block: clamp(2.6rem, 6vw, 3.8rem);
}

.foot-brand {
	font-family: var(--font-display);
	font-weight: 650;
	font-size: 1.35rem;
	color: var(--snow);
	margin: 0 0 0.5em;
}

.foot-text {
	font-size: 0.94rem;
	max-width: 34em;
}

.foot-title {
	font-family: var(--font-body);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--gorse);
	margin: 0 0 1em;
}

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

.foot-menu li {
	margin-bottom: 0.55em;
}

.foot-menu a {
	color: var(--on-dark-soft);
	text-decoration: none;
	font-size: 0.95rem;
}

.foot-menu a:hover {
	color: var(--snow);
	text-decoration: underline;
	text-decoration-color: var(--gorse);
}

.foot-social {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	list-style: none;
	margin: 1.3em 0 0;
	padding: 0;
}

.foot-social a {
	display: inline-block;
	padding: 0.35em 0.95em;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 999px;
	color: var(--on-dark-soft);
	font-size: 0.85rem;
	text-decoration: none;
}

.foot-social a:hover {
	border-color: var(--gorse);
	color: var(--gorse);
}

.foot-base {
	background: var(--basalt-deep);
	border-top: 1px solid rgba(227, 176, 75, 0.22);
}

.foot-base-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-block: 16px;
}

.foot-copy {
	margin: 0;
	font-size: 0.82rem;
	color: #9a8fb0;
}

.foot-legal {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.foot-legal a {
	color: #9a8fb0;
	font-size: 0.82rem;
	text-decoration: none;
}

.foot-legal a:hover {
	color: var(--snow);
}

/* ------------------------------------------------------------------ */
/* 640px and up                                                        */
/* ------------------------------------------------------------------ */

@media (min-width: 640px) {
	.cluster-3 {
		grid-template-columns: repeat(2, 1fr);
	}

	.foot-grid {
		grid-template-columns: 1.4fr 1fr 1fr;
	}

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

	.pager-card:only-child {
		grid-column: 1 / -1;
	}
}

/* ------------------------------------------------------------------ */
/* 980px and up: desktop navigation                                    */
/* ------------------------------------------------------------------ */

@media (min-width: 980px) {
	.cluster-3 {
		grid-template-columns: repeat(3, 1fr);
	}

	.menu-btn {
		display: none;
	}

	.primary-nav,
	body.menu-open .primary-nav {
		display: block;
		position: static;
		background: transparent;
		border: 0;
		max-height: none;
		overflow: visible;
		box-shadow: none;
	}

	.primary-nav .menu {
		display: flex;
		align-items: center;
		gap: 2px;
		padding: 0;
	}

	.primary-nav .menu > li {
		position: relative;
	}

	.primary-nav .menu a {
		padding: 0.55em 0.85em;
		font-size: 0.92rem;
		border-radius: var(--arc);
	}

	.primary-nav .menu > li > a:hover {
		background: rgba(255, 255, 255, 0.08);
		color: var(--gorse);
	}

	.primary-nav .sub-menu {
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 230px;
		padding: 8px 0;
		background: var(--basalt-soft);
		border: 1px solid rgba(227, 176, 75, 0.35);
		border-radius: var(--arc);
		box-shadow: var(--shadow);
		display: none;
		z-index: 60;
	}

	.primary-nav .menu > li:hover > .sub-menu,
	.primary-nav .menu > li:focus-within > .sub-menu {
		display: block;
	}

	.primary-nav .sub-menu a {
		padding: 0.55em 16px;
		border-radius: 0;
		color: var(--snow);
	}

	.primary-nav .sub-menu a:hover {
		background: rgba(255, 255, 255, 0.07);
		color: var(--gorse);
	}
}

/* ------------------------------------------------------------------ */
/* Reduced motion                                                      */
/* ------------------------------------------------------------------ */

@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;
	}

	.tile:hover .tile-img {
		transform: none;
	}
}
