/*
Theme Name: Recipes Collected
Theme URI: https://recipescollected.com/
Author: Recipes Collected
Description: A fast block theme for a recipe collection. Recipe-box index tabs for categories, enamel-and-cobalt palette, self-hosted type, excerpt-only listings, breadcrumbs and related recipes. No theme JavaScript.
Version: 2.1.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: recipescollected
*/

/* ---------------------------------------------------------------------------
   1. Font fallbacks tuned to the web fonts' metrics, so text does not shift
      when Besley / Libre Franklin finish loading (CLS).
--------------------------------------------------------------------------- */
@font-face {
	font-family: "Franklin Fallback";
	src: local("Arial"), local("Helvetica Neue"), local("Roboto");
	size-adjust: 104%;
	ascent-override: 93%;
	descent-override: 24%;
	line-gap-override: 0%;
}

@font-face {
	font-family: "Besley Fallback";
	src: local("Georgia"), local("Times New Roman");
	size-adjust: 112%;
	ascent-override: 84%;
	descent-override: 22%;
	line-gap-override: 0%;
}

/* ---------------------------------------------------------------------------
   2. Base
--------------------------------------------------------------------------- */
:root {
	color-scheme: light dark;
	--rc-radius: 6px;
	--rc-focus: 3px solid var(--wp--preset--color--butter);
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 1.5rem;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	font-variant-numeric: lining-nums;
}

h1, h2, h3, h4,
.wp-block-post-title,
.wp-block-query-title {
	text-wrap: balance;
}

p, li, .wp-block-post-excerpt__excerpt {
	text-wrap: pretty;
}

.has-large-font-size {
	line-height: 1.45;
}

/* Fractions in recipes read better with proper fraction glyph spacing. */
.wprm-recipe-ingredient-amount {
	font-variant-numeric: lining-nums tabular-nums;
	font-weight: 700;
}

a {
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

a:hover {
	text-decoration-thickness: 0.14em;
}

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: var(--rc-focus);
	outline-offset: 2px;
	border-radius: 2px;
	box-shadow: 0 0 0 5px var(--wp--preset--color--ink);
}

::selection {
	background: var(--wp--preset--color--butter);
	color: #14213d;
}

img {
	height: auto;
}

/* Cross-document view transitions: a soft cross-fade between pages where supported. */
@view-transition {
	navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	@view-transition {
		navigation: none;
	}

	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

/* ---------------------------------------------------------------------------
   3. Header and the recipe-box tabs
--------------------------------------------------------------------------- */
.rc-header {
	padding-block: 1.1rem 0;
}

.rc-header .wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.45rem 0.15rem; /* 24px+ target size (WCAG 2.2 SC 2.5.8) */
}

.rc-header .wp-block-navigation .wp-block-navigation-item__content:hover {
	text-decoration: underline;
	text-decoration-thickness: 0.14em;
}

.rc-tabs-wrap {
	border-bottom: 2px solid var(--wp--preset--color--cobalt);
	margin-top: 1rem;
}

/* All tabs fit from about a 1040px window up. Narrower than that the row scrolls sideways: with a thin, visible
   scrollbar for mouse users, and a fade on the right edge (where supported) while more tabs are out of view. */
.rc-tabs .wp-block-navigation__container {
	flex-wrap: nowrap;
	gap: 0.3rem;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: thin;
	scrollbar-color: var(--wp--preset--color--rule) transparent;
	padding-top: 4px; /* room for the focus ring */
	align-items: flex-end;
}

@media (pointer: coarse) {
	.rc-tabs .wp-block-navigation__container {
		scrollbar-width: none; /* touch screens swipe; the fade shows there is more */
	}
}

@property --rc-tabs-fade {
	syntax: "<length>";
	inherits: false;
	initial-value: 0px;
}

@keyframes rc-tabs-fade {
	from {
		--rc-tabs-fade: 3rem;
	}

	to {
		--rc-tabs-fade: 0px;
	}
}

@supports (animation-timeline: scroll()) {
	.rc-tabs .wp-block-navigation__container {
		-webkit-mask-image: linear-gradient(to left, transparent, #000 var(--rc-tabs-fade));
		mask-image: linear-gradient(to left, transparent, #000 var(--rc-tabs-fade));
		animation: rc-tabs-fade linear both;
		animation-timeline: scroll(self inline);
	}
}

.rc-tabs .wp-block-navigation-item {
	flex: 0 0 auto;
}

.rc-tabs.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	display: block;
	padding: 0.5rem 0.95rem 0.45rem;
	background: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--rule);
	border-bottom: 0;
	border-radius: 9px 9px 0 0;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	color: var(--wp--preset--color--ink);
}

.rc-tabs.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--wash);
}

/* The divider you are "in" stands taller and turns butter yellow. */
.rc-tabs.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.rc-tabs.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content[aria-current="page"] {
	background: var(--wp--preset--color--butter);
	border-color: var(--wp--preset--color--butter);
	color: #14213d;
	padding-top: 0.7rem;
}

@media (max-width: 80rem) {
	.rc-tabs.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
		padding: 0.45rem 0.7rem 0.4rem;
		font-size: 0.875rem;
	}

	.rc-tabs.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
	.rc-tabs.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content[aria-current="page"] {
		padding-top: 0.6rem;
	}
}

/* ---------------------------------------------------------------------------
   4. Recipe grid (listings)
--------------------------------------------------------------------------- */
.rc-card {
	height: 100%;
}

.rc-card .wp-block-post-featured-image {
	margin: 0 0 0.35rem;
	border-radius: var(--rc-radius);
	overflow: hidden;
	background: var(--wp--preset--color--wash);
}

.rc-card .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	transition: transform 0.35s ease;
}

.rc-card:hover .wp-block-post-featured-image img {
	transform: scale(1.025);
}

.rc-card .wp-block-post-title {
	margin: 0;
	line-height: 1.2;
}

.rc-card .wp-block-post-excerpt {
	margin: 0;
}

.rc-card .wp-block-post-excerpt__excerpt {
	margin: 0;
}

/* Cards without a photo yet still get a clear top edge, like a card in the box. */
.rc-card:not(:has(.wp-block-post-featured-image)) {
	border-top: 2px solid var(--wp--preset--color--rule);
	padding-top: 0.9rem;
}

.rc-section-head {
	border-bottom: 1px solid var(--wp--preset--color--rule);
	padding-bottom: 0.6rem;
}

.wp-block-query-pagination {
	border-top: 1px solid var(--wp--preset--color--rule);
	padding-top: 1.25rem;
}

.wp-block-query-pagination .page-numbers {
	display: inline-block;
	min-width: 2rem;
	padding: 0.3rem 0.4rem;
	text-align: center;
	border-radius: 4px;
}

.wp-block-query-pagination .page-numbers.current {
	background: var(--wp--preset--color--butter);
	color: #14213d;
}

/* ---------------------------------------------------------------------------
   5. Single recipe
--------------------------------------------------------------------------- */
.rc-breadcrumbs,
.yoast-breadcrumbs {
	font-size: 0.9375rem;
	color: var(--wp--preset--color--ink-soft);
}

/* On listing pages the breadcrumb lines up with the wide heading, not the narrow text column. */
body:not(.single) main > .yoast-breadcrumbs {
	max-width: var(--wp--style--global--wide-size);
}

.yoast-breadcrumbs a {
	text-decoration: none;
	font-weight: 700;
}

.yoast-breadcrumbs a:hover {
	text-decoration: underline;
}

/* "By Recipes Collected · Updated September 23, 2026" under the recipe title (matches dateModified in the schema). */
.rc-byline {
	font-size: 0.9375rem;
	color: var(--wp--preset--color--ink-soft);
}

.rc-byline > * {
	margin: 0;
}

.rc-byline .wp-block-post-author-name::before {
	content: "By ";
}

.rc-byline .wp-block-post-date::before {
	content: "· Updated ";
}

.rc-byline .wp-block-post-date.rc-published::before {
	content: "· Published ";
}

.rc-single-image img {
	border-radius: var(--rc-radius);
	width: 100%;
}

.rc-jump a {
	display: inline-block;
	background: var(--wp--preset--color--butter);
	color: #14213d;
	font-weight: 700;
	font-size: 0.9375rem;
	text-decoration: none;
	padding: 0.6rem 1rem;
	border-radius: 4px;
}

.rc-jump a:hover {
	background: var(--wp--preset--color--ink);
	color: #fff;
}

/* The recipe card: an index card. White stock, one red line under the title, blue rules. */
.wprm-recipe-container {
	margin-block: 2.25rem;
}

.wprm-recipe.wprm-recipe-template-meadow {
	--meadow-accent-color: var(--wp--preset--color--cobalt) !important;
	--meadow-list-border-color: var(--wp--preset--color--rule) !important;
	--meadow-main-background-color: var(--wp--preset--color--wash) !important;
}

.wprm-recipe.wprm-recipe :where(p, li, span, div, a, button, label) {
	font-family: var(--wp--preset--font-family--body);
}

/* Inner panels and section buttons follow the theme tokens (so they also work in dark mode). */
.wprm-recipe.wprm-recipe .wprm-internal-container {
	background-color: var(--wp--preset--color--card) !important;
	border: 1px solid var(--wp--preset--color--rule) !important;
	border-radius: var(--rc-radius) !important;
	color: var(--wp--preset--color--ink) !important;
}

.wprm-recipe .wprm-recipe-jump-to-section-container {
	--wprm-jump-to-section-background: var(--wp--preset--color--card) !important;
}

.wprm-recipe .wprm-recipe-jump-to-section-container a.wprm-recipe-jump-to-section {
	background-color: var(--wp--preset--color--card) !important;
	border: 1px solid var(--wp--preset--color--rule);
	border-radius: var(--rc-radius) !important;
}

.wprm-recipe .wprm-recipe-ingredient-notes-faded,
.wprm-recipe .wprm-recipe-ingredient-notes {
	color: var(--wp--preset--color--ink-soft);
	opacity: 1 !important;
}

.wprm-recipe .wprm-recipe-meta-container-pill,
.wprm-recipe .wprm-recipe-details-container-pills > * {
	--pill-text-color: #fff;
}

.wprm-recipe.wprm-recipe {
	background: var(--wp--preset--color--card) !important;
	color: var(--wp--preset--color--ink) !important;
	border: 1px solid var(--wp--preset--color--rule) !important;
	border-radius: var(--rc-radius) !important;
	font-family: var(--wp--preset--font-family--body) !important;
	font-size: 1.0625rem;
	line-height: 1.55;
	box-shadow: 0 1px 0 var(--wp--preset--color--rule), 0 12px 28px -18px rgb(20 33 61 / 0.35);
	overflow: hidden;
}

.wprm-recipe .wprm-recipe-name {
	font-family: var(--wp--preset--font-family--display) !important;
	font-weight: 650 !important;
	font-size: var(--wp--preset--font-size--x-large) !important;
	line-height: 1.15;
	letter-spacing: -0.012em;
	color: var(--wp--preset--color--ink) !important;
	padding-bottom: 0.7rem;
	border-bottom: 2px solid var(--wp--preset--color--redline);
	margin-bottom: 0.9rem !important;
}

.wprm-recipe .wprm-recipe-header {
	font-family: var(--wp--preset--font-family--display) !important;
	font-weight: 600 !important;
	color: var(--wp--preset--color--ink) !important;
	letter-spacing: -0.01em;
}

.wprm-recipe h4.wprm-recipe-group-name {
	font-family: var(--wp--preset--font-family--body) !important;
	font-weight: 700 !important;
	color: var(--wp--preset--color--cobalt) !important;
}

.wprm-recipe ul.wprm-recipe-ingredients {
	padding-left: 0 !important;
	margin-left: 0 !important;
}

.wprm-recipe li.wprm-recipe-ingredient {
	list-style: none !important;
	margin: 0 !important;
	padding: 0.5rem 0.15rem !important;
}

.wprm-recipe ol.wprm-recipe-instructions,
.wprm-recipe ul.wprm-recipe-instructions {
	padding-left: 1.4rem;
}

.wprm-recipe li.wprm-recipe-instruction {
	margin-bottom: 0.85rem !important;
	padding-left: 0.25rem;
}

.wprm-recipe li.wprm-recipe-instruction::marker {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	color: var(--wp--preset--color--cobalt);
}

.wprm-recipe a {
	color: var(--wp--preset--color--cobalt) !important;
}

.wprm-recipe .wprm-recipe-print,
.wprm-recipe .wprm-recipe-link.wprm-recipe-link-button,
.wprm-recipe .wprm-recipe-link.wprm-recipe-link-wide-button,
.wprm-recipe .wprm-recipe-link.wprm-recipe-link-inline-button {
	background: var(--wp--preset--color--cobalt) !important;
	border-color: var(--wp--preset--color--cobalt) !important;
	color: #fff !important;
	border-radius: 4px !important;
	font-weight: 700;
	text-decoration: none;
}

.wprm-recipe .wprm-recipe-print:hover {
	background: var(--wp--preset--color--ink) !important;
	border-color: var(--wp--preset--color--ink) !important;
}

/* Post footer: tags, previous/next, related */
.rc-tags a {
	display: inline-block;
	padding: 0.25rem 0.7rem;
	margin: 0 0.25rem 0.4rem 0;
	border: 1px solid var(--wp--preset--color--rule);
	border-radius: 999px;
	font-size: 0.9375rem;
	text-decoration: none;
	background: var(--wp--preset--color--card);
}

.rc-tags a:hover {
	background: var(--wp--preset--color--wash);
}

.rc-tags .wp-block-post-terms__separator {
	display: none;
}

.rc-postnav {
	border-block: 1px solid var(--wp--preset--color--rule);
	padding-block: 1.1rem;
}

.rc-postnav a {
	text-decoration: none;
	font-weight: 700;
}

.rc-postnav .post-navigation-link__label {
	display: block;
	font-weight: 400;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--ink-soft);
}

.rc-related {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
	gap: 1.5rem 1.75rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.rc-related a {
	text-decoration: none;
	color: var(--wp--preset--color--ink);
	display: block;
}

.rc-related a:hover .rc-related__title {
	color: var(--wp--preset--color--cobalt);
	text-decoration: underline;
}

.rc-related img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: var(--rc-radius);
	margin-bottom: 0.6rem;
	background: var(--wp--preset--color--wash);
}

.rc-related__title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-size: 1.1875rem;
	line-height: 1.25;
	display: block;
}

.rc-related-placeholder {
	padding: 1rem;
	border: 1px dashed var(--wp--preset--color--rule);
	border-radius: var(--rc-radius);
	color: var(--wp--preset--color--ink-soft);
}

.rc-related li:not(:has(img)) {
	border-top: 2px solid var(--wp--preset--color--rule);
	padding-top: 0.8rem;
}

/* ---------------------------------------------------------------------------
   6. Forms, recipe index, footer
--------------------------------------------------------------------------- */
.wp-block-search__input {
	border: 1px solid var(--wp--preset--color--ink-soft);
	border-radius: 4px;
	padding: 0.7rem 0.9rem;
	background: var(--wp--preset--color--card);
	color: var(--wp--preset--color--ink);
	font: inherit;
	min-height: 2.9rem;
}

.wp-block-search__button {
	min-height: 2.9rem;
	margin-left: 0.5rem;
}

/* Recipe index page: category lists flow into columns on wide screens. */
.page-recipeindex .entry-content ul,
.rc-index ul {
	columns: 18rem 2;
	column-gap: 2.5rem;
	padding-left: 1.1rem;
}

.page-recipeindex .entry-content li {
	break-inside: avoid;
	margin-bottom: 0.35rem;
}

.rc-footer {
	border-top: 2px solid var(--wp--preset--color--cobalt);
	background: var(--wp--preset--color--wash);
}

.rc-footer .wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.3rem 0;
	font-weight: 400;
}

.rc-footer .wp-block-navigation .wp-block-navigation-item__content:hover {
	text-decoration: underline;
}

.rc-footer h2 {
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0;
	margin: 0 0 0.4rem;
}

/* ---------------------------------------------------------------------------
   7. Dark mode: same identity, night-kitchen values.
--------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
	:root {
		--wp--preset--color--enamel: #0f1626;
		--wp--preset--color--card: #172036;
		--wp--preset--color--ink: #eef2f8;
		--wp--preset--color--ink-soft: #b3bfd3;
		--wp--preset--color--cobalt: #9db9ff;
		--wp--preset--color--rule: #2f3d5c;
		--wp--preset--color--wash: #141c30;
		--wp--preset--color--redline: #ff7a8c;
	}

	.wp-element-button,
	.wp-block-button__link,
	.wprm-recipe .wprm-recipe-print {
		color: #0f1626 !important;
	}

	.wp-element-button:hover,
	.wp-block-button__link:hover {
		color: #0f1626 !important;
		background: #fff !important;
	}

	.wprm-recipe .wprm-recipe-details-container-pills > *,
	.wprm-recipe .wprm-recipe-meta-container-pill,
	.wprm-recipe .wprm-recipe-link.wprm-recipe-link-button,
	.wprm-recipe .wprm-recipe-link.wprm-recipe-link-inline-button {
		--pill-text-color: #0f1626;
		color: #0f1626 !important;
	}

	.wprm-recipe svg path[fill="#000000"],
	.wprm-recipe svg path[fill="#333333"] {
		fill: currentColor;
	}

	.rc-jump a:hover {
		background: #fff;
		color: #0f1626;
	}

	:where(a, button, input, select, textarea, summary):focus-visible {
		box-shadow: 0 0 0 5px #0f1626;
	}

	img {
		filter: brightness(0.94);
	}
}

/* ---------------------------------------------------------------------------
   8. Print: the recipe, not the site.
--------------------------------------------------------------------------- */
@media print {
	.rc-header, .rc-footer, .rc-postnav, .rc-related-wrap, .rc-tags, .rc-jump, .yoast-breadcrumbs {
		display: none !important;
	}

	body {
		background: #fff;
		color: #000;
		font-size: 11pt;
	}

	.wprm-recipe.wprm-recipe {
		box-shadow: none;
		border-color: #999 !important;
	}
}
