/* Вики БЕТОНА — графит + мята, как портал и лаунчер. */
:root {
  color-scheme: dark;
  --bg: #0a0c0f;
  --bg-2: #0e1115;
  --surface: #13171c;
  --surface-2: #181d23;
  --elevated: #1f252d;
  --line: rgba(229, 234, 243, 0.08);
  --line-strong: rgba(229, 234, 243, 0.14);
  --text: #eef1f5;
  --text-2: #c9d0d9;
  --muted: #9aa4b1;
  --subtle: #737e8b;
  --mint: #82e0b0;
  --mint-strong: #a6eecb;
  --mint-soft: rgba(130, 224, 176, 0.1);
  --mint-line: rgba(130, 224, 176, 0.28);
  --amber: #f0c674;
  --red: #ff8a84;
  --sky: #7aa2ff;
  --violet: #b493ff;
  --radius: 16px;
  --radius-lg: 22px;
  --top-h: 60px;
  --side-w: 264px;
  --font: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 24px); -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 6px; }
.i { width: 1.1em; height: 1.1em; flex: none; }
[hidden] { display: none !important; }

.skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 8px 14px; border-radius: 10px; background: var(--mint); color: #06120c; font-weight: 700; text-decoration: none; }
.skip:focus { top: 10px; }
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 60; background: linear-gradient(90deg, var(--mint), var(--mint-strong)); box-shadow: 0 0 12px var(--mint); }

/* ------------------------------------------------------------- top bar */
.top { position: sticky; top: 0; z-index: 40; height: calc(var(--top-h) + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); background: rgba(10, 12, 15, 0.82); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); border-bottom: 1px solid var(--line); }
.top-inner { height: var(--top-h); display: flex; align-items: center; gap: 16px; padding: 0 20px; max-width: 1560px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { border-radius: 8px; }
.brand-word { font-weight: 800; letter-spacing: 0.16em; font-size: 14px; }
.brand-tag { font-size: 12px; font-weight: 700; color: var(--mint); background: var(--mint-soft); border: 1px solid var(--mint-line); padding: 2px 8px; border-radius: 999px; }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 10px; place-items: center; color: var(--muted); }
.menu-btn .i { width: 22px; height: 22px; }
.search-btn { flex: 1; max-width: 460px; margin-left: 24px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03); color: var(--subtle); font-size: 14px; transition: border-color .2s, background .2s; }
.search-btn:hover { border-color: var(--mint-line); background: rgba(255, 255, 255, 0.05); color: var(--muted); }
.search-btn span { flex: 1; text-align: left; }
kbd { font: 600 11px var(--mono); padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; color: var(--muted); background: var(--surface); }
.top-links { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.top-links a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 10px; transition: color .2s, background .2s; }
.top-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.top-icon { display: grid; place-items: center; width: 38px; padding: 8px !important; }
.top-icon .i { width: 20px; height: 20px; }

/* --------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); max-width: 1560px; margin: 0 auto; }
.side { position: sticky; top: calc(var(--top-h) + env(safe-area-inset-top, 0px)); height: calc(100vh - var(--top-h)); overflow-y: auto; border-right: 1px solid var(--line); scrollbar-width: thin; }
.side-inner { padding: 22px 14px 28px; display: flex; flex-direction: column; gap: 18px; min-height: 100%; }
.nav-group-title { margin: 0 0 6px; padding: 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--subtle); }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; transition: color .15s, background .15s; }
.nav-link .i { color: var(--subtle); transition: color .15s; }
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav-link.is-current { color: var(--text); background: var(--mint-soft); box-shadow: inset 2px 0 0 var(--mint); }
.nav-link.is-current .i, .nav-link:hover .i { color: var(--mint); }
.side-foot { margin-top: auto; }
.ip { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); text-align: left; font: 600 14px var(--mono); transition: border-color .2s; }
.ip:hover { border-color: var(--mint-line); }
.ip span { flex: 1; display: flex; flex-direction: column; }
.ip small { font: 600 10px var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--subtle); }
.ip .i { color: var(--mint); }
.side-scrim { display: none; }

.main { min-width: 0; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; min-height: 300px; display: flex; align-items: flex-end; padding: 56px 48px 40px; overflow: hidden; border-bottom: 1px solid var(--line); isolation: isolate; }
.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--bg) 0%, rgba(10, 12, 15, 0.86) 34%, rgba(10, 12, 15, 0.25) 70%, rgba(10, 12, 15, 0.1) 100%), linear-gradient(0deg, var(--bg) 0%, rgba(10, 12, 15, 0) 45%); }
.hero-text { max-width: 640px; }
.kicker { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--mint); }
.kicker a { text-decoration: none; }
.kicker a:hover { text-decoration: underline; }
.hero h1 { margin: 0; font-size: clamp(34px, 4.6vw, 52px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; text-wrap: balance; }
.lead { margin: 14px 0 0; font-size: 18px; line-height: 1.55; color: var(--text-2); max-width: 600px; }
.lead code { font-size: .85em; }
.hero--home { min-height: 520px; align-items: center; }
.hero--home h1 { font-size: clamp(40px, 6vw, 72px); }
.hero--home .lead { font-size: 19px; }
.hero--skill .hero-art--pixel img { image-rendering: pixelated; object-position: 50% 50%; }
.hero--skill::before { background: linear-gradient(90deg, var(--bg) 0%, rgba(10, 12, 15, 0.9) 40%, rgba(10, 12, 15, 0.35) 80%), linear-gradient(0deg, var(--bg), rgba(10, 12, 15, 0) 60%); }
.hero--race { min-height: 280px; align-items: center; gap: 32px; background: radial-gradient(70% 120% at 20% 30%, color-mix(in srgb, var(--r) 18%, transparent), transparent 70%), var(--bg-2); }
.hero--race::before { background: none; }
.race-portrait { flex: none; width: 176px; height: 176px; border-radius: 26px; padding: 6px; background: linear-gradient(145deg, color-mix(in srgb, var(--r) 60%, transparent), rgba(255,255,255,.04)); box-shadow: 0 30px 70px -20px color-mix(in srgb, var(--r) 55%, transparent), 0 0 0 1px var(--line-strong); }
.race-portrait img { width: 100%; height: 100%; border-radius: 20px; image-rendering: pixelated; }
.race-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 13px; color: var(--text-2); background: rgba(255,255,255,.03); }
.pill .i { color: var(--mint); }

.home-search { margin-top: 28px; display: flex; align-items: center; gap: 12px; width: min(560px, 100%); height: 58px; padding: 0 12px 0 18px; border-radius: 16px; border: 1px solid var(--line-strong); background: rgba(19, 23, 28, 0.82); backdrop-filter: blur(10px); color: var(--muted); font-size: 16px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.8); transition: border-color .2s; }
.home-search:hover { border-color: var(--mint-line); color: var(--text-2); }
.home-search span { flex: 1; text-align: left; }
.home-search .i { width: 20px; height: 20px; color: var(--mint); }
.home-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.home-quick a { text-decoration: none; font-size: 14px; color: var(--text-2); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(10,12,15,.5); transition: border-color .2s, color .2s; }
.home-quick a:hover { color: var(--text); border-color: var(--mint-line); }

/* ------------------------------------------------------------- content */
.content-wrap { display: grid; grid-template-columns: minmax(0, 780px) 220px; gap: 56px; padding: 40px 48px 80px; justify-content: start; }
.prose { min-width: 0; font-size: 17px; line-height: 1.7; color: var(--text-2); }
.prose > *:first-child { margin-top: 0; }
.prose h2 { position: relative; margin: 56px 0 16px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; color: var(--text); font-weight: 800; }
.prose h3 { position: relative; margin: 36px 0 10px; font-size: 21px; line-height: 1.3; color: var(--text); font-weight: 700; letter-spacing: -0.01em; }
.prose h4 { margin: 24px 0 8px; font-size: 17px; color: var(--text); }
.prose h2 .i, .prose h3 .i { display: inline-block; vertical-align: -3px; margin-right: 10px; color: var(--mint); }
.anchor { position: absolute; left: -26px; opacity: 0; text-decoration: none; color: var(--subtle); font-weight: 500; transition: opacity .2s; }
.prose h2 .anchor { top: 28px; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.prose p { margin: 0 0 16px; }
.prose strong, .prose b { color: var(--text); font-weight: 650; }
.prose a { color: var(--mint); text-decoration: underline; text-decoration-color: var(--mint-line); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.prose a:hover { text-decoration-color: var(--mint); }
.prose .ext { display: inline-block; vertical-align: -1px; margin-left: 2px; }
.prose .ext .i { width: 13px; height: 13px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose ul li::marker { color: var(--mint); }
.prose ol li::marker { color: var(--mint); font-weight: 700; }
.prose code { font: 500 .86em var(--mono); padding: .12em .42em; border-radius: 6px; background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--text); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose blockquote { margin: 0 0 18px; padding: 4px 0 4px 18px; border-left: 3px solid var(--mint-line); color: var(--muted); }
.muted { color: var(--muted); font-size: 15px; }

/* command chip */
.cmd { display: inline-flex; align-items: center; gap: 6px; vertical-align: baseline; padding: .08em .5em .08em .55em; border-radius: 7px; border: 1px solid var(--mint-line); background: var(--mint-soft); color: var(--mint-strong); font: 600 .84em var(--mono); line-height: 1.55; transition: background .15s, border-color .15s; white-space: nowrap; }
.cmd .i { width: 12px; height: 12px; opacity: .55; }
.cmd:hover { background: rgba(130, 224, 176, .18); border-color: var(--mint); }
.cmd:hover .i { opacity: 1; }
.cmd.is-copied { border-color: var(--mint); }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose th { text-align: left; padding: 11px 14px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); background: var(--surface-2); border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.prose td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-2); }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover td { background: rgba(255,255,255,.015); }
.mult { font: 700 14px var(--mono); color: var(--amber); white-space: nowrap; }
.rarity { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--r); background: color-mix(in srgb, var(--r) 14%, transparent); border: 1px solid color-mix(in srgb, var(--r) 35%, transparent); white-space: nowrap; }
.rank { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font: 800 14px var(--mono); }
.rank--F { color: #a7b0bc; background: rgba(167,176,188,.12); } .rank--D { color: #6fd08c; background: rgba(111,208,140,.12); } .rank--C { color: #7aa2ff; background: rgba(122,162,255,.12); }
.rank--B { color: #b493ff; background: rgba(180,147,255,.12); } .rank--A { color: #f0b54a; background: rgba(240,181,74,.12); } .rank--S { color: #ff6b6b; background: rgba(255,107,107,.14); }

/* callouts */
.callout { display: flex; gap: 14px; margin: 0 0 22px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); }
.callout-icon { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.callout-icon .i { width: 18px; height: 18px; }
.callout-body { min-width: 0; font-size: 16px; }
.callout-body p:last-child, .callout-body ul:last-child { margin-bottom: 0; }
.callout-title { margin: 0 0 4px !important; color: var(--text); font-weight: 700; }
.callout--tip { border-color: var(--mint-line); background: linear-gradient(135deg, rgba(130,224,176,.07), var(--surface) 60%); }
.callout--tip .callout-icon { color: var(--mint); background: var(--mint-soft); }
.callout--info .callout-icon { color: var(--sky); background: rgba(122,162,255,.12); }
.callout--warn { border-color: rgba(240,198,116,.3); background: linear-gradient(135deg, rgba(240,198,116,.07), var(--surface) 60%); }
.callout--warn .callout-icon { color: var(--amber); background: rgba(240,198,116,.12); }
.callout--danger { border-color: rgba(255,138,132,.3); background: linear-gradient(135deg, rgba(255,138,132,.07), var(--surface) 60%); }
.callout--danger .callout-icon { color: var(--red); background: rgba(255,138,132,.12); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 0 0 24px; }
.card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); text-decoration: none !important; color: var(--text-2) !important; font-size: 15px; line-height: 1.5; transition: border-color .2s, transform .3s var(--ease), background .2s; }
.card--link:hover { border-color: var(--mint-line); background: var(--surface-2); transform: translateY(-2px); }
.card-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--mint); background: var(--mint-soft); margin-bottom: 4px; }
.card-title { color: var(--text); font-weight: 700; font-size: 16px; }
.card-text { color: var(--muted); }
.card-go { position: absolute; top: 16px; right: 16px; color: var(--subtle); transition: color .2s, transform .3s var(--ease); }
.card--link:hover .card-go { color: var(--mint); transform: translateX(3px); }

/* steps */
.steps { list-style: none; padding: 0 !important; margin: 0 0 24px; display: grid; gap: 10px; counter-reset: none; }
.step { display: flex; gap: 14px; margin: 0 !important; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.step-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--mono); color: #06120c; background: var(--mint); }
.step p { margin: 0 !important; font-size: 15.5px; }
.step-title { color: var(--text); font-weight: 700; font-size: 16.5px !important; margin-bottom: 2px !important; }

/* facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 24px; }
.fact { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); }
.fact-value { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); line-height: 1.15; font-variant-numeric: tabular-nums; }
.fact-label { font-size: 14px; color: var(--muted); line-height: 1.4; }
.fact-hint { font-size: 12.5px; color: var(--subtle); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 24px; }
.split > div { padding: 18px 20px 4px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); }
.split h3 { margin-top: 0 !important; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.tag { padding: 4px 10px; border-radius: 8px; font-size: 13.5px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); }

/* chips & catalog */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.chips--wrap { flex-wrap: wrap; overflow: visible; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--muted); transition: all .15s; }
.chip small { font: 600 11px var(--mono); color: var(--amber); }
.chip[style*="--r"] { color: color-mix(in srgb, var(--r) 85%, white); }
.chip:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }
.chip.is-on { color: #06120c; background: var(--mint); border-color: var(--mint); }
.chip.is-on[style*="--r"] { background: var(--r); border-color: var(--r); color: #0a0c0f; }
.chip.is-on small { color: #06120c; }
.catalog { margin: 0 0 26px; }
.catalog-bar { display: flex; gap: 10px; margin-bottom: 12px; }
.catalog-search { flex: 1; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--subtle); transition: border-color .2s; }
.catalog-search:focus-within { border-color: var(--mint-line); }
.catalog-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); font-size: 15px; }
.catalog-bar select { height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); font-size: 14px; }
.catalog-count { font-size: 13px; color: var(--subtle); margin: 0 0 12px !important; }
.catalog-empty { padding: 30px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

.race-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.race-card { display: flex; gap: 12px; padding: 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); text-decoration: none !important; color: inherit !important; transition: border-color .2s, transform .3s var(--ease), background .2s; }
.race-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--r) 55%, transparent); background: var(--surface-2); box-shadow: 0 16px 40px -24px color-mix(in srgb, var(--r) 70%, transparent); }
.race-card img { width: 72px; height: 72px; border-radius: 12px; image-rendering: pixelated; flex: none; }
.race-card-body { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.race-card-name { font-weight: 700; color: var(--text); font-size: 15.5px; line-height: 1.2; }
.race-card-text { font-size: 12.5px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.race-sheet { display: grid; gap: 14px; margin-bottom: 22px; }
.race-block, .evo { padding: 22px 24px; border-radius: var(--radius-lg); border: 1px solid var(--line-strong); background: var(--surface); }
.race-block h2, .evo h2 { margin: 0 0 12px !important; padding: 0 !important; border: 0 !important; font-size: 22px !important; display: flex; align-items: center; }
.race-block--gift { background: linear-gradient(135deg, color-mix(in srgb, var(--r) 9%, transparent), var(--surface) 55%); border-color: color-mix(in srgb, var(--r) 30%, transparent); }
.ability-list { padding-left: 20px !important; }
.ability-list li { margin: 8px 0 !important; }
.evo { background: radial-gradient(120% 100% at 100% 0%, color-mix(in srgb, var(--r) 14%, transparent), var(--surface) 60%); }
.evo-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.evo-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--r); background: color-mix(in srgb, var(--r) 14%, transparent); }
.evo-kicker { margin: 0 !important; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--subtle); }
.evo-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.evo-grid p, .evo-grid li { font-size: 15.5px; }
.evo-label { display: flex; align-items: center; gap: 8px; margin: 0 0 6px !important; font-weight: 700; color: var(--text); font-size: 14px !important; }
.evo-label .i { color: var(--r); }

/* skills */
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 0 0 24px; }
.skill-card { position: relative; display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line-strong); background: var(--surface); text-decoration: none !important; color: inherit !important; transition: transform .3s var(--ease), border-color .2s; }
.skill-card:hover { transform: translateY(-3px); border-color: var(--mint-line); }
.skill-card img { aspect-ratio: 640 / 300; object-fit: cover; image-rendering: pixelated; width: 100%; }
.skill-card-body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.skill-card-name { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--text); font-size: 17px; }
.skill-card-name .i { color: var(--mint); }
.skill-card-text { font-size: 13px; color: var(--muted); line-height: 1.45; }
.cost-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin: 0 0 22px; }
.cost-strip div { padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.cost-strip span { font: 600 11px var(--mono); color: var(--subtle); }
.cost-strip b { font-size: 14px; color: var(--amber); font-variant-numeric: tabular-nums; }
.milestones { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 0 0 24px; }
.milestone { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); text-decoration: none !important; color: inherit !important; transition: border-color .2s, transform .3s var(--ease); }
.milestone:hover { border-color: rgba(240,198,116,.4); transform: translateY(-2px); }
.milestone-lvl { font: 700 12px var(--mono); color: var(--amber); }
.milestone-name { font-weight: 700; color: var(--text); font-size: 15.5px; line-height: 1.3; }
.milestone-text { font-size: 13px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.milestone-cost { margin-top: auto; padding-top: 4px; display: flex; align-items: center; gap: 6px; font: 600 12.5px var(--mono); color: var(--subtle); }
.level-tools { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); white-space: nowrap; cursor: pointer; }
.toggle input { accent-color: var(--mint); width: 16px; height: 16px; }
.levels td { font-size: 14.5px; }
.levels .lvl { font: 700 13px var(--mono); color: var(--subtle); white-space: nowrap; }
.levels .lvl .i { display: inline-block; vertical-align: -2px; width: 14px; height: 14px; color: var(--amber); margin-right: 4px; }
.levels tr.is-milestone td { background: rgba(240,198,116,.045); }
.levels tr.is-milestone .lvl { color: var(--amber); }
.levels tr:target td { background: rgba(130,224,176,.1); }
.cost { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font: 600 12px var(--mono); color: var(--amber); background: rgba(240,198,116,.1); white-space: nowrap; }
.cost .i { width: 12px; height: 12px; }

/* misc data blocks */
.timeline { display: grid; gap: 6px; margin: 0 0 22px; }
.tl-item { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; }
.tl-badge { flex: none; min-width: 48px; text-align: center; padding: 2px 8px; border-radius: 8px; font: 700 13px var(--mono); color: var(--mint); background: var(--mint-soft); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 0 0 22px; }
.shop-item { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.shop-cost { font: 800 18px var(--mono); color: var(--violet); }
.shop-cost small { font-size: 11px; margin-left: 4px; color: var(--subtle); }
.shop-name { font-weight: 700; color: var(--text); font-size: 14.5px; }
.shop-text { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.mob-grid, .streak { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 0 0 22px; }
.mob-grid div, .streak div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.mob-grid b, .streak b { font: 700 14px var(--mono); color: var(--amber); }
.streak { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.streak span { font-size: 12.5px; color: var(--muted); }
.streak .is-max { border-color: rgba(240,198,116,.4); }
.pet-rarity { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.pet-rarity--standard, .pet-rarity--common { color: #a7b0bc; } .pet-rarity--uncommon { color: #6fd08c; } .pet-rarity--rare { color: #7aa2ff; }
.pet-rarity--epic { color: #b493ff; } .pet-rarity--legendary { color: #f0b54a; } .pet-rarity--mythic { color: #ff6b6b; } .pet-rarity--divine { color: #ffd86b; } .pet-rarity--cosmic { color: #9be7ff; }
.season-status { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 14.5px; color: var(--text-2); margin: 0 0 18px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--subtle); }
.status-dot.is-on { background: var(--mint); box-shadow: 0 0 0 4px rgba(130,224,176,.15); }
.status-dot.is-off { background: var(--amber); }

/* calculators */
.calc { margin: 0 0 26px; padding: 20px 22px; border-radius: var(--radius-lg); border: 1px solid var(--mint-line); background: linear-gradient(160deg, rgba(130,224,176,.06), var(--surface) 45%); }
.calc-head { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.calc-head > .i { width: 38px; height: 38px; padding: 9px; border-radius: 11px; color: var(--mint); background: var(--mint-soft); }
.calc-title { margin: 0 !important; color: var(--text); font-weight: 800; font-size: 17px; }
.calc-sub { margin: 0 !important; font-size: 14px; color: var(--muted); }
.calc-range { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; font-size: 14px; color: var(--muted); }
.calc-range b { color: var(--text); font-family: var(--mono); }
.calc-range input { width: 100%; accent-color: var(--mint); }
.calc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.calc-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.calc-field input { height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--text); font: 600 15px var(--mono); }
.calc-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.calc-out div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(10,12,15,.5); border: 1px solid var(--line); }
.calc-out span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.calc-out b { font: 700 18px var(--mono); color: var(--text); font-variant-numeric: tabular-nums; }
.calc-out--big b { font-size: 30px; color: var(--amber); }
.calc-note { font-size: 13.5px !important; color: var(--subtle); margin: 12px 0 0 !important; }

/* commands page */
.cmd-group h2 { font-size: 22px !important; margin-top: 34px !important; }
.cmd-list { display: grid; gap: 6px; }
.cmd-row { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.cmd-row .cmd { font-size: 13.5px; flex: none; }
.cmd-text { flex: 1; font-size: 15px; line-height: 1.45; color: var(--text-2); display: flex; flex-direction: column; }
.cmd-text small { font: 500 12px var(--mono); color: var(--subtle); }
.cmd-more { color: var(--subtle) !important; text-decoration: none !important; }
.cmd-more:hover { color: var(--mint) !important; }

/* home sections */
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin: 0 0 30px; }
.home-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 180px; padding: 16px 18px; border-radius: var(--radius-lg); overflow: hidden; isolation: isolate; border: 1px solid var(--line-strong); text-decoration: none !important; color: var(--text) !important; transition: transform .35s var(--ease), border-color .2s; }
.home-tile img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 75% 50%; transition: transform .6s var(--ease); }
.home-tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(10,12,15,.95) 10%, rgba(10,12,15,.35) 70%, rgba(10,12,15,.15)); }
.home-tile:hover { transform: translateY(-3px); border-color: var(--mint-line); }
.home-tile:hover img { transform: scale(1.05); }
.home-tile b { font-size: 19px; font-weight: 800; }
.home-tile span { font-size: 13.5px; color: var(--text-2); line-height: 1.45; margin-top: 2px; }

/* pager + footer */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 48px 0 0; }
.pn { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); text-decoration: none !important; transition: border-color .2s; }
.pn:hover { border-color: var(--mint-line); }
.pn small { font-size: 12px; color: var(--subtle); }
.pn span { color: var(--text); font-weight: 700; }
.pn--next { text-align: right; }
.page-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--subtle); }
.page-foot a { color: var(--muted) !important; text-decoration: none !important; display: inline-flex; align-items: center; gap: 6px; }
.page-foot a:hover { color: var(--mint) !important; }

/* toc */
.toc { position: sticky; top: calc(var(--top-h) + 32px); align-self: start; max-height: calc(100vh - var(--top-h) - 64px); overflow-y: auto; padding-left: 16px; border-left: 1px solid var(--line); scrollbar-width: thin; }
.toc-title { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--subtle); }
.toc-link { display: block; padding: 4px 0; font-size: 13.5px; line-height: 1.4; color: var(--muted); text-decoration: none; transition: color .15s; }
.toc-link--3 { padding-left: 12px; font-size: 13px; }
.toc-link:hover { color: var(--text); }
.toc-link.is-active { color: var(--mint); }

/* search */
.search { position: fixed; inset: 0; z-index: 80; display: grid; justify-items: center; align-items: start; padding: 10vh 16px 16px; }
.search-scrim { position: absolute; inset: 0; background: rgba(5, 6, 8, .72); backdrop-filter: blur(6px); }
.search-box { position: relative; width: min(680px, 100%); max-height: 76vh; display: flex; flex-direction: column; border-radius: 20px; border: 1px solid var(--line-strong); background: var(--bg-2); box-shadow: 0 40px 100px -20px rgba(0,0,0,.9); overflow: hidden; animation: pop .2s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.search-field { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 60px; border-bottom: 1px solid var(--line); color: var(--mint); }
.search-field .i { width: 20px; height: 20px; }
.search-field input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; color: var(--text); font-size: 17px; }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-results { overflow-y: auto; padding: 8px; }
.search-hint { padding: 22px 14px; margin: 0; text-align: center; color: var(--subtle); font-size: 14px; line-height: 1.6; }
.sr-group { margin: 8px 6px 4px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--subtle); }
.sr { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--text-2); }
.sr.is-active, .sr:hover { background: var(--surface-2); }
.sr.is-active { box-shadow: inset 2px 0 0 var(--mint); }
.sr-icon { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--mint); background: var(--mint-soft); overflow: hidden; }
.sr-icon img { width: 100%; height: 100%; image-rendering: pixelated; }
.sr-body { min-width: 0; display: flex; flex-direction: column; }
.sr-title { color: var(--text); font-weight: 650; font-size: 15px; }
.sr-title mark, .sr-text mark { background: none; color: var(--mint); }
.sr-text { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 90; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: 12px; background: var(--elevated); border: 1px solid var(--mint-line); font-size: 14.5px; box-shadow: 0 16px 40px -10px rgba(0,0,0,.7); transition: opacity .25s, transform .35s var(--ease); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------- responsive */
@media (max-width: 1280px) {
  .content-wrap { grid-template-columns: minmax(0, 780px); }
  .toc { display: none; }
}
@media (max-width: 1020px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: grid; }
  .side { position: fixed; top: 0; left: 0; bottom: 0; z-index: 70; width: min(300px, 86vw); height: 100%; padding-top: env(safe-area-inset-top, 0px); background: var(--bg-2); transform: translateX(-102%); transition: transform .3s var(--ease); }
  .side.is-open { transform: none; box-shadow: 30px 0 80px rgba(0,0,0,.6); }
  .side-scrim { position: fixed; inset: 0; z-index: 65; background: rgba(5,6,8,.6); }
  .side-scrim.is-open { display: block; }
  .top-links a:not(.top-icon) { display: none; }
  .hero { padding: 44px 28px 32px; }
  .content-wrap { padding: 32px 28px 64px; }
}
@media (max-width: 700px) {
  .top-inner { padding: 0 12px; gap: 8px; }
  .search-btn { margin-left: 4px; max-width: none; }
  .search-btn kbd { display: none; }
  .brand-word { display: none; }
  .hero { min-height: 240px; padding: 36px 18px 26px; }
  .hero::before { background: linear-gradient(0deg, var(--bg) 8%, rgba(10,12,15,.78) 50%, rgba(10,12,15,.35)); }
  .hero--home { min-height: 460px; align-items: flex-end; }
  .hero--race { flex-direction: column; align-items: flex-start; gap: 18px; }
  .race-portrait { width: 120px; height: 120px; border-radius: 20px; }
  .lead { font-size: 16.5px; }
  .content-wrap { padding: 26px 16px 56px; }
  .prose { font-size: 16.5px; }
  .prose h2 { font-size: 24px; margin-top: 44px; }
  .anchor { display: none; }
  .split, .evo-grid, .calc-row { grid-template-columns: 1fr; }
  .catalog-bar, .level-tools { flex-direction: column; align-items: stretch; }
  .race-grid { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pn--next { text-align: left; }
  .cmd-row { flex-wrap: wrap; }
  .search { padding-top: 12px; }
  .search-box { max-height: 88vh; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* отложенное открытие разделов */
.locked { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 22px; padding: 16px 18px; border-radius: var(--radius); border: 1px dashed rgba(240, 198, 116, .38);
  background: repeating-linear-gradient(135deg, rgba(240, 198, 116, .035) 0 10px, transparent 10px 20px), var(--surface); }
.locked-icon { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--amber); background: rgba(240, 198, 116, .12); }
.locked-icon .i { width: 18px; height: 18px; }
.locked-title { margin: 0 0 2px !important; font-weight: 700; color: var(--text); }
.locked-text { margin: 0 !important; font-size: 15px; color: var(--muted); }
.locked-text [data-reveal-left] { color: var(--amber); white-space: nowrap; }
.locked-group { margin-top: 12px; }
.locked-group .locked { margin-bottom: 10px; }
