/* ==========================================================================
   Crewchet
   Palette from the yarn in Rahmeh's photos: denim, berry, marigold on white.
   Caprasimo for display, Atkinson Hyperlegible Next for reading stitch counts.
   ========================================================================== */

:root {
	--denim: #1f2b4d;
	--denim-80: #3a4566;
	--denim-60: #5b6481;
	--berry: #b8336a;
	--berry-dark: #93244f;
	--marigold: #f2b33d;
	--marigold-deep: #d9951a;
	--marigold-soft: #fdf0d2;
	--mist: #edf0f7;
	--white: #fff;
	--line: rgba(31, 43, 77, 0.14);
	--line-strong: rgba(31, 43, 77, 0.28);

	--font-body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-display: Caprasimo, Georgia, "Times New Roman", serif;

	--step--1: 0.875rem;
	--step-0: 1.0625rem;
	--step-1: 1.25rem;
	--step-2: 1.5rem;

	--gutter: clamp(1rem, 4vw, 2.5rem);
	--max: 76rem;
	--wide: 64rem;
	--measure: 42rem;

	--radius-img: 16px;
	--radius-box: 22px;
	--radius-pill: 999px;

	--chain-denim: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='12'%3E%3Cellipse cx='11' cy='6' rx='7.5' ry='3.6' fill='none' stroke='%231f2b4d' stroke-opacity='.32' stroke-width='1.8'/%3E%3C/svg%3E");
	--chain-marigold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='12'%3E%3Cellipse cx='11' cy='6' rx='7.5' ry='3.6' fill='none' stroke='%23f2b33d' stroke-width='1.8'/%3E%3C/svg%3E");
	--sc-bullet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 2l8 8M10 2l-8 8' stroke='%23d9951a' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

@media (min-width: 900px) {
	:root {
		--step-0: 1.1875rem;
		--step-1: 1.375rem;
	}
}

/* Base ------------------------------------------------------------------- */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	margin: 0;
	background: var(--white);
	color: var(--denim);
	font-family: var(--font-body);
	font-size: var(--step-0);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

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

img {
	height: auto;
}

a {
	color: var(--berry);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
}

a:hover {
	color: var(--berry-dark);
}

h1,
h2,
h3,
h4 {
	margin: 0;
	line-height: 1.15;
	text-wrap: balance;
}

p {
	margin: 0;
}

:focus-visible {
	outline: 3px solid var(--marigold);
	outline-offset: 3px;
	border-radius: 4px;
}

::selection {
	background: var(--marigold-soft);
	color: var(--denim);
}

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

.skip-link {
	position: absolute;
	left: 1rem;
	top: -4rem;
	z-index: 100;
	padding: 0.75rem 1.25rem;
	background: var(--denim);
	color: var(--white);
	border-radius: var(--radius-pill);
	font-weight: 700;
	text-decoration: none;
}

.skip-link:focus {
	top: 1rem;
	color: var(--white);
}

.icon {
	width: 1.15em;
	height: 1.15em;
	flex: none;
}

/* Buttons ------------------------------------------------------------------ */

.button,
.wp-block-button__link,
input[type="submit"],
button[type="submit"]:not(.header-search button) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.9rem 1.5rem;
	border: 2px solid var(--berry);
	border-radius: var(--radius-pill);
	background: var(--berry);
	color: var(--white);
	font: 700 1rem/1.1 var(--font-body);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover,
button[type="submit"]:not(.header-search button):hover {
	background: var(--berry-dark);
	border-color: var(--berry-dark);
	color: var(--white);
}

.button--ghost {
	background: transparent;
	border-color: var(--line-strong);
	color: var(--denim);
}

.button--ghost:hover {
	background: var(--mist);
	border-color: var(--denim);
	color: var(--denim);
}

.button--light {
	background: var(--white);
	border-color: var(--white);
	color: var(--denim);
}

.button--light:hover {
	background: var(--marigold);
	border-color: var(--marigold);
	color: var(--denim);
}

.button--ghost-light {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.5);
	color: var(--white);
}

.button--ghost-light:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: var(--white);
	color: var(--white);
}

.button--small {
	padding: 0.6rem 1rem;
	font-size: 0.9375rem;
}

.button .icon {
	width: 1.1rem;
	height: 1.1rem;
}

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

/* Forms -------------------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="number"],
input[type="password"],
textarea,
select {
	width: 100%;
	padding: 0.8rem 1rem;
	border: 2px solid var(--line-strong);
	border-radius: 12px;
	background: var(--white);
	color: var(--denim);
	font: inherit;
	font-size: 1rem;
}

input:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: var(--denim);
	box-shadow: 0 0 0 3px var(--marigold);
}

label {
	font-weight: 600;
}

.search-form {
	display: flex;
	gap: 0.5rem;
	max-width: 32rem;
	margin-top: 1.5rem;
}

.search-form input {
	border-radius: var(--radius-pill);
	padding-inline: 1.25rem;
}

/* Header -------------------------------------------------------------------- */

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

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	max-width: var(--max);
	margin: 0 auto;
	padding: 0.85rem var(--gutter);
}

.site-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--denim);
	text-decoration: none;
	margin-right: auto;
}

.site-brand:hover {
	color: var(--denim);
}

.site-brand .custom-logo {
	max-height: 48px;
	width: auto;
}

.logo-mark {
	width: 40px;
	height: 40px;
	flex: none;
}

.site-brand__name {
	font-family: var(--font-display);
	font-size: 1.65rem;
	line-height: 1;
	letter-spacing: -0.01em;
	padding-bottom: 0.15rem;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.site-nav ul {
	display: flex;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav a {
	display: block;
	padding: 0.5rem 0.8rem;
	color: var(--denim);
	font-weight: 650;
	text-decoration: none;
	border-radius: var(--radius-pill);
}

.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current-menu-ancestor > a {
	background: var(--mist);
	color: var(--denim);
}

.site-nav .sub-menu {
	display: none;
}

.header-search {
	position: relative;
	display: flex;
	align-items: center;
}

.header-search input {
	width: 13rem;
	padding: 0.6rem 2.75rem 0.6rem 1.1rem;
	border: 2px solid transparent;
	border-radius: var(--radius-pill);
	background: var(--mist);
	font-size: 0.9375rem;
}

.header-search input:focus {
	background: var(--white);
	border-color: var(--denim);
}

.header-search button {
	position: absolute;
	right: 0.35rem;
	display: grid;
	place-items: center;
	width: 2.2rem;
	height: 2.2rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--denim);
	cursor: pointer;
}

.nav-toggle {
	display: none;
	align-items: center;
	gap: 0.4rem;
	padding: 0.55rem 0.9rem;
	border: 2px solid var(--line-strong);
	border-radius: var(--radius-pill);
	background: var(--white);
	color: var(--denim);
	font: 700 0.9375rem/1 var(--font-body);
	cursor: pointer;
}

@media (max-width: 899px) {
	.nav-toggle {
		display: inline-flex;
	}

	.site-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 1rem;
		padding: 1rem var(--gutter) 1.5rem;
		background: var(--white);
		border-bottom: 1px solid var(--line);
		box-shadow: 0 18px 30px -24px rgba(31, 43, 77, 0.45);
	}

	.site-nav.is-open {
		display: flex;
	}

	.site-nav ul {
		flex-direction: column;
	}

	.site-nav a {
		padding: 0.8rem 0.25rem;
		border-radius: 0;
		border-bottom: 1px solid var(--line);
		font-size: 1.125rem;
	}

	.site-nav a:hover,
	.site-nav .current-menu-item > a {
		background: none;
		color: var(--berry);
	}

	.header-search input {
		width: 100%;
		padding-block: 0.85rem;
	}
}

/* Chain divider: a row of chain stitches marks a real break between parts of a page. */

.chain-divider {
	height: 12px;
	background: var(--chain-denim) repeat-x center / 22px 12px;
}

.chain-divider--light {
	background-image: var(--chain-marigold);
}

/* Hero ---------------------------------------------------------------------- */

.hero {
	display: grid;
	align-items: center;
	gap: clamp(1.5rem, 4vw, 3rem);
	max-width: var(--max);
	margin: 0 auto;
	padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) clamp(2rem, 5vw, 4rem);
}

@media (min-width: 900px) {
	.hero {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	}
}

.hero__title {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(3rem, 8.2vw, 5.75rem);
	line-height: 0.98;
	letter-spacing: -0.02em;
	max-width: 9ch;
}

.hero__intro {
	margin-top: 1.5rem;
	max-width: 34ch;
	font-size: var(--step-1);
	line-height: 1.5;
	color: var(--denim-80);
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2rem;
}

.hero__newest {
	margin-top: 1.75rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--line);
	max-width: 30rem;
	font-size: var(--step--1);
	color: var(--denim-60);
}

.hero__newest a {
	display: block;
	margin-top: 0.15rem;
	color: var(--denim);
	font-size: 1rem;
	font-weight: 700;
	text-decoration-color: var(--marigold);
	text-decoration-thickness: 3px;
}

.hero__chart {
	width: 100%;
	max-width: 36rem;
	margin-inline: auto;
}

@media (max-width: 899px) {
	.hero__chart {
		order: -1;
		max-width: 24rem;
	}
}

.stitch-chart {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.stitch-chart .chart-photo-bg {
	fill: var(--mist);
}

.chart-round {
	fill: none;
	stroke-width: 2.3;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.chart-round.is-denim {
	stroke: var(--denim);
	color: var(--denim);
}

.chart-round.is-berry {
	stroke: var(--berry);
	color: var(--berry);
}

.chart-round.is-marigold {
	stroke: var(--marigold-deep);
	color: var(--marigold-deep);
	stroke-width: 2.5;
}

.chart-round .is-filled {
	fill: currentColor;
	stroke: none;
}

@media (prefers-reduced-motion: no-preference) {
	.stitch-chart .chart-photo {
		opacity: 0;
		animation: chart-fade 0.7s ease-out 0.05s forwards;
	}

	.chart-round > [pathLength] {
		stroke-dasharray: 1;
		stroke-dashoffset: 1;
		animation: chart-stitch 0.75s cubic-bezier(0.55, 0.1, 0.3, 1) forwards;
		animation-delay: calc(0.3s + var(--i) * 0.2s);
	}

	.chart-round > .is-filled {
		opacity: 0;
		animation: chart-fade 0.35s ease-out forwards;
		animation-delay: calc(0.6s + var(--i) * 0.2s);
	}
}

@keyframes chart-stitch {
	to {
		stroke-dashoffset: 0;
	}
}

@keyframes chart-fade {
	to {
		opacity: 1;
	}
}

/* Sections ------------------------------------------------------------------ */

.section {
	max-width: var(--max);
	margin: 0 auto;
	padding: clamp(3rem, 7vw, 5.5rem) var(--gutter);
}

.section--flush {
	padding-top: 0;
}

.section--band {
	max-width: none;
	padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
	background: var(--mist);
}

.section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem 2rem;
	margin-bottom: 2.25rem;
}

.section__title {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(2rem, 4vw, 2.75rem);
	letter-spacing: -0.01em;
}

.section > .section__title {
	margin-bottom: 2rem;
}

.section__lede {
	margin-top: 0.6rem;
	max-width: 46ch;
	color: var(--denim-80);
}

.section__more {
	font-weight: 700;
	color: var(--denim);
	text-decoration-color: var(--marigold);
	text-decoration-thickness: 3px;
	text-underline-offset: 5px;
}

.section__more:hover {
	color: var(--berry);
}

/* Cards --------------------------------------------------------------------- */

.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 19.5rem), 1fr));
	gap: 2.75rem 1.75rem;
}

.card-grid--products {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}

.card {
	position: relative;
	min-width: 0;
}

.card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--radius-img);
	background: var(--mist);
}

.card--product .card__media {
	aspect-ratio: 4 / 5;
}

.card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card__placeholder {
	display: grid;
	place-items: center;
	height: 100%;
}

.card__placeholder .logo-mark {
	width: 64px;
	height: 64px;
	opacity: 0.5;
}

.card__badge {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.3rem 0.7rem 0.3rem 0.5rem;
	border-radius: var(--radius-pill);
	background: var(--white);
	color: var(--denim);
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.2;
}

.card__badge .icon {
	width: 0.9rem;
	height: 0.9rem;
	color: var(--berry);
}

.card__badge--pdf {
	background: var(--marigold);
}

.card__badge--pdf .icon {
	color: var(--denim);
}

.card__body {
	padding-top: 1rem;
}

.card__cat {
	display: inline-block;
	margin-bottom: 0.3rem;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
}

.card__title {
	font-size: 1.1875rem;
	font-weight: 750;
	line-height: 1.3;
}

.card__title a {
	color: var(--denim);
	text-decoration: none;
}

.card__title a:hover {
	text-decoration: underline;
	text-decoration-color: var(--marigold);
	text-decoration-thickness: 3px;
}

/* The whole card is clickable through the title link. */
.card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: var(--radius-img);
}

.card__cat {
	position: relative;
	z-index: 1;
}

.card__price {
	margin-top: 0.4rem;
	font-weight: 700;
}

.card__price del {
	margin-right: 0.4rem;
	color: var(--denim-60);
	font-weight: 400;
}

.card__price ins {
	color: var(--berry);
	text-decoration: none;
}

/* Topics -------------------------------------------------------------------- */

.topic-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.topic-list a {
	display: flex;
	flex-direction: column;
	padding: 0.85rem 1.35rem;
	border: 2px solid var(--line);
	border-radius: var(--radius-box);
	color: var(--denim);
	text-decoration: none;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.topic-list a:hover {
	border-color: var(--marigold);
	background: var(--marigold-soft);
}

.topic-list__name {
	font-weight: 750;
}

.topic-list__count {
	font-size: 0.875rem;
	color: var(--denim-60);
}

/* About band ---------------------------------------------------------------- */

.about-band {
	background: var(--denim);
	color: var(--white);
}

.about-band__inner {
	max-width: var(--max);
	margin: 0 auto;
	padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
}

.about-band__title {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(2.25rem, 5vw, 3.5rem);
}

.about-band__text {
	margin-top: 1.25rem;
	max-width: 44ch;
	font-size: var(--step-1);
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.86);
}

.about-band__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2rem;
}

/* Footer -------------------------------------------------------------------- */

.site-footer {
	background: var(--white);
}

.site-footer__inner {
	display: grid;
	gap: 2.5rem;
	max-width: var(--max);
	margin: 0 auto;
	padding: 3.5rem var(--gutter) 2rem;
}

@media (min-width: 720px) {
	.site-footer__inner {
		grid-template-columns: 2fr 1fr 1fr;
	}
}

.site-footer__brand p {
	margin-top: 0.75rem;
	color: var(--denim-60);
}

.site-footer__heading {
	margin-bottom: 0.75rem;
	font-size: 1rem;
	font-weight: 750;
}

.site-footer ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer li + li {
	margin-top: 0.4rem;
}

.site-footer__col a {
	color: var(--denim-80);
	text-decoration: none;
}

.site-footer__col a:hover {
	color: var(--berry);
	text-decoration: underline;
}

.site-footer__legal {
	max-width: var(--max);
	margin: 0 auto;
	padding: 1.25rem var(--gutter) 2.5rem;
	border-top: 1px solid var(--line);
	font-size: 0.875rem;
	color: var(--denim-60);
}

/* Page headers -------------------------------------------------------------- */

.page-header {
	max-width: var(--measure);
	margin: 0 auto;
	padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) 2rem;
}

.page-header--listing {
	max-width: var(--max);
	padding-bottom: clamp(2rem, 4vw, 3rem);
}

.page-header__title {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(2.25rem, 5.5vw, 3.75rem);
	letter-spacing: -0.015em;
}

.page-header__intro {
	margin-top: 1rem;
	max-width: 60ch;
	color: var(--denim-80);
	font-size: var(--step-1);
}

.page-article {
	padding-bottom: 4rem;
}

.page-article .entry-content,
.page-article__image {
	max-width: var(--measure);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.page-article__image img {
	border-radius: var(--radius-box);
}

.empty-state {
	max-width: 40rem;
	padding: 2rem;
	border-radius: var(--radius-box);
	background: var(--mist);
}

/* Pagination ---------------------------------------------------------------- */

.pagination {
	margin-top: 3.5rem;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 2.75rem;
	height: 2.75rem;
	padding: 0 1rem;
	border: 2px solid var(--line);
	border-radius: var(--radius-pill);
	color: var(--denim);
	font-weight: 700;
	text-decoration: none;
}

.page-numbers.current {
	background: var(--denim);
	border-color: var(--denim);
	color: var(--white);
}

a.page-numbers:hover {
	border-color: var(--denim);
	color: var(--denim);
}

/* Pattern page -------------------------------------------------------------- */

.pattern__header {
	max-width: var(--wide);
	margin: 0 auto;
	padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) 1.75rem;
}

.breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
	font-size: 0.9375rem;
	color: var(--denim-60);
}

.breadcrumbs a {
	color: var(--berry);
	font-weight: 600;
	text-decoration: none;
}

.breadcrumbs a:hover {
	text-decoration: underline;
}

.pattern__title {
	max-width: 22ch;
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(2.2rem, 5.2vw, 3.6rem);
	line-height: 1.06;
	letter-spacing: -0.015em;
}

.pattern__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1.5rem;
	margin-top: 1.25rem;
	font-size: 0.9375rem;
	color: var(--denim-60);
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.3rem 0.8rem 0.3rem 0.6rem;
	border-radius: var(--radius-pill);
	background: var(--mist);
	color: var(--denim);
	font-weight: 700;
}

.chip .icon {
	width: 0.9rem;
	height: 0.9rem;
	color: var(--berry);
}

.pattern__image {
	max-width: var(--wide);
	margin: 0 auto 2.5rem;
	padding-inline: var(--gutter);
}

.pattern__image img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--radius-box);
	background: var(--mist);
}

.pattern__layout {
	display: grid;
	gap: 2rem;
	max-width: var(--wide);
	margin: 0 auto;
	padding-inline: var(--gutter);
}

@media (min-width: 1080px) {
	.pattern__layout {
		grid-template-columns: 15.5rem minmax(0, var(--measure));
		gap: 3.5rem;
	}

	.pattern__aside-inner {
		position: sticky;
		top: 1.5rem;
		max-height: calc(100vh - 3rem);
		overflow-y: auto;
		padding-bottom: 1rem;
		scrollbar-width: thin;
	}
}

.pattern__aside-inner {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.toc {
	border-radius: var(--radius-img);
	background: var(--mist);
}

.toc summary {
	padding: 0.9rem 1.1rem;
	font-weight: 750;
	cursor: pointer;
	list-style-position: inside;
}

.toc-list {
	margin: 0;
	padding: 0 0.75rem 0.9rem;
	list-style: none;
	font-size: 0.9375rem;
	line-height: 1.35;
}

.toc-list a {
	display: block;
	padding: 0.4rem 0.6rem;
	border-left: 3px solid transparent;
	color: var(--denim-80);
	text-decoration: none;
}

.toc-list a:hover {
	color: var(--berry);
}

.toc-list a.is-active {
	border-left-color: var(--marigold-deep);
	color: var(--denim);
	font-weight: 700;
}

.toc-level-3 a {
	padding-left: 1.4rem;
	font-size: 0.875rem;
}

@media (min-width: 1080px) {
	.toc {
		background: none;
	}

	.toc summary {
		padding: 0 0 0.6rem;
		list-style: none;
		cursor: default;
		pointer-events: none;
	}

	.toc summary::-webkit-details-marker {
		display: none;
	}

	.toc-list {
		padding: 0;
	}

	.toc-list a {
		padding-left: 0.75rem;
	}

	.toc-level-3 a {
		padding-left: 1.5rem;
	}
}

.pattern__tools {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

@media (min-width: 1080px) {
	.pattern__tools {
		flex-direction: column;
		align-items: stretch;
	}

	.pattern__tools .button {
		justify-content: flex-start;
	}
}

.row-progress {
	padding: 1rem 1.1rem;
	border-radius: var(--radius-img);
	background: var(--marigold-soft);
	font-size: 0.9375rem;
}

.row-progress__text {
	font-weight: 700;
}

.row-progress__bar {
	height: 8px;
	margin: 0.6rem 0 0.7rem;
	border-radius: var(--radius-pill);
	background: rgba(31, 43, 77, 0.12);
	overflow: hidden;
}

.row-progress__bar span {
	display: block;
	height: 100%;
	width: 0;
	background: var(--marigold-deep);
	border-radius: inherit;
	transition: width 0.25s ease;
}

.pattern__content {
	min-width: 0;
	padding-bottom: 2rem;
}

.pattern__buy {
	max-width: var(--wide);
	margin: 1rem auto 0;
	padding-inline: var(--gutter);
}

@media (min-width: 1080px) {
	.pattern__buy {
		padding-left: calc(var(--gutter) + 19rem);
	}

	.pattern__comments {
		padding-left: calc(var(--gutter) + 19rem) !important;
	}
}

.pattern__comments {
	max-width: var(--wide);
	margin: 0 auto;
	padding: 3rem var(--gutter) 4rem;
}

/* Row tracker: rounds and rows you can tick off as you go. */

.ct-row {
	position: relative;
	padding-left: 2.6rem;
	cursor: pointer;
	border-radius: 10px;
	transition: color 0.15s ease;
}

li.ct-row {
	list-style: none;
}

.entry-content ul > li.ct-row::before {
	display: none;
}

.ct-tick {
	position: absolute;
	left: 0;
	top: 0.05em;
	display: grid;
	place-items: center;
	width: 1.75rem;
	height: 1.75rem;
	padding: 0;
	border: 2px solid var(--line-strong);
	border-radius: 8px;
	background: var(--white);
	color: transparent;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ct-tick .icon {
	width: 1.1rem;
	height: 1.1rem;
	stroke-width: 3;
}

.ct-row:hover .ct-tick {
	border-color: var(--marigold-deep);
}

.ct-row.is-done {
	color: var(--denim-60);
}

.ct-row.is-done .ct-tick {
	background: var(--marigold);
	border-color: var(--marigold);
	color: var(--denim);
}

.row-hint {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	padding: 0.85rem 1rem;
	border-radius: 12px;
	background: var(--marigold-soft);
	font-size: 0.9375rem;
}

/* Entry content -------------------------------------------------------------- */

.entry-content {
	font-size: var(--step-0);
	line-height: 1.65;
}

.entry-content > * {
	margin-top: 0;
	margin-bottom: 1.15em;
}

.entry-content > *:last-child {
	margin-bottom: 0;
}

.entry-content h2 {
	margin: 2.2em 0 0.7em;
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(1.65rem, 3.2vw, 2.1rem);
	line-height: 1.15;
	scroll-margin-top: 1.5rem;
}

.entry-content h3 {
	margin: 1.9em 0 0.6em;
	font-size: 1.3rem;
	font-weight: 750;
	scroll-margin-top: 1.5rem;
}

.entry-content h4 {
	margin: 1.6em 0 0.5em;
	font-size: 1.1rem;
	font-weight: 750;
}

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

.entry-content a {
	color: var(--berry);
}

.entry-content strong {
	font-weight: 750;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.6rem;
}

.entry-content li + li {
	margin-top: 0.35em;
}

.entry-content ul:not(.wp-block-social-links):not(.blocks-gallery-grid) {
	list-style: none;
}

/* List bullets are single-crochet symbols. */
.entry-content ul:not(.wp-block-social-links):not(.blocks-gallery-grid) > li {
	position: relative;
}

.entry-content ul:not(.wp-block-social-links):not(.blocks-gallery-grid) > li::before {
	content: "";
	position: absolute;
	left: -1.35rem;
	top: 0.55em;
	width: 0.62rem;
	height: 0.62rem;
	background: var(--sc-bullet) no-repeat center / contain;
}

.entry-content ol > li::marker {
	color: var(--berry);
	font-weight: 750;
}

.entry-content img {
	border-radius: 14px;
}

.entry-content figure {
	margin-inline: 0;
}

.entry-content figcaption,
.entry-content .wp-element-caption {
	margin-top: 0.6rem;
	font-size: 0.9rem;
	color: var(--denim-60);
	text-align: center;
}

.entry-content blockquote,
.entry-content .wp-block-quote {
	margin-inline: 0;
	padding: 0.25rem 0 0.25rem 1.25rem;
	border-left: 4px solid var(--marigold);
	font-size: 1.1em;
}

.entry-content .wp-block-quote cite {
	display: block;
	margin-top: 0.5rem;
	font-size: 0.9rem;
	font-style: normal;
	color: var(--denim-60);
}

.entry-content hr,
.entry-content .wp-block-separator {
	height: 12px;
	margin: 2.5em 0;
	border: 0;
	background: var(--chain-denim) repeat-x center / 22px 12px;
	opacity: 1;
}

.entry-content .wp-block-table {
	overflow-x: auto;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
}

.entry-content th,
.entry-content td {
	padding: 0.65rem 0.8rem;
	border: 0;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}

.entry-content th,
.entry-content thead td {
	background: var(--mist);
	font-weight: 750;
}

.entry-content .wp-block-embed {
	margin-block: 1.75em;
}

.entry-content .wp-block-embed iframe {
	border-radius: var(--radius-img);
}

.entry-content .wp-block-social-links {
	margin-top: 0.4rem;
}

.entry-content .wp-block-social-links a {
	text-decoration: none;
}

.ct-spacer.is-small {
	height: 0.25rem;
}

.ct-spacer.is-large {
	height: 1.25rem;
}

.page-links {
	margin-top: 2rem;
	font-weight: 700;
}

/* Comments -------------------------------------------------------------------- */

.comments {
	max-width: var(--measure);
}

.comments__title,
.comment-reply-title {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: 1.75rem;
	margin-bottom: 1.5rem;
}

.comment-list,
.comment-list .children {
	margin: 0;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	margin-top: 1rem;
	padding-left: clamp(1rem, 4vw, 2.5rem);
	border-left: 2px solid var(--line);
}

.comment-list > li + li {
	margin-top: 1.25rem;
}

.comment-body {
	padding: 1.15rem 1.25rem;
	border-radius: var(--radius-img);
	background: var(--mist);
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-weight: 750;
}

.comment-author .avatar {
	border-radius: 50%;
}

.comment-author .says {
	display: none;
}

.comment-meta a {
	color: var(--denim-60);
	font-size: 0.875rem;
	text-decoration: none;
}

.comment-metadata {
	margin: 0.2rem 0 0.6rem;
}

.comment-content p + p {
	margin-top: 0.8em;
}

.reply {
	margin-top: 0.6rem;
	font-size: 0.9375rem;
	font-weight: 700;
}

.comment-respond {
	margin-top: 2.5rem;
}

.comment-form {
	display: grid;
	gap: 1rem;
}

.comment-form p {
	display: grid;
	gap: 0.35rem;
}

.comment-form .comment-form-cookies-consent {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
	font-size: 0.9375rem;
}

.comment-form .comment-form-cookies-consent label {
	font-weight: 400;
}

.comment-notes {
	color: var(--denim-60);
	font-size: 0.9375rem;
}

/* Print: just the pattern ------------------------------------------------------ */

@media print {
	@page {
		margin: 1.6cm;
	}

	body {
		font-size: 11pt;
		color: #000;
	}

	.site-header,
	.site-footer,
	.skip-link,
	.pattern__aside,
	.pattern__buy,
	.pattern__comments,
	.section--band,
	.wp-block-embed,
	.wp-block-social-links,
	.row-hint,
	.ct-tick,
	.breadcrumbs {
		display: none !important;
	}

	.pattern__layout {
		display: block;
		padding: 0;
	}

	.pattern__header,
	.pattern__image {
		padding: 0;
	}

	.pattern__title {
		font-size: 24pt;
	}

	.pattern__image img {
		max-height: 8cm;
		width: auto;
		aspect-ratio: auto;
	}

	.ct-row {
		padding-left: 0;
		color: #000 !important;
	}

	.entry-content a {
		color: #000;
		text-decoration: none;
	}

	.entry-content img {
		max-height: 9cm;
		width: auto;
	}

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

	.entry-content li,
	.entry-content p,
	.entry-content figure {
		break-inside: avoid;
	}
}
