/*
Theme Name: Remote Kove
Description: A custom block theme scaffolded by Studio Code.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 0.1.46
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: remote-kove
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
*/

/* WordPress inserts a margin-block-start equal to the block gap (24px unless
   theme.json sets styles.spacing.blockGap) between the template's top-level
   sections (header part, main, footer part) — a gap that exists even when no
   markup asks for it. Zero it so sections butt edge-to-edge and own their
   vertical rhythm via padding; this does not affect block gaps inside nested
   layouts. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* With that gap gone, main carries its own vertical padding so templates this
   theme does not author (WooCommerce shop, product, cart…) still clear the
   header and footer. A descendant selector, not a child one: WooCommerce wraps
   the single-product main in an extra group. Templates built from full-bleed
   sections opt out with is-flush and let the sections own the rhythm. */
.wp-site-blocks main {
	padding-block: var(--wp--preset--spacing--lg) var(--wp--preset--spacing--xl);
}
.wp-site-blocks main.is-flush {
	padding-block: 0;
}

/* === widest screens === */
/* Past 1920px the photo rows stop growing and centre, with the page showing either
   side: wider would upscale the 2560px web copies and crop the cover into a strip.
   The header keeps its full-width bar but lines its content up with the column. */
:root {
	--rk-max: 1920px;
}
.wp-site-blocks main {
	max-width: var(--rk-max);
	margin-inline: auto;
}
.wp-site-blocks .rk-header {
	padding-inline: max(var(--wp--preset--spacing--md), calc((100% - var(--rk-max)) / 2 + var(--wp--preset--spacing--md))) !important;
}
/* Cover height: 78% of the screen, but never taller than 900px, so a tall monitor
   doesn't zoom the featured photo in further. */
.wp-block-cover.rk-post-hero {
	min-height: min(78vh, 900px) !important;
}

/* === mode === */
/* Dark is the theme.json palette. Light swaps the same slugs to neutral values;
   on-photo and scrim never change, so text over photographs stays legible. */
html {
	color-scheme: dark;
}
html[data-theme="light"] {
	color-scheme: light;
	--wp--preset--color--primary: #4a5563;
	--wp--preset--color--background: #f6f6f5;
	--wp--preset--color--surface: #ececeb;
	--wp--preset--color--text: #151516;
	--wp--preset--color--muted: #6b6b6e;
	--wp--preset--color--hairline: #dcdcdb;
}

/* === base === */
:root {
	/* The gap between photos everywhere (pairs, rows, mosaics, home cover, cards):
	   12px on desktop, 6px on phones where stacked full-width photos make it read heavier. */
	--rk-rule: 12px;
	--rk-header-h: 64px;
}
@media (max-width: 781px) {
	:root {
		--rk-rule: 6px;
	}
}
body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
.rk-label {
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-weight: 500;
	line-height: 1.4;
}
.rk-label a,
.rk-footer a,
.rk-postnav a {
	text-decoration: none;
	color: inherit;
}
.rk-footer a:hover,
.rk-postnav a:hover {
	color: var(--wp--preset--color--primary);
}
a img {
	transition: filter 300ms ease;
}
a:hover img {
	filter: brightness(1.08);
}

/* === header === */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
}
body.admin-bar .wp-site-blocks > header.wp-block-template-part {
	top: var(--wp-admin--admin-bar--height, 32px);
}
/* On phones the WordPress admin bar scrolls away with the page instead of staying put, so
   the header sticks to the very top there, with no gap where the page shows through. */
@media (max-width: 600px) {
	body.admin-bar .wp-site-blocks > header.wp-block-template-part {
		top: 0;
	}
}
.rk-header .wp-block-site-title a {
	text-decoration: none;
}
.rk-nav .wp-block-navigation-item__content {
	text-transform: uppercase;
	letter-spacing: 0.14em;
	text-decoration: none;
	color: var(--wp--preset--color--muted);
}
.rk-nav .wp-block-navigation-item__content:hover,
.rk-nav .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--text);
}
/* Light · Dark switch: two joined buttons, the active mode filled. */
.rk-mode-switch {
	flex-wrap: nowrap;
	border: 1px solid var(--wp--preset--color--hairline);
}
.rk-mode-switch .wp-element-button {
	padding: 6px 12px;
	background: transparent;
	color: var(--wp--preset--color--muted);
	border: none;
	cursor: pointer;
	transition: color 200ms ease, background-color 200ms ease;
}
.rk-mode-switch .wp-element-button:hover {
	color: var(--wp--preset--color--text);
}
.rk-mode-switch .wp-element-button:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}
html:not([data-theme="light"]) .rk-mode-dark .wp-element-button,
html[data-theme="light"] .rk-mode-light .wp-element-button {
	background: var(--wp--preset--color--text);
	color: var(--wp--preset--color--background);
	cursor: default;
}
/* Phones: one icon button (added by site.js) in place of the two-word switch.
   It shows the current mode, a moon in dark and a sun in light. */
.rk-mode-icon {
	display: none;
	position: relative;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--text);
	cursor: pointer;
	flex: none;
}
.rk-mode-icon svg {
	position: absolute;
	inset: 10px;
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: opacity 250ms ease, transform 250ms ease;
}
.rk-mode-icon__sun,
html[data-theme="light"] .rk-mode-icon__moon {
	opacity: 0;
	transform: rotate(-90deg) scale(0.6);
}
html[data-theme="light"] .rk-mode-icon__sun {
	opacity: 1;
	transform: none;
}
.rk-mode-icon:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}
@media (max-width: 781px) {
	/* The 40px tap area overhangs by 10px so the drawn icon lines up with the header edge. */
	.wp-site-blocks .rk-mode-icon {
		display: block;
		margin-inline: -10px;
	}
	.wp-site-blocks .rk-mode-switch {
		display: none;
	}
}

/* === hero rule and titles === */
.wp-block-separator.rk-accent-rule {
	width: 72px;
	max-width: 72px;
	height: 2px;
	border: none;
	margin-inline: 0;
	opacity: 1;
}
.rk-hero-title,
.rk-mondrian h1 {
	max-width: 16ch;
	text-wrap: balance;
}

/* === photo rows: pair, wide === */
/* Photos in a row, and the rows themselves, are split by the same 12px rule as the home
   cover and the mosaics, with the page background showing through. Similar-toned photos
   (grass next to grass) stay separate instead of running together. */
.wp-site-blocks .rk-pair,
.wp-site-blocks .rk-wide {
	margin-block: 0;
}
/* The blocks set a 0 block gap, and WordPress sizes the grid columns from it; with the rule
   added, columns must leave room for it or a 2-up row falls to 1 column. Same minimums as
   the patterns: 20rem for a Pair, 12rem for a 3-across row. */
.wp-site-blocks .rk-pair {
	gap: var(--rk-rule);
	grid-template-columns: repeat(auto-fill, minmax(max(20rem, (100% - var(--rk-rule)) / 2), 1fr));
}
.wp-site-blocks .rk-pair:has(> :nth-child(3)) {
	grid-template-columns: repeat(auto-fill, minmax(max(12rem, (100% - 2 * var(--rk-rule)) / 3), 1fr));
}
.wp-site-blocks :is(.rk-pair, .rk-wide, .rk-portrait, .rk-mosaic) + :is(.rk-pair, .rk-wide, .rk-portrait, .rk-mosaic) {
	margin-block-start: var(--rk-rule);
}
.rk-pair .wp-block-image,
.rk-portrait .wp-block-image,
.rk-wide {
	position: relative;
	margin: 0;
}
.rk-pair .wp-block-image img,
.rk-portrait .wp-block-image img,
.rk-wide img {
	display: block;
	width: 100%;
	height: 100%;
}
.rk-pair .wp-block-image:has(figcaption)::after,
.rk-portrait .wp-block-image:has(figcaption)::after,
.rk-wide:has(figcaption)::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 32%;
	background: linear-gradient(transparent, rgb(13 13 15 / 0.55));
	pointer-events: none;
}
.rk-pair figcaption,
.rk-portrait figcaption,
.rk-wide figcaption {
	position: absolute;
	left: var(--wp--preset--spacing--md);
	bottom: var(--wp--preset--spacing--sm);
	z-index: 1;
	margin: 0;
	color: var(--wp--preset--color--on-photo);
}

/* === single portrait === */
/* One 4:5 photo, centred and sized so the whole frame fits the screen height on desktop. */
.wp-site-blocks .rk-portrait {
	margin-block: 0;
}
.rk-portrait .wp-block-image {
	width: min(100%, calc(min(88svh, 1100px) * 4 / 5));
	margin-inline: auto;
}

/* === mosaic (small Mondrian inside posts) === */
.wp-site-blocks .rk-mosaic {
	margin-block: var(--rk-rule);
	gap: var(--rk-rule);
	grid-template-areas: "a a b" "a a c";
	grid-template-rows: repeat(2, minmax(0, 1fr));
	aspect-ratio: 16 / 8;
	background: var(--wp--preset--color--background);
}
.rk-mosaic > * {
	margin: 0 !important;
	min-height: 0;
	min-width: 0;
	overflow: hidden;
}
.rk-mosaic .rk-m-a { grid-area: a; }
.rk-mosaic .rk-m-b { grid-area: b; }
.rk-mosaic .rk-m-note { grid-area: c; }
.rk-mosaic .wp-block-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.rk-note-text {
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

/* When a Pair or Mosaic crops a photo, keep one side in frame: the left for people at the
   left edge, the top for tall phone shots where a head would be cut off. */
.rk-pos-left img {
	object-position: 15% 50%;
}
.rk-pos-top img {
	object-position: 50% 10%;
}
/* The very top edge, for a photo whose subject runs right up to it (the skewers held up to the coach window in Uganda). */
.rk-pos-top-edge img {
	object-position: 50% 0;
}
/* The upper third, for two people whose heads are at different heights. */
.rk-pos-upper img {
	object-position: 50% 30%;
}
/* A quarter in from the left, for a selfie at the left with the subject behind it to the right (the gorilla selfie in Uganda). */
.rk-pos-left-quarter img {
	object-position: 25% 50%;
}
/* Right of centre, for a head in profile facing right whose nose would be cut (the takin in Bhutan). */
.rk-pos-right-third img {
	object-position: 62% 50%;
}
/* The bottom edge, for a standing figure whose feet would be cut (the archer in Bhutan). */
.rk-pos-bottom img {
	object-position: 50% 100%;
}
/* About page headshot: black and white, to sit with the monochrome site. The file stays in colour. */
.rk-headshot img {
	filter: grayscale(1) contrast(1.08);
}
/* Tall Mosaic, for a near-square big photo (the dancing photo in Uganda): on desktop the
   2x2 cell is about 10:9 instead of 4:3, so less is cropped off the top and bottom. */
.wp-site-blocks .rk-mosaic.rk-mosaic-tall {
	aspect-ratio: 16 / 9.6;
}
/* Just above centre, for a tall photo of a group crouched in the middle (the Batwa lighting a fire in Uganda). */
.rk-pos-upper-mid img {
	object-position: 50% 45%;
}

/* === Mondrian cover (home) === */
.wp-site-blocks .rk-mondrian {
	margin-block: 0;
	gap: var(--rk-rule);
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-template-rows: 1fr 1fr 0.85fr;
	grid-template-areas: "h h h a" "h h h b" "c d e e";
	height: calc(100svh - var(--rk-header-h));
	min-height: 640px;
	max-height: 1080px;
	background: var(--wp--preset--color--background);
}
.rk-mondrian > * {
	margin: 0 !important;
	min-height: 0 !important;
	min-width: 0;
	overflow: hidden;
}
.rk-mondrian .rk-md-hero { grid-area: h; }
.rk-mondrian .rk-md-a { grid-area: a; }
.rk-mondrian .rk-md-b { grid-area: b; }
.rk-mondrian .rk-md-c { grid-area: c; }
.rk-mondrian .rk-md-d { grid-area: d; }
.rk-mondrian .rk-md-e { grid-area: e; }
.rk-mondrian .wp-block-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.rk-mondrian .wp-block-cover {
	height: 100%;
}
.rk-mondrian .wp-block-image,
.rk-mondrian .wp-block-image a {
	display: block;
	height: 100%;
}
.rk-tile.is-layout-flex,
.rk-m-note.is-layout-flex {
	flex-wrap: nowrap;
}
.rk-tile .wp-block-heading,
.rk-m-note .rk-note-text {
	font-size: clamp(1.125rem, 1.7vw, 1.5rem) !important;
	line-height: 1.15;
}
.rk-tile .wp-block-heading a {
	text-decoration: none;
	color: inherit;
}
.rk-tile .wp-block-heading a:hover {
	color: var(--wp--preset--color--primary);
}

/* === post cards === */
/* Same 12px rule between the featured images as between photos in a Pair; rows have
   the title and date between them, so no extra row gap. */
.rk-cards {
	gap: 0 var(--rk-rule) !important;
}
/* WordPress sizes the two columns for a zero gap, so with the rule between them they wrapped to one.
   Allow for the rule; below about 45rem they still stack. */
.wp-site-blocks .rk-cards.is-layout-grid {
	grid-template-columns: repeat(auto-fill, minmax(max(min(22rem, 100%), calc(50% - var(--rk-rule) / 2)), 1fr));
}
.rk-cards .wp-block-post-featured-image {
	margin: 0;
	overflow: hidden;
}
.rk-cards .wp-block-post-title a {
	text-decoration: none;
}
.rk-cards .wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary);
}

/* === post navigation === */
.rk-postnav .post-navigation-link__label {
	display: block;
	margin-bottom: 4px;
	font-size: var(--wp--preset--font-size--label);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--wp--preset--color--muted);
}
.rk-postnav .post-navigation-link__title {
	font-size: var(--wp--preset--font-size--headline);
	font-weight: 600;
	letter-spacing: -0.02em;
}

/* Hide the previous/next band when there is nowhere to go (e.g. the only recording). */
.rk-postnav:not(:has(a)) {
	display: none;
}

/* === story text === */
.rk-story-text p,
.rk-text-row p:not(.rk-label) {
	color: color-mix(in srgb, var(--wp--preset--color--text) 82%, transparent);
}
.rk-story-text p {
	line-height: 1.75;
}

/* === story intro: lede and chapter list === */
/* The opening paragraph, a step up from the reading size so the intro reads as deliberate. */
.rk-story-text p.rk-lede {
	font-size: clamp(1.25rem, 1rem + 0.7vw, 1.5rem);
	line-height: 1.55;
	color: var(--wp--preset--color--text);
}
.rk-chapters-wrap {
	margin-top: var(--wp--preset--spacing--md) !important;
	padding-top: var(--wp--preset--spacing--sm);
	border-top: 1px solid var(--wp--preset--color--hairline);
}
.rk-story-text .rk-chapters-wrap .rk-label {
	color: var(--wp--preset--color--muted);
	margin: 0 0 var(--wp--preset--spacing--xs);
}
/* Numbered chapter links in the label style; wraps onto more lines on phones. */
.rk-chapters {
	counter-reset: rk-ch;
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.75rem;
	font-size: var(--wp--preset--font-size--label);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-weight: 500;
	line-height: 1.4;
}
.rk-chapters li {
	counter-increment: rk-ch;
	margin: 0;
}
.rk-chapters li::before {
	content: counter(rk-ch, decimal-leading-zero);
	margin-right: 0.6em;
	color: var(--wp--preset--color--muted);
}
.rk-chapters a {
	color: var(--wp--preset--color--text);
	text-decoration: none;
}
.rk-chapters a:hover,
.rk-chapters a:focus-visible {
	color: var(--wp--preset--color--primary);
}
/* The first chapter follows the intro closely, like any heading follows its text. */
.wp-site-blocks .rk-intro + .rk-story-text {
	padding-top: var(--wp--preset--spacing--md) !important;
}
/* Chapter links land with the heading clear of the sticky header and chapter bar. */
.rk-story-text h2[id] {
	scroll-margin-top: 8.5rem;
}
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* === chapter bar (assets/js/chapters.js) === */
/* A slim strip under the header once the intro's chapter list scrolls away. */
.rk-chapbar {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	background: color-mix(in srgb, var(--wp--preset--color--background) 92%, transparent);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--wp--preset--color--hairline);
	opacity: 0;
	transform: translateY(-6px);
	visibility: hidden;
	transition: opacity 200ms ease, transform 200ms ease, visibility 0s linear 200ms;
}
.rk-chapbar.is-on {
	opacity: 1;
	transform: none;
	visibility: visible;
	transition: opacity 200ms ease, transform 200ms ease, visibility 0s;
}
.rk-chapbar__inner {
	position: relative;
	max-width: var(--rk-max);
	margin-inline: auto;
	padding-inline: var(--wp--preset--spacing--md);
}
.rk-chapbar__toggle,
.rk-chapbar__list a {
	font-family: inherit;
	font-size: var(--wp--preset--font-size--label);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-weight: 500;
	line-height: 1.4;
	color: var(--wp--preset--color--text);
}
.rk-chapbar__toggle {
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	min-height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}
.rk-chapbar__num,
.rk-chapbar__total {
	color: var(--wp--preset--color--muted);
}
.rk-chapbar__chevron {
	width: 10px;
	height: 6px;
	margin-left: 0.2em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	transition: transform 200ms ease;
}
.rk-chapbar__toggle[aria-expanded="true"] .rk-chapbar__chevron {
	transform: rotate(180deg);
}
.rk-chapbar__toggle:hover .rk-chapbar__title {
	color: var(--wp--preset--color--primary);
}
.rk-chapbar__toggle:focus-visible,
.rk-chapbar__list a:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}
.rk-chapbar__list {
	position: absolute;
	top: 100%;
	left: var(--wp--preset--spacing--md);
	min-width: 18rem;
	margin: 0;
	padding: var(--wp--preset--spacing--xs) 0;
	list-style: none;
	background: var(--wp--preset--color--background);
	border: 1px solid var(--wp--preset--color--hairline);
}
.rk-chapbar__list[hidden] {
	display: none;
}
.rk-chapbar__list a {
	display: flex;
	gap: 0.75em;
	padding: 0.7rem var(--wp--preset--spacing--sm);
	text-decoration: none;
}
.rk-chapbar__list a:hover {
	background: var(--wp--preset--color--surface);
}
/* The chapter you are in: a surface panel with a short bar at its left edge. */
.rk-chapbar__list a[aria-current] {
	background: var(--wp--preset--color--surface);
	box-shadow: inset 2px 0 0 var(--wp--preset--color--text);
}
.rk-chapbar__list a[aria-current] .rk-chapbar__num {
	color: var(--wp--preset--color--text);
}
@media (max-width: 600px) {
	.rk-chapbar__list {
		left: 0;
		right: 0;
		min-width: 0;
		border-inline: 0;
	}
	.rk-chapbar__list a {
		padding-inline: var(--wp--preset--spacing--md);
	}
}
@media (prefers-reduced-motion: reduce) {
	.rk-chapbar,
	.rk-chapbar.is-on,
	.rk-chapbar__chevron {
		transition: none;
	}
}
@media print {
	.rk-chapbar {
		display: none;
	}
}

/* === forms === */
.wp-block-jetpack-contact-form input:not([type="checkbox"]):not([type="radio"]),
.wp-block-jetpack-contact-form textarea,
.wp-block-search__input {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: 0;
	padding: 12px 14px;
	font: inherit;
}
.wp-block-jetpack-contact-form input:focus,
.wp-block-jetpack-contact-form textarea:focus,
.wp-block-search__input:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 1px;
}
.wp-block-jetpack-contact-form .grunion-field-label,
.wp-block-jetpack-contact-form label {
	font-size: var(--wp--preset--font-size--label);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--wp--preset--color--muted);
}

/* === places map === */
/* Never taller than it is wide, so the whole-world view fills a phone screen with no blank bands. */
.rk-places-map {
	height: min(78svh, 100vw);
	min-height: min(480px, 100vw);
	max-height: 900px;
	background: var(--wp--preset--color--surface);
	border-block: 1px solid var(--wp--preset--color--hairline);
	font: inherit;
}
.rk-places-map:not(.is-ready) {
	display: none;
}
.rk-places-map .leaflet-container,
.rk-places-map.leaflet-container {
	background: var(--wp--preset--color--surface);
	font-family: inherit;
}
/* At in-between zoom levels tiles can leave hairline gaps; overlap them by a pixel (normal blending, so the overlap doesn't show). */
.rk-places-map .leaflet-tile {
	width: 257px !important;
	height: 257px !important;
	mix-blend-mode: normal !important;
}
/* Basemap tone. Applies to map tiles only; photographs are never filtered. */
.rk-places-map .leaflet-tile-pane {
	filter: grayscale(1) invert(1) brightness(0.82) contrast(1.15);
}
html[data-theme="light"] .rk-places-map .leaflet-tile-pane {
	filter: grayscale(1) brightness(1.04) contrast(0.92);
}
.rk-places-map:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: -2px;
}
/* Pins: Gallery a filled dot, Story a ring, Music a filled diamond (rule further down). A future "visited" layer: small hollow muted dot. */
.rk-pin {
	display: grid;
	place-items: center;
	background: none;
	border: none;
}
.rk-pin span {
	display: block;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--wp--preset--color--text);
	box-shadow: 0 0 0 3px var(--wp--preset--color--background);
	transition: transform 200ms ease;
}
.rk-pin--story span {
	background: var(--wp--preset--color--background);
	border: 3px solid var(--wp--preset--color--text);
}
.rk-pin--visited span {
	width: 8px;
	height: 8px;
	background: transparent;
	border: 1.5px solid var(--wp--preset--color--muted);
	box-shadow: none;
}
.leaflet-marker-icon.rk-pin:hover span,
.leaflet-marker-icon.rk-pin:focus-visible span {
	transform: scale(1.3);
}
.leaflet-marker-icon.rk-pin:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	border-radius: 50%;
}
/* Popups */
.rk-pop .leaflet-popup-content-wrapper {
	padding: 0;
	border-radius: 0;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
	border: 1px solid var(--wp--preset--color--hairline);
	box-shadow: none;
}
.rk-pop .leaflet-popup-content {
	margin: 0;
	width: 260px !important;
	font-family: inherit;
	line-height: 1.4;
}
.rk-pop .leaflet-popup-tip {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--hairline);
	box-shadow: none;
}
.rk-pop a.leaflet-popup-close-button {
	top: 6px;
	right: 6px;
	width: 26px;
	height: 26px;
	font-size: 20px;
	line-height: 24px;
	color: var(--wp--preset--color--on-photo);
	background: rgb(13 13 15 / 0.55);
	text-decoration: none;
}
.rk-pop__img img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}
.rk-pop__body {
	padding: 14px 16px 16px;
}
.rk-pop .rk-pop__meta {
	margin: 0 0 6px;
	font-size: 0.6875rem;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-weight: 500;
	color: var(--wp--preset--color--muted);
}
.rk-pop .rk-pop__title {
	font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.15;
	color: var(--wp--preset--color--text);
	text-decoration: none;
}
.rk-pop .rk-pop__title:hover {
	color: var(--wp--preset--color--primary);
}
/* A pin with several posts at the same place: a numbered dot, and a list in the popup. */
.rk-pin--group span {
	width: 22px;
	height: 22px;
	display: grid;
	place-items: center;
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1;
	color: var(--wp--preset--color--background);
}
.rk-pop__list {
	list-style: none;
	margin: 4px 0 0;
	padding: 0;
}
.rk-pop__list li + li {
	border-top: 1px solid var(--wp--preset--color--hairline);
}
.rk-pop__list a {
	display: grid;
	grid-template-columns: 56px 1fr;
	gap: 12px;
	align-items: center;
	padding: 10px 0;
	text-decoration: none;
}
.rk-pop__list img,
.rk-pop__list .rk-pop__noimg {
	display: block;
	width: 56px;
	height: 56px;
	object-fit: cover;
	background: var(--wp--preset--color--hairline);
}
.rk-pop__list .rk-pop__meta {
	display: block;
	margin-bottom: 4px;
}
.rk-pop__list .rk-pop__title {
	display: block;
	font-size: 1rem;
}
.rk-pop__list a:hover .rk-pop__title {
	color: var(--wp--preset--color--primary);
}
/* Controls */
.rk-places-map .leaflet-bar {
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: 0;
	box-shadow: none;
}
.rk-places-map .leaflet-bar a {
	border-radius: 0 !important;
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--text);
	border-bottom-color: var(--wp--preset--color--hairline);
}
.rk-places-map .leaflet-bar a:hover {
	background: var(--wp--preset--color--surface);
}
.rk-places-map .leaflet-control-attribution {
	background: color-mix(in srgb, var(--wp--preset--color--background) 80%, transparent);
	color: var(--wp--preset--color--muted);
	font-size: 10px;
}
.rk-places-map .leaflet-control-attribution a {
	color: inherit;
}
/* Legend */
.rk-legend {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--md);
}
.rk-legend span::before {
	content: "";
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-right: 8px;
	vertical-align: -1px;
	border-radius: 50%;
	box-sizing: border-box;
}
.rk-legend .rk-legend__gallery::before {
	background: var(--wp--preset--color--text);
}
.rk-legend .rk-legend__story::before {
	border: 2px solid var(--wp--preset--color--text);
}
.rk-legend .rk-legend__music::before {
	width: 9px;
	height: 9px;
	border-radius: 1px;
	rotate: 45deg;
	background: var(--wp--preset--color--text);
}
/* Index of the same places: the no-JS and screen-reader version, and a quick list. */
.rk-places-index {
	list-style: none;
	max-width: var(--wp--style--global--wide-size);
	margin: var(--wp--preset--spacing--lg) auto 0;
	padding: 0 var(--wp--style--root--padding-right) 0 var(--wp--style--root--padding-left);
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
	gap: 0 var(--wp--preset--spacing--md);
}
.rk-places-index__item {
	display: grid;
	gap: 4px;
	padding-block: var(--wp--preset--spacing--sm);
	border-top: 1px solid var(--wp--preset--color--hairline);
}
.rk-places-index__meta,
.rk-places-index__place {
	font-size: var(--wp--preset--font-size--label);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--wp--preset--color--muted);
}
.rk-places-index__item a {
	font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--wp--preset--color--text);
	text-decoration: none;
}
.rk-places-index__item a:hover {
	color: var(--wp--preset--color--primary);
}

/* === video (performances) === */
/* A still frame with a play button; the YouTube player loads only on click. */
.rk-video {
	margin-block: 0;
}
.rk-video__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
	overflow: hidden;
}
.rk-video__frame iframe,
.rk-video__play,
.rk-video__play img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
.rk-video__play img {
	object-fit: cover;
}
.rk-video__button {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 84px;
	height: 84px;
	translate: -50% -50%;
	border-radius: 50%;
	background: rgb(13 13 15 / 0.6);
	border: 1px solid rgb(245 245 243 / 0.7);
	transition: background-color 250ms ease, transform 250ms ease;
}
.rk-video__button::before {
	content: "";
	position: absolute;
	left: 34px;
	top: 27px;
	border-style: solid;
	border-width: 15px 0 15px 24px;
	border-color: transparent transparent transparent var(--wp--preset--color--on-photo);
}
.rk-video__play:hover .rk-video__button,
.rk-video__play:focus-visible .rk-video__button {
	background: rgb(13 13 15 / 0.85);
	transform: scale(1.06);
}
.rk-video__play:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: -4px;
}
.rk-video figcaption {
	margin-top: var(--wp--preset--spacing--xs);
	font-size: var(--wp--preset--font-size--label);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--wp--preset--color--muted);
}
/* Portrait (9:16): sized to the screen height on desktop, full width on phones. */
.rk-video--portrait .rk-video__frame {
	aspect-ratio: 9 / 16;
	width: min(100%, calc(min(85svh, 920px) * 9 / 16));
	margin-inline: auto;
}
.rk-video--portrait figcaption {
	text-align: center;
}
/* The same shape in the editor, so a portrait video previews as it will look. */
.editor-styles-wrapper .wp-block-embed.is-style-portrait .wp-block-embed__wrapper {
	aspect-ratio: 9 / 16;
	width: min(100%, 420px);
	margin-inline: auto;
}
.editor-styles-wrapper .wp-block-embed.is-style-portrait .wp-block-embed__wrapper::before {
	display: none;
}
.editor-styles-wrapper .wp-block-embed.is-style-portrait iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}
.editor-styles-wrapper .wp-block-embed.is-style-portrait .wp-block-embed__wrapper {
	position: relative;
}
.rk-performance-body > .rk-video.alignwide {
	margin-block-start: 0;
}
/* Self-hosted video (core Video block): a still with a play button that opens
   the full-screen viewer (assets/js/selfvideo.js). */
.wp-site-blocks .rk-selfvideo {
	margin: 0;
}
.rk-selfvideo video {
	display: block;
	width: 100%;
	aspect-ratio: 9 / 16;
	object-fit: cover;
	background: #000;
}
.rk-vthumb {
	position: relative;
}
.rk-vplay {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}
.rk-vplay:hover .rk-video__button,
.rk-vplay:focus-visible .rk-video__button {
	background: rgb(13 13 15 / 0.85);
	transform: scale(1.06);
}
.rk-vplay:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: -4px;
}
/* Performance with a portrait video: the video beside the notes on wider screens,
   stacked on phones. */
.wp-site-blocks .rk-perf-split {
	display: grid;
	gap: var(--wp--preset--spacing--md);
	margin-block-end: var(--wp--preset--spacing--xl);
}
/* The grid gap does the spacing, so drop WordPress's block-gap margin on the notes. */
.wp-site-blocks .rk-perf-split > * {
	margin-block: 0;
}
.rk-perf-split .rk-selfvideo {
	width: min(100%, calc(min(85svh, 920px) * 9 / 16));
	margin-inline: auto;
}
@media (min-width: 782px) {
	.wp-site-blocks .rk-perf-split {
		grid-template-columns: auto minmax(0, 1fr);
		gap: var(--wp--preset--spacing--lg);
		/* Notes line up with the top of the video, so they're read before pressing play. */
		align-items: start;
	}
	.wp-site-blocks .rk-perf-split .rk-selfvideo {
		width: calc(min(72svh, 820px) * 9 / 16);
		margin: 0;
	}
	.rk-perf-split .rk-performance-notes {
		padding-block: 0 !important;
		max-width: 34rem;
	}
}
/* The full-screen viewer. */
.rk-vbox {
	width: 100vw;
	height: 100svh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: hidden;
}
.rk-vbox[open] {
	display: grid;
	place-items: center;
}
.rk-vbox::backdrop {
	background: rgb(8 8 10 / 0.94);
}
.rk-vbox__video {
	display: block;
	width: auto;
	height: auto;
	max-width: 100vw;
	max-height: 100svh;
	background: #000;
}
.rk-vbox__close {
	position: fixed;
	top: max(12px, env(safe-area-inset-top));
	right: 12px;
	width: 48px;
	height: 48px;
	padding: 12px;
	border: 0;
	border-radius: 50%;
	background: rgb(13 13 15 / 0.6);
	color: #f5f5f3;
	cursor: pointer;
}
.rk-vbox__close svg {
	display: block;
	width: 24px;
	height: 24px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
}
.rk-vbox__close:hover {
	background: rgb(13 13 15 / 0.9);
}
.rk-vbox__close:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}
html.rk-vbox-open {
	overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
	.rk-vbox[open],
	.rk-vbox[open]::backdrop {
		animation: rk-vbox-in 220ms ease-out;
	}
	@keyframes rk-vbox-in {
		from {
			opacity: 0;
		}
	}
}
/* Music grid: 16:9 frames with a small play mark. */
.rk-cards--music .wp-block-post-featured-image {
	position: relative;
}
.rk-cards--music .wp-block-post-featured-image::after {
	content: "";
	position: absolute;
	left: var(--wp--preset--spacing--md);
	bottom: var(--wp--preset--spacing--sm);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgb(13 13 15 / 0.6) no-repeat 17px 50% / 13px 16px
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 16'%3E%3Cpath d='M0 0l13 8-13 8z' fill='%23f5f5f3'/%3E%3C/svg%3E");
	border: 1px solid rgb(245 245 243 / 0.7);
	pointer-events: none;
}
.rk-pin--music span {
	border-radius: 2px;
	rotate: 45deg;
	width: 12px;
	height: 12px;
}

/* === effects === */
/* Photos fade up from the dark. The hidden start state only exists once the
   script has added .rk-reveal, so the editor and no-JS visitors see everything. */
html.rk-reveal .rk-fade {
	opacity: 0;
	transition: opacity 800ms ease;
}
html.rk-reveal .rk-fade.is-in {
	opacity: 1;
}

/* === responsive === */
@media (max-width: 781px) {
	:root {
		--rk-header-h: 58px;
	}
	.wp-site-blocks .rk-mondrian {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: auto;
		/* Photo and tile swap sides on the second row, so it reads as a checkerboard. */
		grid-template-areas: "h h" "a b" "d c" "e e";
		height: auto;
		min-height: 0;
		max-height: none;
	}
	.rk-mondrian .rk-md-hero {
		min-height: 72svh !important;
	}
	.rk-mondrian .rk-md-a img,
	.rk-mondrian .rk-md-c img {
		aspect-ratio: 4 / 5;
	}
	.rk-mondrian .rk-md-e img {
		aspect-ratio: 16 / 9;
	}
	.wp-site-blocks .rk-mosaic {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-areas: "a a" "b c";
		grid-template-rows: auto;
		aspect-ratio: auto;
	}
	.rk-mosaic .rk-m-a img {
		aspect-ratio: 4 / 3;
	}
	.rk-mosaic .rk-m-b img {
		aspect-ratio: 4 / 5;
	}
	/* Tall Mosaic: on a phone the big photo is about 10:9, close to its own shape. */
	.wp-site-blocks .rk-mosaic.rk-mosaic-tall {
		aspect-ratio: auto;
	}
	.rk-mosaic.rk-mosaic-tall .rk-m-a img {
		aspect-ratio: 10 / 9;
	}
	/* Swapped Mosaic, for a small photo with a wide subject (the chameleon in Uganda): on a
	   phone the small photo goes full width at 4:3 and the big one sits beside the note at 4:5. */
	.wp-site-blocks .rk-mosaic.rk-mosaic-swap {
		grid-template-areas: "b b" "a c";
	}
	.rk-mosaic.rk-mosaic-swap .rk-m-a img {
		aspect-ratio: 4 / 5;
	}
	.rk-mosaic.rk-mosaic-swap .rk-m-b img {
		aspect-ratio: 4 / 3;
		object-position: 50% 50%;
	}
	/* Pairs stay side by side on a phone, so portraits don't stack into a long run of
	   single full-width photos; a tap opens the lightbox for the full frame. A 3-across row
	   puts its first photo full width, cropped to 4:3, with the other two side by side under it. */
	.wp-site-blocks .rk-pair,
	.wp-site-blocks .rk-pair:has(> :nth-child(3)) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.wp-site-blocks .rk-pair:has(> :nth-child(3)) > :first-child {
		grid-column: 1 / -1;
	}
	.wp-site-blocks .rk-pair:has(> :nth-child(3)) > :first-child img {
		aspect-ratio: 4 / 3 !important;
	}
	/* Captions on the half-width photos: tighter, so a long one fits in two lines. */
	.rk-pair .wp-block-image:has(figcaption)::after {
		height: 40%;
	}
	.rk-pair figcaption {
		left: 10px;
		right: 10px;
		bottom: 8px;
		font-size: 0.6875rem;
		letter-spacing: 0.08em;
		line-height: 1.3;
	}
	.wp-site-blocks .rk-pair:has(> :nth-child(3)) > :first-child figcaption {
		left: var(--wp--preset--spacing--md);
		right: auto;
		bottom: var(--wp--preset--spacing--sm);
		font-size: var(--wp--preset--font-size--label);
		letter-spacing: 0.14em;
	}
	/* Wide rows: 21:9 is a thin strip on a phone, so crop to 3:2 there. */
	.rk-wide img {
		aspect-ratio: 3 / 2 !important;
	}
	/* Single portrait goes edge to edge on a phone. */
	.wp-site-blocks .rk-portrait {
		padding-block: 0 !important;
	}
	.rk-nav .wp-block-navigation__responsive-container-open {
		color: var(--wp--preset--color--text);
	}
}
/* === piano-key reading progress (assets/js/keys.js) === */
/* Bar colours. Dark mode: piano keys, black keys are the page showing through.
   Light mode: a plain thin bar, read part in text over a hairline track. */
:root {
	--rk-keys-off: var(--wp--preset--color--hairline);
	--rk-keys-on: var(--wp--preset--color--text);
	--rk-keys-cur: var(--wp--preset--color--primary);
	--rk-keys-black: var(--wp--preset--color--background);
}
.rk-keys {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	line-height: 0;
	pointer-events: none;
}
.rk-keys canvas {
	display: block;
	width: 100%;
}
@media print {
	.rk-keys {
		display: none;
	}
}
@media (prefers-reduced-motion: reduce) {
	html.rk-reveal .rk-fade {
		opacity: 1;
		transition: none;
	}
	a img,
	.rk-mode-icon svg,
	.rk-mode-switch .wp-element-button,
	.rk-video__button {
		transition: none;
	}
}
