/* Null's iOS — main.css
 *
 * Направление (unslop):
 *   продукт    — фан-портал, который ставит приватные серверы Null's на iPhone
 *   характер   — прямой, технический, немного игровой
 *   мир        — экран установки iOS ночью: тёмный «чернильный» ramp, тёплый янтарный акцент
 *   момент     — панель установки с цветными иконками игр, всё остальное спокойное
 *   подпись    — номер версии моноширинным «кейкапом» (.ver) и живой онлайн-индикатор
 */

:root {
	color-scheme: dark;

	--bg-deep: #07080d;
	--bg: #0b0d14;
	--card: #11141c;
	--raised: #1a1e28;
	--raised-2: #232835;
	--line: rgba(238, 240, 245, 0.08);
	--line-2: rgba(238, 240, 245, 0.14);

	--text: #eef0f5;
	--text-body: #c3c8d4;
	--text-2: #a3a9b8;
	--muted: #7f879a;

	--accent: #f5b83d;
	--accent-hover: #ffc65a;
	--on-accent: #17120a;
	--positive: #4cc38a;

	--r-sm: 6px;
	--r: 10px;
	--r-card: 16px;
	--r-panel: 20px;

	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--accent-ink: #f5b83d;
	--accent-soft: rgba(245, 184, 61, 0.14);
	--accent-soft-2: rgba(245, 184, 61, 0.24);
	--header-bg: rgba(11, 13, 20, 0.96);
	--header-bg-blur: rgba(11, 13, 20, 0.86);
	--sheet-top: #161a24;
	--shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.45);
	--highlight: rgba(255, 255, 255, 0.06);

	--header-h: 64px;
	--gutter: 20px;
}

/* Светлая тема: по системной настройке, если пользователь не выбрал тему вручную,
   или принудительно через data-theme="light" (кнопка в шапке). */
@media (prefers-color-scheme: light) {
	:root:not([data-theme="dark"]) {
		color-scheme: light;
		--bg-deep: #eef1f6;
		--bg: #f6f7fa;
		--card: #ffffff;
		--raised: #eef0f4;
		--raised-2: #e3e6ed;
		--line: rgba(17, 24, 39, 0.09);
		--line-2: rgba(17, 24, 39, 0.16);
		--text: #111827;
		--text-body: #2a3240;
		--text-2: #4b5565;
		--muted: #687184;
		--accent-ink: #9a5b00;
		--accent-soft: rgba(245, 184, 61, 0.22);
		--accent-soft-2: rgba(245, 184, 61, 0.36);
		--positive: #16a34a;
		--header-bg: rgba(246, 247, 250, 0.96);
		--header-bg-blur: rgba(246, 247, 250, 0.85);
		--sheet-top: #ffffff;
		--shadow-lg: 0 24px 48px rgba(17, 24, 39, 0.10);
		--highlight: rgba(255, 255, 255, 0.8);
	}
}
:root[data-theme="light"] {
	color-scheme: light;
	--bg-deep: #eef1f6;
	--bg: #f6f7fa;
	--card: #ffffff;
	--raised: #eef0f4;
	--raised-2: #e3e6ed;
	--line: rgba(17, 24, 39, 0.09);
	--line-2: rgba(17, 24, 39, 0.16);
	--text: #111827;
	--text-body: #2a3240;
	--text-2: #4b5565;
	--muted: #687184;
	--accent-ink: #9a5b00;
	--accent-soft: rgba(245, 184, 61, 0.22);
	--accent-soft-2: rgba(245, 184, 61, 0.36);
	--positive: #16a34a;
	--header-bg: rgba(246, 247, 250, 0.96);
	--header-bg-blur: rgba(246, 247, 250, 0.85);
	--sheet-top: #ffffff;
	--shadow-lg: 0 24px 48px rgba(17, 24, 39, 0.10);
	--highlight: rgba(255, 255, 255, 0.8);
}

/* ---------- base ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 400 16px/1.6 var(--font);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; }
svg.icon { flex: none; display: block; }

a { color: inherit; text-decoration: none; }
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.2; color: var(--text); text-wrap: balance; }
h2 { font-size: 28px; letter-spacing: -0.01em; }
h3 { font-size: 18px; }
b, strong { font-weight: 600; color: var(--text); }
ul, ol { margin: 0; padding: 0; }
dl, dd { margin: 0; }
button { font: inherit; color: inherit; }

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

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 800px; }
.mono { font-family: var(--mono); font-size: 0.875em; }
.muted { color: var(--muted); }

.skip {
	position: absolute; inset-inline-start: 16px; top: -48px; z-index: 100;
	padding: 8px 12px; border-radius: var(--r); background: var(--text); color: var(--bg);
}
.skip:focus { top: 8px; }

/* ---------- signature: version keycap + live online ---------- */

.ver {
	display: inline-block;
	padding: 1px 6px;
	border: 1px solid var(--line-2);
	border-radius: var(--r-sm);
	background: var(--raised);
	font: 500 13px/20px var(--mono);
	color: var(--text);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.online { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; }
.online__dot {
	width: 8px; height: 8px; border-radius: 50%;
	background: var(--positive);
	box-shadow: 0 0 0 3px rgba(76, 195, 138, 0.16);
}
.online__num { font: 500 14px/1 var(--mono); color: var(--text); font-variant-numeric: tabular-nums; }

.meta-item { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 14px; }
.meta-item .icon { color: var(--muted); }

/* ---------- buttons ---------- */

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

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 44px; padding: 0 18px;
	border: 1px solid transparent; border-radius: var(--r);
	font: 500 15px/1 var(--font); white-space: nowrap; cursor: pointer;
	transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), transform 120ms var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn--lg { height: 48px; padding: 0 20px; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 14px; }

.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--secondary { background: var(--raised); border-color: var(--line); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.btn--secondary:hover { background: var(--raised-2); border-color: var(--line-2); }
.btn__meta { font: 400 13px/1 var(--mono); opacity: 0.7; }

.link-more {
	display: inline-flex; align-items: center; gap: 6px;
	color: var(--text); font-size: 15px; font-weight: 500;
	transition: color 160ms var(--ease);
}
.link-more .icon { transition: transform 160ms var(--ease); }
.link-more:hover { color: var(--accent-ink); }
.link-more:hover .icon { transform: translateX(2px); }

.ios-hint {
	display: flex; gap: 8px; align-items: flex-start;
	margin: 12px 0 0; padding: 10px 12px;
	border-radius: var(--r); background: var(--raised);
	color: var(--text-2); font-size: 14px; line-height: 1.5;
}
.ios-hint[hidden] { display: none; }
.ios-hint .icon { margin-top: 2px; color: var(--accent-ink); }
.ios-hint a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- header ---------- */

.header {
	position: sticky; top: 0; z-index: 50;
	background: var(--header-bg);
	border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(1px)) {
	.header { background: var(--header-bg-blur); backdrop-filter: saturate(140%) blur(12px); }
}
.header__in { display: flex; align-items: center; gap: 16px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand__mark { width: 32px; height: 32px; border-radius: 8px; }
.brand__name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }

.nav { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.nav__list { display: flex; gap: 2px; list-style: none; }
.nav__list a {
	display: block; padding: 8px 12px; border-radius: 8px;
	color: var(--text-2); font-size: 15px; font-weight: 500;
	transition: color 160ms var(--ease), background-color 160ms var(--ease);
}
.nav__list a:hover { color: var(--text); background: var(--raised); }
.nav__list a[aria-current="page"],
.nav__list .current-menu-item > a { color: var(--text); }

.lang { display: flex; gap: 2px; list-style: none; padding-inline-start: 8px; margin-inline-start: 4px; border-inline-start: 1px solid var(--line); }
.lang a { display: block; padding: 6px 8px; border-radius: var(--r-sm); font: 500 12px/1 var(--mono); color: var(--muted); }
.lang a:hover, .lang a[aria-current] { color: var(--text); background: var(--raised); }

.header__cta { flex: none; }
.menu-btn {
	display: none; width: 40px; height: 40px; flex: none;
	align-items: center; justify-content: center;
	border: 1px solid var(--line); border-radius: var(--r); background: var(--raised); cursor: pointer;
}
.menu-btn__close { display: none !important; }
.menu-btn[aria-expanded="true"] .menu-btn__open { display: none !important; }
.menu-btn[aria-expanded="true"] .menu-btn__close { display: block !important; }

@media (max-width: 959px) {
	.menu-btn { display: inline-flex; }
	.header__cta { margin-inline-start: auto; }
	.nav {
		position: fixed; inset: var(--header-h) 0 auto 0;
		flex-direction: column; align-items: stretch; gap: 8px;
		padding: 12px var(--gutter) 20px;
		background: var(--bg); border-bottom: 1px solid var(--line);
		opacity: 0; visibility: hidden; transform: translateY(-8px);
		transition: opacity 200ms var(--ease), transform 200ms var(--ease), visibility 0s linear 200ms;
	}
	.nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
	.nav__list { flex-direction: column; gap: 2px; }
	.nav__list a { padding: 12px; font-size: 16px; }
	.lang { border-inline-start: 0; margin: 0; padding: 8px 0 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
}

/* ---------- hero (главная) ---------- */

.hero { padding: 80px 0 96px; }
.hero__grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) {
	.hero { padding: 96px 0 112px; }
	.hero__grid { grid-template-columns: minmax(0, 1fr) 440px; gap: 64px; }
}
.hero__title { font-size: clamp(36px, 6vw, 64px); line-height: 1.04; letter-spacing: -0.03em; max-width: 14ch; }
.hero__lead { margin: 24px 0 32px; max-width: 36rem; color: var(--text-2); font-size: 19px; line-height: 1.55; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; }
.hero__alt { margin-top: 12px; color: var(--muted); font-size: 14px; }
.hero__alt a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: no-preference) {
	.hero__text, .sheet { animation: rise 480ms var(--ease) both; }
	.sheet { animation-delay: 60ms; }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Панель установки — главный «момент» страницы */
.sheet {
	position: relative;
	padding: 12px 20px 20px;
	border: 1px solid var(--line-2);
	border-radius: 28px;
	background: linear-gradient(180deg, var(--sheet-top) 0%, var(--card) 100%);
	box-shadow: var(--shadow-lg), inset 0 1px 0 var(--highlight);
}
.sheet__bar { display: flex; justify-content: center; padding: 0 0 12px; }
.sheet__bar span { width: 36px; height: 4px; border-radius: 2px; background: var(--line-2); }
.sheet__title { margin: 0 0 4px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.sheet__list { list-style: none; }
.sheet__row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 0; }
.sheet__row + .sheet__row { border-top: 1px solid var(--line); }
.sheet__info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sheet__name { font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet__name:hover { color: var(--accent-ink); }
.sheet__sub { color: var(--muted); font-size: 13px; }
.sheet__sub .ver { font-size: 12px; line-height: 18px; }
.sheet__get {
	padding: 7px 14px; border-radius: 999px;
	background: var(--accent-soft); color: var(--accent-ink);
	font-size: 14px; font-weight: 600;
	transition: background-color 160ms var(--ease);
}
.sheet__get:hover { background: var(--accent-soft-2); }
.sheet__foot { margin: 8px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }

.app-icon { display: block; border-radius: 22.5%; background: var(--raised); }

/* ---------- sections ---------- */

.section { padding-block: 80px; }
.section--tight { padding-block: 32px; }
.section--alt { background: var(--bg-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (min-width: 960px) { .section { padding-block: 96px; } }

.section__head { max-width: 640px; margin-bottom: 32px; }
.section__head h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.02em; }
.section__head p { margin-top: 12px; color: var(--text-2); font-size: 17px; }
.section__head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.split { display: grid; gap: 40px; }
.split h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.02em; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; } }
.muted-lead { margin: 16px 0 24px; color: var(--text-2); font-size: 17px; }

.mini-steps { list-style: none; counter-reset: s; margin-bottom: 24px; }
.mini-steps li {
	counter-increment: s; position: relative;
	padding-block: 12px; padding-inline: 44px 0; color: var(--text-2); border-top: 1px solid var(--line);
}
.mini-steps li:last-child { border-bottom: 1px solid var(--line); }
.mini-steps li::before {
	content: counter(s); position: absolute; inset-inline-start: 0; top: 12px;
	width: 28px; height: 28px; display: grid; place-items: center;
	border-radius: 8px; background: var(--raised); border: 1px solid var(--line);
	font: 500 13px/1 var(--mono); color: var(--accent-ink);
}

/* ---------- server cards ---------- */

.servers { display: grid; gap: 16px; }
@media (min-width: 720px) { .servers--2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .servers { grid-template-columns: repeat(3, 1fr); } .servers--2 { grid-template-columns: 1fr 1fr; } }

.server {
	display: flex; flex-direction: column; gap: 20px;
	padding: 24px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card);
}
.server__head { display: flex; align-items: center; gap: 16px; }
.server__name { font-size: 20px; letter-spacing: -0.01em; }
.server__name a:hover { color: var(--accent-ink); }
.server__game { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.server__meta { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 28px; }
.server__meta dt { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.server__meta dd { font: 500 14px/20px var(--mono); font-variant-numeric: tabular-nums; }
.server__meta .ver { padding: 0 6px; }
.server__news { color: var(--text-2); font-size: 15px; margin: 0; }
.server__online { margin: 0; }
.server .actions { margin-top: auto; }
.server .actions .btn { flex: 1 1 auto; }

/* ---------- methods ---------- */

.methods-list { list-style: none; display: grid; gap: 8px; }
.methods-list a {
	display: flex; align-items: center; gap: 12px;
	padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card);
	transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.methods-list a:hover { background: var(--raised); border-color: var(--line-2); }
.methods-list .icon { color: var(--text-2); }
.methods-list__name { font-weight: 500; }
.methods-list__meta { margin-inline-start: auto; color: var(--muted); font-size: 13px; text-align: end; }
.methods-list__chev { color: var(--muted); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); -webkit-overflow-scrolling: touch; }
.methods { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 14px; }
.methods th, .methods td { padding: 12px 16px; text-align: start; vertical-align: top; }
.methods thead th { color: var(--muted); font-weight: 500; font-size: 13px; border-bottom: 1px solid var(--line); background: var(--bg-deep); }
.methods tbody tr + tr { border-top: 1px solid var(--line); }
.methods tbody th { font-weight: 500; white-space: nowrap; }
.methods tbody th a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.methods tbody th a:hover { text-decoration-color: var(--accent-ink); }
.methods td { color: var(--text-2); }

/* ---------- page head ---------- */

.page-head { padding: 24px 0 48px; border-bottom: 1px solid var(--line); }
.page-head__grid { display: grid; gap: 32px; align-items: start; }
@media (min-width: 1024px) { .page-head__grid { grid-template-columns: minmax(0, 1fr) 400px; gap: 56px; } }
.page-title { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.08; letter-spacing: -0.025em; max-width: 22ch; margin-bottom: 20px; }
.lead { max-width: 40rem; color: var(--text-2); font-size: 18px; line-height: 1.6; }
.lead--sub { font-size: 16px; color: var(--text-2); }
.page-head__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; }

.crumbs { margin-bottom: 28px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; font-size: 13px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-inline-end: 8px; color: var(--line-2); }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--text-2); }

/* Карточка скачивания на странице сервера */
.dl-card {
	padding: 24px; border: 1px solid var(--line-2); border-radius: var(--r-panel);
	background: var(--card); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
@media (min-width: 1024px) { .dl-card { position: sticky; top: calc(var(--header-h) + 24px); } }
.dl-card__head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.dl-card__name { margin: 0; font-size: 20px; font-weight: 600; }
.dl-card__sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.dl-card .actions { flex-direction: column; }
.dl-card .actions .btn { width: 100%; }
.dl-card .spec { margin-top: 20px; }

.spec__title { margin: 0 0 8px; font-weight: 500; }
.spec { font-size: 14px; }
.spec__row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.spec dt { color: var(--muted); }
.spec dd { color: var(--text); text-align: end; min-width: 0; overflow-wrap: anywhere; }
.spec .mono { font-size: 13px; }

/* ---------- article layout ---------- */

.doc { display: grid; gap: 32px; padding-top: 48px; padding-bottom: 96px; }
@media (min-width: 1024px) { .doc { grid-template-columns: 220px minmax(0, 1fr); gap: 64px; } }
.doc__aside { min-width: 0; }
@media (min-width: 1024px) { .toc { position: sticky; top: calc(var(--header-h) + 24px); } }

.toc { padding: 16px 0; }
@media (max-width: 1023px) { .toc { padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); } }
.toc__title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 500; }
.toc ol { list-style: none; border-inline-start: 1px solid var(--line); }
.toc a {
	display: block; margin-inline-start: -1px; padding-block: 6px; padding-inline: 14px 0;
	border-inline-start: 1px solid transparent;
	color: var(--text-2); font-size: 14px; line-height: 1.4;
	transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.toc a:hover, .toc a.is-active { color: var(--text); border-inline-start-color: var(--accent-ink); }

/* ---------- prose ---------- */

.prose { color: var(--text-body); font-size: 17px; line-height: 1.7; min-width: 0; }
.prose > section + section { margin-top: 56px; }
.prose h2 { font-size: clamp(24px, 3vw, 30px); letter-spacing: -0.015em; margin: 0 0 16px; }
.prose > h2:not(:first-child), .prose section > h2:not(:first-child) { margin-top: 48px; }
.prose h3 { margin: 32px 0 12px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul:not([class]), .prose ol:not([class]) { padding-inline-start: 22px; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--muted); }
.prose a:not(.btn):not(.link-more) {
	color: var(--text);
	text-decoration: underline; text-decoration-color: rgba(245, 184, 61, 0.5);
	text-decoration-thickness: 1px; text-underline-offset: 3px;
	transition: text-decoration-color 160ms var(--ease);
}
.prose a:not(.btn):not(.link-more):hover { text-decoration-color: var(--accent-ink); }
.prose img { border-radius: 12px; }
.prose blockquote { margin: 24px 0; padding-block: 4px; padding-inline: 20px 0; border-inline-start: 2px solid var(--accent); color: var(--text-2); }
.prose code { padding: 2px 6px; border-radius: var(--r-sm); background: var(--raised); font: 0.85em var(--mono); }
.prose table:not(.methods) { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose table:not(.methods) td, .prose table:not(.methods) th { padding: 10px 12px; border: 1px solid var(--line); }
.prose .table-wrap { margin: 0 0 16px; }
.prose figure { margin: 24px 0; }
.prose figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }

/* ---------- facts ---------- */

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 0 0 20px; }
.facts > div { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.facts dt { color: var(--muted); font-size: 13px; line-height: 1.4; margin-bottom: 4px; }
.facts dd { color: var(--text); font-size: 15px; font-weight: 500; line-height: 1.45; }
.facts--row { margin: 28px 0 0; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); max-width: 960px; }

/* ---------- steps ---------- */

.steps { list-style: none; display: grid; gap: 0; margin: 24px 0; }
.steps__item { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 16px; position: relative; padding-bottom: 28px; }
.steps__item:not(:last-child)::before {
	content: ""; position: absolute; inset-inline-start: 15.5px; top: 40px; bottom: 6px;
	width: 1px; background: var(--line-2);
}
.steps__num {
	width: 32px; height: 32px; display: grid; place-items: center;
	border: 1px solid var(--line-2); border-radius: 8px; background: var(--raised);
	font: 500 14px/1 var(--mono); color: var(--accent-ink);
}
.prose .steps__title { margin: 4px 0 6px; font-size: 18px; }
.steps__item p { margin: 0; }
.prose .steps li + li { margin-top: 0; }

.checklist { list-style: none; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.prose .checklist li + li { margin-top: 0; }
.checklist .icon { margin-top: 5px; color: var(--positive); }

.problems { display: grid; gap: 8px; }
.problem { padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.problem__q { display: flex; gap: 10px; align-items: flex-start; margin: 0; color: var(--text); font-weight: 500; }
.problem__q .icon { margin-top: 4px; color: var(--muted); }
.problem__a { margin: 6px 0 0 28px !important; color: var(--text-2); font-size: 16px; }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--line); margin-top: 8px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 18px 0; cursor: pointer; list-style: none;
	color: var(--text); font-size: 17px; font-weight: 500; line-height: 1.4;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--accent-ink); }
.faq__chev { color: var(--muted); transition: transform 180ms var(--ease); }
.faq__item[open] .faq__chev { transform: rotate(180deg); }
.faq__a { padding: 0 32px 20px 0; color: var(--text-2); font-size: 16px; line-height: 1.65; }
.faq__a a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(245, 184, 61, 0.5); text-underline-offset: 3px; }
.section .faq { margin-top: 24px; }

/* ---------- IPA page ---------- */

.ipa-list { display: grid; gap: 16px; padding: 48px 0 0; }
@media (min-width: 1024px) { .ipa-list { grid-template-columns: repeat(3, 1fr); } }
.ipa {
	display: flex; flex-direction: column; gap: 20px;
	padding: 24px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card);
}
.ipa__head { display: flex; align-items: center; gap: 16px; }
.ipa__name { font-size: 20px; }
.ipa__sub { margin: 6px 0 0; }
.ipa .actions { margin-top: auto; }
.ipa .actions .btn { flex: 1 1 auto; }
.ipa__links { margin: 0; color: var(--muted); font-size: 14px; }
.ipa__links a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.ipa__links a:hover { color: var(--text); }

/* ---------- guides hub ---------- */

.guides { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); padding-bottom: 32px; }
.guide-card {
	display: flex; flex-direction: column; gap: 12px;
	padding: 24px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card);
	color: var(--text-2); font-size: 15px;
	transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.guide-card:hover { background: var(--raised); border-color: var(--line-2); }
.guide-card__title { font-size: 20px; }
.guide-card .link-more { margin-top: auto; }

.mini-servers { list-style: none; display: grid; gap: 8px; margin: 16px 0 24px; }
.mini-servers li {
	display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
	padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card);
}
.prose .mini-servers li + li { margin-top: 0; }
.mini-servers a { font-weight: 500; }
.mini-servers .muted { margin-inline-start: auto; font-size: 14px; }

/* ---------- posts ---------- */

.posts { display: grid; gap: 16px; }
@media (min-width: 720px) { .posts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .posts { grid-template-columns: repeat(3, 1fr); } }
.post-card__link {
	display: flex; flex-direction: column; gap: 10px; height: 100%;
	padding: 20px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card);
	transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.post-card__link:hover { background: var(--raised); border-color: var(--line-2); }
.post-card__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }
.post-card__date { color: var(--muted); font: 400 13px/1.4 var(--mono); }
.post-card__title { font-size: 18px; line-height: 1.35; }
.post-card__excerpt { margin: 0; color: var(--text-2); font-size: 15px; }

.post-head { margin-bottom: 32px; }
.post-cover { margin: 0 0 32px; }
.post-cover img { width: 100%; border-radius: var(--r-card); }

.cta-box { margin: 56px 0 32px; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--bg-deep); }
.cta-box__title { margin: 0; font-size: 18px; font-weight: 500; }
.cta-box .mini-servers { margin-bottom: 0; }

.nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px;
	border: 1px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--text-2); font-size: 14px;
}
.page-numbers.current { background: var(--raised-2); color: var(--text); border-color: var(--line-2); }
a.page-numbers:hover { color: var(--text); background: var(--raised); }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-navigation a { display: block; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-weight: 500; }
.post-navigation .nav-next { text-align: end; }
.post-navigation { margin: 32px 0 0; }
.post-navigation .nav-links { margin-top: 0; }
.post-navigation .nav-next:only-child { grid-column: 2; }
@media (max-width: 599px) { .post-navigation .nav-links { grid-template-columns: 1fr; } .post-navigation .nav-next:only-child { grid-column: auto; } }

/* comments */
.comments-area, #comments, .comment-respond { margin-top: 56px; }
.comments-area .comment-respond { margin-top: 32px; }
.comment-reply-title, .comments-title { margin: 0 0 8px; font-size: 22px; font-weight: 500; }
.comment-notes, .logged-in-as { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.logged-in-as a { color: var(--text-2); }
.comment-form p { margin: 0 0 16px; }
.comment-form label { display: block; color: var(--text-2); font-size: 15px; }
.comment-form .form-submit { margin: 0; }
.commentlist, .comment-list { list-style: none; display: grid; gap: 16px; }
.commentlist .comment, .comment-list .comment { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }

/* ---------- footer ---------- */

.footer { padding: 64px 0 32px; background: var(--bg-deep); border-top: 1px solid var(--line); color: var(--text-2); font-size: 14px; }
.footer__grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
@media (min-width: 960px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; } }
.footer__about { grid-column: 1 / -1; }
@media (min-width: 960px) { .footer__about { grid-column: auto; } }
.footer__about p { margin: 16px 0; max-width: 30rem; }
.footer__tg { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.footer__tg:hover { color: var(--accent-ink); }
.footer__title { margin: 0 0 12px; color: var(--text); font-weight: 500; }
.footer__list { list-style: none; display: grid; gap: 8px; }
.footer__list a:hover { color: var(--text); }
.footer__legal { margin: 48px 0 0; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; max-width: 72rem; }

/* ---------- WP core bits ---------- */

.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text { color: var(--muted); font-size: 14px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* ---------- theme toggle ---------- */

.theme-btn {
	display: inline-flex; width: 36px; height: 36px; flex: none;
	align-items: center; justify-content: center;
	border: 1px solid var(--line); border-radius: var(--r); background: var(--raised);
	color: var(--text-2); cursor: pointer;
	transition: color 160ms var(--ease), background-color 160ms var(--ease);
}
.theme-btn:hover { color: var(--text); background: var(--raised-2); }
.theme-btn .theme-btn__moon { display: none; }
:root[data-theme="light"] .theme-btn__sun { display: none; }
:root[data-theme="light"] .theme-btn__moon { display: block; }
@media (prefers-color-scheme: light) {
	:root:not([data-theme="dark"]) .theme-btn__sun { display: none; }
	:root:not([data-theme="dark"]) .theme-btn__moon { display: block; }
}
@media (max-width: 959px) { .header__cta { margin-inline-start: auto; } .theme-btn { order: 2; } .menu-btn { order: 3; } }

/* ---------- forms (Contact Form 7, search, comments) ---------- */

.prose form p { margin: 0 0 16px; }
.prose label { display: block; color: var(--text-2); font-size: 15px; }
input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], textarea, select {
	width: 100%; margin-top: 6px; padding: 12px 14px;
	border: 1px solid var(--line-2); border-radius: var(--r);
	background: var(--card); color: var(--text);
	font: 400 16px/1.5 var(--font);
	transition: border-color 160ms var(--ease);
}
textarea { min-height: 160px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
.wpcf7-submit, input[type="submit"] {
	height: 44px; padding: 0 20px; border: 0; border-radius: var(--r);
	background: var(--accent); color: var(--on-accent);
	font: 500 15px/1 var(--font); cursor: pointer;
	transition: background-color 160ms var(--ease);
}
.wpcf7-submit:hover, input[type="submit"]:hover { background: var(--accent-hover); }
.wpcf7-not-valid-tip { margin-top: 6px; color: #e5484d; font-size: 14px; }
.wpcf7 form .wpcf7-response-output { margin: 16px 0 0; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r); font-size: 15px; }
.wpcf7-spinner { margin: 0 0 0 12px; }

/* ---------- small screens ---------- */

@media (max-width: 479px) {
	:root { --gutter: 16px; }
	.hero { padding: 48px 0 64px; }
	.hero__lead { font-size: 17px; }
	.hero .actions .btn { flex: 1 1 100%; }
	.sheet { padding: 12px 16px 16px; border-radius: 24px; }
	.sheet__row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; }
	.sheet__row .app-icon { width: 44px; height: 44px; }
	.server, .ipa, .dl-card { padding: 20px; }
	.server__meta { gap: 0 20px; }
	.brand__name { font-size: 16px; }
	.header__cta { padding: 0 12px; }
	.prose { font-size: 16px; }
	.methods-list__meta { display: none; }
}
@media (max-width: 359px) {
	.brand__name { display: none; }
}

/* ---------- RTL (Arabic) ---------- */
[dir="rtl"] .icon-arrow, [dir="rtl"] .icon-chevron { transform: scaleX(-1); }
[dir="rtl"] .link-more:hover .icon-arrow { transform: scaleX(-1) translateX(2px); }
[dir="rtl"] .mono, [dir="rtl"] .ver, [dir="rtl"] [data-online] { direction: ltr; unicode-bidi: isolate; }
