/*
 * components.css — TCG Mart London Design System
 * Individual UI components. Depends on tokens.css + base.css.
 * All 12 design-system components. Phases 3–4.
 */


/* ════════════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════════════ */

.btn {
	display: inline-flex;
	align-items: center;
	gap: var(--s-2);
	font-family: var(--sans);
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	padding: 10px 16px;
	border-radius: var(--r-pill);
	border: 1px solid var(--ink);
	background: var(--ink);
	color: var(--paper);
	cursor: pointer;
	text-decoration: none;
	transition: background var(--t-micro), border-color var(--t-micro), color var(--t-micro), transform var(--t-micro), box-shadow var(--t-micro);
	white-space: nowrap;
}

/* Hover: no lift — no fill, no colour change */
html .btn:hover,
html .btn:focus-visible {
	box-shadow: var(--shadow-hover);
}

.btn--primary {
	/* inherits .btn defaults */
}

.btn--secondary {
	background: transparent;
	color: var(--ink);
}

html .btn--secondary:hover,
html .btn--secondary:focus-visible {
	box-shadow: var(--shadow-hover);
}

.btn--ghost {
	background: transparent;
	color: var(--ink);
	border-color: var(--line-2);
}

html .btn--ghost:hover,
html .btn--ghost:focus-visible {
	box-shadow: var(--shadow-hover);
}

.btn:disabled,
.btn[aria-disabled="true"] {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}


/* ════════════════════════════════════════════════════════════
   GLOBAL NAVIGATION
════════════════════════════════════════════════════════════ */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	height: var(--nav-h);
	background: color-mix(in oklch, var(--paper) 92%, transparent);
	backdrop-filter: saturate(140%) blur(10px);
	-webkit-backdrop-filter: saturate(140%) blur(10px);
	border-bottom: 1px solid var(--line);
	transition: height var(--t-micro);
}

.nav-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
	gap: var(--s-5);
}

/* ── Brand ── */
.nav-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--sans);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--ink);
	text-decoration: none;
	flex-shrink: 0;
}

.nav-brand__mark {
	display: block;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background:
		radial-gradient(
			circle at 50% 50%,
			var(--paper)    0    22%,
			var(--ink)      22%  30%,
			var(--paper)    30%  48%,
			var(--ink)      48%  100%
		);
	flex-shrink: 0;
	transition: width var(--t-micro), height var(--t-micro);
}

/* Brand mark shrinks after scroll */
.site-header.is-scrolled .nav-brand__mark {
	width: 18px;
	height: 18px;
}

/* ── Desktop nav links ── */
.nav-primary {
	flex: 1;
}

.nav-primary__list,
.mobile-menu__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-primary__list {
	display: flex;
	gap: 28px;
}

.nav-primary__list li a {
	font-size: 13.5px;
	color: var(--ink-2);
	text-decoration: none;
	padding-bottom: 2px;
	transition: color var(--t-micro);
	position: relative;
}

.nav-primary__list li a:hover {
	color: var(--ink);
}

/* Active page underline */
.nav-primary__list li.current-menu-item > a,
.nav-primary__list li.current-page-ancestor > a {
	color: var(--ink);
	border-bottom: 1px solid var(--ink);
	padding-bottom: 3px;
}

/* ── Desktop actions ── */
.nav-actions {
	display: flex;
	align-items: center;
	gap: var(--s-3);
	flex-shrink: 0;
}

/* ── Mobile toggle — hidden on desktop ── */
.nav-toggle {
	display: none;
	background: none;
	border: none;
	padding: var(--s-2);
	cursor: pointer;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.14em;
	color: var(--ink);
}

/* ── Header cap spacer ── */
.header-cap {
	height: var(--nav-h);
}


/* ════════════════════════════════════════════════════════════
   MOBILE MENU OVERLAY
════════════════════════════════════════════════════════════ */

.mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 200;
	background: var(--paper);
	transform: translateX(100%);
	transition: transform 250ms cubic-bezier(.2,.7,.2,1);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.mobile-menu[aria-hidden="false"] {
	transform: translateX(0);
}

/* Prevent scroll on body while menu is open */
body.menu-open {
	overflow: hidden;
}

.mobile-menu__inner {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	padding: var(--s-5);
}

.mobile-menu__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: var(--s-7);
	border-bottom: 1px solid var(--line);
	margin-bottom: var(--s-7);
}

.mobile-menu__close {
	background: none;
	border: none;
	font-size: 20px;
	color: var(--ink-3);
	cursor: pointer;
	padding: var(--s-2);
	line-height: 1;
	transition: color var(--t-micro);
}

.mobile-menu__close:hover {
	color: var(--ink);
}

.mobile-menu__nav {
	flex: 1;
}

.mobile-menu__list {
	display: flex;
	flex-direction: column;
	gap: var(--s-5);
}

.mobile-menu__list li a {
	font-size: clamp(28px, 6vw, 40px);
	font-weight: 600;
	letter-spacing: -0.025em;
	color: var(--ink);
	text-decoration: none;
	line-height: 1.1;
	transition: color var(--t-micro);
}

.mobile-menu__list li a:hover {
	color: var(--amber-deep);
}

.mobile-menu__cta {
	margin-top: var(--s-7);
	align-self: flex-start;
}


/* ════════════════════════════════════════════════════════════
   SITE FOOTER
════════════════════════════════════════════════════════════ */

.site-footer {
	padding-block: 60px 80px;
	border-top: 1px solid var(--ink);
}

.footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: var(--s-6);
	padding-bottom: var(--s-7);
	border-bottom: 1px solid var(--line);
}

/* Col 1 — brand */
.footer-brand__logo {
	margin-bottom: var(--s-3);
}

.footer-brand__desc {
	font-size: 13.5px;
	color: var(--ink-3);
	max-width: 36ch;
	margin: var(--s-3) 0 0;
	line-height: 1.55;
}

/* Cols 2–4 */
.footer-col__heading {
	margin-bottom: var(--s-4);
}

.footer-col__list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: var(--s-3);
}

.footer-col__list a {
	font-size: 13.5px;
	color: var(--ink-2);
	text-decoration: none;
	transition: color var(--t-micro);
}

.footer-col__list a:hover {
	color: var(--ink);
}

/* Base row */
.footer-base {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--s-5);
	padding-top: var(--s-5);
}

.footer-base__copy,
.footer-base__credit {
	color: var(--ink-4);
}


/* ════════════════════════════════════════════════════════════
   RESPONSIVE OVERRIDES
════════════════════════════════════════════════════════════ */

@media (max-width: 1023px) {
	.footer-grid {
		grid-template-columns: 1fr 1fr;
	}
	.footer-brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 767px) {
	/* Nav: show toggle, hide desktop nav + search */
	.site-header {
		height: var(--nav-h-mob);
	}
	.header-cap {
		height: var(--nav-h-mob);
	}
	.nav-primary,
	.nav-search {
		display: none;
	}
	.nav-toggle {
		display: flex;
	}
	/* Hide Subscribe button in header on mobile (it's in the menu) */
	.nav-actions .btn--primary {
		display: none;
	}

	/* Footer stacks to single column */
	.footer-grid {
		grid-template-columns: 1fr;
	}
	.footer-base {
		flex-direction: column;
		align-items: flex-start;
	}
}


/* ════════════════════════════════════════════════════════════
   03 · BADGES & PILLS
════════════════════════════════════════════════════════════ */

.badge {
	display: inline-flex;
	align-items: center;
	gap: var(--s-2);
	padding: 4px 10px;
	border-radius: var(--r-pill);
	border: 1px solid var(--line);
	background: var(--paper-2);
	color: var(--ink-2);
	font-family: var(--mono);
	font-size: 11.5px;
	font-weight: 400;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1;
	white-space: nowrap;
}

.badge--amber {
	background: var(--amber-soft);
	border-color: var(--amber-soft);
	color: var(--amber-deep);
}

.badge--ink {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--paper);
}

.badge--ok {
	background: var(--ok-soft);
	border-color: var(--ok-soft);
	color: var(--ok-deep);
}

/* Status dot — decorative only, used inside badges */
.badge__dot {
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	flex-shrink: 0;
}


/* ════════════════════════════════════════════════════════════
   04 · COLLECTION CARD
════════════════════════════════════════════════════════════ */

.card-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--s-4);
}

.col-card {
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	overflow: hidden;
	background: var(--paper);
	transition: transform var(--t-card), box-shadow var(--t-card), border-color var(--t-card);
	display: flex;
	flex-direction: column;
}

.col-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-hover);
	border-color: var(--ink);
}

/* Wrap the whole card in a link */
.col-card a.col-card__link {
	display: flex;
	flex-direction: column;
	flex: 1;
	color: inherit;
	text-decoration: none;
}

/* Image well — locked to card's 2.5:3.5 aspect ratio */
.col-card__img {
	aspect-ratio: 2.5 / 3.5;
	background: repeating-linear-gradient(
		45deg,
		var(--paper-2) 0 10px,
		var(--paper-3) 10px 20px
	);
	border-bottom: 1px solid var(--line);
	position: relative;
	overflow: hidden;
}

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

/* Grade chip — bottom-left of image */
.col-card__grade {
	position: absolute;
	bottom: 10px;
	left: 10px;
	background: var(--ink);
	color: var(--paper);
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.06em;
	padding: 3px 7px;
	border-radius: var(--r-xs);
	line-height: 1;
}

/* Meta below image */
.col-card__meta {
	padding: 12px 14px 14px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.col-card__name {
	font-weight: 600;
	font-size: 14px;
	letter-spacing: -0.01em;
	color: var(--ink);
	line-height: 1.2;
}

.col-card__set {
	font-family: var(--mono);
	font-size: 10.5px;
	color: var(--ink-3);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-top: var(--s-1);
}

/* Price row — value and delta share a baseline */
.col-card__price {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-top: auto;
	padding-top: var(--s-3);
	font-size: 13px;
	font-variant-numeric: tabular-nums;
}

.col-card__price-value {
	font-weight: 600;
	color: var(--ink);
}

.col-card__price-delta {
	font-family: var(--mono);
	font-size: 11px;
	color: var(--ok);
}

/* Focus visible on the card link */
.col-card a.col-card__link:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 4px;
	border-radius: var(--r-md);
}

@media (max-width: 1023px) {
	.card-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 767px) {
	.card-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: var(--s-3);
	}
}


/* ════════════════════════════════════════════════════════════
   05 · GUIDE ROW
════════════════════════════════════════════════════════════ */

.guide-list {
	border-top: 1px solid var(--ink);
}

.guide-row {
	display: grid;
	grid-template-columns: 60px 1fr 140px 100px 48px;
	gap: var(--s-5);
	align-items: center;
	padding: 18px 0;
	border-bottom: 1px solid var(--line);
	text-decoration: none;
	color: inherit;
	transition: padding-left var(--t-micro);
}

.guide-row:hover {
	padding-left: var(--s-2);
}

.guide-row:hover .guide-row__arrow {
	transform: translateX(4px);
	color: var(--amber-deep);
}

.guide-row:hover .guide-row__title {
	color: var(--amber-deep);
}

.guide-row:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 0;
}

.guide-row__num {
	font-family: var(--mono);
	font-size: 12px;
	color: var(--ink-4);
	font-variant-numeric: tabular-nums;
}

.guide-row__body {
	min-width: 0;
}

.guide-row__title {
	font-weight: 600;
	font-size: 16px;
	letter-spacing: -0.012em;
	color: var(--ink);
	line-height: 1.2;
	transition: color var(--t-micro);
}

.guide-row__dek {
	color: var(--ink-3);
	font-size: 13px;
	margin-top: 3px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.guide-row__tag {
	font-family: var(--mono);
	font-size: 11px;
	color: var(--ink-3);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.3;
}

.guide-row__time {
	font-family: var(--mono);
	font-size: 12px;
	color: var(--ink-3);
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.guide-row__arrow {
	font-family: var(--mono);
	color: var(--ink-3);
	text-align: right;
	transition: transform var(--t-micro), color var(--t-micro);
}

/* Mobile: collapse to two-column */
@media (max-width: 767px) {
	.guide-row {
		grid-template-columns: 36px 1fr 36px;
		gap: var(--s-3);
	}
	.guide-row__tag,
	.guide-row__time {
		display: none;
	}
	.guide-row__dek {
		white-space: normal;
	}
}


/* ════════════════════════════════════════════════════════════
   GUIDE FEATURED  (homepage lead article block — parts/guide-list.php)
════════════════════════════════════════════════════════════ */

.guide-featured {
	display: flex;
	flex-direction: column;
	gap: var(--s-4);
}

.guide-featured__topic {
	align-self: flex-start;
}

/* Title is an <a> — remove default link underline */
.guide-featured__title {
	font-size: 34px;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.18;
	color: var(--ink);
	text-decoration: none;
	display: block;
	transition: color var(--t-micro);
}

.guide-featured__title:hover {
	color: var(--amber-deep);
}

.guide-featured__excerpt {
	color: var(--ink-2);
	font-size: 15px;
	max-width: 44ch;
	line-height: 1.55;
	margin: 0;
}

.guide-featured__time {
	font-family: var(--mono);
	font-size: 12px;
	color: var(--ink-3);
	margin: 0;
}


/* ════════════════════════════════════════════════════════════
   06 · DATA TABLE
════════════════════════════════════════════════════════════ */

.data-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
	font-variant-numeric: tabular-nums;
}

.data-table thead th {
	text-align: left;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-3);
	font-weight: 500;
	padding: 0 var(--s-4) 10px;
	border-bottom: 1px solid var(--ink);
	white-space: nowrap;
}

.data-table tbody td {
	padding: 12px var(--s-4);
	border-bottom: 1px solid var(--line);
	color: var(--ink-2);
	vertical-align: middle;
}

.data-table tbody tr:hover td {
	background: var(--paper-2);
}

.data-table tbody tr:last-child td {
	border-bottom: none;
}

/* Cell modifiers */
.data-table td.cell--key {
	font-family: var(--mono);
	color: var(--ink);
	white-space: nowrap;
}

.data-table td.cell--muted {
	color: var(--ink-3);
}

.data-table td.cell--ok {
	font-family: var(--mono);
	color: var(--ok);
}

.data-table th:first-child,
.data-table td:first-child {
	padding-left: 0;
}

/* Responsive: scroll horizontally on small screens */
.data-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}


/* ════════════════════════════════════════════════════════════
   07 · FORMS & FILTERS
════════════════════════════════════════════════════════════ */

.field {
	display: flex;
	flex-direction: column;
	gap: var(--s-2);
}

.field__label {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.field__input,
.field__select,
.field__textarea {
	padding: 10px 14px;
	border-radius: var(--r-md);
	border: 1px solid var(--line-2);
	background: var(--paper);
	font-family: var(--sans);
	font-size: 14px;
	color: var(--ink);
	line-height: 1.4;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color var(--t-micro), box-shadow var(--t-micro);
	width: 100%;
}

.field__input::placeholder,
.field__textarea::placeholder {
	color: var(--ink-4);
}

.field__input:hover,
.field__select:hover,
.field__textarea:hover {
	border-color: var(--ink-3);
}

.field__input:focus,
.field__select:focus,
.field__textarea:focus {
	outline: none;
	border-color: var(--ink);
	box-shadow: 0 0 0 3px var(--amber-soft);
}

/* Filter bar — horizontal row of controls */
.filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-3);
	align-items: center;
}

.filter-bar .field__input,
.filter-bar .field__select {
	width: auto;
	min-width: 160px;
}

/* Results count badge inside filter bar */
.filter-bar .badge {
	flex-shrink: 0;
}

@media (max-width: 767px) {
	.filter-bar {
		flex-direction: column;
		align-items: stretch;
	}
	.filter-bar .field__input,
	.filter-bar .field__select {
		width: 100%;
	}
}


/* ════════════════════════════════════════════════════════════
   08 · EDITORIAL PULL-QUOTE
════════════════════════════════════════════════════════════ */

.pull-quote {
	font-family: var(--serif);
	font-style: italic;
	font-weight: 400;
	font-size: clamp(20px, 3vw, 28px);
	line-height: 1.3;
	color: var(--ink);
	border-left: 2px solid var(--amber);
	padding: 4px 0 4px 20px;
	margin: var(--s-7) 0;
	max-width: 56ch;
}

.pull-quote cite {
	display: block;
	font-family: var(--mono);
	font-style: normal;
	font-size: 11px;
	color: var(--ink-3);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin-top: var(--s-3);
}


/* ════════════════════════════════════════════════════════════
   09 · STAT BLOCK
════════════════════════════════════════════════════════════ */

.stat-strip {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	border-top: 1px solid var(--ink);
	border-bottom: 1px solid var(--line);
}

.stat-cell {
	padding: 20px 24px 20px 0;
	border-right: 1px dashed var(--line);
}

.stat-cell:last-child {
	border-right: none;
	padding-right: 0;
}

.stat-cell__label {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-bottom: var(--s-2);
}

.stat-cell__value {
	font-size: clamp(28px, 4vw, 34px);
	font-weight: 600;
	letter-spacing: -0.025em;
	color: var(--ink);
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

@media (max-width: 767px) {
	.stat-strip {
		grid-template-columns: 1fr 1fr;
	}
	.stat-cell:nth-child(2) {
		border-right: none;
	}
	.stat-cell {
		padding: 16px 0;
		border-right: none;
		border-bottom: 1px dashed var(--line);
	}
	.stat-cell:nth-last-child(-n+2) {
		border-bottom: none;
	}
}


/* ════════════════════════════════════════════════════════════
   10 · BREADCRUMB
════════════════════════════════════════════════════════════ */

.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--s-2);
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-3);
	padding: var(--s-4) 0;
}

.breadcrumb a {
	color: var(--ink-3);
	text-decoration: none;
	transition: color var(--t-micro);
}

.breadcrumb a:hover {
	color: var(--ink);
}

.breadcrumb__sep {
	color: var(--line-2);
	user-select: none;
}

.breadcrumb__current {
	color: var(--ink);
}


/* ════════════════════════════════════════════════════════════
   11 · TABS
════════════════════════════════════════════════════════════ */

.tabs {
	display: flex;
	flex-direction: column;
}

.tabs__nav {
	display: flex;
	gap: var(--s-5);
	border-bottom: 1px solid var(--line);
	padding: 0 4px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.tabs__nav::-webkit-scrollbar {
	display: none;
}

.tabs__tab {
	padding: 14px 0;
	font-size: 14px;
	font-weight: 500;
	color: var(--ink-3);
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	cursor: pointer;
	white-space: nowrap;
	transition: color var(--t-micro), border-color var(--t-micro);
}

.tabs__tab:hover {
	color: var(--ink-2);
}

.tabs__tab[aria-selected="true"],
.tabs__tab.is-active {
	color: var(--ink);
	border-bottom-color: var(--ink);
}

.tabs__panel {
	padding-top: var(--s-6);
}

.tabs__panel[hidden] {
	display: none;
}


/* ════════════════════════════════════════════════════════════
   SET GRID + SET CARD  (/collection/sets browse page)
════════════════════════════════════════════════════════════ */

/*
  Usage:
  <div class="set-grid">
    <a class="set-card" href="/collection/sets/base-set">
      <div class="set-img">
        <img src="…" alt="…" loading="lazy" decoding="async">
        <span class="set-img__era">1999 · Classic</span>
      </div>
      <div class="set-meta">
        <div>
          <div class="set-name">Base Set</div>
          <div class="set-sub">102 cards · 1999</div>
        </div>
        <div class="set-stats">
          <span class="set-stats__value">£8,420</span>
          <span>87% complete</span>
        </div>
        <div class="set-progress" style="--pct: 87%"></div>
      </div>
    </a>
    …
  </div>
*/

.set-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--s-6);
}

@media (max-width: 600px) {
	.set-grid { grid-template-columns: 1fr; }
}

.set-card {
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	overflow: hidden;
	background: var(--paper);
	transition: transform var(--t-card), box-shadow var(--t-card), border-color var(--t-card);
	display: block;
	text-decoration: none;
	position: relative;
}

.set-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-hover);
	border-color: var(--ink);
}

.set-card:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 4px;
}

.set-img {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--paper-2);
	border-bottom: 1px solid var(--line);
	position: relative;
}

.set-img img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Era chip — bottom-left of the image well */
.set-img__era {
	position: absolute;
	bottom: 12px;
	left: 12px;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	background: var(--overlay);
	color: var(--paper);
	padding: 4px 8px;
	border-radius: var(--r-xs);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	z-index: 1;
}

/* 2-col grid: name+sub left, stats right; progress spans both */
.set-meta {
	padding: 18px 22px 20px;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: var(--s-3);
	align-items: end;
}

.set-name {
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.15;
	color: var(--ink);
	margin: 0;
}

.set-sub {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-top: 6px;
}

.set-stats {
	text-align: right;
	font-size: 13px;
	color: var(--ink-3);
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
}

.set-stats__value {
	color: var(--ink);
	font-weight: 500;
	font-size: 14px;
}

/* Spans both meta columns; fill via child <i style="width:X%"> */
.set-progress {
	grid-column: 1 / -1;
	height: 3px;
	border-radius: 999px;
	background: var(--paper-3);
	overflow: hidden;
	margin-top: var(--s-2);
}

.set-progress > i {
	display: block;
	height: 100%;
	background: var(--ink);
	border-radius: 999px;
}

/* ── Era-tinted image placeholders (shown when no featured image) ── */

/* Era placeholder patterns — all on paper/ink palette, no second hue */

.set-img.era-classic::before {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(45deg,
		var(--paper-3) 0 14px,
		var(--paper-2) 14px 28px);
}

.set-img.era-modern::before {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(45deg,
		var(--paper-4) 0 14px,
		var(--paper-3) 14px 28px);
}

.set-img.era-special::before {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(45deg,
		var(--amber-soft) 0 14px,
		var(--paper-2) 14px 28px);
}

/* ── Sequence badge — top-right of card ── */

.set-card__seq {
	position: absolute;
	top: 14px;
	right: 16px;
	z-index: 3;
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.12em;
	color: var(--ink-3);
	pointer-events: none;
}

/* ── Corner era-type tag — top-left of image ── */

.set-img__corner {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	background: var(--paper);
	color: var(--ink);
	padding: 3px 8px;
	border-radius: var(--r-xs);
	border: 1px solid var(--line);
}

/* ── Placeholder label — centred in image well when no photo ── */

.set-img__placeholder {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ink-4);
	background: color-mix(in oklch, var(--paper) 70%, transparent);
	padding: 5px 10px;
	border-radius: var(--r-xs);
	border: 1px dashed var(--line-2);
	white-space: nowrap;
	pointer-events: none;
}

/* ── Set body — replaces .set-meta in set-grid.php ── */

.set-body {
	padding: 20px 22px 22px;
}

.set-top {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 16px;
	align-items: start;
}

/* ── Progress row: bar + percentage label side-by-side ── */

.set-progress-row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 14px;
	align-items: center;
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px dashed var(--line);
}

/* Reset the .set-meta grid-column span when progress is inside .set-body */
.set-body .set-progress {
	grid-column: auto;
	margin-top: 0;
}

.set-body .set-progress > i {
	display: block;
	height: 100%;
	background: var(--ink);
	border-radius: 999px;
}

.set-progress__pct {
	font-family: var(--mono);
	font-size: 11px;
	color: var(--ink-3);
	min-width: 7ch;
	text-align: right;
	white-space: nowrap;
}

.set-progress__pct strong {
	color: var(--ink);
	font-weight: 500;
}

/* ── Sets archive: hero 2-column layout ── */

.sets-hero-row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 48px;
	align-items: end;
	padding-top: var(--s-3);
}

.sets-hero-stat {
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	padding: 18px 24px;
	background: var(--paper);
	min-width: 200px;
	flex-shrink: 0;
}

.sets-hero-stat__k {
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-bottom: 8px;
}

.sets-hero-stat__v {
	font-size: 28px;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}

/* ── Sets archive: era chip filter strip ── */

.sets-controls {
	border-bottom: 1px solid var(--line);
}

.sets-controls__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 0;
	gap: 24px;
	flex-wrap: wrap;
}

.sets-filter-group {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.sets-filter-label {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-3);
}

@media (max-width: 800px) {
	.sets-hero-row {
		grid-template-columns: 1fr;
		gap: var(--s-6);
	}
	.sets-controls__row {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--s-4);
	}
}

/* ── Sets archive: 3-column section header ── */

.sets-s-head {
	display: grid;
	grid-template-columns: 200px 1fr auto;
	gap: 32px;
	align-items: end;
	margin-bottom: 36px;
}

.sets-s-meta {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-3);
	text-align: right;
	line-height: 1.7;
}

.sets-s-meta b {
	color: var(--ink);
	font-weight: 500;
}

@media (max-width: 800px) {
	.sets-s-head {
		grid-template-columns: 1fr;
		gap: 8px;
	}
	.sets-s-meta { text-align: left; }
}

/* ── Special Collections grid (.col-grid) ── */

.col-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

@media (max-width: 1000px) { .col-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .col-grid { grid-template-columns: 1fr; } }

.col-card {
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	overflow: hidden;
	background: var(--paper);
	display: flex;
	flex-direction: column;
	text-decoration: none;
	transition: transform var(--t-card), box-shadow var(--t-card), border-color var(--t-card);
}

.col-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 32px -22px oklch(0 0 0 / 0.28);
	border-color: var(--line-2);
}

.col-card:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 4px;
}

.col-img {
	aspect-ratio: 4 / 3;
	position: relative;
	background: var(--paper-2);
	border-bottom: 1px solid var(--line);
	overflow: hidden;
}

.col-img img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Diagonal stripe placeholder shown when no image */
.col-img::before {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(135deg,
		var(--paper-2) 0 12px,
		var(--paper-3) 12px 24px);
}

/* Per-collection tints */
.col-img.tint-a::before { background: repeating-linear-gradient(135deg, oklch(0.94 0.025 55)  0 12px, oklch(0.92 0.03  55)  12px 24px); }
.col-img.tint-b::before { background: repeating-linear-gradient(135deg, oklch(0.94 0.018 80)  0 12px, oklch(0.92 0.022 80)  12px 24px); }
.col-img.tint-c::before { background: repeating-linear-gradient(135deg, oklch(0.94 0.03  70)  0 12px, oklch(0.92 0.025 65)  12px 24px); }
.col-img.tint-d::before { background: repeating-linear-gradient(135deg, oklch(0.95 0.025 95)  0 12px, oklch(0.93 0.03  95)  12px 24px); }
.col-img.tint-e::before { background: repeating-linear-gradient(135deg, oklch(0.94 0.022 75)  0 12px, oklch(0.92 0.018 70)  12px 24px); }
.col-img.tint-f::before { background: repeating-linear-gradient(135deg, oklch(0.94 0.006 70)  0 12px, oklch(0.92 0.008 70)  12px 24px); }
.col-img.tint-g::before { background: repeating-linear-gradient(135deg, oklch(0.94 0.018 60)  0 12px, oklch(0.92 0.014 65)  12px 24px); }

/* Kind tag — top-left of image */
.col-kind {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink);
	background: var(--paper);
	padding: 3px 8px;
	border-radius: var(--r-xs);
	border: 1px solid var(--line);
}

/* Placeholder caption — centred in image when no photo */
.col-img-caption {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ink-4);
	background: color-mix(in oklch, var(--paper) 75%, transparent);
	padding: 4px 9px;
	border-radius: var(--r-xs);
	border: 1px dashed var(--line-2);
	white-space: nowrap;
	pointer-events: none;
}

.col-body {
	padding: 16px 18px 18px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.col-name {
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -0.015em;
	line-height: 1.2;
	color: var(--ink);
	margin: 0;
}

.col-sub {
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-top: 5px;
}

.col-foot {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px dashed var(--line);
	display: flex;
	justify-content: space-between;
	align-items: baseline;
}

.col-foot__v {
	font-size: 15px;
	font-weight: 600;
	letter-spacing: -0.012em;
	color: var(--ink);
}


/* ════════════════════════════════════════════════════════════
   RARITY RAIL  (sticky vertical filter on single-set.php)
════════════════════════════════════════════════════════════ */

/*
  Usage:
  <nav class="rail" aria-label="Filter by rarity">
    <div class="rail-h">Rarity</div>
    <ul>
      <li><a class="rail-item active" href="?">All <span class="rail-item__count">102</span></a></li>
      <li><a class="rail-item" href="?rarity=rare">Rare <span class="rail-item__count">16</span></a></li>
    </ul>
  </nav>
*/

.rail {
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	overflow: hidden;
	background: var(--paper);
}

.rail-h {
	padding: 14px 18px;
	border-bottom: 1px solid var(--line);
	font-family: var(--mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--ink-3);
	background: var(--paper-2);
}

.rail-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	border-bottom: 1px solid var(--line);
	font-size: 14px;
	color: var(--ink-2);
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	transition: padding-left var(--t-micro), color var(--t-micro);
	position: relative;
}

.rail-item:last-child {
	border-bottom: none;
}

.rail-item:hover {
	color: var(--ink);
	padding-left: 22px;
}

.rail-item__count {
	font-family: var(--mono);
	font-size: 11px;
	color: var(--ink-3);
}

.rail-item.active {
	background: var(--ink);
	color: var(--paper);
	padding-left: 22px;
}

.rail-item.active::before {
	content: "";
	position: absolute;
	left: 0;
	top: 12px;
	bottom: 12px;
	width: 3px;
	background: var(--amber);
}

.rail-item.active .rail-item__count {
	color: var(--ink-4);
}

/* Mobile: horizontal scroll strip */
@media (max-width: 800px) {
	.rail {
		display: flex;
		flex-direction: row;
		overflow-x: auto;
		border-radius: var(--r-pill);
		white-space: nowrap;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	.rail::-webkit-scrollbar {
		display: none;
	}
	.rail-h {
		display: none;
	}
	.rail-item {
		border-bottom: none;
		border-right: 1px solid var(--line);
		padding: 10px 16px;
		flex-shrink: 0;
	}
	.rail-item:last-child {
		border-right: none;
	}
	.rail-item__count {
		display: none;
	}
	.rail-item.active::before {
		display: none;
	}
}


/* ════════════════════════════════════════════════════════════
   GROWTH CHART  (server-side SVG shell, collection/set pages)
════════════════════════════════════════════════════════════ */

/*
  Usage:
  <div class="chart">
    <div class="chart-head">
      <div>
        <div class="chart__eyebrow">Collection Growth</div>
        <div class="chart__title">Total Value</div>
      </div>
      <div class="chart__totals">
        <span class="chart__now">£12,400</span>
        <span class="chart__delta">+8.4%</span>
      </div>
      <div class="range-tabs">
        <a class="range-tabs__btn active" href="?range=6m">6M</a>
        <a class="range-tabs__btn" href="?range=1y">1Y</a>
        <a class="range-tabs__btn" href="?range=all">All</a>
      </div>
    </div>
    <svg class="chart__svg" …>
      <line class="chart__grid" …/>
      <polyline class="chart__line" …/>
      <polygon class="chart__area" …/>
      <line class="chart__axis" …/>
    </svg>
  </div>
  Add .chart--compact on the set page for a shorter SVG.
*/

.chart {
	padding: 28px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
}

.chart-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: var(--s-4);
	margin-bottom: var(--s-6);
	flex-wrap: wrap;
}

.chart__eyebrow {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-bottom: var(--s-2);
}

.chart__title {
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -0.015em;
	color: var(--ink);
}

.chart__totals {
	display: flex;
	align-items: baseline;
	gap: var(--s-2);
	flex-shrink: 0;
}

.chart__now {
	font-size: 28px;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}

.chart__delta {
	font-family: var(--mono);
	font-size: 12px;
	color: var(--ok);
	font-variant-numeric: tabular-nums;
}

.chart__delta--neg {
	color: var(--warn);
}

.range-tabs {
	display: flex;
	border: 1px solid var(--line);
	border-radius: var(--r-pill);
	overflow: hidden;
}

.range-tabs__btn {
	font-family: var(--mono);
	font-size: 11px;
	padding: 6px 12px;
	border: none;
	background: none;
	color: var(--ink-3);
	cursor: pointer;
	text-decoration: none;
	transition: background var(--t-micro), color var(--t-micro);
	border-right: 1px solid var(--line);
}

.range-tabs__btn:last-child {
	border-right: none;
}

.range-tabs__btn:hover {
	color: var(--ink);
	background: var(--paper-2);
}

.range-tabs__btn.active {
	background: var(--ink);
	color: var(--paper);
}

/* SVG chart — drawn server-side */
.chart__svg {
	display: block;
	width: 100%;
	height: 280px;
	overflow: visible;
}

.chart__grid {
	stroke: var(--line);
	stroke-width: 1;
	stroke-dasharray: 3 4;
}

.chart__axis {
	stroke: var(--line);
	stroke-width: 1;
}

.chart__area {
	fill: var(--ink);
	opacity: 0.06;
}

.chart__line {
	fill: none;
	stroke: var(--ink);
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.chart__svg text {
	font-family: var(--mono);
	font-size: 9px;
	fill: var(--ink-3);
}

/* Compact variant for set page sidebar */
.chart--compact .chart__svg {
	height: 160px;
}

/* Empty state */
.chart__empty {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 160px;
	font-family: var(--mono);
	font-size: 12px;
	color: var(--ink-4);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}


/* ════════════════════════════════════════════════════════════
   CARD LIST TABLE  (sortable table view on single-set.php)
════════════════════════════════════════════════════════════ */

/*
  Usage:
  <div class="data-table-wrap">
    <table class="card-list-table">
      <thead><tr>
        <th class="card-list-table__num">#</th>
        <th><a href="?sort=name">Name <span class="sortcaret">↕</span></a></th>
        <th>Grade</th>
        <th class="card-list-table__val"><a href="?sort=value">Value <span class="sortcaret">↕</span></a></th>
      </tr></thead>
      <tbody>
        <tr>
          <td class="card-list-table__num">4/102</td>
          <td class="card-list-table__name">Charizard<span class="card-list-table__delta">+12.3%</span></td>
          <td>PSA 9</td>
          <td class="card-list-table__val">£3,200</td>
        </tr>
      </tbody>
    </table>
  </div>
*/

.card-list-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}

.card-list-table thead th {
	text-align: left;
	padding: 12px 16px;
	border-bottom: 1px solid var(--ink);
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-3);
	font-weight: 500;
	white-space: nowrap;
}

.card-list-table .sortcaret {
	color: var(--ink-4);
	margin-left: 4px;
	font-weight: 400;
}

.card-list-table thead th a {
	color: inherit;
	text-decoration: none;
}

.card-list-table thead th a:hover {
	color: var(--ink);
}

.card-list-table tbody td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--line);
}

.card-list-table tbody tr:hover td {
	background: var(--paper-2);
}

.card-list-table__num {
	font-family: var(--mono);
	color: var(--ink-3);
	white-space: nowrap;
	font-size: 13px;
}

.card-list-table__name {
	font-weight: 500;
}

.card-list-table__val {
	font-weight: 600;
	text-align: right;
	white-space: nowrap;
}

.card-list-table__delta {
	font-family: var(--mono);
	font-size: 11px;
	color: var(--ok);
	margin-left: var(--s-2);
	font-weight: 400;
}

.card-list-table__delta--neg {
	color: var(--warn);
}

@media (max-width: 600px) {
	.card-list-table .card-list-table__num {
		display: none;
	}
}


/* ════════════════════════════════════════════════════════════
   LEADERBOARD  (top-value cards table)
════════════════════════════════════════════════════════════ */

/*
  Usage:
  <table class="leaderboard">
    <thead><tr>
      <th>#</th><th>Card</th><th>Grade</th><th>Value</th>
    </tr></thead>
    <tbody>
      <tr class="leaderboard__row leaderboard__row--gold">…</tr>
    </tbody>
  </table>
*/

.leaderboard {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
}

.leaderboard thead th {
	text-align: left;
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--paper);
	background: var(--ink);
	padding: 10px var(--s-4);
}

.leaderboard thead th:first-child {
	border-radius: var(--r-xs) 0 0 0;
}

.leaderboard thead th:last-child {
	border-radius: 0 var(--r-xs) 0 0;
	text-align: right;
}

.leaderboard tbody tr {
	border-bottom: 1px solid var(--line);
	transition: background var(--t-micro);
}

.leaderboard tbody tr:hover {
	background: var(--paper-2);
}

.leaderboard td {
	padding: 11px var(--s-4);
	color: var(--ink-2);
	vertical-align: middle;
}

/* Rank column */
.leaderboard td:first-child {
	font-family: var(--mono);
	font-size: 11px;
	color: var(--ink-3);
	width: 36px;
}

/* Value column */
.leaderboard td:last-child {
	text-align: right;
	font-family: var(--mono);
	font-variant-numeric: tabular-nums;
	color: var(--ink);
	font-weight: 600;
}

/* Top-3 amber rank tint */
.leaderboard__row--gold td:first-child   { color: var(--amber-deep); font-weight: 700; }
.leaderboard__row--silver td:first-child { color: var(--ink-2);      font-weight: 600; }
.leaderboard__row--bronze td:first-child { color: var(--ink-3);      font-weight: 600; }

/* Card thumbnail inside table */
.leaderboard__thumb {
	display: flex;
	align-items: center;
	gap: var(--s-3);
}

.leaderboard__thumb img {
	width: 32px;
	height: 44px;
	object-fit: cover;
	border-radius: 3px;
	border: 1px solid var(--line);
}


/* ════════════════════════════════════════════════════════════
   PHOTO GRID  (card-photos view on single-set.php)
════════════════════════════════════════════════════════════ */

/*
  Usage:
  <div class="photo-grid">
    <a class="photo-tile" href="…">
      <img src="…" alt="…">
      <span class="photo-tile__num">166/165</span>
    </a>
    …
  </div>
*/

.photo-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--s-4);
}

.photo-tile {
	position: relative;
	display: block;
	aspect-ratio: 2.5 / 3.5;
	overflow: hidden;
	border-radius: var(--r-xs);
	border: 1px solid var(--line);
	background: var(--paper-2);
	text-decoration: none;
	transition: box-shadow var(--t-card), transform var(--t-card);
}

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

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

/* Card number chip — bottom-left corner */
.photo-tile__num {
	position: absolute;
	bottom: var(--s-2);
	left: var(--s-2);
	font-family: var(--mono);
	font-size: 10px;
	color: var(--ink-2);
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--r-xs);
	padding: 2px 5px;
	line-height: 1.4;
}

@media (max-width: 767px) {
	.photo-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: var(--s-3);
	}
}

@media (max-width: 480px) {
	.photo-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}


/* ════════════════════════════════════════════════════════════
   GUIDE ARTICLE  (single-guide.php)
════════════════════════════════════════════════════════════ */

/*
  Usage:
  <article class="guide-article">
    <header class="guide-header">
      <span class="badge badge--amber">Grading</span>
      <h1 class="guide-header__title">…</h1>
      <div class="guide-meta">
        <span class="guide-meta__date">12 Jan 2025</span>
        <span class="guide-meta__sep" aria-hidden="true">·</span>
        <span class="guide-meta__time">8 min read</span>
      </div>
    </header>
    <div class="guide-body">
      <p>…</p>
      <h2>…</h2>
    </div>
  </article>
*/

.guide-article {
	max-width: 720px;
}

/* ── Header ── */

.guide-header {
	padding: var(--s-7) 0 var(--s-6);
	border-bottom: 1px solid var(--line);
	margin-bottom: var(--s-7);
}

.guide-header__topic {
	margin-bottom: var(--s-4);
}

.guide-header__title {
	margin-bottom: var(--s-4);
}

.guide-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--s-2);
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.guide-meta__sep {
	color: var(--line-2);
}

/* ── Body prose ── */

.guide-body {
	font-size: 16px;
	line-height: 1.65;
	color: var(--ink-2);
}

.guide-body > * + * {
	margin-top: var(--s-5);
}

.guide-body h2 {
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -0.018em;
	line-height: 1.2;
	color: var(--ink);
	margin-top: var(--s-8);
}

.guide-body h3 {
	font-size: 18px;
	font-weight: 600;
	letter-spacing: -0.012em;
	line-height: 1.25;
	color: var(--ink);
	margin-top: var(--s-7);
}

.guide-body h4 {
	font-size: 15px;
	font-weight: 600;
	letter-spacing: -0.008em;
	color: var(--ink);
	margin-top: var(--s-6);
}

.guide-body p {
	margin: 0;
}

.guide-body ul,
.guide-body ol {
	padding-left: var(--s-6);
}

.guide-body li + li {
	margin-top: var(--s-2);
}

.guide-body a {
	color: var(--ink);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: var(--line-2);
	transition: text-decoration-color var(--t-micro);
}

.guide-body a:hover {
	text-decoration-color: var(--ink);
}

.guide-body blockquote {
	font-family: var(--serif);
	font-style: italic;
	font-size: 18px;
	line-height: 1.45;
	color: var(--ink);
	border-left: 2px solid var(--amber);
	padding: 4px 0 4px 20px;
	margin-left: 0;
}

.guide-body pre,
.guide-body code {
	font-family: var(--mono);
	font-size: 13.5px;
}

.guide-body code {
	background: var(--paper-2);
	border: 1px solid var(--line);
	border-radius: var(--r-xs);
	padding: 1px 5px;
}

.guide-body pre {
	background: var(--paper-2);
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	padding: var(--s-5);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.guide-body pre code {
	background: none;
	border: none;
	padding: 0;
	font-size: 13px;
}

.guide-body figure {
	margin: var(--s-7) 0;
}

.guide-body figure img {
	width: 100%;
	height: auto;
	border-radius: var(--r-md);
	border: 1px solid var(--line);
	display: block;
}

.guide-body figcaption {
	font-family: var(--mono);
	font-size: 11px;
	color: var(--ink-3);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-top: var(--s-2);
	text-align: center;
}

.guide-body strong {
	font-weight: 600;
	color: var(--ink);
}

.guide-body hr {
	border: none;
	border-top: 1px solid var(--line);
	margin: var(--s-8) 0;
}

/* ── Sidebar (related guides + topic) ── */

.guide-sidebar {
	padding-top: var(--s-2);
}

.guide-sidebar__heading {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-bottom: var(--s-4);
	padding-bottom: var(--s-3);
	border-bottom: 1px solid var(--line);
}

/* ── Topic filter pills on archive ── */

.topic-pills {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-2);
	margin-bottom: var(--s-6);
}

.topic-pill {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border-radius: var(--r-pill);
	border: 1px solid var(--line);
	background: var(--paper);
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-2);
	text-decoration: none;
	transition: border-color var(--t-micro), color var(--t-micro), background var(--t-micro);
}

.topic-pill:hover {
	border-color: var(--ink);
	color: var(--ink);
}

.topic-pill.active {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--paper);
}

/* Count span inside a topic pill */
.topic-pill .ct {
	color: var(--ink-4);
	margin-left: 6px;
	font-weight: 400;
}
.topic-pill.active .ct {
	color: var(--ink-4);
}

/* ── Guides topic filter row (replaces .topic-pills on archive) ── */

.guides-topic-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 16px 0;
	border-top: 1px solid var(--ink);
	border-bottom: 1px solid var(--line);
}

/* ── Amber dot eyebrow modifier ── */

.eyebrow--dot {
	display: flex;
	align-items: center;
	gap: 12px;
}

.eyebrow--dot::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--amber);
	flex-shrink: 0;
}

/* ── Audience picker ── */

.audience-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.audience-card {
	position: relative;
	display: block;
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	background: var(--paper);
	padding: 36px 32px 64px;
	overflow: hidden;
	transition: transform var(--t-card), box-shadow var(--t-card), border-color var(--t-card);
	min-height: 320px;
	text-decoration: none;
	color: inherit;
}

.audience-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-hover);
	border-color: var(--ink);
}

.audience-card:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 4px;
}

.audience-card__eyebrow {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-bottom: 18px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.audience-card__eyebrow::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--amber);
	flex-shrink: 0;
}

.audience-card__title {
	font-family: var(--sans);
	font-size: 44px;
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.04;
	margin: 0 0 12px;
	color: var(--ink);
}

.audience-card__sub {
	font-size: 15px;
	color: var(--ink-2);
	max-width: 36ch;
	margin: 0 0 24px;
	line-height: 1.5;
}

.audience-card__topics {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-top: 4px;
}

.audience-card__topics span {
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-3);
	border: 1px solid var(--line);
	padding: 3px 8px;
	border-radius: 999px;
	background: var(--paper-2);
}

.audience-card__stats {
	display: flex;
	gap: 28px;
	border-top: 1px dashed var(--line);
	padding-top: 16px;
	margin-top: 24px;
}

.audience-card__stat-k {
	font-family: var(--mono);
	font-size: 10.5px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--ink-3);
}

.audience-card__stat-v {
	font-size: 18px;
	font-weight: 600;
	letter-spacing: -0.015em;
	margin-top: 2px;
	color: var(--ink);
}

.audience-card__cta {
	position: absolute;
	bottom: 24px;
	right: 28px;
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-3);
	transition: color var(--t-micro);
}

.audience-card__cta .arrow {
	display: inline-block;
	transition: transform var(--t-micro);
}

.audience-card:hover .audience-card__cta {
	color: var(--amber-deep);
}

.audience-card:hover .audience-card__cta .arrow {
	transform: translateX(4px);
}

/* ── Featured lead ── */

.featured-lead {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 0;
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	overflow: hidden;
	background: var(--paper);
	text-decoration: none;
	color: inherit;
	transition: transform var(--t-card), box-shadow var(--t-card), border-color var(--t-card);
}

.featured-lead:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-hover);
	border-color: var(--ink);
}

.featured-lead:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 4px;
}

.featured-lead__img {
	aspect-ratio: 4 / 3;
	background: repeating-linear-gradient(45deg, var(--paper-2) 0 14px, var(--paper-3) 14px 28px);
	border-right: 1px solid var(--line);
	position: relative;
	overflow: hidden;
}

.featured-lead__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.featured-lead__tag {
	position: absolute;
	top: 14px;
	left: 14px;
	background: var(--overlay);
	color: var(--paper);
	padding: 5px 10px;
	border-radius: var(--r-xs);
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	backdrop-filter: blur(6px);
}

.featured-lead__body {
	padding: 36px 32px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.featured-lead__eyebrow {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-bottom: 14px;
}

.featured-lead__title {
	font-size: 28px;
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.022em;
	margin: 0 0 14px;
	color: var(--ink);
}

.featured-lead__dek {
	color: var(--ink-2);
	font-size: 15.5px;
	max-width: 50ch;
	line-height: 1.55;
	margin-bottom: 24px;
}

.featured-lead__foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-top: 1px solid var(--line);
	padding-top: 16px;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-3);
}

/* ── Article list + editorial rows ── */

.article-list {
	border-top: 1px solid var(--ink);
}

.article-row {
	display: grid;
	grid-template-columns: 180px 1fr 80px 40px;
	gap: 32px;
	align-items: start;
	padding: 28px 0;
	border-bottom: 1px solid var(--line);
	text-decoration: none;
	color: inherit;
	transition: padding-left var(--t-micro);
}

.article-row:hover {
	padding-left: 12px;
}

.article-row:hover .article-row__arrow {
	transform: translate(4px, -4px);
	color: var(--amber-deep);
}

.article-row:hover .article-row__title {
	color: var(--amber-deep);
}

.article-row:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

.article-row__meta {
	font-family: var(--mono);
	font-size: 11.5px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.article-row__topic {
	color: var(--amber-deep);
	display: block;
	margin-top: 8px;
	font-size: 11px;
}

.article-row__title {
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -0.018em;
	line-height: 1.25;
	color: var(--ink);
	margin: 0 0 8px;
	transition: color var(--t-micro);
	max-width: 32ch;
}

.article-row__dek {
	font-size: 14px;
	color: var(--ink-2);
	line-height: 1.5;
	max-width: 56ch;
	margin: 0;
}

.article-row__time {
	font-family: var(--mono);
	font-size: 11.5px;
	color: var(--ink-3);
	letter-spacing: 0.08em;
	text-align: right;
	padding-top: 2px;
}

.article-row__arrow {
	font-family: var(--mono);
	font-size: 16px;
	color: var(--ink-3);
	text-align: right;
	transition: transform var(--t-micro), color var(--t-micro);
	padding-top: 2px;
}

/* ── Single guide reading card ── */

.guide-single {
	max-width: 880px;
	margin-inline: auto;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	padding: 56px 64px;
}

.guide-single__crumbs {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-bottom: 32px;
}

.guide-single__crumbs .current {
	color: var(--ink);
}

.guide-single__crumbs a {
	color: inherit;
}

.guide-single__crumbs a:hover {
	color: var(--ink);
}

.guide-single__eyebrow {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--amber-deep);
	margin-bottom: 16px;
	display: flex;
	gap: 14px;
	align-items: center;
	flex-wrap: wrap;
}

.guide-single__eyebrow .meta {
	color: var(--ink-3);
}

.guide-single__title {
	font-size: 44px;
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.05;
	margin: 0 0 20px;
	max-width: 22ch;
	color: var(--ink);
}

.guide-single__dek {
	font-size: 19px;
	color: var(--ink-2);
	max-width: 56ch;
	line-height: 1.5;
	margin: 0 0 40px;
}

.guide-single__byline {
	display: flex;
	gap: 14px;
	align-items: center;
	padding: 20px 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	margin-bottom: 40px;
}

.guide-single__avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--paper-3);
	border: 1px solid var(--line);
	flex-shrink: 0;
	overflow: hidden;
}

.guide-single__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.guide-single__author-name {
	font-size: 13.5px;
	font-weight: 500;
	color: var(--ink);
}

.guide-single__author-role {
	display: block;
	font-family: var(--mono);
	font-size: 10.5px;
	color: var(--ink-3);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-top: 2px;
}

.guide-single__cover {
	aspect-ratio: 16 / 9;
	border-radius: var(--r-md);
	border: 1px solid var(--line);
	margin-bottom: 40px;
	overflow: hidden;
	background: repeating-linear-gradient(45deg, var(--paper-2) 0 14px, var(--paper-3) 14px 28px);
}

.guide-single__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Body typography overrides scoped to the reading card */
.guide-single .guide-body {
	max-width: 64ch;
	font-size: 17px;
	line-height: 1.7;
	color: var(--ink-2);
}

.guide-single .guide-body p {
	margin-bottom: 18px;
	color: var(--ink-2);
}

.guide-single .guide-body h4 {
	font-size: 22px;
	letter-spacing: -0.015em;
	color: var(--ink);
	margin: 36px 0 12px;
	font-weight: 600;
}

.guide-single .guide-body blockquote {
	font-family: var(--serif);
	font-style: italic;
	font-size: 26px;
	line-height: 1.35;
	color: var(--ink);
	border-left: 2px solid var(--amber);
	padding: 4px 0 4px 20px;
	margin: 28px 0;
	max-width: 48ch;
}

/* Related guides below the single card */
.guide-single-related {
	max-width: 880px;
	margin-inline: auto;
	padding-top: var(--s-7);
}

.guide-single-related__heading {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-bottom: var(--s-4);
	display: flex;
	align-items: center;
	gap: 12px;
}

.guide-single-related__heading::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--amber);
	flex-shrink: 0;
}

/* ── Guides mobile ── */

@media (max-width: 800px) {

	.audience-grid {
		grid-template-columns: 1fr;
	}

	.audience-card__title {
		font-size: 28px;
	}

	.featured-lead {
		grid-template-columns: 1fr;
	}

	.featured-lead__img {
		border-right: none;
		border-bottom: 1px solid var(--line);
	}

	.guides-topic-filter {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		scroll-snap-type: x mandatory;
	}

	.guides-topic-filter::-webkit-scrollbar {
		display: none;
	}

	.guides-topic-filter .topic-pill {
		scroll-snap-align: start;
		flex-shrink: 0;
	}

	.article-row {
		grid-template-columns: 1fr 40px;
		gap: 12px;
	}

	.article-row__meta,
	.article-row__time {
		grid-column: 1 / -1;
		display: flex;
		gap: 12px;
		font-size: 10.5px;
	}

	.article-row__meta {
		order: -1;
	}

	.article-row__topic {
		display: inline;
		margin-top: 0;
	}

	.article-row__time {
		justify-content: flex-start;
		padding-top: 0;
	}

	.guide-single {
		padding: 40px 24px;
	}

	.guide-single__title {
		font-size: 28px;
	}

	.guide-single .guide-body blockquote {
		font-size: 20px;
	}
}

/* ════════════════════════════════════════════════════════════════
   SET SINGLE — single-ohio_portfolio.php
   ════════════════════════════════════════════════════════════════ */

/* ── Hero split layout ─────────────────────────────────────────── */

.set-single-split {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: var(--s-9);
	align-items: start;
	margin-top: var(--s-6);
}

.set-single__desc {
	margin-top: var(--s-5);
	font-size: 15px;
	line-height: 1.7;
	color: var(--ink-2);
	max-width: 580px;
}

.set-single__desc h5 {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--ink-2);
	margin: 0 0 var(--s-3);
}

.set-single__desc p {
	margin: 0 0 var(--s-4);
}

.set-single__desc p:last-child {
	margin-bottom: 0;
}

.set-single__stats {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-2) var(--s-7);
	margin-top: var(--s-6);
	padding-top: var(--s-5);
	border-top: 1px solid var(--line);
}

.set-single__stat {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.set-single__stat-label {
	font-family: var(--mono);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.set-single__stat-value {
	font-family: var(--mono);
	font-size: 20px;
	font-weight: 700;
	color: var(--ink);
	line-height: 1;
}

.set-single__img {
	position: sticky;
	top: calc(80px + var(--s-6));
	border-radius: 8px;
	overflow: hidden;
	background: var(--paper-2);
	box-shadow: var(--shadow-card);
}

.set-single__img img {
	display: block;
	width: 100%;
	height: auto;
}

/* ── Rarity tabs ───────────────────────────────────────────────── */

.rarity-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	border-bottom: 1px solid var(--line);
	margin-bottom: var(--s-6);
}

.rarity-tabs__btn {
	display: inline-flex;
	align-items: center;
	padding: var(--s-3) var(--s-5);
	font-family: var(--mono);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--ink-2);
	border: none;
	border-bottom: 2px solid transparent;
	background: none;
	cursor: pointer;
	margin-bottom: -1px;
	transition: color var(--t-micro), border-color var(--t-micro);
	line-height: 1;
}

.rarity-tabs__btn:hover {
	color: var(--ink);
}

.rarity-tabs__btn.is-active {
	color: var(--ink);
	border-bottom-color: var(--amber);
}

/* ── Card table ────────────────────────────────────────────────── */

.set-card-list {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.set-card-list .collection-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	font-family: var(--sans);
	background: var(--paper);
}

.set-card-list .collection-table thead th {
	padding: var(--s-3) var(--s-4);
	font-family: var(--mono);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--ink-2);
	text-align: left;
	border-bottom: 2px solid var(--line);
	background: var(--paper-2);
	cursor: pointer;
	white-space: nowrap;
}

.set-card-list .collection-table thead th:hover,
.set-card-list .collection-table thead th.sorted-asc,
.set-card-list .collection-table thead th.sorted-desc {
	color: var(--ink);
}

.set-card-list .collection-table thead th::after {
	content: ' ⇅';
	opacity: .35;
	font-size: 10px;
	font-weight: 400;
}

.set-card-list .collection-table thead th.sorted-asc::after {
	content: ' ↑';
	opacity: 1;
	color: var(--amber);
}

.set-card-list .collection-table thead th.sorted-desc::after {
	content: ' ↓';
	opacity: 1;
	color: var(--amber);
}

.set-card-list .collection-table tbody tr {
	border-bottom: 1px solid var(--line);
	transition: background var(--t-micro);
}

.set-card-list .collection-table tbody tr:last-child {
	border-bottom: none;
}

.set-card-list .collection-table tbody tr:hover {
	background: var(--paper-2);
}

.set-card-list .collection-table td {
	padding: var(--s-3) var(--s-4);
	color: var(--ink);
	vertical-align: middle;
}

.set-card-list .collection-table td:first-child {
	font-family: var(--mono);
	font-size: 12px;
	color: var(--ink-3);
	width: 80px;
	white-space: nowrap;
}

.set-card-list .collection-table td.card-value {
	font-family: var(--mono);
	font-size: 13px;
	font-weight: 600;
	color: var(--amber);
	text-align: right;
	width: 140px;
	white-space: nowrap;
}

/* ── Mobile ────────────────────────────────────────────────────── */

@media (max-width: 860px) {
	.set-single-split {
		grid-template-columns: 1fr;
	}

	.set-single__img {
		position: static;
		max-width: 300px;
		margin: 0 auto;
		order: -1;
	}

	.set-single__stats {
		gap: var(--s-2) var(--s-5);
	}
}

@media (max-width: 480px) {
	.rarity-tabs__btn {
		padding: var(--s-3) var(--s-4);
		font-size: 11px;
	}
}
