/*
Theme Name: CG Recipes
Theme URI: https://github.com/cyril/recipes_wp
Author: Cyril Gramblička
Description: Front end for the CG Recipes site. WordPress renders the pages; React mounts into the parts that need to be interactive.
Version: 0.1.0
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cg-recipes-theme
*/

:root {
	--cg-bg: #fbfaf7;
	--cg-surface: #fff;
	--cg-ink: #1e2417;
	--cg-muted: #6b7280;
	--cg-faint: #9aa0a6;
	--cg-accent: #4d7c0f;
	--cg-accent-dark: #3f6212;
	--cg-accent-soft: #f0f6e4;
	--cg-accent-line: #d7e5bd;
	--cg-tint: #f7f6f3;
	--cg-warn: #9a3412;
	--cg-warn-soft: #fdf0e7;
	--cg-border: #e7e4dc;
	--cg-radius: 10px;
	--cg-shadow: 0 1px 2px rgba(30, 36, 23, .05), 0 4px 12px rgba(30, 36, 23, .04);
	--cg-wrap: 1120px;
}

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

/*
 * The hidden attribute beats anything this stylesheet says about display.
 *
 * The browser's own [hidden] { display: none } comes from the user-agent
 * sheet, which loses to any author rule at all -- so .cg-card's display:flex
 * quietly won, and the ingredient filter set el.hidden on every card that did
 * not match and every one of them stayed on screen. The count said "14 z 147"
 * above a grid still showing 147.
 *
 * Global rather than per-component, because the next thing given a display
 * would have the same bug and nobody would connect it to this.
 */
[hidden] { display: none !important; }

body {
	margin: 0;
	background: var(--cg-bg);
	color: var(--cg-ink);
	font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
a { color: var(--cg-accent-dark); }
a:hover { color: var(--cg-ink); }

.cg-wrap { width: min(100% - 2.5rem, var(--cg-wrap)); margin-inline: auto; }

/* -- Header / footer ----------------------------------------------------- */
.cg-header {
	background: var(--cg-surface);
	border-bottom: 1px solid var(--cg-border);
	position: sticky; top: 0; z-index: 20;
}
.cg-header__inner { display: flex; align-items: center; gap: 1.5rem; padding: .9rem 0; }
.cg-logo { font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--cg-ink); }
.cg-logo span { color: var(--cg-accent); }
.cg-nav { margin-left: auto; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.cg-nav a { text-decoration: none; font-size: .93rem; font-weight: 550; color: var(--cg-muted); }
.cg-nav a:hover, .cg-nav a[aria-current] { color: var(--cg-accent-dark); }

.cg-footer {
	margin-top: 4rem; padding: 2rem 0; border-top: 1px solid var(--cg-border);
	color: var(--cg-faint); font-size: .87rem;
}

main { padding: 2.5rem 0 1rem; }

/* -- Page head ----------------------------------------------------------- */
.cg-pagehead { margin-bottom: 1.75rem; }
.cg-pagehead p { color: var(--cg-muted); max-width: 62ch; margin: .3rem 0 0; }
.cg-crumbs { font-size: .85rem; color: var(--cg-faint); margin-bottom: .5rem; }
.cg-crumbs a { color: var(--cg-muted); text-decoration: none; }
.cg-crumbs a:hover { text-decoration: underline; }

/* -- Badges -------------------------------------------------------------- */
.cg-badges { display: flex; flex-wrap: wrap; gap: .35rem; }

/*
 * Under the title, the badges need a line of their own. Nothing separates
 * them from the sentence below otherwise -- a row of pills five pixels above
 * a paragraph reads as the paragraph's first line.
 */
.cg-pagehead .cg-badges { margin: .2rem 0 .6rem; }
.cg-badge {
	display: inline-block; padding: .16rem .55rem; border-radius: 999px;
	font-size: .74rem; font-weight: 650; letter-spacing: .01em; white-space: nowrap;
	background: #eef0ec; color: #4b5563;
}
.cg-badge--vegan { background: var(--cg-accent-soft); color: var(--cg-accent-dark); }
.cg-badge--veg   { background: #eef4e6; color: #55702a; }
.cg-badge--allergen { background: var(--cg-warn-soft); color: var(--cg-warn); }
.cg-badge--aisle { background: #eef2f7; color: #445; }

/* -- Ingredient grid ----------------------------------------------------- */
.cg-aisle { margin-bottom: 2.5rem; }
.cg-aisle__head { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .9rem; }
.cg-aisle__count { color: var(--cg-faint); font-size: .85rem; }

.cg-grid {
	display: grid; gap: .85rem;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.cg-card {
	display: flex; flex-direction: column; gap: .45rem;
	background: var(--cg-surface); border: 1px solid var(--cg-border);
	border-radius: var(--cg-radius); padding: .9rem 1rem;
	text-decoration: none; color: inherit;
	transition: border-color .15s, transform .15s, box-shadow .15s;
}
.cg-card:hover {
	border-color: #c9cfbe; transform: translateY(-1px); box-shadow: var(--cg-shadow);
	color: inherit;
}
.cg-card__name { font-weight: 650; line-height: 1.3; }
.cg-card__sk { color: var(--cg-muted); font-size: .84rem; }
.cg-card__meta { color: var(--cg-faint); font-size: .78rem; margin-top: auto; }

/* -- Single ingredient --------------------------------------------------- */
.cg-single { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
@media (max-width: 860px) { .cg-single { grid-template-columns: 1fr; } }

.cg-panel {
	background: var(--cg-surface); border: 1px solid var(--cg-border);
	border-radius: var(--cg-radius); padding: 1.25rem 1.4rem; margin-bottom: 1.25rem;
}
.cg-panel h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .05em;
	color: var(--cg-muted); font-weight: 700; margin-bottom: .85rem; }

.cg-facts { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; margin: 0; }
.cg-facts dt { color: var(--cg-muted); font-size: .9rem; }
.cg-facts dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.cg-facts__note { grid-column: 1 / -1; color: var(--cg-faint); font-size: .8rem;
	border-top: 1px dashed var(--cg-border); padding-top: .6rem; margin-top: .2rem; }

/*
 * The portion box, in the facts list under the ingredients.
 *
 * A number you can type over rather than a number you read: the recipe's own
 * portion to start with, and anything you like after that. Sized to the text
 * so it sits in the line rather than breaking it.
 */
.cg-portion {
	display: inline-flex; align-items: baseline; gap: .3rem;
	flex-wrap: wrap; justify-content: flex-end;
}

.cg-portion__input {
	width: 4.2rem; padding: .1rem .35rem;
	border: 1px solid var(--cg-border); border-radius: 6px;
	background: var(--cg-surface); color: inherit;
	font: inherit; font-variant-numeric: tabular-nums; text-align: right;
}

.cg-portion__input:focus { outline: 2px solid var(--cg-accent); outline-offset: 1px; }
.cg-portion__unit { color: var(--cg-muted); font-weight: 400; }
.cg-portion__kcal { white-space: nowrap; }

/* What could not be counted, said rather than quietly dropped. */
.cg-portion__gap {
	flex-basis: 100%; text-align: right;
	color: var(--cg-faint); font-size: .78rem; font-weight: 400;
}

.cg-nutrition { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cg-nutrition th, .cg-nutrition td { text-align: left; padding: .45rem 0; border-bottom: 1px solid var(--cg-border); }
.cg-nutrition td:last-child { text-align: right; font-weight: 600; }
.cg-nutrition tr:last-child th, .cg-nutrition tr:last-child td { border-bottom: 0; }
.cg-nutrition .cg-sub th { padding-left: 1rem; color: var(--cg-muted); font-weight: 400; }

.cg-aliases { color: var(--cg-muted); font-size: .9rem; }
.cg-aliases code {
	background: #f1f0ea; border-radius: 4px; padding: .08rem .35rem;
	font-size: .85em; margin-right: .2rem;
}

.cg-empty { color: var(--cg-muted); background: var(--cg-surface);
	border: 1px dashed var(--cg-border); border-radius: var(--cg-radius); padding: 2rem; text-align: center; }

/* -- React islands ------------------------------------------------------- */
.cg-island { margin-bottom: 1.5rem; }
/* Was the same fix, one component at a time; [hidden] above covers it. */

.cg-filter { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
	background: var(--cg-surface); border: 1px solid var(--cg-border);
	border-radius: var(--cg-radius); padding: .8rem .9rem; }
.cg-filter__search { flex: 1 1 260px; min-width: 0; }
.cg-filter input[type="search"], .cg-filter select {
	width: 100%; padding: .5rem .7rem; border: 1px solid var(--cg-border);
	border-radius: 8px; font: inherit; font-size: .93rem; background: #fff; color: inherit;
}
.cg-filter select { width: auto; }
.cg-filter input[type="search"]:focus, .cg-filter select:focus {
	outline: 2px solid var(--cg-accent); outline-offset: 1px; border-color: transparent;
}
.cg-filter__toggles { display: flex; gap: .5rem; flex-wrap: wrap; }
.cg-chip {
	border: 1px solid var(--cg-border); background: #fff; color: var(--cg-muted);
	border-radius: 999px; padding: .4rem .8rem; font: inherit; font-size: .85rem;
	font-weight: 600; cursor: pointer;
}
.cg-chip[aria-pressed="true"] { background: var(--cg-accent-soft); border-color: #cfe0b0; color: var(--cg-accent-dark); }
.cg-filter__count { color: var(--cg-faint); font-size: .85rem; margin-left: auto; }
.cg-filter__reset { background: none; border: 0; color: var(--cg-muted); cursor: pointer;
	font: inherit; font-size: .85rem; text-decoration: underline; padding: 0; }

.cg-conv { display: grid; gap: .6rem; }
.cg-conv__row { display: flex; gap: .5rem; }
.cg-conv__row input { flex: 1 1 auto; width: 100%; min-width: 0; }
.cg-conv input, .cg-conv select {
	padding: .5rem .6rem; border: 1px solid var(--cg-border); border-radius: 8px;
	font: inherit; background: #fff; color: inherit;
}
.cg-conv__out { background: var(--cg-accent-soft); border-radius: 8px; padding: .7rem .85rem;
	font-variant-numeric: tabular-nums; }
.cg-conv__big { font-size: 1.35rem; font-weight: 700; color: var(--cg-accent-dark); }
.cg-conv__alt { color: var(--cg-muted); font-size: .85rem; margin-top: .15rem; }
.cg-conv__none { color: var(--cg-muted); font-size: .88rem; }

/* -- Recipe -------------------------------------------------------------- */

.cg-recipe__photo { margin: 0 0 1.75rem; }
.cg-recipe__photo img { width: 100%; height: auto; border-radius: var(--cg-radius); display: block; }

.cg-method h2, .cg-notes h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .05em;
	color: var(--cg-muted); font-weight: 700; }
.cg-method p { max-width: 68ch; }
.cg-method ol { max-width: 68ch; padding-left: 1.25rem; }
.cg-method li { margin-bottom: .6rem; }

.cg-notes {
	background: #fffdf5;
	border-color: #ecdfb8;
}
.cg-notes h2 { color: #8a6d1f; }
.cg-notes p, .cg-notes li { max-width: 68ch; color: #4a4335; }
.cg-notes ul { padding-left: 1.15rem; margin: 0; }
.cg-notes p:last-child, .cg-notes ul:last-child { margin-bottom: 0; }

.cg-stage {
	margin: 1.1rem 0 .4rem;
	font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
	color: var(--cg-accent-dark);
}
.cg-stage:first-child { margin-top: 0; }

.cg-lines { list-style: none; margin: 0; padding: 0; }

.cg-line {
	display: grid;
	grid-template-columns: 4.6rem 1fr auto;
	gap: .1rem .6rem;
	align-items: baseline;
	padding: .4rem 0;
	border-bottom: 1px solid var(--cg-border);
}
.cg-line:last-child { border-bottom: 0; }
.cg-line__qty { font-variant-numeric: tabular-nums; font-weight: 650; }
.cg-line__name a { text-decoration: none; }
.cg-line__name a:hover { text-decoration: underline; }
.cg-line__note { display: block; color: var(--cg-faint); font-size: .82rem; }
.cg-line__grams { color: var(--cg-faint); font-size: .8rem; font-variant-numeric: tabular-nums; }

.cg-recipe__facts { margin-top: 1.1rem; padding-top: .8rem; border-top: 1px solid var(--cg-border); }

.cg-line__recipe {
	display: inline-block;
	margin-top: .1rem;
	font-size: .78rem;
	padding: .05rem .45rem;
	border-radius: 999px;
	background: var(--cg-accent-soft);
	color: var(--cg-accent-dark);
	text-decoration: none;
}
.cg-line__recipe::before { content: "↻ "; }
.cg-line__recipe:hover { background: #e3eecf; color: var(--cg-accent-dark); }

.cg-madeby {
	margin: -.6rem 0 1.5rem;
	padding: .7rem 1rem;
	background: var(--cg-accent-soft);
	border-radius: var(--cg-radius);
	font-size: .92rem;
	color: var(--cg-accent-dark);
}
.cg-madeby a { font-weight: 650; }

/* -- Rescaling ----------------------------------------------------------- */

.cg-scaler { margin: -.3rem 0 1rem; }

.cg-scaler__open {
	display: inline-flex; align-items: center; gap: .4rem;
	border: 1px solid var(--cg-border); background: #fff; color: var(--cg-accent-dark);
	border-radius: 999px; padding: .35rem .85rem; font: inherit; font-size: .85rem;
	font-weight: 650; cursor: pointer;
}
.cg-scaler__open::before { content: "⚖"; }
.cg-scaler__open:hover { border-color: var(--cg-accent); background: var(--cg-accent-soft); }

.cg-scaler__flag {
	background: var(--cg-accent); color: #fff; border-radius: 999px;
	padding: .05rem .45rem; font-size: .72rem;
}

.cg-scaler__note { margin: .5rem 0 0; font-size: .82rem; color: var(--cg-muted); }
.cg-scaler__reset {
	background: none; border: 0; padding: 0; font: inherit; font-size: .82rem;
	color: var(--cg-accent-dark); text-decoration: underline; cursor: pointer;
}

.cg-lines--scaled .cg-line__qty { color: var(--cg-accent-dark); }

/* Modal */
.cg-modal {
	position: fixed; inset: 0; z-index: 100;
	background: rgba(20, 24, 16, .45);
	display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.cg-modal__box {
	background: var(--cg-surface); border-radius: var(--cg-radius);
	padding: 1.35rem 1.5rem; width: min(100%, 26rem);
	box-shadow: 0 12px 40px rgba(20, 24, 16, .25);
}
.cg-modal__box h3 { margin-bottom: .2rem; }
.cg-modal__intro { margin: 0 0 1rem; color: var(--cg-muted); font-size: .88rem; }

.cg-modal__field { display: block; margin-bottom: .8rem; }
.cg-modal__field > span {
	display: block; margin-bottom: .25rem;
	font-size: .78rem; font-weight: 650; text-transform: uppercase;
	letter-spacing: .04em; color: var(--cg-muted);
}
.cg-modal__field select, .cg-modal__field input {
	width: 100%; padding: .5rem .65rem; font: inherit;
	border: 1px solid var(--cg-border); border-radius: 8px; background: #fff; color: inherit;
}
.cg-modal__row { display: flex; gap: .7rem; align-items: flex-end; }
.cg-modal__row .cg-modal__field { flex: 1 1 auto; }
.cg-modal__unit { padding-bottom: .6rem; color: var(--cg-muted); font-size: .9rem; }

.cg-modal__error { margin: 0 0 .8rem; color: var(--cg-warn); font-size: .85rem; }

.cg-modal__actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1rem; }

.cg-btn {
	border-radius: 8px; padding: .5rem .9rem; font: inherit; font-size: .9rem;
	font-weight: 650; cursor: pointer; border: 1px solid transparent;
}
.cg-btn--primary { background: var(--cg-accent); color: #fff; }
.cg-btn--primary:hover { background: var(--cg-accent-dark); }
.cg-btn--ghost { background: #fff; border-color: var(--cg-border); color: var(--cg-muted); }
.cg-btn--ghost:hover { color: var(--cg-ink); }

/* Live preview inside the dialog */
.cg-modal__box { width: min(100%, 30rem); max-height: 88vh; overflow-y: auto; }

.cg-preview {
	margin-top: 1rem;
	padding-top: .9rem;
	border-top: 1px solid var(--cg-border);
}
.cg-preview h4 {
	display: flex; align-items: center; gap: .5rem;
	margin: 0 0 .5rem;
	font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
	color: var(--cg-muted);
}
.cg-preview__factor {
	background: var(--cg-accent-soft); color: var(--cg-accent-dark);
	border-radius: 999px; padding: .05rem .5rem; font-size: .78rem; letter-spacing: 0;
}
.cg-preview__empty { margin: 0; color: var(--cg-faint); font-size: .85rem; }

.cg-preview__list { list-style: none; margin: 0; padding: 0; }
.cg-preview__list li {
	display: grid;
	grid-template-columns: 5rem 1fr auto;
	gap: .5rem;
	padding: .3rem 0;
	border-bottom: 1px solid #f0eee7;
	font-size: .9rem;
}
.cg-preview__list li:last-child { border-bottom: 0; }
.cg-preview__qty { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--cg-accent-dark); }
.cg-preview__g { color: var(--cg-faint); font-size: .82rem; font-variant-numeric: tabular-nums; }

.cg-preview__facts {
	display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem;
	margin: .7rem 0 0; padding-top: .6rem;
	border-top: 1px dashed var(--cg-border);
	font-size: .85rem;
}
.cg-preview__facts dt { color: var(--cg-muted); }
.cg-preview__facts dd { margin: 0; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }

.cg-line--primary .cg-line__name::after {
	content: " ★"; color: var(--cg-accent); font-size: .8em;
}

/*
 * Sent but not shown. Both the preferment section and the leaven line are
 * always rendered, so the swap can turn one off and the other on without
 * having to build markup that was never delivered.
 */
.cg-preferment--off,
.cg-line--off { display: none; }

.cg-preferment .cg-stage__amount {
	margin-left: .5rem;
	text-transform: none; letter-spacing: 0;
	color: var(--cg-muted);
}

.cg-lines--preferment {
	padding-left: .9rem;
	border-left: 2px solid var(--cg-border);
}

.cg-stage__note {
	margin: .35rem 0 0 .9rem;
	font-size: .8rem; color: var(--cg-muted);
}

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

/* Hydration, in the dough panel ---------------------------------------- */

.cg-hydration {
	margin: 1rem 0;
	padding: 0.9rem 1rem;
	background: var(--cg-tint);
	border-radius: 6px;
}

/*
 * The label and the exact figure on one line, then − slider + across the
 * whole width under them. Three in a row with the figure as well left the
 * slider a thumb's width wide on a phone.
 */
.cg-hydration__field {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 0.5rem 0.75rem;
	margin: 0;
}

.cg-hydration__field > span {
	margin: 0;
}

.cg-hydration__exact {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	font-weight: 600;
}

.cg-modal__field .cg-hydration__input {
	width: 4.75rem;
	padding: 0.35rem 0.5rem;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	text-align: right;
}

.cg-hydration__control {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.cg-modal__field .cg-hydration__control input[type='range'] {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	padding: 0;
	border: 0;
	background: none;
}

/* Big enough for a thumb, and no double-tap zoom when pressed twice fast. */
.cg-hydration__step {
	flex: none;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid var(--cg-border);
	border-radius: 50%;
	background: var(--cg-surface);
	color: inherit;
	font: inherit;
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
	touch-action: manipulation;
}

.cg-hydration__step:hover {
	border-color: var(--cg-accent);
	color: var(--cg-accent-dark);
}

.cg-hydration__sum {
	margin: 0.6rem 0 0;
	font-size: 0.9rem;
}

.cg-hydration__reset {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-size: 0.85em;
	text-decoration: underline;
	cursor: pointer;
	opacity: 0.7;
}

.cg-hydration__reset:hover {
	opacity: 1;
}

/* A prove in the fridge, under the hydration and dressed like it. */
.cg-cold {
	margin: 1rem 0;
	padding: 0.9rem 1rem;
	background: var(--cg-tint);
	border-radius: 6px;
}

.cg-cold > .cg-modal__field {
	margin-bottom: 0;
}

/* Three short boxes in a row; on a phone they wrap rather than shrink. */
.cg-cold__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 0.75rem;
}

.cg-cold__row .cg-modal__field {
	flex: 1 1 6.5rem;
	margin-bottom: 0;
}

/* Not a label, though it sits where the field rule styles one: "h", not "H". */
.cg-modal__field > .cg-cold__box {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	margin: 0;
	font-size: inherit;
	font-weight: inherit;
	letter-spacing: normal;
	text-transform: none;
	color: inherit;
}

.cg-modal__field .cg-cold__box input {
	width: 4.5rem;
	padding: 0.35rem 0.5rem;
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.cg-cold__note {
	margin: 0.6rem 0 0;
	font-size: 0.85rem;
	opacity: 0.75;
}

.cg-hydration__help {
	margin: 0.5rem 0 0;
	font-size: 0.85rem;
	opacity: 0.75;
}

/*
 * The dose sits beside the amount it explains. Without a rule of its own the
 * two spans run together — "543 g Poolish610 g / kg".
 */
.cg-leaven__pct {
	margin-left: 0.5rem;
	font-size: 0.85em;
	font-weight: 400;
	opacity: 0.7;
	white-space: nowrap;
}

/* Portion size: a number and its unit on one line. */
.cg-modal__field--portion {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 0.5rem;
}

.cg-modal__field--portion input {
	min-width: 0;
}

/*
 * The field labels are uppercased; a unit is not a label. Without this the
 * gram sign reads "G" beside a lowercase "kusy" on the row above.
 */
.cg-modal__field--portion > span {
	margin-bottom: 0;
}

.cg-modal__field--portion .cg-modal__unit {
	text-transform: none;
	font-size: 0.9rem;
	font-weight: 400;
	letter-spacing: 0;
}

/* A leaven nobody has written this recipe up with. */
.cg-leaven__untried {
	margin: 0.6rem 0 0;
	padding: 0.6rem 0.8rem;
	background: var(--cg-tint);
	border-left: 3px solid #c9a227;
	border-radius: 3px;
	font-size: 0.88rem;
	line-height: 1.45;
}

/* Every amount, editable ---------------------------------------------- */

.cg-amounts {
	margin: 0.75rem 0 1rem;
	max-height: 46vh;
	overflow-y: auto;
}

.cg-amounts__stage {
	margin: 0.9rem 0 0.35rem;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	opacity: 0.6;
}

.cg-amounts__stage:first-child {
	margin-top: 0;
}

.cg-amounts__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cg-amounts__row {
	display: grid;
	grid-template-columns: 6.5rem auto 1fr;
	align-items: center;
	gap: 0.5rem;
	padding: 0.25rem 0;
}

.cg-amounts__input {
	width: 100%;
	padding: 0.35rem 0.5rem;
	font: inherit;
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.cg-amounts__unit {
	min-width: 4.5rem;
	padding: 0.35rem 0.4rem;
	font: inherit;
	font-size: 0.9em;
}

.cg-amounts__unit--fixed {
	padding-left: 0.1rem;
	opacity: 0.7;
}

.cg-amounts__name {
	min-width: 0;
	overflow-wrap: anywhere;
}

/* The preferment is made first and follows the dough; it is not typed into. */
.cg-amounts__list--pre li {
	display: grid;
	grid-template-columns: 6.5rem auto 1fr;
	align-items: baseline;
	gap: 0.5rem;
	padding: 0.15rem 0;
	opacity: 0.8;
}

.cg-amounts__list--pre .cg-amounts__qty {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	text-align: right;
	grid-column: 1 / 3;
}

.cg-amounts__yield {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 0.5rem;
}

.cg-amounts__yield .cg-modal__field {
	flex: 1 1 10rem;
}

/* Tuning a recipe by its percentages ----------------------------------- */

.cg-pct {
	margin: 0.75rem 0 1rem;
	padding: 0;
	list-style: none;
	max-height: 46vh;
	overflow-y: auto;
}

.cg-pct__row {
	display: grid;
	grid-template-columns: 1fr 7rem 8rem;
	align-items: center;
	gap: 0.5rem;
	padding: 0.3rem 0;
	border-bottom: 1px solid var(--cg-border);
}

.cg-pct__row:last-child {
	border-bottom: 0;
}

/* The flour is the thing everything else is measured against. */
.cg-pct__row--flour {
	font-weight: 600;
	border-bottom-width: 2px;
}

.cg-pct__name {
	min-width: 0;
	overflow-wrap: anywhere;
}

.cg-pct__cell {
	display: flex;
	align-items: baseline;
	justify-content: flex-end;
	gap: 0.3rem;
}

.cg-pct__input {
	width: 100%;
	min-width: 0;
	padding: 0.3rem 0.45rem;
	font: inherit;
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.cg-pct__sign {
	font-size: 0.85em;
	opacity: 0.65;
}

.cg-pct__fixed {
	font-variant-numeric: tabular-nums;
	opacity: 0.75;
}

/* A note belongs under the name, not in a column of its own. */
.cg-pct__note {
	grid-column: 1 / -1;
	margin-top: -0.15rem;
	font-size: 0.78rem;
	opacity: 0.6;
}

@media ( max-width: 30rem ) {
	.cg-pct__row {
		grid-template-columns: 1fr 5.5rem 6.5rem;
		font-size: 0.92rem;
	}
}

/* A flour that is one of several: indented under the total it belongs to. */
.cg-pct__row--sub .cg-pct__name {
	padding-left: 1.1rem;
	font-size: 0.93em;
	opacity: 0.85;
}

.cg-pct__row--sub {
	border-bottom-style: dotted;
}

/* How much the batch has moved, beside what it now weighs. */
.cg-pct__delta {
	font-size: 0.85em;
	font-variant-numeric: tabular-nums;
	opacity: 0.65;
}

/* Whether to put the batch back to what the yield says. */
.cg-pct__hold {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin: 0.5rem 0 0.75rem;
	font-size: 0.9rem;
	cursor: pointer;
}

.cg-pct__hold input {
	margin-top: 0.15rem;
	flex: none;
}

/* How many, and how big. Both live; the batch is their product. */
.cg-yield {
	margin: 0.6rem 0 0.75rem;
}

.cg-yield__field {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.cg-yield__field > span:first-of-type {
	flex: 1 1 auto;
}

.cg-yield__input {
	width: 5.5rem;
	padding: 0.3rem 0.45rem;
	font: inherit;
	font-variant-numeric: tabular-nums;
	text-align: right;
}

/* The arithmetic said out loud, so the batch is never a surprise. */
.cg-yield__sum {
	margin: 0.5rem 0 0;
	font-size: 0.85rem;
	font-variant-numeric: tabular-nums;
	opacity: 0.75;
}

.cg-yield__sum strong {
	opacity: 1;
}

/* Tags — what a reader would look a recipe up by ---------------------- */

.cg-recipe__tags { margin: .6rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }

/*
 * An outline where a badge is a fill, and green because these are links.
 *
 * The author, the section and the tags are all the same kind of thing -- a
 * word you can follow to everything else filed under it -- so they are one
 * style, and it is the colour the rest of the site uses for going somewhere.
 * The badges stay filled and stay their own colours: those are facts about
 * the food rather than ways through the book, and they are not links at all.
 */
.cg-tag {
	display: inline-block;
	padding: .12rem .5rem;
	border: 1px solid var(--cg-accent-line);
	border-radius: 999px;
	font-size: .78rem;
	color: var(--cg-accent-dark);
	text-decoration: none;
}

.cg-tag:hover, .cg-tag:focus {
	background: var(--cg-accent-soft);
	border-color: var(--cg-accent);
}

/* ---------------------------------------------------------------------------
 * The glossary
 *
 * Read down rather than navigated, so every term is here in full and the
 * filter only hides. A rule between entries and nothing else: the prose is
 * the page.
 * ------------------------------------------------------------------------ */

.cg-glossary { max-width: 46rem; }

.cg-term { padding: 1.1rem 0; border-top: 1px solid var(--cg-border); }
.cg-term:first-child { border-top: 0; padding-top: .4rem; }

.cg-term__name {
	display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem;
	margin: 0 0 .4rem; font-size: 1.15rem;
}

.cg-term__name a { color: inherit; text-decoration: none; }
.cg-term__name a:hover { color: var(--cg-accent-dark); }

.cg-term__original {
	color: var(--cg-faint); font-size: .85rem; font-weight: 400;
	font-style: italic;
}

.cg-term__original--big { font-size: 1rem; margin: -.2rem 0 0; }
.cg-term__body p { margin: 0 0 .6rem; }
.cg-term__body p:last-child { margin-bottom: 0; }

.cg-filter--terms { margin-bottom: 1.4rem; }

/*
 * A word linked to its explanation.
 *
 * It reads as a link, because it is one: the same green as every other link
 * on the site. Inheriting the body colour and hanging a pale dotted line
 * under it was so quiet that nobody would ever click it.
 *
 * Two things keep it apart from an ordinary link, and it needs both. The
 * text is muted rather than green, because green is for somewhere you might
 * mean to go -- another recipe -- and this only explains a word. The line is
 * dashed rather than solid, which is the long-standing convention for a
 * definition.
 *
 * The line stays green even though the text does not: muted text under a
 * muted line was the version nobody could see. It is the line that says this
 * is live, so the line is the part that keeps its colour.
 *
 * Hovering fills the line in and tints behind it, because a dashed underline
 * on its own is a convention not everybody knows.
 *
 * Matched on data-type rather than on a class, because that attribute is what
 * the block editor writes when you link to a glossary term -- so a link put
 * in by hand looks like one put in by the tool, which it should, being the
 * same thing.
 */
a[data-type="recipe_term"] {
	color: var(--cg-muted);
	text-decoration: underline dashed;
	text-decoration-color: var(--cg-accent);
	text-decoration-thickness: 1px;
	text-underline-offset: .2em;
	border-radius: 2px;
}

a[data-type="recipe_term"]:hover,
a[data-type="recipe_term"]:focus {
	color: var(--cg-ink);
	background: var(--cg-accent-soft);
	text-decoration-style: solid;
	text-decoration-color: var(--cg-accent-dark);
	box-shadow: 0 0 0 2px var(--cg-accent-soft);
}

/* In the notes, which sit on a warm panel rather than on white. */
.cg-notes a[data-type="recipe_term"] { color: #6f6650; }

/* The other terms, under a single one. */
.cg-cats--terms { margin-top: 1.6rem; }

/* ---------------------------------------------------------------------------
 * A syrup or a brine, asked for by strength
 *
 * Sits under the ingredient list on the few recipes that are solutions: how
 * much of it, in what, and how strong.
 * ------------------------------------------------------------------------ */

.cg-solution {
	margin: 1rem 0 0;
	padding: .9rem 1rem;
	background: var(--cg-tint);
	border: 1px solid var(--cg-border);
	border-radius: var(--cg-radius);
}

.cg-solution__row {
	display: flex; align-items: center; justify-content: space-between;
	gap: .8rem; margin-bottom: .55rem;
}

.cg-solution__label { font-size: .9rem; color: var(--cg-muted); }
.cg-solution__pair { display: inline-flex; align-items: center; gap: .3rem; }

.cg-solution__n {
	width: 5.5rem; padding: .2rem .45rem;
	border: 1px solid var(--cg-border); border-radius: 6px;
	background: var(--cg-surface); color: inherit;
	font: inherit; font-variant-numeric: tabular-nums; text-align: right;
}

.cg-solution__n:focus { outline: 2px solid var(--cg-accent); outline-offset: 1px; }

.cg-solution__unit {
	padding: .15rem .25rem;
	border: 1px solid transparent; border-radius: 6px;
	background: none; color: var(--cg-muted); font: inherit; font-size: .9rem;
	cursor: pointer;
}

.cg-solution__unit--fixed { cursor: default; min-width: 1.4rem; }
select.cg-solution__unit:hover { border-color: var(--cg-border); }

.cg-solution__says {
	display: flex; flex-direction: column; gap: .15rem;
	margin: .7rem 0 .8rem; padding-top: .7rem;
	border-top: 1px solid var(--cg-border);
	font-size: .92rem;
}

.cg-solution__of { color: var(--cg-faint); font-size: .78rem; }
.cg-solution__makes { font-variant-numeric: tabular-nums; }
.cg-solution__total { color: var(--cg-muted); font-size: .84rem; }

.cg-solution__apply {
	padding: .35rem .85rem;
	border: 1px solid var(--cg-accent); border-radius: 999px;
	background: var(--cg-accent-soft); color: var(--cg-accent-dark);
	font: inherit; font-size: .88rem; cursor: pointer;
}

.cg-solution__apply:hover:not(:disabled) { background: var(--cg-accent); color: #fff; }
.cg-solution__apply:disabled { opacity: .5; cursor: default; }

/* ---------------------------------------------------------------------------
 * The calorie counter
 *
 * A search box, a plate, a total. It is a form rather than a document, so it
 * sits on a card and the numbers line up in a column you can read down.
 * ------------------------------------------------------------------------ */

.cg-calc {
	max-width: 44rem;
	background: var(--cg-surface);
	border: 1px solid var(--cg-border);
	border-radius: var(--cg-radius);
	box-shadow: var(--cg-shadow);
	padding: 1.1rem 1.2rem 1.3rem;
}

.cg-calc__find { position: relative; margin-bottom: .9rem; }

.cg-calc__input {
	width: 100%; padding: .55rem .8rem;
	border: 1px solid var(--cg-border); border-radius: 8px;
	background: var(--cg-bg); color: inherit; font: inherit;
}

.cg-calc__input:focus { outline: 2px solid var(--cg-accent); outline-offset: 1px; }

/* What you can add, over the plate rather than pushing it down the page. */
.cg-calc__hits {
	position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + .25rem);
	margin: 0; padding: .25rem; list-style: none;
	background: var(--cg-surface);
	border: 1px solid var(--cg-border); border-radius: 8px;
	box-shadow: var(--cg-shadow);
	max-height: 19rem; overflow-y: auto;
}

.cg-calc__hit {
	display: flex; align-items: baseline; gap: .6rem; width: 100%;
	padding: .4rem .55rem; border: 0; border-radius: 6px;
	background: none; color: inherit; font: inherit; text-align: left;
	cursor: pointer;
}

.cg-calc__hit:hover, .cg-calc__hit:focus { background: var(--cg-accent-soft); }
.cg-calc__hitname { flex: 1 1 auto; min-width: 0; }

.cg-calc__kind {
	flex: 0 0 auto; font-size: .72rem; color: var(--cg-faint);
	text-transform: lowercase;
}

.cg-calc__hitkcal {
	flex: 0 0 auto; font-variant-numeric: tabular-nums; color: var(--cg-muted);
	font-size: .85rem;
}

.cg-calc__miss { padding: .5rem .55rem; color: var(--cg-muted); font-size: .9rem; }
.cg-calc__empty { margin: 1.4rem 0; color: var(--cg-muted); text-align: center; }

.cg-calc__plate { margin: 0; padding: 0; list-style: none; }

.cg-calc__row {
	display: grid;
	grid-template-columns: 1fr auto auto auto;
	align-items: center; gap: .4rem .7rem;
	padding: .5rem 0;
	border-bottom: 1px solid var(--cg-border);
}

.cg-calc__name { color: var(--cg-accent-dark); text-decoration: none; min-width: 0; }
.cg-calc__name:hover { text-decoration: underline; }

.cg-calc__amount { display: inline-flex; align-items: baseline; gap: .35rem; }

.cg-calc__n {
	width: 4.4rem; padding: .18rem .4rem;
	border: 1px solid var(--cg-border); border-radius: 6px;
	background: var(--cg-bg); color: inherit;
	font: inherit; font-variant-numeric: tabular-nums; text-align: right;
}

.cg-calc__unit { color: var(--cg-muted); font-size: .88rem; min-width: 2.4rem; }

/* The unit, where there are two of them to choose between. */
.cg-calc__pick {
	padding: .12rem .2rem;
	border: 1px solid transparent; border-radius: 6px;
	background: none; color: var(--cg-muted);
	font: inherit; font-size: .88rem; cursor: pointer;
}

.cg-calc__pick:hover { border-color: var(--cg-border); }
.cg-calc__pick:focus { outline: 2px solid var(--cg-accent); outline-offset: 1px; }

.cg-calc__kcal {
	font-variant-numeric: tabular-nums; font-weight: 600;
	min-width: 5.5rem; text-align: right;
}

.cg-calc__drop {
	width: 1.7rem; height: 1.7rem; padding: 0;
	border: 0; border-radius: 50%;
	background: none; color: var(--cg-faint);
	font-size: 1.1rem; line-height: 1; cursor: pointer;
}

.cg-calc__drop:hover, .cg-calc__drop:focus { background: var(--cg-warn-soft); color: var(--cg-warn); }

.cg-calc__total {
	display: flex; justify-content: space-between; align-items: baseline;
	gap: 1rem; margin: 1rem 0 0; padding-top: .8rem;
	border-top: 2px solid var(--cg-ink);
	font-size: 1.05rem;
}

.cg-calc__total strong { font-variant-numeric: tabular-nums; font-size: 1.3rem; }
.cg-calc__gap { margin: .5rem 0 0; color: var(--cg-faint); font-size: .8rem; }

.cg-calc__clear {
	margin-top: .9rem; padding: .3rem .7rem;
	border: 1px solid var(--cg-border); border-radius: 999px;
	background: none; color: var(--cg-muted); font: inherit; font-size: .82rem;
	cursor: pointer;
}

.cg-calc__clear:hover, .cg-calc__clear:focus { border-color: var(--cg-warn); color: var(--cg-warn); }

/* The table the page is without the browser: the figures, still readable. */
.cg-calc__noscript { margin: 0 0 .8rem; color: var(--cg-muted); }
.cg-calc__table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.cg-calc__table th, .cg-calc__table td {
	text-align: left; padding: .4rem .5rem .4rem 0;
	border-bottom: 1px solid var(--cg-border); font-weight: 400;
}
.cg-calc__table thead th { color: var(--cg-muted); font-size: .8rem; }
.cg-calc__table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 34rem) {
	.cg-calc { padding: .9rem; }
	.cg-calc__row { grid-template-columns: 1fr auto; }
	.cg-calc__name { grid-column: 1 / -1; }
	.cg-calc__kcal { min-width: 0; }
}

/* ---------------------------------------------------------------------------
 * Categories
 *
 * The row under the index heading, which is the way into forty-odd recipes.
 * Links rather than a filter: a section is a place, and a place has an address
 * you can send to somebody.
 *
 * The one being read is marked rather than removed, so the row holds still.
 * Nothing here moves when you click; only the grid below it changes.
 * ------------------------------------------------------------------------ */

.cg-cats {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	margin-top: .9rem;
}

.cg-cat {
	display: inline-flex;
	align-items: baseline;
	gap: .38rem;
	padding: .24rem .7rem;
	border: 1px solid var(--cg-border);
	border-radius: 999px;
	font-size: .85rem;
	color: var(--cg-muted);
	text-decoration: none;
	white-space: nowrap;
}

.cg-cat:hover,
.cg-cat:focus {
	color: var(--cg-ink);
	border-color: var(--cg-ink);
}

/* Current: filled, because a border alone reads as one more thing to press. */
.cg-cat--here {
	background: var(--cg-accent);
	border-color: var(--cg-accent);
	color: #fff;
}

.cg-cat--here:hover,
.cg-cat--here:focus {
	color: #fff;
}

/* The count is a fact about the link, not part of its name. */
.cg-cat__count {
	font-size: .74rem;
	font-variant-numeric: tabular-nums;
	opacity: .65;
}

/* On a card: where this one lives, when the page is not already about that. */
.cg-card__cat {
	font-size: .74rem;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--cg-muted);
}

/* And on the recipe itself, above the tags. */
.cg-recipe__cat {
	margin: .5rem 0 0;
	font-size: .8rem;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.cg-recipe__cat a {
	color: var(--cg-muted);
	text-decoration: none;
}

.cg-recipe__cat a:hover,
.cg-recipe__cat a:focus {
	color: var(--cg-ink);
}

/* ---------------------------------------------------------------------------
 * Index search
 *
 * One box. The facets come later; this is the half of the job that pays for
 * itself, because what a reader cannot see on the index is what is inside the
 * recipes.
 * ------------------------------------------------------------------------ */

.cg-find {
	margin: 1.2rem 0 0;
}

.cg-find__input {
	width: 100%;
	max-width: 32rem;
	padding: .55rem .8rem;
	border: 1px solid var(--cg-border);
	border-radius: var(--cg-radius);
	background: var(--cg-surface);
	font: inherit;
	color: var(--cg-ink);
}

.cg-find__input:focus {
	outline: 2px solid var(--cg-accent);
	outline-offset: 1px;
	border-color: var(--cg-accent);
}

.cg-find__count {
	margin: .45rem 0 0;
	font-size: .82rem;
	color: var(--cg-muted);
}

.cg-find__clear {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: .82rem;
	color: var(--cg-accent);
	text-decoration: underline;
	cursor: pointer;
}

/* Why this card is here, when the answer is not written on it anywhere. */
.cg-card__why {
	font-size: .74rem;
	color: var(--cg-accent-dark);
}

/* ---------------------------------------------------------------------------
 * Where an ingredient is used.
 *
 * Two columns from the point where one would start to look like a wall, so
 * flour's twenty recipes read as a list and badián's two do not sit in a lane
 * of their own with nothing beside them.
 * ------------------------------------------------------------------------ */
.cg-uses {
	margin: 0 0 .9rem;
	padding: 0;
	list-style: none;
	columns: 2;
	column-gap: 2rem;
}

.cg-uses:last-child { margin-bottom: 0; }

.cg-uses li {
	break-inside: avoid;
	padding: .18rem 0;
	font-size: .93rem;
}

.cg-uses a { text-decoration: none; }
.cg-uses a:hover { text-decoration: underline; }

/* The category a run of recipes belongs to — quiet, because it is a signpost
   and not a thing to read. */
.cg-uses__cat {
	margin: 1.1rem 0 .35rem;
	font-size: .76rem;
	font-weight: 650;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--cg-muted);
}

.cg-uses__cat:first-of-type { margin-top: .2rem; }

/* "cez Pšeničný rozkvas" — the reason a recipe is on a list that never names
   this ingredient. */
.cg-uses__via {
	font-size: .78rem;
	color: var(--cg-muted);
	white-space: nowrap;
}

@media (max-width: 40rem) {
	.cg-uses { columns: 1; }
}

/* How many tins, beside the size of one. It is a count, not a dimension, so
   it sits apart from the centimetres. */
.cg-modal__field--tins { flex: 0 0 auto; }
.cg-modal__field--tins input { width: 5rem; }

/* ---------------------------------------------------------------------------
 * The way in.
 *
 * A contents page, not a front page: what is here, and the three ways anybody
 * looks for something. No hero, because a photograph of bread tells a reader
 * nothing they came to find out.
 * ------------------------------------------------------------------------ */
.cg-home__head { margin: 1rem 0 2.5rem; }

.cg-home__head h1 {
	margin: 0;
	font-size: clamp( 2rem, 6vw, 3rem );
	letter-spacing: -.02em;
}

.cg-home__count {
	margin: .4rem 0 1.4rem;
	color: var(--cg-muted);
	font-size: 1.02rem;
}

.cg-home__find { display: flex; gap: .5rem; flex-wrap: wrap; }

.cg-home__find input[type="search"] {
	flex: 1 1 22rem;
	min-width: 0;
	padding: .6rem .8rem;
	border: 1px solid var(--cg-border);
	border-radius: .4rem;
	font: inherit;
	background: #fff;
}

.cg-home__find input[type="search"]:focus {
	outline: 2px solid var(--cg-accent);
	outline-offset: 1px;
	border-color: var(--cg-accent);
}

.cg-home__block { margin: 0 0 2.6rem; }

.cg-home__block > h2 {
	margin: 0 0 .8rem;
	font-size: .78rem;
	font-weight: 650;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--cg-muted);
}

/* The two doors: everything, or everything it is made of. */
.cg-home__doors { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }

.cg-door {
	display: block;
	padding: 1rem 1.1rem;
	border: 1px solid var(--cg-border);
	border-radius: .5rem;
	text-decoration: none;
	background: #fff;
}

.cg-door:hover { border-color: var(--cg-accent); }
.cg-door strong { display: block; color: var(--cg-accent-dark); }
.cg-door span { display: block; margin-top: .2rem; color: var(--cg-muted); font-size: .9rem; }

/* The search, which is a form now: the database answers it, and a section
   narrows what it found. */
.cg-find__form { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .9rem; align-items: center; }
.cg-find__form .cg-find__input { flex: 1 1 22rem; min-width: 0; }
.cg-find__form .cg-find__clear { font-size: .82rem; }

/* A section with nothing in the results. Still shown: knowing badián is
   nowhere in the breads is an answer. */
.cg-cat--none { opacity: .45; }

/* Who wrote it down. Metadata, so it sits with the category rather than
   competing with the name of the thing. */
.cg-recipe__by { margin: .3rem 0 0; color: var(--cg-muted); font-size: .85rem; }

/* The author on a card: a detail beside the ingredient count, not a line of
   its own. It should read like one until there are two of them. Not a link:
   the whole card is one already, and a link inside a link is neither. */
.cg-card__by { color: var(--cg-muted); }
.cg-card__by::before { content: " · "; }

/* ---------------------------------------------------------------------------
 * What a recipe is, as against how it is made: who wrote it, where it is
 * filed, what to look it up by. Labelled, because three bare values stacked
 * on each other are three facts of unstated kind.
 * ------------------------------------------------------------------------ */
.cg-meta {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: .15rem .6rem;
	margin: .7rem 0 0;
	font-size: .9rem;
}

.cg-meta dt {
	font-weight: 650;
	color: var(--cg-ink, inherit);
}

.cg-meta dt::after { content: ":"; }
.cg-meta dd { margin: 0; color: var(--cg-muted); }

/*
 * Every value here is a chip, including the author and the section.
 *
 * They are the same kind of thing -- a word you can follow to everything else
 * filed under it -- so they read as one row of three labels rather than two
 * underlined links above a row of pills.
 */
.cg-meta dd .cg-tag { margin: 0 .15rem .15rem 0; }

@media (max-width: 30rem) {
	.cg-meta { grid-template-columns: 1fr; gap: 0 0; }
	.cg-meta dd { margin: 0 0 .35rem; }
}

/* The author row, where more than one person has written something. */
.cg-cats--by { margin-bottom: .5rem; }
