/* ==========================================================================
   HubHype — main stylesheet
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
	--bg: #f7f6fb;
	--bg-2: #efedf6;
	--surface: #ffffff;
	--surface-2: #f3f1f9;
	--text: #12111a;
	--muted: #5e5b70;
	--border: rgba(18, 17, 26, 0.09);
	--shadow: 0 1px 2px rgba(18, 17, 26, 0.04), 0 8px 24px -8px rgba(18, 17, 26, 0.12);
	--shadow-lg: 0 2px 4px rgba(18, 17, 26, 0.04), 0 24px 48px -16px rgba(18, 17, 26, 0.22);
	--glass: rgba(247, 246, 251, 0.72);
	--chip-l: 42%;
	--glow-a: 0.28;

	--brand-1: #6d5bff;
	--brand-2: #ff2d78;
	--brand-3: #ff9f1c;
	--brand: linear-gradient(120deg, var(--brand-1), var(--brand-2) 55%, var(--brand-3));

	--font-display: "Bricolage Grotesque", "Mukta", ui-sans-serif, system-ui, sans-serif;
	--font-body: "Inter", "Mukta", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

	--radius: 20px;
	--radius-sm: 12px;
	--container: 1240px;
	--gutter: clamp(16px, 4vw, 32px);
	--header-h: 72px;
	--ease: cubic-bezier(0.22, 1, 0.36, 1);

	color-scheme: light;
}

[data-theme="dark"] {
	--bg: #0b0b14;
	--bg-2: #10101c;
	--surface: #14141f;
	--surface-2: #1b1b29;
	--text: #f3f2fa;
	--muted: #a19eb6;
	--border: rgba(255, 255, 255, 0.08);
	--shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -8px rgba(0, 0, 0, 0.5);
	--shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
	--glass: rgba(11, 11, 20, 0.7);
	--chip-l: 72%;
	--glow-a: 0.42;

	color-scheme: dark;
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 400 17px/1.65 var(--font-body);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
	transition: background-color 0.3s, color 0.3s;
}

img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.02em; margin: 0; font-weight: 700; }
p { margin: 0; }
::selection { background: var(--brand-2); color: #fff; }
:focus-visible { outline: 2px solid var(--brand-1); outline-offset: 3px; border-radius: 6px; }

.screen-reader-text,
.skip-link:not(:focus) {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 999; padding: 10px 16px; background: var(--text); color: var(--bg); border-radius: 10px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 860px; }
.container--page { max-width: 1040px; }

.icon { flex-shrink: 0; }

/* ---------- Shared bits ---------- */
.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font: 600 12px/1 var(--font-body);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 12px;
}

.gradient-text {
	background: var(--brand);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.pulse {
	width: 8px; height: 8px;
	border-radius: 50%;
	background: #22c55e;
	box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
	animation: pulse 2s infinite;
}
@keyframes pulse {
	70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
	100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.chip {
	--h: 252;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 999px;
	font: 600 12px/1 var(--font-body);
	letter-spacing: 0.02em;
	color: hsl(var(--h) 85% var(--chip-l));
	background: hsl(var(--h) 90% 60% / 0.13);
	border: 1px solid hsl(var(--h) 90% 60% / 0.2);
	transition: transform 0.2s var(--ease), background 0.2s;
	white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip:hover,
.chip.is-active { background: hsl(var(--h) 90% 60% / 0.24); transform: translateY(-1px); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 22px;
	border-radius: 999px;
	border: 0;
	font: 600 15px/1 var(--font-body);
	transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s;
	white-space: nowrap;
}
.btn .icon { transition: transform 0.25s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn--primary { background: var(--brand); background-size: 160% 100%; color: #fff; box-shadow: 0 8px 24px -8px rgba(255, 45, 120, 0.6); }
.btn--primary:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 14px 32px -10px rgba(255, 45, 120, 0.7); }
.btn--ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn--ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--light { background: #fff; color: #12111a; }
.btn--light:hover { transform: translateY(-2px); }

.icon-btn {
	display: inline-grid;
	place-items: center;
	width: 42px; height: 42px;
	border-radius: 50%;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
	transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s;
}
.icon-btn:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--brand-1) 40%, transparent); }

.link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	font-size: 15px;
	color: var(--muted);
	transition: color 0.2s, gap 0.2s;
}
.link-arrow:hover { color: var(--text); gap: 10px; }

.meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	font-size: 13px;
	color: var(--muted);
}
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta__dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.meta__avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.meta__author { font-weight: 600; color: var(--text); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	height: var(--header-h);
	background: var(--glass);
	backdrop-filter: saturate(180%) blur(16px);
	-webkit-backdrop-filter: saturate(180%) blur(16px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.3s, background 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }

.site-header__inner { display: flex; align-items: center; gap: 24px; height: 100%; }

.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand__mark svg { display: block; transition: transform 0.4s var(--ease); }
.brand:hover .brand__mark svg { transform: rotate(-8deg) scale(1.05); }
.brand__word { font: 800 22px/1 var(--font-display); letter-spacing: -0.03em; }
.custom-logo { max-height: 44px; width: auto; }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__list a {
	position: relative;
	display: block;
	padding: 10px 14px;
	border-radius: 999px;
	font-weight: 500;
	font-size: 15px;
	color: var(--muted);
	transition: color 0.2s, background 0.2s;
}
.nav__list a:hover,
.nav__list .current-menu-item > a,
.nav__list .current_page_item > a,
.nav__list .current-menu-ancestor > a { color: var(--text); background: var(--surface-2); }
.nav__list .sub-menu {
	position: absolute;
	min-width: 200px;
	list-style: none;
	margin: 8px 0 0;
	padding: 8px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-lg);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: 0.2s var(--ease);
}
.nav__list li { position: relative; }
.nav__list li:hover > .sub-menu,
.nav__list li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav__list .lang-item img { display: inline-block; vertical-align: middle; }

.site-header__actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle__moon,
[data-theme="dark"] .theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__moon { display: inline-flex; }
.theme-toggle__sun { display: inline-flex; }
.nav-toggle { display: none; }
.nav-toggle__close { display: none; }

@media (max-width: 900px) {
	.nav-toggle { display: inline-grid; }
	.nav {
		/* The header's backdrop-filter makes it the containing block for fixed children,
		   so size the drawer explicitly from the header's bottom edge. */
		position: fixed;
		top: 100%;
		left: 0;
		right: 0;
		height: calc(100dvh - var(--header-h));
		margin: 0;
		padding: 24px var(--gutter);
		background: var(--bg);
		opacity: 0; visibility: hidden; transform: translateY(-8px);
		transition: 0.3s var(--ease);
		overflow-y: auto;
	}
	.nav__list { flex-direction: column; align-items: stretch; gap: 4px; }
	.nav__list a { font: 700 28px/1.2 var(--font-display); padding: 14px 4px; color: var(--text); border-radius: 0; border-bottom: 1px solid var(--border); }
	.nav__list a:hover { background: none; }
	.nav__list .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 16px; background: none; }
	.nav__list .sub-menu a { font-size: 20px; }
	.nav-open .nav { opacity: 1; visibility: visible; transform: none; }
	.nav-open .nav-toggle__open { display: none; }
	.nav-open .nav-toggle__close { display: inline-flex; }
	.nav-open { overflow: hidden; }
	.site-header__actions { margin-left: auto; }
}

/* ---------- Reading progress ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.admin-bar .progress { top: 32px; }
.progress__bar { display: block; height: 100%; width: 100%; background: var(--brand); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Search overlay ---------- */
.search-overlay {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: grid;
	align-items: start;
	padding-top: 14vh;
	background: color-mix(in srgb, var(--bg) 82%, transparent);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	animation: fade 0.25s var(--ease);
}
.search-overlay[hidden] { display: none; }
.search-overlay__panel { position: relative; max-width: 760px; }
.search-overlay__close { position: absolute; top: -64px; right: var(--gutter); }
.search-overlay__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
@keyframes fade { from { opacity: 0; } }

.search-form {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 8px 8px 20px;
	border-radius: 999px;
	background: var(--surface);
	border: 1px solid var(--border);
	box-shadow: var(--shadow);
	transition: border-color 0.2s, box-shadow 0.2s;
}
.search-form:focus-within { border-color: color-mix(in srgb, var(--brand-1) 50%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-1) 15%, transparent); }
.search-form > .icon { color: var(--muted); }
.search-form__input { flex: 1; min-width: 0; border: 0; background: none; padding: 10px 4px; font: 500 18px/1.2 var(--font-body); color: var(--text); outline: none; }
.search-form__input::-webkit-search-cancel-button { display: none; }
@media (max-width: 520px) {
	.search-form__btn { padding: 12px 16px; }
	.search-form__input { font-size: 16px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(32px, 6vw, 72px) 0 clamp(32px, 5vw, 56px); overflow: hidden; }
.hero__glow,
.article__glow {
	position: absolute;
	inset: -20% -10% auto;
	height: 640px;
	pointer-events: none;
	background:
		radial-gradient(40% 50% at 15% 30%, rgba(109, 91, 255, var(--glow-a)), transparent 70%),
		radial-gradient(35% 45% at 85% 20%, rgba(255, 45, 120, var(--glow-a)), transparent 70%),
		radial-gradient(30% 40% at 60% 70%, rgba(255, 159, 28, calc(var(--glow-a) * 0.7)), transparent 70%);
	filter: blur(20px);
	animation: drift 18s ease-in-out infinite alternate;
	z-index: 0;
}
@keyframes drift { to { transform: translate3d(3%, 4%, 0) scale(1.06); } }
.hero > .container { position: relative; z-index: 1; }
.hero__head { max-width: 820px; margin-bottom: clamp(28px, 4vw, 44px); }
.hero__title { font-size: clamp(40px, 7vw, 84px); font-weight: 800; letter-spacing: -0.045em; line-height: 0.98; }
.hero__sub { margin-top: 18px; max-width: 600px; font-size: 16px; color: var(--muted); }

/* ---------- Bento ---------- */
.bento {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(12, 1fr);
	grid-template-rows: repeat(2, minmax(250px, 1fr));
}
.bento__lead { grid-column: span 6; grid-row: span 2; }
.bento__side { grid-column: span 3; }
.bento__side:nth-of-type(2) { grid-row: 1; grid-column: 7 / span 3; }
.bento__side:nth-of-type(3) { grid-row: 2; grid-column: 7 / span 3; }
.bento__trend { grid-column: 10 / span 3; grid-row: 1 / span 2; }
.bento > * { min-height: 0; }
.bento .card { height: 100%; }

@media (max-width: 1080px) {
	.bento { grid-template-rows: auto; }
	.bento__lead { grid-column: 1 / -1; grid-row: auto; min-height: 460px; }
	.bento__side:nth-of-type(2),
	.bento__side:nth-of-type(3) { grid-row: auto; grid-column: span 6; min-height: 280px; }
	.bento__trend { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 640px) {
	.bento { gap: 12px; }
	.bento__lead { min-height: 420px; }
	.bento__side:nth-of-type(2),
	.bento__side:nth-of-type(3) { grid-column: 1 / -1; min-height: 240px; }
}

/* ---------- Trending panel ---------- */
.trend-panel {
	display: flex;
	flex-direction: column;
	padding: 22px;
	border-radius: var(--radius);
	background: var(--surface);
	border: 1px solid var(--border);
	box-shadow: var(--shadow);
}
.trend-panel__title { display: flex; align-items: center; gap: 8px; font-size: 18px; margin-bottom: 8px; }
.trend-panel__title .icon { color: var(--brand-2); }
.trend-list { list-style: none; margin: 0; padding: 0; counter-reset: t; display: flex; flex-direction: column; flex: 1; justify-content: space-between; }
.trend-list li { counter-increment: t; border-top: 1px solid var(--border); }
.trend-list li:first-child { border-top: 0; }
.trend-list a { display: grid; grid-template-columns: 34px 1fr; gap: 0 10px; padding: 12px 0; }
.trend-list a::before {
	content: counter(t, decimal-leading-zero);
	grid-row: span 2;
	font: 800 22px/1 var(--font-display);
	background: var(--brand);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	padding-top: 2px;
}
.trend-list__title { font: 600 15px/1.35 var(--font-display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color 0.2s; }
.trend-list a:hover .trend-list__title { color: var(--brand-2); }
.trend-list__meta { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- Cards ---------- */
.card {
	--h: 252;
	position: relative;
	display: flex;
	flex-direction: column;
	border-radius: var(--radius);
	background: var(--surface);
	border: 1px solid var(--border);
	overflow: hidden;
	transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s;
	isolation: isolate;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: hsl(var(--h) 80% 60% / 0.35); }
.card__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.card:hover .card__media img { transform: scale(1.06); }
.card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px 22px 22px; flex: 1; }
.card__title { font-size: 20px; line-height: 1.25; font-weight: 700; }
.card__title a { background-image: linear-gradient(currentColor, currentColor); background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 0.35s var(--ease); }
.card:hover .card__title a { background-size: 100% 2px; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card .chip { position: relative; z-index: 2; }
.card__excerpt { color: var(--muted); font-size: 15px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: auto; }

.media-fallback {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	background:
		radial-gradient(60% 80% at 20% 20%, hsl(var(--h) 90% 65% / 0.9), transparent),
		radial-gradient(60% 80% at 90% 90%, hsl(calc(var(--h) + 60) 90% 60% / 0.9), transparent),
		hsl(var(--h) 60% 25%);
}
.media-fallback span { font: 800 clamp(56px, 8vw, 120px)/1 var(--font-display); color: rgba(255, 255, 255, 0.9); }

/* overlay card */
.card--overlay { border: 0; min-height: 250px; color: #fff; background: #111; }
.card--overlay .card__media { position: absolute; inset: 0; aspect-ratio: auto; }
.card--overlay .card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 8, 14, 0) 25%, rgba(8, 8, 14, 0.55) 55%, rgba(8, 8, 14, 0.92)); }
.card--overlay .card__body { position: relative; justify-content: flex-end; padding: clamp(20px, 3vw, 32px); z-index: 1; }
.card--overlay .card__excerpt,
.card--overlay .meta { color: rgba(255, 255, 255, 0.8); }
.card--overlay .chip { color: #fff; background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.22); backdrop-filter: blur(8px); }
.card--overlay .card__title { font-size: clamp(20px, 1.8vw, 24px); }
.bento__lead .card__title { font-size: clamp(28px, 3.6vw, 46px); letter-spacing: -0.03em; line-height: 1.05; max-width: 18ch; }
.bento__lead .card__excerpt { font-size: 16px; max-width: 54ch; }

/* wide card */
.card--wide { display: grid; grid-template-columns: 1.15fr 1fr; height: 100%; }
.card--wide .card__media { aspect-ratio: auto; min-height: 320px; }
.card--wide .card__body { padding: clamp(22px, 3vw, 36px); justify-content: center; }
.card--wide .card__title { font-size: clamp(24px, 2.4vw, 32px); }
@media (max-width: 760px) {
	.card--wide { grid-template-columns: 1fr; }
	.card--wide .card__media { min-height: 0; aspect-ratio: 16 / 10; }
}

/* mini card */
.card--mini { flex-direction: row; align-items: center; gap: 0; padding: 10px; border-radius: var(--radius-sm); }
.card--mini .card__media { width: 104px; flex-shrink: 0; aspect-ratio: 1; border-radius: 10px; }
.card--mini .card__body { padding: 4px 8px 4px 16px; gap: 8px; }
.card--mini .card__title { font-size: 16px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card--mini .media-fallback span { font-size: 40px; }
.card--mini:hover { transform: translateX(4px); }

/* ---------- Grids & sections ---------- */
.grid { display: grid; gap: 24px; }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }

.section { padding: clamp(40px, 6vw, 80px) 0; }
.section--flush { padding-top: 0; }
.section--tint { background: var(--bg-2); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: clamp(20px, 3vw, 32px); }
.section__title { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -0.035em; }

/* ---------- Ticker ---------- */
.ticker {
	display: flex;
	align-items: center;
	overflow: hidden;
	border-block: 1px solid var(--border);
	background: var(--surface);
}
.ticker__label {
	flex-shrink: 0;
	padding: 16px 20px;
	background: var(--brand);
	color: #fff;
	font: 700 13px/1 var(--font-body);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	position: relative;
	z-index: 1;
}
.ticker__track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker__items { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.ticker:hover .ticker__items { animation-play-state: paused; }
.ticker__items a { padding: 14px 28px; font: 600 15px/1.2 var(--font-display); white-space: nowrap; position: relative; color: var(--muted); transition: color 0.2s; }
.ticker__items a:hover { color: var(--text); }
.ticker__items a::after { content: "✦"; position: absolute; right: -6px; color: var(--brand-2); font-size: 11px; top: 50%; transform: translateY(-50%); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Topics ---------- */
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.topic {
	--h: 252;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 22px 22px 20px;
	border-radius: var(--radius);
	background: var(--surface);
	border: 1px solid var(--border);
	overflow: hidden;
	transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s;
}
.topic::before {
	content: "";
	position: absolute;
	width: 140px; height: 140px;
	right: -40px; top: -60px;
	border-radius: 50%;
	background: hsl(var(--h) 90% 62% / 0.35);
	filter: blur(30px);
	transition: transform 0.5s var(--ease);
}
.topic:hover { transform: translateY(-4px); border-color: hsl(var(--h) 85% 60% / 0.45); box-shadow: var(--shadow-lg); }
.topic:hover::before { transform: scale(1.6); }
.topic__name { position: relative; font: 700 19px/1.25 var(--font-display); }
.topic__count { position: relative; font-size: 13px; color: var(--muted); }
.topic__arrow {
	position: absolute; right: 18px; bottom: 18px;
	display: grid; place-items: center;
	width: 34px; height: 34px; border-radius: 50%;
	background: hsl(var(--h) 90% 60% / 0.16);
	color: hsl(var(--h) 85% var(--chip-l));
	transition: transform 0.3s var(--ease);
}
.topic:hover .topic__arrow { transform: rotate(-45deg); }

/* ---------- Spotlight ---------- */
.spotlight { position: relative; }
.spotlight::before {
	content: "";
	position: absolute;
	inset: 10% 0 auto;
	height: 70%;
	background: radial-gradient(50% 60% at 20% 50%, hsl(var(--h) 90% 60% / 0.1), transparent 70%);
	pointer-events: none;
}
.spotlight--flip::before { background: radial-gradient(50% 60% at 80% 50%, hsl(var(--h) 90% 60% / 0.1), transparent 70%); }
.spotlight__grid { position: relative; display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; }
.spotlight--flip .spotlight__grid { grid-template-columns: 1fr 1.7fr; }
.spotlight--flip .spotlight__grid > :first-child { order: 2; }
.spotlight__list { display: flex; flex-direction: column; gap: 12px; justify-content: center; }
@media (max-width: 960px) {
	.spotlight__grid,
	.spotlight--flip .spotlight__grid { grid-template-columns: 1fr; }
	.spotlight--flip .spotlight__grid > :first-child { order: 0; }
}

/* ---------- Page hero ---------- */
.page-hero { position: relative; padding: clamp(48px, 8vw, 96px) 0 clamp(36px, 5vw, 56px); overflow: hidden; }
.page-hero > .container { position: relative; z-index: 1; }
.page-hero__title { font-size: clamp(38px, 6vw, 72px); font-weight: 800; letter-spacing: -0.045em; line-height: 1; }
.page-hero__desc { margin-top: 14px; font-size: 18px; color: var(--muted); max-width: 640px; }
.page-hero__search { margin-top: 28px; max-width: 640px; }
.page-hero--404 { text-align: center; }
.page-hero--404 .page-hero__desc,
.page-hero--404 .page-hero__search { margin-inline: auto; }
.page-hero--404 .btn { margin-top: 24px; }
.big-404 { font: 800 clamp(120px, 22vw, 240px)/0.9 var(--font-display); letter-spacing: -0.06em; }

.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.breadcrumbs a:hover { color: var(--text); }

/* ---------- Article ---------- */
.article__head { position: relative; padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 4vw, 40px); overflow: hidden; text-align: center; }
.article__head > .container { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.article__glow { background: radial-gradient(45% 55% at 50% 30%, hsl(var(--h) 90% 60% / var(--glow-a)), transparent 70%), radial-gradient(30% 40% at 80% 20%, rgba(255, 45, 120, calc(var(--glow-a) * 0.6)), transparent 70%); }
.article__title { margin: 18px 0 16px; font-size: clamp(34px, 5.4vw, 64px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; text-wrap: balance; }
.article__dek { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 680px; margin-bottom: 20px; text-wrap: pretty; }
.article__head .meta { justify-content: center; font-size: 14px; }

.article__cover { margin: 0 auto clamp(32px, 5vw, 56px); }
.article__cover img { width: 100%; max-height: 640px; object-fit: cover; border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow-lg); }
.article__cover figcaption { text-align: center; color: var(--muted); font-size: 13px; margin-top: 10px; }

.article__layout { display: grid; grid-template-columns: 56px minmax(0, 720px) minmax(0, 300px); justify-content: center; gap: clamp(24px, 4vw, 56px); padding-bottom: clamp(48px, 6vw, 80px); }
.article__share { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.article__share-label { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); writing-mode: vertical-rl; transform: rotate(180deg); margin-bottom: 4px; }
.article__aside { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; display: flex; flex-direction: column; gap: 20px; }

@media (max-width: 1180px) {
	.article__layout { grid-template-columns: minmax(0, 720px); }
	.article__aside { display: none; }
	.article__share { position: static; flex-direction: row; justify-content: center; order: 2; }
	.article__share-label { writing-mode: horizontal-tb; transform: none; margin: 0 6px 0 0; }
}

.side-card { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.side-card__title { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-family: var(--font-body); font-weight: 600; margin-bottom: 12px; }
.toc__list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.toc__list a { display: block; padding: 7px 0 7px 14px; border-left: 2px solid var(--border); font-size: 14px; line-height: 1.4; color: var(--muted); transition: color 0.2s, border-color 0.2s; }
.toc__list a:hover { color: var(--text); }
.toc__list a.is-active { color: var(--text); border-left-color: var(--brand-2); font-weight: 600; }
.toc__list .toc--sub a { padding-left: 26px; font-size: 13px; }

/* ---------- Prose ---------- */
.prose { font-size: 16px; line-height: 1.8; }
.prose > * + *,
.prose .hh-text > * + *,
.prose .hh-list > * + *,
.prose .hh-col > * + * { margin-top: 1.15em; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5 { margin-top: 1.9em; margin-bottom: -0.2em; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h1,
.prose h2 { font-size: clamp(26px, 3vw, 34px); }
.prose h3 { font-size: clamp(22px, 2.4vw, 27px); }
.prose h4 { font-size: 22px; }
.prose h5 { font-size: 19px; }
.prose a { color: var(--brand-1); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--brand-1) 40%, transparent); transition: text-decoration-color 0.2s; }
[data-theme="dark"] .prose a { color: #a99fff; }
.prose a:hover { text-decoration-color: currentColor; }
.prose a.btn { text-decoration: none; color: inherit; }
.prose a.btn--primary { color: #fff; }
.prose strong { font-weight: 700; color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--brand-2); }
.prose img { border-radius: var(--radius-sm); margin-inline: auto; }
.prose figure { margin-inline: 0; }
.prose figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 8px; }
.prose blockquote {
	margin-inline: 0;
	padding: 20px 24px;
	border-left: 4px solid transparent;
	border-image: var(--brand) 1;
	background: var(--surface);
	font: 600 21px/1.5 var(--font-display);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.prose th { background: var(--surface-2); font-weight: 600; }
.prose hr { border: 0; height: 1px; background: var(--border); margin: 2.4em 0; }
.prose iframe { border-radius: var(--radius-sm); }
.prose code { font-size: 0.88em; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); }
.prose .wp-block-image { margin-block: 1.6em; }
.prose .alignwide { margin-inline: -60px; }

/* Legacy builder output */
.hh-row { display: flex; flex-wrap: wrap; gap: 24px; }
.hh-row + .hh-row { margin-top: 1.4em; }
.hh-col { flex: 1 1 calc(var(--w, 100%) - 24px); min-width: min(100%, 260px); }
.hh-col:only-child { flex-basis: 100%; }
.hh-list--check ul { list-style: none; padding-left: 0; }
.hh-list--check li { position: relative; padding-left: 34px; }
.hh-list--check li::before {
	content: "";
	position: absolute;
	left: 0; top: 0.32em;
	width: 22px; height: 22px;
	border-radius: 50%;
	background: var(--brand) ;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12'/%3E%3C/svg%3E") center/contain no-repeat;
}
.hh-list--check li::after {
	content: "";
	position: absolute;
	left: 7px; top: calc(0.32em + 5px);
	width: 6px; height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.hh-video { margin: 1.6em 0; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); background: #000; }
.hh-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.hh-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.hh-gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }
.hh-separator { border: 0; height: 12px; margin: 2.4em auto; width: 120px; background: radial-gradient(circle, var(--brand-2) 2px, transparent 2.5px) 0 50% / 16px 12px repeat-x; opacity: 0.7; }
.hh-heading { margin-top: 0.4em; }
.hh-gradient-text { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hh-dropcap { float: left; font: 800 3.4em/0.85 var(--font-display); margin: 0.08em 0.12em 0 0; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hh-actions { margin-top: 1.4em; }
.hh-posts { margin-block: 1em; font-size: 17px; line-height: 1.6; }
.hh-posts .card__title { margin: 0; }
.hh-posts > * + * { margin-top: 0 !important; }
.prose .hh-posts a { color: inherit; text-decoration: none; }
.prose .hh-posts p { margin: 0; }

.prose--page .hh-row { align-items: center; gap: clamp(24px, 4vw, 48px); }
.prose--page .hh-row + .hh-row { margin-top: clamp(32px, 5vw, 64px); }

/* Contact Form 7 */
.wpcf7 form { display: grid; gap: 16px; }
.wpcf7 label { display: block; font-weight: 600; font-size: 15px; }
.wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.wpcf7 textarea,
.wpcf7 select,
.comment-form input:not([type="submit"]):not([type="checkbox"]),
.comment-form textarea {
	width: 100%;
	margin-top: 6px;
	padding: 14px 16px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
	font: 400 16px/1.4 var(--font-body);
	transition: border-color 0.2s, box-shadow 0.2s;
}
.wpcf7 input:focus,
.wpcf7 textarea:focus,
.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: var(--brand-1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-1) 15%, transparent); }
.wpcf7 input[type="submit"] { justify-self: start; padding: 14px 28px; border: 0; border-radius: 999px; background: var(--brand); color: #fff; font: 600 16px/1 var(--font-body); cursor: pointer; transition: transform 0.2s; }
.wpcf7 input[type="submit"]:hover { transform: translateY(-2px); }
.wpcf7-response-output { border-radius: var(--radius-sm); margin: 0 !important; }

/* ---------- Post footer bits ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.tags a { padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; color: var(--muted); transition: color 0.2s, border-color 0.2s; }
.tags a:hover { color: var(--text); border-color: var(--brand-1); }

.author-box { display: flex; gap: 18px; align-items: center; margin-top: 40px; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.author-box img { border-radius: 50%; flex-shrink: 0; }
.author-box .eyebrow { margin-bottom: 4px; }
.author-box__name { font: 700 20px/1.2 var(--font-display); }
.author-box__bio { margin-top: 6px; color: var(--muted); font-size: 15px; }

.post-navigation { margin-top: 32px; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-navigation a { display: flex; flex-direction: column; height: 100%; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: transform 0.3s var(--ease), border-color 0.3s; }
.post-navigation a:hover { transform: translateY(-3px); border-color: var(--brand-1); }
.post-navigation .nav-next { text-align: right; grid-column: 2; }
.post-navigation .eyebrow { margin-bottom: 6px; }
.post-nav__title { font: 700 17px/1.3 var(--font-display); }
@media (max-width: 600px) {
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.post-navigation .nav-next { grid-column: 1; }
}

.comments { margin-top: 48px; }
.comments__title { font-size: 26px; margin-bottom: 20px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 32px; }
.comment-list .children { list-style: none; padding-left: 28px; }
.comment-body { padding: 20px; margin-bottom: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
.comment-content p + p { margin-top: 0.8em; }
.reply a { font-size: 14px; font-weight: 600; color: var(--brand-1); }
.comment-form { display: grid; gap: 14px; }
.comment-form label { font-weight: 600; font-size: 14px; }
.comment-form .form-submit { margin: 0; }
.comment-notes,
.logged-in-as { color: var(--muted); font-size: 14px; }

/* ---------- Pagination ---------- */
.pagination { margin-top: 48px; }
.pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; padding: 0; margin: 0; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 46px; height: 46px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; transition: transform 0.2s, border-color 0.2s; }
.pagination a.page-numbers:hover { transform: translateY(-2px); border-color: var(--brand-1); }
.pagination .current { background: var(--brand); color: #fff; border-color: transparent; }

.empty { text-align: center; padding: 48px 0; max-width: 560px; margin-inline: auto; }
.empty__emoji { font-size: 48px; }
.empty h2 { margin: 12px 0 8px; font-size: 30px; }
.empty p { color: var(--muted); margin-bottom: 24px; }

/* ---------- Footer ---------- */
.site-footer { position: relative; margin-top: clamp(40px, 6vw, 80px); padding-top: clamp(40px, 6vw, 72px); background: #0b0b14; color: #c9c7d8; overflow: hidden; }
[data-theme="dark"] .site-footer { background: #07070d; border-top: 1px solid var(--border); }
.site-footer .brand__word { color: #fff; }

.footer-cta {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: clamp(28px, 5vw, 48px);
	border-radius: calc(var(--radius) + 8px);
	background: var(--brand);
	color: #fff;
	overflow: hidden;
	margin-bottom: clamp(40px, 6vw, 72px);
}
.footer-cta::after { content: ""; position: absolute; inset: 0; background: radial-gradient(40% 80% at 90% 0%, rgba(255, 255, 255, 0.3), transparent 70%); pointer-events: none; }
.footer-cta .eyebrow { color: rgba(255, 255, 255, 0.85); }
.footer-cta__title { font-size: clamp(28px, 4vw, 46px); font-weight: 800; letter-spacing: -0.035em; color: #fff; }
.footer-cta .btn { position: relative; z-index: 1; }

.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.footer-about p { margin-top: 16px; max-width: 420px; font-size: 15px; color: #9b98ae; }
.footer-title { font: 600 13px/1 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; color: #fff; margin-bottom: 18px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a { font-size: 15px; color: #9b98ae; transition: color 0.2s, padding 0.2s; }
.footer-links a:hover { color: #fff; padding-left: 4px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 22px 0; font-size: 14px; color: #7f7c92; }
.to-top { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: #c9c7d8; font-size: 14px; font-weight: 600; }
.to-top:hover { color: #fff; }
.footer-wordmark {
	font: 800 clamp(80px, 21vw, 320px)/0.78 var(--font-display);
	letter-spacing: -0.06em;
	text-align: center;
	white-space: nowrap;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	user-select: none;
	margin-bottom: -0.08em;
}
@media (max-width: 760px) {
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-about { grid-column: 1 / -1; }
}

/* ---------- Gutenberg basics ---------- */
.alignleft { float: left; margin: 0.4em 1.4em 1em 0; }
.alignright { float: right; margin: 0.4em 0 1em 1.4em; }
.aligncenter { margin-inline: auto; }
.wp-caption-text { font-size: 14px; color: var(--muted); text-align: center; }
.wp-block-button__link { border-radius: 999px; background: var(--brand); color: #fff !important; text-decoration: none !important; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
	.js .reveal { opacity: 1; transform: none; }
}

/* Fallback art inside overlay cards: push the glyph aside so titles stay clean */
.card--overlay .media-fallback { place-items: start end; padding: 18px 26px; }
.card--overlay .media-fallback span { font-size: clamp(90px, 12vw, 180px); opacity: 0.35; }
.card--overlay .meta { margin-top: 0; }
.card--overlay .card__media::after { background: linear-gradient(180deg, rgba(8, 8, 14, 0.05) 0%, rgba(8, 8, 14, 0.25) 40%, rgba(8, 8, 14, 0.94) 100%); }
.wpcf7, .wpcf7 label, .wpcf7 p { text-align: left; }
.site-main + .site-footer, .section + .site-footer { margin-top: 0; }

/* ==========================================================================
   Dashboard-managed (ACF) elements
   ========================================================================== */

/* Uploaded logos: light-mode / dark-mode variants */
.brand__img { height: var(--logo-h, 40px); width: auto; display: block; }
.brand__img--dark { display: none; }
[data-theme="dark"] .brand__img--light:has(+ .brand__img--dark) { display: none; }
[data-theme="dark"] .brand__img--dark { display: block; }
.site-footer .brand__img--light:has(+ .brand__img--dark) { display: none; }
.site-footer .brand__img--dark { display: block; }

/* Social icons */
.social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.footer-social .icon-btn { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1); color: #e6e4f2; }
.footer-social .icon-btn:hover { background: var(--brand); border-color: transparent; color: #fff; }

/* Page / category header with background image */
.page-hero--image { color: #fff; min-height: clamp(280px, 40vw, 440px); display: flex; align-items: flex-end; }
.page-hero--image .container { width: 100%; }
.page-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.page-hero--image::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(8, 8, 14, 0.25), rgba(8, 8, 14, 0.85)); }
.page-hero--image > .container { z-index: 1; }
.page-hero--image .eyebrow,
.page-hero--image .page-hero__desc,
.page-hero--image .breadcrumbs,
.page-hero--image .breadcrumbs a { color: rgba(255, 255, 255, 0.85); }
.page-hero--image .chip { color: #fff; background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.25); }
.container--flush-top { padding-top: clamp(32px, 5vw, 56px); }
.page-hero .eyebrow + .page-hero__title { margin-top: 0; }

/* Topic cards with a category cover image */
.topic--image { min-height: 150px; justify-content: flex-end; color: #fff; border: 0; }
.topic--image::before { display: none; }
.topic--image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, hsl(var(--h) 60% 20% / 0.15), hsl(var(--h) 60% 10% / 0.88)); }
.topic__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.topic--image:hover .topic__img { transform: scale(1.06); }
.topic--image .topic__name,
.topic--image .topic__count,
.topic--image .topic__arrow { position: relative; z-index: 1; }
.topic--image .topic__count { color: rgba(255, 255, 255, 0.8); }
.topic--image .topic__arrow { position: absolute; color: #fff; background: rgba(255, 255, 255, 0.2); }

/* Footer CTA background image */
.footer-cta--image { background: #111; }
.footer-cta__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.footer-cta--image::before { content: ""; position: absolute; inset: 0; background: var(--brand); opacity: 0.75; mix-blend-mode: multiply; }
.footer-cta > div { position: relative; z-index: 1; }

/* Bento without the trending panel */
.bento--no-trend .bento__lead { grid-column: span 8; }
.bento--no-trend .bento__side:nth-of-type(2),
.bento--no-trend .bento__side:nth-of-type(3) { grid-column: 9 / span 4; }
@media (max-width: 1080px) {
	.bento--no-trend .bento__lead { grid-column: 1 / -1; }
	.bento--no-trend .bento__side:nth-of-type(2),
	.bento--no-trend .bento__side:nth-of-type(3) { grid-column: span 6; }
}
@media (max-width: 640px) {
	.bento--no-trend .bento__side:nth-of-type(2),
	.bento--no-trend .bento__side:nth-of-type(3) { grid-column: 1 / -1; }
}

/* 404 illustration */
.img-404 { max-width: min(420px, 80%); margin: 0 auto 24px; }

/* Check-mark lists (converted from Salient "fancy" lists): <ul class="hh-check"> */
.prose ul.hh-check { list-style: none; padding-left: 0; }
.prose ul.hh-check li { position: relative; padding-left: 34px; }
.prose ul.hh-check li::before { content: ""; position: absolute; left: 0; top: 0.32em; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); }
.prose ul.hh-check li::after { content: ""; position: absolute; left: 7px; top: calc(0.32em + 5px); width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ==========================================================================
   Mobile hardening
   ========================================================================== */

/* Long URLs / unbroken strings must wrap instead of widening the page */
.prose,
.card__title,
.trend-list__title,
.article__title,
.page-hero__title,
.comment-content,
.footer-about p { overflow-wrap: anywhere; word-break: normal; }
.prose pre { overflow-x: auto; max-width: 100%; }

/* Comfortable touch targets (≥ 32–44px) on touch screens */
@media (pointer: coarse), (max-width: 760px) {
	.chip { min-height: 32px; padding-inline: 14px; }
	.link-arrow { min-height: 40px; padding-block: 8px; }
	.footer-links { gap: 2px; }
	.footer-links a { display: inline-block; padding-block: 9px; }
	.to-top { min-height: 40px; padding: 8px 0; }
	.tags a { min-height: 36px; display: inline-flex; align-items: center; }
	.toc__list a { padding-block: 10px; }
	.breadcrumbs a { display: inline-block; padding-block: 6px; }
	.comment-form input[type="checkbox"] { width: 20px; height: 20px; vertical-align: middle; margin-right: 6px; }
	.pagination .page-numbers { min-width: 44px; height: 44px; }
	.ticker__items a { padding-block: 16px; }
}

/* Small phones (≤ 380px) */
@media (max-width: 380px) {
	:root { --gutter: 14px; --header-h: 64px; }
	.icon-btn { width: 40px; height: 40px; }
	.site-header__actions { gap: 6px; }
	.brand__word { font-size: 20px; }
	.brand__mark svg { width: 30px; height: 30px; }
	.hero__title { font-size: 36px; }
	.card__body { padding: 16px 18px 18px; }
	.card--overlay .card__body { padding: 18px; }
	.card--mini .card__media { width: 84px; }
	.topic { padding: 18px; }
	.footer-grid { gap: 28px 16px; }
	.search-form { padding-left: 14px; }
	.search-form__btn { padding: 12px 14px; font-size: 14px; }
}

/* Topics: compact 2-up grid on phones */
@media (max-width: 640px) {
	.topics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.topic { padding: 16px 14px; min-height: 104px; justify-content: flex-end; border-radius: 16px; }
	.topic__name { font-size: 16px; }
	.topic__count { font-size: 12px; }
	.topic__arrow { width: 26px; height: 26px; top: 12px; right: 12px; bottom: auto; }
	.topic__arrow .icon { width: 14px; height: 14px; }
	.topic--image { min-height: 120px; }
}

/* Section headers: keep the action link on one line */
.link-arrow { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 480px) {
	.section__head { align-items: flex-end; }
	.section__title { font-size: clamp(26px, 8vw, 32px); }
}

/* Single post on tablets/phones: share row + collapsible contents above the article */
@media (max-width: 1180px) {
	.article__layout { gap: 20px; }
	.article__share { order: -2; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
	.article__aside { display: flex; position: static; order: -1; }
	.article__aside > :not(.toc) { display: none; }
	.toc { padding: 0; overflow: hidden; }
	.toc .side-card__title {
		display: flex; align-items: center; justify-content: space-between;
		margin: 0; padding: 16px 18px; cursor: pointer; user-select: none;
	}
	.toc .side-card__title::after {
		content: ""; width: 9px; height: 9px; margin-left: 12px;
		border: solid currentColor; border-width: 0 2px 2px 0;
		transform: rotate(45deg) translateY(-3px); transition: transform 0.25s var(--ease);
	}
	.toc.is-open .side-card__title::after { transform: rotate(-135deg) translateY(-2px); }
	.toc .toc__list { display: none; max-height: none; padding: 0 18px 14px; }
	.toc.is-open .toc__list { display: block; }
}
