/*
 * VELA wiki. Same tokens as the site (site/assets/style.css, design/VELA-DESIGN-SYSTEM.md):
 * obsidian / ivory / red at 70 / 25 / 5, Unbounded for headings, Manrope for text, ink-and-ash surfaces.
 * Mobile-first. Components inspired by 21st.dev (spotlight card, border beam, command palette, blur-in text,
 * scrollspy toc) are written here in plain CSS; behaviour lives in wiki.js. Every animation stops under
 * prefers-reduced-motion.
 */
:root {
	--obsidian: #141414;
	--ivory: #F2EDE3;
	--red: #D93632;
	--stone: #A49B8E;
	--ash: #332B29;
	--rose: #E7B8A4;
	--red-deep: #C4302C;
	--red-text: #EA5A55;

	--surface: #1B1817;
	--surface-2: #221D1B;
	--surface-3: #2A2321;
	--line: rgba(242, 237, 227, 0.12);
	--line-strong: rgba(242, 237, 227, 0.22);
	--glow: rgba(217, 54, 50, 0.45);

	--head: 'Unbounded', 'Segoe UI', system-ui, sans-serif;
	--text: 'Manrope', 'Segoe UI', system-ui, sans-serif;
	--mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;

	--gutter: 16px;
	--max: 1320px;
	--read: 760px;
	--radius: 8px;
	--header-h: 104px;
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);

	--grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	--ink-stroke: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 48' preserveAspectRatio='none'%3E%3Cpath fill='%23F2EDE3' fill-opacity='.2' d='M0 27c90-6 160-9 260-6s170 9 290 4 190-12 320-10 210 8 330 3v6c-120 7-200 9-330 5s-200-6-320 1-170 9-290 6-170-4-260-3S60 34 0 33z'/%3E%3Cpath fill='%23D93632' d='M770 22c40-3 90-4 150-2-50 4-100 6-150 5z'/%3E%3C/svg%3E");
	--enso: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 13c22 0 38 16 38 37S71 88 50 88 13 71 13 51c0-14 7-26 19-33' fill='none' stroke='%23F2EDE3' stroke-opacity='.55' stroke-width='5' stroke-linecap='round'/%3E%3Cpath d='M30 20c4-2 8-4 12-5' fill='none' stroke='%23F2EDE3' stroke-opacity='.3' stroke-width='3' stroke-linecap='round'/%3E%3Ccircle cx='50' cy='51' r='6' fill='%23D93632'/%3E%3C/svg%3E");

	color-scheme: dark;
}

@property --beam { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

*, *::before, *::after { box-sizing: border-box; }

html {
	background: var(--obsidian);
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--obsidian);
	color: var(--ivory);
	font-family: var(--text);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
body::before {
	content: '';
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 100;
	opacity: 0.045;
	background-image: var(--grain);
}
main { flex: 1 0 auto; }
::selection { background: rgba(217, 54, 50, 0.6); color: var(--ivory); }
img, svg, video { max-width: 100%; }
a { color: var(--ivory); text-decoration: none; border-bottom: 1px solid var(--line-strong); transition: color 0.2s ease, border-color 0.2s ease; }
a:hover { color: var(--rose); border-color: var(--rose); }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; margin: 0; }
.muted { color: var(--stone); }
.red { color: var(--red-text); }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -100px; z-index: 300; background: var(--ivory); color: var(--obsidian); padding: 8px 14px; border: 0; border-radius: var(--radius); }
.skip:focus { top: 12px; color: var(--obsidian); }

/* ---------- Header ---------- */
.w-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(20, 20, 20, 0.96);
	border-bottom: 1px solid var(--line);
}
.w-header::after {
	content: '';
	position: absolute;
	left: 0; right: 0; bottom: -1px;
	height: 2px;
	background: linear-gradient(90deg, rgba(217, 54, 50, 0.2), var(--red) 70%, var(--rose));
	transform: scaleX(var(--progress, 0));
	transform-origin: left center;
}
.w-bar { display: flex; align-items: center; gap: 12px; padding-top: 12px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: baseline; border: 0; font-family: var(--head); font-weight: 900; font-size: 20px; letter-spacing: 0.08em; line-height: 1; white-space: nowrap; }
.brand:hover { color: var(--ivory); }
.brand .dot { color: var(--red); }
.brand small { margin-left: 10px; font-family: var(--text); font-weight: 700; font-size: 11px; letter-spacing: 0.22em; color: var(--stone); text-transform: uppercase; }
.search-btn {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 40px;
	padding: 0 12px;
	color: var(--stone);
	background: var(--surface);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	font: 500 14px/1 var(--text);
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}
.search-btn:hover { color: var(--ivory); border-color: var(--stone); }
.search-btn svg { width: 18px; height: 18px; flex: none; }
.search-btn .lbl { display: none; }
kbd {
	display: inline-block;
	min-width: 20px;
	padding: 2px 6px;
	font: 700 11px/1.3 var(--mono);
	color: var(--ivory);
	background: var(--surface-2);
	border: 1px solid var(--line-strong);
	border-bottom-width: 2px;
	border-radius: 5px;
	text-align: center;
}
.search-btn kbd { display: none; }
.to-site { display: inline; border: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--stone); white-space: nowrap; }
.to-site:hover { color: var(--ivory); }
.lang-sw { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; color: var(--stone); white-space: nowrap; }
.lang-sw:hover { color: var(--ivory); border-color: var(--stone); }
.lang-sw svg { width: 14px; height: 14px; flex: none; }
.stub-box { max-width: var(--read); }
.stub-box .cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.w-nav {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	scrollbar-width: none;
	padding: 2px var(--gutter) 10px;
	margin: 0 calc(var(--gutter) * -1);
	-webkit-mask: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 28px), transparent);
	mask: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 28px), transparent);
}
.w-nav::-webkit-scrollbar { display: none; }
.w-nav a {
	flex: none;
	border: 1px solid transparent;
	border-radius: 999px;
	padding: 5px 12px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--stone);
	white-space: nowrap;
}
.w-nav a:hover { color: var(--ivory); border-color: var(--line-strong); }
.w-nav a[aria-current] { color: var(--ivory); border-color: rgba(217, 54, 50, 0.6); background: rgba(217, 54, 50, 0.1); }

@media (min-width: 640px) {
	.search-btn { min-width: 220px; }
	.search-btn .lbl { display: inline; }
	.search-btn kbd { display: inline-block; margin-left: auto; }
}
@media (min-width: 768px) {
	:root { --gutter: 28px; }
	.brand { font-size: 23px; }
	.to-site { display: inline; }
}
/* The sections move into the bar only where they fit (11 links, RU or EN); the search button is an icon there. */
@media (min-width: 1320px) {
	:root { --header-h: 64px; }
	.w-bar { padding-bottom: 12px; }
	.w-bar .w-nav { order: 2; flex: 1 1 auto; min-width: 0; margin: 0 0 0 10px; padding: 0; -webkit-mask: none; mask: none; overflow-x: auto; }
	.w-bar .w-nav a { padding: 5px 9px; }
	.w-bar .search-btn { order: 3; min-width: 0; margin-left: 0; padding: 0 11px; }
	.w-bar .search-btn .lbl, .w-bar .search-btn kbd { display: none; }
	.w-bar .lang-sw { order: 4; }
	.w-bar .to-site { order: 5; }
	.w-nav-row { display: none; }
}
.w-bar .w-nav { display: none; }
@media (min-width: 1320px) { .w-bar .w-nav { display: flex; } }

/* ---------- Buttons ---------- */
.btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 22px;
	border-radius: var(--radius);
	font: 700 14px/1 var(--head);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border: 1px solid var(--line-strong);
	color: var(--ivory);
	background: rgba(20, 20, 20, 0.4);
	cursor: pointer;
	transition: border-color 0.25s ease, transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}
.btn:hover { color: var(--ivory); border-color: rgba(242, 237, 227, 0.6); transform: translateY(-1px); }
.btn-primary { border-color: transparent; background: linear-gradient(180deg, #D23A35, var(--red-deep) 55%, #A82723); box-shadow: 0 10px 30px -12px rgba(217, 54, 50, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.btn-primary:hover { border-color: transparent; box-shadow: 0 14px 40px -10px rgba(217, 54, 50, 0.9), 0 0 0 4px rgba(217, 54, 50, 0.14); }

/* ---------- Medallion art (emblems from site/assets/gen/cards) ---------- */
.art {
	position: relative;
	flex: none;
	display: block;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	overflow: hidden;
	background: radial-gradient(circle at 50% 40%, #2a2321, #141414 70%);
	box-shadow: 0 0 0 1px rgba(242, 237, 227, 0.22), 0 0 0 4px var(--obsidian), 0 0 0 5px rgba(242, 237, 227, 0.08), 0 10px 26px -10px rgba(0, 0, 0, 0.95);
	transition: box-shadow 0.4s ease;
}
.art::before { content: ''; position: absolute; inset: 16%; background: var(--enso) center / contain no-repeat; }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.86) contrast(1.08) saturate(0.92); transform: scale(1.06); transition: transform 0.8s var(--ease-out), filter 0.5s ease; }
.art::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, transparent 46%, rgba(20, 20, 20, 0.35) 64%, rgba(20, 20, 20, 0.9) 100%); box-shadow: inset 0 0 0 1px rgba(242, 237, 227, 0.1), inset 0 0 18px rgba(0, 0, 0, 0.6); }
:hover > .art img, :hover > * > .art img { transform: scale(1.16); filter: brightness(1) contrast(1.05) saturate(1); }
:hover > .art, :hover > * > .art { box-shadow: 0 0 0 1px rgba(231, 184, 164, 0.55), 0 0 0 4px var(--obsidian), 0 0 0 5px rgba(217, 54, 50, 0.45), 0 0 30px -4px var(--glow); }
.art-sm { width: 36px; height: 36px; box-shadow: 0 0 0 1px rgba(242, 237, 227, 0.2), 0 0 0 3px var(--obsidian); }
.art-lg { width: 88px; height: 88px; }
@media (min-width: 1024px) { .art-lg { width: 104px; height: 104px; } }

/* Game icons (32x32 client icons, scaled crisp) with an ink fallback glyph. */
.gi {
	position: relative;
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 6px;
	background: linear-gradient(160deg, var(--surface-3), #161312);
	box-shadow: inset 0 0 0 1px var(--line-strong);
	overflow: hidden;
	font: 700 14px/1 var(--head);
	color: var(--stone);
}
.gi img { width: 100%; height: 100%; image-rendering: auto; }
.gi-lg { width: 64px; height: 64px; border-radius: 10px; font-size: 22px; }

/* ---------- Spotlight card (idea: 21st.dev "card spotlight") ---------- */
.spot {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: linear-gradient(180deg, var(--surface-2), var(--surface));
	border: 1px solid var(--line);
	border-radius: calc(var(--radius) + 2px);
	transition: border-color 0.3s ease, transform 0.4s var(--ease-out), box-shadow 0.4s ease;
}
.spot::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -20%), rgba(217, 54, 50, 0.13), transparent 60%);
	opacity: 0;
	transition: opacity 0.4s ease;
}
.spot:hover { border-color: var(--line-strong); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.95); }
.spot:hover::before { opacity: 1; }
a.spot { display: block; color: var(--ivory); }
a.spot:hover { color: var(--ivory); transform: translateY(-2px); }

/* ---------- Home hero ---------- */
.home-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: 48px 0 40px;
	border-bottom: 1px solid var(--line);
	background: radial-gradient(circle at 80% 20%, rgba(217, 54, 50, 0.22), transparent 40%), linear-gradient(160deg, #221c1a, var(--obsidian) 65%);
}
.home-hero .bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	background: url("bg.jpg") 70% 40% / cover no-repeat;
	opacity: 0.55;
	animation: drift 40s ease-in-out infinite alternate;
}
.home-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, rgba(20, 20, 20, 0.96) 0%, rgba(20, 20, 20, 0.82) 45%, rgba(20, 20, 20, 0.35) 100%), linear-gradient(0deg, var(--obsidian), transparent 40%);
}
/* Ink dot grid fading out from the top-left (idea: 21st.dev "dot pattern"). */
.home-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: radial-gradient(rgba(242, 237, 227, 0.12) 1px, transparent 1.3px);
	background-size: 22px 22px;
	-webkit-mask: radial-gradient(ellipse at 15% 30%, #000, transparent 60%);
	mask: radial-gradient(ellipse at 15% 30%, #000, transparent 60%);
}
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.08) translate3d(-1%, -0.6%, 0); } }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--red-text); margin-bottom: 14px; }
.home-hero h1 { font-weight: 900; font-size: clamp(26px, 7.6vw, 76px); line-height: 0.98; letter-spacing: -0.02em; margin-bottom: 16px; text-transform: uppercase; }
.home-hero h1 .w { display: inline-block; }
.home-hero h1 .accent { color: var(--red); }
.home-hero .lead { max-width: 560px; color: var(--stone); font-size: 17px; margin-bottom: 26px; }
.blur-in .w { opacity: 0; filter: blur(10px); transform: translateY(12px); animation: blur-in 0.9s var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
@keyframes blur-in { to { opacity: 1; filter: blur(0); transform: none; } }

/* Big search box with a border beam (idea: Magic UI "Border Beam" on 21st.dev). */
.hero-search { position: relative; max-width: 680px; border-radius: 12px; }
.hero-search::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 2;
	padding: 1px;
	border-radius: inherit;
	background: conic-gradient(from var(--beam), transparent 0 62%, rgba(231, 184, 164, 0.18) 74%, var(--rose) 86%, #FFF6EA 90%, transparent 94%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	animation: beam 6s linear infinite;
	pointer-events: none;
}
@keyframes beam { to { --beam: 360deg; } }
.hero-search form { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; background: rgba(20, 20, 20, 0.88); border: 1px solid var(--line-strong); border-radius: inherit; }
.hero-search svg { width: 22px; height: 22px; flex: none; color: var(--stone); }
.hero-search input { flex: 1; min-width: 0; height: 48px; background: transparent; border: 0; outline: 0; color: var(--ivory); font: 500 17px/1 var(--text); }
.hero-search input::placeholder { color: var(--stone); opacity: 0.85; }
.hero-search button { flex: none; height: 46px; padding: 0 18px; border: 0; border-radius: var(--radius); background: linear-gradient(180deg, #D23A35, var(--red-deep)); color: var(--ivory); font: 700 13px/1 var(--head); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.hero-search button:hover { filter: brightness(1.08); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--stone); align-items: center; }
.quick a { border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; color: var(--stone); }
.quick a:hover { color: var(--ivory); border-color: var(--line-strong); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 30px; font-size: 13px; color: var(--stone); }
.hero-facts .kbd-fact { display: none; }
@media (hover: hover) and (min-width: 640px) { .hero-facts .kbd-fact { display: inline; } }
.hero-facts b { display: block; font: 700 22px/1.1 var(--head); color: var(--ivory); }
@media (min-width: 900px) { .home-hero { padding: 84px 0 64px; } }

/* ---------- Sections on the home page ---------- */
.block { padding: 44px 0 8px; }
.block-h { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.block-h h2 { font-size: clamp(20px, 4vw, 30px); text-transform: uppercase; letter-spacing: 0.02em; }
.block-h a { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone); border: 0; white-space: nowrap; }
.block-h a:hover { color: var(--ivory); }
.ink-rule { height: 22px; margin: 4px 0 0; background: var(--ink-stroke) center / 100% 100% no-repeat; opacity: 0.8; }

.cat-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
.cat { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.cat-top { display: flex; align-items: center; gap: 16px; }
.cat-top h3 { font-size: 19px; }
.cat-top h3 a { border: 0; }
.cat-top h3 a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.cat-top .cnt { display: block; margin-top: 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone); }
.cat p { margin: 0; color: var(--stone); font-size: 15px; }
.cat ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; position: relative; z-index: 2; }
.cat li a { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 13px; color: var(--stone); }
.cat li a:hover { color: var(--ivory); border-color: var(--line-strong); }

.db-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .db-grid { grid-template-columns: repeat(5, 1fr); } }
a.db-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 140px; }
.db-card b { font: 700 16px/1.2 var(--head); }
.db-card span:not(.num):not(.art) { font-size: 13px; color: var(--stone); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.db-card .num { margin-top: auto; font: 900 26px/1 var(--head); color: var(--ivory); }
.db-card .num small { font: 700 11px/1 var(--text); letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone); margin-left: 6px; }

/* Updates timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--red), var(--line) 30%, var(--line)); }
.timeline > li { position: relative; padding: 0 0 22px 30px; }
.timeline > li::before { content: ''; position: absolute; left: 1px; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: var(--obsidian); box-shadow: 0 0 0 2px var(--stone); }
.timeline > li:first-child::before { box-shadow: 0 0 0 2px var(--red), 0 0 14px var(--glow); background: var(--red); }
.timeline time { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone); }
.timeline h3 { font-size: 17px; margin: 2px 0 6px; }
.timeline h3 a { border: 0; }
.timeline p { color: var(--stone); margin: 0; font-size: 15px; }

/* ---------- Page header (sections, articles, db) ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 18px 0 0; margin: 0; list-style: none; font-size: 13px; color: var(--stone); }
.crumbs li { display: inline-flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: ''; width: 6px; height: 6px; border-top: 1.5px solid var(--stone); border-right: 1.5px solid var(--stone); transform: rotate(45deg); opacity: 0.6; }
.crumbs a { color: var(--stone); border: 0; }
.crumbs a:hover { color: var(--ivory); }
.page-head { display: flex; gap: 18px; align-items: center; padding: 18px 0 22px; }
.page-head h1 { font-size: clamp(24px, 6.4vw, 46px); font-weight: 900; letter-spacing: -0.015em; overflow-wrap: break-word; hyphens: auto; }
.page-head > div { min-width: 0; }
@media (max-width: 639px) {
	.page-head { flex-direction: column; align-items: flex-start; gap: 14px; }
	.page-head .art-lg { width: 64px; height: 64px; }
}
.page-head .sub { color: var(--stone); margin: 8px 0 0; font-size: 16px; max-width: 720px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 13px; color: var(--stone); }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg { width: 14px; height: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: var(--stone); border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; }
a.tag:hover { color: var(--ivory); border-color: var(--line-strong); }

/* ---------- Article layout ---------- */
.doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-bottom: 48px; }
.doc > article { min-width: 0; }
.doc-side, .doc-toc { display: none; }
@media (min-width: 1024px) {
	.doc { grid-template-columns: minmax(0, 1fr) 240px; gap: 48px; }
	.doc-toc { display: block; }
}
@media (min-width: 1280px) {
	.doc { grid-template-columns: 220px minmax(0, 1fr) 240px; }
	.doc-side { display: block; }
}
.sticky { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; scrollbar-width: thin; padding-bottom: 12px; }
.side-h { font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--stone); margin: 0 0 10px; }
.side-nav { list-style: none; margin: 0 0 22px; padding: 0; border-left: 1px solid var(--line); }
.side-nav a { display: block; border: 0; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; font-size: 14px; color: var(--stone); line-height: 1.35; }
.side-nav a:hover { color: var(--ivory); }
.side-nav a[aria-current] { color: var(--ivory); border-left-color: var(--red); }

/* Scrollspy toc with a sliding marker (idea: 21st.dev "table of contents"). */
.toc-wrap { position: relative; }
.toc { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; border: 0; padding: 4px 0 4px 14px; font-size: 13.5px; line-height: 1.35; color: var(--stone); transition: color 0.2s ease; }
.toc a:hover { color: var(--ivory); }
.toc .l3 a { padding-left: 26px; font-size: 13px; }
.toc a.on { color: var(--ivory); }
.toc-mark { position: absolute; left: 0; width: 2px; background: var(--red); box-shadow: 0 0 10px var(--glow); border-radius: 2px; transition: transform 0.35s var(--ease-out), height 0.35s var(--ease-out); top: 0; height: 0; }
.toc-m { margin: 0 0 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.toc-m summary { cursor: pointer; padding: 12px 14px; font-weight: 700; font-size: 14px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.toc-m summary::-webkit-details-marker { display: none; }
.toc-m summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--stone); border-bottom: 2px solid var(--stone); transform: rotate(45deg); transition: transform 0.25s ease; }
.toc-m[open] summary::after { transform: rotate(225deg); }
.toc-m .toc { margin: 0 14px 14px; }
@media (min-width: 1024px) { .toc-m { display: none; } }

/* ---------- Prose ---------- */
.prose { max-width: var(--read); min-width: 0; font-size: 16.5px; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(21px, 3.6vw, 27px); margin: 44px 0 14px; padding-top: 6px; position: relative; }
.prose h2::before { content: ''; display: block; width: 36px; height: 3px; background: var(--red); margin-bottom: 14px; border-radius: 2px; }
.prose h3 { font-size: 18px; margin: 28px 0 10px; }
.prose h4 { font-size: 15px; margin: 22px 0 8px; letter-spacing: 0.04em; }
.prose .anchor { margin-left: 8px; border: 0; color: var(--stone); opacity: 0; font-weight: 500; transition: opacity 0.2s ease; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 0.8; }
.prose p, .prose li { color: rgba(242, 237, 227, 0.9); }
.prose strong { color: var(--ivory); font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin: 0.3em 0; }
.prose li::marker { color: var(--red-text); }
.prose ol > li::marker { font-family: var(--head); font-size: 0.85em; }
.prose a { border-bottom-color: rgba(217, 54, 50, 0.6); }
.prose a:hover { border-bottom-color: var(--rose); }
.prose code { font: 600 0.88em/1.4 var(--mono); background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--rose); white-space: nowrap; }
.prose pre { background: #0f0e0e; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; overflow: auto; margin: 0 0 1.2em; }
.prose pre code { background: none; border: 0; padding: 0; color: var(--ivory); white-space: pre; }
.prose blockquote { margin: 0 0 1.2em; padding: 4px 0 4px 18px; border-left: 3px solid var(--ash); color: var(--stone); font-style: italic; }
.prose hr { border: 0; height: 22px; margin: 30px 0; background: var(--ink-stroke) center / 100% 100% no-repeat; opacity: 0.7; }
.prose img { border-radius: var(--radius); }
.lead-p { font-size: 18px; color: var(--ivory); }

/* Tables: scroll on phones, zebra on dark. */
.tbl { margin: 0 0 1.4em; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); -webkit-overflow-scrolling: touch; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.tbl th { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone); background: var(--surface-2); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: rgba(242, 237, 227, 0.03); }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.c, .tbl th.c { text-align: center; }

/* "Как попасть" block: buttons first. */
.howto {
	position: relative;
	margin: 0 0 1.6em;
	padding: 16px 18px 14px;
	border: 1px solid rgba(217, 54, 50, 0.4);
	border-radius: calc(var(--radius) + 2px);
	background: linear-gradient(135deg, rgba(217, 54, 50, 0.09), rgba(20, 20, 20, 0) 55%), var(--surface);
}
.howto-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font: 700 13px/1.2 var(--head); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ivory); }
.howto-h svg { width: 20px; height: 20px; color: var(--red); flex: none; }
.howto ol, .howto ul { margin-bottom: 0; }
.howto > :last-child { margin-bottom: 0; }
.howto li { margin: 0.45em 0; }
/* "A → B → C" in bold becomes a row of ui chips. */
.path { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; vertical-align: baseline; }
.path b { display: inline-block; font-weight: 700; font-size: 0.92em; line-height: 1.3; padding: 2px 9px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface-3); color: var(--ivory); white-space: nowrap; }
.path b:first-child { border-color: rgba(217, 54, 50, 0.55); }
.path i { font-style: normal; color: var(--red-text); font-weight: 700; }

/* Key numbers */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 1.6em; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.stat { padding: 14px 14px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.stat b { display: block; font: 900 clamp(20px, 5vw, 28px)/1.05 var(--head); color: var(--red-text); letter-spacing: -0.01em; word-break: break-word; }
.stat span { display: block; margin-top: 6px; font-size: 13px; line-height: 1.35; color: var(--stone); }

/* Callouts */
.callout { margin: 0 0 1.4em; padding: 12px 16px; border-left: 3px solid var(--stone); border-radius: 0 var(--radius) var(--radius) 0; background: var(--surface); }
.callout > :last-child { margin-bottom: 0; }
.callout-h { font: 700 12px/1.2 var(--head); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 6px; color: var(--stone); }
.callout-tip { border-left-color: var(--rose); }
.callout-tip .callout-h { color: var(--rose); }
.callout-warn { border-left-color: var(--red); background: linear-gradient(90deg, rgba(217, 54, 50, 0.1), var(--surface) 60%); }
.callout-warn .callout-h { color: var(--red-text); }

/* Figures and screenshot placeholders */
.fig { margin: 0 0 1.6em; }
.fig img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.fig figcaption { margin-top: 8px; font-size: 13px; color: var(--stone); }
.fig-window img { width: auto; max-width: 100%; border: 0; border-radius: 4px; }
.fig-window figcaption { max-width: 420px; }
.shot {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 8;
	padding: 20px;
	border-radius: var(--radius);
	border: 1px dashed rgba(242, 237, 227, 0.25);
	background:
		repeating-linear-gradient(135deg, rgba(242, 237, 227, 0.025) 0 10px, transparent 10px 20px),
		radial-gradient(circle at 50% 40%, rgba(217, 54, 50, 0.08), transparent 60%),
		var(--surface);
	text-align: center;
	color: var(--stone);
}
.shot svg { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--stone); opacity: 0.8; }
.shot b { display: block; font: 700 11px/1.3 var(--head); letter-spacing: 0.18em; text-transform: uppercase; color: var(--stone); margin-bottom: 6px; }
.shot span { display: block; font-size: 14px; color: var(--ivory); opacity: 0.85; max-width: 440px; }

/* Wiki links that point nowhere yet */
.prose a.missing { color: var(--stone); border-bottom-style: dashed; }

/* Article footer: updated, related, prev/next */
.doc-foot { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.related { display: grid; gap: 12px; margin-top: 14px; }
@media (min-width: 640px) { .related { grid-template-columns: repeat(2, 1fr); } }
.rel { display: flex; gap: 14px; align-items: center; padding: 14px; }
.rel b { display: block; font: 700 15px/1.25 var(--head); }
.rel span { display: block; font-size: 13px; color: var(--stone); line-height: 1.4; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pn { display: grid; gap: 12px; margin-top: 22px; }
@media (min-width: 640px) { .pn { grid-template-columns: 1fr 1fr; } }
.pn a { padding: 12px 16px; }
.pn small { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--stone); }
.pn .next { text-align: right; }
.updated-note { font-size: 13px; color: var(--stone); }

/* ---------- Lists of articles ---------- */
.alist { display: grid; gap: 12px; padding-bottom: 40px; }
@media (min-width: 768px) { .alist { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1180px) { .alist { grid-template-columns: repeat(3, 1fr); } }
.aitem { display: flex; gap: 16px; padding: 18px; }
.aitem h2, .aitem h3 { font-size: 17px; margin-bottom: 6px; }
.aitem p { margin: 0; color: var(--stone); font-size: 14.5px; }
.aitem .when { display: block; margin-top: 10px; font-size: 12px; color: var(--stone); letter-spacing: 0.06em; }
.intro { max-width: var(--read); color: rgba(242, 237, 227, 0.88); margin-bottom: 24px; }
.az { columns: 1; column-gap: 32px; padding-bottom: 40px; }
@media (min-width: 640px) { .az { columns: 2; } }
@media (min-width: 1024px) { .az { columns: 3; } }
.az section { break-inside: avoid; margin-bottom: 18px; }
.az h2 { font-size: 22px; color: var(--red-text); margin-bottom: 6px; }
.az ul { list-style: none; margin: 0; padding: 0; }
.az li { padding: 3px 0; }
.az li a { border: 0; }
.az li small { color: var(--stone); margin-left: 6px; }

/* ---------- Database ---------- */
.filters { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.filters .full { grid-column: 1 / -1; }
@media (min-width: 900px) { .filters { grid-template-columns: 2fr repeat(4, 1fr); } .filters .full { grid-column: auto; } }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone); min-width: 0; }
.filters input, .filters select {
	width: 100%;
	height: 40px;
	padding: 0 10px;
	color: var(--ivory);
	background: var(--obsidian);
	border: 1px solid var(--line-strong);
	border-radius: 6px;
	font: 500 14px/1 var(--text);
	letter-spacing: 0;
	text-transform: none;
}
.filters input:focus, .filters select:focus { outline: 0; border-color: var(--rose); }
.filters .pair { display: flex; gap: 6px; }
.db-count { font-size: 13px; color: var(--stone); margin: 0 0 10px; }
.db-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.db-list > li { min-width: 0; }
@media (min-width: 768px) { .db-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .db-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.db-row a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ivory); transition: border-color 0.2s ease, background-color 0.2s ease; }
.db-row a:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--ivory); }
.db-row .nm { min-width: 0; flex: 1; }
.db-row b { display: block; font-weight: 700; font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-row small { display: block; font-size: 12.5px; color: var(--stone); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { flex: none; display: inline-block; font: 700 11px/1 var(--head); letter-spacing: 0.06em; padding: 5px 7px; border-radius: 5px; border: 1px solid var(--line-strong); color: var(--stone); }
.badge.red { color: var(--red-text); border-color: rgba(217, 54, 50, 0.5); }
.more { display: flex; justify-content: center; margin: 18px 0 40px; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 22px 0 40px; }
.pager a, .pager span { min-width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; color: var(--stone); background: var(--surface); }
.pager a:hover { color: var(--ivory); border-color: var(--line-strong); }
.pager span[aria-current] { color: var(--ivory); border-color: rgba(217, 54, 50, 0.6); background: rgba(217, 54, 50, 0.12); }
.pager .gap { border: 0; background: none; min-width: 20px; padding: 0; }
.pager[hidden], .more[hidden] { display: none; }
.chips small { color: var(--stone); font-size: 12px; }
.tbl .chips { display: inline-flex; vertical-align: middle; }
.tbl td .chips a, .tbl td .chips span { white-space: normal; }
.empty { padding: 30px 16px; text-align: center; color: var(--stone); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

.entity { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-bottom: 48px; }
@media (min-width: 1024px) { .entity { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; } }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.kv dt, .kv dd { margin: 0; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.kv dt { color: var(--stone); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding-top: 10px; background: var(--surface-2); }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips a, .chips span, .ch { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px 2px 4px; font-size: 13px; color: var(--ivory); background: var(--surface-2); }
.chips .gi, .ch .gi { width: 22px; height: 22px; border-radius: 50%; font-size: 10px; }

/* ---------- Command palette (idea: cmdk / 21st.dev "command menu") ---------- */
.pal { position: fixed; inset: 0; z-index: 200; display: none; }
.pal.open { display: block; }
.pal-dim { position: absolute; inset: 0; background: rgba(8, 7, 7, 0.78); animation: fade 0.2s ease; }
.pal-box {
	position: relative;
	margin: 0 auto;
	width: 100%;
	max-width: 680px;
	height: 100%;
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--line-strong);
	box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(217, 54, 50, 0.12);
	animation: pop 0.25s var(--ease-out);
}
@media (min-width: 700px) { .pal-box { height: auto; max-height: min(640px, 80vh); margin-top: 10vh; border-radius: 14px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(0.985); } }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.pal-in svg { width: 20px; height: 20px; color: var(--stone); flex: none; }
.pal-in input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; color: var(--ivory); font: 500 17px/1 var(--text); }
.pal-x { flex: none; height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: transparent; color: var(--stone); font: 700 11px/1 var(--text); letter-spacing: 0.1em; cursor: pointer; }
.pal-res { flex: 1; overflow: auto; padding: 6px 8px 10px; overscroll-behavior: contain; }
.pal-g { margin: 10px 8px 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--stone); }
.pal-res a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 0; border-radius: 8px; color: var(--ivory); }
.pal-res a .tx { min-width: 0; flex: 1; }
.pal-res a b { display: block; font-weight: 700; font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-res a small { display: block; font-size: 12.5px; color: var(--stone); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-res a mark, .sres mark { background: none; color: var(--red-text); font-weight: 800; }
.pal-res a.on, .pal-res a:hover { background: var(--surface-3); color: var(--ivory); box-shadow: inset 2px 0 0 var(--red); }
.pal-res .art, .pal-res .gi { width: 32px; height: 32px; }
.pal-res .art { box-shadow: 0 0 0 1px rgba(242, 237, 227, 0.2); }
.pal-res .allres { justify-content: center; color: var(--stone); font-size: 13px; }
.pal-foot { display: none; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--stone); }
@media (min-width: 700px) { .pal-foot { display: flex; } }
.pal-hint { padding: 18px 10px; color: var(--stone); font-size: 14px; }
.pal-hint .quick { margin-top: 10px; }

/* Full search page */
.sbox { margin: 6px 0 22px; max-width: 760px; }
.sres-g { margin: 26px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--stone); }
.sres { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 900px; }
.sres a { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ivory); }
.sres a:hover { border-color: var(--line-strong); color: var(--ivory); }
.sres b { display: block; font-size: 16px; }
.sres small { display: block; color: var(--stone); font-size: 13.5px; }

/* ---------- Footer ---------- */
.w-foot { margin-top: 40px; border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--stone); font-size: 14px; background: linear-gradient(180deg, transparent, rgba(51, 43, 41, 0.25)); }
.w-foot .cols { display: grid; gap: 22px; }
@media (min-width: 768px) { .w-foot .cols { grid-template-columns: 2fr 1fr 1fr; } }
.w-foot h2 { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ivory); margin-bottom: 10px; }
.w-foot ul { list-style: none; margin: 0; padding: 0; }
.w-foot li { padding: 2px 0; }
.w-foot a { color: var(--stone); border: 0; }
.w-foot a:hover { color: var(--ivory); }
.w-foot .fine { margin-top: 22px; font-size: 12px; }

.to-top { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ivory); cursor: pointer; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { width: 18px; height: 18px; }

/* 404 */
.nf { padding: 60px 0; text-align: left; }
.nf .big { font: 900 clamp(90px, 26vw, 220px)/0.9 var(--head); color: transparent; -webkit-text-stroke: 1px rgba(242, 237, 227, 0.35); }
.nf .big span { color: var(--red); -webkit-text-stroke: 0; }

/* ----- VELA navigation: home blocks, path of the hero, systems ----- */
.pill { display: inline-flex; align-items: center; font: 700 11px/1 var(--head); letter-spacing: 0.06em; padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--stone); white-space: nowrap; background: var(--surface-2); }
.pill.red { color: var(--red-text); border-color: rgba(217, 54, 50, 0.5); background: rgba(217, 54, 50, 0.08); }
a.pill:hover { color: var(--ivory); border-color: var(--rose); }
.block-sub { margin: -8px 0 20px; color: var(--stone); max-width: 680px; font-size: 15px; }
.hero-jump { display: flex; gap: 8px; margin-top: 26px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.hero-jump::-webkit-scrollbar { display: none; }
.hero-jump a { flex: none; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px 6px 6px; font-size: 14px; font-weight: 700; background: rgba(20, 20, 20, 0.6); }
.hero-jump b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--red-deep); font: 700 12px/1 var(--head); }
.hero-jump a:hover { border-color: var(--rose); color: var(--ivory); }

.start-grid { display: grid; gap: 16px; }
@media (min-width: 1024px) { .start-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; } }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.step { display: flex !important; gap: 14px; align-items: flex-start; padding: 16px; height: 100%; }
.step .step-n { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(217, 54, 50, 0.6); color: var(--red-text); font: 900 15px/1 var(--head); }
.step b { display: block; font: 700 16px/1.25 var(--head); margin-bottom: 4px; }
.step span { display: block; font-size: 14px; color: var(--stone); line-height: 1.45; }
.start-cta { padding: 18px; border: 1px solid rgba(217, 54, 50, 0.35); border-radius: var(--radius); background: linear-gradient(160deg, rgba(217, 54, 50, 0.12), var(--surface) 55%); }
.start-cta p { color: rgba(242, 237, 227, 0.9); font-size: 15px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0 !important; }

/* path timeline: vertical on phones, a row of six on wide screens (compact) */
.ptl { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 14px; }
.ptl::before { content: ''; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: linear-gradient(var(--red), rgba(217, 54, 50, 0.25) 40%, var(--line)); }
.ptl-i { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
.ptl-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--obsidian); border: 2px solid var(--red); box-shadow: 0 0 0 4px var(--obsidian), 0 0 18px -2px var(--glow); font: 900 14px/1 var(--head); }
.ptl-card { min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ptl-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ptl-lv { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone); }
.ptl-card h3 { font-size: 18px; margin-bottom: 6px; }
.ptl-card p { font-size: 14.5px; color: rgba(242, 237, 227, 0.85); margin: 0 0 8px; line-height: 1.5; }
.ptl-time { display: flex; align-items: center; gap: 6px; color: var(--stone) !important; font-size: 13px !important; }
.ptl-time svg { width: 14px; height: 14px; }
.ptl-links { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ptl-links a { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 13px; color: var(--stone); }
.ptl-links a:hover { color: var(--ivory); border-color: var(--line-strong); }
.ptl-k { margin: 14px 0 6px !important; font-size: 11px !important; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--stone) !important; }
.ptl-db a { font-weight: 700; }
.ptl-full { max-width: 900px; padding-bottom: 12px; }
.ptl-full .ptl-card { padding: 18px 20px; }
.ptl-full .ptl-card h3 { font-size: 22px; }
@media (min-width: 1100px) {
	.ptl-compact { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
	.ptl-compact::before { left: 18px; right: 18px; top: 17px; bottom: auto; width: auto; height: 2px; background: linear-gradient(90deg, var(--red), rgba(217, 54, 50, 0.3) 50%, var(--line)); }
	.ptl-compact .ptl-i { grid-template-columns: minmax(0, 1fr); grid-template-rows: 36px 1fr; gap: 12px; }
	.ptl-compact .ptl-card { height: 100%; display: flex; flex-direction: column; }
	.ptl-compact .ptl-links { margin-top: auto; }
}

.sys-grid { display: grid; gap: 10px; }
@media (min-width: 640px) { .sys-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .sys-grid { grid-template-columns: repeat(4, 1fr); } }
.sys { display: flex !important; gap: 14px; align-items: flex-start; padding: 14px; }
.sys .art { width: 52px; height: 52px; flex: none; }
.sys > div { min-width: 0; }
.sys-sec { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red-text); }
.sys b { display: block; font: 700 16px/1.25 var(--head); margin: 2px 0 4px; }
.sys-sum { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; color: var(--stone); line-height: 1.45; }
.home-foot { margin: 36px 0 48px; font-size: 14px; }

/* "where on the path" panel of database entries */
.pathbar { margin: 0 0 22px; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, rgba(217, 54, 50, 0.08), var(--surface) 50%); }
.pb-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.pb-k { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--stone); }
.pb-h a { font: 700 15px/1.3 var(--head); border: 0; }
.pb-lv { font-size: 13px; color: var(--stone); }
.pb-track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.pb-track li { position: relative; }
.pb-track a { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; border: 0; color: var(--stone); padding-top: 10px; font-size: 11px; line-height: 1.2; }
.pb-track a::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 2px; background: var(--line-strong); }
.pb-track .done a::before { background: rgba(217, 54, 50, 0.45); }
.pb-track .on a::before { background: var(--red); box-shadow: 0 0 12px var(--glow); }
.pb-track .on a { color: var(--ivory); }
.pb-track span { font: 700 12px/1 var(--head); }
.pb-track small { display: none; }
@media (min-width: 768px) { .pb-track small { display: block; font-size: 11px; } }
.pb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* list pages: the rule of the base and group strips */
.db-rule { margin: -6px 0 16px; color: var(--stone); font-size: 14px; max-width: 760px; }
.strip { margin: 0 0 14px; }
.strip-h { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--stone); margin-bottom: 6px; }
.strip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.strip-row::-webkit-scrollbar { display: none; }
.strip-row a { flex: none; display: flex; flex-direction: column; gap: 2px; min-width: 92px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.strip-row a:hover { border-color: rgba(217, 54, 50, 0.6); color: var(--ivory); }
.strip-row b { font: 700 13px/1.2 var(--head); white-space: nowrap; }
.strip-row small { font-size: 12px; color: var(--stone); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.blur-in .w { opacity: 1; filter: none; transform: none; }
}
@media print {
	.w-header, .w-foot, .doc-side, .doc-toc, .toc-m, .to-top, .pal { display: none !important; }
	body { background: #fff; color: #000; }
	body::before { display: none; }
}
.pal-in input::-webkit-search-cancel-button, .hero-search input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
