/* core.css — generated by bin/build-css.php from src/css/. Don't edit; edit the sources and rebuild. */

/* ── src/css/settings/_palette.css ── */

/* ==========================================================================
   SETTINGS — palette
   Generated by bin/build-css.php from src/Accent.php. Don't edit: change the
   lists in Accent.php and rebuild.

   --core-accent-<name>-base  your colour as it is (swatches, decoration)
   --core-accent-<name>       its readable shade, at least 4.5:1 for text
                                 on the page and on link buttons:
                                 light-dark(<light mode>, <dark mode>)
   --core-scheme-<name>       dark backgrounds
   ========================================================================== */

:root {
	/* Accents as they are */
	--core-accent-rose-base:    #fb7185;
	--core-accent-orange-base:  #fb923c;
	--core-accent-amber-base:   #fbbf24;
	--core-accent-lime-base:    #a3e635;
	--core-accent-green-base:   #4ade80;
	--core-accent-teal-base:    #2dd4bf;
	--core-accent-cyan-base:    #22d3ee;
	--core-accent-blue-base:    #60a5fa;
	--core-accent-indigo-base:  #818cf8;
	--core-accent-purple-base:  #c084fc;
	--core-accent-fuchsia-base: #e879f9;
	--core-accent-pink-base:    #f472b6;

	/* Readable accents; the light ones also for browsers without light-dark() */
	--core-accent-rose:    #c43f58;
	--core-accent-orange:  #ac5900;
	--core-accent-amber:   #8d6900;
	--core-accent-lime:    #527a00;
	--core-accent-green:   #00803f;
	--core-accent-teal:    #007d70;
	--core-accent-cyan:    #007a8b;
	--core-accent-blue:    #2b70c1;
	--core-accent-indigo:  #5e65cd;
	--core-accent-purple:  #8e52c6;
	--core-accent-fuchsia: #ac3ebd;
	--core-accent-pink:    #bc3f85;

	/* Dark backgrounds */
	--core-scheme-slate:   #0f172a;
	--core-scheme-soho:    #34343d;
	--core-scheme-ocean:   #183240;
}

@supports (color: light-dark(#000, #fff)) {
	:root {
		--core-accent-rose:    light-dark(#c43f58, #fe8191);
		--core-accent-orange:  light-dark(#ac5900, #fb923c);
		--core-accent-amber:   light-dark(#8d6900, #fbbf24);
		--core-accent-lime:    light-dark(#527a00, #a3e635);
		--core-accent-green:   light-dark(#00803f, #4ade80);
		--core-accent-teal:    light-dark(#007d70, #2dd4bf);
		--core-accent-cyan:    light-dark(#007a8b, #22d3ee);
		--core-accent-blue:    light-dark(#2b70c1, #68aafb);
		--core-accent-indigo:  light-dark(#5e65cd, #98a4fb);
		--core-accent-purple:  light-dark(#8e52c6, #c691fd);
		--core-accent-fuchsia: light-dark(#ac3ebd, #ea81fa);
		--core-accent-pink:    light-dark(#bc3f85, #f781bd);
	}
}

/* ── src/css/settings/_tokens.css ── */

/* ==========================================================================
   SETTINGS — design tokens
   Every token is prefixed --core- so a plugin or site can override it, e.g.
   :root { --core-radius-l: 4px; }  or, in a plugin's own CSS,
   :root { --core-radius-l: var(--micro-radius-l); }

   Text, surface and line colours follow the site's shared names (--fg,
   --muted, --line, --bg), which blogkit sets for light and dark mode; the
   fallbacks apply without them.

   The accent is core's own: Indigo by default, the page's accent where
   the core/accent snippet is printed, an element's own where it has
   data-core-accent="<name>". The colours are in _palette.css.
   ========================================================================== */

:root {
	/* Colour */
	--core-color-text: var(--fg, #1a1a1a);
	--core-color-muted: var(--muted, #666);
	--core-color-surface: var(--bg, #fff);
	--core-color-accent: var(--core-accent-indigo);      /* readable: links, hover, focus ring */
	--core-color-accent-base: var(--core-accent-indigo-base); /* as chosen: decoration */
	--core-color-placeholder: color-mix(in srgb, var(--core-color-text) 8%, var(--core-color-surface));

	/* Video placeholder (the play button sits on a picture: always dark) */
	--core-video-bg: #000;
	--core-video-play: rgb(0 0 0 / 0.72);
	--core-video-play-hover: #000;
	--core-video-on-play: #fff;
	--core-video-play-size: 4rem;

	/* Image overlay (always dark, in light mode too) */
	--core-lightbox-bg: rgb(0 0 0 / 0.95);
	--core-lightbox-text: #fff;
	--core-lightbox-muted: rgb(255 255 255 / 0.72);
	--core-lightbox-control: rgb(255 255 255 / 0.14);
	--core-lightbox-control-hover: rgb(255 255 255 / 0.26);

	/* Space */
	--core-space-xs: 0.25rem;
	--core-space-s: 0.5rem;
	--core-space-m: 1rem;

	/* Shape */
	--core-radius-l: 12px;                               /* video frame */

	/* Type */
	--core-font-size-meta: 0.875rem;

	/* Measures */
	--core-control-size: 2.75rem;                        /* overlay buttons (44px touch targets) */
	--core-measure: 40rem;                               /* overlay caption */
}

/* ── src/css/components/_core-picture.css ── */

/* ==========================================================================
   COMPONENT — c-core-picture
   The <picture> around an image that is offered in AVIF, JPEG XL or WebP
   (core/image, Front::picture). It only holds the <source> elements and the
   <img>; display: contents takes it out of the layout, so the <img> and its
   own classes (c-…__image) behave as if it had no wrapper.

   The <source> elements are never shown. Browsers hide them by default, but
   inside a display: contents parent Chromium computes them as blocks, and in a
   flex or grid container (a card with a gap) every empty one would count as an
   item and add a gap.
   ========================================================================== */

.c-core-picture {
	display: contents;
}

.c-core-picture > source {
	display: none;
}

/* ── src/css/components/_core-figure.css ── */

/* ==========================================================================
   COMPONENT — c-core-figure
   The image block of the editor (Kirby's blocks field, rendered by core):
   an image, optionally a link around it, optionally a caption. Block margins
   are left to the host's text styles; core only takes away the browser's
   side indent.
   ========================================================================== */

.c-core-figure {
	margin-inline: 0;
}

.c-core-figure__link {
	display: block;
}

.c-core-figure__link[data-core-lightbox] {
	cursor: zoom-in;
}

.c-core-figure__link:focus-visible {
	outline: 3px solid var(--core-color-accent);
	outline-offset: 2px;
}

.c-core-figure__image {
	display: block;
	max-width: 100%;
	height: auto;
}

.c-core-figure__caption {
	margin-top: var(--core-space-s);
	color: var(--core-color-muted);
	font-size: var(--core-font-size-meta);
}

/* ── src/css/components/_core-gallery.css ── */

/* ==========================================================================
   COMPONENT — c-core-gallery
   The gallery block of the editor (Kirby's blocks field, rendered by core): a
   grid of thumbnails, each a link that opens the image overlay, and an
   optional caption. Block margins are left to the host's text styles.
   ========================================================================== */

.c-core-gallery {
	margin-inline: 0;
}

.c-core-gallery__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
	gap: var(--core-space-s);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* phones: two tiles per row (a single tile would be as wide as the screen); matches the 45vw in the sizes option */
@media (max-width: 30rem) {
	.c-core-gallery__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.c-core-gallery__item {
	margin: 0;
	padding: 0;
}

.c-core-gallery__link {
	display: block;
	cursor: zoom-in;
}

.c-core-gallery__link:focus-visible {
	outline: 3px solid var(--core-color-accent);
	outline-offset: 2px;
}

.c-core-gallery__image {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
}

.c-core-gallery__caption {
	margin-top: var(--core-space-s);
	color: var(--core-color-muted);
	font-size: var(--core-font-size-meta);
}

/* ── src/css/components/_core-video.css ── */

/* ==========================================================================
   COMPONENT — c-core-video
   The video: first the stored poster with a play button (a link to the
   platform), after a click the platform's player (assets/js/core-video.js).
   Both fill a 16:9 frame.
   ========================================================================== */

.c-core-video {
	margin: var(--core-space-m) 0 0;
}

.c-core-video__link,
.c-core-video__frame {
	display: block;
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border: 0;
	border-radius: var(--core-radius-l);
	background: var(--core-video-bg);
}

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

.c-core-video__button {
	display: grid;
	position: absolute;
	top: 50%;
	left: 50%;
	place-items: center;
	width: var(--core-video-play-size);
	height: var(--core-video-play-size);
	border-radius: 50%;
	background: var(--core-video-play);
	color: var(--core-video-on-play);
	transform: translate(-50%, -50%);
}

.c-core-video__link:hover .c-core-video__button {
	background: var(--core-video-play-hover);
}

.c-core-video__link:focus-visible {
	outline: 3px solid var(--core-color-accent);
	outline-offset: 2px;
}

.c-core-video__note {
	margin-top: var(--core-space-s);
	color: var(--core-color-muted);
	font-size: var(--core-font-size-meta);
}

/* The editor's caption (video block), above the note */
.c-core-video__caption {
	margin-top: var(--core-space-s);
	color: var(--core-color-muted);
	font-size: var(--core-font-size-meta);
}

.c-core-video__caption + .c-core-video__note {
	margin-top: var(--core-space-xs);
}

/* State: the player is running, the note is no longer needed */
.c-core-video--playing .c-core-video__note {
	display: none;
}

@media (prefers-reduced-motion: no-preference) {
	.c-core-video__button {
		transition: transform 150ms ease-out, background-color 150ms ease-out;
	}

	.c-core-video__link:hover .c-core-video__button {
		transform: translate(-50%, -50%) scale(1.08);
	}
}

/* ── src/css/components/_core-playlist.css ── */

/* ==========================================================================
   COMPONENT — c-core-playlist
   The editor's video-playlist block: core's two-click player with a list of
   the playlist's videos. Wide screens: the list sits beside the player and is
   as tall as the player with its text (it scrolls); narrow screens: the list
   follows below the player. The playing row is marked (aria-current / is-current).
   ========================================================================== */

.c-core-playlist {
	display: grid;
	gap: var(--core-space-m);
	margin-inline: 0;
}

@media (min-width: 48rem) {
	.c-core-playlist {
		grid-template-columns: minmax(0, 2fr) minmax(14rem, 1fr);
	}
}

.c-core-playlist__stage {
	min-width: 0;
}

.c-core-playlist__video {
	margin-top: 0;
}

.c-core-playlist__now {
	margin-top: var(--core-space-s);
}

.c-core-playlist__now > p {
	margin: 0;
}

.c-core-playlist__now-title {
	font-weight: 600;
}

.c-core-playlist__now-meta,
.c-core-playlist__now-description {
	color: var(--core-color-muted);
	font-size: var(--core-font-size-meta);
}

.c-core-playlist__now-description {
	max-height: 10rem;          /* a long description scrolls instead of stretching the block */
	margin-top: var(--core-space-xs);
	overflow-y: auto;
	white-space: pre-line;
	overflow-wrap: anywhere;
}

.c-core-playlist__now-description:focus-visible {
	outline: 3px solid var(--core-color-accent);
	outline-offset: 2px;
}

.c-core-playlist__now-meta:empty,
.c-core-playlist__now-description:empty {
	display: none;
}

/* the list: below the player on narrow screens, beside it (and as tall as the
   player with its text) on wide ones */
.c-core-playlist__aside {
	position: relative;
	min-width: 0;
}

.c-core-playlist__list {
	max-height: 24rem;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
	overscroll-behavior: contain;
}

@media (min-width: 48rem) {
	.c-core-playlist__aside {
		min-height: 14rem;
	}

	.c-core-playlist__list {
		position: absolute;
		inset: 0;
		max-height: none;
	}
}

.c-core-playlist__item {
	margin: 0;
	padding: 0;
}

.c-core-playlist__link {
	display: grid;
	grid-template-columns: 7rem minmax(0, 1fr);
	gap: var(--core-space-s);
	align-items: start;
	padding: var(--core-space-xs);
	border-radius: var(--core-radius-l);
	color: inherit;
	text-decoration: none;
	cursor: pointer;
}

.c-core-playlist__link:hover {
	background: var(--core-color-placeholder);
}

/* a host's "a:hover { underline }" must not underline a whole row (one more class than the host's rule) */
.c-core-playlist .c-core-playlist__link:hover,
.c-core-playlist .c-core-playlist__link:focus-visible {
	text-decoration: none;
}

.c-core-playlist__link:focus-visible {
	outline: 3px solid var(--core-color-accent);
	outline-offset: -3px;
}

.c-core-playlist__link[aria-current="true"] {
	background: color-mix(in srgb, var(--core-color-accent-base) 18%, var(--core-color-surface));
	box-shadow: inset 3px 0 0 var(--core-color-accent);
}

.c-core-playlist__thumb {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border-radius: calc(var(--core-radius-l) / 2);
	background: var(--core-video-bg);
	object-fit: cover;
}

.c-core-playlist__thumb--empty {
	min-height: 0;
}

.c-core-playlist__text {
	display: grid;
	gap: 0.125rem;
	min-width: 0;
}

.c-core-playlist__title {
	display: -webkit-box;
	overflow: hidden;
	font-size: var(--core-font-size-meta);
	font-weight: 600;
	line-height: 1.3;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow-wrap: anywhere;
}

.c-core-playlist__meta {
	color: var(--core-color-muted);
	font-size: 0.75rem;
}

/* ── src/css/components/_core-lightbox.css ── */

/* ==========================================================================
   COMPONENT — c-core-lightbox
   Image overlay (native <dialog>) built by assets/js/core-lightbox.js.
   Desktop:  counter ……… close      Phone:  counter … close
             ‹   image + text   ›            image + text
                                             ‹             ›
   ========================================================================== */

.c-core-lightbox {
	box-sizing: border-box;
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: var(--core-space-m);
	border: 0;
	background: var(--core-lightbox-bg);
	color: var(--core-lightbox-text);
	overflow: hidden;
	overscroll-behavior: contain;
	/* swipes and drags must not select text: dragging a selection would
	   cancel the next swipe */
	-webkit-user-select: none;
	user-select: none;
}

.c-core-lightbox[open] {
	display: grid;
	grid-template-columns: var(--core-control-size) minmax(0, 1fr) var(--core-control-size);
	grid-template-rows: auto minmax(0, 1fr);
	grid-template-areas:
		"counter counter close"
		"previous figure next";
	gap: var(--core-space-s) var(--core-space-m);
	align-items: center;
}

.c-core-lightbox::backdrop {
	background: var(--core-lightbox-bg);
}

.c-core-lightbox__counter {
	grid-area: counter;
	margin: 0;
	color: var(--core-lightbox-muted);
	font-size: var(--core-font-size-meta);
	font-variant-numeric: tabular-nums;
}

/* Image and text stay together, centred; an image taller than the room
   shrinks (object-fit keeps its proportions). */
.c-core-lightbox__figure {
	grid-area: figure;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: var(--core-space-s);
	height: 100%;
	min-height: 0;
	margin: 0;
	touch-action: pan-y pinch-zoom; /* horizontal swipes go to the script */
}

.c-core-lightbox__image {
	display: block;
	flex: 0 1 auto;
	width: 100%;
	height: auto;
	min-height: 0;
	object-fit: contain;
}

/* State: the next image is still loading */
.c-core-lightbox__image.is-loading {
	opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
	.c-core-lightbox__image {
		transition: opacity 150ms ease-out;
	}
}

.c-core-lightbox__caption {
	flex: none;
	max-width: var(--core-measure);
	margin-inline: auto;
	text-align: center;
}

.c-core-lightbox__meta {
	margin: 0;
	color: var(--core-lightbox-muted);
	font-size: var(--core-font-size-meta);
}

.c-core-lightbox__text {
	margin: 0;
}

/* a caption under a meta line keeps a little distance */
.c-core-lightbox__meta:not([hidden]) + .c-core-lightbox__text {
	margin-top: var(--core-space-xs);
}

.c-core-lightbox__caption[hidden],
.c-core-lightbox__meta[hidden],
.c-core-lightbox__text[hidden],
.c-core-lightbox__counter[hidden],
.c-core-lightbox__button[hidden] {
	display: none;
}

.c-core-lightbox__button {
	display: grid;
	place-items: center;
	width: var(--core-control-size);
	height: var(--core-control-size);
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--core-lightbox-control);
	color: inherit;
	cursor: pointer;
}

.c-core-lightbox__button:hover {
	background: var(--core-lightbox-control-hover);
}

.c-core-lightbox__button:focus-visible {
	outline: 3px solid var(--core-lightbox-text);
	outline-offset: 2px;
}

.c-core-lightbox__button:disabled {
	opacity: 0.3;
	cursor: default;
}

.c-core-lightbox__button--close {
	grid-area: close;
	justify-self: end;
}

.c-core-lightbox__button--previous {
	grid-area: previous;
}

.c-core-lightbox__button--next {
	grid-area: next;
}

/* Phone: buttons below the image, where thumbs reach them */
@media (max-width: 40em) {
	.c-core-lightbox[open] {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto minmax(0, 1fr) auto;
		grid-template-areas:
			"counter close"
			"figure figure"
			"previous next";
		padding: var(--core-space-s);
	}

	.c-core-lightbox__button--next {
		justify-self: end;
	}
}

/* ── src/css/utilities/_core-accent.css ── */

/* ==========================================================================
   UTILITIES — accent
   Generated by bin/build-css.php from src/Accent.php. Don't edit.

   An element with data-core-accent="<name>" and everything in it uses that
   colour. Accent::attributes($page) prints the attribute. Components that
   keep the accent in their own token declare it on the element as well:
   :root, [data-core-accent] { --plugin-color-accent: var(--core-color-accent); }
   ========================================================================== */

[data-core-accent="rose"] {
	--core-color-accent: var(--core-accent-rose);
	--core-color-accent-base: var(--core-accent-rose-base);
}

[data-core-accent="orange"] {
	--core-color-accent: var(--core-accent-orange);
	--core-color-accent-base: var(--core-accent-orange-base);
}

[data-core-accent="amber"] {
	--core-color-accent: var(--core-accent-amber);
	--core-color-accent-base: var(--core-accent-amber-base);
}

[data-core-accent="lime"] {
	--core-color-accent: var(--core-accent-lime);
	--core-color-accent-base: var(--core-accent-lime-base);
}

[data-core-accent="green"] {
	--core-color-accent: var(--core-accent-green);
	--core-color-accent-base: var(--core-accent-green-base);
}

[data-core-accent="teal"] {
	--core-color-accent: var(--core-accent-teal);
	--core-color-accent-base: var(--core-accent-teal-base);
}

[data-core-accent="cyan"] {
	--core-color-accent: var(--core-accent-cyan);
	--core-color-accent-base: var(--core-accent-cyan-base);
}

[data-core-accent="blue"] {
	--core-color-accent: var(--core-accent-blue);
	--core-color-accent-base: var(--core-accent-blue-base);
}

[data-core-accent="indigo"] {
	--core-color-accent: var(--core-accent-indigo);
	--core-color-accent-base: var(--core-accent-indigo-base);
}

[data-core-accent="purple"] {
	--core-color-accent: var(--core-accent-purple);
	--core-color-accent-base: var(--core-accent-purple-base);
}

[data-core-accent="fuchsia"] {
	--core-color-accent: var(--core-accent-fuchsia);
	--core-color-accent-base: var(--core-accent-fuchsia-base);
}

[data-core-accent="pink"] {
	--core-color-accent: var(--core-accent-pink);
	--core-color-accent-base: var(--core-accent-pink-base);
}
