/*
Theme Name: Belavel
Description: Block theme for an analytical comparison desk: a question up front, a short answer, dated sources and criteria tables.
Text Domain: belavel
Requires at least: 7.0
Requires PHP: 8.1
Version: 0.1.16
Update URI: false
*/

:focus-visible {
	outline: var(--wp--custom--stroke--bold) solid var(--wp--preset--color--seal);
	outline-offset: 3px;
}

/* The ring is seal; on a seal band (the Compare strip) it would be 1:1, so it turns charter (13.25:1). */
:where(.has-seal-background-color) :focus-visible {
	outline-color: var(--wp--preset--color--charter);
}

::selection {
	background: var(--wp--preset--color--schedule);
	color: var(--wp--preset--color--docket);
}

:where(h1, h2, h3, .wp-block-post-title) {
	text-wrap: balance;
}

a {
	text-decoration-thickness: var(--wp--custom--stroke--fine);
	text-underline-offset: 0.18em;
}

:where(.wp-block-post-date, table) {
	font-variant-numeric: tabular-nums;
}

/* A table never widens the page: it scrolls inside its own figure. */
.wp-block-table {
	overflow-x: auto;
}

/* Jargon is explained at first use; the abbreviation keeps a dotted hint. */
abbr[title] {
	text-decoration: underline dotted;
	text-decoration-thickness: from-font;
	cursor: help;
}

:target {
	scroll-margin-top: var(--wp--preset--spacing--chapter);
}

.wp-block-footnotes li:target {
	background: var(--wp--preset--color--schedule);
}

p {
	text-wrap: pretty;
}

/* The mark of the site title (core.site-title.css sizes it): the url is here because block sheets are inlined and lose relative paths. Relative to this file. */
.wp-block-site-title a::before {
	background-image: url("assets/brand/sill.svg");
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
	}
}

/* Featured image: core/post-featured-image prints nothing without an image, so no placeholder exists (design-system, Зображення). 16:9 in the piece, 3:2 in cards: the ratio is the block's aspectRatio, the crop is cover. */
.wp-block-post-featured-image {
	margin-block: 0 var(--wp--preset--spacing--entry);
}

.wp-block-post-featured-image img {
	width: 100%;
	max-width: 100%;
	object-fit: cover;
}

/* A piece is often printed or saved for a file: no tools, sources spelled out. */
@media print {
	.wp-block-search,
	.wp-block-navigation,
	.wp-block-buttons,
	.wp-block-query-pagination {
		display: none;
	}

	.wp-block-post-content a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: var(--wp--preset--font-size--fine);
		overflow-wrap: anywhere;
	}

	.wp-block-table {
		overflow: visible;
	}
}

/* Short pages: the footer sits at the bottom of the viewport. */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.wp-site-blocks > main {
	flex: 1 0 auto;
}

/* Phone: running text and the small service text are at least 16px (the desktop aside stays 15px). */
@media (max-width: 599px) {
	html:root {
		--wp--preset--font-size--aside: 1rem;
	}
}

/* The credit under an AI illustration reads as a note, not as a caption of the author. */
.belavel-ai-credit {
	color: var(--wp--preset--color--annex);
	font-family: var(--wp--preset--font-family--signage);
	font-size: var(--wp--preset--font-size--fine);
}
