/* Finecolour palette block + single-color page + range archive styles.
 *
 * Type scale strategy:
 *   Kallyas (parent theme) sets html { font-size: 10px } which kills `rem` math
 *   for descendant components. We avoid rem entirely. Each top-level container
 *   pins its own base font-size in px and all descendants use `em` so the whole
 *   block scales as one unit.
 *
 * Container bases:
 *   .fc-color-single   16px (body)
 *   .fc-range-archive  16px (body)
 *   .fc-palette        14px (compact grid)
 *   .fc-related        14px (compact grid)
 *
 * Internal scale (em-of-container):
 *   xs   0.8125em   labels, breadcrumbs, hex chips
 *   sm   0.875em    meta text, code, value labels
 *   md   1em        body
 *   lg   1.125em    subsection emphasis
 *   xl   1.375em    section headings
 *   2xl  2em        page H1
 */

/* ------------------------------------------------------------------------ *
 * Palette block (fc/palette Gutenberg block — grid of swatches)
 * ------------------------------------------------------------------------ */
.fc-palette {
	font-size: 14px;
	line-height: 1.5;
	margin: 1.5em 0;
}

.fc-palette__empty {
	padding: 1em;
	background: #f5f5f5;
	color: #666;
	text-align: center;
	border-radius: 4px;
}

.fc-palette__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	gap: 0.6em;
}

.fc-palette__item {
	margin: 0;
	padding: 0;
}

.fc-palette__swatch-link {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	text-decoration: none;
	color: inherit;
	border: 1px solid #e5e5e5;
	border-radius: 3px;
	overflow: hidden;
	transition: transform 0.1s ease, box-shadow 0.1s ease;
	background: #fff;
}

.fc-palette__swatch-link:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
	text-decoration: none;
	color: inherit;
}

.fc-palette__swatch {
	display: block;
	aspect-ratio: 1 / 1;
	width: 100%;
	background: #ccc;
}

.fc-palette__code {
	display: block;
	font-size: 0.875em;
	font-weight: 600;
	letter-spacing: 0.02em;
	padding: 0.4em 0.5em 0;
	color: #222;
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.fc-palette__name {
	display: -webkit-box;
	font-size: 0.8125em;
	line-height: 1.25;
	padding: 0 0.5em 0.5em;
	color: #555;
	overflow: hidden;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.fc-palette--missing-range {
	padding: 0.75em 1em;
	background: #fff3cd;
	border: 1px solid #ffeeba;
	color: #856404;
	border-radius: 4px;
	font-size: 0.95em;
}

/* ------------------------------------------------------------------------ *
 * Marker SVG sizing (used everywhere)
 * ------------------------------------------------------------------------ */
.fc-marker {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}
.fc-marker--sm { max-width: 160px; }
.fc-marker--md { max-width: 220px; }
.fc-marker--lg { max-width: 340px; }

/* ------------------------------------------------------------------------ *
 * Range archive  /range/{slug}/
 * ------------------------------------------------------------------------ */
.fc-range-archive {
	font-size: 16px;
	line-height: 1.55;
	padding: 2.5em 0 4em;
}

.fc-range-archive__header {
	margin: 0 0 2em;
	text-align: center;
}

.fc-range-archive__title {
	font-size: 2.5em;
	font-weight: 700;
	margin: 0 0 0.25em;
	letter-spacing: -0.01em;
	line-height: 1.15;
}

.fc-range-archive__count {
	font-size: 1em;
	color: #777;
	margin: 0 0 0.75em;
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.fc-range-archive__desc {
	max-width: 40em;
	margin: 0 auto;
	color: #555;
	font-size: 1em;
}

.fc-range-archive__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1.25em;
}

.fc-range-archive__item { margin: 0; padding: 0; }

.fc-range-archive__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.6em;
	padding: 1.1em 0.8em;
	border: 1px solid #ececec;
	border-radius: 8px;
	background: #fff;
	text-decoration: none;
	color: inherit;
	transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
	height: 100%;
	box-sizing: border-box;
}

.fc-range-archive__link:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.10);
	border-color: #d4d4d4;
	text-decoration: none;
	color: inherit;
}

.fc-range-archive__marker {
	width: 100%;
	display: flex;
	justify-content: center;
}

.fc-range-archive__meta {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.15em;
	text-align: center;
}

.fc-range-archive__code {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-weight: 700;
	font-size: 1em;
	color: #222;
}

.fc-range-archive__name {
	font-size: 1.0625em;
	color: #333;
	line-height: 1.25;
}

.fc-range-archive__hex {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.8125em;
	color: #999;
	margin-top: 0.15em;
}

.fc-range-archive__pagination {
	margin: 2.5em 0 0;
	display: flex;
	justify-content: center;
}

.fc-range-archive__pagination .page-numbers {
	display: inline-block;
	padding: 0.5em 0.85em;
	margin: 0 0.15em;
	border: 1px solid #ddd;
	border-radius: 4px;
	color: #333;
	text-decoration: none;
	font-size: 1em;
}

.fc-range-archive__pagination .page-numbers.current {
	background: #222;
	border-color: #222;
	color: #fff;
}

.fc-range-archive__pagination .page-numbers:hover:not(.current) {
	background: #f5f5f5;
}

.fc-range-archive__empty {
	text-align: center;
	color: #999;
	padding: 3em 0;
	font-size: 1em;
}

/* ------------------------------------------------------------------------ *
 * Single color page
 * ------------------------------------------------------------------------ */
.fc-color-single {
	font-size: 16px;
	line-height: 1.55;
	padding: 1em 0 3em;
	color: #2a2a2a;
}

.fc-color-single .row {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -0.75em;
}
.fc-color-single .col-sm-6 {
	padding: 0 0.75em;
	box-sizing: border-box;
	flex: 0 0 100%;
	max-width: 100%;
}
@media (min-width: 768px) {
	.fc-color-single .col-sm-6 {
		flex: 0 0 50%;
		max-width: 50%;
	}
}

.fc-color-single__swatch {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 6px;
	display: flex;
	align-items: flex-end;
	justify-content: flex-start;
	padding: 1.25em;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
	margin-bottom: 1.5em;
}

.fc-color-single__marker {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 80%;
	max-width: 340px;
	pointer-events: none;
}

.fc-color-single__swatch-meta {
	background: rgba(255, 255, 255, 0.95);
	padding: 0.6em 0.85em;
	border-radius: 4px;
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	display: flex;
	flex-direction: column;
	gap: 0.15em;
	position: relative;
	z-index: 2;
}

.fc-color-single__code {
	font-size: 1.125em;
	color: #111;
	font-weight: 700;
}

.fc-color-single__hex {
	font-size: 0.9375em;
	color: #555;
	text-transform: uppercase;
}

.fc-color-single__rgb {
	font-size: 0.8125em;
	color: #777;
	letter-spacing: 0.02em;
}

.fc-color-single__name {
	font-size: 2.25em;
	font-weight: 700;
	margin: 0 0 0.5em;
	line-height: 1.15;
	color: #111;
}

.fc-color-single__ranges {
	font-size: 1em;
	color: #666;
	margin: 0 0 1.25em;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.4em;
}

.fc-color-single__range-link {
	display: inline-block;
	padding: 0.2em 0.75em;
	background: #f3f3f3;
	border-radius: 999px;
	color: #333 !important;
	text-decoration: none !important;
	font-size: 0.9375em;
}

.fc-color-single__range-link:hover {
	background: #e7e7e7;
}

.fc-color-single__intro {
	font-size: 1.0625em;
	line-height: 1.6;
	color: #333;
	margin: 0 0 1.5em;
}
.fc-color-single__intro code {
	background: #f5f5f5;
	padding: 0.1em 0.4em;
	border-radius: 3px;
	font-size: 0.9em;
	color: #222;
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.fc-color-single__image { margin: 1.5em 0; }
.fc-color-single__image img { max-width: 100%; height: auto; }

.fc-color-single__purchase { margin: 1.5em 0; font-size: 1em; }

.fc-color-single__notes {
	font-size: 0.9375em;
	color: #666;
	margin-top: 1.5em;
	padding-top: 1em;
	border-top: 1px solid #eee;
}

/* ------------------------------------------------------------------------ *
 * Breadcrumbs
 * ------------------------------------------------------------------------ */
.fc-breadcrumbs {
	font-size: 0.9375em;
	color: #777;
	margin: 0 0 1.5em;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4em;
	line-height: 1.4;
}
.fc-breadcrumbs a {
	color: #555;
	text-decoration: none;
}
.fc-breadcrumbs a:hover {
	color: #111;
	text-decoration: underline;
}
.fc-breadcrumbs__sep {
	color: #bbb;
}

/* ------------------------------------------------------------------------ *
 * Color values table (Hex / RGB / HSL / CMYK)
 * ------------------------------------------------------------------------ */
.fc-values {
	margin: 1.5em 0;
	padding: 1em 1.25em;
	background: #fafafa;
	border-radius: 6px;
}
.fc-values__heading {
	font-size: 0.875em;
	font-weight: 600;
	margin: 0 0 0.75em;
	color: #222;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.fc-values__list {
	margin: 0;
	display: grid;
	gap: 0.4em;
}
.fc-values__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1em;
	padding: 0;
}
.fc-values__label {
	font-size: 0.9375em;
	color: #666;
	margin: 0;
	font-weight: 500;
}
.fc-values__value {
	margin: 0;
	font-size: 0.9375em;
}
.fc-values__value code {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	background: transparent;
	color: #222;
}

/* ------------------------------------------------------------------------ *
 * Color harmonies grid
 * ------------------------------------------------------------------------ */
.fc-harmonies {
	margin: 3em 0 2em;
	padding-top: 2em;
	border-top: 1px solid #eee;
}
.fc-harmonies__heading {
	font-size: 1.375em;
	font-weight: 600;
	margin: 0 0 1.5em;
	color: #222;
	line-height: 1.3;
}
.fc-harmonies__groups {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.5em;
}
.fc-harmonies__group { min-width: 0; }
.fc-harmonies__label {
	font-size: 0.8125em;
	color: #777;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 0.6em;
	font-weight: 600;
}
.fc-harmonies__swatches {
	display: flex;
	gap: 0.6em;
	flex-wrap: wrap;
}
.fc-harmonies__swatch {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3em;
	text-decoration: none;
	color: inherit;
}
.fc-harmonies__swatch:hover { text-decoration: none; color: inherit; }
.fc-harmonies__swatch-chip {
	width: 64px;
	height: 64px;
	border-radius: 6px;
	border: 1px solid rgba(0,0,0,0.08);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
	display: block;
}
.fc-harmonies__swatch:hover .fc-harmonies__swatch-chip {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}
.fc-harmonies__swatch-code {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.8125em;
	color: #555;
	font-weight: 600;
}

/* ------------------------------------------------------------------------ *
 * Best uses + Mixing tips
 * ------------------------------------------------------------------------ */
.fc-best-uses,
.fc-mixing {
	margin: 2em 0;
}
.fc-best-uses__heading,
.fc-mixing__heading {
	font-size: 1.375em;
	font-weight: 600;
	margin: 0 0 0.75em;
	color: #222;
	line-height: 1.3;
}
.fc-best-uses__text,
.fc-mixing__text {
	font-size: 1.0625em;
	line-height: 1.6;
	color: #333;
	margin: 0;
}

/* ------------------------------------------------------------------------ *
 * FAQ accordion (native <details>)
 * ------------------------------------------------------------------------ */
.fc-faq {
	margin: 3em 0 2em;
	padding-top: 2em;
	border-top: 1px solid #eee;
}
.fc-faq__heading {
	font-size: 1.375em;
	font-weight: 600;
	margin: 0 0 1.25em;
	color: #222;
	line-height: 1.3;
}
.fc-faq__list {
	display: grid;
	gap: 0.4em;
}
.fc-faq__item {
	border: 1px solid #ececec;
	border-radius: 6px;
	background: #fff;
	overflow: hidden;
}
.fc-faq__item[open] {
	box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.fc-faq__q {
	font-weight: 600;
	font-size: 1.0625em;
	color: #222;
	padding: 1em 1.2em;
	padding-right: 2.5em;
	cursor: pointer;
	list-style: none;
	position: relative;
	user-select: none;
	line-height: 1.4;
}
.fc-faq__q::-webkit-details-marker { display: none; }
.fc-faq__q::after {
	content: '+';
	position: absolute;
	right: 1em;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.4em;
	color: #999;
	line-height: 1;
	transition: transform 0.18s ease;
}
.fc-faq__item[open] .fc-faq__q::after {
	content: '−';
}
.fc-faq__a {
	padding: 0 1.2em 1em;
	font-size: 1em;
	line-height: 1.55;
	color: #444;
}

/* ------------------------------------------------------------------------ *
 * Related markers strip on single page
 * ------------------------------------------------------------------------ */
.fc-related {
	font-size: 14px;
	line-height: 1.45;
	margin: 3em 0 1em;
	padding-top: 2em;
	border-top: 1px solid #eee;
}
.fc-related__heading {
	font-size: 1.6em;
	font-weight: 600;
	margin: 0 0 1.25em;
	color: #222;
	line-height: 1.3;
}
.fc-related__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 0.85em;
}
.fc-related__item { margin: 0; padding: 0; }
.fc-related__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4em;
	padding: 0.85em 0.6em;
	border: 1px solid #ececec;
	border-radius: 6px;
	background: #fff;
	text-decoration: none;
	color: inherit;
	transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.fc-related__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	text-decoration: none;
	color: inherit;
}
.fc-related__marker { width: 100%; display: flex; justify-content: center; }
.fc-related__meta   { display: flex; flex-direction: column; align-items: center; gap: 0.15em; }
.fc-related__code   { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 700; font-size: 0.9375em; color: #222; }
.fc-related__name   { font-size: 1em; color: #555; text-align: center; line-height: 1.25; }

/* ------------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------------ */
@media (max-width: 600px) {
	.fc-color-single,
	.fc-range-archive {
		font-size: 15px; /* slight tightening on small screens */
	}
	.fc-palette,
	.fc-related {
		font-size: 13px;
	}

	.fc-palette__grid {
		grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
	}

	.fc-range-archive__title { font-size: 2em; }
	.fc-range-archive__grid  { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75em; }
	.fc-range-archive__link  { padding: 0.85em 0.5em; }

	.fc-color-single__name { font-size: 1.75em; }

	.fc-harmonies__groups { grid-template-columns: 1fr 1fr; gap: 1em; }
	.fc-harmonies__swatch-chip { width: 50px; height: 50px; }
	.fc-values__row { flex-direction: column; align-items: flex-start; gap: 0.1em; }

	.fc-related__grid { grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); }
}

/* ------------------------------------------------------------------------ *
 * Palette page (page-palette.php template — full-width catalogue)
 * ------------------------------------------------------------------------ */
.fc-palette-page-wrap {
	padding: 2em 0 4em;
}

.fc-palette-page {
	font-size: 16px;
	line-height: 1.55;
	color: #2a2a2a;
}

.fc-palette-page .fc-breadcrumbs {
	margin: 0 0 1.25em;
}

.fc-palette-page__header {
	margin: 0 0 0.75em;
}

.fc-palette-page__title {
	font-size: 2.5em;
	font-weight: 700;
	margin: 0;
	color: #111;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.fc-palette-page__intro {
	max-width: 50em;
	font-size: 1em;
	color: #555;
	margin: 0.75em 0 0;
}

/* Table of contents — chip nav linking to each range section. */
.fc-palette-toc {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin: 1.5em 0 2.5em;
	padding: 1em 1.25em;
	background: #fafafa;
	border: 1px solid #ececec;
	border-radius: 10px;
}

.fc-palette-toc__chip {
	display: inline-flex;
	align-items: center;
	gap: 0.55em;
	padding: 0.55em 1em;
	border-radius: 999px;
	background: #fff;
	border: 1px solid #e2e2e2;
	font-size: 0.95em;
	color: #222 !important;
	text-decoration: none !important;
	line-height: 1.2;
	transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}

.fc-palette-toc__chip:hover {
	border-color: #999;
	background: #f5f5f5;
	transform: translateY(-1px);
}

.fc-palette-toc__name {
	font-weight: 600;
}

.fc-palette-toc__count {
	background: #efefef;
	color: #555;
	padding: 0.15em 0.55em;
	border-radius: 999px;
	font-size: 0.85em;
	font-weight: 600;
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* Section breaks: each H2 inside post content becomes a range header. */
.fc-palette-page__content > h2.wp-block-heading {
	font-size: 1.875em;       /* 30px */
	font-weight: 700;
	margin: 3em 0 1.25em;
	padding-top: 1.75em;
	border-top: 2px solid #f0f0f0;
	color: #111;
	line-height: 1.2;
	letter-spacing: -0.005em;
	scroll-margin-top: 100px; /* anchor-jump offset for sticky header */
}

.fc-palette-page__content > h2.wp-block-heading:first-of-type {
	margin-top: 1em;
	padding-top: 0;
	border-top: none;
}

/* Slightly more breathing room around the palette block on this page. */
.fc-palette-page__content > .fc-palette,
.fc-palette-page__content > .wp-block-fc-palette {
	margin: 0 0 2em;
}

/* Roomier swatch grid on the catalogue page — we have the full container. */
.fc-palette-page__content .fc-palette__grid {
	grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	gap: 0.75em;
}

/* Intro paragraph that the content opens with — give it a touch of size. */
.fc-palette-page__content > p:first-of-type {
	font-size: 1.0625em;
	color: #444;
	max-width: 52em;
	margin: 0 0 1.5em;
}

.fc-palette-page__back-to-top {
	margin: 3em 0 0;
	text-align: center;
	font-size: 0.9375em;
}

.fc-palette-page__back-to-top a {
	color: #555;
	text-decoration: none;
	padding: 0.5em 1em;
	border: 1px solid #e2e2e2;
	border-radius: 999px;
	transition: border-color 0.12s ease;
}

.fc-palette-page__back-to-top a:hover {
	border-color: #999;
	color: #111;
	text-decoration: none;
}

/* Responsive */
@media (max-width: 600px) {
	.fc-palette-page {
		font-size: 15px;
	}
	.fc-palette-page__title {
		font-size: 2em;
	}
	.fc-palette-page__content > h2.wp-block-heading {
		font-size: 1.5em;
		margin-top: 2em;
		padding-top: 1.25em;
	}
	.fc-palette-toc {
		padding: 0.75em 0.85em;
		gap: 0.4em;
	}
	.fc-palette-toc__chip {
		padding: 0.45em 0.8em;
		font-size: 0.9em;
	}
}
