/* ==========================================================================
   Cirrus — field journal theme
   Tokens → base → header → sky → home → cards → posts → archives → tools
   ========================================================================== */

:root {
	--sky-base: #d7e3ec;
	--paper-base: #fafcfd;
	--ink-base: #1b2731;
	--accent-base: #235b7c;
	--seen-base: #2e7a57;
	--hi: #f2cf57;

	--sky: var(--sky-base);
	--paper: var(--paper-base);
	--ink: var(--ink-base);
	--accent: var(--accent-base);
	--seen: var(--seen-base);
	--dipped: #9a4c3b;

	--ink-2: color-mix(in srgb, var(--ink) 74%, var(--paper));
	--ink-3: color-mix(in srgb, var(--ink) 56%, var(--paper));
	--line: color-mix(in srgb, var(--ink) 13%, var(--paper));
	--line-strong: color-mix(in srgb, var(--ink) 24%, var(--paper));
	--surface: color-mix(in srgb, var(--sky) 38%, var(--paper));
	--sky-top: color-mix(in srgb, var(--sky) 78%, var(--accent));
	--on-accent: #fff;
	--page-ink: var(--ink);

	--storm-top: #1d2833;
	--storm-bottom: #34424f;
	--storm-ink: #e8eef3;

	--font-ui: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-text: "Source Serif 4", "Source Serif Pro", Charter, Georgia, serif;
	--body-size: 19px;
	--measure: 40rem;
	--row-h: 280px;
	--header-h: 68px;
	--gutter: clamp(16px, 4vw, 40px);
	--radius: 6px;

	color-scheme: light;
}

:root[data-theme="dark"] {
	--sky: #172430;
	--paper: #10181f;
	--ink: #dde6ed;
	--accent: color-mix(in srgb, var(--accent-base) 45%, #cfe7ff);
	--seen: color-mix(in srgb, var(--seen-base) 55%, #d6ffe9);
	--dipped: #e09a88;
	--sky-top: #0c141b;
	--on-accent: #0c141b;
	--surface: #16212b;
	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--sky: #172430;
		--paper: #10181f;
		--ink: #dde6ed;
		--accent: color-mix(in srgb, var(--accent-base) 45%, #cfe7ff);
		--seen: color-mix(in srgb, var(--seen-base) 55%, #d6ffe9);
		--dipped: #e09a88;
		--sky-top: #0c141b;
		--on-accent: #0c141b;
		--surface: #16212b;
		color-scheme: dark;
	}
}

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

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-ui);
	font-size: 1rem;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, video, svg { max-width: 100%; height: auto; }
img { display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, h4 { font-family: var(--font-ui); line-height: 1.15; letter-spacing: -0.015em; margin: 0; }

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

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

.skip-link {
	position: absolute; left: 12px; top: -60px; z-index: 1000;
	background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--radius);
	font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(46rem + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-wide { width: 100%; max-width: calc(80rem + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

.button, button.button, input[type="submit"], .wp-block-button__link {
	display: inline-flex; align-items: center; gap: .5em;
	font: 600 .95rem/1.2 var(--font-ui);
	background: var(--accent); color: var(--on-accent);
	border: 0; border-radius: var(--radius);
	padding: .72em 1.15em; cursor: pointer; text-decoration: none;
}
.button:hover, input[type="submit"]:hover { filter: brightness(1.08); }

.text-button {
	display: inline-flex; align-items: center; gap: .35em;
	background: none; border: 0; padding: 0; cursor: pointer;
	font: 500 .85rem var(--font-ui); color: var(--accent);
}

input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="number"], input[type="date"], select, textarea {
	font: 400 1rem/1.3 var(--font-ui);
	color: var(--ink);
	background: var(--paper);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	padding: .6em .75em;
	max-width: 100%;
}
select {
	appearance: none;
	padding-right: 2.2em;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right .75em center;
}

kbd {
	font: 600 .72rem/1 var(--font-ui);
	border: 1px solid var(--line-strong); border-bottom-width: 2px;
	border-radius: 4px; padding: .2em .45em; color: var(--ink-3);
}

.icon { flex: none; }

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

.site-header {
	position: fixed; inset: 0 0 auto; z-index: 100;
	height: var(--header-h);
	transition: transform .25s ease, background-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled {
	background: color-mix(in srgb, var(--paper) 88%, transparent);
	backdrop-filter: blur(10px) saturate(1.3);
	-webkit-backdrop-filter: blur(10px) saturate(1.3);
	box-shadow: 0 1px 0 var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.header-inner { height: 100%; display: flex; align-items: center; gap: 1.5rem; }

.brand { flex: none; display: flex; align-items: center; }
.brand .custom-logo { max-height: 44px; width: auto; }
.site-title { font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }

.primary-nav { flex: 1; display: flex; justify-content: flex-end; }
.primary-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.primary-nav .menu > li { position: relative; display: flex; align-items: center; }
.primary-nav .menu > li > a {
	display: block; padding: .55rem .7rem; border-radius: var(--radius);
	color: var(--ink); text-decoration: none; font-weight: 550; font-size: .97rem;
}
.primary-nav .menu > li > a:hover,
.primary-nav .menu > .current-menu-item > a,
.primary-nav .menu > .current-menu-ancestor > a,
.primary-nav .menu > .current-menu-parent > a { background: color-mix(in srgb, var(--paper) 55%, transparent); }
.primary-nav .menu > .current-menu-item > a,
.primary-nav .menu > .current-menu-ancestor > a { box-shadow: inset 0 -2px 0 var(--accent); border-radius: var(--radius) var(--radius) 0 0; }
.submenu-toggle {
	display: inline-grid; place-items: center; width: 28px; height: 28px; margin-left: -.45rem;
	background: none; border: 0; color: var(--ink-3); cursor: pointer; border-radius: 4px;
}
.submenu-toggle svg { transition: transform .2s; }
.submenu-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.primary-nav .sub-menu {
	list-style: none; margin: 0; padding: .45rem;
	position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px;
	background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
	box-shadow: 0 14px 34px -14px color-mix(in srgb, var(--ink) 40%, transparent);
	opacity: 0; visibility: hidden; transform: translateY(-4px);
	transition: opacity .15s ease, transform .15s ease, visibility 0s .15s;
}
.primary-nav .menu > li:hover > .sub-menu,
.primary-nav .menu > li.is-open > .sub-menu {
	opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
}
.primary-nav .sub-menu a {
	display: block; padding: .55rem .7rem; border-radius: var(--radius);
	color: var(--ink); text-decoration: none; font-weight: 500;
}
.primary-nav .sub-menu a:hover, .primary-nav .sub-menu .current-menu-item > a { background: var(--surface); }
.menu-desc { display: block; font-size: .8rem; font-weight: 400; color: var(--ink-3); margin-top: 2px; }

.header-tools { display: flex; align-items: center; gap: .35rem; flex: none; }
.icon-button {
	display: inline-flex; align-items: center; gap: .5rem;
	height: 40px; min-width: 40px; padding: 0 .6rem; justify-content: center;
	background: none; border: 1px solid transparent; border-radius: var(--radius);
	color: var(--ink); cursor: pointer; font: 500 .92rem var(--font-ui);
}
.icon-button:hover { background: color-mix(in srgb, var(--paper) 55%, transparent); }
.search-open { border-color: color-mix(in srgb, var(--ink) 16%, transparent); background: color-mix(in srgb, var(--paper) 45%, transparent); }
.mode-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .mode-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .mode-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .mode-toggle .icon-sun { display: block; }
	:root:not([data-theme="light"]) .mode-toggle .icon-moon { display: none; }
}
.menu-toggle { display: none; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }

@media (max-width: 1080px) {
	.search-open-label, .search-open kbd { display: none; }
}

@media (max-width: 960px) {
	.menu-toggle { display: inline-flex; }
	.primary-nav {
		position: fixed; inset: var(--header-h) 0 0; z-index: 99;
		background: var(--paper);
		display: block; overflow-y: auto; padding: 1rem var(--gutter) 3rem;
		visibility: hidden; opacity: 0; transform: translateY(-8px);
		transition: opacity .2s, transform .2s, visibility 0s .2s;
	}
	.admin-bar .primary-nav { top: calc(var(--header-h) + 46px); }
	.primary-nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
	.primary-nav .menu { flex-direction: column; align-items: stretch; gap: 0; }
	.primary-nav .menu > li { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
	.primary-nav .menu > li > a { flex: 1; font-size: 1.15rem; padding: .95rem 0; background: none !important; box-shadow: none !important; }
	.submenu-toggle { width: 44px; height: 44px; margin: 0; }
	.primary-nav .sub-menu {
		position: static; flex-basis: 100%; min-width: 0; display: none;
		opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0;
		padding: 0 0 .75rem .25rem; background: none;
	}
	.primary-nav .menu > li:hover > .sub-menu { display: none; }
	.primary-nav .menu > li.is-open > .sub-menu { display: block; }
	body.nav-open { overflow: hidden; }
}

/* ---------- Progress line ---------- */

.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 101; pointer-events: none; }
.admin-bar .progress { top: 32px; }
.progress span { display: block; height: 100%; background: var(--hi); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Sky & clouds ---------- */

.sky-band {
	position: relative; isolation: isolate; overflow: hidden;
	background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky) 52%, var(--paper) 100%);
	padding-top: calc(var(--header-h) + clamp(1.5rem, 4vw, 3.5rem));
	padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.sky-band > *:not(.sky):not(.sky-front) { position: relative; z-index: 2; }

.sky, .sky-front {
	position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
	-webkit-mask-image: linear-gradient(180deg, #000 0%, #000 50%, transparent 96%);
	mask-image: linear-gradient(180deg, #000 0%, #000 50%, transparent 96%);
}
.home-title-wrap { position: relative; }
.sky-front {
	inset: -30% -8% -20% -15%; z-index: 3; mix-blend-mode: screen;
	-webkit-mask-image: radial-gradient(ellipse 60% 55% at 45% 50%, #000 40%, transparent 100%);
	mask-image: radial-gradient(ellipse 60% 55% at 45% 50%, #000 40%, transparent 100%);
}

.cloud-layer {
	position: absolute; top: 0; left: 0; height: 100%;
	background-repeat: repeat;
	will-change: transform;
}
.cloud-back {
	width: calc(100% + 1800px);
	background-image: var(--cloud-back); background-size: 1800px 700px;
	opacity: calc(var(--cloud-opacity, .7) * .95);
	animation: cirrus-drift-1800 var(--drift-back, 260s) linear infinite;
}
.cloud-mid {
	width: calc(100% + 1400px);
	background-image: var(--cloud-mid); background-size: 1400px 520px; background-position: 0 120px;
	opacity: var(--cloud-opacity, .7);
	animation: cirrus-drift-1400 var(--drift-mid, 170s) linear infinite;
}
.cloud-front {
	width: calc(100% + 1200px);
	background-image: var(--cloud-front); background-size: 1200px 420px; background-position: 0 60px;
	opacity: calc(var(--cloud-opacity, .7) * .55);
	animation: cirrus-drift-1200 var(--drift-front, 120s) linear infinite;
}
@keyframes cirrus-drift-1800 { to { transform: translate3d(-1800px, 0, 0); } }
@keyframes cirrus-drift-1400 { to { transform: translate3d(-1400px, 0, 0); } }
@keyframes cirrus-drift-1200 { to { transform: translate3d(-1200px, 0, 0); } }

:root[data-theme="dark"] .cloud-layer { filter: brightness(.42) saturate(.6); opacity: calc(var(--cloud-opacity, .7) * .55); }
:root[data-theme="dark"] .sky-front { mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .cloud-layer { filter: brightness(.42) saturate(.6); opacity: calc(var(--cloud-opacity, .7) * .55); }
	:root:not([data-theme="light"]) .sky-front { mix-blend-mode: normal; }
}

/* Storm sky: same clouds, darker air. */
.is-storm.sky-band,
body.is-storm .sky-band {
	--ink: var(--storm-ink);
	--ink-2: color-mix(in srgb, var(--storm-ink) 80%, var(--storm-top));
	--ink-3: color-mix(in srgb, var(--storm-ink) 62%, var(--storm-top));
	--line: color-mix(in srgb, var(--storm-ink) 18%, var(--storm-top));
	--accent: var(--hi);
	color: var(--ink);
	background: linear-gradient(180deg, var(--storm-top) 0%, var(--storm-bottom) 70%, color-mix(in srgb, var(--storm-bottom) 70%, var(--paper)) 100%);
}
.is-storm .cloud-layer { filter: brightness(.62) contrast(1.15); }
body.is-storm .sky-band { background: linear-gradient(180deg, var(--storm-top) 0%, var(--storm-bottom) 80%, var(--paper) 100%); }
body.is-storm:not(.hero-overlay) .site-header:not(.is-scrolled) { --ink: var(--storm-ink); color: var(--storm-ink); }
body.is-storm:not(.hero-overlay) .site-header:not(.is-scrolled) .icon-button,
body.is-storm:not(.hero-overlay) .site-header:not(.is-scrolled) .site-title,
body.is-storm:not(.hero-overlay) .site-header:not(.is-scrolled) .primary-nav .menu > li > a { color: var(--storm-ink); }
@media (max-width: 960px) {
	body.is-storm .primary-nav { --ink: var(--page-ink); }
	body.is-storm .primary-nav .menu > li > a { color: var(--page-ink) !important; }
}

@media (prefers-reduced-motion: reduce) {
	.cloud-layer { animation: none !important; }
	* { scroll-behavior: auto !important; }
}

/* ---------- Breadcrumbs, meta, badges, chips ---------- */

.breadcrumbs ol { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; font-size: .87rem; color: var(--ink-3); }
.breadcrumbs li + li::before { content: "/"; margin: 0 .5em; opacity: .55; }
.breadcrumbs a { color: var(--ink-2); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.1rem; font-size: .88rem; color: var(--ink-3); margin: 0; }
.meta > * { display: inline-flex; align-items: center; gap: .35em; }
.meta a { color: inherit; }

.topic { font-size: .85rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.topic:hover { text-decoration: underline; }

.badges { display: inline-flex; flex-wrap: wrap; gap: .35rem; }
.badge {
	display: inline-flex; align-items: center; gap: .4em;
	font: 600 .74rem/1 var(--font-ui);
	padding: .32em .62em .34em; border-radius: 999px; white-space: nowrap;
}
.badge::before { content: ""; width: .5em; height: .5em; border-radius: 50%; }
.badge-seen { color: var(--seen); background: color-mix(in srgb, var(--seen) 13%, var(--paper)); }
.badge-seen::before { background: currentColor; }
.badge-partial { color: var(--ink-2); background: color-mix(in srgb, var(--hi) 22%, var(--paper)); }
.badge-partial::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); border: 1px solid currentColor; }
.badge-dipped { color: var(--dipped); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dipped) 40%, transparent); }
.badge-dipped::before { border: 1.5px solid currentColor; }
.badge-lifer { color: #1b2731; background: var(--hi); }
.badge-lifer::before { display: none; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.chips a {
	display: inline-flex; align-items: baseline; gap: .45em;
	padding: .38em .8em; border-radius: 999px;
	border: 1px solid var(--line-strong); background: var(--paper);
	color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 500;
}
.chips a:hover { border-color: var(--accent); color: var(--accent); }
.chip-count { font-size: .78em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chips-light a { background: color-mix(in srgb, var(--paper) 72%, transparent); border-color: color-mix(in srgb, var(--ink) 16%, transparent); }

.terms-label { display: flex; align-items: center; gap: .4em; font-size: .85rem; font-weight: 600; color: var(--ink-2); margin: 1.4rem 0 .55rem; }
.small-head { font-size: 1.05rem; font-weight: 700; margin: 0 0 .5rem; }

/* ---------- Sections ---------- */

.home-section { padding-block: clamp(2.75rem, 6vw, 5rem); }
.home-section + .home-section:not(.home-storm):not(.home-lifelist) { padding-top: 0; }

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem; margin-bottom: 1.6rem; }
.section-head h2 { font-size: clamp(1.45rem, 2.6vw, 1.95rem); font-weight: 750; letter-spacing: -0.025em; }
.see-all { font-weight: 600; font-size: .95rem; text-decoration: none; }
.see-all:hover { text-decoration: underline; }
.section-note { margin: -1rem 0 1.6rem; color: var(--ink-3); max-width: 40rem; }

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

.home-hero { padding-bottom: clamp(3rem, 7vw, 6rem); min-height: min(88vh, 780px); display: flex; align-items: center; }
.home-hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.home-title {
	font-size: clamp(2.9rem, 7.4vw, 6.6rem);
	font-weight: 800; line-height: .94; letter-spacing: -0.045em;
	max-width: 11ch; text-wrap: balance;
}
.home-subtitle { font: 400 italic clamp(1.25rem, 2.2vw, 1.6rem)/1.3 var(--font-text); color: var(--ink-2); margin: 1rem 0 0; }
.home-intro { font: 400 1.12rem/1.6 var(--font-text); color: var(--ink-2); max-width: 34rem; margin: 1.5rem 0 0; }
.hero-search {
	margin-top: 2rem; display: flex; align-items: center; gap: .7rem; width: min(100%, 26rem);
	padding: .85rem 1rem; border-radius: 10px; cursor: text;
	background: color-mix(in srgb, var(--paper) 82%, transparent);
	border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
	color: var(--ink-3); font: 400 1rem var(--font-ui); text-align: left;
}
.hero-search span { flex: 1; }
.hero-search:hover { border-color: var(--accent); }
.feature-label { font-size: .85rem; font-weight: 600; color: var(--ink-2); margin: 0 0 .6rem; }

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

.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1.25rem, 2.5vw, 2rem); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.grid-list { grid-template-columns: 1fr; max-width: 56rem; }

.card { position: relative; display: flex; flex-direction: column; gap: .9rem; min-width: 0; }
.card-media { display: block; overflow: hidden; border-radius: var(--radius); background: var(--surface); aspect-ratio: 3 / 2; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.025); }
.card-body { display: flex; flex-direction: column; gap: .45rem; }
.card-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; }
.card-title { font-size: 1.22rem; font-weight: 680; line-height: 1.22; letter-spacing: -0.015em; text-wrap: pretty; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.card .topic, .card .badges { position: relative; z-index: 2; }
.card-excerpt { margin: 0; color: var(--ink-2); font: 400 1rem/1.55 var(--font-text); }

.card-list { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 1.25rem; align-items: start; }
.card-list .card-media { aspect-ratio: 4 / 3; }
.card-list:not(:has(.card-media)) { grid-template-columns: 1fr; }
.card-list .card-excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 520px) {
	.card-list { grid-template-columns: 1fr; }
}

.card-feature {
	background: var(--paper); border-radius: 10px; padding: .6rem .6rem 1.4rem;
	border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
}
.card-feature .card-body { padding: 0 .8rem; }
.card-feature .card-title { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.card-feature .card-media { border-radius: 6px; }

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

/* ---------- Topics ---------- */

.topic-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 215px), 1fr)); border-top: 1px solid var(--line); }
.topic-list a {
	display: grid; gap: .2rem; height: 100%;
	padding: 1.1rem 1rem 1.2rem 0; margin-right: 1rem;
	border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink);
}
.topic-list a:hover .topic-name { color: var(--accent); text-decoration: underline; }
.topic-name { font-weight: 700; font-size: 1.08rem; }
.topic-count { display: inline-flex; align-items: center; gap: .35em; font-size: .9rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.topic-latest { font-size: .8rem; color: var(--ink-3); }

/* ---------- Species & places ---------- */

.explore-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 2rem 3rem; }
.explore-head { display: flex; align-items: center; gap: .45rem; font-size: 1rem; font-weight: 700; margin-bottom: .9rem; color: var(--ink-2); }

/* ---------- Life list strip ---------- */

.home-lifelist { background: var(--surface); border-block: 1px solid var(--line); padding-block: 2rem; }
.lifelist-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 3rem; }
.lifelist-strip h2 { font-size: 1.3rem; }
.lifelist-strip h2 a { color: var(--ink); }
.life-totals { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: 0; }
.life-totals > div { display: flex; flex-direction: column-reverse; }
.life-totals dt { font-size: .85rem; color: var(--ink-2); }
.life-totals dd { margin: 0; font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.life-last { margin: 0 0 0 auto; color: var(--ink-2); font-size: .95rem; }

/* ---------- Storm band ---------- */

.home-storm { padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: clamp(3rem, 6vw, 5rem); margin-block: clamp(1rem, 3vw, 2rem); }
.home-storm .card-title a { color: var(--ink); }
.home-storm .meta { color: var(--ink-3); }
.home-storm .card-media { background: #26323d; }

/* ---------- Gallery tiles ---------- */

.gallery-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 1.5rem; }
.gallery-tiles a { display: grid; gap: .8rem; text-decoration: none; color: var(--ink); }
.tile-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-tiles a:hover img { transform: scale(1.03); }
.tile-text { display: grid; gap: .25rem; }
.tile-title { font-size: 1.15rem; font-weight: 700; }
.gallery-tiles a:hover .tile-title { text-decoration: underline; }
.tile-count { display: inline-flex; align-items: center; gap: .35em; font-size: .85rem; color: var(--ink-3); }
.tile-desc { font: 400 .98rem/1.45 var(--font-text); color: var(--ink-2); }

/* ---------- Newsletter ---------- */

.newsletter {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem 3rem; align-items: center;
	background: var(--surface); border-radius: 12px; padding: clamp(1.5rem, 4vw, 2.75rem);
	border: 1px solid var(--line);
}
.newsletter h2 { font-size: 1.45rem; margin-bottom: .4rem; }
.newsletter p { margin: 0; color: var(--ink-2); }
.newsletter-post { margin-block: 3rem 0; grid-template-columns: 1fr; }
.newsletter form { display: flex; flex-wrap: wrap; gap: .5rem; }
.newsletter input[type="email"] { flex: 1 1 14rem; }
@media (max-width: 720px) { .newsletter { grid-template-columns: 1fr; } }

/* ---------- Single post ---------- */

.post-header { padding-bottom: clamp(2rem, 4vw, 3rem); }
.post-header-inner > * { max-width: 58rem; }
.post-title { font-size: clamp(2.1rem, 5vw, 3.7rem); font-weight: 780; line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; margin: .35rem 0 1rem; }
.post-kicker:empty { display: none; }
.plain-header { padding-top: calc(var(--header-h) + 2.5rem); padding-bottom: 1.5rem; }

.post-hero { position: relative; margin-top: var(--header-h); color: #fff; }
.admin-bar .post-hero { margin-top: calc(var(--header-h)); }
.post-hero-media img { width: 100%; height: clamp(420px, 76vh, 860px); object-fit: cover; }
.post-hero-media::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, transparent 35%, rgba(10, 16, 22, .2) 55%, rgba(10, 16, 22, .78) 100%);
}
.post-hero-text { position: absolute; left: 0; right: 0; bottom: 0; padding-bottom: clamp(1.5rem, 4vw, 3rem); }
.post-hero .post-title { color: #fff; max-width: 22ch; text-shadow: 0 1px 24px rgba(0,0,0,.25); }
.post-hero .meta, .post-hero .breadcrumbs ol, .post-hero .breadcrumbs a { color: rgba(255,255,255,.88); }
.post-hero .badge-seen, .post-hero .badge-dipped, .post-hero .badge-partial { background: #fff; }
.post-hero-caption { font-size: .82rem; color: var(--ink-3); margin-top: .5rem; text-align: right; }

.post-stacked-image { margin: 0 auto 1rem; }
.post-stacked-image img { width: 100%; border-radius: var(--radius); max-height: 82vh; object-fit: cover; }
.post-stacked-image figcaption { font-size: .85rem; color: var(--ink-3); margin-top: .5rem; }

.post-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, var(--measure)) minmax(0, 1fr);
	column-gap: clamp(1.5rem, 4vw, 3.5rem);
	padding-top: clamp(2rem, 4vw, 3rem);
}
.post-main { grid-column: 2; min-width: 0; }
.post-aside { grid-column: 1; justify-self: end; width: 100%; max-width: 17rem; }

.toc { position: sticky; top: calc(var(--header-h) + 1.5rem); max-height: calc(100vh - var(--header-h) - 3rem); overflow: auto; font-size: .9rem; }
.toc summary { font-weight: 700; cursor: pointer; list-style: none; padding: .2rem 0 .7rem; color: var(--ink-2); }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc ol ol { padding-left: .9rem; font-size: .95em; }
.toc a {
	display: block; padding: .32rem 0 .32rem .85rem; border-left: 2px solid var(--line);
	color: var(--ink-2); text-decoration: none; line-height: 1.35;
}
.toc a:hover { color: var(--accent); }
.toc a.is-active { border-left-color: var(--accent); color: var(--ink); font-weight: 600; }

@media (max-width: 1180px) {
	.post-layout { grid-template-columns: minmax(0, 1fr); max-width: calc(var(--measure) + var(--gutter) * 2); }
	.post-main, .post-aside { grid-column: 1; }
	.post-aside { max-width: none; justify-self: stretch; margin-bottom: 1.5rem; }
	.toc { position: static; max-height: none; border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1.1rem; background: var(--surface); }
	.toc summary { padding: 0; }
	.toc details[open] summary { padding-bottom: .7rem; }
}

/* Trip facts */
.trip-facts { margin: 0 0 2.25rem; }
.trip-facts dl, dl.trip-facts {
	display: flex; flex-wrap: wrap; gap: 0;
	margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface);
}
.trip-facts dl > div, dl.trip-facts > div { flex: 1 1 150px; padding: .85rem 1rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.trip-facts dt { display: flex; align-items: center; gap: .35em; font-size: .78rem; color: var(--ink-3); margin-bottom: .3rem; }
.trip-facts dd { margin: 0; font-weight: 600; font-size: .98rem; }

/* Article body */
.entry-content { font-family: var(--font-text); font-size: var(--body-size); line-height: 1.72; }
.entry-content > * { margin-block: 0 1.2em; }
.entry-content h2, .entry-content h3, .entry-content h4 { font-family: var(--font-ui); margin-top: 2em; margin-bottom: .6em; }
.entry-content h2 { font-size: 1.55em; letter-spacing: -0.02em; }
.entry-content h3 { font-size: 1.2em; }
.entry-content h4 { font-size: 1em; }
.entry-content blockquote { margin-inline: 0; padding: .2em 0 .2em 1.2em; border-left: 3px solid var(--sky-top); font-style: italic; color: var(--ink-2); }
.entry-content figure { margin-inline: 0; }
.entry-content img { border-radius: 4px; }
.entry-content figcaption, .entry-content .wp-element-caption { font-family: var(--font-ui); font-size: .78em; line-height: 1.4; color: var(--ink-3); margin-top: .55em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li + li { margin-top: .3em; }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.5em; }
.entry-content table { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: .85em; }
.entry-content th, .entry-content td { padding: .55em .7em; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content iframe { max-width: 100%; }
.entry-content .wp-block-gallery { gap: .5em; }
.entry-content .alignwide, .entry-content .alignfull { max-width: none; }
.entry-content .alignleft { float: left; margin: .3em 1.5em 1em 0; max-width: 50%; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.5em; max-width: 50%; }
.entry-content::after { content: ""; display: table; clear: both; }
.entry-content [data-lightbox] { cursor: zoom-in; }

@media (min-width: 1000px) {
	.has-wide-images .post-layout:not(.has-toc) .entry-content > .wp-block-image:not(.alignleft):not(.alignright):not(.is-resized),
	.has-wide-images .post-layout:not(.has-toc) .entry-content > .wp-block-gallery,
	.post-layout:not(.has-toc) .entry-content > .alignwide { margin-inline: -7rem; }
	.has-wide-images .post-layout.has-toc .entry-content > .wp-block-image:not(.alignleft):not(.alignright):not(.is-resized),
	.has-wide-images .post-layout.has-toc .entry-content > .wp-block-gallery,
	.post-layout.has-toc .entry-content > .alignwide { margin-right: -9rem; }
	.entry-content > .alignfull { margin-inline: calc(50% - 50vw); }
}

/* Post footer */
.post-footer { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 2rem; display: grid; gap: 2rem; }
.post-terms .terms-label:first-of-type { margin-top: .8rem; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.share-label { font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.share ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.share a, .share button {
	display: inline-flex; align-items: center; gap: .4em;
	padding: .45em .8em; border-radius: 999px; border: 1px solid var(--line-strong);
	background: var(--paper); color: var(--ink); font: 500 .85rem var(--font-ui); text-decoration: none; cursor: pointer;
}
.share a:hover, .share button:hover { border-color: var(--accent); color: var(--accent); }
.author-box { display: flex; gap: 1rem; align-items: flex-start; }
.author-box img { border-radius: 50%; flex: none; }
.author-name { margin: 0 0 .25rem; font-weight: 700; }
.author-name a { color: var(--ink); }
.author-bio { margin: 0; color: var(--ink-2); font: 400 1rem/1.55 var(--font-text); }

.after-post { margin-top: 3rem; }
.related { padding-block: clamp(3rem, 6vw, 4.5rem) 0; }

.post-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1rem; margin-top: 3.5rem; }
.post-nav-item {
	display: flex; align-items: center; gap: 1rem; padding: .8rem; border-radius: 10px;
	border: 1px solid var(--line); text-decoration: none; color: var(--ink);
}
.post-nav-item:hover { border-color: var(--accent); }
.post-nav-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; flex: none; }
.post-nav-item.is-next { flex-direction: row-reverse; text-align: right; }
.post-nav-label { display: block; font-size: .8rem; color: var(--ink-3); }
.post-nav-title { display: block; font-weight: 650; line-height: 1.3; }

/* Comments */
.comments-wrap { margin-top: 3.5rem; }
.comments-title, .comment-reply-title { font-size: 1.35rem; margin-bottom: 1.2rem; }
.comment-list { list-style: none; padding: 0; margin: 0 0 2.5rem; }
.comment-list .children { list-style: none; padding-left: clamp(1rem, 4vw, 2.5rem); }
.comment-body { padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.comment-author { display: flex; align-items: center; gap: .6rem; font-weight: 650; }
.comment-author img { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: .8rem; margin: .2rem 0 .6rem 3.4rem; }
.comment-metadata a { color: var(--ink-3); }
.comment-content { font: 400 1.02rem/1.6 var(--font-text); }
.reply a { font-size: .85rem; font-weight: 600; }
.comment-form { display: grid; gap: 1rem; }
.comment-form label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .3rem; }
.comment-form input:not([type="checkbox"]):not([type="submit"]), .comment-form textarea { width: 100%; }

/* ---------- Archives ---------- */

.archive-header-inner { max-width: calc(58rem + var(--gutter) * 2); margin-inline: 0; }
.archive-header .wrap-wide.archive-header-inner { margin-inline: auto; max-width: calc(80rem + var(--gutter) * 2); }
.archive-title { font-size: clamp(2.2rem, 5.2vw, 3.8rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin-bottom: .8rem; }
.archive-desc { font: 400 1.12rem/1.6 var(--font-text); color: var(--ink-2); max-width: 42rem; margin: 0 0 1.2rem; }
.archive-desc p { margin: 0 0 .6em; }
.archive-body { padding-block: 1rem clamp(3rem, 6vw, 5rem); }

.term-hub-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem 3rem; align-items: start; }
.term-hub-grid .archive-header-inner { max-width: none; }
.scientific { font: 400 italic 1.2rem var(--font-text); color: var(--ink-2); margin: -.2rem 0 1rem; }
.hub-facts { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.2rem; font-size: .92rem; color: var(--ink-2); }
.hub-photo { margin: 0; }
.hub-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
@media (max-width: 860px) { .term-hub-grid { grid-template-columns: 1fr; } }

/* Filter bar */
.filter-bar { margin-bottom: 2rem; }
.filter-details { border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.filter-details > summary {
	display: flex; align-items: center; gap: .55rem; cursor: pointer; list-style: none;
	padding: .8rem 1rem; font-weight: 600;
}
.filter-details > summary::-webkit-details-marker { display: none; }
.filter-details > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 1.6px solid var(--ink-3); border-bottom: 1.6px solid var(--ink-3); transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.filter-details[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.filter-count { background: var(--accent); color: var(--on-accent); border-radius: 999px; font-size: .75rem; min-width: 1.4rem; height: 1.4rem; display: inline-grid; place-items: center; padding: 0 .35rem; }
.filter-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 1rem; padding: .25rem 1rem 1rem; align-items: end; }
.filter-field { display: grid; gap: .3rem; min-width: 0; }
.filter-field label { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.filter-field select, .filter-field input { width: 100%; }
.filter-actions { display: flex; align-items: center; gap: 1rem; }
.filter-clear { font-size: .9rem; }
.filter-status { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: 1rem; }
.result-count { margin: 0; font-size: .92rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.active-filters { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.active-filters a {
	display: inline-flex; align-items: center; gap: .35em; padding: .3em .55em .3em .8em;
	border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, var(--paper)); color: var(--accent);
	font-size: .85rem; font-weight: 600; text-decoration: none;
}
.active-filters a:hover { background: color-mix(in srgb, var(--accent) 20%, var(--paper)); }

.pagination { margin-top: 3rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.pagination .page-numbers {
	display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 .8rem;
	border-radius: var(--radius); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 550;
}
.pagination .page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pagination .page-numbers.dots { border: 0; }
.pagination a.page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.load-more-wrap { margin-top: 3rem; display: flex; align-items: center; gap: 1rem; }
.load-more-status { margin: 0; color: var(--ink-3); font-size: .9rem; }

.empty-state { padding: 2.5rem 0; color: var(--ink-2); }
.empty-title { font-size: 1.25rem; font-weight: 700; color: var(--ink); margin: 0 0 .4rem; }

.inline-search { display: flex; gap: .5rem; max-width: 34rem; margin: 1rem 0; }
.inline-search input { flex: 1; }
.search-terms { margin-top: .5rem; }

/* ---------- Pages ---------- */

.page-body { padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(3rem, 6vw, 5rem); }
.entry-wide { max-width: none; }

/* Gallery wall */
.photo-wall { display: flex; flex-wrap: wrap; gap: 6px; font-size: 1rem; }
.photo-wall > *:not(figure):not(.wp-block-gallery):not(.wp-block-image) { flex-basis: 100%; margin-bottom: 1rem; font-family: var(--font-text); }
.photo-wall > p:empty { display: none; }
.photo-wall .wp-block-gallery { display: contents; }
.photo-wall figure, .photo-wall .wp-block-image { margin: 0 !important; position: relative; overflow: hidden; border-radius: 3px; background: var(--surface); }
.photo-wall img { border-radius: 0; }
.photo-wall figcaption {
	position: absolute; inset: auto 0 0; margin: 0 !important; padding: 1.6rem .7rem .55rem;
	background: linear-gradient(180deg, transparent, rgba(8, 12, 16, .7)); color: #fff !important;
	font-size: .8rem !important; opacity: 0; transition: opacity .2s;
}
.photo-wall figure:hover figcaption, .photo-wall figure:focus-within figcaption { opacity: 1; }
.photo-wall::after { content: ""; flex-grow: 999; }

.gallery-justified .photo-wall figure { flex: var(--ar, 1.5) 1 calc(var(--ar, 1.5) * var(--row-h)); height: auto; }
.gallery-justified .photo-wall figure img { width: 100%; height: 100%; aspect-ratio: var(--ar, 1.5); object-fit: cover; }
.gallery-grid .photo-wall figure { flex: 0 0 calc(25% - 4.5px); aspect-ratio: 1; }
.gallery-grid .photo-wall figure img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) { .gallery-grid .photo-wall figure { flex-basis: calc(50% - 3px); } }
.gallery-masonry .photo-wall { display: block; columns: 3 280px; column-gap: 6px; }
.gallery-masonry .photo-wall figure { break-inside: avoid; margin-bottom: 6px !important; }
.gallery-masonry .photo-wall > *:not(figure):not(.wp-block-gallery) { column-span: all; }
.gallery-masonry .photo-wall img { width: 100%; }
@media (max-width: 600px) {
	.gallery-justified .photo-wall figure { flex-basis: calc(var(--ar, 1.5) * 150px); }
}

/* ---------- Life list ---------- */

.life-totals-page { margin: 1.2rem 0 .8rem; }
.life-intro { max-width: 46rem; margin-bottom: 2rem; }
.life-controls {
	display: flex; flex-wrap: wrap; align-items: end; gap: 1rem 1.2rem;
	padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
	position: sticky; top: calc(var(--header-h) + .5rem); z-index: 5;
}
.life-search { flex: 1 1 16rem; }
.check { display: inline-flex; align-items: center; gap: .45rem; font-size: .92rem; padding-bottom: .55rem; }
.life-controls .result-count { margin-left: auto; padding-bottom: .55rem; }
.letter-bar { display: flex; flex-wrap: wrap; gap: .2rem; margin: 1.2rem 0; }
.letter-bar button {
	min-width: 2rem; height: 2rem; border: 0; border-radius: 4px; background: none; cursor: pointer;
	font: 650 .9rem var(--font-ui); color: var(--accent);
}
.letter-bar button:hover { background: var(--surface); }
.letter-bar button:disabled { color: var(--line-strong); cursor: default; background: none; }
.life-items { list-style: none; margin: 0; padding: 0; columns: 2 26rem; column-gap: 3rem; }
.life-items li {
	break-inside: avoid; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
	padding: .55rem 0; border-bottom: 1px solid var(--line);
}
.life-items li[hidden] { display: none; }
.life-name { font-weight: 550; }
.life-name a { color: var(--ink); text-decoration-color: var(--line-strong); }
.life-name a:hover { color: var(--accent); }
.life-sci { display: block; font: 400 italic .85rem var(--font-text); color: var(--ink-3); }
.life-meta { display: flex; gap: .7rem; align-items: baseline; font-size: .8rem; color: var(--ink-3); flex: none; font-variant-numeric: tabular-nums; }
.life-wc { font-weight: 700; color: var(--seen); }
.life-items li.is-flash { background: color-mix(in srgb, var(--hi) 30%, transparent); }

/* ---------- Spots & maps ---------- */

.cirrus-map { width: 100%; height: 340px; border-radius: 10px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); z-index: 1; }
.map-small { height: 280px; }
.map-hub { height: 360px; }
.spots-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 2rem; padding-block: 1rem 4rem; align-items: start; }
.spots-map-col { position: sticky; top: calc(var(--header-h) + 1rem); }
.map-spots { height: calc(100vh - var(--header-h) - 2rem); min-height: 420px; }
.spots-filter { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: 1rem; align-items: end; }
.spots-filter .result-count { grid-column: 1 / -1; }
.spot-list { list-style: none; margin: 0; padding: 0; }
.spot { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.spot.is-active { background: linear-gradient(90deg, color-mix(in srgb, var(--hi) 22%, transparent), transparent); }
.spot-title { font-size: 1.15rem; }
.spot-title a { color: var(--ink); text-decoration: none; }
.spot-title a:hover { text-decoration: underline; }
.spot-meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .85rem; color: var(--ink-3); margin: .35rem 0; }
.spot-meta span { display: inline-flex; align-items: center; gap: .3em; }
.spot-species { font: 400 .95rem/1.45 var(--font-text); color: var(--ink-2); margin: 0 0 .5rem; }
@media (max-width: 900px) {
	.spots-layout { grid-template-columns: 1fr; }
	.spots-map-col { position: static; }
	.map-spots { height: 58vh; }
}
.spot-single { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 2.5rem; padding-block: 2rem 1rem; }
.spot-photo { margin: 0 0 1.5rem; }
.spot-photo img { border-radius: 10px; width: 100%; }
.spot-aside { display: grid; gap: 1rem; align-content: start; }
.spot-facts { flex-direction: column; }
@media (max-width: 860px) { .spot-single { grid-template-columns: 1fr; } }

.leaflet-popup-content { font-family: var(--font-ui); }
.leaflet-popup-content a { font-weight: 650; }
.cirrus-marker { display: block;
	width: 16px; height: 16px; border-radius: 50%;
	background: var(--accent-base); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.cirrus-marker.is-active { background: var(--hi); transform: scale(1.35); }

/* ---------- Search dialog ---------- */

.search-dialog {
	width: min(100% - 2rem, 44rem); max-width: none; max-height: min(80vh, 720px);
	margin: clamp(1rem, 10vh, 6rem) auto auto; padding: 0;
	border: 1px solid var(--line); border-radius: 14px;
	background: var(--paper); color: var(--ink);
	box-shadow: 0 30px 80px -20px rgba(10, 20, 30, .45);
}
.search-dialog::backdrop { background: color-mix(in srgb, var(--sky-top) 55%, rgba(10, 16, 22, .55)); backdrop-filter: blur(3px); }
.search-panel { display: flex; flex-direction: column; max-height: inherit; }
.search-dialog-form { display: flex; align-items: center; gap: .7rem; padding: .7rem .7rem .7rem 1.1rem; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.search-dialog-form input { flex: 1; border: 0; font-size: 1.2rem; padding: .6rem 0; background: none; }
.search-dialog-form input:focus { outline: none; }
.search-dialog-form input::-webkit-search-cancel-button { display: none; }
.search-results, .search-suggest { overflow-y: auto; padding: .5rem 1.1rem 1.2rem; }
.search-results:empty { display: none; }
.search-results:not(:empty) + .search-suggest { display: none; }
.suggest-label, .results-label { font-size: .8rem; font-weight: 650; color: var(--ink-3); margin: 1rem 0 .55rem; }
.results-list { list-style: none; margin: 0; padding: 0; }
.results-list a { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .7rem; margin: 0 -.7rem; border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.results-list a:hover, .results-list a:focus, .results-list a.is-selected { background: var(--surface); outline: none; }
.results-list small { color: var(--ink-3); flex: none; }
.results-empty { color: var(--ink-3); padding: 1rem 0; margin: 0; }

/* ---------- Lightbox ---------- */

.lightbox {
	width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
	background: rgba(8, 12, 16, .96); color: #fff;
}
.lightbox::backdrop { background: rgba(8, 12, 16, .96); }
.lightbox-stage { position: absolute; inset: 3.5rem 4.5rem 5rem; display: grid; place-items: center; }
.lightbox-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; user-select: none; }
.lightbox-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 1rem 1.5rem 1.4rem; display: flex; gap: 1.5rem; align-items: baseline; justify-content: space-between; font-size: .95rem; }
.lightbox-caption { margin: 0; color: rgba(255,255,255,.9); }
.lightbox-count { color: rgba(255,255,255,.6); font-variant-numeric: tabular-nums; flex: none; }
.lightbox button {
	position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
	border: 0; background: rgba(255,255,255,.08); color: #fff; cursor: pointer;
}
.lightbox button:hover { background: rgba(255,255,255,.18); }
.lightbox-close { top: .9rem; right: .9rem; }
.lightbox-prev { left: .9rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: .9rem; top: 50%; transform: translateY(-50%); }
.lightbox :focus-visible { outline-color: var(--hi); }
@media (max-width: 700px) {
	.lightbox-stage { inset: 3.5rem .5rem 6rem; }
	.lightbox-prev, .lightbox-next { top: auto; bottom: 4.6rem; transform: none; }
}

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

.site-footer { margin-top: clamp(3rem, 7vw, 6rem); background: var(--surface); border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 5vw, 4rem) 1.5rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 2.5rem 4rem; }
.footer-name { font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.footer-about p { color: var(--ink-2); font: 400 1rem/1.55 var(--font-text); margin: .6rem 0 1.2rem; max-width: 24rem; }
.social-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.social-links a { display: inline-flex; align-items: center; gap: .4em; padding: .35em .7em; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink); text-decoration: none; font-size: .85rem; }
.social-links a:hover { border-color: var(--accent); color: var(--accent); }
.directory { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5rem 2rem; }
.directory > li > a, .directory-head { display: block; font-weight: 700; color: var(--ink); text-decoration: none; margin-bottom: .6rem; }
.directory ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.directory ul a { color: var(--ink-2); text-decoration: none; font-size: .93rem; }
.directory a:hover { color: var(--accent); text-decoration: underline; }
.footer-widgets .widget-title { font-size: 1rem; margin-bottom: .6rem; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-3); }
.footer-base p { margin: 0; }
.to-top { display: inline-flex; align-items: center; gap: .3em; color: var(--ink-2); text-decoration: none; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Responsive hero ---------- */

@media (max-width: 960px) {
	.home-hero { min-height: 0; }
	.home-hero-grid { grid-template-columns: 1fr; }
	.home-title { max-width: 12ch; }
	.post-hero-media img { height: clamp(360px, 62vh, 640px); }
}

/* ---------- Core block bits ---------- */

.wp-block-button__link { color: var(--on-accent); }
.wp-block-quote cite { font-family: var(--font-ui); font-size: .8em; font-style: normal; color: var(--ink-3); }
.wp-block-pullquote { border-color: var(--line); }
.wp-block-separator { border-color: var(--line); }
.has-ink-color { color: var(--ink) !important; }
.has-accent-color { color: var(--accent) !important; }
.has-sky-background-color { background-color: var(--sky) !important; }
.has-highlight-background-color { background-color: var(--hi) !important; color: #1b2731; }
.has-paper-background-color { background-color: var(--paper) !important; }
.sticky, .bypostauthor, .gallery-caption { }
.page-links { font-family: var(--font-ui); font-size: .9rem; margin-top: 2rem; }

/* ---------- Late additions ---------- */

body:not(.has-sticky-header) .site-header { position: absolute; }
@media (min-width: 961px) {
	.primary-nav .menu > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
}
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88); }
}
@media (hover: none) { .hero-search kbd { display: none; } }
