/*
 * ExstarHub — Nexus Editorial design system.
 * Dark-first magazine: Source Serif 4 headlines, Inter UI/body,
 * obsidian surfaces, 1px #1E293B outlines instead of shadows.
 */

/* ------------------------------------------------------------------
 * 1. Self-hosted variable fonts
 * ------------------------------------------------------------------ */
@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('../fonts/inter-var-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Source Serif 4';
	font-style: normal;
	font-weight: 200 900;
	font-display: swap;
	src: url('../fonts/source-serif-4-var-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------------
 * 2. Tokens
 * ------------------------------------------------------------------ */
:root {
	--eh-bg: #10131c;
	--eh-bg-deep: #0b0e16;
	--eh-surface: #0f131d;
	--eh-surface-2: #181b24;
	--eh-surface-3: #1c1f28;
	--eh-surface-4: #272a33;
	--eh-bright: #1a1f2b;
	--eh-text: #ffffff;
	--eh-body: #e0e2ee;
	--eh-muted: #94a3b8;
	--eh-muted-2: #c0c6d6;
	--eh-border: #1e293b;
	--eh-blue: #0a84ff;
	--eh-blue-soft: #aac7ff;
	--eh-on-blue-soft: #003064;
	--eh-blue-container: #3e90ff;
	--eh-on-blue-container: #002957;
	--eh-purple: #8a3ffc;
	--eh-violet: #6c04de;
	--eh-on-violet: #d4baff;
	--eh-orange: #eb6a12;
	--eh-on-orange: #341100;
	--eh-lilac: #d4bbff;
	--eh-on-lilac: #41008b;
	--eh-gold: #ffd700;
	--eh-green: #4ade80;
	--eh-red: #f87171;

	--eh-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
	--eh-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

	--eh-max: 1280px;
	--eh-gutter: 24px;
	--eh-margin: 16px;
	--eh-stack-sm: 8px;
	--eh-stack-md: 16px;
	--eh-stack-lg: 32px;
	--eh-section-gap: 64px;

	--eh-radius: 4px;
	--eh-radius-lg: 8px;

	--eh-header-h: 64px;
}

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

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

body {
	margin: 0;
	background: var(--eh-bg);
	color: var(--eh-body);
	font-family: var(--eh-sans);
	font-size: 16px;
	line-height: 1.6;
	padding-top: var(--eh-header-h);
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--eh-blue-soft); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--eh-blue); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--eh-serif);
	color: var(--eh-text);
	line-height: 1.25;
	margin: 0;
}

button {
	font-family: var(--eh-sans);
	cursor: pointer;
	border: 0;
	background: none;
	color: inherit;
}

::selection { background: var(--eh-blue-soft); color: var(--eh-on-blue-soft); }

:focus-visible {
	outline: 2px solid var(--eh-blue);
	outline-offset: 2px;
	border-radius: 2px;
}

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

.skip-link:focus {
	position: fixed !important;
	top: 8px; left: 8px;
	z-index: 200;
	width: auto; height: auto;
	margin: 0; padding: 10px 16px;
	clip: auto; clip-path: none;
	background: var(--eh-blue);
	color: #fff;
	font-weight: 600;
	border-radius: var(--eh-radius);
}

.eh-icon {
	width: 22px; height: 22px;
	vertical-align: middle;
	flex-shrink: 0;
}

.eh-main {
	max-width: var(--eh-max);
	margin: 0 auto;
	padding: 0 var(--eh-margin);
}
@media (min-width: 768px) {
	.eh-main { padding: 0 var(--eh-gutter); }
}

/* Section kicker + rule */
.eh-kicker {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: var(--eh-sans);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--eh-blue-soft);
}
.eh-kicker__line { width: 32px; height: 1px; background: var(--eh-blue-soft); }

.eh-section-head {
	display: flex;
	align-items: center;
	gap: var(--eh-stack-md);
	margin: 0 0 var(--eh-stack-lg);
}
.eh-section-head__label {
	font-family: var(--eh-sans);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--eh-blue-soft);
}
.eh-section-head__rule { flex: 1; height: 1px; background: var(--eh-border); }

/* ------------------------------------------------------------------
 * 4. Category chips + tags
 * ------------------------------------------------------------------ */
.eh-chip {
	display: inline-block;
	padding: 3px 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: 2px;
	background: var(--eh-surface-3);
	color: var(--eh-muted-2);
	width: fit-content;
}
a.eh-chip:hover { text-decoration: none; filter: brightness(1.15); }
.eh-chip--news,
.eh-chip--tech { background: var(--eh-blue-container); color: var(--eh-on-blue-container); }
.eh-chip--ai { background: var(--eh-purple); color: #fff; }
.eh-chip--gaming { background: var(--eh-violet); color: var(--eh-on-violet); }
.eh-chip--hardware { background: var(--eh-orange); color: var(--eh-on-orange); }
.eh-chip--reviews { background: var(--eh-lilac); color: var(--eh-on-lilac); }
.eh-chip--guides { background: var(--eh-blue-soft); color: var(--eh-on-blue-soft); }

.eh-tag {
	display: inline-block;
	padding: 4px 12px;
	border: 1px solid var(--eh-border);
	border-radius: 999px;
	font-size: 13px;
	color: var(--eh-muted);
}
.eh-tag:hover { color: var(--eh-blue-soft); border-color: var(--eh-blue-soft); text-decoration: none; }

/* Meta row */
.eh-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 500;
	color: var(--eh-muted);
}
.eh-meta__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--eh-border); }

/* Thumb fallback (no featured image) */
.eh-thumb-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%; height: 100%;
	min-height: 80px;
	background: linear-gradient(135deg, var(--eh-surface-3), var(--eh-bg-deep));
	color: var(--eh-muted);
	font-family: var(--eh-serif);
	font-weight: 700;
	font-size: 22px;
	letter-spacing: 0.1em;
}

/* ------------------------------------------------------------------
 * 5. Header
 * ------------------------------------------------------------------ */
.eh-header {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 100;
	background: rgba(16, 19, 28, 0.96);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--eh-border);
}
.admin-bar .eh-header { top: 32px; }
@media (max-width: 782px) {
	.admin-bar .eh-header { top: 46px; }
}

.eh-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--eh-stack-md);
	max-width: var(--eh-max);
	margin: 0 auto;
	height: var(--eh-header-h);
	padding: 0 var(--eh-margin);
}
@media (min-width: 768px) {
	.eh-header__inner { padding: 0 var(--eh-gutter); }
}

.eh-header__brand { display: flex; align-items: center; gap: var(--eh-stack-md); min-width: 0; }

.eh-logo { display: inline-flex; align-items: center; }
.eh-logo img { width: 120px; height: auto; display: block; }
@media (min-width: 1024px) {
	.eh-logo--header img { width: 190px; }
}
.eh-logo--footer img { width: 150px; }

.eh-header__menu-btn {
	display: inline-flex;
	padding: 8px;
	margin-left: -8px;
	color: var(--eh-blue-soft);
}
.eh-header__nav { display: none; }

@media (min-width: 1024px) {
	.eh-header__menu-btn { display: none; }
	.eh-header__nav { display: block; }
}

.eh-nav-list {
	display: flex;
	align-items: center;
	gap: var(--eh-gutter);
	list-style: none;
	margin: 0; padding: 0;
}
.eh-nav-list a {
	display: inline-block;
	padding-bottom: 4px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--eh-muted);
	border-bottom: 2px solid transparent;
}
.eh-nav-list a:hover { color: var(--eh-text); text-decoration: none; }
.eh-nav-list .current-menu-item > a,
.eh-nav-list .current-menu-ancestor > a {
	color: var(--eh-blue-soft);
	border-bottom-color: var(--eh-blue-soft);
}

.eh-header__actions { display: flex; align-items: center; gap: var(--eh-stack-md); }
.eh-header__search-btn { color: var(--eh-muted); padding: 8px; }
.eh-header__search-btn:hover { color: var(--eh-blue-soft); }

.eh-social { display: flex; align-items: center; gap: var(--eh-stack-md); }
.eh-social a { color: var(--eh-muted); display: inline-flex; }
.eh-social a:hover { color: var(--eh-blue-soft); }
.eh-header__social {
	display: none;
	border-left: 1px solid var(--eh-border);
	padding-left: var(--eh-stack-md);
}
@media (min-width: 768px) {
	.eh-header__social { display: flex; }
}

/* Search drop-down bar */
.eh-search-bar { border-top: 1px solid var(--eh-border); background: var(--eh-bg); }
.eh-search-bar__inner {
	max-width: var(--eh-max);
	margin: 0 auto;
	padding: var(--eh-stack-md) var(--eh-margin);
}
@media (min-width: 768px) {
	.eh-search-bar__inner { padding: var(--eh-stack-md) var(--eh-gutter); }
}

.eh-search-form { display: flex; gap: var(--eh-stack-sm); }
.eh-search-form__input {
	flex: 1;
	background: var(--eh-surface-3);
	border: 1px solid var(--eh-border);
	border-radius: var(--eh-radius);
	color: var(--eh-body);
	font-family: var(--eh-sans);
	font-size: 15px;
	padding: 10px 14px;
}
.eh-search-form__input::placeholder { color: var(--eh-muted); }
.eh-search-form__input:focus { outline: none; border-color: var(--eh-blue); }
.eh-search-form__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	background: var(--eh-blue);
	color: #fff;
	border-radius: var(--eh-radius);
}

/* ------------------------------------------------------------------
 * 6. Mobile nav overlay
 * ------------------------------------------------------------------ */
.eh-mobile-nav {
	position: fixed;
	inset: 0;
	z-index: 150;
}
.eh-mobile-nav__panel {
	position: absolute;
	inset: 0;
	background: var(--eh-bg);
	padding: 88px var(--eh-margin) var(--eh-stack-lg);
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	transform: translateX(100%);
	transition: transform 0.35s cubic-bezier(0.77, 0, 0.175, 1);
}
.eh-mobile-nav.is-open .eh-mobile-nav__panel { transform: translateX(0); }
.eh-mobile-nav__close {
	position: absolute;
	top: 12px; right: var(--eh-margin);
	padding: 10px;
	color: var(--eh-blue-soft);
}
.eh-mobile-nav__close .eh-icon { width: 30px; height: 30px; }

.eh-mobile-nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.eh-mobile-nav__list a {
	display: block;
	padding: 16px 0;
	font-family: var(--eh-serif);
	font-size: 24px;
	font-weight: 600;
	color: var(--eh-muted-2);
	border-bottom: 1px solid var(--eh-border);
	text-transform: uppercase;
	letter-spacing: 0.02em;
}
.eh-mobile-nav__list a:hover { color: var(--eh-blue-soft); text-decoration: none; }
.eh-mobile-nav__list .current-menu-item > a { color: var(--eh-blue-soft); }
.eh-mobile-nav__social { margin-top: auto; padding-top: var(--eh-stack-lg); gap: var(--eh-gutter); }
body.eh-nav-locked { overflow: hidden; }

/* ------------------------------------------------------------------
 * 7. Hero + carousel + trending
 * ------------------------------------------------------------------ */
.eh-hero {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--eh-stack-lg);
	padding: var(--eh-stack-lg) 0 var(--eh-section-gap);
	border-bottom: 1px solid var(--eh-border);
}
@media (min-width: 1024px) {
	.eh-hero {
		grid-template-columns: 2fr 1fr;
		gap: var(--eh-gutter);
	}
}

.eh-carousel {
	position: relative;
	border-radius: var(--eh-radius-lg);
	overflow: hidden;
	background: var(--eh-surface-3);
	border: 1px solid var(--eh-border);
}
.eh-carousel__viewport {
	overflow: hidden;
	height: 480px; /* fixed on mobile: stable dimensions, no CLS */
}
@media (min-width: 768px) {
	.eh-carousel__viewport { height: auto; aspect-ratio: 16 / 9; }
}
.eh-carousel__track {
	display: flex;
	height: 100%;
	transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.eh-carousel__slide {
	position: relative;
	flex: 0 0 100%;
	min-width: 100%;
	height: 100%;
}
.eh-carousel__slide img,
.eh-carousel__slide .eh-thumb-fallback {
	position: absolute;
	inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
}
.eh-carousel__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, rgba(16, 19, 28, 0.96) 0%, rgba(16, 19, 28, 0.45) 45%, rgba(16, 19, 28, 0) 100%);
}
.eh-carousel__content {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	padding: var(--eh-margin) var(--eh-margin) 56px;
	display: flex;
	flex-direction: column;
	gap: var(--eh-stack-sm);
}
@media (min-width: 768px) {
	.eh-carousel__content { padding: var(--eh-stack-lg) var(--eh-stack-lg) 64px; max-width: 46rem; }
}
.eh-carousel__title {
	font-size: clamp(22px, 5.5vw, 40px);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
}
.eh-carousel__title a { color: var(--eh-text); }
.eh-carousel__title a:hover { text-decoration: underline; text-decoration-color: var(--eh-blue-soft); }
.eh-carousel__excerpt {
	display: none;
	margin: 0;
	font-size: 17px;
	color: var(--eh-muted-2);
	max-width: 40rem;
}
@media (min-width: 768px) {
	.eh-carousel__excerpt { display: block; }
}

.eh-carousel__controls {
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 5;
	display: flex;
	align-items: center;
	gap: 10px;
}
.eh-carousel__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px; height: 34px;
	border-radius: 50%;
	background: rgba(16, 19, 28, 0.7);
	color: var(--eh-muted-2);
}
.eh-carousel__toggle:hover { color: var(--eh-text); }
.eh-carousel__toggle .eh-icon { width: 18px; height: 18px; }
.eh-carousel__toggle[data-state='playing'] .eh-carousel__toggle-play { display: none; }
.eh-carousel__toggle[data-state='paused'] .eh-carousel__toggle-pause { display: none; }

.eh-carousel__dots { display: flex; align-items: center; gap: 8px; }
.eh-carousel__dot {
	width: 10px; height: 10px;
	padding: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.3);
	transition: background 0.2s, transform 0.2s;
}
.eh-carousel__dot:hover { background: rgba(255, 255, 255, 0.6); }
.eh-carousel__dot.is-active { background: var(--eh-blue-soft); transform: scale(1.15); }

.eh-carousel__arrow {
	position: absolute;
	bottom: 10px;
	z-index: 5;
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px; height: 40px;
	border-radius: 50%;
	background: rgba(16, 19, 28, 0.75);
	color: var(--eh-text);
	backdrop-filter: blur(6px);
	transition: background 0.2s, color 0.2s;
}
.eh-carousel__arrow:hover { background: var(--eh-blue-soft); color: var(--eh-on-blue-soft); }
.eh-carousel__arrow--prev { right: 76px; }
.eh-carousel__arrow--next { right: 24px; }
@media (min-width: 768px) {
	.eh-carousel__arrow { display: inline-flex; }
}

/* Trending sidebar (desktop only, per approved mobile layout) */
.eh-trending { display: none; }
@media (min-width: 1024px) {
	.eh-trending { display: flex; flex-direction: column; gap: var(--eh-stack-md); }
}
.eh-trending__list { display: flex; flex-direction: column; gap: var(--eh-stack-md); }
.eh-trending__item {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: var(--eh-stack-md);
	align-items: start;
}
.eh-trending__item:hover { text-decoration: none; }
.eh-trending__thumb {
	display: block;
	height: 80px;
	border-radius: 2px;
	overflow: hidden;
	background: var(--eh-surface-3);
}
.eh-trending__thumb img { width: 100%; height: 100%; object-fit: cover; }
.eh-trending__body { display: flex; flex-direction: column; gap: 4px; }
.eh-trending__body .eh-chip { background: none; padding: 0; color: var(--eh-blue-soft); font-size: 11px; }
.eh-trending__title {
	font-family: var(--eh-serif);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--eh-text);
	transition: color 0.2s;
}
.eh-trending__item:hover .eh-trending__title { color: var(--eh-blue-soft); }

/* ------------------------------------------------------------------
 * 8. Topics
 * ------------------------------------------------------------------ */
.eh-topics {
	padding: var(--eh-stack-md) 0;
	border-bottom: 1px solid var(--eh-border);
}
.eh-topics__title {
	font-size: 24px;
	font-weight: 600;
	margin-bottom: var(--eh-stack-md);
}
.eh-topics__row {
	display: flex;
	gap: var(--eh-stack-sm);
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 2px;
}
.eh-topics__row::-webkit-scrollbar { display: none; }
.eh-topics__chip {
	flex-shrink: 0;
	padding: 8px 24px;
	background: var(--eh-surface-3);
	border: 1px solid var(--eh-border);
	color: var(--eh-text);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	border-radius: 2px;
	transition: border-color 0.2s, color 0.2s;
}
.eh-topics__chip:hover { border-color: var(--eh-blue-soft); color: var(--eh-blue-soft); text-decoration: none; }
.eh-topics__chip.is-current { background: var(--eh-purple); border-color: var(--eh-purple); color: #fff; }
@media (max-width: 767px) {
	.eh-topics__title { font-size: 18px; }
	.eh-topics__chip { padding: 6px 16px; border-radius: 999px; }
}

/* ------------------------------------------------------------------
 * 9. AI Rankings
 * ------------------------------------------------------------------ */
.eh-rankings {
	padding: var(--eh-stack-lg) 0;
	border-bottom: 1px solid var(--eh-border);
}
.eh-rankings__head {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: var(--eh-gutter);
}
@media (min-width: 768px) {
	.eh-rankings__head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
}
.eh-rankings__title { font-size: clamp(24px, 4vw, 40px); font-weight: 700; }
.eh-rankings__sub { margin: 4px 0 0; color: var(--eh-muted); }
.eh-rankings__note { margin: 0; font-size: 12px; color: var(--eh-muted); }
.eh-rankings__note a { text-decoration: underline; }

.eh-rankings__tabs {
	display: flex;
	gap: var(--eh-gutter);
	border-bottom: 1px solid var(--eh-border);
	margin-bottom: var(--eh-gutter);
	overflow-x: auto;
	scrollbar-width: none;
}
.eh-rankings__tabs::-webkit-scrollbar { display: none; }
.eh-rankings__tab {
	padding: 0 4px 10px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--eh-muted);
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	white-space: nowrap;
}
.eh-rankings__tab:hover { color: var(--eh-text); }
.eh-rankings__tab[aria-selected='true'] { color: var(--eh-blue); border-bottom-color: var(--eh-blue); }

.eh-rankings__scroll { display: none; overflow-x: auto; }
@media (min-width: 768px) {
	.eh-rankings__scroll { display: block; }
}
.eh-rankings__table {
	width: 100%;
	min-width: 760px;
	border-collapse: collapse;
	text-align: left;
	font-size: 15px;
}
.eh-rankings__table th {
	padding: 12px 16px;
	font-family: var(--eh-sans);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--eh-muted);
	border-bottom: 1px solid var(--eh-border);
	white-space: nowrap;
}
.eh-rankings__table td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--eh-border);
	color: var(--eh-body);
	vertical-align: middle;
}
.eh-rankings__table tr:hover td { background: var(--eh-surface-3); }
.eh-rankings__table tr.is-first td { background: #1a1810; }
.eh-rankings__table .is-right { text-align: right; }

.eh-rankings__rank {
	font-family: var(--eh-serif);
	font-size: 22px;
	font-weight: 700;
	color: var(--eh-muted);
}
tr.is-first .eh-rankings__rank,
.eh-rankings__card.is-first .eh-rankings__rank {
	color: var(--eh-gold);
	text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}
.eh-rankings__model { font-weight: 700; color: var(--eh-text); margin-right: 8px; }
.eh-rankings__provider { font-size: 12px; color: var(--eh-muted); margin-right: 8px; }
.eh-rankings__cost { color: var(--eh-muted); white-space: nowrap; }

.eh-badge {
	display: inline-block;
	padding: 2px 8px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: 2px;
	border: 1px solid var(--eh-border);
	color: var(--eh-muted-2);
	background: var(--eh-surface-3);
	white-space: nowrap;
}
.eh-badge--gold { background: rgba(255, 215, 0, 0.14); color: var(--eh-gold); border-color: rgba(255, 215, 0, 0.3); }
.eh-badge--blue { background: rgba(10, 132, 255, 0.14); color: var(--eh-blue); border-color: rgba(10, 132, 255, 0.3); }
.eh-badge--purple { background: rgba(138, 63, 252, 0.14); color: #b07ffd; border-color: rgba(138, 63, 252, 0.3); }

.eh-rank-change {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	font-weight: 600;
	font-size: 14px;
	color: var(--eh-muted);
}
.eh-rank-change .eh-icon { width: 16px; height: 16px; }
.eh-rank-change--up { color: var(--eh-green); }
.eh-rank-change--down { color: var(--eh-red); }
.eh-rank-change--new { color: var(--eh-blue-soft); font-size: 11px; letter-spacing: 0.08em; }

/* Mobile ranking cards */
.eh-rankings__cards { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 768px) {
	.eh-rankings__cards { display: none; }
}
.eh-rankings__card {
	background: var(--eh-surface);
	border: 1px solid var(--eh-border);
	border-radius: var(--eh-radius-lg);
	padding: 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.eh-rankings__card.is-first { background: #1a1810; }
.eh-rankings__card-top { display: flex; align-items: center; gap: 10px; }
.eh-rankings__card-top .eh-rankings__rank { font-size: 20px; }
.eh-rankings__card-score { margin-left: auto; font-weight: 700; color: var(--eh-text); }
.eh-rankings__card-bottom {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 12px;
	color: var(--eh-muted);
}
.eh-rankings__card-bottom .eh-rank-change { margin-left: auto; }
.eh-rankings__cost-pill {
	background: var(--eh-bright);
	padding: 2px 8px;
	border-radius: var(--eh-radius);
	white-space: nowrap;
}

/* ------------------------------------------------------------------
 * 10. Feed + cards + sidebar
 * ------------------------------------------------------------------ */
.eh-feed {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--eh-stack-lg);
	padding: var(--eh-stack-lg) 0 var(--eh-section-gap);
}
@media (min-width: 1024px) {
	.eh-feed { grid-template-columns: 2fr 1fr; gap: var(--eh-gutter); }
}

.eh-card-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--eh-stack-lg) var(--eh-gutter);
}
@media (min-width: 768px) {
	.eh-card-grid { grid-template-columns: repeat(2, 1fr); }
	.eh-card-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* Card: mobile = thumb-left row; ≥768px = editorial vertical card */
.eh-card {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: var(--eh-stack-md);
	align-items: center;
}
.eh-card__media {
	display: block;
	overflow: hidden;
	border-radius: var(--eh-radius);
	border: 1px solid var(--eh-border);
	background: var(--eh-surface-3);
	height: 96px;
}
.eh-card__media img,
.eh-card__media .eh-thumb-fallback {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.eh-card__body { display: flex; flex-direction: column; gap: var(--eh-stack-sm); min-width: 0; }
.eh-card__meta { display: flex; align-items: center; justify-content: space-between; gap: var(--eh-stack-sm); }
.eh-card__meta .eh-meta { font-weight: 700; }
.eh-card__title {
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
}
.eh-card__title a { color: var(--eh-text); transition: color 0.2s; }
.eh-card__title a:hover { color: var(--eh-blue-soft); text-decoration: none; }

@media (max-width: 767px) {
	.eh-card__meta .eh-meta { display: none; }
	.eh-card__meta .eh-chip { background: none; padding: 0; font-size: 10px; color: var(--eh-blue-soft); }
}

@media (min-width: 768px) {
	.eh-card { display: flex; flex-direction: column; align-items: stretch; }
	.eh-card__media { height: auto; aspect-ratio: 16 / 9; }
	.eh-card:hover .eh-card__media img { transform: scale(1.05); }
	.eh-card__title { font-size: 20px; }
}

.eh-load-more {
	display: block;
	width: 100%;
	margin-top: var(--eh-stack-lg);
	padding: 16px;
	border: 1px solid var(--eh-border);
	border-radius: var(--eh-radius);
	color: var(--eh-text);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	transition: background 0.2s;
}
.eh-load-more:hover { background: var(--eh-surface-4); }
.eh-load-more[disabled] { opacity: 0.6; cursor: default; }

/* Sidebar */
.eh-feed__side { min-width: 0; }
.eh-side-box {
	position: sticky;
	top: calc(var(--eh-header-h) + 24px);
	display: flex;
	flex-direction: column;
	gap: var(--eh-stack-lg);
	background: var(--eh-surface-2);
	border: 1px solid var(--eh-border);
	border-radius: var(--eh-radius);
	padding: var(--eh-stack-lg) var(--eh-gutter);
}

.eh-top-tech__heading {
	font-family: var(--eh-sans);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--eh-purple);
	border-bottom: 1px solid var(--eh-border);
	padding-bottom: var(--eh-stack-md);
	margin-bottom: var(--eh-stack-md);
}
.eh-top-tech__list {
	list-style: none;
	margin: 0; padding: 0;
	display: flex;
	flex-direction: column;
}
.eh-top-tech__item {
	display: flex;
	gap: var(--eh-stack-md);
	padding: var(--eh-stack-md) 0;
	border-top: 1px solid var(--eh-border);
}
.eh-top-tech__item:first-child { border-top: 0; padding-top: 0; }
.eh-top-tech__num {
	font-family: var(--eh-serif);
	font-size: 32px;
	font-weight: 700;
	line-height: 1;
	color: var(--eh-purple);
	opacity: 0.55;
}
.eh-top-tech__item a {
	font-family: var(--eh-serif);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--eh-text);
}
.eh-top-tech__item a:hover { color: var(--eh-blue-soft); text-decoration: none; }

/* Newsletter */
.eh-newsletter {
	background: var(--eh-bg);
	border: 1px solid var(--eh-border);
	border-radius: var(--eh-radius);
	padding: var(--eh-stack-md);
	display: flex;
	flex-direction: column;
	gap: var(--eh-stack-sm);
}
.eh-newsletter__heading {
	font-family: var(--eh-sans);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.eh-newsletter__sub { margin: 0; font-size: 12px; color: var(--eh-muted); }
.eh-newsletter__form { display: flex; flex-direction: column; gap: 8px; }
.eh-newsletter__form input[type='email'] {
	background: var(--eh-surface-3);
	border: 1px solid var(--eh-border);
	border-radius: var(--eh-radius);
	color: var(--eh-body);
	font-family: var(--eh-sans);
	font-size: 14px;
	padding: 10px 14px;
}
.eh-newsletter__form input[type='email']:focus { outline: none; border-color: var(--eh-blue); }
.eh-newsletter__form button {
	background: var(--eh-blue-soft);
	color: var(--eh-on-blue-soft);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 10px;
	border-radius: var(--eh-radius);
	transition: opacity 0.2s;
}
.eh-newsletter__form button:hover { opacity: 0.9; }
.eh-newsletter__hp { position: absolute !important; left: -9999px; }
.eh-newsletter__msg { margin: 0; font-size: 13px; color: var(--eh-green); }
.eh-newsletter__msg.is-error { color: var(--eh-red); }
.eh-newsletter__msg:empty { display: none; }

/* ------------------------------------------------------------------
 * 11. Footer
 * ------------------------------------------------------------------ */
.eh-footer {
	background: var(--eh-bg-deep);
	border-top: 1px solid var(--eh-border);
	margin-top: var(--eh-section-gap);
}
.eh-footer__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--eh-stack-lg);
	max-width: var(--eh-max);
	margin: 0 auto;
	padding: var(--eh-stack-lg) var(--eh-margin);
}
@media (min-width: 768px) {
	.eh-footer__grid { grid-template-columns: 2fr 1fr 1fr 1.4fr; padding: var(--eh-stack-lg) var(--eh-gutter); }
}
.eh-footer__brand p { margin: var(--eh-stack-md) 0; color: var(--eh-muted); max-width: 22rem; }
.eh-footer__label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--eh-text);
	margin-bottom: var(--eh-stack-sm);
}
.eh-footer__heading {
	font-size: 18px;
	font-weight: 600;
	margin-bottom: var(--eh-stack-md);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.eh-footer__menu {
	list-style: none;
	margin: 0; padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--eh-stack-sm);
}
.eh-footer__menu a { color: var(--eh-muted); font-size: 14px; font-weight: 500; }
.eh-footer__menu a:hover { color: var(--eh-blue-soft); text-decoration: none; }
.eh-footer__latest {
	list-style: none;
	margin: 0; padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--eh-stack-md);
}
.eh-footer__latest a { color: var(--eh-muted); font-size: 13px; line-height: 1.45; }
.eh-footer__latest a:hover { color: var(--eh-blue-soft); }
.eh-footer__colophon { border-top: 1px solid var(--eh-border); }
.eh-footer__colophon p {
	max-width: var(--eh-max);
	margin: 0 auto;
	padding: var(--eh-stack-md) var(--eh-margin);
	font-size: 12px;
	color: var(--eh-muted);
}
@media (min-width: 768px) {
	.eh-footer__colophon p { padding: var(--eh-stack-md) var(--eh-gutter); }
}

/* To top */
.eh-to-top {
	position: fixed;
	right: 24px; bottom: 24px;
	z-index: 90;
	width: 48px; height: 48px;
	border-radius: 50%;
	background: var(--eh-purple);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
	transition: transform 0.2s, opacity 0.2s;
}
.eh-to-top:hover { transform: scale(1.08); }

/* ------------------------------------------------------------------
 * 12. Archive / search / 404
 * ------------------------------------------------------------------ */
.eh-archive-head { padding: var(--eh-stack-lg) 0 var(--eh-stack-md); }
.eh-archive-head__title { font-size: clamp(28px, 5vw, 44px); font-weight: 700; }
.eh-archive-head__desc { color: var(--eh-muted); max-width: 46rem; margin-top: var(--eh-stack-sm); }
.eh-archive-search { margin: 0 0 var(--eh-stack-lg); max-width: 480px; }
.eh-main > .eh-topics { margin-bottom: var(--eh-stack-lg); }
.eh-main > .eh-card-grid { padding-bottom: var(--eh-stack-lg); }
.eh-empty { color: var(--eh-muted); padding: var(--eh-stack-lg) 0 var(--eh-section-gap); }

.eh-breadcrumbs { font-size: 12px; color: var(--eh-muted); margin-bottom: var(--eh-stack-md); }
.eh-breadcrumbs a { color: var(--eh-muted); }
.eh-breadcrumbs a:hover { color: var(--eh-blue-soft); }

.eh-pagination { margin: var(--eh-stack-lg) 0 var(--eh-section-gap); }
.eh-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--eh-stack-sm);
	align-items: center;
}
.eh-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px; height: 40px;
	padding: 0 8px;
	border: 1px solid var(--eh-border);
	border-radius: var(--eh-radius);
	color: var(--eh-muted-2);
	font-weight: 600;
	font-size: 14px;
}
.eh-pagination .page-numbers.current { background: var(--eh-blue-soft); color: var(--eh-on-blue-soft); border-color: var(--eh-blue-soft); }
.eh-pagination a.page-numbers:hover { border-color: var(--eh-blue-soft); color: var(--eh-blue-soft); text-decoration: none; }

.eh-404 { text-align: center; padding: var(--eh-section-gap) 0; }
.eh-404__code {
	font-family: var(--eh-serif);
	font-size: clamp(72px, 16vw, 140px);
	font-weight: 700;
	line-height: 1;
	margin: 0;
	color: var(--eh-purple);
	opacity: 0.45;
}
.eh-404__title { font-size: clamp(24px, 5vw, 40px); margin: var(--eh-stack-md) 0 var(--eh-stack-sm); }
.eh-404__sub { color: var(--eh-muted); max-width: 34rem; margin: 0 auto var(--eh-stack-lg); }
.eh-404__search { max-width: 420px; margin: 0 auto; }

/* ------------------------------------------------------------------
 * 13. Article
 * ------------------------------------------------------------------ */
.eh-article {
	max-width: 820px;
	margin: 0 auto;
	padding-top: var(--eh-stack-lg);
}
.eh-article__header { display: flex; flex-direction: column; gap: var(--eh-stack-md); margin-bottom: var(--eh-stack-lg); }
.eh-article__title {
	font-size: clamp(30px, 6vw, 48px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.015em;
}
.eh-article__standfirst {
	margin: 0;
	font-size: 19px;
	line-height: 1.55;
	color: var(--eh-muted-2);
}
.eh-article__hero {
	margin: 0 0 var(--eh-stack-lg);
	border-radius: var(--eh-radius-lg);
	overflow: hidden;
	border: 1px solid var(--eh-border);
}
.eh-article__hero img { display: block; width: 100%; height: auto; }
.eh-article__hero figcaption { padding: 10px 14px; font-size: 12px; color: var(--eh-muted); background: var(--eh-surface-2); }

.eh-prose { font-size: 17px; line-height: 1.75; color: var(--eh-body); }
.eh-prose > * { margin: 0 0 1.35em; }
.eh-prose h2, .eh-prose h3, .eh-prose h4 { margin: 1.7em 0 0.6em; line-height: 1.3; }
.eh-prose h2 { font-size: 28px; }
.eh-prose h3 { font-size: 23px; }
.eh-prose h4 { font-size: 19px; }
.eh-prose a { color: var(--eh-blue); }
.eh-prose a:hover { text-decoration: underline; }
.eh-prose img { border-radius: var(--eh-radius); }
.eh-prose blockquote {
	margin: 1.6em 0;
	padding: 4px 0 4px 20px;
	border-left: 4px solid var(--eh-purple);
	color: var(--eh-muted-2);
	font-family: var(--eh-serif);
	font-size: 19px;
}
.eh-prose code {
	background: var(--eh-surface-3);
	border: 1px solid var(--eh-border);
	border-radius: 3px;
	padding: 1px 6px;
	font-size: 0.9em;
}
.eh-prose pre {
	background: var(--eh-bg-deep);
	border: 1px solid var(--eh-border);
	border-radius: var(--eh-radius);
	padding: var(--eh-stack-md);
	overflow-x: auto;
}
.eh-prose pre code { background: none; border: 0; padding: 0; }
.eh-prose ul, .eh-prose ol { padding-left: 1.4em; }
.eh-prose li { margin-bottom: 0.4em; }
.eh-prose hr { border: 0; border-top: 1px solid var(--eh-border); margin: 2em 0; }
.eh-prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.eh-prose th, .eh-prose td { border: 1px solid var(--eh-border); padding: 10px 12px; text-align: left; }
.eh-prose th { background: var(--eh-surface-2); color: var(--eh-text); }
.eh-prose figure { margin-left: 0; margin-right: 0; }
.eh-prose figcaption, .eh-prose .wp-caption-text { font-size: 13px; color: var(--eh-muted); margin-top: 6px; }
.eh-prose iframe { max-width: 100%; border: 0; }
.eh-prose .wp-block-embed { margin-left: 0; margin-right: 0; }

/* WP core alignment/media classes */
.alignleft { float: left; margin: 0 var(--eh-stack-md) var(--eh-stack-sm) 0; }
.alignright { float: right; margin: 0 0 var(--eh-stack-sm) var(--eh-stack-md); }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide, .alignfull { max-width: 100%; }
.wp-caption { max-width: 100%; }
.sticky {} /* required by theme check */
.bypostauthor {}

.eh-page-links { margin: var(--eh-stack-lg) 0; color: var(--eh-muted); }
.eh-page-links a { padding: 2px 8px; border: 1px solid var(--eh-border); border-radius: 3px; margin-left: 6px; }

.eh-article__footer { margin: var(--eh-section-gap) 0 0; display: flex; flex-direction: column; gap: var(--eh-stack-lg); }
.eh-article__tags { display: flex; flex-wrap: wrap; gap: var(--eh-stack-sm); }

.eh-post-nav {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--eh-stack-md);
	border-top: 1px solid var(--eh-border);
	padding-top: var(--eh-stack-lg);
}
@media (min-width: 768px) {
	.eh-post-nav { grid-template-columns: 1fr 1fr; }
}
.eh-post-nav__prev, .eh-post-nav__next { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.eh-post-nav__next { text-align: right; }
.eh-post-nav span {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--eh-muted);
}
.eh-post-nav a {
	font-family: var(--eh-serif);
	font-size: 17px;
	font-weight: 600;
	color: var(--eh-text);
}
.eh-post-nav a:hover { color: var(--eh-blue-soft); text-decoration: none; }

.eh-related { max-width: var(--eh-max); margin: var(--eh-section-gap) auto 0; }

/* ------------------------------------------------------------------
 * 14. Comments
 * ------------------------------------------------------------------ */
.eh-comments { max-width: 820px; margin: var(--eh-section-gap) auto 0; }
.eh-comments__title { font-size: 24px; margin-bottom: var(--eh-stack-lg); }
.eh-comments__list { list-style: none; margin: 0; padding: 0; }
.eh-comments__list .comment {
	border: 1px solid var(--eh-border);
	border-radius: var(--eh-radius);
	background: var(--eh-surface-2);
	padding: var(--eh-stack-md);
	margin-bottom: var(--eh-stack-md);
}
.eh-comments__list .children { list-style: none; margin: var(--eh-stack-md) 0 0; padding-left: var(--eh-stack-md); }
.eh-comments__list .comment-author { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--eh-text); }
.eh-comments__list .avatar { border-radius: 50%; }
.eh-comments__list .comment-metadata { font-size: 12px; margin: 4px 0 10px; }
.eh-comments__list .comment-metadata a { color: var(--eh-muted); }
.eh-comments__list .reply a { font-size: 13px; }
.eh-comments__closed { color: var(--eh-muted); }

.comment-form { display: flex; flex-direction: column; gap: var(--eh-stack-md); margin-top: var(--eh-stack-lg); }
.comment-form label { display: block; font-size: 13px; font-weight: 600; color: var(--eh-muted-2); margin-bottom: 4px; }
.comment-form input[type='text'],
.comment-form input[type='email'],
.comment-form input[type='url'],
.comment-form textarea {
	width: 100%;
	background: var(--eh-surface-3);
	border: 1px solid var(--eh-border);
	border-radius: var(--eh-radius);
	color: var(--eh-body);
	font-family: var(--eh-sans);
	font-size: 15px;
	padding: 10px 14px;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--eh-blue); }
.comment-form .submit {
	background: var(--eh-blue);
	color: #fff;
	font-weight: 600;
	padding: 12px 28px;
	border-radius: var(--eh-radius);
	width: fit-content;
}
.comment-reply-title { font-size: 22px; }
.comment-notes, .logged-in-as { font-size: 13px; color: var(--eh-muted); }

/* ------------------------------------------------------------------
 * 15. Motion & a11y preferences
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
