/*
 * FHX Workshop
 * Тёплый графит, один абрикосовый акцент, цвет живёт в обложках игр.
 * Сетка 4px. Принципы: unslop by Damir Sokolovsky (@heydamir), CC BY 4.0.
 */

/* ---------- Токены ---------- */

:root,
:root[data-theme="dark"] {
	color-scheme: dark;
	--bg-deep: #12110f;
	--bg: #161513;
	--card: #1c1a18;
	--raised: #262421;
	--raised-hover: #2d2a26;
	--text: #efe9de;
	--text-2: #aaa398;
	--text-3: #8a847a;
	--line: rgba(239, 233, 222, 0.08);
	--line-strong: rgba(239, 233, 222, 0.14);
	--accent: #f2a65a;
	--accent-hover: #f5b675;
	--accent-ink: #1d1206;
	--accent-text: #f2a65a;
	--ok: #4cc38a;
	--warn: #e0b04a;
	--bad: #e5484d;
	--highlight: inset 0 1px 0 rgba(255, 255, 255, 0.08);
	--btn-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.28);
	--shadow-float: 0 24px 48px rgba(0, 0, 0, 0.32);
	--img-veil: rgba(0, 0, 0, 0);
}

:root[data-theme="light"] {
	color-scheme: light;
	--bg-deep: #efe9df;
	--bg: #f7f4ee;
	--card: #fdfbf7;
	--raised: #efe9df;
	--raised-hover: #e8e0d3;
	--text: #1f1b16;
	--text-2: #5e554a;
	--text-3: #7b7266;
	--line: rgba(31, 27, 22, 0.09);
	--line-strong: rgba(31, 27, 22, 0.16);
	--accent: #ef9a4c;
	--accent-hover: #f2a865;
	--accent-ink: #1d1206;
	--accent-text: #a5571a;
	--ok: #16a34a;
	--warn: #b7791f;
	--bad: #dc2626;
	--highlight: inset 0 1px 0 rgba(255, 255, 255, 0.7);
	--btn-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.4);
	--shadow-float: 0 8px 24px rgba(31, 27, 22, 0.08);
}

@media (prefers-color-scheme: light) {
	:root:not([data-theme]) {
		color-scheme: light;
		--bg-deep: #efe9df;
		--bg: #f7f4ee;
		--card: #fdfbf7;
		--raised: #efe9df;
		--raised-hover: #e8e0d3;
		--text: #1f1b16;
		--text-2: #5e554a;
		--text-3: #7b7266;
		--line: rgba(31, 27, 22, 0.09);
		--line-strong: rgba(31, 27, 22, 0.16);
		--accent: #ef9a4c;
		--accent-hover: #f2a865;
		--accent-text: #a5571a;
		--ok: #16a34a;
		--highlight: inset 0 1px 0 rgba(255, 255, 255, 0.7);
		--shadow-float: 0 8px 24px rgba(31, 27, 22, 0.08);
	}
}

:root {
	--font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-display: "Unbounded", "Onest", system-ui, sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

	--r-sm: 6px;
	--r-control: 10px;
	--r-card: 14px;
	--r-panel: 20px;

	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--t-fast: 150ms;
	--t-menu: 200ms;
	--t-enter: 420ms;

	--container: 1240px;
	--gutter: 24px;
	--header-h: 64px;
}

/* ---------- База ---------- */

*,
*::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-family: var(--font);
	font-size: 15px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

img,
svg,
video {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

h1,
h2,
h3,
h4 {
	margin: 0;
	font-weight: 500;
}

p,
ul,
ol,
dl,
dd,
figure {
	margin: 0;
}

ul[class],
ol[class] {
	list-style: none;
	padding: 0;
}

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

::selection {
	background: var(--accent);
	color: var(--accent-ink);
}

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

.skip-link:focus {
	position: fixed !important;
	top: 12px;
	left: 12px;
	z-index: 100;
	width: auto;
	height: auto;
	margin: 0;
	padding: 8px 16px;
	clip: auto;
	background: var(--text);
	color: var(--bg);
	border-radius: var(--r-control);
}

.container {
	width: 100%;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.container--narrow {
	max-width: calc(720px + var(--gutter) * 2);
}

.icon {
	flex: none;
}

.meta {
	font-family: var(--font-mono);
	font-size: 12px;
	line-height: 16px;
	letter-spacing: 0.01em;
	color: var(--text-3);
	font-variant-numeric: tabular-nums;
}

/* ---------- Фирменная деталь: клавиша версии ---------- */

.key {
	display: inline-flex;
	align-items: center;
	height: 22px;
	padding: 0 6px;
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	color: var(--text-2);
	background: var(--raised);
	border: 1px solid var(--line-strong);
	border-bottom-width: 2px;
	border-radius: 5px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* ---------- Статус ---------- */

.status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--text-2);
	white-space: nowrap;
}

.status__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--text-3);
}

.status--online .status__dot {
	background: var(--ok);
}

.status--updating .status__dot {
	background: var(--warn);
}

.status--offline .status__dot {
	background: var(--bad);
}

/* ---------- Кнопки ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 40px;
	padding: 0 16px;
	border: 1px solid transparent;
	border-radius: var(--r-control);
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.btn:active {
	transform: scale(0.98);
}

.btn--lg {
	height: 48px;
	padding: 0 20px;
	font-size: 15px;
}

.btn--block {
	display: flex;
	width: 100%;
}

.btn--primary {
	background: var(--accent);
	color: var(--accent-ink);
	box-shadow: var(--btn-highlight);
}

.btn--primary:hover {
	background: var(--accent-hover);
}

.btn--quiet {
	background: var(--raised);
	border-color: var(--line);
	color: var(--text);
	box-shadow: var(--highlight);
}

.btn--quiet:hover {
	background: var(--raised-hover);
	border-color: var(--line-strong);
}

.icon-btn {
	display: inline-grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	background: transparent;
	border: 1px solid transparent;
	border-radius: var(--r-control);
	color: var(--text-2);
	cursor: pointer;
	transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.icon-btn:hover {
	background: var(--raised);
	color: var(--text);
}

.link-quiet {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	color: var(--text-2);
	transition: color var(--t-fast) var(--ease);
}

.link-quiet:hover {
	color: var(--text);
}

/* ---------- Шапка ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--bg);
	border-bottom: 1px solid var(--line);
}

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

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 32px;
	height: var(--header-h);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	flex: none;
}

.brand__mark {
	color: var(--accent);
}

.brand__logo {
	width: auto;
	max-height: 32px;
}

.brand__name {
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -0.005em;
	line-height: 1;
	white-space: nowrap;
}

.site-nav {
	flex: 1;
	min-width: 0;
}

.site-nav .menu {
	display: flex;
	align-items: center;
	gap: 4px;
}

.site-nav .menu > li {
	position: relative;
}

.site-nav .menu > li > a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	height: 36px;
	padding: 0 12px;
	border-radius: var(--r-control);
	font-size: 14px;
	color: var(--text-2);
	transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.site-nav .menu > li > a:hover,
.site-nav .menu > li:focus-within > a {
	color: var(--text);
	background: var(--raised);
}

.site-nav .current-menu-item > a,
.site-nav .current-menu-ancestor > a,
.site-nav .current-menu-parent > a {
	color: var(--text);
}

.menu__caret {
	color: var(--text-3);
}

.site-nav .sub-menu {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	min-width: 220px;
	padding: 6px;
	list-style: none;
	background: var(--card);
	border: 1px solid var(--line-strong);
	border-radius: 14px;
	box-shadow: var(--shadow-float);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity var(--t-menu) var(--ease), transform var(--t-menu) var(--ease), visibility 0s linear var(--t-menu);
}

.site-nav .sub-menu::before {
	content: "";
	position: absolute;
	inset: -8px 0 auto;
	height: 8px;
}

.site-nav .menu > li:hover > .sub-menu,
.site-nav .menu > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity var(--t-menu) var(--ease), transform var(--t-menu) var(--ease), visibility 0s;
}

.site-nav .sub-menu a {
	display: flex;
	align-items: center;
	height: 36px;
	padding: 0 12px;
	border-radius: 8px;
	font-size: 14px;
	color: var(--text-2);
	white-space: nowrap;
	transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.site-nav .sub-menu a:hover {
	background: var(--raised);
	color: var(--text);
}

.site-header__tools {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
}

.menu-toggle {
	display: none;
}

.icon--close,
[data-menu-open] .icon--open {
	display: none;
}

[data-menu-open] .icon--close {
	display: block;
}

[data-theme="dark"] .icon--sun,
[data-theme="light"] .icon--moon {
	display: none;
}

.site-search {
	padding: 12px 0 16px;
	border-top: 1px solid var(--line);
}

/* ---------- Поиск ---------- */

.search-form {
	position: relative;
	display: flex;
	gap: 8px;
	max-width: 640px;
}

.search-form__icon {
	position: absolute;
	top: 50%;
	left: 14px;
	transform: translateY(-50%);
	color: var(--text-3);
	pointer-events: none;
}

.search-form__input {
	flex: 1;
	min-width: 0;
	height: 40px;
	padding: 0 12px 0 40px;
	background: var(--card);
	border: 1px solid var(--line-strong);
	border-radius: var(--r-control);
	font-size: 15px;
	transition: border-color var(--t-fast) var(--ease);
}

.search-form__input::placeholder {
	color: var(--text-3);
}

.search-form__input:focus {
	outline: none;
	border-color: var(--accent);
}

/* ---------- Главная: hero ---------- */

.hero {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	align-items: center;
	gap: 64px;
	padding-block: 80px 96px;
}

.hero__title {
	font-family: var(--font-display);
	font-size: clamp(34px, 4vw, 54px);
	font-weight: 500;
	line-height: 1.08;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

.hero__lead {
	max-width: 34rem;
	margin-top: 20px;
	font-size: 18px;
	line-height: 28px;
	color: var(--text-2);
	text-wrap: pretty;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 32px;
}

.hero__stats {
	display: flex;
	gap: 40px;
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--line);
}

.hero__stats div {
	display: flex;
	flex-direction: column-reverse;
	gap: 4px;
}

.hero__stats dt {
	font-size: 13px;
	color: var(--text-3);
}

.hero__stats dd {
	font-size: 28px;
	font-weight: 500;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

/* Свежий релиз — главный яркий момент страницы */

.release {
	padding: 8px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--r-panel);
	box-shadow: var(--highlight), var(--shadow-float);
}

.release__media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--raised);
	border-radius: 12px;
}

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

.release__body {
	padding: 20px 16px 16px;
}

.release__label {
	display: flex;
	gap: 12px;
}

.release__label span {
	color: var(--accent-text);
}

.release__title {
	margin-top: 8px;
	font-size: 22px;
	line-height: 28px;
	text-wrap: balance;
}

.release__title a:hover {
	color: var(--accent-text);
}

.release__specs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 12px;
}

.release__game {
	font-size: 14px;
	color: var(--text-2);
}

.release__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 20px;
}

/* ---------- Секции ---------- */

.section {
	padding-block: 48px;
}

.section + .section {
	padding-top: 32px;
}

.section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	margin-bottom: 24px;
}

.section__title {
	font-size: 22px;
	line-height: 28px;
}

.empty {
	padding: 48px 0;
	color: var(--text-2);
}

/* ---------- Игры ---------- */

.games {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 24px 16px;
}

.game {
	display: block;
}

.game__cover {
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--raised);
	border-radius: 12px;
	color: var(--text-3);
}

.game__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--t-enter) var(--ease);
}

.game:hover .game__cover img {
	transform: scale(1.02);
}

.game__name {
	display: block;
	margin-top: 12px;
	font-size: 15px;
	font-weight: 500;
	transition: color var(--t-fast) var(--ease);
}

.game:hover .game__name {
	color: var(--accent-text);
}

.game__count {
	display: block;
	margin-top: 4px;
}

/* ---------- Фильтр ---------- */

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 4px;
	background: var(--bg-deep);
	border: 1px solid var(--line);
	border-radius: 12px;
}

.chip {
	display: inline-flex;
	align-items: center;
	height: 30px;
	padding: 0 12px;
	border-radius: 8px;
	font-size: 14px;
	color: var(--text-2);
	transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.chip:hover {
	color: var(--text);
}

.chip.is-active {
	background: var(--raised);
	color: var(--text);
	box-shadow: var(--highlight), 0 0 0 1px var(--line);
}

/* ---------- Сетка карточек ---------- */

.grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px 24px;
}

.card {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.card__media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--raised);
	border-radius: 12px;
}

.card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--t-enter) var(--ease);
}

.card:hover .card__media img {
	transform: scale(1.02);
}

.card__placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	color: var(--text-3);
}

.card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding-top: 16px;
}

.card__eyebrow {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 22px;
	font-size: 13px;
	color: var(--text-2);
}

.card__title {
	margin-top: 8px;
	font-size: 17px;
	line-height: 24px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-wrap: pretty;
}

.card__title a {
	transition: color var(--t-fast) var(--ease);
}

.card__title a:hover {
	color: var(--accent-text);
}

.card__excerpt {
	margin-top: 8px;
	font-size: 15px;
	line-height: 24px;
	color: var(--text-2);
}

.card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 12px;
	margin-top: auto;
	padding-top: 12px;
}

.card--wide {
	grid-column: span 2;
	grid-row: span 2;
}

.card--wide .card__title {
	font-size: 24px;
	line-height: 32px;
	-webkit-line-clamp: 2;
}

.card--wide .card__meta {
	margin-top: 16px;
}

/* ---------- Пагинация ---------- */

.pagination {
	margin-top: 48px;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 36px;
	height: 36px;
	padding: 0 8px;
	border-radius: var(--r-control);
	font-family: var(--font-mono);
	font-size: 13px;
	color: var(--text-2);
	transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.pagination a.page-numbers:hover {
	background: var(--raised);
	color: var(--text);
}

.pagination .page-numbers.current {
	background: var(--raised);
	color: var(--text);
	box-shadow: var(--highlight), 0 0 0 1px var(--line);
}

/* ---------- Списки: инструкции и новости ---------- */

.lists {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 48px;
}

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

.row {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 16px;
	align-items: baseline;
	padding: 14px 0;
	border-bottom: 1px solid var(--line);
}

.row__title {
	font-size: 15px;
	line-height: 22px;
	transition: color var(--t-fast) var(--ease);
}

.row:hover .row__title {
	color: var(--accent-text);
}

/* ---------- Архив ---------- */

.archive__head {
	max-width: 720px;
	margin-bottom: 32px;
}

.page-title {
	margin-top: 8px;
	font-family: var(--font-display);
	font-size: clamp(28px, 3vw, 40px);
	line-height: 1.12;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.archive__desc {
	margin-top: 12px;
	font-size: 16px;
	line-height: 26px;
	color: var(--text-2);
}

.archive__search {
	margin-top: 24px;
}

.archive .chips {
	display: inline-flex;
	margin-bottom: 32px;
}

/* ---------- Запись ---------- */

.entry__layout {
	display: grid;
	grid-template-columns: minmax(0, 820px);
	gap: 64px;
	padding-block: 40px 48px;
}

.entry__layout.has-aside {
	grid-template-columns: minmax(0, 1fr) 340px;
}

.crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 14px;
	color: var(--text-3);
}

.crumbs a {
	color: var(--text-2);
	transition: color var(--t-fast) var(--ease);
}

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

.entry__title {
	max-width: 24ch;
	overflow-wrap: break-word;
	hyphens: auto;
	margin-top: 16px;
	font-family: var(--font-display);
	font-size: clamp(28px, 3vw, 40px);
	line-height: 1.14;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.entry--page .entry__title {
	max-width: none;
}

.entry--page .entry__head {
	padding-top: 40px;
}

.entry__lead {
	max-width: 40rem;
	margin-top: 16px;
	font-size: 18px;
	line-height: 28px;
	color: var(--text-2);
}

.entry__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin-top: 20px;
}

.entry__meta a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: color var(--t-fast) var(--ease);
}

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

.entry__cover {
	margin-top: 32px;
}

.entry__cover img {
	width: 100%;
	max-height: 520px;
	object-fit: cover;
	border-radius: var(--r-card);
}

.entry__main > .prose {
	margin-top: 40px;
}

.entry--page .prose {
	margin-block: 32px 48px;
}

.entry__aside-inner {
	position: sticky;
	top: calc(var(--header-h) + 24px);
}

.admin-bar .entry__aside-inner {
	top: calc(var(--header-h) + 56px);
}

.entry__aside-inner > * + * {
	margin-top: 24px;
}

.passport {
	padding: 20px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 16px;
	box-shadow: var(--highlight);
}

.passport__title {
	font-size: 15px;
	line-height: 20px;
}

.passport__rows {
	margin-top: 12px;
}

.passport__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 40px;
	padding: 8px 0;
	border-top: 1px solid var(--line);
}

.passport__row dt {
	font-size: 13px;
	color: var(--text-3);
}

.passport__row dd {
	font-size: 14px;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.passport__features {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding-top: 12px;
	border-top: 1px solid var(--line);
}

.passport__features li {
	padding: 4px 8px;
	font-size: 13px;
	color: var(--text-2);
	background: var(--raised);
	border-radius: var(--r-sm);
}

.passport__actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 20px;
}

.passport__actions .link-quiet {
	justify-content: center;
	padding-top: 8px;
}

.entry__widgets .widget {
	padding: 16px;
	border: 1px solid var(--line);
	border-radius: 16px;
}

/* Текст записи */

.prose {
	font-size: 16px;
	line-height: 1.7;
	color: var(--text);
	overflow-wrap: break-word;
}

.prose > * + * {
	margin-top: 1.1em;
}

.prose h2 {
	margin-top: 2em;
	font-size: 24px;
	line-height: 32px;
}

.prose h3 {
	margin-top: 1.8em;
	font-size: 19px;
	line-height: 28px;
}

.prose h2 + *,
.prose h3 + * {
	margin-top: 0.6em;
}

.prose a {
	color: var(--accent-text);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	text-decoration-color: color-mix(in srgb, var(--accent-text) 40%, transparent);
	transition: text-decoration-color var(--t-fast) var(--ease);
}

.prose a:hover {
	text-decoration-color: currentColor;
}

.prose a.btn,
.prose .wp-block-button__link {
	text-decoration: none;
}

.prose a.btn--primary {
	color: var(--accent-ink);
}

.prose a.btn--quiet {
	color: var(--text);
}

/* ---------- Кнопка скачивания в конце записи ---------- */

.getbox {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	margin: 32px 0;
	padding: 20px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 16px;
	box-shadow: var(--highlight);
}

.getbox__body {
	flex: 1 1 260px;
	min-width: 0;
}

.prose .getbox__title,
.prose .getbox__text {
	margin: 0;
}

.prose .getbox__title {
	font-size: 15px;
	font-weight: 500;
	line-height: 20px;
	color: var(--text);
}

.prose .getbox__text {
	margin-top: 4px;
	font-size: 14px;
	line-height: 20px;
	color: var(--text-2);
}

.getbox__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sc-button {
	display: inline-block;
	margin: 8px 0;
}

@media (max-width: 600px) {
	.getbox__actions,
	.getbox__actions .btn,
	.sc-button,
	.sc-button .btn {
		width: 100%;
	}
	.sc-button .btn {
		white-space: normal;
		height: auto;
		min-height: 48px;
		text-align: center;
	}
}

.prose ul,
.prose ol {
	padding-left: 1.4em;
}

.prose li + li {
	margin-top: 0.4em;
}

.prose li::marker {
	color: var(--text-3);
}

.prose strong {
	font-weight: 600;
}

.prose em {
	font-style: normal;
	color: var(--text-2);
}

.prose img {
	border-radius: 12px;
}

.prose .aligncenter {
	display: block;
	margin-inline: auto;
}

.prose .alignleft {
	float: left;
	margin: 0.3em 1.5em 1em 0;
}

.prose .alignright {
	float: right;
	margin: 0.3em 0 1em 1.5em;
}

.prose figure,
.prose .wp-caption {
	max-width: 100%;
}

.prose figcaption,
.prose .wp-caption-text {
	margin-top: 8px;
	font-size: 13px;
	line-height: 20px;
	color: var(--text-3);
	text-align: center;
}

.prose blockquote {
	margin-inline: 0;
	padding: 4px 0 4px 20px;
	border-left: 2px solid var(--accent);
	color: var(--text-2);
}

.prose code,
.prose kbd {
	padding: 2px 6px;
	font-family: var(--font-mono);
	font-size: 0.875em;
	background: var(--raised);
	border-radius: var(--r-sm);
}

.prose pre {
	padding: 16px 20px;
	overflow-x: auto;
	font-family: var(--font-mono);
	font-size: 14px;
	line-height: 22px;
	background: var(--bg-deep);
	border: 1px solid var(--line);
	border-radius: 12px;
}

.prose pre code {
	padding: 0;
	background: none;
}

.prose hr {
	height: 1px;
	margin-block: 2.4em;
	background: var(--line-strong);
	border: 0;
}

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

.prose th,
.prose td {
	padding: 10px 12px;
	text-align: left;
	border-bottom: 1px solid var(--line);
}

.prose th {
	font-weight: 500;
	color: var(--text-2);
	background: var(--card);
}

.prose iframe {
	max-width: 100%;
	border-radius: 12px;
}

.prose .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	height: 44px;
	padding: 0 20px;
	background: var(--accent);
	color: var(--accent-ink);
	border-radius: var(--r-control);
	font-size: 15px;
	font-weight: 500;
	box-shadow: var(--btn-highlight);
}

.prose .is-style-outline .wp-block-button__link {
	background: var(--raised);
	color: var(--text);
	border: 1px solid var(--line);
}

.prose::after {
	content: "";
	display: table;
	clear: both;
}

.tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 40px !important;
	padding: 0 !important;
	list-style: none;
}

.tags a {
	display: inline-flex;
	align-items: center;
	height: 28px;
	padding: 0 10px;
	font-size: 13px;
	color: var(--text-2);
	text-decoration: none;
	background: var(--raised);
	border-radius: var(--r-sm);
	transition: color var(--t-fast) var(--ease);
}

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

.page-links {
	display: flex;
	gap: 8px;
	font-size: 14px;
}

/* Соседние записи */

.post-nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	padding-block: 8px 16px;
}

.post-nav__link {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px 20px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--r-card);
	transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

.post-nav__link:hover {
	border-color: var(--line-strong);
	background: var(--raised);
}

.post-nav__link--next {
	grid-column: 2;
	text-align: right;
}

.post-nav__title {
	font-size: 15px;
	line-height: 22px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- Комментарии ---------- */

.comments {
	padding-block: 32px 64px;
}

.comment-list {
	margin: 24px 0 40px;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	margin-left: 48px;
	padding: 0;
	list-style: none;
}

.comment-body {
	padding: 16px 0;
	border-top: 1px solid var(--line);
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 15px;
	font-weight: 500;
}

.comment-author .avatar {
	border-radius: 50%;
}

.comment-author .says {
	display: none;
}

.comment-metadata {
	margin: 4px 0 0 48px;
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--text-3);
}

.comment-content {
	margin: 8px 0 0 48px;
	font-size: 15px;
	line-height: 24px;
}

.comment-content p + p {
	margin-top: 0.8em;
}

.reply {
	margin: 8px 0 0 48px;
	font-size: 13px;
}

.reply a {
	color: var(--text-2);
}

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

.comment-respond {
	margin-top: 24px;
}

.comment-form {
	display: grid;
	gap: 16px;
	margin-top: 16px;
}

.comment-form p {
	margin: 0;
}

.comment-form label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	color: var(--text-2);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 10px 12px;
	background: var(--card);
	border: 1px solid var(--line-strong);
	border-radius: var(--r-control);
	font-size: 15px;
	transition: border-color var(--t-fast) var(--ease);
}

.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: var(--accent);
}

.comment-notes,
.logged-in-as,
.comment-form-cookies-consent {
	font-size: 13px;
	color: var(--text-3);
}

.comment-form-cookies-consent {
	display: flex;
	gap: 8px;
	align-items: flex-start;
}

.comment-form-cookies-consent label {
	margin: 0;
}

/* ---------- 404 ---------- */

.notfound {
	padding-block: 96px 128px;
}

.notfound__code {
	height: 28px;
	font-size: 14px;
}

.notfound__text {
	max-width: 32rem;
	margin: 16px 0 32px;
	font-size: 17px;
	line-height: 26px;
	color: var(--text-2);
}

.notfound .link-quiet {
	margin-top: 24px;
}

/* ---------- Виджеты ---------- */

.widget__title,
.widget h2,
.widget .wp-block-heading {
	margin: 0 0 12px;
	font-family: var(--font);
	font-size: 15px;
	font-weight: 500;
	line-height: 20px;
	color: var(--text);
}

.widget + .widget {
	margin-top: 32px;
}

.widget,
.widget p {
	font-size: 14px;
	line-height: 22px;
	color: var(--text-2);
}

.widget .search-form,
.widget .wp-block-search__inside-wrapper {
	max-width: 100%;
}

.wp-block-search__input {
	height: 40px;
	padding: 0 12px;
	background: var(--card);
	border: 1px solid var(--line-strong);
	border-radius: var(--r-control);
}

.wp-block-search__button {
	height: 40px;
	margin-left: 8px;
	padding: 0 16px;
	background: var(--raised);
	color: var(--text);
	border: 1px solid var(--line);
	border-radius: var(--r-control);
	cursor: pointer;
}

.wp-block-search__label {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	color: var(--text-3);
}

.widget ul {
	padding: 0;
	list-style: none;
}

.widget li + li {
	margin-top: 8px;
}

.widget a {
	color: var(--text-2);
}

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

/* Рекламные блоки внутри контента не ломают ширину */

.prose ins.adsbygoogle,
.quads-location {
	max-width: 100%;
	overflow: hidden;
}

/* Пустой рекламный блок (Google не нашёл объявление) не оставляет дыру */
ins.adsbygoogle[data-ad-status="unfilled"] {
	display: none !important;
}

.quads-location:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
	display: none;
}

/* ---------- Подвал ---------- */

.site-footer {
	margin-top: 64px;
	background: var(--bg-deep);
	border-top: 1px solid var(--line);
}

.site-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 48px;
	padding-block: 48px 40px;
}

.site-footer__note {
	max-width: 30rem;
	margin-top: 16px;
	font-size: 14px;
	line-height: 22px;
	color: var(--text-3);
}

.footer-menu {
	display: grid;
	gap: 10px;
}

.footer-menu a {
	font-size: 14px;
	color: var(--text-2);
	transition: color var(--t-fast) var(--ease);
}

.footer-menu a:hover {
	color: var(--text);
}

.site-footer__bottom {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding-block: 20px 24px;
	border-top: 1px solid var(--line);
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--text-3);
}

.site-footer__top:hover {
	color: var(--text);
}

/* ---------- Появление ---------- */

@media (prefers-reduced-motion: no-preference) {
	.reveal {
		animation: fhx-rise var(--t-enter) var(--ease) both;
	}

	.reveal + .reveal {
		animation-delay: 60ms;
	}

	@keyframes fhx-rise {
		from {
			opacity: 0;
			transform: translateY(8px);
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
	}
}

/* ---------- Адаптив ---------- */

@media (max-width: 1080px) {
	.hero {
		grid-template-columns: minmax(0, 1fr);
		gap: 48px;
		padding-block: 56px 64px;
	}

	.hero__text {
		max-width: 640px;
	}

	.release {
		max-width: 720px;
	}

	.grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.card--wide {
		grid-row: auto;
	}

	.entry__layout.has-aside {
		grid-template-columns: minmax(0, 1fr) 300px;
		gap: 40px;
	}

	.site-footer__grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.site-footer__about {
		grid-column: 1 / -1;
	}
}

@media (max-width: 900px) {
	.menu-toggle {
		display: inline-grid;
	}

	.site-nav {
		position: fixed;
		inset: var(--header-h) 0 0;
		z-index: 40;
		padding: 16px var(--gutter) 32px;
		overflow-y: auto;
		background: var(--bg);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-4px);
		transition: opacity var(--t-menu) var(--ease), transform var(--t-menu) var(--ease), visibility 0s linear var(--t-menu);
	}

	.admin-bar .site-nav {
		top: calc(var(--header-h) + 46px);
	}

	[data-menu-open] .site-nav {
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: opacity var(--t-menu) var(--ease), transform var(--t-menu) var(--ease), visibility 0s;
	}

	.site-nav .menu {
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
	}

	.site-nav .menu > li > a {
		display: flex;
		height: 44px;
		font-size: 16px;
		color: var(--text);
	}

	.menu__caret {
		display: none;
	}

	.site-nav .sub-menu {
		position: static;
		min-width: 0;
		margin: 0 0 8px 12px;
		padding: 0 0 0 12px;
		background: none;
		border: 0;
		border-left: 1px solid var(--line);
		border-radius: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.site-nav .sub-menu a {
		height: 40px;
		font-size: 15px;
	}

	.entry__layout.has-aside {
		grid-template-columns: minmax(0, 1fr);
	}

	.entry__aside-inner {
		position: static;
	}

	/* На узком экране паспорт сразу после заголовка, до обложки */
	.entry__layout.has-aside {
		gap: 0;
	}

	.has-aside .entry__main {
		display: contents;
	}

	.has-aside .entry__head {
		order: 1;
	}

	.has-aside .entry__aside {
		order: 2;
		margin-top: 24px;
	}

	.has-aside .entry__cover {
		order: 3;
	}

	.has-aside .prose {
		order: 4;
	}

	.lists {
		grid-template-columns: minmax(0, 1fr);
	}
}

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

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

[data-menu-open],
[data-menu-open] body {
	overflow: hidden;
}

@media (max-width: 640px) {
	:root {
		--gutter: 16px;
		--header-h: 56px;
	}

	.hero {
		padding-block: 40px 48px;
	}

	.hero__title {
		font-size: 32px;
		line-height: 1.12;
	}

	.entry__title,
	.page-title {
		font-size: 25px;
		line-height: 1.2;
		letter-spacing: -0.01em;
	}

	.hero__lead {
		font-size: 17px;
		line-height: 26px;
	}

	.hero__actions .btn {
		flex: 1 1 auto;
	}

	.hero__stats {
		gap: 24px;
		margin-top: 40px;
	}

	.hero__stats dd {
		font-size: 24px;
	}

	.grid,
	.grid--three {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}

	.card--wide {
		grid-column: auto;
	}

	.card--wide .card__title {
		font-size: 20px;
		line-height: 28px;
	}

	.games {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px 12px;
	}

	.section {
		padding-block: 32px;
	}

	.section__head {
		align-items: flex-start;
		flex-direction: column;
	}

	.chips {
		max-width: 100%;
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.chip {
		flex: none;
	}

	.post-nav {
		grid-template-columns: minmax(0, 1fr);
	}

	.post-nav__link--next {
		grid-column: auto;
	}

	.prose .alignleft,
	.prose .alignright {
		float: none;
		margin: 0 auto;
	}

	.comment-list .children {
		margin-left: 16px;
	}

	.site-footer__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}

	.brand__name {
		font-size: 16px;
	}
}

@media (min-width: 1081px) {
	.grid--three .card--wide {
		grid-row: auto;
	}
}
