/*
 * VELA site. Tokens follow design/VELA-DESIGN-SYSTEM.md and the launcher (launcher/src/style.css).
 * Ratio 70 / 25 / 5: obsidian / ivory / red. Red stays rare: primary actions, key numbers, indicators, embers.
 * Direction: "Ink & Ash" as the base, "Crimson Eclipse" for accents (design/research/visual-direction.md).
 * Mobile-first: base rules target phones, min-width queries widen the layout.
 * Motion lives in assets/fx.js; every animated rule here has a still fallback and is cut by prefers-reduced-motion.
 */
:root {
	--obsidian: #141414;
	--ivory: #F2EDE3;
	--red: #D93632;
	--stone: #A49B8E;
	--ash: #332B29;
	--rose: #E7B8A4;

	/* Accessibility shades of the brand red (WCAG AA 4.5:1):
	   --red-deep is the button fill under ivory text, --red-text is small red text on obsidian. */
	--red-deep: #C4302C;
	--red-text: #EA5A55;

	--surface: #1B1817;
	--surface-2: #221D1B;
	--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;

	--gutter: 16px;
	--max: 1200px;
	--radius: 8px;
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);

	/* Paper grain and the ink stroke, shared by several layers. */
	--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='%23F2EDE3' fill-opacity='.12' d='M140 22c160-8 330-6 480-2s300 3 430-3c-130 10-280 12-430 9s-320-6-480-4z'/%3E%3Cpath fill='%23D93632' d='M770 22c40-3 90-4 150-2-50 4-100 6-150 5z'/%3E%3Ccircle cx='1148' cy='17' r='2.4' fill='%23F2EDE3' fill-opacity='.22'/%3E%3Ccircle cx='1166' cy='37' r='1.4' fill='%23F2EDE3' fill-opacity='.18'/%3E%3Ccircle cx='60' cy='18' r='1.6' fill='%23F2EDE3' fill-opacity='.16'/%3E%3C/svg%3E");
	/* Enso: the ink ring shown in card art slots until the generated emblem arrives. */
	--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-behavior: smooth;
	scroll-padding-top: 24px;
}

body {
	margin: 0;
	min-height: 100vh;
	background: var(--obsidian);
	color: var(--ivory);
	font-family: var(--text);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
/* overflow-x: clip keeps sticky headers working where supported; hidden above is the fallback. */
@supports (overflow: clip) { body { overflow-x: clip; } }

/* Paper grain: barely visible, keeps flat black from feeling digital. */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 100;
	opacity: 0.05;
	background-image: var(--grain);
}

::selection { background: rgba(217, 54, 50, 0.6); color: var(--ivory); }

img, svg, video, canvas { max-width: 100%; display: block; }

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; }

.skip {
	position: absolute;
	left: var(--gutter);
	top: -100px;
	z-index: 200;
	background: var(--ivory);
	color: var(--obsidian);
	padding: 8px 14px;
	border: 0;
	border-radius: var(--radius);
}
.skip:focus { top: 12px; color: var(--obsidian); }

/* Language switch: RU is the default and works without JS; EN is shown when html[data-lang="en"]. */
html:not([data-lang="en"]) body [lang="en"],
html[data-lang="en"] body [lang="ru"] { display: none !important; }

.wrap { position: relative; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.red { color: var(--red); }
.muted { color: var(--stone); }

/* ---------- Header ---------- */

.site-header {
	position: relative;
	z-index: 30;
	border-bottom: 1px solid var(--line);
	background: rgba(20, 20, 20, 0.97);
}
.site-header .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 20px;
	padding-top: 14px;
	padding-bottom: 12px;
}
/* Reading progress: a thin red ink line under the header, driven by --progress from fx.js. */
.site-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;
	box-shadow: 0 0 10px var(--glow);
}

.brand {
	position: relative;
	font-family: var(--head);
	font-weight: 900;
	font-size: 22px;
	letter-spacing: 0.08em;
	line-height: 1;
	border: 0;
}
.brand:hover { color: var(--ivory); }
.brand .dot { color: var(--red); display: inline-block; transition: transform 0.4s var(--ease-out), text-shadow 0.4s ease; }
.brand:hover .dot { transform: scale(1.5) translateY(-1px); text-shadow: 0 0 12px var(--red); }

.nav {
	order: 3;
	width: 100%;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.nav a { position: relative; border: 0; color: var(--stone); padding: 4px 0; }
.nav a::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	background: var(--red);
	transform: scaleX(0);
	transform-origin: right center;
	transition: transform 0.35s var(--ease-out);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ivory); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left center; }

.lang-toggle {
	font: 700 12px/1 var(--text);
	letter-spacing: 0.14em;
	color: var(--stone);
	background: transparent;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	padding: 8px 10px;
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.lang-toggle:hover { color: var(--ivory); border-color: var(--stone); background: rgba(242, 237, 227, 0.05); }
.lang-toggle[hidden] { display: none; }

@media (min-width: 768px) {
	:root { --gutter: 32px; }
	html { scroll-padding-top: 130px; }
	.site-header { position: sticky; top: 0; }
	.site-header .wrap { padding-top: 18px; padding-bottom: 18px; }
	.brand { font-size: 26px; }
}
/* Six menu items fit in one row with the brand only on wide screens; below that the menu is its own row. */
@media (min-width: 1080px) {
	html { scroll-padding-top: 96px; }
	.site-header .wrap { flex-wrap: nowrap; }
	.nav { order: 0; width: auto; margin-left: auto; gap: 26px; }
}

/* ---------- Buttons ----------
 * Primary: red fill, a shine sweep (idea: 21st.dev @designali-in/components/shiny-button)
 * and a border beam running along the edge (idea: Magic UI "Border Beam", listed on 21st.dev).
 * Rewritten in plain CSS: a registered --beam angle drives a conic gradient masked to a 1px ring.
 */

.btn {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 56px;
	padding: 0 28px;
	border-radius: var(--radius);
	font-family: var(--head);
	font-weight: 700;
	font-size: 15px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.2s ease, border-color 0.25s ease, box-shadow 0.35s ease, transform 0.35s var(--ease-out);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform 0.35s var(--ease-out); }
.btn > span, .btn > svg { position: relative; z-index: 2; }

.btn-primary {
	background: linear-gradient(180deg, #D23A35 0%, var(--red-deep) 55%, #A82723 100%);
	color: var(--ivory);
	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 {
	color: var(--ivory);
	border-color: transparent;
	box-shadow: 0 14px 42px -10px rgba(217, 54, 50, 0.9), 0 0 0 4px rgba(217, 54, 50, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.22);
	transform: translateY(-2px);
}
.btn-primary:hover svg { transform: translateY(2px); }

/* Shine sweep: a soft diagonal light runs across the button on hover and once every few seconds. */
.btn-primary::after {
	content: '';
	position: absolute;
	inset: -2px;
	z-index: 1;
	background: linear-gradient(105deg, transparent 30%, rgba(255, 244, 230, 0.42) 48%, rgba(255, 244, 230, 0.08) 56%, transparent 66%);
	transform: translateX(-120%);
	animation: shine 5.5s var(--ease) 1.6s infinite;
	pointer-events: none;
}
.btn-primary:hover::after { animation: shine-once 0.9s var(--ease) both; }
@keyframes shine { 0% { transform: translateX(-120%); } 22%, 100% { transform: translateX(120%); } }
@keyframes shine-once { from { transform: translateX(-120%); } to { transform: translateX(120%); } }

/* Border beam ring, used by .btn-primary and .beam cards. */
.btn-primary::before, .beam::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 3;
	padding: 1px;
	border-radius: inherit;
	background: conic-gradient(from var(--beam), transparent 0 64%, rgba(231, 184, 164, 0.15) 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 4.5s linear infinite;
	pointer-events: none;
}
@keyframes beam { to { --beam: 360deg; } }

.btn-ghost {
	color: var(--ivory);
	border-color: var(--line-strong);
	background: rgba(20, 20, 20, 0.35);
}
/* Spotlight inside the ghost button follows the pointer (--sx / --sy from fx.js). */
.btn-ghost::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	background: radial-gradient(160px circle at var(--sx, 50%) var(--sy, 50%), rgba(242, 237, 227, 0.16), transparent 70%);
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}
.btn-ghost:hover { color: var(--ivory); border-color: rgba(242, 237, 227, 0.6); transform: translateY(-2px); }
.btn-ghost:hover::after { opacity: 1; }
.btn-ghost .arrow { transition: transform 0.35s var(--ease-out); }
.btn-ghost:hover .arrow { transform: translateX(4px); }

/* ---------- Hero ----------
 * Layers (back to front): gradient fallback on .hero → .hero-bg (art, parallax + slow drift) → .hero-aura →
 * .hero-figure (character video/poster, 3D tilt to the cursor, blended with lighten) → .hero-fog → canvas (ash,
 * embers, cursor trail) → .hero-shade (legibility) → text. fx.js moves the layers; without JS the art stays still.
 */

.hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	min-height: calc(100svh - 96px);
	display: flex;
	align-items: center;
	padding: 56px 0 72px;
	background:
		radial-gradient(circle at 78% 30%, rgba(217, 54, 50, 0.26) 0, rgba(217, 54, 50, 0.08) 22%, transparent 38%),
		linear-gradient(160deg, #221c1a 0%, var(--obsidian) 60%);
}

.hero-scene { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.hero-bg {
	position: absolute;
	inset: -5%;
	will-change: transform;
}
.hero-bg::before {
	content: '';
	position: absolute;
	inset: 0;
	background: url("hero.jpg") 70% center / cover no-repeat;
	transition: opacity 1.2s ease;
	animation: drift 32s ease-in-out infinite alternate;
}
html.js .hero-bg::before { opacity: 0; }
html.js .hero-bg.is-ready::before { opacity: 1; }
/* Generated eclipse landscape (21:9). The eclipse sits at ~67% of the image width; position 62% keeps it right of the
   headline on every screen. Phones get the 1600 px copy. */
/* With JS no backdrop is requested until fx.js knows which one exists (has-gen-bg / no-gen-bg), so the page
   never downloads both. Without JS the old hero.jpg above stays. */
html.js .hero-bg::before, html.js .page-hero-bg, html.js .tex-art > .tex { background-image: none; }
html.no-gen-bg .hero-bg::before, html.no-gen-bg .page-hero-bg, html.no-gen-bg .tex-art > .tex { background-image: url("hero.jpg"); }
html.has-gen-bg .hero-bg::before { background-image: url("gen/hero-bg-1600.jpg"); background-position: 62% 30%; }
@media (min-width: 900px) { html.has-gen-bg .hero-bg::before { background-image: url("gen/hero-bg.jpg"); } }
/* Generated character without the generated landscape: keep the old art only as a dim backdrop. */
.has-gen-char:not(.has-gen-bg) .hero-bg::before { opacity: 0.28; filter: blur(3px) saturate(0.7); }
@keyframes drift { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.07) translate3d(-1%, -0.6%, 0); } }

/* Character geometry. The figure is 3:4; with container units it is centred on the eclipse of the backdrop
   (x ≈ 63% of the width + 13% of the height for a cover-scaled 21:9 image), else it falls back to right-aligned. */
.hero-scene { container-type: size; --fh: 74%; }
.hero-figure {
	display: none;
	position: absolute;
	right: -22%;
	bottom: 0;
	height: var(--fh);
	aspect-ratio: 3 / 4;
	perspective: 1000px;
	/* lighten: the black backdrop of the art disappears, the lit cloak and the blade stay. */
	mix-blend-mode: lighten;
	opacity: 0.5;
	/* Where the eyes and the blade are in hero-character.jpg, in percent of the figure box. */
	--eye-x: 47.5%;
	--eye-y: 24.5%;
}
.has-gen-char .hero-figure, .has-gen-char .hero-umbra { display: block; }
@supports (width: 1cqh) {
	.hero-scene { --fh: 64cqh; --cx: 74cqw; }
	.hero-figure, .hero-umbra { right: auto; left: calc(var(--cx) - var(--fh) * 0.375); }
}

/* Umbra: darkens the corona right behind the body so the lighten blend shows a solid figure, not a ghost. */
.hero-umbra {
	display: none;
	position: absolute;
	right: -22%;
	bottom: 0;
	height: var(--fh);
	aspect-ratio: 3 / 4;
	background: radial-gradient(ellipse 42% 46% at 50% 62%, rgba(10, 10, 10, 0.92), rgba(10, 10, 10, 0.6) 55%, transparent 80%);
	opacity: 0.6;
}

/* fx.js turns this layer toward the cursor (rotateY / rotateX); the inner layer keeps its own idle sway. */
.hero-tilt { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.hero-figure-inner {
	position: absolute;
	inset: 0;
	/* Soft edges: an oval mask and a long fade at the bottom, so the backdrop of the art never shows a box. */
	-webkit-mask-image: radial-gradient(ellipse 56% 60% at 50% 42%, #000 55%, transparent 100%), linear-gradient(180deg, #000 62%, transparent 96%);
	-webkit-mask-composite: source-in;
	mask-image: radial-gradient(ellipse 56% 60% at 50% 42%, #000 55%, transparent 100%), linear-gradient(180deg, #000 62%, transparent 96%);
	mask-composite: intersect;
	animation: sway 9s ease-in-out infinite;
}
.hero-char, .hero-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center top;
}
.hero-char { opacity: 0; transition: opacity 1.2s ease; }
.hero-char.is-ready { opacity: 1; }
.hero-video { opacity: 0; transition: opacity 1.2s ease; }
.hero-video.is-playing { opacity: 1; }
@keyframes sway { 0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); } 50% { transform: translate3d(0, -0.8%, 0) rotate(-0.5deg); } }

.hero-glint, .hero-eyes, .hero-blade, .hero-spark {
	position: absolute;
	pointer-events: none;
	mix-blend-mode: screen;
	will-change: transform;
}
/* Moving reflection: a large soft light that slides toward the cursor. */
.hero-glint {
	left: 18%;
	top: 6%;
	width: 64%;
	height: 56%;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 226, 205, 0.16), rgba(217, 54, 50, 0.08) 40%, transparent 70%);
}
/* Eyes: two red points that drift a little toward the cursor and blink now and then. */
.hero-eyes {
	left: var(--eye-x);
	top: var(--eye-y);
	width: 10%;
	height: 3%;
	translate: -50% -50%;
	background:
		radial-gradient(circle at 30% 50%, rgba(255, 170, 150, 0.95) 0 6%, rgba(217, 54, 50, 0.55) 14%, transparent 34%),
		radial-gradient(circle at 70% 50%, rgba(255, 170, 150, 0.95) 0 6%, rgba(217, 54, 50, 0.55) 14%, transparent 34%);
	animation: eyes 6s ease-in-out infinite;
}
@keyframes eyes { 0%, 100% { opacity: 0.8; } 44% { opacity: 1; } 47%, 49% { opacity: 0.05; } 52% { opacity: 1; } }
/* The rune blade: from the tip (72%, 0) to the guard (58%, 57%). The glow breathes; fx.js adds a lean. */
.hero-blade {
	left: 57.2%;
	top: -1%;
	width: 2.2%;
	height: 58%;
	border-radius: 50%;
	rotate: 10.6deg;
	transform-origin: 50% 100%;
	background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255, 120, 96, 0.55), rgba(217, 54, 50, 0.2) 55%, transparent 75%);
	filter: blur(4px);
	opacity: 0.6;
}
/* A hot point of light that slides along the blade toward the cursor (positioned by fx.js). */
.hero-spark {
	left: 0;
	top: 0;
	width: 64px;
	height: 64px;
	margin: -32px 0 0 -32px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 246, 236, 0.95) 0 6%, rgba(255, 150, 120, 0.6) 16%, rgba(217, 54, 50, 0.22) 38%, transparent 68%);
	opacity: 0;
	transition: opacity 0.6s ease;
}
.hero-spark.is-on { opacity: 1; }

/* Crimson Eclipse accent: a slow-breathing red glow around the eclipse, behind the character. */
.hero-aura {
	position: absolute;
	left: 70%;
	top: 26%;
	width: min(80vw, 820px);
	aspect-ratio: 1;
	margin: calc(min(80vw, 820px) / -2) 0 0 calc(min(80vw, 820px) / -2);
	border-radius: 50%;
	background: radial-gradient(circle, rgba(217, 54, 50, 0.2) 0%, rgba(217, 54, 50, 0.08) 38%, transparent 66%);
	mix-blend-mode: screen;
	animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { transform: scale(0.94); opacity: 0.75; } 50% { transform: scale(1.05); opacity: 1; } }

/* Ink smoke drifting along the ground. */
.hero-fog {
	position: absolute;
	left: -20%;
	right: -20%;
	bottom: -10%;
	height: 45%;
	background:
		radial-gradient(ellipse 35% 45% at 25% 70%, rgba(242, 237, 227, 0.07), transparent 70%),
		radial-gradient(ellipse 30% 40% at 70% 80%, rgba(242, 237, 227, 0.06), transparent 70%),
		radial-gradient(ellipse 25% 35% at 50% 95%, rgba(20, 20, 20, 0.8), transparent 70%);
	animation: fog 26s ease-in-out infinite alternate;
	will-change: transform;
}
@keyframes fog { from { transform: translate3d(-4%, 0, 0); } to { transform: translate3d(4%, -3%, 0); } }

.hero-fx { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero-shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(20, 20, 20, 0.5) 0%, rgba(20, 20, 20, 0.1) 35%, rgba(20, 20, 20, 0.35) 75%, var(--obsidian) 100%),
		linear-gradient(90deg, rgba(20, 20, 20, 0.94) 0%, rgba(20, 20, 20, 0.66) 48%, rgba(20, 20, 20, 0.12) 100%);
}

.hero > .wrap { position: relative; z-index: 2; }

/* Click flash: a ring of light where the blade strikes. */
.hero-flash {
	position: absolute;
	z-index: 1;
	width: 220px;
	height: 220px;
	margin: -110px 0 0 -110px;
	border-radius: 50%;
	pointer-events: none;
	background: radial-gradient(circle, rgba(255, 240, 225, 0.55), rgba(217, 54, 50, 0.25) 30%, transparent 62%);
	mix-blend-mode: screen;
	animation: flash 0.6s var(--ease-out) forwards;
}
@keyframes flash { from { transform: scale(0.2); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

/* Custom cursor: a small blade that leans into the motion. Only on fine pointers over the hero. */
.hero-cursor {
	position: fixed;
	left: 0;
	top: 0;
	z-index: 120;
	width: 0;
	height: 0;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.25s ease;
	will-change: transform;
}
.hero-cursor svg {
	position: absolute;
	left: -6px;
	top: 0;
	width: 12px;
	height: 44px;
	max-width: none;
	transform-origin: 6px 0;
	transform: rotate(var(--blade-rot, -35deg));
	filter: drop-shadow(0 0 4px rgba(217, 54, 50, 0.55));
	transition: filter 0.2s ease;
}
.hero-cursor.is-on { opacity: 1; }
.hero-cursor.is-hot svg { filter: drop-shadow(0 0 8px rgba(255, 120, 100, 0.95)); }
.hero.has-cursor, .hero.has-cursor a, .hero.has-cursor button { cursor: none; }

.kicker {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--red-text);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	margin: 0 0 18px;
}
.hero .kicker::before {
	content: '';
	width: 28px;
	height: 2px;
	background: var(--red);
	box-shadow: 0 0 10px var(--red);
}

.hero h1 {
	font-family: var(--head);
	font-weight: 700;
	font-size: clamp(36px, 10.4vw, 100px);
	line-height: 1.02;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	margin: 0 0 22px;
	overflow-wrap: anywhere;
	text-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
}
.hero h1 .line { display: block; }
/* The red line shrinks to its text so the brush under it is as long as the words. */
.hero h1 .line.red { display: inline-block; }
.hero h1 .red { position: relative; display: inline-block; color: var(--red); text-shadow: 0 0 40px rgba(217, 54, 50, 0.35); }
/* Ink brush stroke under the red line, painted left to right after the words land. */
.hero h1 .brush {
	position: absolute;
	left: -1%;
	bottom: -0.2em;
	width: 102%;
	height: 0.26em;
	max-width: none;
	pointer-events: none;
	fill: var(--red);
	opacity: 0.9;
}
html.js .hero h1 .brush { clip-path: inset(0 100% 0 0); animation: paint 1.1s var(--ease-out) 1.1s forwards; }
@keyframes paint { to { clip-path: inset(0 0 0 0); } }

/* Word-by-word blur-in (idea: 21st.dev @animbits/components/text-blur-in). fx.js wraps words in .w with --i. */
.w { display: inline-block; white-space: pre; }
html.js .words .w {
	opacity: 0;
	filter: blur(12px);
	transform: translate3d(0, 0.35em, 0) rotate(2deg);
	animation: word-in 0.9s var(--ease-out) forwards;
	animation-delay: calc(0.15s + var(--i, 0) * 0.09s);
}
@keyframes word-in { to { opacity: 1; filter: blur(0); transform: none; } }

.hero .lead {
	color: #C9C0B3;
	font-size: 17px;
	max-width: 560px;
	margin: 0 0 32px;
	text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta .btn { flex: 1 1 100%; }
.cta-meta { margin: 14px 0 0; font-size: 13px; color: var(--stone); }

@media (min-width: 560px) {
	.cta .btn { flex: 0 0 auto; }
}

.status {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 28px 0 0;
	padding: 8px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	font-size: 14px;
	background: rgba(20, 20, 20, 0.55);
}
.status[hidden] { display: none; }
.status .pip { width: 8px; height: 8px; border-radius: 50%; background: var(--stone); flex: none; }
.status.is-online .pip { background: var(--red); animation: pulse 2.4s ease-in-out infinite; }
.status .num { color: var(--ivory); font-weight: 700; }

@keyframes pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(217, 54, 50, 0.5); }
	50% { box-shadow: 0 0 0 6px rgba(217, 54, 50, 0); }
}

/* Scroll cue */
.hero-scroll {
	position: absolute;
	left: 50%;
	bottom: 18px;
	z-index: 2;
	display: none;
	width: 26px;
	height: 42px;
	margin-left: -13px;
	border: 1px solid var(--line-strong);
	border-radius: 14px;
}
.hero-scroll::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 8px;
	width: 2px;
	height: 8px;
	margin-left: -1px;
	border-radius: 1px;
	background: var(--ivory);
	animation: scroll-cue 2s var(--ease) infinite;
}
.hero-scroll:hover { border-color: var(--rose); }
@keyframes scroll-cue { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }

@media (min-width: 768px) {
	.hero { padding: 96px 0 110px; }
	.hero .lead { font-size: 19px; }
	.kicker { font-size: 13px; }
	.hero-figure { opacity: 0.8; }
	.hero-scene { --fh: 84%; }
	@supports (width: 1cqh) { .hero-scene { --fh: 84cqh; --cx: 72cqw; } }
	.hero-scroll { display: block; }
}
@media (min-width: 1100px) {
	/* Keep the headline clear of the warrior on laptop widths. */
	.hero h1 { font-size: clamp(60px, 5.4vw, 92px); }
	.hero-figure { opacity: 1; }
	.hero-scene { --fh: 94%; }
	@supports (width: 1cqh) { .hero-scene { --fh: 94cqh; --cx: calc(66cqw + 14cqh); } }
	.hero-shade {
		background:
			linear-gradient(180deg, rgba(20, 20, 20, 0.45) 0%, rgba(20, 20, 20, 0) 30%, rgba(20, 20, 20, 0.25) 75%, var(--obsidian) 100%),
			linear-gradient(90deg, rgba(20, 20, 20, 0.92) 0%, rgba(20, 20, 20, 0.55) 42%, rgba(20, 20, 20, 0) 70%);
	}
}

/* ---------- Marquee band under the hero ----------
 * Idea: Magic UI "Marquee" (21st.dev, s/marquee). Two copies of the list slide by -50% for a seamless loop.
 */
.marquee {
	position: relative;
	overflow: hidden;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	background: var(--surface);
	padding: 14px 0;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
	display: flex;
	width: max-content;
	animation: marquee 48s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul {
	display: flex;
	align-items: center;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	font-family: var(--head);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--stone);
	white-space: nowrap;
}
.marquee li { display: flex; align-items: center; }
.marquee li::after {
	content: '';
	width: 6px;
	height: 6px;
	margin: 0 28px;
	background: var(--red);
	transform: rotate(45deg);
}
.marquee li:nth-child(3n) { color: var(--ivory); }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }

/* ---------- Sections ---------- */

.section { position: relative; padding: 72px 0; }
/* Ink brush divider instead of a hairline between sections. */
.section::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: -18px;
	height: 36px;
	background: var(--ink-stroke) center / 100% 100% no-repeat;
	pointer-events: none;
	z-index: 1;
}
.section-alt {
	background:
		radial-gradient(ellipse 60% 50% at 0% 0%, rgba(217, 54, 50, 0.07), transparent 70%),
		radial-gradient(ellipse 50% 60% at 100% 100%, rgba(242, 237, 227, 0.035), transparent 70%),
		var(--surface);
}
/* Art texture: the hero landscape, very dim, behind a section (set by fx.js once the image is known). */
.tex-art { overflow: hidden; }
.tex-art > .tex {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background: url("hero.jpg") center 40% / cover no-repeat;
	opacity: 0.1;
	filter: grayscale(0.6) contrast(1.1);
	-webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
	mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
html.has-gen-bg .tex-art > .tex { background-image: url("gen/hero-bg-1600.jpg"); opacity: 0.16; }
@media (min-width: 900px) { html.has-gen-bg .tex-art > .tex { background-image: url("gen/hero-bg.jpg"); } }
.tex-art > .wrap { z-index: 1; }

.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head .kicker { margin-bottom: 14px; }
.section-head .kicker::before, .page-hero .kicker::before {
	content: '';
	width: 18px;
	height: 2px;
	background: var(--red);
}

h2 {
	font-family: var(--head);
	font-weight: 700;
	font-size: clamp(28px, 7vw, 56px);
	line-height: 1.08;
	text-transform: uppercase;
	margin: 0 0 18px;
	overflow-wrap: anywhere;
}
h3 {
	font-family: var(--head);
	font-weight: 500;
	font-size: 19px;
	line-height: 1.25;
	margin: 0 0 10px;
}

.section-head p:not(.kicker), .lead-text { color: var(--stone); font-size: 17px; max-width: 680px; }

@media (min-width: 768px) {
	.section { padding: 112px 0; }
	.section-head { margin-bottom: 56px; }
}

/* ---------- Spotlight surfaces ----------
 * Idea: Aceternity "Card Spotlight" / "Glowing effect" (21st.dev, s/card). fx.js writes the pointer position into
 * --sx / --sy on the hovered surface; ::after paints a soft light there and a brighter rim on the border only.
 */
.fx-spot { position: relative; isolation: isolate; }
.fx-spot::after {
	content: '';
	position: absolute;
	inset: -1px;
	z-index: 0;
	border-radius: inherit;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.35s ease;
	background:
		radial-gradient(420px circle at var(--sx, 50%) var(--sy, 0%), rgba(217, 54, 50, 0.11), transparent 45%),
		radial-gradient(260px circle at var(--sx, 50%) var(--sy, 0%), rgba(242, 237, 227, 0.05), transparent 60%);
}
.fx-spot > * { position: relative; z-index: 1; }
.fx-spot:hover::after { opacity: 1; }
/* The rim: same light, masked to a 1px border. */
.fx-rim::before {
	content: '';
	position: absolute;
	inset: -1px;
	z-index: 2;
	padding: 1px;
	border-radius: inherit;
	pointer-events: none;
	background: radial-gradient(240px circle at var(--sx, 50%) var(--sy, 0%), rgba(231, 184, 164, 0.75), rgba(217, 54, 50, 0.35) 35%, transparent 70%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	transition: opacity 0.35s ease;
}
.fx-rim:hover::before { opacity: 1; }

/* Card art: a round medallion with the emblem from assets/gen/cards/<id>.jpg (lazy, set by fx.js); an ink enso
   until it loads. The emblems are ink on light parchment, so the image is dimmed a little and framed by a dark
   vignette and a thin double ring: light cards then sit on the dark site like coins, not like holes. */
.art {
	position: relative;
	flex: none;
	display: block;
	width: 60px;
	height: 60px;
	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;
	transition: opacity 0.6s ease, transform 0.6s var(--ease-out);
}
.art i {
	position: absolute;
	inset: 0;
	background-position: center;
	background-size: cover;
	opacity: 0;
	filter: brightness(0.86) contrast(1.08) saturate(0.92);
	transform: scale(1.06);
	transition: opacity 0.8s ease, 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);
}
.art.is-loaded::before { opacity: 0; }
.art.is-loaded i { opacity: 1; }
:hover > .art i, :hover > * > .art i { transform: scale(1.16); filter: brightness(1) contrast(1.05) saturate(1); }
:hover > .art::before, :hover > * > .art::before { transform: rotate(-18deg) scale(1.06); }
: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-lg { width: 92px; height: 92px; }
.art-sm { width: 44px; height: 44px; }
@media (min-width: 1024px) { .art-lg { width: 104px; height: 104px; } }

/* Principles strip ("Мир, который помнит") */
.principles { display: grid; gap: 12px; }
.principle {
	background: linear-gradient(180deg, var(--surface-2), var(--obsidian));
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 24px 22px;
	overflow: hidden;
}
.principle .num {
	display: block;
	font-family: var(--head);
	font-weight: 900;
	font-size: 34px;
	line-height: 1;
	margin-bottom: 16px;
	color: transparent;
	-webkit-text-stroke: 1px rgba(242, 237, 227, 0.35);
	transition: color 0.4s ease, -webkit-text-stroke-color 0.4s ease;
}
.principle:hover .num { color: var(--red); -webkit-text-stroke-color: transparent; }
.principle h3 { font-size: 16px; }
.principle p { color: var(--stone); margin: 0; font-size: 15px; }

@media (min-width: 768px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .principles { grid-template-columns: repeat(4, 1fr); } }

/* Split layout: big figure on one side, facts on the other. */
.split { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 7fr; gap: 72px; } }

.figure {
	font-family: var(--head);
	font-weight: 900;
	font-size: clamp(64px, 20vw, 168px);
	line-height: 0.9;
	letter-spacing: -0.03em;
	margin: 0 0 12px;
	white-space: nowrap;
}
.figure .red { text-shadow: 0 0 60px rgba(217, 54, 50, 0.35); font-variant-numeric: tabular-nums; }
.figure .arrow { color: var(--red); font-weight: 500; margin: 0 0.06em; }
.figure-caption { color: var(--stone); font-size: 15px; margin: 0; max-width: 360px; }
.figure-art { margin-bottom: 22px; }

.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.facts li {
	position: relative;
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 14px;
	padding: 18px 0;
	border-top: 1px solid var(--line);
	transition: padding-left 0.35s var(--ease-out);
}
.facts li::before {
	content: '';
	position: absolute;
	left: 0;
	top: -1px;
	width: 100%;
	height: 1px;
	background: linear-gradient(90deg, var(--red), transparent 60%);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.5s var(--ease-out);
}
.facts li:hover::before { transform: scaleX(1); }
.facts li:hover .n { color: var(--red-text); }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts .n { font-family: var(--head); font-size: 12px; color: var(--stone); padding-top: 4px; transition: color 0.3s ease; }
.facts strong { display: block; font-weight: 700; margin-bottom: 2px; }
.facts span.d { color: var(--stone); font-size: 15px; }
.facts em { font-style: normal; color: var(--ivory); font-weight: 700; }

/* Armor roles */
.roles { display: grid; gap: 12px; margin-top: 28px; }
.role { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: rgba(20, 20, 20, 0.5); }
.role b { font-family: var(--head); font-weight: 500; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; display: block; margin-bottom: 4px; }
.role span { color: var(--stone); font-size: 14px; }
@media (min-width: 640px) { .roles { grid-template-columns: repeat(3, 1fr); } }

/* Mechanic cards */
.cards { display: grid; gap: 16px; }
.card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: linear-gradient(170deg, var(--surface-2) 0%, var(--obsidian) 60%);
	border: 1px solid var(--line);
	border-radius: calc(var(--radius) + 4px);
	padding: 26px 22px 24px;
	transition: border-color 0.3s ease, box-shadow 0.4s ease;
	transform-style: preserve-3d;
	will-change: transform;
}
.card:hover { border-color: var(--line-strong); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(242, 237, 227, 0.04); }
.card .card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.card .idx { font-family: var(--head); font-size: 12px; color: var(--stone); letter-spacing: 0.1em; }
.card h3 { font-size: 21px; }
.card p { color: var(--stone); font-size: 15px; margin: 0 0 12px; }
.card p:last-child { margin-bottom: 0; }
.card .tag {
	align-self: flex-start;
	margin-top: auto;
	padding-top: 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--rose);
}
.card-feature { border-color: rgba(217, 54, 50, 0.45); }
.card-feature .accent {
	position: absolute;
	left: -1px;
	top: 24px;
	width: 3px;
	height: 40px;
	background: var(--red);
	border-radius: 0 2px 2px 0;
	box-shadow: 0 0 14px var(--red);
}

@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
	.cards { grid-template-columns: repeat(6, 1fr); }
	.cards .card { grid-column: span 2; }
	.cards .card-wide { grid-column: span 3; }
}

/* ---------- Chronicle (preview and page) ---------- */

.feed { list-style: none; margin: 0; padding: 0; }
.feed li {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2px;
	padding: 16px 0 16px 16px;
	border-left: 2px solid var(--line-strong);
	position: relative;
	transition: background-color 0.3s ease;
}
.feed li:hover { background: linear-gradient(90deg, rgba(242, 237, 227, 0.04), transparent 70%); }
.feed li::before {
	content: '';
	position: absolute;
	left: -5px;
	top: 24px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--obsidian);
	border: 2px solid var(--stone);
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.feed li:hover::before { border-color: var(--rose); }
.feed li:first-child::before { border-color: var(--red); background: var(--red); box-shadow: 0 0 10px var(--red); animation: pulse 2.4s ease-in-out infinite; }
.feed time { font-size: 13px; font-weight: 700; color: var(--stone); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.feed .text { overflow-wrap: anywhere; }

@media (min-width: 640px) {
	.feed li { grid-template-columns: 120px 1fr; gap: 20px; padding-left: 22px; }
	.feed time { padding-top: 2px; }
}

.empty {
	position: relative;
	color: var(--stone);
	border: 1px dashed var(--line-strong);
	border-radius: var(--radius);
	padding: 40px 22px 28px;
	text-align: center;
	background: rgba(20, 20, 20, 0.4);
}
.empty::before {
	content: '';
	display: block;
	width: 44px;
	height: 44px;
	margin: 0 auto 14px;
	background: var(--enso) center / contain no-repeat;
	opacity: 0.6;
}

.story {
	position: relative;
	margin: 0 0 56px;
	padding: 28px 22px;
	background:
		radial-gradient(ellipse 60% 80% at 100% 0%, rgba(217, 54, 50, 0.08), transparent 70%),
		var(--surface);
	border: 1px solid var(--line);
	border-radius: calc(var(--radius) + 4px);
	overflow: hidden;
}
.story[hidden] { display: none; }
.story .bar-accent {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: linear-gradient(180deg, var(--red), rgba(217, 54, 50, 0.1));
}
.story .story-art { position: absolute; right: 22px; top: 22px; }
.story .kicker { margin-bottom: 8px; }
.story h2 { font-size: clamp(22px, 5vw, 32px); margin-bottom: 18px; padding-right: 64px; }
.story .body { font-size: 17px; line-height: 1.75; max-width: 720px; }
.story .body p:first-child::first-letter {
	float: left;
	font-family: var(--head);
	font-weight: 900;
	font-size: 3.2em;
	line-height: 0.9;
	margin: 0.06em 0.12em 0 0;
	color: var(--red);
}
.story .body p:last-child { margin-bottom: 0; }
.story .note { margin: 18px 0 0; font-size: 13px; color: var(--stone); }

@media (min-width: 768px) { .story { padding: 40px 44px; } .story .story-art { right: 36px; top: 36px; } }

.more { margin-top: 28px; }
.more[hidden] { display: none; }

/* Patrons of the month (chronicle.html, /donors.json) */
.patrons-now { color: var(--red); font-weight: 700; margin: 0 0 14px; }
.patrons-now[hidden] { display: none; }
.patrons-list { list-style: none; counter-reset: patron; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 520px; }
.patrons-list[hidden] { display: none; }
.kicker[hidden] { display: none; }
[data-guildwar] .kicker + .patrons-list { margin-top: 10px; }
[data-guildwar] .patrons-list + .kicker { margin-top: 18px; }
.patrons-list li { counter-increment: patron; display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.patrons-list li::before { content: counter(patron) "."; color: var(--stone); min-width: 24px; font-variant-numeric: tabular-nums; }
.patrons-list li:first-child b { color: var(--rose); }
.patrons-list li b { flex: 1; overflow-wrap: anywhere; }
.patrons-list li span { color: var(--stone); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Inner page hero (guide, exchange, chronicle) ---------- */

.page-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	padding: 64px 0 48px;
}
.page-hero-bg {
	position: absolute;
	inset: -6%;
	z-index: -2;
	background: url("hero.jpg") 70% 40% / cover no-repeat;
	opacity: 0.32;
	filter: grayscale(0.35);
	will-change: transform;
}
html.has-gen-bg .page-hero-bg { background-image: url("gen/hero-bg-1600.jpg"); background-position: 60% 65%; opacity: 0.42; }
@media (min-width: 900px) { html.has-gen-bg .page-hero-bg { background-image: url("gen/hero-bg.jpg"); } }
.page-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(180deg, rgba(20, 20, 20, 0.55), rgba(20, 20, 20, 0.35) 40%, var(--obsidian) 100%),
		linear-gradient(90deg, rgba(20, 20, 20, 0.95), rgba(20, 20, 20, 0.6) 60%, rgba(20, 20, 20, 0.3));
}
.page-hero .hero-fx { z-index: -1; pointer-events: none; }
.page-hero .page-hero-head { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; }
.page-hero .page-hero-head .kicker { margin: 0; }
.page-hero h1 {
	font-family: var(--head);
	font-weight: 700;
	font-size: clamp(36px, 9vw, 84px);
	line-height: 1.04;
	text-transform: uppercase;
	margin: 18px 0 18px;
	text-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
}
.page-hero h1 .red { text-shadow: 0 0 40px rgba(217, 54, 50, 0.35); }
.page-hero p:not(.kicker):not(.status) { color: #C9C0B3; font-size: 17px; max-width: 640px; margin: 0; }
@media (min-width: 768px) { .page-hero { padding: 104px 0 72px; } }

/* ---------- How to start ---------- */

.steps { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 16px; counter-reset: step; }
.steps li {
	counter-increment: step;
	border: 1px solid var(--line);
	border-radius: calc(var(--radius) + 4px);
	padding: 24px 22px;
	background: linear-gradient(170deg, var(--surface-2), var(--obsidian) 65%);
	overflow: hidden;
}
.steps li::before {
	content: '0' counter(step);
	display: block;
	font-family: var(--head);
	font-weight: 900;
	font-size: 48px;
	line-height: 1;
	color: transparent;
	-webkit-text-stroke: 1px var(--stone);
	margin-bottom: 18px;
	transition: color 0.4s ease, -webkit-text-stroke-color 0.4s ease, text-shadow 0.4s ease;
}
.steps li:first-child::before, .steps li:hover::before { color: var(--red); -webkit-text-stroke-color: transparent; text-shadow: 0 0 30px rgba(217, 54, 50, 0.4); }
.steps p { color: var(--stone); font-size: 15px; margin: 0; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.note-box {
	position: relative;
	display: grid;
	gap: 6px;
	border-left: 2px solid var(--rose);
	padding: 14px 18px 14px 20px;
	max-width: 720px;
	margin-bottom: 36px;
	background: linear-gradient(90deg, rgba(231, 184, 164, 0.07), transparent 80%);
	border-radius: 0 var(--radius) var(--radius) 0;
}
.note-box strong { font-weight: 700; }
.note-box p { color: var(--stone); margin: 0; font-size: 15px; }
.kbd {
	display: inline-block;
	padding: 0 6px;
	border: 1px solid var(--line-strong);
	border-bottom-width: 2px;
	border-radius: 4px;
	background: rgba(242, 237, 227, 0.04);
	color: var(--ivory);
	font-size: 14px;
	white-space: nowrap;
}

/* ---------- Systems of the world (index) ---------- */

.sys-group { margin-top: 56px; }
.sys-group:first-of-type { margin-top: 0; }
.sys-group > h3 {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 13px;
	font-family: var(--text);
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--stone);
	margin: 0 0 18px;
}
.sys-group > h3::before { content: ''; width: 8px; height: 8px; background: var(--red); transform: rotate(45deg); flex: none; }
.sys-group > h3::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }

.sys-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .sys-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .sys-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .sys-grid-4 { grid-template-columns: repeat(4, 1fr); } }

.sys {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
	background: linear-gradient(170deg, var(--surface-2), var(--obsidian) 55%);
	border: 1px solid var(--line);
	border-radius: calc(var(--radius) + 4px);
	padding: 20px 20px 18px;
	transition: border-color 0.3s ease, transform 0.4s var(--ease-out), box-shadow 0.4s ease;
}
.sys:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: 0 22px 50px -28px rgba(0, 0, 0, 0.95); }
.sys .sys-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sys h4 {
	font-family: var(--head);
	font-weight: 500;
	font-size: 17px;
	line-height: 1.3;
	margin: 0;
	min-width: 0;
}
.sys p { color: var(--stone); font-size: 14px; line-height: 1.55; margin: 0; }
.sys .meta { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 12px; color: var(--stone); }
.sys .meta .kbd { font-size: 13px; }
.sys-soon { border-style: dashed; }
.sys-soon h4 { color: var(--stone); }

.badge {
	display: inline-block;
	padding: 2px 8px;
	border: 1px solid var(--rose);
	border-radius: 999px;
	color: var(--rose);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	white-space: nowrap;
	vertical-align: middle;
}
.badge-new { border-color: var(--red); color: var(--red-text); }

/* Paths of the world: live progress from /world.json inside the systems card. */
.paths { display: grid; gap: 10px; margin: 6px 0 2px; }
.paths[hidden] { display: none; }
.path { display: grid; gap: 4px; font-size: 13px; }
.path .row { display: flex; justify-content: space-between; gap: 10px; }
.path .row b { font-weight: 700; }
.path .row span { color: var(--stone); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar { height: 4px; border-radius: 2px; background: var(--ash); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--stone), var(--ivory)); border-radius: 2px; transition: width 1s var(--ease-out); }
.path.is-max .bar i { background: linear-gradient(90deg, var(--red-deep), var(--red)); box-shadow: 0 0 8px var(--red); }

/* ---------- Guide ---------- */

.toc { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	font-size: 14px;
	color: var(--ivory);
	background: rgba(20, 20, 20, 0.55);
	transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.3s var(--ease-out);
}
.toc a::before { content: ''; width: 5px; height: 5px; background: var(--red); transform: rotate(45deg); }
.toc a:hover { border-color: var(--rose); color: var(--ivory); background: rgba(231, 184, 164, 0.08); transform: translateY(-2px); }

.prose { max-width: 760px; }
.prose p, .prose li { color: var(--stone); }
.prose strong { color: var(--ivory); }
.prose ul { padding-left: 20px; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }

.bands { display: grid; gap: 12px; }
.band {
	display: grid;
	gap: 6px 24px;
	border: 1px solid var(--line);
	border-radius: calc(var(--radius) + 4px);
	padding: 20px;
	background: linear-gradient(170deg, var(--surface-2), var(--obsidian) 55%);
	min-width: 0;
}
.band .lv { font-family: var(--head); font-weight: 900; font-size: 26px; line-height: 1; white-space: nowrap; transition: color 0.3s ease; }
.band:hover .lv { color: var(--red); }
.band .lv small { display: block; font-family: var(--text); font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--stone); margin-top: 6px; }
.band dl { margin: 0; display: grid; gap: 8px; }
.band dt { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--stone); }
.band dd { margin: 0 0 4px; font-size: 15px; }
@media (min-width: 900px) {
	.band { grid-template-columns: 120px 1fr; padding: 24px 28px; }
	.band dl { grid-template-columns: repeat(3, 1fr); gap: 4px 24px; }
	.band dl > div { min-width: 0; }
}

.cmd-groups { display: grid; gap: 28px; }
@media (min-width: 900px) { .cmd-groups { grid-template-columns: repeat(2, 1fr); gap: 32px 48px; } }
.cmd-groups h3 { font-size: 16px; margin-bottom: 8px; }
.cmds { margin: 0; }
.cmds > div {
	display: grid;
	grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr);
	gap: 12px;
	padding: 10px 8px;
	margin: 0 -8px;
	border-top: 1px solid var(--line);
	border-radius: 4px;
	align-items: baseline;
	transition: background-color 0.25s ease;
}
.cmds > div:hover { background: rgba(242, 237, 227, 0.035); }
.cmds dt { font-weight: 700; font-variant-ligatures: none; overflow-wrap: anywhere; }
.cmds > div:hover dt { color: var(--rose); }
.cmds dd { margin: 0; color: var(--stone); font-size: 15px; }

.routine { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.routine li { display: grid; grid-template-columns: 4.5em 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.routine li:last-child { border-bottom: 1px solid var(--line); }
.routine .t { font-family: var(--head); font-size: 14px; color: var(--rose); padding-top: 2px; }
.routine p { margin: 0; color: var(--stone); font-size: 15px; }
.routine strong { color: var(--ivory); }

.two-col { display: grid; gap: 16px; }
@media (min-width: 900px) { .two-col { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
.panel {
	border: 1px solid var(--line);
	border-radius: calc(var(--radius) + 4px);
	padding: 22px;
	background: linear-gradient(170deg, var(--surface-2), var(--obsidian) 60%);
	min-width: 0;
}
.panel h3 { font-size: 17px; }
.panel ul { margin: 0; padding-left: 18px; }
.panel li { color: var(--stone); font-size: 15px; margin-bottom: 6px; }
.panel li::marker { color: var(--red); }
.panel li strong { color: var(--ivory); }
.panel-accent { border-color: rgba(217, 54, 50, 0.45); }

/* FAQ (guide.html #faq): native details/summary in the frame of .panel. The FAQPage JSON-LD repeats the text. */
.faq { display: grid; gap: 10px; max-width: 880px; }
.faq details {
	border: 1px solid var(--line);
	border-radius: calc(var(--radius) + 4px);
	background: linear-gradient(170deg, var(--surface-2), var(--obsidian) 60%);
	transition: border-color 0.2s ease;
}
.faq details[open] { border-color: var(--line-strong); }
.faq summary { position: relative; padding: 16px 52px 16px 20px; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
	content: '+';
	position: absolute;
	right: 20px;
	top: 50%;
	color: var(--red-text);
	font: 500 22px/1 var(--head);
	transform: translateY(-50%);
	transition: transform 0.2s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq summary:focus-visible { outline: 2px solid var(--red-text); outline-offset: 2px; border-radius: calc(var(--radius) + 4px); }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--stone); font-size: 15px; }

/* Section head with an emblem next to the kicker (guide, exchange, chronicle). */
.head-art { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.head-art .kicker { margin: 0; }

/* ---------- Exchange ---------- */

:root { --up: #7FBF6A; --down: var(--red-text); }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--stone); }

.quotes { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1024px) { .quotes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }

.quotes > .empty { grid-column: 1 / -1; margin: 0; }

.quote {
	position: relative;
	display: grid;
	gap: 6px;
	min-width: 0;
	text-align: left;
	font: inherit;
	color: var(--ivory);
	background: linear-gradient(170deg, var(--surface-2), var(--obsidian) 60%);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 12px 12px 10px;
	cursor: pointer;
	transition: border-color 0.2s ease, transform 0.35s var(--ease-out), box-shadow 0.35s ease;
}
.quote:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.quote[aria-pressed="true"] { border-color: var(--ivory); box-shadow: 0 0 0 1px rgba(242, 237, 227, 0.3), 0 16px 40px -20px rgba(217, 54, 50, 0.6); }
.quote .name { font-size: 13px; font-weight: 700; color: var(--stone); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote .price { font-family: var(--head); font-size: 19px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.quote .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.quote canvas { width: 100%; height: 40px; display: block; margin-top: 4px; }
.quote .row span { white-space: nowrap; }
@media (min-width: 560px) {
	.quote { padding: 16px 16px 12px; }
	.quote .price { font-size: 22px; }
	.quote canvas { height: 44px; }
}

.chart-panel {
	position: relative;
	margin: 24px 0 16px;
	border: 1px solid var(--line);
	border-radius: calc(var(--radius) + 4px);
	background:
		radial-gradient(ellipse 60% 70% at 100% 0%, rgba(217, 54, 50, 0.07), transparent 70%),
		var(--obsidian);
	padding: 20px 16px 16px;
	min-width: 0;
}
.chart-panel[hidden] { display: none; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 20px; margin-bottom: 4px; }
.chart-head h3 { margin: 0; font-size: 20px; }
.chart-head .nums { font-variant-numeric: tabular-nums; font-weight: 700; margin: 0; }
.chart-head .nums span { white-space: nowrap; }
.chart-head .nums .big { font-family: var(--head); font-size: 22px; margin-right: 10px; }
.chart-about { color: var(--stone); font-size: 14px; margin: 0 0 14px; }
.chart-box { position: relative; }
.chart-box canvas { width: 100%; height: 240px; display: block; touch-action: pan-y; }
.chart-tip {
	position: absolute;
	top: 0;
	pointer-events: none;
	background: var(--surface);
	border: 1px solid var(--line-strong);
	border-radius: 4px;
	padding: 4px 8px;
	font-size: 12px;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.8);
}
.chart-tip[hidden] { display: none; }
.chart-tip b { display: block; font-size: 14px; }
.chart-note { margin: 10px 0 0; font-size: 12px; color: var(--stone); }
@media (min-width: 768px) {
	.chart-panel { padding: 28px 28px 20px; }
	.chart-box canvas { height: 300px; }
}

.note-after { margin: 32px 0 0; }
.stale { color: var(--rose); font-size: 14px; margin: 0 0 16px; }
.stale[hidden] { display: none; }

.news { list-style: none; margin: 0; padding: 0; }
.news li { padding: 16px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.news li:last-child { border-bottom: 1px solid var(--line); }
.news .head { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.news time { color: var(--stone); letter-spacing: 0.06em; }
.news .text { overflow-wrap: anywhere; }

.games { display: grid; gap: 12px; }
@media (min-width: 700px) { .games { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Footer ---------- */

.site-footer { position: relative; overflow: hidden; border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 14px; color: var(--stone); }
/* Huge outlined wordmark behind the footer. */
.site-footer::before {
	content: 'VELA';
	position: absolute;
	left: 50%;
	bottom: -0.32em;
	transform: translateX(-50%);
	font-family: var(--head);
	font-weight: 900;
	font-size: clamp(120px, 30vw, 420px);
	line-height: 1;
	letter-spacing: 0.04em;
	color: transparent;
	-webkit-text-stroke: 1px rgba(242, 237, 227, 0.06);
	pointer-events: none;
	white-space: nowrap;
}
.site-footer .wrap { display: grid; gap: 20px; }
.site-footer .brand { font-size: 20px; color: var(--ivory); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer nav a { border: 0; color: var(--stone); }
.site-footer nav a:hover { color: var(--ivory); }
.site-footer small { display: block; font-size: 12px; line-height: 1.6; max-width: 720px; }
@media (min-width: 768px) {
	.site-footer { padding: 56px 0 96px; }
	.site-footer .wrap { grid-template-columns: auto 1fr; align-items: center; }
	.site-footer nav { justify-content: flex-end; }
	.site-footer small { grid-column: 1 / -1; }
}

/* ---------- Motion ---------- */

/* Reveal on scroll. Only active when site.js has run (html.js), so content is visible without JS.
   fx.js adds --i to grid children so they cascade in. */
html.js .reveal {
	opacity: 0;
	filter: blur(6px);
	translate: 0 26px;
	transition: opacity 0.9s var(--ease-out), translate 0.9s var(--ease-out), filter 0.9s var(--ease-out), transform 0.4s var(--ease-out), border-color 0.3s ease, box-shadow 0.4s ease;
	transition-delay: calc(var(--i, 0) * 80ms);
}
html.js .reveal.in { opacity: 1; filter: none; translate: none; }
/* Children use the separate translate property, so their own hover transforms keep working. */
html.js .reveal .st {
	opacity: 0;
	translate: 0 20px;
	transition: opacity 0.8s var(--ease-out), translate 0.8s var(--ease-out), transform 0.4s var(--ease-out), border-color 0.3s ease, box-shadow 0.4s ease, background-color 0.3s ease;
	transition-delay: calc(0.1s + var(--i, 0) * 70ms);
}
html.js .reveal.in .st { opacity: 1; translate: none; }
/* After the reveal the stagger delay must not slow down hover transitions. */
html.js .reveal.in.done, html.js .reveal.in.done .st { transition-delay: 0s; }

.hero .kicker, .hero .lead, .hero .cta, .hero .cta-meta { animation: rise 1s var(--ease-out) both; }
.hero .kicker { animation-delay: 0.05s; }
.hero .lead { animation-delay: 0.55s; }
.hero .cta { animation-delay: 0.7s; }
.hero .cta-meta { animation-delay: 0.8s; }
.page-hero .wrap > * { animation: rise 0.9s var(--ease-out) both; }
.page-hero .wrap > :nth-child(2) { animation-delay: 0.08s; }
.page-hero .wrap > :nth-child(3) { animation-delay: 0.16s; }
.page-hero .wrap > :nth-child(4) { animation-delay: 0.24s; }

@keyframes rise {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	html.js .reveal, html.js .reveal .st { opacity: 1; filter: none; translate: none; }
	html.js .words .w { opacity: 1; filter: none; transform: none; }
	html.js .hero h1 .brush { clip-path: none; }
	html.js .hero-bg::before, .hero-char, .hero-video { opacity: 1; }
	.hero-video { display: none; }
	.btn-primary::before { display: none; }
	.marquee-track { flex-wrap: wrap; width: auto; }
	.marquee-track > ul + ul { display: none; }
	.marquee ul { flex-wrap: wrap; white-space: normal; justify-content: center; row-gap: 8px; }
	.hero-cursor { display: none; }
	.hero.has-cursor, .hero.has-cursor a, .hero.has-cursor button { cursor: auto; }
}

/* ---------- Hero remote (hero.html, assets/hero.js) ---------- */

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.pult-hero { padding-bottom: 32px; }
.pult { padding-top: 40px; }
.pult [hidden] { display: none !important; }
.pult-link { max-width: 520px; display: grid; gap: 16px; }
.pult-link h3 { margin: 0; }
.pult-steps { margin: 0; padding-left: 20px; color: var(--stone); font-size: 15px; }
.pult-steps li { margin-bottom: 6px; }
.pult-field { display: grid; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--stone); }
.pult-field input {
	font: 700 24px/1.2 var(--head);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ivory);
	background: var(--obsidian);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	padding: 14px 16px;
	width: 100%;
	min-width: 0;
}
.pult-field input::placeholder { color: var(--stone); opacity: 0.35; }
.pult-field input:focus { outline: 2px solid var(--red); outline-offset: 2px; border-color: transparent; }
.pult-link .btn { width: 100%; }
.pult-link .note { color: var(--stone); font-size: 13px; margin: 0; }
.pult-msg { margin: 0; padding: 10px 14px; border-radius: var(--radius); font-size: 15px; background: rgba(242, 237, 227, 0.05); border-left: 2px solid var(--stone); }
.pult-msg.is-ok { border-left-color: #7FBF6A; }
.pult-msg.is-bad { border-left-color: var(--red); color: var(--rose); }
.pult-global { margin-bottom: 16px; }

.pult-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.pult-updated { margin: 0; color: var(--stone); font-size: 13px; }
.pult-bar .btn, .pult-device-actions .btn { min-height: 44px; padding: 0 18px; font-size: 12px; }

.pult-chars { display: grid; gap: 16px; margin-bottom: 32px; }
.pult-char {
	border: 1px solid var(--line);
	border-radius: calc(var(--radius) + 4px);
	padding: 18px 16px;
	background: linear-gradient(170deg, var(--surface-2), var(--obsidian) 70%);
	min-width: 0;
}
.pult-char.is-dead { border-color: rgba(217, 54, 50, 0.55); box-shadow: 0 0 0 1px rgba(217, 54, 50, 0.2), 0 18px 50px -30px var(--glow); }
.pult-char.is-off { opacity: 0.72; }
.pult-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.pult-name { font-family: var(--head); font-weight: 700; font-size: 20px; margin: 0; overflow-wrap: anywhere; }
.pult-cls { color: var(--stone); font-size: 14px; }
.pult-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.pult-badge { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 8px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--stone); }
.pult-badge.is-on { color: var(--ivory); border-color: rgba(127, 191, 106, 0.6); }
.pult-badge.is-red { color: var(--ivory); background: var(--red-deep); border-color: transparent; }
.pult-hp { height: 6px; border-radius: 3px; background: rgba(242, 237, 227, 0.08); overflow: hidden; margin: 4px 0 10px; }
.pult-hp i { display: block; height: 100%; background: linear-gradient(90deg, #A82723, var(--red)); }
.pult-where { margin: 0 0 8px; color: var(--stone); font-size: 14px; }
.pult-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin: 10px 0; padding: 0; }
.pult-stats div { min-width: 0; }
.pult-stats dt { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--stone); }
.pult-stats dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.pult-death { margin: 8px 0; color: var(--rose); font-size: 14px; }
.pult-limit { margin: 0 0 10px; color: var(--stone); font-size: 13px; }
.pult-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.pult-actions .btn { min-height: 48px; padding: 0 10px; font-size: 11px; letter-spacing: 0.08em; white-space: normal; text-align: center; line-height: 1.2; }
.pult-actions .btn[aria-disabled="true"] { opacity: 0.38; box-shadow: none; filter: grayscale(0.6); }
.pult-actions .btn.is-busy { opacity: 0.6; pointer-events: none; }
.pult-char .pult-msg { margin-top: 10px; }

.pult-grid { display: grid; gap: 16px; margin-bottom: 24px; }
.pult-tg { color: var(--stone); font-size: 14px; margin: 0 0 12px; }
.pult-toggles { display: grid; gap: 4px; }
.pult-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.pult-toggle:last-child { border-bottom: 0; }
.pult-toggle input { appearance: none; -webkit-appearance: none; flex: none; width: 44px; height: 24px; border-radius: 12px; background: rgba(242, 237, 227, 0.14); position: relative; cursor: pointer; margin: 0; }
.pult-toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ivory); transition: transform 0.2s var(--ease-out); }
.pult-toggle input:checked { background: var(--red-deep); }
.pult-toggle input:checked::after { transform: translateX(20px); }
.pult-toggle input:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.pult-device-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pult-rules { max-width: none; }

@media (min-width: 768px) {
	.pult-chars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pult-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pult-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.pult-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Personal cabinet (cabinet.html, assets/cabinet.js) ---------- */

/* The cabinet link stands out in the header menu as a thin outlined pill. */
.nav a.nav-cabinet { color: var(--ivory); border: 1px solid rgba(217, 54, 50, 0.55); border-radius: 999px; padding: 4px 12px; }
.nav a.nav-cabinet::after { display: none; }
.nav a.nav-cabinet:hover, .nav a.nav-cabinet[aria-current="page"] { background: rgba(217, 54, 50, 0.16); border-color: var(--red); }

.cab .cab-flash { margin-bottom: 20px; }
.cab-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.cab-tabs [role="tab"] {
	font: 700 12px/1 var(--text);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--stone);
	background: transparent;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	padding: 11px 16px;
	min-height: 40px;
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.cab-tabs [role="tab"]:hover { color: var(--ivory); border-color: var(--stone); }
.cab-tabs [role="tab"][aria-selected="true"] { color: var(--ivory); background: var(--red-deep); border-color: transparent; }
.cab-tabs [role="tab"]:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }

.cab-form { display: grid; gap: 14px; align-content: start; }
.cab-guest .cab-form, .cab-guest .cab-done { max-width: 520px; }
.cab-form h3, .cab-done h3 { margin: 0; }
.cab-form .note, .cab-done .note { color: var(--stone); font-size: 13px; margin: 0; }
.cab-form .btn, .cab-done .btn, .cab-tg-code .btn { min-height: 48px; font-size: 13px; text-align: center; line-height: 1.2; padding: 0 18px; }
.cab-form .btn[disabled], .cab-panel .btn[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }
.cab-form .btn[disabled]::after, .cab-panel .btn[disabled]::after, .cab-form .btn[disabled]::before, .cab-panel .btn[disabled]::before { display: none; }
.cab-field { display: grid; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--stone); }
.cab-field small { font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--stone); }
.cab-field input {
	font: 500 16px/1.3 var(--text); /* 16px: phones do not zoom into the field */
	letter-spacing: 0;
	text-transform: none;
	color: var(--ivory);
	background: var(--obsidian);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	padding: 12px 14px;
	width: 100%;
	min-width: 0;
}
.cab-field input:focus { outline: 2px solid var(--red); outline-offset: 2px; border-color: transparent; }
.cab-field input:disabled { opacity: 0.5; }
/* Honeypot: out of sight and out of the tab order, but not display:none (bots skip those). */
.cab-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.cab-done { display: grid; gap: 14px; }
.cab-done p { margin: 0; color: var(--stone); }
.cab-tg-code { display: grid; gap: 10px; margin-top: 4px; }
.cab-code {
	display: block;
	font: 500 14px/1.4 ui-monospace, 'Cascadia Mono', Consolas, monospace;
	color: var(--ivory);
	background: var(--obsidian);
	border: 1px dashed var(--line-strong);
	border-radius: var(--radius);
	padding: 10px 12px;
	overflow-wrap: anywhere;
	user-select: all;
}

.cab-bar { flex-wrap: wrap; }
.cab-bar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cab-bar-actions .btn { min-height: 44px; padding: 0 18px; font-size: 12px; }
.cab-panel .pult-grid { margin-bottom: 24px; }
.cab-sub { font-size: 17px; margin: 8px 0 14px; }

.cab-facts { display: grid; gap: 10px; margin: 0; }
.cab-facts div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; min-width: 0; }
.cab-facts div:last-child { border-bottom: 0; }
.cab-facts dt { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--stone); }
.cab-facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; text-align: right; }
.cab-facts dd.muted { font-weight: 500; color: var(--stone); }

.cab-coin { font: 700 22px/1.2 var(--head); margin: 0 0 8px; }
.cab-coin-big { font: 700 32px/1.1 var(--head); margin: 4px 0 10px; overflow-wrap: anywhere; }
.cab-panel .panel .note { color: var(--stone); font-size: 13px; margin: 0 0 14px; }
.cab-panel .panel .empty { margin: 0; padding: 28px 16px 20px; }

.cab-chars { display: grid; gap: 12px; }
.cab-char { border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 14px 16px; background: linear-gradient(170deg, var(--surface-2), var(--obsidian) 70%); min-width: 0; }
.cab-char.is-on { border-color: rgba(127, 191, 106, 0.45); }
.cab-char .pult-name { font-size: 17px; }
.cab-char .pult-badges { margin: 8px 0 0; }

.cab-sessions { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.cab-session { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cab-session:last-child { border-bottom: 0; }
.cab-session-text { display: grid; gap: 2px; min-width: 0; }
.cab-session-text b { font-size: 14px; overflow-wrap: anywhere; }
.cab-session-text small { font-size: 12px; overflow-wrap: anywhere; }
.cab-session.is-current b { color: var(--rose); }
.cab-session .btn { flex: none; min-height: 40px; padding: 0 14px; font-size: 11px; }
.cab-pult-devices { margin-top: 18px; }

@media (min-width: 768px) {
	.cab-chars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
	.cab-chars { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
