/* ==========================================================================
   Cardboard Crafts — main stylesheet
   Design system: tokens, typography, components, layouts, utilities.
   No external dependencies. No remote fonts. No image files. Mobile-first.

   Look: recycled-material craft table — kraft browns, cream paper, deep brown
   ink, sage and terracotta accents. Textures (corrugated edge, paper fibre,
   dashed fold lines) are drawn with CSS gradients and borders only.

   Contrast reference (WCAG AA, measured):
     ink        #3a2c1f on cream #f6efe2 .......... 11.8:1
     ink-soft   #5a4632 on cream / kraft-soft ..... 7.8:1 / 7.2:1
     ink-muted  #6b5540 on cream / paper-deep ..... 6.1:1 / 5.6:1
     accent     #a3472d on cream / paper-deep ..... 5.3:1 / 4.8:1
     brown      #7a5326 on cream / kraft-soft ..... 5.9:1 / 5.5:1
     sage-deep  #3d5c40 on sage-soft #eaf0e4 ...... 6.5:1
     off-white  #fffaf0 on accent #a3472d ......... 5.8:1
     off-white  #fffaf0 on ink #3a2c1f ............ 12.9:1
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
	/* Colour — raw palette */
	--cbc-kraft: #c9a06c;
	--cbc-kraft-light: #e0c097;
	--cbc-kraft-dark: #a67c4a;
	--cbc-brown: #7a5326;
	--cbc-sage: #7d9a7e;
	--cbc-sage-deep: #3d5c40;
	--cbc-sage-soft: #eaf0e4;
	--cbc-terracotta: #c8674b;
	--cbc-terracotta-soft: #fbeee6;
	--cbc-mustard: #e0a93b;
	--cbc-teal: #2f6460;

	/* Colour — roles */
	--cbc-paper: #f6efe2;
	--cbc-paper-deep: #efe4d0;
	--cbc-surface: #fffaf0;
	--cbc-ink: #3a2c1f;
	--cbc-ink-soft: #5a4632;
	--cbc-ink-muted: #6b5540;
	--cbc-line: #e2d3b8;
	--cbc-line-strong: #a67c4a;
	--cbc-accent: #a3472d;
	--cbc-accent-hover: #7a3a1c;
	--cbc-accent-soft: #f3e6cf;
	--cbc-second: #3d5c40;
	--cbc-second-soft: #eaf0e4;
	--cbc-focus: #2f6460;

	/* Texture — the cut edge of a corrugated sheet, seen end-on */
	--cbc-corrugated: repeating-linear-gradient(
		90deg,
		var(--cbc-kraft-dark) 0 2px,
		var(--cbc-kraft-light) 2px 5px,
		var(--cbc-kraft) 5px 8px
	);

	/* Typography — system stacks, nothing to download */
	--cbc-font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--cbc-font-head: "Avenir Next", "Segoe UI Semibold", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--cbc-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

	--cbc-text-xs: 0.8125rem;
	--cbc-text-sm: 0.875rem;
	--cbc-text-base: 1rem;
	--cbc-text-md: 1.0625rem;
	--cbc-text-lg: 1.1875rem;
	--cbc-text-xl: 1.375rem;
	--cbc-text-2xl: 1.625rem;
	--cbc-text-3xl: 2rem;
	--cbc-text-4xl: 2.5rem;

	--cbc-leading-tight: 1.2;
	--cbc-leading-snug: 1.35;
	--cbc-leading-normal: 1.65;
	--cbc-leading-relaxed: 1.75;

	/* Spacing — 4px scale */
	--cbc-s1: 0.25rem;
	--cbc-s2: 0.5rem;
	--cbc-s3: 0.75rem;
	--cbc-s4: 1rem;
	--cbc-s5: 1.5rem;
	--cbc-s6: 2rem;
	--cbc-s7: 2.5rem;
	--cbc-s8: 3rem;
	--cbc-s9: 4rem;
	--cbc-s10: 5rem;

	/* Shape and shadow */
	--cbc-radius-sm: 4px;
	--cbc-radius: 8px;
	--cbc-radius-lg: 14px;
	--cbc-shadow-sm: 0 1px 2px rgba(58, 44, 31, 0.08);
	--cbc-shadow: 0 6px 18px rgba(58, 44, 31, 0.1);
	--cbc-shadow-lg: 0 14px 34px rgba(58, 44, 31, 0.14);

	/* Layout */
	--cbc-container: 1180px;
	--cbc-container-narrow: 780px;
	--cbc-measure: 68ch;
	--cbc-gutter: var(--cbc-s4);

	color-scheme: light;
}

@media (min-width: 48em) {
	:root {
		--cbc-gutter: var(--cbc-s6);
	}
}

/* --------------------------------------------------------------------------
   2. Light reset
   -------------------------------------------------------------------------- */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.cbc-card:hover,
	.cbc-topic:hover {
		transform: none !important;
	}
}

body {
	margin: 0;
	background-color: var(--cbc-paper);
	/* Paper fibre: two sets of hairlines at low opacity. */
	background-image:
		repeating-linear-gradient(115deg, rgba(138, 98, 52, 0.035) 0 1px, transparent 1px 7px),
		repeating-linear-gradient(22deg, rgba(138, 98, 52, 0.025) 0 1px, transparent 1px 11px);
	color: var(--cbc-ink);
	font-family: var(--cbc-font-body);
	font-size: var(--cbc-text-md);
	line-height: var(--cbc-leading-normal);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	overflow-wrap: break-word;
}

img,
svg,
video,
iframe {
	max-width: 100%;
	height: auto;
}

img {
	display: block;
}

figure {
	margin: 0;
}

/* Fold line */
hr {
	border: 0;
	border-top: 2px dashed var(--cbc-kraft);
	margin: var(--cbc-s7) 0;
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--cbc-font-head);
	color: var(--cbc-ink);
	line-height: var(--cbc-leading-tight);
	margin: 0 0 var(--cbc-s4);
	font-weight: 700;
	letter-spacing: -0.015em;
	overflow-wrap: break-word;
}

h1 {
	font-size: clamp(1.875rem, 1.35rem + 2.2vw, var(--cbc-text-4xl));
}

h2 {
	font-size: clamp(1.5rem, 1.2rem + 1.3vw, var(--cbc-text-3xl));
}

h3 {
	font-size: clamp(1.25rem, 1.1rem + 0.7vw, var(--cbc-text-xl));
}

h4 {
	font-size: var(--cbc-text-lg);
}

h5,
h6 {
	font-size: var(--cbc-text-base);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--cbc-ink-soft);
}

p {
	margin: 0 0 var(--cbc-s4);
}

a {
	color: var(--cbc-accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover,
a:focus {
	color: var(--cbc-accent-hover);
}

strong,
b {
	font-weight: 700;
}

small {
	font-size: var(--cbc-text-sm);
}

mark {
	background: #f6dfa6;
	color: var(--cbc-ink);
	padding: 0 0.15em;
}

code,
kbd,
samp {
	font-family: var(--cbc-font-mono);
	font-size: 0.9em;
	background: var(--cbc-paper-deep);
	border: 1px solid var(--cbc-line);
	border-radius: var(--cbc-radius-sm);
	padding: 0.1em 0.35em;
}

pre {
	font-family: var(--cbc-font-mono);
	font-size: var(--cbc-text-sm);
	background: var(--cbc-paper-deep);
	border: 1px solid var(--cbc-line);
	border-radius: var(--cbc-radius);
	padding: var(--cbc-s4);
	overflow-x: auto;
	line-height: 1.5;
}

pre code {
	background: none;
	border: 0;
	padding: 0;
}

blockquote {
	margin: var(--cbc-s6) 0;
	padding: var(--cbc-s2) 0 var(--cbc-s2) var(--cbc-s5);
	border-left: 4px solid var(--cbc-kraft);
	font-family: var(--cbc-font-head);
	font-size: var(--cbc-text-lg);
	color: var(--cbc-ink-soft);
}

blockquote p:last-child {
	margin-bottom: 0;
}

blockquote cite {
	display: block;
	margin-top: var(--cbc-s2);
	font-family: var(--cbc-font-body);
	font-size: var(--cbc-text-sm);
	font-style: normal;
	color: var(--cbc-ink-muted);
}

/* --------------------------------------------------------------------------
   4. Accessibility
   -------------------------------------------------------------------------- */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--cbc-focus);
	outline-offset: 2px;
	border-radius: 2px;
}

/* The main landmark only receives focus from the skip link. */
.cbc-site-main:focus {
	outline: 0;
}

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--cbc-ink);
	border-radius: var(--cbc-radius-sm);
	box-shadow: var(--cbc-shadow);
	clip-path: none;
	color: var(--cbc-surface);
	display: block;
	font-size: var(--cbc-text-base);
	font-weight: 700;
	height: auto;
	left: var(--cbc-s4);
	line-height: normal;
	outline-color: var(--cbc-mustard);
	padding: var(--cbc-s3) var(--cbc-s4);
	text-decoration: none;
	top: var(--cbc-s4);
	width: auto;
	z-index: 100000;
}

.cbc-skip-link:focus {
	position: fixed;
}

/* --------------------------------------------------------------------------
   5. Layout
   -------------------------------------------------------------------------- */

.cbc-container {
	width: 100%;
	max-width: var(--cbc-container);
	margin-inline: auto;
	padding-inline: var(--cbc-gutter);
}

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

.cbc-site-main {
	flex: 1 0 auto;
	padding-block: var(--cbc-s7) var(--cbc-s9);
}

/* Used on the homepage, where the hero sits flush against the header. */
.cbc-site-main--flush {
	padding-top: 0;
}

/* minmax(0, 1fr) lets the column shrink below the intrinsic width of wide
   children (tables, long words) so they scroll inside it instead of pushing
   the page sideways. */
.cbc-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--cbc-s7);
}

.cbc-layout > * {
	min-width: 0;
}

@media (min-width: 62em) {
	.cbc-layout--with-sidebar {
		grid-template-columns: minmax(0, 1fr) 20rem;
		gap: var(--cbc-s8);
		align-items: start;
	}
}

.cbc-stack > * + * {
	margin-top: var(--cbc-s4);
}

.cbc-section {
	margin-block: var(--cbc-s9);
}

.cbc-section:first-child {
	margin-top: var(--cbc-s8);
}

.cbc-section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--cbc-s2) var(--cbc-s4);
	margin-bottom: var(--cbc-s6);
	padding-bottom: var(--cbc-s4);
	border-bottom: 2px dashed var(--cbc-line);
}

.cbc-section__title {
	position: relative;
	margin: 0;
	padding-bottom: var(--cbc-s3);
	font-size: var(--cbc-text-2xl);
}

/* A short corrugated edge under every section title. */
.cbc-section__title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 3.5rem;
	height: 5px;
	border-radius: 1px;
	background: var(--cbc-corrugated);
}

/* Always on its own line under the title and the "View all" link. */
.cbc-section__description {
	flex: 0 0 100%;
	order: 3;
	margin: 0;
	color: var(--cbc-ink-soft);
	font-size: var(--cbc-text-base);
}

.cbc-section__link {
	font-size: var(--cbc-text-sm);
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

.cbc-section__link:hover {
	text-decoration: underline;
}

.cbc-section__link::after {
	content: " \2192";
}

/* --------------------------------------------------------------------------
   6. Header and navigation
   -------------------------------------------------------------------------- */

.cbc-site-header {
	position: relative;
	z-index: 50;
	background: var(--cbc-surface);
	border-bottom: 1px solid var(--cbc-line);
}

/* Corrugated edge along the bottom of the header. */
.cbc-site-header::after {
	content: "";
	display: block;
	height: 6px;
	background: var(--cbc-corrugated);
}

.cbc-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--cbc-s4);
	min-height: 4.25rem;
	min-width: 0;
}

.cbc-branding {
	display: flex;
	align-items: center;
	gap: var(--cbc-s3);
	min-width: 0;
}

.cbc-branding__mark {
	flex: 0 0 auto;
	width: 2.5rem;
	height: 2.5rem;
}

.cbc-branding__text {
	min-width: 0;
}

.cbc-branding__title {
	font-family: var(--cbc-font-head);
	font-size: var(--cbc-text-xl);
	font-weight: 800;
	line-height: 1.1;
	margin: 0;
	letter-spacing: -0.02em;
}

.cbc-branding__title a {
	color: var(--cbc-ink);
	text-decoration: none;
}

.cbc-branding__title a:hover {
	color: var(--cbc-accent);
}

.cbc-branding__tagline {
	margin: 0.2rem 0 0;
	font-size: var(--cbc-text-xs);
	color: var(--cbc-ink-muted);
	line-height: 1.3;
}

/* On the narrowest phones the tagline would wrap under the menu button. */
@media (max-width: 29.99em) {
	.cbc-branding__tagline {
		display: none;
	}
}

.custom-logo-link img {
	max-height: 3rem;
	width: auto;
}

/* Mobile menu button */
.cbc-menu-toggle {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: var(--cbc-s2);
	background: var(--cbc-surface);
	border: 1.5px solid var(--cbc-line-strong);
	border-radius: var(--cbc-radius-sm);
	color: var(--cbc-ink);
	cursor: pointer;
	font: inherit;
	font-size: var(--cbc-text-sm);
	font-weight: 700;
	min-height: 2.75rem;
	padding: var(--cbc-s2) var(--cbc-s3);
}

.cbc-menu-toggle:hover {
	background: var(--cbc-accent-soft);
	border-color: var(--cbc-brown);
	color: var(--cbc-ink);
}

.cbc-menu-toggle__bars {
	display: block;
	position: relative;
	width: 1.125rem;
	height: 2px;
	background: currentColor;
}

.cbc-menu-toggle__bars::before,
.cbc-menu-toggle__bars::after {
	content: "";
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	background: currentColor;
}

.cbc-menu-toggle__bars::before {
	top: -6px;
}

.cbc-menu-toggle__bars::after {
	top: 6px;
}

.cbc-header__panel {
	display: none;
	padding-bottom: var(--cbc-s5);
}

.cbc-header__panel.is-open {
	display: block;
}

.cbc-nav__list,
.cbc-nav__list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cbc-nav__list li {
	position: relative;
}

.cbc-nav__list a {
	display: block;
	padding: var(--cbc-s3) var(--cbc-s1);
	border-bottom: 1px dashed var(--cbc-line);
	color: var(--cbc-ink);
	font-size: var(--cbc-text-base);
	font-weight: 600;
	text-decoration: none;
}

.cbc-nav__list a:hover {
	color: var(--cbc-accent);
}

.cbc-nav__list .sub-menu a {
	padding-left: var(--cbc-s5);
	font-weight: 500;
}

.cbc-nav .current-menu-item > a,
.cbc-nav .current-menu-ancestor > a,
.cbc-nav .current_page_item > a {
	color: var(--cbc-accent);
}

.cbc-header__search {
	margin-top: var(--cbc-s4);
}

/* Shown only to users who can edit menus, when no menu is assigned to the
   primary location. Visitors never see this block. */
.cbc-nav--empty {
	margin: 0;
	padding: var(--cbc-s3) 0;
	font-size: var(--cbc-text-sm);
}

@media (min-width: 62em) {
	.cbc-menu-toggle {
		display: none;
	}

	/* Two rows: brand and search on the first, the full menu on the second.
	   Eight menu items fit on one line from about 1000px up; if a longer menu
	   is assigned, the list wraps instead of overflowing the page. */
	.cbc-site-header .cbc-container {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		column-gap: var(--cbc-s5);
	}

	.cbc-header__inner {
		flex: 1 1 0;
		min-height: 4.75rem;
	}

	/* The panel wrapper dissolves so that its two children (menu and search)
	   can be placed independently in the header's flex layout. */
	.cbc-header__panel,
	.cbc-header__panel.is-open {
		display: contents;
	}

	.cbc-header__search {
		order: 2;
		flex: 0 1 16rem;
		min-width: 11rem;
		margin-top: 0;
	}

	.cbc-nav {
		order: 3;
		flex: 1 0 100%;
		min-width: 0;
		border-top: 1px dashed var(--cbc-line);
		padding-block: var(--cbc-s2);
	}

	.cbc-nav__list {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--cbc-s1);
		margin-inline: calc(-1 * var(--cbc-s3));
	}

	.cbc-nav__list a {
		border-bottom: 0;
		border-radius: var(--cbc-radius-sm);
		padding: var(--cbc-s2) var(--cbc-s3);
		font-size: var(--cbc-text-sm);
		white-space: nowrap;
	}

	.cbc-nav__list a:hover {
		background: var(--cbc-accent-soft);
		color: var(--cbc-ink);
	}

	.cbc-nav .current-menu-item > a,
	.cbc-nav .current-menu-ancestor > a,
	.cbc-nav .current_page_item > a {
		background: var(--cbc-accent-soft);
		color: var(--cbc-ink);
		box-shadow: inset 0 -3px 0 var(--cbc-terracotta);
	}

	/* Submenus (one level) */
	.cbc-nav__list .sub-menu {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 13rem;
		background: var(--cbc-surface);
		border: 1px solid var(--cbc-line);
		border-radius: var(--cbc-radius);
		box-shadow: var(--cbc-shadow-lg);
		padding: var(--cbc-s2);
		z-index: 60;
	}

	.cbc-nav__list li:hover > .sub-menu,
	.cbc-nav__list li:focus-within > .sub-menu {
		display: block;
	}

	.cbc-nav__list .sub-menu a {
		padding-left: var(--cbc-s3);
		white-space: normal;
	}
}

@media (min-width: 75em) {
	.cbc-nav__list a {
		font-size: 0.9375rem;
		padding-inline: var(--cbc-s4);
	}

	.cbc-nav__list {
		margin-inline: calc(-1 * var(--cbc-s4));
	}
}

/* --------------------------------------------------------------------------
   7. Forms
   -------------------------------------------------------------------------- */

label {
	display: block;
	font-size: var(--cbc-text-sm);
	font-weight: 700;
	margin-bottom: var(--cbc-s2);
}

.cbc-field {
	margin-bottom: var(--cbc-s5);
}

.cbc-field__hint {
	display: block;
	margin-top: var(--cbc-s2);
	font-size: var(--cbc-text-xs);
	font-weight: 400;
	color: var(--cbc-ink-muted);
}

.cbc-required {
	color: var(--cbc-accent);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="password"],
select,
textarea {
	width: 100%;
	background: #fffdf8;
	border: 1.5px solid var(--cbc-line-strong);
	border-radius: var(--cbc-radius-sm);
	color: var(--cbc-ink);
	font: inherit;
	font-size: var(--cbc-text-base);
	padding: var(--cbc-s3);
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--cbc-focus);
}

textarea {
	min-height: 11rem;
	resize: vertical;
	line-height: var(--cbc-leading-normal);
}

input::placeholder,
textarea::placeholder {
	color: var(--cbc-ink-muted);
	opacity: 1;
}

/* Search field */
.cbc-search-form {
	display: flex;
	gap: var(--cbc-s2);
}

.cbc-search-form__field {
	flex: 1 1 auto;
	min-width: 0;
}

.cbc-search-form input[type="search"] {
	min-height: 2.75rem;
	padding-block: var(--cbc-s2);
}

.cbc-search-form__submit {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	background: var(--cbc-accent-soft);
	border: 1.5px solid var(--cbc-line-strong);
	border-radius: var(--cbc-radius-sm);
	color: var(--cbc-ink);
	cursor: pointer;
	padding: 0 var(--cbc-s3);
}

.cbc-search-form__submit:hover {
	background: var(--cbc-kraft-light);
	border-color: var(--cbc-brown);
	color: var(--cbc-ink);
}

.cbc-search-form__submit .cbc-icon {
	width: 1.125rem;
	height: 1.125rem;
}

/* --------------------------------------------------------------------------
   8. Buttons
   -------------------------------------------------------------------------- */

.cbc-button,
.cbc-button--primary,
button,
input[type="submit"],
input[type="button"],
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--cbc-s2);
	background: var(--cbc-accent);
	border: 1.5px solid var(--cbc-accent);
	border-radius: var(--cbc-radius-sm);
	color: var(--cbc-surface);
	cursor: pointer;
	font-family: var(--cbc-font-body);
	font-size: var(--cbc-text-base);
	font-weight: 700;
	line-height: 1.3;
	min-height: 2.875rem;
	padding: var(--cbc-s3) var(--cbc-s5);
	text-align: center;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cbc-button:hover,
.cbc-button:focus,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.wp-block-button__link:hover {
	background: var(--cbc-accent-hover);
	border-color: var(--cbc-accent-hover);
	color: var(--cbc-surface);
}

.cbc-button--secondary {
	background: transparent;
	border-color: var(--cbc-line-strong);
	color: var(--cbc-ink);
}

.cbc-button--secondary:hover,
.cbc-button--secondary:focus {
	background: var(--cbc-accent-soft);
	border-color: var(--cbc-brown);
	color: var(--cbc-ink);
}

.cbc-button--small {
	font-size: var(--cbc-text-sm);
	min-height: 0;
	padding: var(--cbc-s2) var(--cbc-s4);
}

.cbc-button[disabled],
button[disabled] {
	cursor: not-allowed;
	opacity: 0.55;
}

/* --------------------------------------------------------------------------
   9. Labels, categories, metadata
   -------------------------------------------------------------------------- */

.cbc-eyebrow {
	display: inline-block;
	font-size: var(--cbc-text-xs);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cbc-brown);
	text-decoration: none;
	margin-bottom: var(--cbc-s2);
}

a.cbc-eyebrow:hover {
	color: var(--cbc-accent-hover);
	text-decoration: underline;
}

.cbc-chip {
	display: inline-flex;
	align-items: center;
	gap: var(--cbc-s1);
	background: var(--cbc-second-soft);
	border: 1px solid #cddac9;
	border-radius: 999px;
	color: var(--cbc-second);
	font-size: var(--cbc-text-sm);
	font-weight: 600;
	padding: 0.3rem 0.8rem;
	text-decoration: none;
}

a.cbc-chip:hover {
	background: var(--cbc-accent-soft);
	border-color: var(--cbc-kraft);
	color: var(--cbc-ink);
}

.cbc-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--cbc-s2) var(--cbc-s4);
	color: var(--cbc-ink-muted);
	font-size: var(--cbc-text-sm);
	list-style: none;
	margin: 0;
	padding: 0;
}

.cbc-meta > li {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--cbc-s2) var(--cbc-s4);
}

.cbc-meta__item {
	display: inline-flex;
	align-items: center;
	gap: var(--cbc-s2);
}

.cbc-meta a {
	color: inherit;
}

.cbc-meta svg {
	flex: 0 0 auto;
	color: var(--cbc-kraft-dark);
}

.cbc-icon {
	width: 1em;
	height: 1em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
	vertical-align: -0.125em;
}

/* --------------------------------------------------------------------------
   10. Cards and grids
   -------------------------------------------------------------------------- */

.cbc-grid {
	display: grid;
	gap: var(--cbc-s5);
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 36em) {
	.cbc-grid--2,
	.cbc-grid--3,
	.cbc-grid--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 62em) {
	.cbc-grid {
		gap: var(--cbc-s6);
	}

	.cbc-grid--3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.cbc-grid--4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: var(--cbc-s5);
	}
}

.cbc-card {
	display: flex;
	flex-direction: column;
	background: var(--cbc-surface);
	border: 1px solid var(--cbc-line);
	border-radius: var(--cbc-radius);
	box-shadow: var(--cbc-shadow-sm);
	overflow: hidden;
	height: 100%;
	transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.cbc-card:hover {
	border-color: var(--cbc-kraft);
	box-shadow: var(--cbc-shadow);
	transform: translateY(-3px);
}

.cbc-card__media {
	display: block;
	background: var(--cbc-paper-deep);
	border-bottom: 1px solid var(--cbc-line);
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.cbc-card__media img,
.cbc-card-row__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Posts without a featured image get a plain corrugated panel. */
.cbc-card__media--placeholder,
.cbc-card-row__media--placeholder {
	background: repeating-linear-gradient(90deg, var(--cbc-kraft-light) 0 6px, #d8b88a 6px 12px);
}

.cbc-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: var(--cbc-s2);
	padding: var(--cbc-s5) var(--cbc-s5) var(--cbc-s5);
}

.cbc-grid--4 .cbc-card__body {
	padding: var(--cbc-s4);
}

.cbc-card__title {
	font-size: var(--cbc-text-lg);
	line-height: var(--cbc-leading-snug);
	margin: 0;
}

.cbc-grid--4 .cbc-card__title {
	font-size: var(--cbc-text-md);
}

.cbc-card__title a,
.cbc-card-row__title a,
.cbc-steps__title a {
	color: var(--cbc-ink);
	text-decoration: none;
}

.cbc-card__title a:hover,
.cbc-card-row__title a:hover,
.cbc-steps__title a:hover {
	color: var(--cbc-accent);
	text-decoration: underline;
}

.cbc-card__excerpt {
	color: var(--cbc-ink-soft);
	font-size: var(--cbc-text-sm);
	line-height: var(--cbc-leading-normal);
	margin: 0;
}

.cbc-card__footer {
	margin-top: auto;
	padding-top: var(--cbc-s3);
	border-top: 1px dashed var(--cbc-line);
}

/* Horizontal card (lists and search results) */
.cbc-card-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--cbc-s4);
	padding-bottom: var(--cbc-s5);
	border-bottom: 2px dashed var(--cbc-line);
}

.cbc-card-row:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

@media (min-width: 36em) {
	.cbc-card-row {
		grid-template-columns: 13rem minmax(0, 1fr);
		gap: var(--cbc-s5);
		align-items: start;
	}
}

.cbc-card-row__media {
	display: block;
	background: var(--cbc-paper-deep);
	border: 1px solid var(--cbc-line);
	border-radius: var(--cbc-radius);
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

/* min-width: 0 keeps long titles from blowing out the grid column. */
.cbc-card-row__body {
	min-width: 0;
}

.cbc-card-row__title {
	font-size: var(--cbc-text-xl);
	margin: var(--cbc-s1) 0 var(--cbc-s2);
}

.cbc-card-row__excerpt {
	color: var(--cbc-ink-soft);
	font-size: var(--cbc-text-base);
	margin: 0 0 var(--cbc-s3);
}

.cbc-card-list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--cbc-s5);
}

/* Numbered path (Start Here) */
.cbc-steps {
	list-style: none;
	counter-reset: cbc-step;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--cbc-s4);
	margin: 0;
	padding: 0;
}

@media (min-width: 48em) {
	.cbc-steps {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--cbc-s5);
	}
}

.cbc-steps > li {
	counter-increment: cbc-step;
	display: grid;
	grid-template-columns: 2.75rem minmax(0, 1fr);
	gap: var(--cbc-s4);
	align-items: start;
	background: var(--cbc-surface);
	border: 1px solid var(--cbc-line);
	border-left: 5px solid var(--cbc-kraft);
	border-radius: var(--cbc-radius);
	padding: var(--cbc-s5);
}

.cbc-steps > li::before {
	content: counter(cbc-step);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	background: var(--cbc-accent-soft);
	border: 2px dashed var(--cbc-kraft-dark);
	border-radius: 50%;
	color: var(--cbc-ink);
	font-family: var(--cbc-font-head);
	font-size: var(--cbc-text-lg);
	font-weight: 800;
}

.cbc-steps__title {
	font-size: var(--cbc-text-lg);
	line-height: var(--cbc-leading-snug);
	margin: 0 0 var(--cbc-s2);
}

.cbc-steps p {
	color: var(--cbc-ink-soft);
	font-size: var(--cbc-text-sm);
	margin: 0;
}

/* --------------------------------------------------------------------------
   11. Homepage — hero and sections
   -------------------------------------------------------------------------- */

.cbc-hero {
	background-color: var(--cbc-paper-deep);
	background-image:
		repeating-linear-gradient(90deg, rgba(166, 124, 74, 0.07) 0 1px, transparent 1px 9px),
		linear-gradient(180deg, var(--cbc-accent-soft), var(--cbc-paper));
	border-bottom: 2px dashed var(--cbc-kraft);
	padding-block: var(--cbc-s8);
}

.cbc-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--cbc-s6);
	align-items: center;
}

@media (min-width: 62em) {
	.cbc-hero {
		padding-block: var(--cbc-s10);
	}

	.cbc-hero__inner {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
		gap: var(--cbc-s9);
	}
}

.cbc-hero__title {
	font-size: clamp(2.125rem, 1.4rem + 3vw, 3.25rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	margin-bottom: var(--cbc-s4);
	max-width: 16ch;
}

.cbc-hero__text {
	color: var(--cbc-ink-soft);
	font-size: var(--cbc-text-lg);
	line-height: var(--cbc-leading-relaxed);
	max-width: 48ch;
	margin-bottom: var(--cbc-s6);
}

.cbc-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--cbc-s3);
}

/* Decorative inline SVG (no image request, no JS). */
.cbc-hero__figure {
	display: none;
	max-width: 27rem;
	margin-inline: auto;
	width: 100%;
}

@media (min-width: 62em) {
	.cbc-hero__figure {
		display: block;
	}
}

.cbc-hero__figure svg {
	display: block;
	width: 100%;
	height: auto;
}

/* Category strip (optional "Browse by Topic" section) */
.cbc-topics {
	display: grid;
	gap: var(--cbc-s4);
	grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.cbc-topic {
	display: flex;
	flex-direction: column;
	gap: var(--cbc-s2);
	background: var(--cbc-surface);
	border: 1px solid var(--cbc-line);
	border-top: 5px solid var(--cbc-kraft);
	border-radius: var(--cbc-radius);
	padding: var(--cbc-s5) var(--cbc-s4);
	text-decoration: none;
	height: 100%;
	transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.cbc-topic:hover {
	box-shadow: var(--cbc-shadow);
	transform: translateY(-2px);
}

.cbc-topic__name {
	font-family: var(--cbc-font-head);
	font-size: var(--cbc-text-lg);
	font-weight: 700;
	color: var(--cbc-ink);
}

.cbc-topic:hover .cbc-topic__name {
	color: var(--cbc-accent);
}

.cbc-topic__desc {
	color: var(--cbc-ink-soft);
	font-size: var(--cbc-text-sm);
	line-height: var(--cbc-leading-normal);
}

.cbc-topic__count {
	margin-top: auto;
	padding-top: var(--cbc-s2);
	color: var(--cbc-ink-muted);
	font-size: var(--cbc-text-xs);
}

/* Closing call to action */
.cbc-cta {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--cbc-s5);
	align-items: center;
	background: var(--cbc-ink);
	border-radius: var(--cbc-radius-lg);
	color: #f0e2c8;
	padding: var(--cbc-s7) var(--cbc-s5);
	/* Stitched "fold line" set inside the panel edge. */
	outline: 2px dashed rgba(224, 192, 151, 0.45);
	outline-offset: -10px;
}

@media (min-width: 48em) {
	.cbc-cta {
		grid-template-columns: minmax(0, 1fr) auto;
		padding: var(--cbc-s8);
	}
}

.cbc-cta__title {
	color: var(--cbc-surface);
	margin-bottom: var(--cbc-s3);
}

.cbc-cta__text {
	color: #f0e2c8;
	margin: 0;
	max-width: 54ch;
}

.cbc-cta .cbc-button {
	background: var(--cbc-kraft-light);
	border-color: var(--cbc-kraft-light);
	color: var(--cbc-ink);
}

.cbc-cta .cbc-button:hover,
.cbc-cta .cbc-button:focus {
	background: var(--cbc-surface);
	border-color: var(--cbc-surface);
	color: var(--cbc-ink);
}

.cbc-cta :focus-visible {
	outline-color: var(--cbc-mustard);
}

/* --------------------------------------------------------------------------
   12. Article
   -------------------------------------------------------------------------- */

.cbc-breadcrumbs {
	margin-bottom: var(--cbc-s5);
	font-size: var(--cbc-text-sm);
	color: var(--cbc-ink-muted);
}

.cbc-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--cbc-s1) var(--cbc-s2);
	list-style: none;
	margin: 0;
	padding: 0;
}

.cbc-breadcrumbs li {
	display: inline-flex;
	align-items: center;
	gap: var(--cbc-s2);
	min-width: 0;
}

.cbc-breadcrumbs li + li::before {
	content: "\203A";
	color: var(--cbc-kraft-dark);
	font-weight: 700;
}

.cbc-breadcrumbs a {
	color: var(--cbc-ink-soft);
	text-decoration: underline;
	text-decoration-color: var(--cbc-kraft);
}

.cbc-breadcrumbs a:hover {
	color: var(--cbc-accent);
}

.cbc-breadcrumbs [aria-current="page"] {
	color: var(--cbc-ink-muted);
}

.cbc-article__header {
	margin-bottom: var(--cbc-s6);
}

.cbc-article__title {
	margin-bottom: var(--cbc-s4);
	max-width: 24ch;
}

.cbc-article__summary {
	color: var(--cbc-ink-soft);
	font-size: var(--cbc-text-lg);
	line-height: var(--cbc-leading-relaxed);
	max-width: var(--cbc-measure);
	margin-bottom: var(--cbc-s4);
}

.cbc-article__meta {
	padding-top: var(--cbc-s4);
	border-top: 2px dashed var(--cbc-line);
}

.cbc-article__figure {
	margin-bottom: var(--cbc-s6);
}

.cbc-article__figure img {
	border: 1px solid var(--cbc-line);
	border-radius: var(--cbc-radius);
	width: 100%;
}

/* Figures and captions */
.cbc-article__figure figcaption,
.cbc-content figcaption,
.wp-block-image figcaption,
.wp-caption-text {
	margin-top: var(--cbc-s3);
	padding-left: var(--cbc-s3);
	border-left: 3px solid var(--cbc-kraft);
	color: var(--cbc-ink-muted);
	font-size: var(--cbc-text-sm);
	line-height: var(--cbc-leading-snug);
	text-align: left;
}

/* Body text */
.cbc-content {
	font-size: var(--cbc-text-md);
	line-height: var(--cbc-leading-relaxed);
	min-width: 0;
}

.cbc-content > * {
	max-width: var(--cbc-measure);
}

.cbc-content > .alignwide,
.cbc-content > .alignfull,
.cbc-content > .cbc-tutorial-facts,
.cbc-content > .cbc-toc,
.cbc-content > figure,
.cbc-content > .wp-block-image,
.cbc-content > .wp-block-gallery,
.cbc-content > .wp-block-table,
.cbc-content > .cbc-table-wrap,
.cbc-content > table,
.cbc-content > .cbc-ad-slot {
	max-width: 100%;
}

.cbc-content h2 {
	margin-top: var(--cbc-s8);
	padding-bottom: var(--cbc-s3);
	background: var(--cbc-corrugated) left bottom / 3.5rem 5px no-repeat;
}

.cbc-content h3 {
	margin-top: var(--cbc-s6);
}

.cbc-content h4 {
	margin-top: var(--cbc-s5);
}

.cbc-content > h2:first-child,
.cbc-content > h3:first-child {
	margin-top: 0;
}

.cbc-content ul,
.cbc-content ol {
	margin: 0 0 var(--cbc-s5);
	padding-left: 1.5em;
}

.cbc-content li + li {
	margin-top: var(--cbc-s2);
}

.cbc-content li > ul,
.cbc-content li > ol {
	margin-top: var(--cbc-s2);
	margin-bottom: 0;
}

.cbc-content ul:not([class]) > li::marker {
	color: var(--cbc-kraft-dark);
}

/* Ordered lists are the tutorial steps: bold numbers, room to breathe and a
   fold line between top-level steps. */
.cbc-content ol {
	padding-left: 1.75em;
}

.cbc-content ol > li {
	padding-left: 0.35em;
}

.cbc-content ol > li::marker {
	color: var(--cbc-accent);
	font-family: var(--cbc-font-head);
	font-weight: 800;
}

.cbc-content > ol > li + li {
	margin-top: var(--cbc-s3);
	padding-top: var(--cbc-s3);
	border-top: 1px dashed var(--cbc-line);
}

.cbc-content figure,
.cbc-content .wp-block-image {
	margin-block: var(--cbc-s6);
}

.cbc-content img {
	border: 1px solid var(--cbc-line);
	border-radius: var(--cbc-radius);
	background-color: var(--cbc-surface);
}

.cbc-content a {
	text-decoration: underline;
}

/* Tables — always scroll inside their own box, never the page.
   inc/toc.php wraps every table in .cbc-table-wrap; the bare-table rules
   below cover the block editor and any table that escapes the wrapper. */
.cbc-table-wrap,
.wp-block-table {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-block: var(--cbc-s6);
	border: 1px solid var(--cbc-line);
	border-radius: var(--cbc-radius);
	background: var(--cbc-surface);
}

/* A block-editor table figure already scrolls: its inner wrapper stays plain. */
.wp-block-table .cbc-table-wrap {
	overflow: visible;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: none;
}

.cbc-content > table {
	display: block;
	overflow-x: auto;
	margin-block: var(--cbc-s6);
}

.cbc-content table,
.wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--cbc-text-sm);
	line-height: var(--cbc-leading-snug);
}

.cbc-table-wrap table,
.wp-block-table table {
	min-width: 30rem;
	margin: 0;
}

.cbc-content th,
.cbc-content td,
.wp-block-table th,
.wp-block-table td {
	border: 0;
	border-bottom: 1px solid var(--cbc-line);
	padding: var(--cbc-s3) var(--cbc-s4);
	text-align: left;
	vertical-align: top;
}

.cbc-content tbody tr:last-child > *,
.wp-block-table tbody tr:last-child > * {
	border-bottom: 0;
}

.cbc-content tbody tr:nth-child(even),
.wp-block-table tbody tr:nth-child(even) {
	background: rgba(239, 228, 208, 0.45);
}

.cbc-content thead th,
.wp-block-table thead th {
	background: var(--cbc-accent-soft);
	border-bottom: 2px solid var(--cbc-kraft);
	color: var(--cbc-ink);
	font-size: var(--cbc-text-xs);
	letter-spacing: 0.05em;
	text-transform: uppercase;
	white-space: nowrap;
}

.cbc-content tbody th {
	font-weight: 700;
}

.cbc-content table caption {
	caption-side: bottom;
	padding: var(--cbc-s3) var(--cbc-s4);
	color: var(--cbc-ink-muted);
	font-size: var(--cbc-text-sm);
	text-align: left;
}

/* Callouts — used in article content and available in the block editor */
.cbc-callout {
	position: relative;
	background: var(--cbc-surface);
	border: 1px solid var(--cbc-line);
	border-left: 5px solid var(--cbc-kraft);
	border-radius: var(--cbc-radius);
	padding: var(--cbc-s5);
	margin-block: var(--cbc-s6);
}

.cbc-callout > :last-child {
	margin-bottom: 0;
}

.cbc-callout__title {
	display: flex;
	align-items: center;
	gap: var(--cbc-s2);
	font-size: var(--cbc-text-sm);
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--cbc-brown);
	margin-bottom: var(--cbc-s2);
}

/* Small shape before the title: a dot for tips, a triangle for safety. */
.cbc-callout__title::before {
	content: "";
	flex: 0 0 auto;
	width: 0.7rem;
	height: 0.7rem;
	border-radius: 50%;
	background: currentColor;
}

.cbc-callout--tip {
	background: var(--cbc-sage-soft);
	border-color: #cddac9;
	border-left-color: var(--cbc-sage);
}

.cbc-callout--tip .cbc-callout__title {
	color: var(--cbc-sage-deep);
}

.cbc-callout--warning {
	background: var(--cbc-terracotta-soft);
	border-color: #efcfc0;
	border-left-color: var(--cbc-terracotta);
}

.cbc-callout--warning .cbc-callout__title {
	color: var(--cbc-accent-hover);
}

.cbc-callout--warning .cbc-callout__title::before {
	width: 0;
	height: 0;
	border-radius: 0;
	background: none;
	border-left: 0.42rem solid transparent;
	border-right: 0.42rem solid transparent;
	border-bottom: 0.72rem solid currentColor;
}

/* Tutorial facts (difficulty, time, cardboard, finished size, materials) */
.cbc-tutorial-facts {
	background: var(--cbc-surface);
	border: 2px dashed var(--cbc-kraft-dark);
	border-radius: var(--cbc-radius);
	padding: var(--cbc-s5);
	margin-bottom: var(--cbc-s6);
}

.cbc-tutorial-facts__title,
.cbc-toc__title {
	font-family: var(--cbc-font-body);
	font-size: var(--cbc-text-sm);
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--cbc-ink-soft);
	margin: 0 0 var(--cbc-s4);
}

.cbc-facts {
	display: grid;
	gap: var(--cbc-s4);
	grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr));
	margin: 0;
}

.cbc-facts__item {
	display: flex;
	align-items: flex-start;
	gap: var(--cbc-s3);
	min-width: 0;
}

.cbc-facts__icon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	background: var(--cbc-accent-soft);
	border: 1px solid var(--cbc-kraft-light);
	border-radius: var(--cbc-radius-sm);
	color: var(--cbc-brown);
}

.cbc-facts__icon .cbc-icon {
	width: 1.25rem;
	height: 1.25rem;
}

.cbc-facts__label {
	display: block;
	font-family: var(--cbc-font-body);
	font-size: var(--cbc-text-xs);
	font-weight: 700;
	letter-spacing: 0.05em;
	line-height: var(--cbc-leading-snug);
	text-transform: uppercase;
	color: var(--cbc-ink-muted);
	margin: 0;
}

.cbc-facts__value {
	display: block;
	font-size: var(--cbc-text-base);
	font-weight: 700;
	line-height: var(--cbc-leading-snug);
	margin-top: 0.15rem;
}

.cbc-materials {
	margin-top: var(--cbc-s5);
	padding-top: var(--cbc-s4);
	border-top: 1px dashed var(--cbc-kraft);
}

.cbc-materials .cbc-facts__label {
	margin-bottom: var(--cbc-s3);
}

.cbc-materials__list {
	list-style: none;
	display: grid;
	gap: var(--cbc-s2) var(--cbc-s5);
	grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
	margin: 0;
	padding: 0;
	font-size: var(--cbc-text-base);
}

.cbc-materials__list li {
	display: flex;
	align-items: flex-start;
	gap: var(--cbc-s3);
	margin: 0;
}

.cbc-materials__list li::before {
	content: "";
	flex: 0 0 auto;
	width: 0.55rem;
	height: 0.55rem;
	margin-top: 0.55em;
	background: var(--cbc-sage);
	border-radius: 1px;
}

/* Table of contents */
.cbc-toc {
	background: var(--cbc-accent-soft);
	border: 1px solid var(--cbc-kraft-light);
	border-radius: var(--cbc-radius);
	padding: var(--cbc-s5);
	margin-bottom: var(--cbc-s6);
}

.cbc-toc__title {
	margin-bottom: var(--cbc-s3);
}

.cbc-toc ol {
	counter-reset: cbc-toc;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: var(--cbc-text-base);
}

.cbc-toc > ol > li {
	counter-increment: cbc-toc;
	margin: 0;
}

.cbc-toc > ol > li + li {
	margin-top: var(--cbc-s2);
}

.cbc-toc > ol > li > a::before {
	content: counter(cbc-toc) ". ";
	color: var(--cbc-brown);
	font-weight: 700;
}

.cbc-toc a {
	color: var(--cbc-ink);
	text-decoration: underline;
	text-decoration-color: var(--cbc-kraft);
}

.cbc-toc a:hover {
	color: var(--cbc-accent-hover);
	text-decoration-color: currentColor;
}

.cbc-toc ol ol {
	margin: var(--cbc-s2) 0 0 var(--cbc-s5);
	font-size: var(--cbc-text-sm);
}

.cbc-toc ol ol li + li {
	margin-top: var(--cbc-s1);
}

.cbc-toc ol ol a {
	color: var(--cbc-ink-soft);
}

/* FAQ */
.cbc-faq {
	margin-top: var(--cbc-s8);
}

.cbc-faq > h2 {
	padding-bottom: var(--cbc-s3);
	margin-bottom: var(--cbc-s5);
	background: var(--cbc-corrugated) left bottom / 3.5rem 5px no-repeat;
}

.cbc-faq__item {
	background: var(--cbc-surface);
	border: 1px solid var(--cbc-line);
	border-left: 5px solid var(--cbc-kraft-light);
	border-radius: var(--cbc-radius);
	margin-bottom: var(--cbc-s3);
	padding: var(--cbc-s4) var(--cbc-s5);
}

.cbc-faq__question {
	font-family: var(--cbc-font-head);
	font-size: var(--cbc-text-lg);
	font-weight: 700;
	margin: 0 0 var(--cbc-s2);
}

.cbc-faq__answer {
	color: var(--cbc-ink-soft);
	max-width: var(--cbc-measure);
}

.cbc-faq__answer > :last-child {
	margin-bottom: 0;
}

/* Article footer */
.cbc-article__footer {
	margin-top: var(--cbc-s8);
	padding-top: var(--cbc-s5);
	border-top: 2px dashed var(--cbc-line);
}

.cbc-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--cbc-s2);
	list-style: none;
	margin: 0;
	padding: 0;
}

.cbc-tags__label {
	font-size: var(--cbc-text-sm);
	font-weight: 700;
	color: var(--cbc-ink-soft);
}

/* Previous / next */
.cbc-post-nav {
	margin-top: var(--cbc-s7);
}

.cbc-post-nav__links {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--cbc-s4);
}

@media (min-width: 48em) {
	.cbc-post-nav__links {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* When only "next" exists it moves to the right-hand column, where its
	   right-aligned text expects to sit. */
	.cbc-post-nav__link--next:only-child {
		grid-column: 2;
	}
}

.cbc-post-nav__link {
	display: block;
	background: var(--cbc-surface);
	border: 1px solid var(--cbc-line);
	border-radius: var(--cbc-radius);
	padding: var(--cbc-s4) var(--cbc-s5);
	text-decoration: none;
	height: 100%;
}

.cbc-post-nav__link:hover {
	border-color: var(--cbc-kraft-dark);
	background: var(--cbc-accent-soft);
}

.cbc-post-nav__direction {
	display: block;
	font-size: var(--cbc-text-xs);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--cbc-ink-muted);
	margin-bottom: var(--cbc-s2);
}

.cbc-post-nav__title {
	display: block;
	font-family: var(--cbc-font-head);
	font-size: var(--cbc-text-base);
	font-weight: 700;
	color: var(--cbc-ink);
	line-height: var(--cbc-leading-snug);
}

.cbc-post-nav__link--prev {
	text-align: left;
}

.cbc-post-nav__link--next {
	text-align: right;
}

/* --------------------------------------------------------------------------
   13. Sidebar and widgets
   -------------------------------------------------------------------------- */

.cbc-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--cbc-s5);
}

@media (min-width: 62em) {
	.cbc-sidebar--sticky {
		position: sticky;
		top: var(--cbc-s5);
	}
}

.cbc-widget {
	background: var(--cbc-surface);
	border: 1px solid var(--cbc-line);
	border-top: 5px solid var(--cbc-kraft);
	border-radius: var(--cbc-radius);
	padding: var(--cbc-s5);
	font-size: var(--cbc-text-base);
}

.cbc-widget__title,
.cbc-widget .widget-title {
	font-family: var(--cbc-font-body);
	font-size: var(--cbc-text-sm);
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--cbc-ink-soft);
	margin: 0 0 var(--cbc-s4);
}

.cbc-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cbc-widget li + li {
	margin-top: var(--cbc-s3);
	padding-top: var(--cbc-s3);
	border-top: 1px dashed var(--cbc-line);
}

.cbc-widget a {
	color: var(--cbc-ink);
	text-decoration: none;
}

.cbc-widget a:hover {
	color: var(--cbc-accent);
	text-decoration: underline;
}

.cbc-widget .children,
.cbc-widget .sub-menu {
	margin-top: var(--cbc-s3);
	padding-left: var(--cbc-s4);
}

/* --------------------------------------------------------------------------
   14. Archives, pagination, search, 404
   -------------------------------------------------------------------------- */

.cbc-archive-header {
	margin-bottom: var(--cbc-s7);
	padding-bottom: var(--cbc-s5);
	border-bottom: 2px dashed var(--cbc-line);
}

.cbc-archive-header__title {
	margin-bottom: var(--cbc-s3);
	padding-bottom: var(--cbc-s4);
	background: var(--cbc-corrugated) left bottom / 4.5rem 6px no-repeat;
}

.cbc-archive-header__description {
	color: var(--cbc-ink-soft);
	font-size: var(--cbc-text-lg);
	line-height: var(--cbc-leading-relaxed);
	max-width: var(--cbc-measure);
	margin-top: var(--cbc-s4);
}

.cbc-archive-header__description > :last-child {
	margin-bottom: 0;
}

.cbc-archive-header__count {
	margin: var(--cbc-s3) 0 0;
	color: var(--cbc-ink-muted);
	font-size: var(--cbc-text-sm);
}

.cbc-subcategories {
	display: flex;
	flex-wrap: wrap;
	gap: var(--cbc-s2);
	list-style: none;
	margin: var(--cbc-s4) 0 0;
	padding: 0;
}

.cbc-pagination {
	margin-top: var(--cbc-s8);
	padding-top: var(--cbc-s5);
	border-top: 2px dashed var(--cbc-line);
}

.cbc-pagination .nav-links {
	display: flex;
	justify-content: center;
}

.cbc-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--cbc-s2);
	list-style: none;
	margin: 0;
	padding: 0;
}

.cbc-pagination li {
	margin: 0;
}

.cbc-pagination a.page-numbers,
.cbc-pagination span.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	height: 2.75rem;
	padding-inline: var(--cbc-s3);
	background: var(--cbc-surface);
	border: 1.5px solid var(--cbc-line-strong);
	border-radius: var(--cbc-radius-sm);
	color: var(--cbc-ink);
	font-size: var(--cbc-text-sm);
	font-weight: 700;
	text-decoration: none;
}

.cbc-pagination a.page-numbers:hover {
	background: var(--cbc-accent-soft);
	border-color: var(--cbc-brown);
	color: var(--cbc-ink);
}

.cbc-pagination span.page-numbers.current {
	background: var(--cbc-ink);
	border-color: var(--cbc-ink);
	color: var(--cbc-surface);
}

.cbc-pagination span.page-numbers.dots {
	border-color: transparent;
	background: none;
	min-width: 1.5rem;
	padding-inline: 0;
}

/* Search */
.cbc-search-intro {
	margin-bottom: var(--cbc-s6);
	padding-bottom: var(--cbc-s5);
	border-bottom: 2px dashed var(--cbc-line);
}

.cbc-search-intro .cbc-search-form {
	max-width: 32rem;
	margin-top: var(--cbc-s4);
}

.cbc-no-results {
	background: var(--cbc-surface);
	border: 2px dashed var(--cbc-kraft);
	border-radius: var(--cbc-radius);
	padding: var(--cbc-s6) var(--cbc-s5);
}

.cbc-no-results .cbc-search-form {
	max-width: 30rem;
	margin-top: var(--cbc-s5);
}

.cbc-no-results__suggestions {
	display: grid;
	gap: var(--cbc-s2);
	list-style: none;
	margin: var(--cbc-s4) 0 var(--cbc-s5);
	padding: 0;
}

.cbc-no-results__suggestions li {
	padding-left: 1.3em;
	position: relative;
}

.cbc-no-results__suggestions li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.6em;
	width: 0.55rem;
	height: 0.55rem;
	background: var(--cbc-sage);
	border-radius: 1px;
}

/* 404 */
.cbc-error-404 {
	text-align: center;
	max-width: 46rem;
	margin-inline: auto;
}

.cbc-error-404__code {
	display: inline-block;
	font-family: var(--cbc-font-head);
	font-size: clamp(3.5rem, 2rem + 8vw, 6rem);
	font-weight: 800;
	line-height: 1;
	color: var(--cbc-kraft);
	margin: 0 0 var(--cbc-s5);
	padding-bottom: var(--cbc-s3);
	background: var(--cbc-corrugated) center bottom / 100% 6px no-repeat;
}

.cbc-error-404 .cbc-search-form {
	max-width: 26rem;
	margin: var(--cbc-s5) auto 0;
	text-align: left;
}

.cbc-error-404 .cbc-subcategories {
	justify-content: center;
	margin-top: var(--cbc-s4);
}

.cbc-error-404 .cbc-section {
	margin-top: var(--cbc-s8);
	text-align: left;
}

.cbc-error-404__headline {
	margin-top: var(--cbc-s7);
	font-size: var(--cbc-text-xl);
}

/* --------------------------------------------------------------------------
   15. Pages and contact form
   -------------------------------------------------------------------------- */

.cbc-page__header {
	margin-bottom: var(--cbc-s6);
	padding-bottom: var(--cbc-s5);
	border-bottom: 2px dashed var(--cbc-line);
}

.cbc-page__header .cbc-page__title {
	margin-bottom: 0;
	padding-bottom: var(--cbc-s4);
	background: var(--cbc-corrugated) left bottom / 4.5rem 6px no-repeat;
}

.cbc-page__updated {
	margin: var(--cbc-s3) 0 0;
	color: var(--cbc-ink-muted);
	font-size: var(--cbc-text-sm);
}

.cbc-form-notice {
	border-radius: var(--cbc-radius);
	padding: var(--cbc-s4) var(--cbc-s5);
	margin-bottom: var(--cbc-s5);
	border: 1px solid;
	border-left-width: 5px;
}

.cbc-form-notice > :last-child {
	margin-bottom: 0;
}

.cbc-form-notice--success {
	background: #eef7ef;
	border-color: #9cc5a1;
	color: #1f5128;
}

.cbc-form-notice--error {
	background: #fdeeec;
	border-color: #e3a79e;
	color: #7d2418;
}

.cbc-form-notice__list {
	margin: var(--cbc-s2) 0 0;
	padding-left: 1.2em;
}

.cbc-form {
	max-width: 38rem;
	background: var(--cbc-surface);
	border: 1px solid var(--cbc-line);
	border-top: 5px solid var(--cbc-kraft);
	border-radius: var(--cbc-radius);
	padding: var(--cbc-s5);
}

.cbc-form > :last-child {
	margin-bottom: 0;
}

.cbc-form input[aria-invalid="true"],
.cbc-form textarea[aria-invalid="true"] {
	border-color: #b3372a;
	border-width: 2px;
}

.cbc-field__error {
	display: block;
	margin-top: var(--cbc-s2);
	color: #8c2b20;
	font-size: var(--cbc-text-sm);
	font-weight: 700;
}

.cbc-form__honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --------------------------------------------------------------------------
   16. Comments
   -------------------------------------------------------------------------- */

.cbc-comments {
	margin-top: var(--cbc-s9);
	padding-top: var(--cbc-s6);
	border-top: 2px dashed var(--cbc-line);
}

.cbc-comments__title {
	font-size: var(--cbc-text-2xl);
}

.cbc-comments .comment-list {
	list-style: none;
	margin: 0 0 var(--cbc-s7);
	padding: 0;
}

.cbc-comments .comment-list ol.children {
	list-style: none;
	margin: var(--cbc-s4) 0 0 var(--cbc-s5);
	padding: 0;
}

.cbc-comments .comment-body {
	background: var(--cbc-surface);
	border: 1px solid var(--cbc-line);
	border-radius: var(--cbc-radius);
	padding: var(--cbc-s5);
	margin-bottom: var(--cbc-s4);
}

.cbc-comments .comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--cbc-s2) var(--cbc-s3);
	font-size: var(--cbc-text-sm);
	color: var(--cbc-ink-muted);
	margin-bottom: var(--cbc-s3);
}

.cbc-comments .comment-author img {
	display: inline-block;
	border-radius: 50%;
	margin-right: var(--cbc-s2);
	vertical-align: middle;
}

.cbc-comments .reply {
	font-size: var(--cbc-text-sm);
	font-weight: 700;
}

.comment-respond .comment-form-cookies-consent label,
.comment-respond .comment-notes {
	font-weight: 400;
	font-size: var(--cbc-text-sm);
	color: var(--cbc-ink-soft);
	display: inline;
}

.comment-form p {
	margin-bottom: var(--cbc-s4);
}

/* --------------------------------------------------------------------------
   17. Ad slots (empty and disabled by default)
   -------------------------------------------------------------------------- */

.cbc-ad-slot {
	margin-block: var(--cbc-s6);
	text-align: center;
	overflow: hidden;
}

.cbc-ad-slot__label {
	display: block;
	margin-bottom: var(--cbc-s2);
	color: var(--cbc-ink-muted);
	font-size: var(--cbc-text-xs);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.cbc-ad-slot--sidebar {
	margin-block: 0;
}

/* --------------------------------------------------------------------------
   18. Footer
   -------------------------------------------------------------------------- */

.cbc-site-footer {
	background: var(--cbc-paper-deep);
	margin-top: auto;
	padding-bottom: var(--cbc-s6);
}

/* Corrugated edge along the top of the footer. */
.cbc-site-footer::before {
	content: "";
	display: block;
	height: 6px;
	margin-bottom: var(--cbc-s8);
	background: var(--cbc-corrugated);
}

.cbc-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--cbc-s6);
	margin-bottom: var(--cbc-s6);
}

@media (min-width: 48em) {
	.cbc-footer__grid {
		grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
		gap: var(--cbc-s8);
	}
}

.cbc-footer__about p {
	color: var(--cbc-ink-soft);
	font-size: var(--cbc-text-base);
	max-width: 44ch;
	margin-bottom: 0;
}

.cbc-footer__nav {
	min-width: 0;
}

.cbc-footer__heading {
	font-family: var(--cbc-font-body);
	font-size: var(--cbc-text-sm);
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--cbc-ink-soft);
	margin: 0 0 var(--cbc-s3);
}

.cbc-footer__about .cbc-footer__heading {
	font-family: var(--cbc-font-head);
	font-size: var(--cbc-text-xl);
	letter-spacing: -0.02em;
	text-transform: none;
	color: var(--cbc-ink);
}

.cbc-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: var(--cbc-text-base);
}

.cbc-footer__menu li + li {
	margin-top: var(--cbc-s1);
}

.cbc-footer__menu a {
	display: inline-block;
	padding-block: var(--cbc-s1);
	color: var(--cbc-ink-soft);
	text-decoration: none;
}

.cbc-footer__menu a:hover {
	color: var(--cbc-accent-hover);
	text-decoration: underline;
}

.cbc-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--cbc-s3);
	padding-top: var(--cbc-s5);
	border-top: 2px dashed var(--cbc-kraft);
	color: var(--cbc-ink-muted);
	font-size: var(--cbc-text-sm);
}

.cbc-footer__bottom p {
	margin: 0;
}

/* --------------------------------------------------------------------------
   19. Utilities and editor alignments
   -------------------------------------------------------------------------- */

.cbc-visually-balanced {
	max-width: var(--cbc-measure);
}

.cbc-text-center {
	text-align: center;
}

.cbc-mt-0 {
	margin-top: 0;
}

.cbc-mb-0 {
	margin-bottom: 0;
}

.alignleft {
	float: left;
	margin: 0 var(--cbc-s5) var(--cbc-s4) 0;
}

.alignright {
	float: right;
	margin: 0 0 var(--cbc-s4) var(--cbc-s5);
}

@media (max-width: 35.99em) {
	.alignleft,
	.alignright {
		float: none;
		margin: 0 0 var(--cbc-s4);
	}
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.alignwide,
.alignfull {
	margin-inline: auto;
}

.wp-block-embed__wrapper {
	position: relative;
}

.wp-block-embed.wp-embed-aspect-16-9 .wp-block-embed__wrapper {
	aspect-ratio: 16 / 9;
}

.wp-block-embed.wp-embed-aspect-16-9 iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: var(--cbc-radius);
}

/* --------------------------------------------------------------------------
   20. Print — tutorials that read well on paper
   -------------------------------------------------------------------------- */

@media print {
	.cbc-site-header,
	.cbc-site-footer,
	.cbc-ad-slot,
	.cbc-post-nav,
	.cbc-comments,
	.cbc-sidebar,
	.cbc-related,
	.cbc-skip-link,
	.cbc-breadcrumbs {
		display: none !important;
	}

	body {
		background: #fff;
		font-size: 11pt;
	}

	.cbc-content > * {
		max-width: none;
	}

	.cbc-table-wrap,
	.wp-block-table {
		overflow: visible;
	}

	.cbc-table-wrap table,
	.wp-block-table table {
		min-width: 0;
	}

	a {
		color: inherit;
		text-decoration: underline;
	}

	.cbc-content h2,
	.cbc-content h3 {
		break-after: avoid;
	}

	figure,
	.cbc-callout,
	.cbc-tutorial-facts,
	.cbc-facts__item {
		break-inside: avoid;
	}
}
