/* Challah Bake: base. Scoped to .cb so it never leaks into Bricks content. */
.cb,
.cb *,
.cb *::before,
.cb *::after {
	box-sizing: border-box;
}

.cb {
	color: var(--cb-base);
	font-size: var(--cb-fs-m);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

:where(.cb) img {
	max-width: 100%;
	height: auto;
	display: block;
}

:where(.cb) a {
	color: var(--cb-primary);
	text-underline-offset: 3px;
}

:where(.cb) a:hover {
	color: var(--cb-primary-hover);
}

:where(.cb) h1,
:where(.cb) h2,
:where(.cb) h3,
:where(.cb) h4 {
	color: var(--cb-base);
	margin: 0;
	line-height: 1.08;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

:where(.cb) p {
	margin: 0 0 var(--cb-s-xs);
}

:where(.cb) ul,
:where(.cb) ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Heading faces such as Instrument Serif have no bold: use the regular weight so browsers do not fake one. */
.cb :is(h1, h2, h3, h4) {
	font-weight: 400;
}

.cb [hidden] {
	display: none !important;
}

.cb :focus-visible {
	outline: 3px solid var(--cb-ring);
	outline-offset: 2px;
	border-radius: var(--cb-r-s);
}

.cb-container {
	width: 100%;
	max-width: var(--cb-container);
	margin-inline: auto;
	padding-inline: 16px;
}

.cb-container--narrow {
	max-width: var(--cb-container-narrow);
}

.cb-muted {
	color: var(--cb-muted);
}

.cb-eyebrow {
	font-size: var(--cb-fs-s);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--cb-secondary);
	margin-bottom: var(--cb-s-2xs);
}

.cb-h3 {
	font-size: var(--cb-h4);
	margin-bottom: var(--cb-s-s);
}

.cb-subhead {
	font-size: var(--cb-fs-m);
	font-weight: 700;
	margin: var(--cb-s-m) 0 var(--cb-s-xs);
}

.cb-prose {
	max-width: var(--cb-measure);
	font-size: var(--cb-fs-m);
	line-height: 1.7;
}

.cb-prose > * + * {
	margin-top: var(--cb-s-xs);
}

.cb-link {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	font: inherit;
	color: var(--cb-muted);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.cb-link:hover {
	color: var(--cb-primary);
}

.cb-back {
	display: inline-block;
	font-size: var(--cb-fs-s);
	font-weight: 600;
	text-decoration: none;
	color: var(--cb-muted);
	margin-bottom: var(--cb-s-s);
}

.cb-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Layout helpers (only where Bricks classes do not cover them) */
.cb-grid {
	display: grid;
	gap: var(--cb-s-m);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.cb-grid--2 {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
}

.cb-grid--3 {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.cb-grid--4 {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}

.cb-stack > * + * {
	margin-top: var(--cb-s-s);
}

.cb-cluster {
	display: flex;
	flex-wrap: wrap;
	gap: var(--cb-s-2xs);
	align-items: center;
}

.cb-scroller {
	display: flex;
	gap: var(--cb-s-m);
	overflow-x: auto;
	scroll-snap-type: x proximity;
	padding: 4px 4px var(--cb-s-s);
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.cb-scroller > * {
	flex: 0 0 min(82%, 320px);
	scroll-snap-align: start;
}

/* Arch motif: rounded-top mask that echoes the curve of a loaf */
.cb-arch {
	border-radius: 999px 999px var(--cb-r-l) var(--cb-r-l);
	overflow: hidden;
	background: var(--cb-accent);
}

.cb-arch img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media print {
	.cb-recipe-actions,
	.cb-scaler,
	.cb-recipe-reviews,
	header,
	footer,
	nav,
	.cb-chip--timer {
		display: none !important;
	}
}
