/*
Theme Name:   HitMag Mods
Theme URI:    https://github.com/holared/hitman
Description:  Tema hijo de HitMag para sitios de mods de American Truck Simulator y Euro Truck Simulator 2. La portada muestra automáticamente los mods publicados con el plugin Truck Mods Hub, con su imagen de portada, juego, categoría y descargas.
Author:       Truck Mods Hub
Template:     hitmag
Version:      1.0.8
Requires at least: 6.0
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  hitmag-mods
*/

/* ==========================================================
   Tokens (shared with the Truck Mods Hub plugin palette)
   ========================================================== */

:root {
	--hmm-bg: #ffffff;
	--hmm-surface: #ffffff;
	--hmm-surface-2: #f1f3f5;
	--hmm-text: #1b1d20;
	/* Darker amber keeps accent text and buttons readable on white (AA). */
	--hmm-accent: #a35f00;
	--hmm-muted: #505862;
	--hmm-line: #cbd1d8;
	--hmm-line-strong: #858e99;
	--hmm-header-bg: rgba(255, 255, 255, 0.86);
	--hmm-header-bg-solid: rgba(255, 255, 255, 0.97);
	--hmm-footer-bg: #f1f3f5;
	--hmm-danger: #c42a31;
	--hmm-shadow: 0 16px 40px rgba(27, 29, 32, 0.14);
	color-scheme: light;
	--hmm-radius: 12px;
	--hmm-font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
	--hmm-font-body: "Barlow", system-ui, -apple-system, sans-serif;
	--hmm-header-h: 68px;
}

html[data-hmm-theme="dark"] {
	--hmm-bg: #141618;
	--hmm-surface: #1d2024;
	--hmm-surface-2: #25292e;
	--hmm-text: #ece8df;
	--hmm-accent: #f2a900;
	--hmm-muted: rgba(236, 232, 223, 0.64);
	--hmm-line: rgba(236, 232, 223, 0.1);
	--hmm-line-strong: rgba(236, 232, 223, 0.22);
	--hmm-radius: 12px;
	--hmm-font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
	--hmm-font-body: "Barlow", system-ui, -apple-system, sans-serif;
	--hmm-header-h: 68px;
	--hmm-header-bg: rgba(20, 22, 24, 0.88);
	--hmm-header-bg-solid: rgba(20, 22, 24, 0.97);
	--hmm-footer-bg: #0f1113;
	--hmm-danger: #e5484d;
	--hmm-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
	color-scheme: dark;
}

html.hmm-html {
	background: var(--hmm-bg);
	scroll-padding-top: calc(var(--hmm-header-h) + 16px);
}

body.hmm {
	margin: 0;
	background: var(--hmm-bg) !important;
	color: var(--hmm-text);
	font-family: var(--hmm-font-body);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

body.hmm button,
body.hmm input,
body.hmm select,
body.hmm textarea {
	font-family: var(--hmm-font-body);
	color: var(--hmm-text);
}

.hmm .hitmag-wrapper {
	max-width: none;
	margin: 0;
	background: transparent;
	box-shadow: none;
}

.hmm .site-content {
	padding-bottom: 0;
}

.hmm :focus-visible {
	outline: 2px solid var(--hmm-accent);
	outline-offset: 2px;
}

.hmm-wrap {
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 20px;
	box-sizing: border-box;
}

@media (min-width: 768px) {
	.hmm-wrap {
		padding: 0 32px;
	}
}

.hmm-eyebrow {
	margin: 0;
	color: var(--hmm-accent);
	font-family: var(--hmm-font-display);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.1em;
	line-height: 1.2;
	text-transform: uppercase;
}

/* ==========================================================
   Buttons, links, chips
   ========================================================== */

.hmm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 0 22px;
	border: 2px solid var(--hmm-accent);
	border-radius: 8px;
	background: var(--hmm-accent);
	color: var(--hmm-bg) !important;
	font-family: var(--hmm-font-display);
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none !important;
	white-space: nowrap;
	transition: transform 0.15s ease, background-color 0.15s ease;
}

.hmm-btn:hover {
	transform: translateY(-1px);
	color: var(--hmm-bg) !important;
}

.hmm-btn--sm {
	min-height: 40px;
	padding: 0 16px;
	font-size: 16px;
}

.hmm-btn--lg {
	min-height: 56px;
	padding: 0 30px;
	font-size: 20px;
}

.hmm-btn--ghost {
	background: transparent;
	color: var(--hmm-accent) !important;
}

.hmm-btn--ghost:hover {
	background: rgba(242, 169, 0, 0.1);
	color: var(--hmm-accent) !important;
}

.hmm-link {
	display: inline-flex;
	gap: 6px;
	color: var(--hmm-accent) !important;
	font-family: var(--hmm-font-display);
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-decoration: none !important;
	text-transform: uppercase;
	white-space: nowrap;
}

.hmm-link:hover span {
	transform: translateX(3px);
}

.hmm-link span {
	transition: transform 0.15s ease;
}

.hmm-chip {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 40px;
	padding: 0 8px 0 16px;
	border: 1px solid var(--hmm-line-strong);
	border-radius: 999px;
	background: var(--hmm-surface);
	color: var(--hmm-text) !important;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none !important;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.hmm-chip:hover {
	border-color: var(--hmm-accent);
	background: var(--hmm-surface-2);
}

.hmm-chip__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 26px;
	padding: 0 8px;
	border-radius: 999px;
	background: var(--hmm-bg);
	color: var(--hmm-muted);
	font-size: 13px;
	font-weight: 600;
	box-sizing: border-box;
}

.hmm-badge {
	display: inline-flex;
	align-items: center;
	height: 26px;
	padding: 0 10px;
	border-radius: 4px;
	background: var(--hmm-accent);
	color: var(--hmm-bg);
	font-family: var(--hmm-font-display);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* Plugin plates rendered outside a full .tmh page: neutralise its page-level box. */
.hmm .tmh.hmm-plates,
.hmm .tmh.hmm-card__plates,
.hmm .tmh.hmm-game__plate {
	padding: 0;
	background: transparent;
	font-size: inherit;
	line-height: 1;
}

.hmm-plates {
	display: inline-flex;
	gap: 6px;
}

/* ==========================================================
   Header
   ========================================================== */

.hmm-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--hmm-header-bg);
	border-bottom: 1px solid var(--hmm-line);
	-webkit-backdrop-filter: saturate(140%) blur(12px);
	backdrop-filter: saturate(140%) blur(12px);
	transition: background-color 0.2s ease;
}

.admin-bar .hmm-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .hmm-header {
		top: 0;
	}
}

.hmm-header.is-scrolled {
	background: var(--hmm-header-bg-solid);
}

.hmm-header__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0 24px;
	min-height: var(--hmm-header-h);
}

.hmm-brand {
	display: flex;
	align-items: center;
	min-height: var(--hmm-header-h);
}

.hmm-brand img,
.hmm-brand .custom-logo {
	display: block;
	width: auto;
	max-height: 44px;
}

.hmm-brand__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--hmm-text) !important;
	text-decoration: none !important;
}

/* Road marking: the brand mark is a lane line segment. */
.hmm-brand__mark {
	position: relative;
	width: 30px;
	height: 30px;
	border-radius: 6px;
	background: var(--hmm-accent);
	overflow: hidden;
}

.hmm-brand__mark::before {
	content: "";
	position: absolute;
	top: 4px;
	bottom: 4px;
	left: 50%;
	width: 4px;
	margin-left: -2px;
	background: repeating-linear-gradient(to bottom, var(--hmm-bg) 0 6px, transparent 6px 10px);
}

.hmm-brand__name {
	font-family: var(--hmm-font-display);
	font-size: 24px;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1;
	text-transform: uppercase;
}

.hmm-menu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--hmm-line-strong);
	border-radius: 8px;
	background: transparent !important;
	cursor: pointer;
}

.hmm-menu-toggle__bars,
.hmm-menu-toggle__bars::before,
.hmm-menu-toggle__bars::after {
	display: block;
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: var(--hmm-text);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.hmm-menu-toggle__bars {
	position: relative;
}

.hmm-menu-toggle__bars::before,
.hmm-menu-toggle__bars::after {
	content: "";
	position: absolute;
	left: 0;
}

.hmm-menu-toggle__bars::before {
	top: -6px;
}

.hmm-menu-toggle__bars::after {
	top: 6px;
}

.hmm-header.is-open .hmm-menu-toggle__bars {
	background: transparent;
}

.hmm-header.is-open .hmm-menu-toggle__bars::before {
	transform: translateY(6px) rotate(45deg);
}

.hmm-header.is-open .hmm-menu-toggle__bars::after {
	transform: translateY(-6px) rotate(-45deg);
}

.hmm-header__panel {
	display: none;
	flex-direction: column;
	gap: 16px;
	width: 100%;
	padding: 8px 0 20px;
}

.hmm-header.is-open .hmm-header__panel {
	display: flex;
}

.hmm-nav__list,
.hmm-nav ul {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hmm-nav a {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 0 12px;
	border-radius: 6px;
	color: var(--hmm-text) !important;
	font-family: var(--hmm-font-display);
	font-size: 18px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-decoration: none !important;
	text-transform: uppercase;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.hmm-nav a:hover {
	color: var(--hmm-accent) !important;
}

.hmm-nav .current-menu-item > a,
.hmm-nav .current_page_item > a,
.hmm-nav .current-menu-ancestor > a {
	color: var(--hmm-accent) !important;
}

.hmm-nav .sub-menu {
	padding-left: 12px;
}

.hmm-search {
	position: relative;
	display: flex;
	align-items: center;
}

.hmm-search__icon {
	position: absolute;
	left: 14px;
	color: var(--hmm-muted);
	pointer-events: none;
}

.hmm-search input[type="search"] {
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 14px 0 42px;
	border: 1px solid var(--hmm-line-strong);
	border-radius: 8px;
	background: var(--hmm-surface);
	color: var(--hmm-text);
	font-size: 15px;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
}

.hmm-search input[type="search"]::placeholder {
	color: var(--hmm-muted);
}

.hmm-search input[type="search"]:focus {
	border-color: var(--hmm-accent);
	outline: none;
	box-shadow: 0 0 0 3px rgba(242, 169, 0, 0.2);
}

@media (min-width: 1280px) {
	.hmm-header__bar {
		flex-wrap: nowrap;
	}

	.hmm-menu-toggle {
		display: none;
	}

	.hmm-header__panel,
	.hmm-header.is-open .hmm-header__panel {
		display: flex;
		flex-direction: row;
		align-items: center;
		gap: 16px;
		width: auto;
		flex: 1;
		padding: 0;
	}

	.hmm-nav {
		margin-right: auto;
	}

	.hmm-nav__list,
	.hmm-nav > ul {
		flex-direction: row;
		gap: 2px;
	}

	.hmm-nav a {
		font-size: 16px;
		min-height: 40px;
	}

	.hmm-nav .menu-item-has-children,
	.hmm-nav .page_item_has_children {
		position: relative;
	}

	.hmm-nav .sub-menu,
	.hmm-nav .children {
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 220px;
		padding: 6px;
		border: 1px solid var(--hmm-line);
		border-radius: 10px;
		background: var(--hmm-surface);
		box-shadow: var(--hmm-shadow);
		opacity: 0;
		visibility: hidden;
		transform: translateY(4px);
		transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
	}

	.hmm-nav li:hover > .sub-menu,
	.hmm-nav li:focus-within > .sub-menu,
	.hmm-nav li:hover > .children,
	.hmm-nav li:focus-within > .children {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.hmm-search {
		width: 280px;
	}
}

/* ==========================================================
   Home: hero
   ========================================================== */

.hmm-home {
	display: flex;
	flex-direction: column;
	gap: 72px;
	padding: 40px 0 88px;
}

.hmm-hero__intro {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 28px;
}

.hmm-hero__intro > div {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.hmm-hero__title {
	margin: 0;
	max-width: 14ch;
	color: var(--hmm-text);
	font-family: var(--hmm-font-display);
	font-size: clamp(42px, 7vw, 84px);
	font-weight: 700;
	line-height: 0.92;
	letter-spacing: -0.005em;
	text-transform: uppercase;
	text-wrap: balance;
}

.hmm-hero__count {
	display: inline-flex;
	align-items: baseline;
	gap: 10px;
	color: var(--hmm-muted) !important;
	text-decoration: none !important;
}

.hmm-hero__count strong {
	color: var(--hmm-text);
	font-family: var(--hmm-font-display);
	font-size: 32px;
	font-weight: 700;
	line-height: 1;
}

.hmm-hero__count:hover span {
	color: var(--hmm-accent);
}

@media (min-width: 768px) {
	.hmm-hero__intro {
		flex-direction: row;
		align-items: flex-end;
		justify-content: space-between;
	}
}

.hmm-hero__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

@media (min-width: 1024px) {
	.hmm-hero__grid {
		grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
		gap: 20px;
	}

	.hmm-hero__grid--single {
		grid-template-columns: 1fr;
	}
}

/* Featured mod */
.hmm-feature {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 420px;
	border-radius: var(--hmm-radius);
	background: var(--hmm-surface);
	overflow: hidden;
	isolation: isolate;
}

@media (min-width: 1024px) {
	.hmm-feature {
		min-height: 560px;
	}
}

.hmm-feature__media {
	position: absolute;
	inset: 0;
	z-index: -1;
}

.hmm-feature__media img,
.hmm-feature__media .hmm-media-fallback {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.hmm-feature:hover .hmm-feature__media img {
	transform: scale(1.03);
}

.hmm-feature__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(20, 22, 24, 0.96) 0%, rgba(20, 22, 24, 0.7) 35%, rgba(20, 22, 24, 0) 70%);
}

.hmm-feature__body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 24px;
}

@media (min-width: 768px) {
	.hmm-feature__body {
		padding: 36px;
	}
}

.hmm-feature__tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.hmm-feature__title {
	margin: 0;
	max-width: 22ch;
	font-family: var(--hmm-font-display);
	font-size: clamp(30px, 4vw, 52px);
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
	text-wrap: balance;
}

.hmm-feature__title a {
	color: var(--hmm-text) !important;
	text-decoration: none !important;
}

.hmm-feature__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.hmm-feature__excerpt {
	margin: 0;
	max-width: 60ch;
	color: rgba(236, 232, 223, 0.82);
	font-size: 16px;
	line-height: 1.55;
	text-wrap: pretty;
}

.hmm-hero__tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 1024px) {
	.hmm-hero__tiles {
		grid-template-columns: 1fr 1fr;
		grid-auto-rows: 1fr;
		gap: 20px;
	}
}

/* ==========================================================
   Cards
   ========================================================== */

.hmm-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid var(--hmm-line);
	border-radius: var(--hmm-radius);
	background: var(--hmm-surface);
	overflow: hidden;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.hmm-card:hover {
	border-color: var(--hmm-line-strong);
	transform: translateY(-3px);
}

.hmm-card__media {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--hmm-bg);
	overflow: hidden;
}

.hmm-card__media img,
.hmm-card__media .hmm-media-fallback {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.hmm-card:hover .hmm-card__media img {
	transform: scale(1.05);
}

.hmm-media-fallback {
	display: block;
	background:
		repeating-linear-gradient(90deg, transparent 0 44%, var(--hmm-line-strong) 44% 56%, transparent 56% 100%) center / 72px 4px no-repeat,
		var(--hmm-surface-2);
}

.hmm-card__plates {
	position: absolute;
	top: 10px;
	left: 10px;
	display: flex;
	gap: 6px;
}

.hmm-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 6px;
	padding: 16px 18px 18px;
}

.hmm-card__title {
	margin: 0 !important;
	font-family: var(--hmm-font-display);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: 0.01em;
	text-wrap: balance;
}

.hmm-card__title a {
	color: var(--hmm-text) !important;
	text-decoration: none !important;
}

.hmm-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.hmm-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 14px;
	margin: auto 0 0 !important;
	padding-top: 6px;
	color: var(--hmm-muted);
	font-size: 14px;
	line-height: 1.4;
}

.hmm-card__downloads {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.hmm-card__downloads svg {
	color: var(--hmm-accent);
}

.hmm-card--tile .hmm-card__title {
	font-size: 19px;
}

.hmm-card--tile .hmm-card__body {
	padding: 12px 14px 14px;
}

.hmm-card--tile .hmm-card__meta time {
	display: none;
}

/* ==========================================================
   Sections
   ========================================================== */

.hmm-section__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--hmm-line);
}

.hmm-section__title {
	position: relative;
	margin: 0;
	color: var(--hmm-text);
	font-family: var(--hmm-font-display);
	font-size: clamp(28px, 3.4vw, 40px);
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.hmm-section__title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -15px;
	width: 48px;
	height: 3px;
	background: var(--hmm-accent);
}

.hmm-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Games */
.hmm-games {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) {
	.hmm-games {
		grid-template-columns: 1fr 1fr;
		gap: 20px;
	}
}

.hmm-game {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 220px;
	border-radius: var(--hmm-radius);
	overflow: hidden;
	color: var(--hmm-text) !important;
	text-decoration: none !important;
	isolation: isolate;
}

@media (min-width: 1024px) {
	.hmm-game {
		min-height: 280px;
	}
}

.hmm-game img {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.hmm-game::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(to top, rgba(20, 22, 24, 0.94) 0%, rgba(20, 22, 24, 0.35) 60%, rgba(20, 22, 24, 0.1) 100%);
}

.hmm-game:hover img {
	transform: scale(1.04);
}

.hmm-game__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 24px;
}

.hmm-game__plate .tmh-plate {
	height: 36px;
}

.hmm-game__plate .tmh-plate__text {
	font-size: 22px;
}

.hmm-game__name {
	font-family: var(--hmm-font-display);
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.hmm-game__count {
	display: inline-flex;
	gap: 8px;
	color: var(--hmm-accent);
	font-family: var(--hmm-font-display);
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.hmm-game__count span {
	transition: transform 0.15s ease;
}

.hmm-game:hover .hmm-game__count span {
	transform: translateX(4px);
}

.hmm-cats ul {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Ranking */
.hmm-ranking {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: hmm-rank;
	border: 1px solid var(--hmm-line);
	border-radius: var(--hmm-radius);
	background: var(--hmm-surface);
	overflow: hidden;
}

.hmm-rank {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 18px;
	border-top: 1px solid var(--hmm-line);
	counter-increment: hmm-rank;
	transition: background-color 0.15s ease;
}

.hmm-rank:first-child {
	border-top: 0;
}

.hmm-rank:hover {
	background: var(--hmm-surface-2);
}

.hmm-rank::before {
	content: counter(hmm-rank);
	flex: none;
	width: 32px;
	color: var(--hmm-line-strong);
	font-family: var(--hmm-font-display);
	font-size: 34px;
	font-weight: 700;
	line-height: 1;
	text-align: center;
}

.hmm-rank:first-child::before {
	color: var(--hmm-accent);
}

.hmm-rank__media {
	flex: none;
	width: 96px;
	aspect-ratio: 16 / 9;
	border-radius: 6px;
	overflow: hidden;
	background: var(--hmm-bg);
}

.hmm-rank__media img,
.hmm-rank__media .hmm-media-fallback {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hmm-rank__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.hmm-rank__title {
	overflow: hidden;
	color: var(--hmm-text) !important;
	font-family: var(--hmm-font-display);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.15;
	text-decoration: none !important;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hmm-rank__title::after {
	content: "";
	position: absolute;
	inset: 0;
}

.hmm-rank__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 12px;
	color: var(--hmm-muted);
	font-size: 14px;
}

.hmm-rank__count {
	flex: none;
	color: var(--hmm-text);
	font-family: var(--hmm-font-display);
	font-size: 17px;
	font-weight: 600;
	white-space: nowrap;
}

@media (max-width: 599px) {
	.hmm-rank__media {
		display: none;
	}

	.hmm-rank__count {
		display: none;
	}
}

/* CTA */
.hmm-cta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
	padding: 36px 28px;
	border-radius: var(--hmm-radius);
	background:
		repeating-linear-gradient(90deg, var(--hmm-bg) 0 28px, transparent 28px 56px) left bottom / 100% 6px no-repeat,
		var(--hmm-accent);
	color: var(--hmm-bg);
}

.hmm-cta__text {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 640px;
}

.hmm-cta__title {
	margin: 0;
	color: var(--hmm-bg);
	font-family: var(--hmm-font-display);
	font-size: clamp(28px, 3.6vw, 44px);
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
	text-wrap: balance;
}

.hmm-cta p {
	margin: 0;
	font-size: 17px;
	font-weight: 500;
	text-wrap: pretty;
}

.hmm-cta .hmm-btn {
	border-color: var(--hmm-bg);
	background: var(--hmm-bg);
	color: var(--hmm-accent) !important;
}

.hmm-cta .hmm-btn:hover {
	color: var(--hmm-accent) !important;
}

@media (min-width: 768px) {
	.hmm-cta {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 48px 48px 54px;
	}
}

/* Empty state */
.hmm-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 72px 24px;
	border: 1px dashed var(--hmm-line-strong);
	border-radius: var(--hmm-radius);
	color: var(--hmm-muted);
	text-align: center;
}

.hmm-empty p {
	margin: 0;
}

.hmm-empty__title {
	color: var(--hmm-text);
	font-family: var(--hmm-font-display);
	font-size: 28px;
	font-weight: 700;
	text-transform: uppercase;
}

/* ==========================================================
   Footer
   ========================================================== */

.hmm-footer {
	border-top: 1px solid var(--hmm-line);
	background: var(--hmm-footer-bg);
	color: var(--hmm-muted);
	font-size: 15px;
}

.hmm-footer__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 36px;
	padding-top: 56px;
	padding-bottom: 48px;
}

@media (min-width: 768px) {
	.hmm-footer__grid {
		grid-template-columns: 1.6fr repeat(3, 1fr);
	}
}

.hmm-footer__brand {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}

.hmm-footer__about {
	max-width: 36ch;
	margin: 0;
	line-height: 1.6;
}

.hmm-footer__title,
.hmm-footer .footer-widget-title,
.hmm-footer .widget-title {
	margin: 0 0 14px;
	padding: 0;
	border: 0;
	color: var(--hmm-text);
	font-family: var(--hmm-font-display);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.hmm-footer ul {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hmm-footer ul li {
	padding: 0 !important;
}

.hmm-footer a {
	color: var(--hmm-muted) !important;
	text-decoration: none !important;
	transition: color 0.15s ease;
}

.hmm-footer a:hover {
	color: var(--hmm-accent) !important;
}

.hmm-footer .hmm-brand__link {
	color: var(--hmm-text) !important;
}

.hmm-footer .hmm-btn--ghost {
	color: var(--hmm-accent) !important;
}

.hmm-footer__legal {
	border-top: 1px solid var(--hmm-line);
}

.hmm-footer__legal-inner {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding-top: 20px;
	padding-bottom: 24px;
	font-size: 13px;
	line-height: 1.5;
}

.hmm-footer__legal-inner p {
	margin: 0;
}

@media (min-width: 768px) {
	.hmm-footer__legal-inner {
		flex-direction: row;
		justify-content: space-between;
		gap: 24px;
	}

	.hmm-footer__legal-inner p:last-child {
		max-width: 60ch;
		text-align: right;
	}
}

/* ==========================================================
   Dark skin for HitMag's regular templates (blog, pages, search, 404)
   ========================================================== */

.hmm-boxed {
	padding-top: 48px !important;
	padding-bottom: 72px !important;
	color: var(--hmm-text);
}

@media (min-width: 1200px) {
	.hmm-boxed {
		max-width: 1280px !important;
	}
}

.hmm-boxed h1,
.hmm-boxed h2,
.hmm-boxed h3,
.hmm-boxed h4,
.hmm-boxed h5,
.hmm-boxed h6 {
	color: var(--hmm-text);
	font-family: var(--hmm-font-display);
	letter-spacing: 0.01em;
}

.hmm-boxed .entry-title,
.hmm-boxed .page-title {
	font-weight: 700;
	line-height: 1.05;
	text-transform: uppercase;
}

.hmm-boxed a {
	color: var(--hmm-accent);
}

.hmm-boxed a:hover {
	color: var(--hmm-text);
}

.hmm-boxed .entry-title a,
.hmm-boxed .hitmag-post .entry-title a,
.hmm-boxed .widget a,
.hmm-boxed .widget-area a {
	color: var(--hmm-text);
}

.hmm-boxed .entry-title a:hover,
.hmm-boxed .widget a:hover,
.hmm-boxed .widget-area a:hover {
	color: var(--hmm-accent);
}

.hmm-boxed .entry-meta,
.hmm-boxed .entry-meta a,
.hmm-boxed .hitmag-post .entry-meta,
.hmm-boxed .hitmag-post .entry-meta a,
.hmm-boxed .cat-links,
.hmm-boxed .tags-links,
.hmm-boxed .comment-metadata a {
	color: var(--hmm-muted);
}

.hmm-boxed .cat-links a {
	background: var(--hmm-accent) !important;
	color: var(--hmm-bg) !important;
}

.hmm-boxed .widget-title,
.hmm-boxed .elementor-widget-container h5 {
	border-bottom-color: var(--hmm-accent);
	color: var(--hmm-text);
	font-family: var(--hmm-font-display);
	letter-spacing: 0.06em;
}

.hmm-boxed .widget {
	padding: 20px;
	border: 1px solid var(--hmm-line);
	border-radius: var(--hmm-radius);
	background: var(--hmm-surface);
}

.hmm-boxed input[type="text"],
.hmm-boxed input[type="email"],
.hmm-boxed input[type="url"],
.hmm-boxed input[type="password"],
.hmm-boxed input[type="search"],
.hmm-boxed input[type="number"],
.hmm-boxed textarea,
.hmm-boxed select {
	border: 1px solid var(--hmm-line-strong);
	border-radius: 8px;
	background: var(--hmm-surface);
	color: var(--hmm-text);
}

.hmm-boxed input:focus,
.hmm-boxed textarea:focus,
.hmm-boxed select:focus {
	border-color: var(--hmm-accent);
	outline: none;
}

.hmm-boxed button,
.hmm-boxed input[type="button"],
.hmm-boxed input[type="reset"],
.hmm-boxed input[type="submit"],
.hmm-boxed .th-readmore,
.hmm-boxed .wp-block-button__link {
	border-radius: 8px;
	background: var(--hmm-accent);
	color: var(--hmm-bg) !important;
	font-family: var(--hmm-font-display);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hmm-boxed blockquote,
.hmm-boxed pre,
.hmm-boxed code,
.hmm-boxed .authorbox,
.hmm-boxed .hm-authorbox,
.hmm-boxed .comment-body {
	border-color: var(--hmm-line);
	background: var(--hmm-surface);
	color: var(--hmm-text);
}

.hmm-boxed table,
.hmm-boxed th,
.hmm-boxed td,
.hmm-boxed hr,
.hmm-boxed .hentry,
.hmm-boxed .post-navigation,
.hmm-boxed .comments-area {
	border-color: var(--hmm-line);
}

.hmm-boxed .post-navigation .post-title,
.hmm-boxed .nav-links a {
	color: var(--hmm-text);
}

.hmm-boxed .page-numbers {
	border-color: var(--hmm-line-strong);
	background: var(--hmm-surface);
	color: var(--hmm-text);
}

.hmm-boxed .page-numbers.current {
	background: var(--hmm-accent);
	color: var(--hmm-bg);
}

/* Plugin pages (submit form) rendered inside a regular page keep their own dark box. */
.hmm-boxed .tmh {
	border-radius: var(--hmm-radius);
}

@media (prefers-reduced-motion: reduce) {
	.hmm *,
	.hmm *::before,
	.hmm *::after {
		transition: none !important;
		scroll-behavior: auto !important;
	}
}

/* ==========================================================================
   Community: header account, card badges, single mod extras, creator profile
   ========================================================================== */

.hmm-account {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 12px 4px 4px;
	border: 1px solid var(--hmm-line-strong);
	border-radius: 999px;
	color: var(--hmm-text) !important;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none !important;
	white-space: nowrap;
	transition: border-color 0.2s ease;
}

.hmm-account:hover,
.hmm-account:focus-visible {
	border-color: var(--hmm-accent);
}

.hmm-account--guest {
	padding: 8px 14px;
}

.hmm-account__avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
}

.hmm-account__dot {
	position: absolute;
	top: 2px;
	left: 24px;
	width: 10px;
	height: 10px;
	border: 2px solid var(--hmm-bg);
	border-radius: 50%;
	background: var(--hmm-accent);
}

.hmm-card__badge {
	position: absolute;
	top: 10px;
	right: 10px;
}

.hmm-card__rating {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--hmm-accent);
	font-weight: 600;
}

.hmm-single__byline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
}

.hmm-single__byline .tmh-single__byline {
	margin: 0;
}

.hmm-single__byline a {
	color: var(--hmm-text);
}

.hmm-single__rating-link {
	text-decoration: none !important;
}

.hmm-single__edit {
	margin-top: 16px;
}

.hmm-single__share {
	margin: 20px 0 8px;
}

.hmm-notice {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0 0 24px;
	padding: 14px 18px;
	border: 1px solid rgba(242, 169, 0, 0.4);
	border-radius: var(--hmm-radius);
	background: rgba(242, 169, 0, 0.08);
	color: var(--hmm-text);
}

.hmm-notice svg {
	flex-shrink: 0;
	color: var(--hmm-accent);
}

.hmm-notice p {
	margin: 0;
	line-height: 1.5;
}

.hmm-changelog {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	border-left: 2px solid var(--hmm-line-strong);
}

.hmm-changelog__item {
	position: relative;
	padding: 0 0 20px 22px;
}

.hmm-changelog__item::before {
	content: "";
	position: absolute;
	top: 6px;
	left: -7px;
	width: 12px;
	height: 12px;
	border: 2px solid var(--hmm-bg);
	border-radius: 50%;
	background: var(--hmm-line-strong);
}

.hmm-changelog__item.is-latest::before {
	background: var(--hmm-accent);
}

.hmm-changelog__head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 0 0 4px;
	color: var(--hmm-muted);
	font-size: 14px;
}

.hmm-changelog__head strong {
	color: var(--hmm-text);
	font-family: var(--hmm-font-display);
	font-size: 18px;
	letter-spacing: 0.02em;
}

.hmm-changelog__notes {
	margin: 0;
	line-height: 1.6;
}

.hmm-single__report {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	margin: 8px 0 32px;
	padding: 18px 20px;
	border: 1px dashed var(--hmm-line-strong);
	border-radius: var(--hmm-radius);
}

.hmm-single__report p {
	margin: 0;
	color: var(--hmm-muted);
	line-height: 1.5;
}

.hmm-related {
	margin-top: 56px;
	padding-top: 40px;
	border-top: 1px solid var(--hmm-line);
}

.hmm-related .hmm-section__title {
	margin-bottom: 24px;
}

/* Creator profile */
.hmm-profile__hero {
	position: relative;
	padding: 120px 0 32px;
	background:
		linear-gradient(to bottom, rgba(20, 22, 24, 0.2), var(--hmm-bg) 92%),
		var(--hmm-cover, none) center / cover no-repeat,
		var(--hmm-surface);
	border-bottom: 1px solid var(--hmm-line);
}

.hmm-profile__inner {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.hmm-profile__avatar {
	width: 120px;
	height: 120px;
	border: 4px solid var(--hmm-bg);
	border-radius: 50%;
	object-fit: cover;
	background: var(--hmm-surface-2);
}

.hmm-profile__info {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 8px;
}

.hmm-profile__info .hmm-eyebrow {
	margin: 0;
}

.hmm-profile__name {
	margin: 0;
	color: var(--hmm-text);
	font-family: var(--hmm-font-display);
	font-size: clamp(2.25rem, 5vw, 3.5rem);
	font-weight: 700;
	line-height: 1;
	text-wrap: balance;
}

.hmm-profile__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin: 0;
	color: var(--hmm-muted);
}

.hmm-profile__stats {
	display: flex;
	gap: 28px;
	margin: 0;
}

.hmm-profile__stats div {
	display: flex;
	flex-direction: column-reverse;
}

.hmm-profile__stats dt {
	color: var(--hmm-muted);
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.hmm-profile__stats dd {
	margin: 0;
	color: var(--hmm-text);
	font-family: var(--hmm-font-display);
	font-size: 32px;
	font-weight: 700;
	line-height: 1.1;
}

.hmm-profile__body {
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding-top: 40px;
	padding-bottom: 64px;
}

.hmm-profile__aside {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.hmm-profile__card {
	padding: 20px;
	border: 1px solid var(--hmm-line);
	border-radius: var(--hmm-radius);
	background: var(--hmm-surface);
}

.hmm-profile__card p {
	line-height: 1.6;
}

.hmm-profile__card-title {
	margin: 0 0 10px;
	color: var(--hmm-text);
	font-family: var(--hmm-font-display);
	font-size: 20px;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.hmm-profile__mods {
	flex: 1;
	min-width: 0;
}

.hmm-profile__mods .hmm-section__title {
	margin-bottom: 20px;
}

.hmm-muted {
	color: var(--hmm-muted);
}

@media (min-width: 768px) {
	.hmm-profile__inner {
		flex-direction: row;
		align-items: flex-end;
	}

	.hmm-profile__avatar {
		width: 148px;
		height: 148px;
	}
}

@media (min-width: 1024px) {
	.hmm-profile__body {
		flex-direction: row-reverse;
		align-items: flex-start;
	}

	.hmm-profile__aside {
		position: sticky;
		top: calc(var(--hmm-header-h) + 24px);
		width: 320px;
		flex-shrink: 0;
	}
}

@media (max-width: 1023px) {
	.hmm-account__label {
		display: inline;
	}
}

.hmm-profile__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
}

/* ---------- Comment form ---------- */
.comment-respond {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: 32px;
	padding: 28px;
	background: var(--hmm-surface);
	border: 1px solid var(--hmm-line);
	border-radius: var(--hmm-radius);
}
.comment-respond .comment-reply-title {
	margin: 0;
	font-family: var(--hmm-font-display);
	font-size: 1.6rem;
	text-transform: uppercase;
	color: var(--hmm-text);
}
.comment-respond .comment-reply-title small a { color: var(--hmm-accent); font-size: 0.9rem; }
.comment-respond .comment-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
.comment-respond .comment-form > * { margin: 0; grid-column: 1 / -1; }
.comment-respond .comment-form-author,
.comment-respond .comment-form-email { grid-column: auto; }
.comment-respond .comment-notes,
.comment-respond .logged-in-as { color: var(--hmm-muted); font-size: 0.9rem; }
.comment-respond .logged-in-as a { color: var(--hmm-accent); }
.comment-respond .required { color: var(--hmm-accent); }
.comment-respond label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 0.95rem;
	text-transform: none;
	letter-spacing: 0;
	color: var(--hmm-text);
}
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond textarea {
	width: 100%;
	max-width: none;
	padding: 12px 14px;
	background: var(--hmm-bg);
	border: 1px solid var(--hmm-line-strong);
	border-radius: 10px;
	color: var(--hmm-text);
	font: inherit;
	font-size: 1rem;
	line-height: 1.5;
	box-shadow: none;
}
.comment-respond textarea { min-height: 150px; resize: vertical; }
.comment-respond input::placeholder,
.comment-respond textarea::placeholder { color: var(--hmm-muted); }
.comment-respond input:focus,
.comment-respond textarea:focus {
	outline: none;
	border-color: var(--hmm-accent);
	box-shadow: 0 0 0 3px rgba(242, 169, 0, 0.2);
}
.comment-respond input:-webkit-autofill {
	-webkit-text-fill-color: var(--hmm-text);
	-webkit-box-shadow: 0 0 0 40px var(--hmm-bg) inset;
}
.comment-respond .comment-form-cookies-consent {
	display: flex;
	align-items: center;
	gap: 10px;
}
.comment-respond .comment-form-cookies-consent label {
	margin: 0;
	font-weight: 400;
	color: var(--hmm-muted);
}
.comment-respond .comment-form-cookies-consent input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--hmm-accent);
}
.comment-respond .form-submit { display: flex; }
.comment-respond input[type="submit"] {
	padding: 12px 26px;
	background: var(--hmm-accent);
	border: 0;
	border-radius: 10px;
	color: var(--hmm-bg);
	font-family: var(--hmm-font-display);
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
}
.comment-respond input[type="submit"]:hover { filter: brightness(1.08); }
.comment-respond input[type="submit"]:focus-visible { outline: 2px solid var(--hmm-text); outline-offset: 2px; }
@media (max-width: 600px) {
	.comment-respond { padding: 20px; }
	.comment-respond .comment-form { grid-template-columns: 1fr; }
}

/* ==========================================================
   Appearance: light mode
   Light is the default; html[data-hmm-theme] is set before paint by an inline script.
   ========================================================== */

html[data-hmm-theme="light"] {
	--hmm-bg: #ffffff;
	--hmm-surface: #ffffff;
	--hmm-surface-2: #f1f3f5;
	--hmm-text: #1b1d20;
	/* Darker amber keeps accent text and buttons readable on white (AA). */
	--hmm-accent: #a35f00;
	--hmm-muted: #505862;
	--hmm-line: #cbd1d8;
	--hmm-line-strong: #858e99;
	--hmm-header-bg: rgba(255, 255, 255, 0.86);
	--hmm-header-bg-solid: rgba(255, 255, 255, 0.97);
	--hmm-footer-bg: #f1f3f5;
	--hmm-danger: #c42a31;
	--hmm-shadow: 0 16px 40px rgba(27, 29, 32, 0.14);
	color-scheme: light;
}

/* Text laid over photos keeps the dark palette in both modes. */
html[data-hmm-theme="light"] .hmm-feature,
html[data-hmm-theme="light"] .hmm-game,
html[data-hmm-theme="light"] .tmhc-dash__head {
	--hmm-bg: #141618;
	--hmm-surface: #1d2024;
	--hmm-surface-2: #25292e;
	--hmm-text: #ece8df;
	--hmm-accent: #f2a900;
	--hmm-muted: rgba(236, 232, 223, 0.64);
	--hmm-line: rgba(236, 232, 223, 0.1);
	--hmm-line-strong: rgba(236, 232, 223, 0.22);
	--tmhc-bg: #141618;
	--tmhc-surface: #1d2024;
	--tmhc-surface-2: #25292e;
	--tmhc-text: #ece8df;
	--tmhc-accent: #f2a900;
	--tmhc-muted: rgba(236, 232, 223, 0.64);
	--tmhc-line: rgba(236, 232, 223, 0.1);
	--tmhc-line-strong: rgba(236, 232, 223, 0.22);
	color: #ece8df;
	color-scheme: dark;
}

/* Brand icons are fetched in a light tint for dark backgrounds; darken them on light ones. */
html[data-hmm-theme="light"] .tmhc-brand {
	filter: invert(0.9);
}

html[data-hmm-theme="light"] .tmhc-social-login__btn .tmhc-brand,
html[data-hmm-theme="light"] .tmhc-dash__head .tmhc-brand {
	filter: none;
}

/* Smooth cross-fade only while switching, so normal hovers keep their own timing. */
html.hmm-theme-switching,
html.hmm-theme-switching *,
html.hmm-theme-switching *::before,
html.hmm-theme-switching *::after {
	transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, fill 0.3s ease !important;
}

@media (prefers-reduced-motion: reduce) {
	html.hmm-theme-switching,
	html.hmm-theme-switching *,
	html.hmm-theme-switching *::before,
	html.hmm-theme-switching *::after {
		transition: none !important;
	}
}

/* Header tools: appearance button + mobile menu toggle */
.hmm-header__tools {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}

@media (min-width: 1024px) {
	.hmm-header__tools {
		order: 2;
		margin-left: 0;
	}
}

.hmm-appearance-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--hmm-line-strong);
	border-radius: 8px;
	background: transparent !important;
	color: var(--hmm-text) !important;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.hmm-appearance-toggle:hover,
.hmm-appearance-toggle[aria-expanded="true"] {
	border-color: var(--hmm-accent);
	color: var(--hmm-accent) !important;
}

.hmm-appearance-toggle__icon {
	display: inline-flex;
}

.hmm-appearance-toggle__icon--light,
html[data-hmm-theme="light"] .hmm-appearance-toggle__icon--dark {
	display: none;
}

html[data-hmm-theme="light"] .hmm-appearance-toggle__icon--light {
	display: inline-flex;
}

/* Popover */
.hmm-appearance-dialog {
	position: fixed;
	z-index: 1000;
	width: min(300px, calc(100vw - 24px));
	padding: 14px;
	border: 1px solid var(--hmm-line-strong);
	border-radius: var(--hmm-radius);
	background: var(--hmm-surface);
	color: var(--hmm-text);
	box-shadow: var(--hmm-shadow);
	font-family: var(--hmm-font-body);
	box-sizing: border-box;
	animation: hmm-pop 0.16s ease;
}

.hmm-appearance-dialog[hidden] {
	display: none;
}

@keyframes hmm-pop {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hmm-appearance-dialog {
		animation: none;
	}
}

.hmm-appearance-dialog__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.hmm-appearance-dialog__title {
	margin: 0;
	font-family: var(--hmm-font-display);
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hmm-appearance-dialog__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent !important;
	color: var(--hmm-muted) !important;
	cursor: pointer;
}

.hmm-appearance-dialog__close:hover {
	background: var(--hmm-surface-2) !important;
	color: var(--hmm-text) !important;
}

.hmm-appearance-dialog__note {
	margin: 12px 0 0;
	color: var(--hmm-muted);
	font-size: 13px;
	line-height: 1.45;
}

/* Choice cards (popover and dashboard) */
.hmm-appearance {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 12px;
}

.hmm-appearance--compact {
	grid-template-columns: 1fr;
	gap: 6px;
}

.hmm-appearance__option {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 12px;
	border: 1px solid var(--hmm-line-strong);
	border-radius: 10px;
	background: var(--hmm-bg);
	color: var(--hmm-text);
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hmm-appearance--compact .hmm-appearance__option {
	flex-direction: row;
	align-items: center;
	padding: 8px 10px;
}

.hmm-appearance__option:hover {
	border-color: var(--hmm-accent);
}

.hmm-appearance__option:has(input:checked) {
	border-color: var(--hmm-accent);
	box-shadow: inset 0 0 0 1px var(--hmm-accent);
}

.hmm-appearance__option:has(input:focus-visible) {
	outline: 2px solid var(--hmm-accent);
	outline-offset: 2px;
}

/* Mini preview of each mode: page colour with a "text" bar and an accent chip. */
.hmm-appearance__swatch {
	position: relative;
	display: block;
	height: 64px;
	border: 1px solid rgba(127, 127, 127, 0.3);
	border-radius: 6px;
	overflow: hidden;
}

.hmm-appearance--compact .hmm-appearance__swatch {
	flex: 0 0 44px;
	height: 32px;
}

.hmm-appearance__swatch::before,
.hmm-appearance__swatch::after,
.hmm-appearance__swatch span {
	content: "";
	position: absolute;
	left: 10%;
	height: 12%;
	border-radius: 2px;
}

.hmm-appearance__swatch::before {
	top: 22%;
	width: 56%;
}

.hmm-appearance__swatch span {
	top: 44%;
	width: 38%;
	opacity: 0.55;
}

.hmm-appearance__swatch::after {
	bottom: 18%;
	width: 26%;
	height: 16%;
}

.hmm-appearance__option--dark .hmm-appearance__swatch {
	background: #141618;
}

.hmm-appearance__option--light .hmm-appearance__swatch {
	background: #f5f3ee;
}

.hmm-appearance__option--auto .hmm-appearance__swatch {
	background: linear-gradient(135deg, #f5f3ee 50%, #141618 50%);
}

.hmm-appearance__option--dark .hmm-appearance__swatch::before,
.hmm-appearance__option--dark .hmm-appearance__swatch span {
	background: #ece8df;
}

.hmm-appearance__option--light .hmm-appearance__swatch::before,
.hmm-appearance__option--light .hmm-appearance__swatch span,
.hmm-appearance__option--auto .hmm-appearance__swatch::before,
.hmm-appearance__option--auto .hmm-appearance__swatch span {
	background: #1b1d20;
}

.hmm-appearance__option--dark .hmm-appearance__swatch::after {
	background: #f2a900;
}

.hmm-appearance__option--light .hmm-appearance__swatch::after,
.hmm-appearance__option--auto .hmm-appearance__swatch::after {
	background: #a35f00;
}

.hmm-appearance__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.hmm-appearance__label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--hmm-font-display);
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.hmm-appearance__option:has(input:checked) .hmm-appearance__label {
	color: var(--hmm-accent);
}

.hmm-appearance__hint {
	color: var(--hmm-muted);
	font-size: 13px;
	line-height: 1.35;
}

/* Named controls stay easy to identify without hovering over an icon. */
.hmm-menu-toggle,
.hmm-appearance-toggle {
	width: auto;
	min-width: 44px;
	gap: 8px;
	padding: 0 12px;
	background: var(--hmm-surface) !important;
	font-size: 14px;
	font-weight: 600;
}

.hmm-header__tools {
	flex-wrap: wrap;
}

.hmm-nav__list,
.hmm-nav ul {
	gap: 6px;
}

.hmm-nav a,
.hmm-nav a:hover,
.hmm-nav a:focus-visible,
.hmm-nav .current-menu-item > a,
.hmm-nav .current_page_item > a {
	border: 0;
	background: transparent;
}

/* Prevent the appearance label from being squeezed outside its button. */
.hmm-header .hmm-header__tools {
	flex: 0 0 auto;
	flex-wrap: nowrap;
}
.hmm-header .hmm-appearance-toggle {
	flex: 0 0 auto;
	width: auto;
	min-width: max-content;
	padding: 0 12px;
	gap: 8px;
	white-space: nowrap;
	background: var(--hmm-surface) !important;
	color: var(--hmm-text) !important;
}
.hmm-appearance-toggle__icon {
	flex-shrink: 0;
}
.hmm-appearance-toggle__label {
	color: inherit;
}
@media (max-width: 1279px) {
	.hmm-header__tools {
		order: 0;
		margin-left: auto;
	}
}
@media (min-width: 1280px) {
	.hmm-header__panel {
		min-width: 0;
	}
	.hmm-search {
		width: clamp(150px, 16vw, 240px);
		flex-shrink: 1;
	}
	.hmm-header__panel > .hmm-btn,
	.hmm-header__panel > .hmm-account {
		flex-shrink: 0;
	}
}

/* Appearance uses only its icon, with a fixed, non-shrinking touch target. */
.hmm-header .hmm-appearance-toggle {
 width: 44px;
 min-width: 44px;
 height: 44px;
 flex: 0 0 44px;
 padding: 0;
 gap: 0;
}
.hmm-header .hmm-appearance-toggle__label {
 display: none;
}

/* Both access tabs remain visible; selection swaps their colors. */
body .tmhc .tmhc-segmented button[aria-selected="false"],
body .tmhc .tmhc-segmented button[aria-selected="false"]:is(:hover, :focus, :active) {
 background: #ffffff !important;
 color: #25292e !important;
 -webkit-text-fill-color: #25292e !important;
 border: 1px solid #858e99;
 opacity: 1;
 visibility: visible;
}
body .tmhc .tmhc-segmented button[aria-selected="true"],
body .tmhc .tmhc-segmented button[aria-selected="true"]:is(:hover, :focus, :active) {
 background: var(--tmhc-accent) !important;
 color: var(--tmhc-bg) !important;
 -webkit-text-fill-color: var(--tmhc-bg) !important;
 border: 1px solid var(--tmhc-accent);
 opacity: 1;
 visibility: visible;
}


/* Draw the eye on the control itself so visibility does not depend on nested SVGs. */
body .tmhc .tmhc-pass__toggle,
body .tmhc .tmhc-pass__toggle:is(:hover, :focus, :active, [aria-pressed="true"]) {
 display: flex !important;
 align-items: center;
 justify-content: center;
 width: 46px;
 min-width: 46px;
 height: auto;
 min-height: 44px;
 padding: 0 !important;
 background: #ffffff !important;
 color: #000000 !important;
 border-left: 1px solid #858e99;
 visibility: visible !important;
 opacity: 1 !important;
 z-index: 1;
}
html[data-hmm-theme="dark"] body .tmhc .tmhc-pass__toggle,
html[data-hmm-theme="dark"] body .tmhc .tmhc-pass__toggle:is(:hover, :focus, :active, [aria-pressed="true"]) {
 background: #1d2024 !important;
 color: #ffffff !important;
 border-left-color: #858e99;
}
body .tmhc .tmhc-pass__toggle::before {
 content: "";
 display: block;
 position: absolute;
 width: 22px;
 height: 14px;
 box-sizing: border-box;
 border: 2px solid currentColor;
 border-radius: 70% 30% 70% 30%;
 transform: rotate(45deg);
 background: transparent;
}
body .tmhc .tmhc-pass__toggle::after {
 content: "";
 display: block;
 position: absolute;
 width: 6px;
 height: 6px;
 border-radius: 50%;
 background: currentColor;
}
body .tmhc .tmhc-pass__toggle[aria-pressed="true"]::after {
 width: 27px;
 height: 2px;
 border-radius: 1px;
 transform: rotate(45deg);
 background: currentColor;
}
body .tmhc .tmhc-pass__toggle > [data-icon-show],
body .tmhc .tmhc-pass__toggle > [data-icon-hide] {
 display: none !important;
}
body .tmhc .tmhc-pass input {
 padding-right: 56px;
}
body .tmhc .tmhc-pass__toggle:focus-visible {
 outline: 2px solid currentColor;
 outline-offset: -4px;
}

/* Explicit inverse colors for the password eye in both appearance modes. */
html[data-hmm-theme="light"] .tmhc .tmhc-pass__toggle {
 color: #000000 !important;
 background: #ffffff !important;
}
html[data-hmm-theme="dark"] .tmhc .tmhc-pass__toggle {
 color: #ffffff !important;
 background: #1d2024 !important;
}
