/*
 * home-companion.css
 * Swatching homepage + Palettes page — browse-style layout (tiles, billboard, shelves)
 * Templates: page-templates/home-companion.php, page-templates/palettes.php
 *
 * @package Swatching
 */

/* ============================================================
   TOKENS
   ============================================================ */

.swh {
	--bg:       #0b0b10;
	--card:     #16161d;
	--card-2:   #1f1f28;
	--card-3:   #2a2a35;
	--line:     rgba(255, 255, 255, 0.08);
	--text:     #ffffff;
	--text-2:   #a9acb8;
	--text-3:   #8e92a3; /* 4.5:1+ on every card shade (WCAG AA) */
	--blue:     #2387ff;
	--green:    #22c55e;

	--sans: 'Figtree', system-ui, sans-serif;
	--mono: 'Source Code Pro', ui-monospace, monospace;

	--max:    1320px;
	--gutter: clamp(16px, 4vw, 48px);
	--edge:   max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
	--radius: 10px;
	--ease:   180ms ease-out;

	/* Live color from the lookup tool (set by JS) */
	--swh-c:    #2387ff;
	--swh-c-on: #000000;

	background: var(--bg);
	color: var(--text-2);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.5;
	padding-bottom: 64px;
	-webkit-font-smoothing: antialiased;
}

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

.swh a { text-decoration: none; }
.swh a:hover { text-decoration: none; }
.swh button { font-family: inherit; }

.swh :focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.swh-wrap {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.swh-sec { margin-top: clamp(40px, 5vw, 64px); }

.swh-sec-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.swh-sec-head--flush { padding: 0; }

.swh-h2 {
	font-size: clamp(1.4rem, 2.2vw, 1.75rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--text);
	margin: 0;
	line-height: 1.2;
}

.swh-sec-sub {
	margin: 4px 0 0;
	font-size: 0.95rem;
	color: var(--text-2);
}

.swh-sec-tools {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.swh-showall {
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--text-2);
	margin-right: 8px;
}

.swh-showall:hover { color: var(--text); text-decoration: underline; }

.swh-arrow {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 0;
	background: var(--card-2);
	color: var(--text);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	transition: background var(--ease);
}

.swh-arrow:hover { background: var(--card-3); }

.swh-kicker {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-2);
	margin: 0 0 8px;
}

/* Pill buttons */
.swh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 22px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.4);
	background: transparent;
	color: var(--text);
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
	transition: transform var(--ease), background var(--ease), border-color var(--ease);
}

.swh-btn:hover { transform: scale(1.03); border-color: #fff; color: var(--text); }

.swh-btn--light { background: #fff; border-color: #fff; color: #000; }
.swh-btn--light:hover { color: #000; }

.swh-btn--text { border-color: transparent; padding-left: 8px; padding-right: 8px; }
.swh-btn--text:hover { border-color: transparent; text-decoration: underline; transform: none; }

.swh-btn--green { background: var(--green); border-color: var(--green); color: #000; }
.swh-btn--green:hover { color: #000; border-color: var(--green); }


/* ============================================================
   PAGE INTRO (Palettes, Play, Tools hubs)
   ============================================================ */

.swh-intro { padding-top: clamp(32px, 5vw, 64px); }

.swh-intro-title {
	font-size: clamp(2rem, 4.4vw, 3.4rem);
	font-weight: 900;
	letter-spacing: -0.04em;
	line-height: 1.05;
	color: var(--text);
	margin: 0 0 14px;
	max-width: 14em;
}

.swh-intro-sub {
	font-size: clamp(1rem, 1.4vw, 1.15rem);
	line-height: 1.6;
	color: var(--text-2);
	max-width: 40em;
	margin: 0 0 36px;
}


/* ============================================================
   THE THREE PILLARS — Use · Learn · Play
   Each pillar has an accent color (--pc) used by its card and its section.
   ============================================================ */

.swh-slide--use,   .swh-hero-tab--use,   .swh-pillar-sec--use   { --pc: #2387ff; }
.swh-slide--learn, .swh-hero-tab--learn, .swh-pillar-sec--learn { --pc: #e9c46a; }
.swh-slide--play,  .swh-hero-tab--play,  .swh-pillar-sec--play  { --pc: #22c55e; }

/* Pillar sections further down the page */
.swh-pillar-sec { margin-top: clamp(64px, 8vw, 104px); }

.swh-pillar-head { margin-bottom: 24px; }

.swh-pillar-kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 6px;
	font-size: 0.85rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--pc);
}

.swh-pillar-kicker::before {
	content: '';
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--pc);
}

.swh-pillar-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.swh-pillar-h2 {
	font-size: clamp(1.8rem, 3.4vw, 2.6rem);
	font-weight: 900;
	letter-spacing: -0.035em;
	line-height: 1.1;
	color: var(--text);
	margin: 0;
}

.swh-pillar-sec .swh-showall { color: var(--pc); margin-right: 0; }

/* Homepage tool + game cards: a centered, wrapping row (3 tools, 4 games) */
.swh-pillar-sec .swg-cards {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

.swh-pillar-sec .swg-card { flex: 0 1 270px; }

@media (max-width: 640px) {
	.swh-pillar-sec .swg-card { flex-basis: 100%; }
}


/* ============================================================
   HERO — rotates Use → Learn → Play (assets/js/home-companion.js)
   ============================================================ */

.swh-hero { padding-top: clamp(24px, 4vw, 44px); }

.swh-hero-h1 {
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0;
	color: var(--text-2);
	margin: 0 0 14px;
}

.swh-hero-stage {
	display: grid;
	border-radius: 18px;
	overflow: hidden;
	background: var(--card);
}

.swh-slide {
	grid-area: 1 / 1;
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(20px, 4vw, 56px);
	min-height: clamp(380px, 38vw, 470px);
	padding: clamp(24px, 4vw, 56px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 450ms ease, visibility 0s linear 450ms;
}

.swh-slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 450ms ease;
}

.swh-slide--use   { background: radial-gradient(circle at 85% 30%, rgba(35, 135, 255, 0.26), transparent 60%); }
.swh-slide--learn { background: radial-gradient(circle at 85% 30%, rgba(233, 196, 106, 0.22), transparent 60%); }
.swh-slide--play  { background: radial-gradient(circle at 85% 30%, rgba(34, 197, 94, 0.22), transparent 60%); }

.swh-slide-kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px;
	font-size: 0.85rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--pc);
}

.swh-slide-kicker::before {
	content: '';
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--pc);
}

.swh-slide-title {
	font-size: clamp(2.2rem, 5vw, 3.9rem);
	font-weight: 900;
	letter-spacing: -0.045em;
	line-height: 1;
	color: var(--text);
	margin: 0 0 16px;
}

.swh-slide-sub {
	font-size: clamp(1rem, 1.4vw, 1.15rem);
	line-height: 1.6;
	color: var(--text-2);
	max-width: 32em;
	margin: 0 0 26px;
}

.swh-slide-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Slide artwork */
.swh-slide-art {
	position: relative;
	height: clamp(220px, 26vw, 320px);
}

.swh-hart-use .bands {
	position: absolute;
	inset: 0 0 18% 8%;
	display: flex;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.swh-hart-use .bands i { flex: 1; }
.swh-hart-use .bands i:nth-child(1) { background: #22313f; }
.swh-hart-use .bands i:nth-child(2) { background: #2a9d8f; }
.swh-hart-use .bands i:nth-child(3) { background: #f2c14e; }
.swh-hart-use .bands i:nth-child(4) { background: #f78154; }
.swh-hart-use .bands i:nth-child(5) { background: #e5446d; }

.swh-hart-use .node {
	position: absolute;
	width: 30px;
	height: 30px;
	border: 3px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 6px 14px rgba(0, 0, 0, 0.4);
	transform: translate(-50%, -50%);
}

.swh-hart-use .n1 { left: 35%; top: 34%; }
.swh-hart-use .n2 { left: 82%; top: 58%; }

.swh-hart-use .chip,
.swh-hart-play .chip {
	position: absolute;
	left: 0;
	bottom: 0;
	padding: 12px 16px;
	border-radius: 12px;
	background: #fff;
	color: #111;
	font-family: var(--mono);
	font-size: 0.85rem;
	line-height: 1.6;
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.swh-hart-use .chip b { display: inline-block; width: 3.4em; color: #777; font-weight: 600; }

.swh-hart-learn .swh-cover {
	position: absolute;
	top: 6%;
	width: 46%;
	margin: 0;
	box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

.swh-hart-learn .c1 { left: 4%;  transform: rotate(-9deg) translateY(10%); }
.swh-hart-learn .c2 { left: 27%; transform: rotate(0deg); z-index: 1; }
.swh-hart-learn .c3 { left: 50%; transform: rotate(9deg) translateY(10%); }
.swh-hart-learn .swh-cover-label { font-size: clamp(1.2rem, 2.2vw, 1.8rem); }

.swh-hart-play .grid {
	position: absolute;
	inset: 0 0 12% 6%;
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	grid-template-rows: repeat(3, 1fr);
	gap: 6px;
}

.swh-hart-play .grid i { border-radius: 8px; }
.swh-hart-play .grid i:nth-child(9),
.swh-hart-play .grid i:nth-child(13) { box-shadow: 0 0 0 3px #fff; }

.swh-hart-play .chip {
	font-family: var(--sans);
	font-weight: 800;
	background: var(--green);
	color: #04210f;
}

/* Tabs with progress bars */
.swh-hero-tabs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin-top: 14px;
}

.swh-hero-tab {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 10px;
	padding: 8px 2px 0;
	border: 0;
	background: transparent;
	color: var(--text-3);
	text-align: left;
	cursor: pointer;
	transition: color var(--ease);
}

.swh-hero-tab:hover,
.swh-hero-tab[aria-selected="true"] { color: var(--text); }

.swh-hero-tab-name { font-size: 1.1rem; font-weight: 800; }
.swh-hero-tab-sub  { font-size: 0.9rem; font-weight: 600; color: var(--text-3); }

.swh-hero-tab-bar {
	flex-basis: 100%;
	height: 4px;
	margin-top: 8px;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.12);
	overflow: hidden;
}

.swh-hero-tab-bar i { display: block; width: 0; height: 100%; background: var(--pc); }

.swh-hero-tab.is-active .swh-hero-tab-bar i { animation: swh-progress 7s linear forwards; }
.swh-hero.is-paused .swh-hero-tab.is-active .swh-hero-tab-bar i { animation-play-state: paused; }
.swh-hero.is-static .swh-hero-tab.is-active .swh-hero-tab-bar i { animation: none; width: 100%; }

@keyframes swh-progress {
	from { width: 0; }
	to   { width: 100%; }
}


/* ============================================================
   LEARN — starter strip + topic columns
   ============================================================ */

.swh-starter {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 20px;
	margin-bottom: 16px;
	border-radius: 12px;
	background: var(--card);
	border-left: 4px solid var(--pc);
	color: var(--text-2);
	transition: background var(--ease);
}

.swh-starter:hover { background: var(--card-2); color: var(--text-2); }

.swh-starter-tag {
	flex-shrink: 0;
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--pc);
}

.swh-starter-text { flex: 1; font-size: 1rem; }
.swh-starter-text strong { color: var(--text); }
.swh-starter-go { font-size: 1.3rem; color: var(--text); }

.swh-topics {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	align-items: start;
}

.swh-topic {
	background: var(--card);
	border-radius: 14px;
	overflow: hidden;
	border-top: 4px solid hsl(var(--th) 65% 55%);
}

.swh-topic-head { padding: 20px 20px 14px; }

.swh-topic-title {
	font-size: 1.25rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--text);
	margin: 0 0 6px;
}

.swh-topic-desc {
	font-size: 0.92rem;
	line-height: 1.5;
	color: var(--text-2);
	margin: 0;
}

.swh-topic-list { list-style: none; margin: 0; padding: 0 0 8px; }
.swh-topic-list li { margin: 0; }

.swh-topic-list a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 20px;
	color: var(--text);
	transition: background var(--ease);
}

.swh-topic-list a:hover { background: var(--card-2); color: var(--text); }

.swh-topic-chip {
	flex-shrink: 0;
	width: 30px;
	height: 30px;
	border-radius: 7px;
	background: linear-gradient(135deg, var(--cv-bg) 45%, var(--cv-a) 45%);
}

.swh-topic-name {
	flex: 1;
	min-width: 0;
	font-size: 0.97rem;
	font-weight: 600;
	line-height: 1.3;
}

.swh-topic-time {
	flex-shrink: 0;
	font-size: 0.8rem;
	color: var(--text-3);
}


/* ============================================================
   BILLBOARD — PALETTE OF THE DAY
   ============================================================ */

.swh-billboard {
	position: relative;
	height: clamp(300px, 36vw, 440px);
	border-radius: 14px;
	overflow: hidden;
	background: var(--card);
}

.swh-bb-bands {
	position: absolute;
	inset: 0;
	display: flex;
}

.swh-bb-bands button {
	flex: 1;
	border: 0;
	padding: 18px 16px;
	cursor: pointer;
	display: flex;
	align-items: flex-start;
	justify-content: flex-end;
	font-family: var(--mono);
	font-size: 0.9rem;
	font-weight: 600;
	transition: flex-grow 300ms ease-out;
}

.swh-bb-bands button:hover,
.swh-bb-bands button:focus-visible { flex-grow: 1.6; }

.swh-bb-bands button span { opacity: 0.85; }

/* Shade on the left so the text reads on any palette */
.swh-billboard::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.72) 34%, rgba(0, 0, 0, 0.3) 58%, rgba(0, 0, 0, 0) 76%);
	pointer-events: none;
}

.swh-bb-info {
	position: absolute;
	left: clamp(20px, 4vw, 48px);
	bottom: clamp(20px, 4vw, 44px);
	max-width: min(560px, 60%);
	z-index: 1;
}

.swh-bb-top {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 8px;
}

.swh-bb-info .swh-kicker { color: rgba(255, 255, 255, 0.85); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.swh-bb-nav { display: flex; gap: 6px; }

.swh-bb-nav .swh-arrow {
	width: 30px;
	height: 30px;
	font-size: 1.2rem;
	background: rgba(255, 255, 255, 0.16);
}

.swh-bb-nav .swh-arrow:hover { background: rgba(255, 255, 255, 0.28); }
.swh-arrow:disabled,
.swh-arrow:disabled:hover { opacity: 0.35; cursor: default; background: rgba(255, 255, 255, 0.16); }

.swh-bb-title {
	/* Sized so the longest palette name fits on one line; never wraps (no height jumps) */
	font-size: clamp(2rem, 4.2vw, 3.2rem);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-weight: 900;
	letter-spacing: -0.04em;
	line-height: 1;
	color: #fff;
	margin: 0 0 12px;
}

.swh-bb-meta span,
.swp-stage-meta span {
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.swh-bb-meta {
	font-size: 1rem;
	color: rgba(255, 255, 255, 0.85);
	margin: 0 0 20px;
}

.swh-bb-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}


/* ============================================================
   SHELVES
   ============================================================ */

.swh-shelf { position: relative; }

.swh-track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: clamp(156px, 15vw, 196px);
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 4px var(--edge) 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--edge);
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}

.swh-track::-webkit-scrollbar { display: none; }
.swh-track > li { scroll-snap-align: start; margin: 0; }

/* Article card */
.swh-card,
.swh-rank-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px;
	border-radius: var(--radius);
	color: var(--text);
	transition: background var(--ease);
}

.swh-card:hover,
.swh-rank:hover .swh-rank-body { background: var(--card-2); color: var(--text); }

.swh-cover {
	position: relative;
	display: flex;
	align-items: flex-end;
	aspect-ratio: 1;
	border-radius: 8px;
	overflow: hidden;
	padding: 14px;
	margin-bottom: 8px;
	background: var(--cv-bg, #333);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.swh-cover::before,
.swh-cover::after {
	content: '';
	position: absolute;
	border-radius: 50%;
}

.swh-cover::before {
	width: 90%;
	height: 90%;
	right: -28%;
	top: -24%;
	background: var(--cv-a, #555);
}

.swh-cover::after {
	width: 46%;
	height: 46%;
	right: 22%;
	top: 30%;
	background: var(--cv-b, #777);
	mix-blend-mode: screen;
	opacity: 0.85;
}

.swh-cover-label {
	position: relative;
	z-index: 1;
	font-size: 1.45rem;
	font-weight: 900;
	letter-spacing: -0.03em;
	line-height: 1;
	color: #fff;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

.swh-card-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--text);
}

.swh-card-sub {
	font-size: 0.88rem;
	color: var(--text-2);
}

/* Ranked "Start here" cards */
.swh-track--rank { grid-auto-columns: clamp(230px, 21vw, 276px); gap: 4px; }

.swh-rank {
	display: flex;
	align-items: flex-start;
	color: var(--text);
}

.swh-rank-num {
	flex-shrink: 0;
	width: 72px;
	margin-right: -18px;
	font-size: 8.5rem;
	font-weight: 900;
	line-height: 0.85;
	letter-spacing: -0.08em;
	color: var(--bg);
	-webkit-text-stroke: 2px #5c6070;
	text-align: right;
	padding-top: 40px;
	transition: -webkit-text-stroke-color var(--ease);
}

.swh-rank:hover .swh-rank-num { -webkit-text-stroke-color: #fff; }

.swh-rank-body {
	position: relative;
	flex: 1;
	min-width: 0;
}

/* Palette cards */
.swh-track:has(.swh-pal) { grid-auto-columns: clamp(200px, 19vw, 248px); gap: 16px; }

.swh-pal-cover {
	display: flex;
	aspect-ratio: 1;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.swh-pal-cover button {
	flex: 1;
	border: 0;
	padding: 0 0 12px;
	cursor: pointer;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	transition: flex-grow 250ms ease-out;
}

.swh-pal-cover button span {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	font-family: var(--mono);
	font-size: 0.75rem;
	font-weight: 600;
	opacity: 0;
	transition: opacity var(--ease);
}

.swh-pal-cover:hover button span,
.swh-pal-cover button:focus-visible span { opacity: 0.9; }
.swh-pal-cover button:hover { flex-grow: 1.8; }

.swh-pal-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 12px 2px 0;
}

.swh-pal-foot .swh-card-title { min-width: 0; }

.swp-card-actions {
	display: flex;
	gap: 4px;
	flex-shrink: 0;
}

.swp-mini-btn {
	border: 0;
	border-radius: 999px;
	background: var(--card-2);
	color: var(--text);
	font-size: 0.78rem;
	font-weight: 700;
	padding: 6px 11px;
	cursor: pointer;
	transition: background var(--ease);
}

.swp-mini-btn:hover { background: var(--card-3); }


/* ============================================================
   LOOK UP A COLOR
   ============================================================ */

.swh-lookup {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	background: var(--card);
	border-radius: 14px;
	overflow: hidden;
}

.swh-lookup-swatch {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: flex-start;
	gap: 24px;
	min-height: 320px;
	padding: clamp(20px, 3vw, 32px);
	background: var(--swh-c);
	color: var(--swh-c-on);
	transition: background 250ms ease-out, color 250ms ease-out;
}

.swh-roll {
	border: 1.5px solid currentColor;
	background: transparent;
	color: inherit;
	border-radius: 999px;
	padding: 8px 16px;
	font-size: 0.9rem;
	font-weight: 700;
	cursor: pointer;
}

.swh-lookup-hex {
	font-family: var(--mono);
	font-size: clamp(2.4rem, 5vw, 3.6rem);
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.02em;
}

.swh-lookup-sample {
	font-size: 1.1rem;
	font-weight: 700;
	margin-top: 10px;
}

.swh-lookup-data { padding: clamp(20px, 3vw, 32px); }

.swh-input-box {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--card-2);
	border: 2px solid transparent;
	border-radius: 999px;
	padding: 0 18px;
	transition: border-color var(--ease);
}

.swh-input-box:focus-within { border-color: #fff; }
.swh-input-box.is-invalid { border-color: #ff5a67; }

.swh-input-chip {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--swh-c);
	flex-shrink: 0;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.swh-input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	color: var(--text);
	font-family: var(--mono);
	font-size: 1.1rem;
	padding: 14px 0;
}

.swh-input:focus { outline: none; }
.swh-input::placeholder { color: var(--text-3); }

.swh-hint {
	font-size: 0.88rem;
	color: var(--text-2);
	margin: 10px 4px 20px;
	min-height: 1.4em;
}

.swh-hint button {
	border: 0;
	background: transparent;
	padding: 0 2px;
	font-family: var(--mono);
	font-size: 0.85rem;
	color: var(--text);
	text-decoration: underline;
	text-decoration-color: var(--text-3);
	text-underline-offset: 3px;
	cursor: pointer;
}

.swh-hint.is-error { color: #ff8a93; }

.swh-formats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin-bottom: 20px;
}

.swh-format {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	padding: 12px 16px;
	border: 0;
	border-radius: 8px;
	background: var(--card-2);
	cursor: pointer;
	text-align: left;
	transition: background var(--ease);
}

.swh-format:hover { background: var(--card-3); }

.swh-format > span {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--text-2);
}

.swh-format b {
	font-family: var(--mono);
	font-size: 1rem;
	font-weight: 500;
	color: var(--text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.swh-format--pantone { grid-column: 1 / -1; }
.swh-format--pantone span em { font-style: normal; font-weight: 500; color: var(--text-3); }
.swh-format--pantone b { display: flex; align-items: center; gap: 10px; }

.swh-pms-chip {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	border-radius: 5px;
	background: var(--card-3);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.swh-format--pantone small {
	display: block;
	margin-top: 4px;
	font-size: 0.8rem;
	line-height: 1.4;
	color: var(--text-3);
	white-space: normal;
}

/* The changing line (closeness + Delta E) stays on one line so the box never changes height */
.swh-format--pantone small { align-self: stretch; min-width: 0; }
.swh-format--pantone small span { display: block; }
.swh-format--pantone .swh-pms-fit {
	color: var(--text-2);
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.swh-format--pantone small span:last-child { font-weight: 400; color: var(--text-3); }

.swh-mini-label {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--text-2);
	margin: 0 0 8px;
}

.swh-ramp {
	display: grid;
	grid-template-columns: repeat(9, 1fr);
	gap: 4px;
	margin-bottom: 20px;
}

.swh-ramp button {
	height: 44px;
	border: 0;
	border-radius: 6px;
	padding: 0;
	cursor: pointer;
	transition: transform var(--ease);
}

.swh-ramp button:hover { transform: translateY(-3px); }
.swh-ramp button.is-base { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px #fff; }

.swh-contrast {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin-bottom: 20px;
}

.swh-contrast-cell {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 0.9rem;
}

.swh-contrast-cell--light { background: #fff; color: #222; }
.swh-contrast-cell--dark  { background: #000; color: #ddd; box-shadow: inset 0 0 0 1px var(--line); }

.swh-contrast-aa {
	font-size: 1.8rem;
	font-weight: 900;
	color: var(--swh-c);
	line-height: 1;
}

.swh-contrast-ratio { font-weight: 800; }

.swh-grade {
	display: block;
	width: fit-content;
	margin-top: 3px;
	font-size: 0.75rem;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
}

.swh-grade--aaa,
.swh-grade--aa { background: #15803d; color: #fff; }
.swh-grade--lg { background: #a16207; color: #fff; }
.swh-grade--no { background: #b91c1c; color: #fff; }

.swh-textlink {
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--text);
}

.swh-textlink:hover { color: var(--text); text-decoration: underline; }


/* ============================================================
   PALETTES PAGE — palette studio (page-templates/palettes.php, palettes.js)
   ============================================================ */

.swp-intro .swh-intro-sub { margin-bottom: 0; }

/* Chips (also used by the games' mode switches) */
.swp-chip {
	border: 0;
	border-radius: 999px;
	background: var(--card-2);
	color: var(--text);
	font-size: 0.9rem;
	font-weight: 600;
	padding: 8px 16px;
	cursor: pointer;
	transition: background var(--ease), color var(--ease);
}

.swp-chip:hover { background: var(--card-3); }
.swp-chip[aria-pressed="true"],
.swp-chip[aria-selected="true"] { background: #fff; color: #000; }
.swp-chip--sm { font-size: 0.82rem; padding: 6px 12px; }

.swp-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.swp-filters[hidden] { display: none; }
.swp-empty { color: var(--text-2); }

.swp-studio {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
	grid-template-areas: "main preview" "picker picker";
	gap: 16px;
	margin-top: 28px;
}

/* ---------- Stage ---------- */

/* The stage's two parts sit directly on the studio grid, so phones can put
   the filmstrip between them (palette → strip → preview). */
.swp-stage { display: contents; }
.swp-stage-main { grid-area: main; }
.swp-preview { grid-area: preview; }
.swp-picker { grid-area: picker; }

.swp-stage-main {
	display: flex;
	flex-direction: column;
	min-width: 0;
	border-radius: 18px;
	overflow: hidden;
	background: var(--card);
}

.swp-stage-bands {
	display: flex;
	height: clamp(200px, 26vw, 320px);
}

.swp-stage-bands > button {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0 4px 16px;
	border: 0;
	font-family: var(--mono);
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: flex-grow 280ms ease-out, background 300ms ease-out;
}

.swp-stage-bands > button:hover,
.swp-stage-bands > button:focus-visible,
.swp-band:hover { flex-grow: 1.5; }

.swp-stage-info { padding: 20px 24px 24px; }
.swp-stage-info .swh-kicker { margin-bottom: 4px; }

.swp-stage-name {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 0 0 6px;
	font-size: clamp(1.8rem, 3.4vw, 2.6rem);
	font-weight: 900;
	letter-spacing: -0.035em;
	line-height: 1.05;
	color: var(--text);
}

.swp-stage-meta {
	margin: 0 0 18px;
	font-size: 0.98rem;
	color: var(--text-2);
}

.swp-stage-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Create mode ---------- */

/* Buttons here use display:flex, so make the [hidden] attribute win. */
.swp-studio [hidden] { display: none !important; }

.swp-create-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 12px 14px;
	border-bottom: 1px solid var(--line);
}

.swp-select select {
	-webkit-appearance: none;
	appearance: none;
	height: 38px;
	padding: 0 34px 0 14px;
	border: 0;
	border-radius: 999px;
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") right 14px center no-repeat,
		var(--card-2);
	color: var(--text);
	font-family: var(--sans);
	font-size: 0.9rem;
	font-weight: 700;
	cursor: pointer;
}

.swp-count {
	display: inline-flex;
	align-items: center;
	height: 38px;
	border-radius: 999px;
	background: var(--card-2);
	color: var(--text);
	font-size: 0.9rem;
	font-weight: 700;
}

.swp-count button {
	width: 36px;
	height: 38px;
	border: 0;
	background: transparent;
	color: var(--text);
	font-size: 1.2rem;
	cursor: pointer;
}

.swp-count button:disabled { opacity: 0.3; cursor: default; }
.swp-count span { min-width: 4.6em; text-align: center; }
.swp-count span::after { content: ' colors'; font-weight: 500; color: var(--text-2); }

.swp-create-bar .swh-btn { height: 38px; padding: 0 16px; }
.swp-undo:disabled { opacity: 0.35; cursor: default; transform: none; }
.swp-generate { margin-left: auto; }

/* Editable color columns */
.swp-band {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	padding: 0 4px 14px;
	transition: background 200ms ease-out;
}

.swp-band-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: color-mix(in srgb, currentColor 14%, transparent);
	color: inherit;
	cursor: pointer;
	opacity: 0.75;
	transition: opacity var(--ease), background var(--ease);
}

.swp-band:hover .swp-band-btn,
.swp-band-btn:focus-visible,
.swp-band-btn:focus-within { opacity: 1; }

.swp-band-btn:hover { background: color-mix(in srgb, currentColor 26%, transparent); }

.swp-band.is-locked [data-lock] {
	opacity: 1;
	background: color-mix(in srgb, currentColor 30%, transparent);
}

/* The native color picker sits invisibly over the pencil icon */
.swp-band-btn input[type="color"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
	border: 0;
	padding: 0;
}

.swp-band-hex {
	max-width: 100%;
	padding: 4px 6px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font-family: var(--mono);
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	overflow: hidden;
	text-overflow: ellipsis;
}

.swp-band-hex:hover { background: color-mix(in srgb, currentColor 14%, transparent); }

.swp-strip-empty {
	margin: 0;
	padding: 28px 16px;
	border-radius: 14px;
	background: var(--card);
	color: var(--text-2);
	text-align: center;
}

@media (max-width: 600px) {
	.swp-create-bar { gap: 6px; }
	.swp-generate { margin-left: 0; flex: 1; }
	.swp-band { gap: 6px; padding-bottom: 10px; }
	.swp-band-btn { width: 30px; height: 30px; }
	.swp-band-btn svg { width: 15px; height: 15px; }
	.swp-band-hex { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 0.68rem; padding: 4px 2px; }
}

/* ---------- "In use" preview ---------- */

.swp-preview {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 16px;
	border-radius: 18px;
	background: var(--card);
}

.swp-preview-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 12px;
}

.swp-preview-label {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-3);
}

.swp-views { display: flex; gap: 4px; }

/* All three designs share the palette roles set by palettes.js:
   --m-bg (lightest) · --m-ink (darkest) · --m-main (boldest) · --m-accent · --m-soft */
.swp-mocks {
	position: relative;
	flex: 1;
	min-height: 300px;
	display: grid;
}

.swp-mock {
	grid-area: 1 / 1;
	position: relative;
	overflow: hidden;
	border-radius: 14px;
	font-family: var(--sans);
	opacity: 0;
	visibility: hidden;
	transition: opacity 250ms ease, visibility 0s linear 250ms, background 300ms ease;
}

.swp-mock.is-active { opacity: 1; visibility: visible; transition: opacity 250ms ease, background 300ms ease; }

/* ---------- Website ---------- */

.swp-mock--web {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 16px 18px;
	background: var(--m-bg);
	color: var(--m-ink);
}

.w-nav { display: flex; align-items: center; justify-content: space-between; font-size: 0.72rem; }
.w-logo { display: flex; align-items: center; gap: 6px; font-weight: 900; font-size: 0.85rem; }
.w-logo i { width: 14px; height: 14px; border-radius: 4px; background: var(--m-main); }
.w-links { display: flex; gap: 12px; font-weight: 600; opacity: 0.75; }

.w-hero {
	flex: 1;
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	gap: 14px;
	align-items: center;
}

.w-copy small {
	display: inline-block;
	margin-bottom: 6px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--m-soft);
	color: var(--m-ink);
	font-size: 0.62rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.w-copy b {
	display: block;
	font-size: clamp(1.15rem, 2vw, 1.5rem);
	font-weight: 900;
	line-height: 1.05;
	letter-spacing: -0.03em;
}

.w-copy p { margin: 6px 0 10px; font-size: 0.72rem; line-height: 1.4; opacity: 0.75; }

.w-btn {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--m-main);
	color: var(--m-main-on);
	font-size: 0.7rem;
	font-weight: 800;
}

.w-art { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--m-ink); }
.w-art .a { position: absolute; width: 70%; height: 70%; left: -10%; bottom: -10%; border-radius: 50%; background: var(--m-main); }
.w-art .b { position: absolute; width: 45%; height: 45%; right: 10%; top: 12%; border-radius: 50%; background: var(--m-accent); }
.w-art .c { position: absolute; width: 40%; height: 18%; right: 0; bottom: 18%; background: var(--m-soft); }

.w-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	padding-top: 12px;
	border-top: 1px solid color-mix(in srgb, var(--m-ink) 18%, transparent);
	font-size: 0.65rem;
	font-weight: 600;
}

.w-stats span { opacity: 0.85; }
.w-stats b { display: block; font-size: 1rem; font-weight: 900; color: var(--m-main); filter: saturate(1.1); }

/* ---------- Poster ---------- */

.swp-mock--poster {
	background: var(--m-main);
	color: var(--m-bg);
}

.p-sun  { position: absolute; width: 55%; aspect-ratio: 1; right: -12%; top: -14%; border-radius: 50%; background: var(--m-accent); }
.p-hill { position: absolute; width: 120%; aspect-ratio: 1; left: -10%; bottom: -78%; border-radius: 50%; background: var(--m-ink); }
.p-band { position: absolute; left: 0; right: 0; top: 46%; height: 9%; background: var(--m-soft); }
.p-dot  { position: absolute; width: 12%; aspect-ratio: 1; left: 12%; top: 18%; border-radius: 50%; background: var(--m-bg); }

.p-title {
	position: absolute;
	left: 8%;
	bottom: 16%;
	font-size: clamp(2rem, 4.4vw, 3.2rem);
	font-weight: 900;
	line-height: 0.88;
	letter-spacing: -0.05em;
	text-transform: uppercase;
	color: var(--m-bg);
}

.p-meta {
	position: absolute;
	left: 8%;
	bottom: 7%;
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--m-bg);
	opacity: 0.9;
}

/* ---------- Brand ---------- */

.swp-mock--brand {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;
	background: var(--m-bg);
	color: var(--m-ink);
}

.b-card {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 2px;
	min-height: 110px;
	padding: 14px 16px;
	border-radius: 10px;
	background: var(--m-ink);
	color: var(--m-ink-on);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
	position: relative;
}

.b-mark { position: absolute; top: 14px; left: 16px; display: flex; }
.b-mark i { width: 22px; height: 22px; border-radius: 50%; background: var(--m-main); }
.b-mark i + i { margin-left: -8px; border-radius: 5px; background: var(--m-accent); }
.b-name { font-size: 0.95rem; font-weight: 900; letter-spacing: -0.01em; }
.b-role { font-size: 0.68rem; opacity: 0.75; }

.b-chips { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; min-height: 64px; }

.b-chips span {
	display: flex;
	align-items: flex-end;
	padding: 5px;
	border-radius: 6px;
	font-family: var(--mono);
	font-size: 0.56rem;
	font-weight: 600;
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--m-ink) 12%, transparent);
}

.b-type { display: flex; align-items: center; gap: 12px; }
.b-type b { font-size: 2.4rem; font-weight: 900; line-height: 1; color: var(--m-main); }
.b-type span { font-size: 0.7rem; line-height: 1.4; opacity: 0.85; }
.b-type strong { display: block; font-size: 0.85rem; font-weight: 900; opacity: 1; }

/* ---------- Filmstrip picker ---------- */

.swp-picker { margin-top: 4px; }

.swp-picker-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	margin-bottom: 12px;
}

.swp-strip-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}

.swp-strip-arrow { flex-shrink: 0; }

.swp-strip {
	position: relative; /* item offsetLeft is measured from the strip */
	flex: 1;
	min-width: 0;
	display: flex;
	gap: 10px;
	padding: 10px calc(50% - 60px);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	border-radius: 14px;
	background: var(--card);
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.swp-strip::-webkit-scrollbar { display: none; }
.swp-strip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.swp-item {
	flex: 0 0 120px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 6px 6px 8px;
	border: 0;
	border-radius: 12px;
	background: var(--card-2);
	color: var(--text);
	text-align: left;
	cursor: pointer;
	scroll-snap-align: center;
	opacity: 0.6;
	transform: scale(0.92);
	transition: transform 200ms ease-out, opacity 200ms ease-out, box-shadow 200ms ease-out;
}

.swp-item:hover { opacity: 0.9; }

.swp-item[aria-selected="true"] {
	opacity: 1;
	transform: scale(1);
	box-shadow: 0 0 0 2px #fff;
}

.swp-item-bands {
	display: flex;
	height: 64px;
	margin-bottom: 4px;
	border-radius: 8px;
	overflow: hidden;
}

.swp-item-bands i { flex: 1; }

.swp-item-label {
	font-size: 0.85rem;
	font-weight: 800;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.swp-item-sub {
	font-size: 0.72rem;
	color: var(--text-3);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.swp-strip-hint {
	margin: 10px 0 0;
	font-size: 0.85rem;
	color: var(--text-3);
	text-align: center;
}

@media (max-width: 860px) {
	.swp-studio {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "main" "picker" "preview";
	}
	.swp-mocks { min-height: 280px; }
}

@media (max-width: 600px) {
	.swp-strip-arrow { display: none; }
	.swp-strip { padding: 10px calc(50% - 52px); }
	.swp-item { flex-basis: 104px; }
	.swp-item-bands { height: 54px; }
	.swp-stage-bands > button { font-size: 0.68rem; writing-mode: vertical-rl; transform: rotate(180deg); justify-content: flex-start; padding: 12px 0; align-items: center; }
	.swp-stage-info { padding: 18px; }
}


/* ============================================================
   ADS (homepage spacing — base styles in assets/ads.css)
   ============================================================ */

.swh .sw-ad { margin: clamp(40px, 5vw, 64px) auto 0; }


/* ============================================================
   TOAST
   ============================================================ */

.swh-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 1000;
	transform: translate(-50%, 16px);
	padding: 12px 20px;
	border-radius: 8px;
	background: #fff;
	color: #000;
	font-size: 0.95rem;
	font-weight: 600;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
	opacity: 0;
	pointer-events: none;
	transition: opacity 180ms ease-out, transform 180ms ease-out;
}

.swh-toast.is-on { opacity: 1; transform: translate(-50%, 0); }


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
	.swh *,
	.swh *::before,
	.swh *::after {
		transition: none !important;
		animation: none !important;
	}
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 960px) {
	.swh-topics { grid-template-columns: minmax(0, 1fr); }
	.swh-lookup { grid-template-columns: minmax(0, 1fr); }
	.swh-lookup-swatch { min-height: 220px; }
}

@media (max-width: 760px) {
	.swh-slide { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 22px; gap: 18px; }
	.swh-slide-art { order: -1; height: 170px; }
	.swh-hart-use .chip { display: none; }
	.swh-hero-tab-sub { display: none; }
	.swh-starter { flex-wrap: wrap; gap: 6px 12px; }

	/* Billboard stacks: colors on top, text below */
	.swh-billboard { height: auto; display: flex; flex-direction: column; }
	.swh-billboard::after { display: none; }
	.swh-bb-bands { position: relative; height: 180px; }
	.swh-bb-bands button { font-size: 0.72rem; padding: 12px 6px; justify-content: center; }
	.swh-bb-bands button span { writing-mode: vertical-rl; transform: rotate(180deg); }
	.swh-bb-info { position: static; padding: 20px; max-width: none; }

	.swh-sec-tools .swh-arrow { display: none; }
	.swh-rank-num { font-size: 6.5rem; width: 56px; padding-top: 30px; }
	.swh-pal-cover button span { opacity: 0.85; }
}

@media (max-width: 480px) {
	.swh-formats { grid-template-columns: minmax(0, 1fr); }
	.swh-contrast { grid-template-columns: minmax(0, 1fr); }
	.swh-ramp button { height: 36px; }
}


/* ============================================================
   AI ASSISTANT INFORMATION (page-templates/ai-info.php)
   A plain reference page: one readable column, full URLs visible.
   ============================================================ */

.swai-kicker {
	margin: 0 0 10px;
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--green);
}

.swai a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.3); text-underline-offset: 3px; }
.swai a:hover { text-decoration-color: currentColor; }

.swai-body {
	max-width: calc(820px + 2 * var(--gutter));
	padding-bottom: clamp(48px, 6vw, 80px);
	font-size: 1.05rem;
	line-height: 1.65;
	color: var(--text-2);
}

.swai-sec {
	padding: clamp(24px, 3vw, 36px) 0;
	border-top: 1px solid var(--line);
}

.swai-sec:first-child { border-top: 0; padding-top: 0; }
.swai-sec .swh-h2 { margin-bottom: 12px; }
.swai-sec p { margin: 0 0 14px; }

.swai-lead { font-size: 1.15rem; color: var(--text); }

.swai-h3 {
	margin: 28px 0 4px;
	font-size: 1.15rem;
	font-weight: 800;
	color: var(--text);
}

.swai-group-desc { font-size: 0.95rem; }

.swai-facts,
.swai-rules ol {
	margin: 0;
	padding-left: 1.3em;
}

.swai-facts li,
.swai-rules li { margin-bottom: 8px; }
.swai-rules li::marker { color: var(--text); font-weight: 800; }

.swai-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 12px;
}

.swai-item {
	padding: 16px 18px;
	border-radius: 12px;
	background: var(--card);
}

.swai-sec .swai-item p { margin: 0; }

.swai-item-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
}

.swai-item-head a {
	font-weight: 800;
	font-size: 1.05rem;
	text-decoration: none;
}

.swai-item-head a:hover { text-decoration: underline; }

.swai-url {
	min-width: 0;
	font-family: var(--mono);
	font-size: 0.8rem;
	color: var(--text-3);
	overflow-wrap: anywhere;
}

.swai-item-desc { margin-top: 4px !important; font-size: 0.97rem; }

.swai-sub {
	margin: 8px 0 0;
	padding-left: 1.2em;
	font-size: 0.93rem;
}

.swai-sub li { margin-bottom: 2px; }


/* ============================================================
   LEARN HUB (module/learn/hub.php)
   Hero with a featured guide, "Start here" path, guides by topic,
   practice links. Topic accents come from --th (hue) set per topic.
   Guide cards (.swk-card) and illustrations (.swk-art) live in assets/learn.css.
   ============================================================ */

.swk { --learn: #e9c46a; padding-bottom: clamp(48px, 6vw, 80px); }

.swk-kicker {
	margin: 0 0 12px;
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--learn);
}

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

.swk-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(32px, 5vw, 72px);
	padding-top: clamp(36px, 6vw, 80px);
}

.swk-hero-h1 {
	margin: 0 0 16px;
	font-size: clamp(2.6rem, 6.2vw, 4.8rem);
	font-weight: 900;
	letter-spacing: -0.045em;
	line-height: 0.98;
	color: var(--text);
}

.swk-hero-sub {
	max-width: 34em;
	margin: 0 0 28px;
	font-size: clamp(1.02rem, 1.4vw, 1.18rem);
	line-height: 1.6;
	color: var(--text-2);
}

/* Search */
.swk-search {
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 560px;
	padding: 6px 6px 6px 18px;
	border-radius: 999px;
	background: var(--card);
	box-shadow: inset 0 0 0 1px var(--line);
	color: var(--text-3);
	transition: box-shadow var(--ease);
}

.swk-search:focus-within { box-shadow: inset 0 0 0 2px var(--learn); }
.swk-search svg { flex-shrink: 0; }

.swk-search input {
	flex: 1;
	min-width: 0;
	height: 44px;
	border: 0;
	background: transparent;
	color: var(--text);
	font-family: var(--sans);
	font-size: 1rem;
	outline: 0;
}

.swk-search input::placeholder { color: var(--text-3); }
.swk-search .swh-btn { padding: 10px 20px; flex-shrink: 0; }

/* Topic jump links */
.swk-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.swk-jump a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-radius: 999px;
	background: var(--card);
	color: var(--text);
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
	transition: background var(--ease);
}

.swk-jump a::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: hsl(var(--th) 70% 58%); }
.swk-jump a span { color: var(--text-3); font-weight: 600; }
.swk-jump a:hover { background: var(--card-2); color: var(--text); }

/* Featured guide, sitting on a little stack of "more guides" */
.swk-feature-wrap { position: relative; padding: 0 14px 14px 0; }

.swk-feature-wrap::before,
.swk-feature-wrap::after {
	content: '';
	position: absolute;
	border-radius: 22px;
	background: var(--card-2);
}

.swk-feature-wrap::before { inset: 14px 0 0 14px; background: var(--card); opacity: 0.6; }
.swk-feature-wrap::after  { inset: 7px 7px 7px 7px; opacity: 0.8; }

.swk-feature {
	position: relative;
	z-index: 1;
	display: block;
	border-radius: 22px;
	overflow: hidden;
	background: var(--card-2);
	color: var(--text);
	text-decoration: none;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
	transition: transform var(--ease);
}

.swk-feature:hover { transform: translateY(-3px); color: var(--text); }
.swk-feature[hidden] { display: none; }

.swk-feature-body { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px 24px; }

.swk-feature-kicker {
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--learn);
}

.swk-feature-title { font-size: clamp(1.4rem, 2.2vw, 1.8rem); font-weight: 900; letter-spacing: -0.02em; line-height: 1.15; }
.swk-feature-desc { font-size: 0.98rem; line-height: 1.55; color: var(--text-2); }
.swk-feature-go { margin-top: 6px; font-weight: 800; }
.swk-feature-go em { margin-left: 6px; font-style: normal; font-weight: 600; font-size: 0.85rem; color: var(--text-3); }

/* ---------- Section heads ---------- */

.swk-sec-head { margin-bottom: 20px; }
.swk-progress { color: var(--green); font-weight: 700; }

/* ---------- Start here path ---------- */

.swk-path {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 16px;
}

.swk-path a {
	display: flex;
	flex-direction: column;
	gap: 8px;
	color: var(--text);
	text-decoration: none;
}

.swk-path-art {
	position: relative;
	display: block;
	border-radius: 12px;
	overflow: hidden;
	transition: transform var(--ease), box-shadow var(--ease);
}

.swk-path a:hover .swk-path-art { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45); }

.swk-step {
	position: absolute;
	left: 8px;
	top: 8px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 0.85rem;
	font-weight: 800;
	backdrop-filter: blur(4px);
}

.swk-step i { display: none; font-style: normal; }
.swk-path a.is-read .swk-step { background: var(--green); color: #000; }
.swk-path a.is-read .swk-step b { display: none; }
.swk-path a.is-read .swk-step i { display: inline; }

.swk-path-name { font-size: 0.98rem; font-weight: 800; line-height: 1.25; }

.swk-path-time { font-size: 0.8rem; font-weight: 600; color: var(--text-3); }


/* ---------- Topics: heading on the left, guides on the right ---------- */

.swk-topic {
	display: grid;
	grid-template-columns: minmax(200px, 270px) minmax(0, 1fr);
	gap: clamp(24px, 4vw, 56px);
	align-items: start;
	scroll-margin-top: 24px;
	padding-top: clamp(28px, 4vw, 40px);
	border-top: 1px solid var(--line);
}

.swk-topic-head { position: sticky; top: 24px; }
.swk-topic-head .swh-h2 { margin-bottom: 8px; }

.swk-topic-count {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: hsl(var(--th) 70% 66%);
}

.swk-topic-count::before { content: ''; width: 18px; height: 4px; border-radius: 2px; background: currentColor; }








/* ---------- Tablet / phone ---------- */

@media (max-width: 1100px) {
	/* The path becomes a swipeable row */
	.swk-path {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		margin: 0 calc(-1 * var(--gutter));
		padding: 0 var(--gutter) 6px;
		scroll-padding: 0 var(--gutter);
	}
	.swk-path::-webkit-scrollbar { display: none; }
	.swk-path li { flex: 0 0 min(220px, 58vw); scroll-snap-align: start; }
}

@media (max-width: 900px) {
	.swk-hero { grid-template-columns: 1fr; }
	.swk-feature-wrap { max-width: 560px; }
	.swk-topic { grid-template-columns: 1fr; gap: 16px; }
	.swk-topic-head { position: static; }
}

@media (max-width: 640px) {
	.swk-search { padding-left: 14px; }
	.swk-search .swh-btn { padding: 10px 14px; }
}
